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

#include <string.h>

#include <setjmp.h>
typedef struct ttype226852 ttype226852;
typedef struct tidobj201015 tidobj201015;
typedef struct TNimObject TNimObject;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct ttypeseq226848 ttypeseq226848;
typedef struct TGenericSeq TGenericSeq;
typedef struct tnode226816 tnode226816;
typedef struct tsym226846 tsym226846;
typedef struct tloc226830 tloc226830;
typedef struct trope178009 trope178009;
typedef struct tcell44933 tcell44933;
typedef struct tcellseq44949 tcellseq44949;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44945 tcellset44945;
typedef struct tpagedesc44941 tpagedesc44941;
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 tident201021 tident201021;
typedef struct NimStringDesc NimStringDesc;
typedef struct tscope226840 tscope226840;
typedef struct TY226947 TY226947;
typedef struct tinstantiation226836 tinstantiation226836;
typedef struct tstrtable226820 tstrtable226820;
typedef struct tsymseq226818 tsymseq226818;
typedef struct tlineinfo196539 tlineinfo196539;
typedef struct tlib226834 tlib226834;
typedef struct tpasscontext287005 tpasscontext287005;
typedef struct tcontext291021 tcontext291021;
typedef struct tproccon291011 tproccon291011;
typedef struct intset223056 intset223056;
typedef struct ttrunk223052 ttrunk223052;
typedef struct ttrunkseq223054 ttrunkseq223054;
typedef struct tlinkedlist127028 tlinkedlist127028;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tidtable226864 tidtable226864;
typedef struct tidpairseq226862 tidpairseq226862;
typedef struct tidpair226860 tidpair226860;
typedef struct tctx290048 tctx290048;
typedef struct TY291133 TY291133;
typedef struct tinstantiationpair291013 tinstantiationpair291013;
typedef struct tnodeseq226810 tnodeseq226810;
typedef struct toverloaditer296491 toverloaditer296491;
typedef struct tidentiter236141 tidentiter236141;
typedef struct TY84745 TY84745;
typedef struct tcandidate406209 tcandidate406209;
typedef struct trepltypevars318786 trepltypevars318786;
typedef struct TY226936 TY226936;
typedef struct toptionentry291005 toptionentry291005;
typedef struct TY502454 TY502454;
typedef struct templctx505840 templctx505840;
typedef struct slice84178 slice84178;
typedef struct ttabiter236119 ttabiter236119;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct TY517908 TY517908;
typedef struct tfieldinstctx521871 tfieldinstctx521871;
typedef struct tfieldsctx522169 tfieldsctx522169;
typedef struct trodreader277030 trodreader277030;
typedef struct tindex277028 tindex277028;
typedef struct tiitable236274 tiitable236274;
typedef struct tiipairseq236272 tiipairseq236272;
typedef struct tiipair236270 tiipair236270;
typedef struct memfile275208 memfile275208;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
typedef struct TY290250 TY290250;
typedef struct TY197414 TY197414;
typedef struct pprocHEX3Aobjecttype290230 pprocHEX3Aobjecttype290230;
typedef struct TY290269 TY290269;
typedef struct TY290270 TY290270;
typedef struct vmargs290042 vmargs290042;
typedef struct TY290231 TY290231;
typedef struct tblock290030 tblock290030;
typedef struct TY290211 TY290211;
typedef struct TY290237 TY290237;
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  tidobj201015  {
  TNimObject Sup;
NI Id;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tloc226830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype226852* T;
trope178009* R;
trope178009* Heaproot;
};
struct  ttype226852  {
  tidobj201015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq226848* Sons;
tnode226816* N;
tsym226846* Owner;
tsym226846* Sym;
tsym226846* Destructor;
tsym226846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc226830 Loc;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tcell44933  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44949  {
NI Len;
NI Cap;
tcell44933** D;
};
struct  tcellset44945  {
NI Counter;
NI Max;
tpagedesc44941* Head;
tpagedesc44941** 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;
tcellseq44949 Zct;
tcellseq44949 Decstack;
tcellset44945 Cycleroots;
tcellseq44949 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tstrtable226820  {
NI Counter;
tsymseq226818* Data;
};
struct  tlineinfo196539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tsym226846  {
  tidobj201015 Sup;
NU8 Kind;
union {
struct {ttypeseq226848* Typeinstcache;
tscope226840* Typscope;
} S1;
struct {TY226947* Procinstcache;
tscope226840* Scope;
} S2;
struct {TY226947* Usedgenerics;
tstrtable226820 Tab;
} S3;
struct {tsym226846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype226852* Typ;
tident201021* Name;
tlineinfo196539 Info;
tsym226846* Owner;
NU32 Flags;
tnode226816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc226830 Loc;
tlib226834* Annex;
tnode226816* Constraint;
};
struct  tpasscontext287005  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  intset223056  {
NI Counter;
NI Max;
ttrunk223052* Head;
ttrunkseq223054* Data;
};
struct  tlinkedlist127028  {
tlistentry127022* Head;
tlistentry127022* Tail;
NI Counter;
};
struct  tidpair226860  {
tidobj201015* Key;
TNimObject* Val;
};
struct  tidtable226864  {
NI Counter;
tidpairseq226862* Data;
};
typedef N_NIMCALL_PTR(tnode226816*, TY291064) (tcontext291021* c, tnode226816* n);
typedef N_NIMCALL_PTR(tnode226816*, TY291069) (tcontext291021* c, tnode226816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode226816*, TY291077) (tcontext291021* c, tnode226816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode226816*, TY291085) (tcontext291021* c, tnode226816* n);
typedef N_NIMCALL_PTR(tnode226816*, TY291090) (tcontext291021* c, tnode226816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode226816*, TY291098) (tcontext291021* c, tnode226816* n);
typedef N_NIMCALL_PTR(tnode226816*, TY291103) (tcontext291021* c, tnode226816* n, tnode226816* norig, NU32 filter);
typedef N_NIMCALL_PTR(ttype226852*, TY291110) (tcontext291021* c, tnode226816* n, ttype226852* prev);
typedef struct {
N_NIMCALL_PTR(tnode226816*, ClPrc) (tcontext291021* c, tidtable226864 pt, tnode226816* n, void* ClEnv);
void* ClEnv;
} TY291116;
typedef struct {
N_NIMCALL_PTR(tsym226846*, ClPrc) (tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info, void* ClEnv);
void* ClEnv;
} TY291122;
struct  tinstantiationpair291013  {
tsym226846* Genericsym;
tinstantiation226836* Inst;
};
typedef N_NIMCALL_PTR(tsym226846*, TY291138) (tcontext291021* c, tsym226846* dc, ttype226852* t, tlineinfo196539 info);
struct  tcontext291021  {
  tpasscontext287005 Sup;
tsym226846* Module;
tscope226840* Currentscope;
tscope226840* Importtable;
tscope226840* Toplevelscope;
tproccon291011* P;
tsymseq226818* Friendmodules;
NI Instcounter;
intset223056 Ambiguoussymbols;
NI Intypeclass;
NI Ingenericcontext;
NI Inunrolledcontext;
NI Incompilescontext;
NI Ingenericinst;
tsymseq226818* Converters;
tsymseq226818* Patterns;
tlinkedlist127028 Optionstack;
tidtable226864 Symmapping;
tlinkedlist127028 Libs;
TY291064 Semconstexpr;
TY291069 Semexpr;
TY291077 Semtryexpr;
TY291085 Semtryconstexpr;
TY291090 Semoperand;
TY291098 Semconstboolexpr;
TY291103 Semoverloadedcall;
TY291110 Semtypenode;
TY291116 Seminferredlambda;
TY291122 Semgenerateinstance;
intset223056 Includedfiles;
tstrtable226820 Userpragmas;
tctx290048* Evalcontext;
intset223056 Unknownidents;
TY291133* Generics;
NI Lastgenericidx;
NI Hloloopdetector;
NI Inparallelstmt;
TY291138 Instdeepcopy;
};
struct  tnode226816  {
ttype226852* Typ;
tlineinfo196539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym226846* Sym;
} S4;
struct {tident201021* Ident;
} S5;
struct {tnodeseq226810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  tproccon291011  {
tsym226846* Owner;
tsym226846* Resultsym;
NI Nestedloopcounter;
NI Nestedblockcounter;
NI Intrystmt;
tproccon291011* Next;
};
struct  tident201021  {
  tidobj201015 Sup;
NimStringDesc* S;
tident201021* Next;
NI H;
};
typedef NU8 TY518462[20];
typedef tnode226816* TY497019[2];
typedef ttype226852* TY497024[2];
struct  tidentiter236141  {
NI H;
tident201021* Name;
};
struct  toverloaditer296491  {
tidentiter236141 It;
tsym226846* M;
NU8 Mode;
NI Symchoiceindex;
tscope226840* Scope;
intset223056 Insymchoice;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
typedef NimStringDesc* TY170969[2];
struct  tcandidate406209  {
tcontext291021* C;
NI Exactmatches;
NI Genericmatches;
NI Subtypematches;
NI Intconvmatches;
NI Convmatches;
NU8 State;
ttype226852* Callee;
tsym226846* Calleesym;
NI Calleescope;
tnode226816* Call;
tidtable226864 Bindings;
NIM_BOOL Basetypematch;
NIM_BOOL Proxymatch;
NIM_BOOL Genericconverter;
NIM_BOOL Coercedistincts;
NIM_BOOL Typedescmatched;
NI Inheritancepenalty;
tsymseq226818* Errors;
};
struct  trepltypevars318786  {
tcontext291021* C;
tidtable226864 Typemap;
tidtable226864 Symmap;
tidtable226864 Localcache;
tlineinfo196539 Info;
NIM_BOOL Allowmetatypes;
};
struct  tinstantiation226836  {
tsym226846* Sym;
ttypeseq226848* Concretetypes;
TY226936* Usedby;
};
typedef NU8 tspecialwords205012[32];
typedef ttype226852* TY291918[2];
typedef tnode226816* TY538311[3];
struct  tscope226840  {
NI Depthlevel;
tstrtable226820 Symbols;
tnodeseq226810* Usingsyms;
tscope226840* Parent;
};
typedef ttype226852* TY412748[1];
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  toptionentry291005  {
  tlistentry127022 Sup;
NU32 Options;
NU8 Defaultcc;
tlib226834* Dynlib;
NU64 Notes;
tnode226816* Otherpragmas;
};
struct  TY502454  {
NI HEX3Astate;
NimStringDesc* Paramname501297;
tnode226816* Genericparams501295;
tlineinfo196539 Info501298;
tcontext291021* C501293;
};
typedef struct {
N_NIMCALL_PTR(ttype226852*, ClPrc) (ttype226852* typeclass, tident201021* typid, void* ClEnv);
void* ClEnv;
} TY501319;
typedef N_CLOSURE_PTR(ttype226852*, TMP3029) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3030) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3031) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3032) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3033) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3034) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3035) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3036) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3038) (ttype226852* typeclass, tident201021* typid);
typedef N_CLOSURE_PTR(ttype226852*, TMP3039) (ttype226852* typeclass, tident201021* typid);
struct  templctx505840  {
tcontext291021* C;
intset223056 Tobind;
intset223056 Tomixin;
intset223056 Toinject;
tsym226846* Owner;
};
typedef tsym226846* TY517716[2];
typedef tnode226816* TY292286[2];
struct  slice84178  {
NI A;
NI B;
};
typedef tnode226816* TY229474[7];
typedef tnode226816* TY247892[1];
typedef NU8 TY533622[33];
typedef NimStringDesc* TY531545[2];
struct  ttabiter236119  {
NI H;
};
typedef NimStringDesc* TY209063[3];
typedef NimStringDesc* TY198301[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(tsym226846*, TMP3282) (tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info);
struct TY517908 {
tnode226816* Field0;
tnode226816* Field1;
};
struct  tfieldinstctx521871  {
ttype226852* Tupletype;
NI Tupleindex;
tsym226846* Field;
NIM_BOOL Replacebyfieldname;
};
struct  tfieldsctx522169  {
tcontext291021* C;
NU16 M;
};
typedef N_NIMCALL_PTR(tnode226816*, TY287069) (tsym226846* m, NI32 fileidx);
typedef N_CLOSURE_PTR(tnode226816*, TMP3343) (tcontext291021* c, tidtable226864 pt, tnode226816* n, void* ClEnv);
typedef N_CLOSURE_PTR(tsym226846*, TMP3344) (tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info, void* ClEnv);
struct  tiipair236270  {
NI Key;
NI Val;
};
struct  tiitable236274  {
NI Counter;
tiipairseq236272* Data;
};
struct  tindex277028  {
NI Lastidxkey;
NI Lastidxval;
tiitable236274 Tab;
NimStringDesc* R;
NI Offset;
};
struct  memfile275208  {
void* Mem;
NI Size;
int Handle;
};
struct  trodreader277030  {
  TNimObject Sup;
NI Pos;
NCSTRING S;
NU32 Options;
NU8 Reason;
TY226936* Moddeps;
TY226936* Files;
NI Dataidx;
NI Convertersidx;
NI Initidx;
NI Interfidx;
NI Compilerprocsidx;
NI Methodsidx;
NimStringDesc* Filename;
tindex277028 Index;
tindex277028 Imports;
NI Readerindex;
NI Line;
NI Moduleid;
tidtable226864 Syms;
memfile275208 Memfile;
tsymseq226818* Methods;
NimStringDesc* Origfile;
NIM_BOOL Inviewmode;
};
struct  trope178009  {
  TNimObject Sup;
trope178009* Left;
trope178009* Right;
NI Length;
NimStringDesc* Data;
};
typedef NI TY26420[8];
struct  tpagedesc44941  {
tpagedesc44941* 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  tlib226834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope178009* Name;
tnode226816* Path;
};
struct  ttrunk223052  {
ttrunk223052* Next;
NI Key;
TY26420 Bits;
};
struct  vmargs290042  {
NI Ra;
NI Rb;
NI Rc;
void* Slots;
tnode226816* Currentexception;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (vmargs290042* args, void* ClEnv);
void* ClEnv;
} vmcallback290044;
struct TY290270 {
NimStringDesc* Field0;
vmcallback290044 Field1;
};
struct  tctx290048  {
  tpasscontext287005 Sup;
TY290250* Code;
TY197414* Debug;
tnode226816* Globals;
tnode226816* Constants;
ttypeseq226848* Types;
tnode226816* Currentexceptiona;
tnode226816* Currentexceptionb;
NI Exceptioninstr;
pprocHEX3Aobjecttype290230* Prc;
tsym226846* Module;
tnode226816* Callsite;
NU8 Mode;
NU8 Features;
NIM_BOOL Traceactive;
NI Loopiterations;
tlineinfo196539 Comesfromheuristic;
TY290269* Callbacks;
NimStringDesc* Errorflag;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct  tblock290030  {
tsym226846* Label;
TY290211* Fixups;
};
struct TY290237 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY290237 TY290234[256];
struct  pprocHEX3Aobjecttype290230  {
TY290231* Blocks;
tsym226846* Sym;
TY290234 Slots;
NI Maxslots;
};
struct ttypeseq226848 {
  TGenericSeq Sup;
  ttype226852* data[SEQ_DECL_SIZE];
};
struct TY226947 {
  TGenericSeq Sup;
  tinstantiation226836* data[SEQ_DECL_SIZE];
};
struct tsymseq226818 {
  TGenericSeq Sup;
  tsym226846* data[SEQ_DECL_SIZE];
};
struct ttrunkseq223054 {
  TGenericSeq Sup;
  ttrunk223052* data[SEQ_DECL_SIZE];
};
struct tidpairseq226862 {
  TGenericSeq Sup;
  tidpair226860 data[SEQ_DECL_SIZE];
};
struct TY291133 {
  TGenericSeq Sup;
  tinstantiationpair291013 data[SEQ_DECL_SIZE];
};
struct tnodeseq226810 {
  TGenericSeq Sup;
  tnode226816* data[SEQ_DECL_SIZE];
};
struct TY226936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct tiipairseq236272 {
  TGenericSeq Sup;
  tiipair236270 data[SEQ_DECL_SIZE];
};
struct TY290250 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY197414 {
  TGenericSeq Sup;
  tlineinfo196539 data[SEQ_DECL_SIZE];
};
struct TY290269 {
  TGenericSeq Sup;
  TY290270 data[SEQ_DECL_SIZE];
};
struct TY290211 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY290231 {
  TGenericSeq Sup;
  tblock290030 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tcell44933*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44933* c);
N_NOINLINE(void, addzct_48617)(tcellseq44949* s, tcell44933* c);
N_NIMCALL(tident201021*, getident_201472)(NimStringDesc* identifier);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size);
N_NIMCALL(tnode226816*, newidentnode_227125)(tident201021* ident, tlineinfo196539 info);
N_NIMCALL(tlineinfo196539, unknownlineinfo_197405)(void);
N_NIMCALL(tcontext291021*, newcontext_291169)(tsym226846* module);
N_NIMCALL(void, internalerror_198987)(tlineinfo196539 info, NimStringDesc* errmsg);
N_NIMCALL(tnode226816*, semconstexpr_489503)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semexprwithtype_488211)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semexpr_488201)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(void, suggestexpr_422008)(tcontext291021* c, tnode226816* node);
N_NIMCALL(tsym226846*, lookup_297004)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, semcapturesym_430685)(tsym226846* s, tsym226846* owner);
N_NIMCALL(tnode226816*, semsym_529849)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags);
N_NIMCALL(void, markused_406251)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(ttype226852*, skiptypes_231245)(ttype226852* t, NU64 kinds);
static N_INLINE(tnode226816*, inlineconst_529841)(tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, copytree_227329)(tnode226816* src);
N_NIMCALL(tnode226816*, newsymnode_228754)(tsym226846* sym, tlineinfo196539 info);
static N_INLINE(NI, len_227364)(tnode226816* n);
N_NIMCALL(tnode226816*, semmacroexpr_489066)(tcontext291021* c, tnode226816* n, tnode226816* norig, tsym226846* sym, NU16 flags);
N_NIMCALL(void, pushinfocontext_197930)(tlineinfo196539 info);
N_NIMCALL(void, globalerror_198934)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(tnode226816*, evalmacrocall_478329)(tsym226846* module, tnode226816* n, tnode226816* norig, tsym226846* sym);
N_NIMCALL(tnode226816*, semaftermacrocall_495770)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags);
N_NIMCALL(tsym226846*, getmodule_236243)(tsym226846* s);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(tnode226816*, semstmt_488277)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semexprnotype_488221)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, discardcheck_518617)(tcontext291021* c, tnode226816* result);
N_NIMCALL(void, message_198976)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NIM_BOOL, implicitlydiscardable_518457)(tnode226816* n_518459);
static N_INLINE(tnode226816*, lastson_227261)(tnode226816* n);
static N_INLINE(NI, sonslen_227249)(tnode226816* n);
N_NIMCALL(NIM_BOOL, iscallexpr_227335)(tnode226816* n);
N_NIMCALL(void, fixniltype_518549)(tnode226816* n);
static N_INLINE(NIM_BOOL, isatom_233963)(tnode226816* n);
N_NIMCALL(void, localerror_198955)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, typetostring_264031)(ttype226852* typ, NU8 prefer);
N_NIMCALL(ttype226852*, semtypenode_488269)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(void, checksonslen_292415)(tnode226816* n, NI length);
N_NIMCALL(ttype226852*, neworprevtype_496130)(NU8 kind, ttype226852* prev, tcontext291021* c);
N_NIMCALL(ttype226852*, newtypes_291213)(NU8 kind, tcontext291021* c);
static N_INLINE(NIM_BOOL, isrange_263216)(tnode226816* n);
static N_INLINE(tnode226816*, HEX5BHEX5D_227698)(tnode226816* n, NI i);
N_NIMCALL(ttype226852*, semrangeaux_496955)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(tnode226816*, newnodei_227138)(NU8 kind, tlineinfo196539 info);
static N_INLINE(ttype226852*, skipintlit_283533)(ttype226852* t);
N_NIMCALL(ttype226852*, getsystype_283030)(NU8 kind);
N_NIMCALL(NIM_BOOL, sametype_269351)(ttype226852* a, ttype226852* b, NU8 flags);
N_NIMCALL(NIM_BOOL, isordinaltype_264092)(ttype226852* t);
N_NIMCALL(NIM_BOOL, enumhasholes_264098)(ttype226852* t);
N_NIMCALL(NIM_BOOL, hasgenericarguments_319243)(tnode226816* n);
N_NIMCALL(void, addson_227287)(tnode226816* father, tnode226816* son);
N_NIMCALL(tnode226816*, makestaticexpr_291835)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NU8, weaklevalue_236624)(tnode226816* a, tnode226816* b);
N_NIMCALL(void, addsonskipintlit_283574)(ttype226852* father, ttype226852* son);
N_NIMCALL(ttype226852*, semtypeexpr_503786)(tcontext291021* c, tnode226816* n_503789);
N_NIMCALL(ttype226852*, base_264038)(ttype226852* t);
N_NIMCALL(NimStringDesc*, rendertree_251058)(tnode226816* n, NU8 renderflags);
N_NIMCALL(tident201021*, considerquotedident_296010)(tnode226816* n);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(ttype226852*, makeandtype_291896)(tcontext291021* c, ttype226852* t1, ttype226852* t2);
N_NIMCALL(ttype226852*, makeortype_292015)(tcontext291021* c, ttype226852* t1, ttype226852* t2);
static N_INLINE(ttype226852*, freshtype_503805)(ttype226852* res, ttype226852* prev);
N_NIMCALL(ttype226852*, copytype_227195)(ttype226852* t, tsym226846* owner, NIM_BOOL keepid);
N_NIMCALL(ttype226852*, makenottype_292134)(tcontext291021* c, ttype226852* t1);
N_NIMCALL(ttype226852*, semanyref_496787)(tcontext291021* c, tnode226816* n_496790, NU8 kind, ttype226852* prev);
N_NIMCALL(ttype226852*, newconstraint_496165)(tcontext291021* c, NU8 k);
N_NIMCALL(void, checkminsonslen_292425)(tnode226816* n, NI length);
N_NIMCALL(tnode226816*, semwhen_489040)(tcontext291021* c, tnode226816* n, NIM_BOOL semcheck);
N_NIMCALL(void, illformedast_292405)(tnode226816* n);
N_NIMCALL(void, idsynchronizationpoint_225458)(NI idrange);
N_NIMCALL(tsym226846*, semtypeident_497731)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, qualifiedlookup_297122)(tcontext291021* c, tnode226816* n, NU8 flags);
N_NIMCALL(tsym226846*, errorsym_296412)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, copysym_227203)(tsym226846* s, NIM_BOOL keepid);
N_NIMCALL(NI, len_231005)(ttype226852* n);
N_NIMCALL(tsym226846*, initoverloaditer_297665)(toverloaditer296491* o, tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, nextoverloaditer_298032)(toverloaditer296491* o, tcontext291021* c, tnode226816* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(ttype226852*, semarray_497411)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, makerangewithstaticexpr_292246)(tcontext291021* c, tnode226816* n);
N_NIMCALL(ttype226852*, makerangetype_292350)(tcontext291021* c, NI64 first, NI64 last, tlineinfo196539 info, ttype226852* inttype);
N_NIMCALL(void, internalerror_199006)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_199126)(TY84745 x_199130);
static N_INLINE(ttype226852*, lastson_227267)(ttype226852* n);
static N_INLINE(NI, sonslen_227255)(ttype226852* n);
N_NIMCALL(ttype226852*, semcontainer_496709)(tcontext291021* c, tnode226816* n, NU8 kind, NimStringDesc* kindstr, ttype226852* prev);
N_NIMCALL(ttype226852*, errortype_292318)(tcontext291021* c);
N_NIMCALL(ttype226852*, semrange_497094)(tcontext291021* c, tnode226816* n_497097, ttype226852* prev);
N_NIMCALL(ttype226852*, semset_496666)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(NI64, lengthord_264016)(ttype226852* t);
N_NIMCALL(ttype226852*, semordinal_497684)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, semvarargs_496735)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, maketypedesc_291762)(tcontext291021* c, ttype226852* typ);
N_NIMCALL(tsym226846*, getcurrowner_291255)(void);
N_NIMCALL(void, rawaddson_231562)(ttype226852* father, ttype226852* son);
N_NIMCALL(ttype226852*, semgeneric_503548)(tcontext291021* c, tnode226816* n, tsym226846* s, ttype226852* prev);
N_NIMCALL(void, localerror_198966)(tlineinfo196539 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(ttype226852*, semgenericparamininvokation_503540)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, newcandidate_406637)(tcontext291021* ctx, ttype226852* callee, tcandidate406209* Result);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, matches_415382)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, describeargs_407200)(tcontext291021* c, tnode226816* n, NI startidx, NU8 prefer);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NIM_BOOL, containsgenerictype_273929)(ttype226852* t);
N_NIMCALL(ttype226852*, instgenericcontainer_491657)(tcontext291021* c, tlineinfo196539 info, ttype226852* header, NIM_BOOL allowmetatypes);
N_NIMCALL(void, initidtable_227167)(tidtable226864* x);
N_NIMCALL(ttype226852*, replacetypevarst_318834)(trepltypevars318786* cl, ttype226852* t);
N_NIMCALL(NIM_BOOL, ismetatype_227752)(ttype226852* t);
N_NIMCALL(void, initintset_223950)(intset223056* Result);
N_NIMCALL(tnode226816*, semgenericstmt_496120)(tcontext291021* c, tnode226816* n, NU8 flags_496124, intset223056* ctx);
N_NIMCALL(void, suggeststmt_422299)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, lookup_512404)(tcontext291021* c, tnode226816* n, NU8 flags, intset223056* ctx);
N_NIMCALL(tsym226846*, skipalias_296255)(tsym226846* s, tnode226816* n);
N_NIMCALL(tsym226846*, searchinscopes_296312)(tcontext291021* c, tident201021* s);
N_NIMCALL(NIM_BOOL, contains_223837)(intset223056* s, NI key);
N_NIMCALL(tnode226816*, symchoice_505476)(tcontext291021* c, tnode226816* n, tsym226846* s, NU8 r);
N_NIMCALL(tnode226816*, newnodeit_227145)(NU8 kind, tlineinfo196539 info, ttype226852* typ);
N_NIMCALL(tnode226816*, semgenericstmtsymbol_511258)(tcontext291021* c, tnode226816* n, tsym226846* s, intset223056* ctx);
N_NIMCALL(tnode226816*, semtemplateexpr_489055)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags);
N_NIMCALL(tnode226816*, evaltemplate_456334)(tnode226816* n, tsym226846* tmpl, tsym226846* gensymowner);
N_NIMCALL(void, popinfocontext_197957)(void);
N_NIMCALL(tnode226816*, newsymnodetypedesc_308160)(tsym226846* s, tlineinfo196539 info);
N_NIMCALL(tnode226816*, fuzzylookup_512482)(tcontext291021* c, tnode226816* n_512485, NU8 flags, intset223056* ctx, NIM_BOOL* ismacro);
N_NIMCALL(tnode226816*, newdot_512460)(tnode226816* n, tnode226816* b);
N_NIMCALL(void, add_227498)(tnode226816* father, tnode226816* son);
N_NIMCALL(tnode226816*, semmixinstmt_505740)(tcontext291021* c, tnode226816* n, intset223056* tomixin);
N_NIMCALL(void, incl_223869)(intset223056* s, NI key);
N_NIMCALL(tnode226816*, semgenericstmtscope_511240)(tcontext291021* c, tnode226816* n, NU8 flags, intset223056* ctx);
N_NIMCALL(tscope226840*, openscope_296191)(tcontext291021* c);
N_NIMCALL(void, closescope_296211)(tcontext291021* c);
N_NIMCALL(void, addtempdecl_512737)(tcontext291021* c, tnode226816* n, NU8 kind);
N_NIMCALL(tsym226846*, newsyms_488918)(NU8 kind, tnode226816* n, tcontext291021* c);
N_NIMCALL(tsym226846*, newsym_227074)(NU8 symkind, tident201021* name, tsym226846* owner, tlineinfo196539 info);
N_NIMCALL(tnode226816*, getidentnode_511205)(tnode226816* n);
N_NIMCALL(void, addprelimdecl_296704)(tcontext291021* c, tsym226846* sym);
N_NIMCALL(void, adddecl_296694)(tcontext291021* c, tsym226846* sym);
N_NIMCALL(tnode226816*, getbody_280269)(tsym226846* s);
N_NIMCALL(ttype226852*, maketypefromexpr_291811)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, assigntype_227210)(ttype226852* dest, ttype226852* src);
N_NIMCALL(ttype226852*, semobjectnode_500888)(tcontext291021* c, tnode226816* n, ttype226852* prev);
static N_INLINE(ttype226852*, skipgenericinvokation_500863)(ttype226852* t);
N_NIMCALL(void, addinheritedfields_500834)(tcontext291021* c, intset223056* check, NI* pos, ttype226852* obj);
N_NIMCALL(void, addinheritedfieldsaux_500662)(tcontext291021* c, intset223056* check, NI* pos, tnode226816* n);
N_NIMCALL(void, semrecordnodeaux_499537)(tcontext291021* c, tnode226816* n, intset223056* check, NI* pos, tnode226816* father, ttype226852* rectype);
N_NIMCALL(tnode226816*, semconstboolexpr_496064)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, fitnode_488245)(tcontext291021* c, ttype226852* formal, tnode226816* arg);
N_NIMCALL(tnode226816*, copynode_227323)(tnode226816* src);
N_NIMCALL(tnode226816*, indextypesmatch_488348)(tcontext291021* c, ttype226852* f, ttype226852* a, tnode226816* arg);
N_NIMCALL(void, initcandidate_406270)(tcontext291021* ctx, tcandidate406209* c, ttype226852* callee);
N_NIMCALL(tnode226816*, paramtypesmatch_413263)(tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg, tnode226816* argorig);
N_NIMCALL(void, instgenericconvertersarg_494289)(tcontext291021* c, tnode226816* a, tcandidate406209* x);
N_NIMCALL(NIM_BOOL, isgenericroutine_233650)(tsym226846* s);
N_NIMCALL(tsym226846*, generateinstance_491802)(tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info);
N_NIMCALL(void, pushowner_291260)(tsym226846* owner);
N_NIMCALL(tnode226816*, newsymnode_227132)(tsym226846* sym);
N_NIMCALL(tinstantiation226836*, new_491941)(void);
N_NIMCALL(void, instantiategenericparamlist_490543)(tcontext291021* c, tnode226816* n, tidtable226864 pt, tinstantiation226836* entry);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(TNimObject*, idtableget_236182)(tidtable226864 t, tidobj201015* key);
N_NIMCALL(ttype226852*, generatetypeinstance_321503)(tcontext291021* p, tidtable226864 pt, tlineinfo196539 info, ttype226852* t);
static N_INLINE(void, pushproccon_291380)(tcontext291021* c, tsym226846* owner);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_51025)(tcell44933* c);
static N_INLINE(NIM_BOOL, canbecycleroot_48667)(tcell44933* c);
static N_INLINE(void, rtladdcycleroot_49429)(tcell44933* c);
N_NOINLINE(void, incl_45671)(tcellset44945* s, tcell44933* cell);
static N_INLINE(void, decref_50604)(tcell44933* c);
N_NIMCALL(void, instantiateproctype_491682)(tcontext291021* c, tidtable226864 pt, tsym226846* prc, tlineinfo196539 info);
N_NIMCALL(void, inittypevars_321474)(tcontext291021* p, tidtable226864 pt, tlineinfo196539 info, trepltypevars318786* Result);
N_NIMCALL(ttype226852*, instcopytype_320238)(trepltypevars318786* cl, ttype226852* t);
N_NIMCALL(tnode226816*, shallowcopy_232347)(tnode226816* src);
N_NIMCALL(void, propagatetoowner_231318)(ttype226852* owner, ttype226852* elem);
N_NIMCALL(tnode226816*, replacetypevarsn_318812)(trepltypevars318786* cl, tnode226816* n_318816);
N_NIMCALL(void, erasevoidparams_320784)(ttype226852* t);
N_NIMCALL(void, skipintliteralparams_320999)(ttype226852* t);
N_NIMCALL(void, maybeaddresult_488301)(tcontext291021* c, tsym226846* s, tnode226816* n);
N_NIMCALL(void, addresult_525075)(tcontext291021* c, ttype226852* t, tlineinfo196539 info, NU8 owner);
N_NIMCALL(void, addparamorresult_491371)(tcontext291021* c, tsym226846* param, NU8 kind);
N_NIMCALL(ttype226852*, findenforcedstatictype_501109)(ttype226852* t_501111);
N_NIMCALL(tsym226846*, getsyssym_283054)(NimStringDesc* name);
N_NIMCALL(void, addresultnode_525118)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, genericcacheget_490785)(tsym226846* genericsym, tinstantiation226836* entry);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_230338)(TY226947* x_230344, TY226947* y_230349);
N_NIMCALL(NIM_BOOL, sameinstantiation_490728)(tinstantiation226836* a, tinstantiation226836* b);
N_NIMCALL(NIM_BOOL, comparetypes_271571)(ttype226852* x, ttype226852* y, NU8 cmp, NU8 flags);
N_NIMCALL(void, safeadd_492032)(TY226947** x_492040, tinstantiation226836* y_492044);
N_NIMCALL(void, makeinstpair_291148)(tsym226846* s, tinstantiation226836* inst, tinstantiationpair291013* Result);
N_NIMCALL(void, pragma_311079)(tcontext291021* c, tsym226846* sym, tnode226816* n, tspecialwords205012 validpragmas);
N_NIMCALL(void, instantiatebody_491449)(tcontext291021* c, tnode226816* n, tsym226846* result);
N_NIMCALL(void, freshgensyms_491201)(tnode226816* n, tsym226846* owner, tidtable226864* symmap);
N_NIMCALL(void, idtableput_236196)(tidtable226864* t, tidobj201015* key, TNimObject* val);
static N_INLINE(NI, safelen_227424)(tnode226816* n);
N_NIMCALL(tnode226816*, semprocbody_488238)(tcontext291021* c, tnode226816* n);
static N_INLINE(NIM_BOOL, isemptytype_233991)(ttype226852* t);
N_NIMCALL(tnode226816*, newnodei_229007)(NU8 kind, tlineinfo196539 info, NI children);
N_NIMCALL(tnode226816*, semasgn_538534)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, builtinfieldaccess_536727)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(NIM_BOOL, istypeexpr_536187)(tnode226816* n);
N_NIMCALL(tsym226846*, getsymfromlist_236228)(tnode226816* list, tident201021* ident, NI start);
N_NIMCALL(tnode226816*, readtypeparameter_536641)(tcontext291021* c, ttype226852* typ, tident201021* paramname, tlineinfo196539 info);
N_NIMCALL(ttype226852*, skipgenericalias_270619)(ttype226852* t);
N_NIMCALL(tsym226846*, linkto_227825)(tsym226846* s, ttype226852* t);
N_NIMCALL(ttype226852*, newtypewithsons_291822)(tcontext291021* c, NU8 kind, ttypeseq226848* sons);
N_NIMCALL(tsym226846*, lookupinrecordandbuildcheck_536217)(tcontext291021* c, tnode226816* n, tnode226816* r, tident201021* field, tnode226816** check);
static N_INLINE(NIM_BOOL, fieldvisible_415842)(tcontext291021* c, tsym226846* f);
N_NIMCALL(tnode226816*, makederef_536595)(tnode226816* n);
N_NIMCALL(tnode226816*, propertywriteaccess_538285)(tcontext291021* c, tnode226816* n, tnode226816* norig, tnode226816* a);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(tnode226816*, newnode_229207)(NU8 kind, tlineinfo196539 info, tnodeseq226810* sons, ttype226852* typ);
N_NIMCALL(tnode226816*, semoverloadedcallanalyseeffects_535249)(tcontext291021* c, tnode226816* n, tnode226816* norig, NU16 flags);
N_NIMCALL(tnode226816*, semoverloadedcall_495100)(tcontext291021* c, tnode226816* n, tnode226816* norig, NU32 filter);
N_NIMCALL(void, resolveoverloads_493017)(tcontext291021* c, tnode226816* n, tnode226816* orig, NU32 filter, tcandidate406209* Result);
N_NIMCALL(void, gatherusedsyms_492875)(tcontext291021* c, tnodeseq226810** usedsyms);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_316667)(tnodeseq226810* x_316673, tnodeseq226810* y_316678);
N_NIMCALL(void, safeadd_492915)(tnodeseq226810** x_492923, tnode226816* y_492927);
N_NIMCALL(void, insert_493119)(tnodeseq226810** x_493127, tnode226816* item_493131, NI i_493133);
N_NIMCALL(void, pickbestcandidate_492331)(tcontext291021* c, tnode226816* headsymbol, tnode226816* n, tnode226816* orig, tnode226816* initialbinding, NU32 filter, tcandidate406209* best, tcandidate406209* alt, tsymseq226818** errors);
N_NIMCALL(NI, lastoverloadscope_298011)(toverloaditer296491* o);
N_NIMCALL(void, initcandidate_406295)(tcontext291021* ctx, tcandidate406209* c, tsym226846* callee, tnode226816* binding, NI calleescope);
N_NIMCALL(void, determinetype_492327)(tcontext291021* c, tsym226846* s);
N_NIMCALL(tnode226816*, semprocaux_526170)(tcontext291021* c, tnode226816* n, NU8 kind, tspecialwords205012 validpragmas, NU8 phase);
N_NIMCALL(tnode226816*, semprocannotation_525247)(tcontext291021* c, tnode226816* prc);
N_NIMCALL(tsym226846*, lookupmacro_525201)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, searchinscopes_296355)(tcontext291021* c, tident201021* s, NU32 filter);
N_NIMCALL(tnode226816*, copyexcept_525142)(tnode226816* n, NI i);
N_NIMCALL(tsym226846*, semidentdef_520665)(tcontext291021* c, tnode226816* n, NU8 kind);
static N_INLINE(NIM_BOOL, istoplevel_292436)(tcontext291021* c);
N_NIMCALL(tsym226846*, semidentwithpragma_488999)(tcontext291021* c, NU8 kind, tnode226816* n, NU32 allowed);
N_NIMCALL(tsym226846*, semidentvis_488990)(tcontext291021* c, NU8 kind, tnode226816* n, NU32 allowed);
N_NIMCALL(tsym226846*, newsymg_488930)(NU8 kind, tnode226816* n, tcontext291021* c);
static N_INLINE(void, suggestsym_421882)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, findusages_419417)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, finddefinition_419457)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, addtosourcemap_419598)(tsym226846* sym, tlineinfo196539 info);
N_NIMCALL(void, addinterfaceoverloadablesymat_296855)(tcontext291021* c, tscope226840* scope, tsym226846* sym);
N_NIMCALL(tnode226816*, semgenericparamlist_505001)(tcontext291021* c, tnode226816* n, ttype226852* father);
N_NIMCALL(ttype226852*, semgenericconstraints_504975)(tcontext291021* c, ttype226852* x);
N_NIMCALL(void, semparamlist_488284)(tcontext291021* c, tnode226816* n, tnode226816* genericparams, tsym226846* s);
N_NIMCALL(ttype226852*, semproctypenode_502546)(tcontext291021* c, tnode226816* n, tnode226816* genericparams, ttype226852* prev, NU8 kind, NIM_BOOL istype);
N_NIMCALL(toptionentry291005*, lastoptionentry_291175)(tcontext291021* c);
N_NIMCALL(ttype226852*, semparamtype_502513)(tcontext291021* c, tnode226816* n, tnode226816** constraint);
N_NIMCALL(tnode226816*, semnodekindconstraints_322527)(tnode226816* p);
N_NIMCALL(ttype226852*, liftparamtype_501291)(tcontext291021* c, NU8 prockind, tnode226816* genericparams, ttype226852* paramtype, NimStringDesc* paramname, tlineinfo196539 info, NIM_BOOL anon);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP3027)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_CLOSURE(ttype226852*, addimplicitgenericimpl_501318)(ttype226852* typeclass, tident201021* typid, void* ClEnv);
N_NIMCALL(NIM_BOOL, containsorincl_223916)(intset223056* s, NI key);
N_NIMCALL(NIM_BOOL, isinlineiterator_412610)(ttype226852* t);
N_NIMCALL(tnode226816*, sempattern_507110)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, flattenstmts_263416)(tnode226816* n);
N_NIMCALL(tnode226816*, sempatternbody_509926)(templctx505840* c, tnode226816* n);
N_NIMCALL(tnode226816*, handlesym_510201)(templctx505840* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, newparam_509940)(templctx505840* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, sembindstmt_505600)(tcontext291021* c, tnode226816* n, intset223056* tobind);
N_NIMCALL(tnode226816*, expectparam_510273)(templctx505840* c, tnode226816* n);
N_NIMCALL(tsym226846*, searchforproc_310414)(tcontext291021* c, tscope226840* scope, tsym226846* fn);
N_NIMCALL(void, addinterfacedeclat_296779)(tcontext291021* c, tscope226840* scope, tsym226846* sym);
N_NIMCALL(void, implicitpragmas_316398)(tcontext291021* c, tsym226846* sym, tnode226816* n, tspecialwords205012 validpragmas);
N_NIMCALL(void, wrongredefinition_296675)(tlineinfo196539 info, NimStringDesc* s);
N_NIMCALL(void, addgenericparamlisttoscope_523747)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, addparams_488293)(tcontext291021* c, tnode226816* n, NU8 kind);
static N_INLINE(NIM_BOOL, importantcomments_170156)(void);
N_NIMCALL(void, popowner_291266)(void);
N_NIMCALL(void, semoverride_526035)(tcontext291021* c, tsym226846* s, tnode226816* n);
N_NIMCALL(NimStringDesc*, nsuNormalize)(NimStringDesc* s);
N_NIMCALL(void, dodestructorstuff_516769)(tcontext291021* c, tsym226846* s, tnode226816* n);
N_NIMCALL(ttype226852*, instantiatedestructor_516765)(tcontext291021* c, ttype226852* typ);
static N_INLINE(NIM_BOOL, contains_517605)(tsym226846** a_517611, NI a_517611Len0, tsym226846* item_517614);
static N_INLINE(NI, find_517617)(tsym226846** a_517622, NI a_517622Len0, tsym226846* item_517624);
N_NIMCALL(tnode226816*, generatedestructor_517485)(tcontext291021* c, ttype226852* t);
N_NIMCALL(tnode226816*, destroyfieldorfields_516988)(tcontext291021* c, tnode226816* field, tnode226816* holder);
N_NIMCALL(tnode226816*, destroycase_517056)(tcontext291021* c, tnode226816* n, tnode226816* holder);
N_NIMCALL(tnodeseq226810*, HEX5BHEX5D_517155)(tnodeseq226810* s_517161, slice84178 x_517166);
static N_INLINE(slice84178, HEX2EHEX2E_92299)(NI a_92303, NI b_92305);
N_NIMCALL(tnode226816*, newnode_227090)(NU8 kind);
N_NIMCALL(tnode226816*, destroysym_516993)(tcontext291021* c, tsym226846* field, tnode226816* holder);
N_NIMCALL(tnode226816*, usesym_422001)(tsym226846* sym);
N_NIMCALL(tnode226816*, symnodefromtype_489122)(tcontext291021* c, ttype226852* t, tlineinfo196539 info);
N_NIMCALL(tsym226846*, symfromtype_489078)(ttype226852* t, tlineinfo196539 info);
N_NIMCALL(ttype226852*, makevartype_291206)(tcontext291021* c, ttype226852* basetype);
N_NIMCALL(tnode226816*, semproc_516723)(tcontext291021* c, tnode226816* n);
static N_INLINE(NIM_BOOL, experimentalmode_292446)(tcontext291021* c);
static N_INLINE(void, paramstypecheck_489015)(tcontext291021* c, ttype226852* typ);
N_NIMCALL(NIM_BOOL, typeallowed_264231)(ttype226852* t, NU8 kind);
N_NIMCALL(tnode226816*, hlobody_490479)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, hlo_489575)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, applypatterns_489746)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, applyrule_482563)(tcontext291021* c, tsym226846* s, tnode226816* n);
N_NIMCALL(tnode226816*, evalpattern_489579)(tcontext291021* c, tnode226816* n, tnode226816* orig);
N_NIMCALL(tnode226816*, semdirectop_489032)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, aftercallactions_536063)(tcontext291021* c, tnode226816* n, tnode226816* orig, NU16 flags);
N_NIMCALL(void, semfinishoperands_415292)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, activate_488327)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, fixabstracttype_532831)(tcontext291021* c, tnode226816* n);
N_NIMCALL(ttype226852*, arrayconstrtype_532546)(tcontext291021* c, tnode226816* n);
N_NIMCALL(ttype226852*, elemtype_264656)(ttype226852* t);
N_NIMCALL(void, changetype_488253)(tnode226816* n, ttype226852* newtype, NIM_BOOL check);
N_NIMCALL(NI64, firstord_264004)(ttype226852* t);
N_NIMCALL(NI64, lastord_264010)(ttype226852* t);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
N_NIMCALL(tnode226816*, semarrayconstr_532588)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(NI64, getordvalue_264187)(tnode226816* n);
N_NIMCALL(ttype226852*, commontype_488492)(ttype226852* x, ttype226852* y);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_274497)(ttypeseq226848* x_274503, ttypeseq226848* y_274508);
N_NIMCALL(ttype226852*, newtype_227083)(NU8 kind, tsym226846* owner);
N_NIMCALL(NIM_BOOL, isemptycontainer_488464)(ttype226852* t);
N_NIMCALL(ttype226852*, commonsuperclass_272084)(ttype226852* a, ttype226852* b);
N_NIMCALL(void, analyseifaddresstakenincall_533577)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NU8, isassignable_533184)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NU8, isassignable_323003)(tsym226846* owner, tnode226816* n);
N_NIMCALL(void, semprocvarcheck_516664)(tcontext291021* c, tnode226816* n_516667);
N_NIMCALL(tnode226816*, skipconv_274732)(tnode226816* n);
N_NIMCALL(void, performprocvarcheck_516600)(tcontext291021* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, analyseifaddresstaken_533237)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, newhiddenaddrtaken_533192)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, magicsafteroverloadresolution_534554)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semispartof_533962)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(NU8, ispartof_479430)(tnode226816* a, tnode226816* b);
N_NIMCALL(tnode226816*, newintnodet_305028)(NI64 intval, tnode226816* n);
N_NIMCALL(tnode226816*, semtypetraits_534105)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, evaltypetrait_534073)(tnode226816* trait, ttype226852* operand, tsym226846* context);
N_NIMCALL(tnode226816*, newstrnode_227118)(NU8 kind, NimStringDesc* strval);
N_NIMCALL(tnode226816*, newintnode_227096)(NU8 kind, NI64 intval);
N_NIMCALL(tnode226816*, newstrnodet_305042)(NimStringDesc* strval, tnode226816* n);
N_NIMCALL(tnode226816*, seminstantiationinfo_534004)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NI, expectintlit_533980)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tlineinfo196539, getinfocontext_197992)(NI index);
N_NIMCALL(NimStringDesc*, tofullpath_198037)(NI32 fileidx);
N_NIMCALL(NimStringDesc*, tofilename_198025)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_198073)(tlineinfo196539 info);
N_NIMCALL(tnode226816*, semord_534188)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semlowhigh_531538)(tcontext291021* c, tnode226816* n, NU16 m);
N_NIMCALL(tnode226816*, semshallowcopy_534549)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, sembindsym_534224)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, errornode_292328)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semlocals_534438)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, inittabiter_236124)(ttabiter236119* ti, tstrtable226820 tab);
static N_INLINE(tnode226816*, newderef_518404)(tnode226816* n);
N_NIMCALL(tsym226846*, nextiter_236132)(ttabiter236119* ti, tstrtable226820 tab);
N_NIMCALL(tnode226816*, evalatcompiletime_534592)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, getconstexpr_305004)(tsym226846* m, tnode226816* n);
N_NIMCALL(ttype226852*, getintervaltype_305465)(NU16 m, tnode226816* n);
N_NIMCALL(tnode226816*, evalstaticexpr_478237)(tsym226846* module, tnode226816* e, tsym226846* prc);
N_NIMCALL(tnode226816*, fixuptypeaftereval_489201)(tcontext291021* c, tnode226816* evaluated, tnode226816* eorig);
N_NIMCALL(void, annotatetype_483223)(tnode226816* n, ttype226852* t);
N_NIMCALL(tnode226816*, evalconstexpr_478226)(tsym226846* module, tnode226816* e);
N_NIMCALL(tnode226816*, commonoptimizations_441642)(tsym226846* c, tnode226816* n);
N_NIMCALL(tnode226816*, transformbody_442373)(tsym226846* module, tnode226816* n, tsym226846* prc);
static N_INLINE(void, popproccon_291425)(tcontext291021* c);
N_NIMCALL(void, fixupinstantiatedsymbols_491553)(tcontext291021* c, tsym226846* s);
N_NIMCALL(void, semborrow_525035)(tcontext291021* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tsym226846*, searchforborrowproc_495620)(tcontext291021* c, tscope226840* startscope, tsym226846* fn);
N_NIMCALL(ttype226852*, baseofdistinct_273939)(ttype226852* t);
N_NIMCALL(void, sideeffectscheck_491615)(tcontext291021* c, tsym226846* s);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_492401)(tsymseq226818* x_492407, tsymseq226818* y_492412);
N_NIMCALL(void, safeadd_492544)(tsymseq226818** x_492552, tsym226846* y_492556);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NI, cmpcandidates_407039)(tcandidate406209* a, tcandidate406209* b);
N_NIMCALL(void, delete_493248)(tnodeseq226810** x_493256, NI i_493260);
N_NIMCALL(tnode226816*, withinfo_228694)(tnode226816* n, tlineinfo196539 info);
N_NIMCALL(void, HEX5BHEX5DHEX3D_493447)(tnodeseq226810** s_493455, slice84178 x_493461, tnode226816** b_493466, NI b_493466Len0);
static N_INLINE(NimStringDesc*, HEX5BHEX5D_84171)(NimStringDesc* s, slice84178 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_492727)(tcontext291021* c, tnode226816* n_492730, tsymseq226818* errors);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, msgkindtostring_198378)(NU16 kind);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, getprocheader_264519)(tsym226846* sym, NU8 prefer);
N_NIMCALL(NIM_BOOL, samemethoddispatcher_492237)(tsym226846* a, tsym226846* b);
N_NIMCALL(tnode226816*, semresolvedcall_494735)(tcontext291021* c, tnode226816* n, tcandidate406209* x);
N_NIMCALL(void, instgenericconverterssons_494428)(tcontext291021* c, tnode226816* n, tcandidate406209* x);
N_NIMCALL(tnode226816*, dottransformation_537736)(tcontext291021* c, tnode226816* n);
static N_INLINE(NIM_BOOL, issymchoice_531121)(tnode226816* n);
N_NIMCALL(tnode226816*, semsubscript_537915)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semderef_537863)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, buildoverloadedsubscripts_537829)(tnode226816* n, tident201021* ident);
N_NIMCALL(NU8, cmptypes_412293)(tcontext291021* c, ttype226852* f, ttype226852* a);
N_NIMCALL(void, typemismatch_488357)(tnode226816* n, ttype226852* formal, ttype226852* actual);
static N_INLINE(void, asgntoresultvar_538428)(tcontext291021* c, tnode226816* n, tnode226816* le, tnode226816* ri);
N_NIMCALL(tnode226816*, takeimplicitaddr_538372)(tcontext291021* c, tnode226816* n);
N_NIMCALL(ttype226852*, makeptrtype_291199)(tcontext291021* c, ttype226852* basetype);
static N_INLINE(tsym226846*, pop_438736)(tsymseq226818** s_438744);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(void, finishmethod_488341)(tcontext291021* c, tsym226846* s);
N_NIMCALL(NIM_BOOL, hasobjparam_527844)(tsym226846* s);
N_NIMCALL(void, methoddef_423824)(tsym226846* s, NIM_BOOL fromcache);
N_NIMCALL(tnode226816*, forcebool_496036)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, assign_223975)(intset223056* dest, intset223056* src);
N_NIMCALL(void, semrecordcase_499547)(tcontext291021* c, tnode226816* n, intset223056* check, NI* pos, tnode226816* father, ttype226852* rectype);
N_NIMCALL(void, semcasebranch_499296)(tcontext291021* c, tnode226816* t, tnode226816* branch, NI branchindex, NI64* covered);
N_NIMCALL(tnode226816*, semcasebranchrange_499155)(tcontext291021* c, tnode226816* t, tnode226816* b, NI64* covered);
N_NIMCALL(tnode226816*, sembranchrange_499111)(tcontext291021* c, tnode226816* t, tnode226816* a, tnode226816* b, NI64* covered);
N_NIMCALL(tnode226816*, skipconvtaketype_274816)(tnode226816* n);
N_NIMCALL(NIM_BOOL, emptyrange_285034)(tnode226816* a, tnode226816* b);
N_NIMCALL(tnode226816*, semcasebranchsetelem_499194)(tcontext291021* c, tnode226816* t, tnode226816* b, NI64* covered);
N_NIMCALL(void, checkforoverlap_499004)(tcontext291021* c, tnode226816* t, NI currentex, NI branchindex);
N_NIMCALL(NIM_BOOL, overlap_285012)(tnode226816* a, tnode226816* b);
N_NIMCALL(void, delson_227294)(tnode226816* father, NI idx);
N_NIMCALL(trope178009*, torope_178076)(NimStringDesc* s);
N_NIMCALL(ttype226852*, semtuple_498228)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, semtypeclass_503824)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(void, safeadd_318709)(ttypeseq226848** x_318717, ttype226852* y_318721);
N_NIMCALL(ttype226852*, semvartype_496898)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, semdistinct_496931)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, semproctypewithscope_503905)(tcontext291021* c, tnode226816* n, ttype226852* prev, NU8 kind);
N_NIMCALL(void, seteffectsforproctype_384811)(ttype226852* t, tnode226816* n);
N_NIMCALL(NIM_BOOL, haspragma_316628)(tnode226816* n, NU8 pragma);
N_NIMCALL(ttype226852*, semenum_496173)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(void, strtableadd_236103)(tstrtable226820* t, tsym226846* n);
N_NIMCALL(ttype226852*, semstmtlisttype_503342)(tcontext291021* c, tnode226816* n, ttype226852* prev);
N_NIMCALL(ttype226852*, semblocktype_503437)(tcontext291021* c, tnode226816* n, ttype226852* prev);
static N_INLINE(void, markindirect_292365)(tcontext291021* c, tsym226846* s);
N_NIMCALL(void, setintlittype_283634)(tnode226816* result);
N_NIMCALL(ttype226852*, getfloatlittype_283523)(tnode226816* literal);
N_NIMCALL(tnode226816*, semfieldaccess_529617)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semconv_531168)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, maybelifttype_531141)(ttype226852** t, tcontext291021* c, tlineinfo196539 info);
N_NIMCALL(tnode226816*, inferwithmetatype_488450)(tcontext291021* c, ttype226852* formal, tnode226816* arg, NIM_BOOL coercedistincts);
N_NIMCALL(NU8, checkconvertible_530823)(tcontext291021* c, ttype226852* castdest, ttype226852* src);
N_NIMCALL(NU8, checkconversionbetweenobjects_530809)(ttype226852* castdest, ttype226852* src);
N_NIMCALL(NI, inheritancediff_271588)(ttype226852* a, ttype226852* b);
N_NIMCALL(tnode226816*, semobjconstr_535463)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(void, checkinitialized_542997)(tnode226816* n, intset223056* ids, tlineinfo196539 info);
N_NIMCALL(tnode226816*, semmagic_541264)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags);
N_NIMCALL(tnode226816*, semdefined_539896)(tcontext291021* c, tnode226816* n, NIM_BOOL onlycurrentscope);
N_NIMCALL(NIM_BOOL, isdefined_202046)(tident201021* symbol);
N_NIMCALL(NIM_BOOL, isdeclared_202056)(tident201021* symbol);
N_NIMCALL(tsym226846*, lookupfordefined_539759)(tcontext291021* c, tnode226816* n, NIM_BOOL onlycurrentscope);
N_NIMCALL(tsym226846*, lookupfordefined_539750)(tcontext291021* c, tident201021* i, NIM_BOOL onlycurrentscope);
N_NIMCALL(tsym226846*, localsearchinscope_296301)(tcontext291021* c, tident201021* s);
N_NIMCALL(tsym226846*, strtableget_236111)(tstrtable226820 t, tident201021* name);
N_NIMCALL(tnode226816*, setms_541228)(tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, semcompiles_541100)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, tryexpr_488317)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(NI, getinfocontextlen_197885)(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_197905)(NI l);
N_NIMCALL(tnode226816*, semsizeof_531646)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semis_532075)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, maketypesymnode_291797)(tcontext291021* c, ttype226852* typ, tlineinfo196539 info);
N_NIMCALL(tnode226816*, isopimpl_489048)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NU8, typerel_407436)(tcandidate406209* c, ttype226852* f, ttype226852* aorig, NIM_BOOL dobind);
N_NIMCALL(tnode226816*, semof_531683)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semexpandtoast_540529)(tcontext291021* c, tnode226816* n, tsym226846* magicsym, NU16 flags);
N_NIMCALL(tnode226816*, semexpandtoast_540286)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, expectmacroortemplatecall_489025)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semquoteast_488334)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NimStringDesc*, expectstring_540098)(tcontext291021* c, tnode226816* n_540101);
N_NIMCALL(tnodeseq226810*, newseq_540811)(NI len_540815);
N_NIMCALL(void, processquotations_540555)(tnode226816** n, NimStringDesc* op, tnodeseq226810** quotes, tnodeseq226810** ids);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_BOOL, nsuStartsWith)(NimStringDesc* s, NimStringDesc* prefix);
N_NIMCALL(tsym226846*, newanonsym_540148)(NU8 kind, tlineinfo196539 info, tsym226846* owner);
N_NIMCALL(tnode226816*, semtemplatedef_509258)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semtemplbodydirty_509030)(templctx505840* c, tnode226816* n);
N_NIMCALL(tnode226816*, semtemplbody_505998)(templctx505840* c, tnode226816* n);
N_NIMCALL(tnode226816*, semtemplsymbol_506411)(tcontext291021* c, tnode226816* n, tsym226846* s);
N_NIMCALL(void, openscope_506003)(templctx505840* c);
N_NIMCALL(void, closescope_506010)(templctx505840* c);
N_NIMCALL(tnode226816*, semtemplbodyscope_506017)(templctx505840* c, tnode226816* n);
N_NIMCALL(void, addlocaldecl_506311)(templctx505840* c, tnode226816** n, NU8 k);
N_NIMCALL(NU8, symbinding_505374)(tnode226816* n);
N_NIMCALL(NU8, whichkeyword_205382)(tident201021* id);
N_NIMCALL(tnode226816*, onlyreplaceparams_506026)(templctx505840* c, tnode226816* n);
N_NIMCALL(tnode226816*, getidentnode_505846)(templctx505840* c, tnode226816* n);
static N_INLINE(NIM_BOOL, istemplparam_505928)(templctx505840* c, tnode226816* n);
N_NIMCALL(void, replaceidentbysym_505801)(tnode226816** n, tnode226816* s);
N_NIMCALL(tsym226846*, newgensym_506269)(NU8 kind, tnode226816* n, templctx505840* c);
N_NIMCALL(void, semtemplsomedecl_506927)(templctx505840* c, tnode226816* n, NU8 symkind);
N_NIMCALL(tnode226816*, semroutineintemplbody_506660)(templctx505840* c, tnode226816* n, NU8 k);
N_NIMCALL(tnode226816*, semroutineintemplname_506462)(templctx505840* c, tnode226816* n);
N_NIMCALL(tnode226816*, transformtoexpr_509193)(tnode226816* n);
N_NIMCALL(void, symtabreplace_241615)(tstrtable226820* t, tsym226846* prevsym, tsym226846* newsym);
N_NIMCALL(tsym226846*, getmagicsym_540134)(NU16 magic);
N_NIMCALL(NU8, spawnresult_426994)(ttype226852* t, NIM_BOOL inparallel);
N_NIMCALL(ttype226852*, createflowvar_541143)(tcontext291021* c, ttype226852* t, tlineinfo196539 info);
N_NIMCALL(tsym226846*, getcompilerproc_283036)(NimStringDesc* name);
N_NIMCALL(tsym226846*, instantiatecreateflowvarcall_541152)(tcontext291021* c, ttype226852* t, tlineinfo196539 info);
N_NIMCALL(tnode226816*, semindirectop_535468)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(void, semopaux_532160)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, overloadedcallopr_532320)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, setgenericparams_544435)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semsymgenericinstantiation_529832)(tcontext291021* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, explicitgenericinstantiation_495205)(tcontext291021* c, tnode226816* n, tsym226846* s_495209);
N_NIMCALL(tnode226816*, explicitgenericsym_495127)(tcontext291021* c, tnode226816* n, tsym226846* s);
N_NIMCALL(tnode226816*, explicitgenericinsterror_495120)(tnode226816* n);
N_NIMCALL(tnode226816*, semarrayaccess_538259)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(NU8, checkpar_542305)(tnode226816* n);
N_NIMCALL(tnode226816*, semtuplepositionsconstr_542899)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semtuplefieldsconstr_542512)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semsetconstr_541633)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semlambda_488261)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semcast_531461)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NIM_BOOL, iscastable_531025)(ttype226852* dst, ttype226852* src);
N_NIMCALL(NI64, computesize_264193)(ttype226852* typ);
N_NIMCALL(tnode226816*, semif_518734)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semexprbranch_518411)(tcontext291021* c, tnode226816* n);
static N_INLINE(void, semdestructorcheck_518185)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semexprbranchscope_518447)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semtableconstr_542196)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semstaticexpr_535215)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semblock_543699)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semstmtlist_528505)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semtry_519853)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NIM_BOOL, usesresult_528404)(tnode226816* n);
N_NIMCALL(void, insertdestructors_517904)(tcontext291021* c, tnode226816* varsection, TY517908* Result);
N_NIMCALL(tnode226816*, semraise_523655)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semvarorlet_520897)(tcontext291021* c, tnode226816* n, NU8 symkind);
N_NIMCALL(void, newsons_227273)(tnode226816* father, NI length);
N_NIMCALL(void, addinterfacedecl_296845)(tcontext291021* c, tsym226846* sym);
N_NIMCALL(tsym226846*, findshadowedvar_520524)(tcontext291021* c, tsym226846* v);
N_NIMCALL(NIM_BOOL, identwithin_520594)(tnode226816* n, tident201021* s);
N_NIMCALL(void, checknilable_520804)(tsym226846* v);
N_NIMCALL(void, setupcompiletimevar_478260)(tsym226846* module, tnode226816* n);
N_NIMCALL(tnode226816*, semconst_521603)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, fitremovehiddenconv_520473)(tcontext291021* c, ttype226852* typ, tnode226816* n);
N_NIMCALL(tnode226816*, semtypesection_524891)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, typesectionleftsidepass_523829)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, typesectionrightsidepass_524003)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, processmagictype_504936)(tcontext291021* c, tsym226846* m);
N_NIMCALL(void, setmagictype_504928)(tsym226846* m, NU8 kind, NI size);
N_NIMCALL(ttype226852*, systypefromname_283261)(NimStringDesc* name);
N_NIMCALL(void, typesectionfinalpass_524544)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, checkconstructedtype_318152)(tlineinfo196539 info, ttype226852* typ);
N_NIMCALL(void, checkformetafields_524355)(tnode226816* n);
N_NIMCALL(tnode226816*, semdiscard_516111)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semwhile_516429)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, sembreakorcontinue_516184)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semfor_523290)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semexprnoderef_488228)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, semforvars_523004)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tsym226846*, symforvar_522803)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, addforvardecl_522765)(tcontext291021* c, tsym226846* v);
N_NIMCALL(tnode226816*, semforfields_522395)(tcontext291021* c, tnode226816* n, NU16 m);
N_NIMCALL(tnode226816*, instfieldloopbody_521876)(tfieldinstctx521871* c, tnode226816* n, tnode226816* forloop);
N_NIMCALL(void, semforobjectfields_522172)(tfieldsctx522169 c, tnode226816* typ, tnode226816* forloop, tnode226816* father);
N_NIMCALL(NIM_BOOL, hassonwith_227301)(tnode226816* n, NU8 kind);
N_NIMCALL(tnode226816*, implicititerator_523254)(tcontext291021* c, NimStringDesc* it, tnode226816* arg);
N_NIMCALL(tnode226816*, semcase_519201)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NI64, tocover_516547)(ttype226852* t);
N_NIMCALL(tnode226816*, semreturn_538903)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semusing_540158)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, adddeclat_296714)(tscope226840* scope, tsym226846* sym);
N_NIMCALL(tnode226816*, semasm_516406)(tcontext291021* con, tnode226816* n);
N_NIMCALL(NIM_CHAR, pragmaasm_311098)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semasmoremit_313634)(tcontext291021* con, tnode226816* n, NIM_CHAR marker);
N_NIMCALL(tnode226816*, semyield_539513)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, semyieldvarresult_539212)(tcontext291021* c, tnode226816* n, ttype226852* restype);
N_NIMCALL(tnode226816*, semiterator_527541)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semmethod_527896)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semconverterdef_527956)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, addconverter_291634)(tcontext291021* c, tsym226846* conv);
N_NIMCALL(tnode226816*, semmacrodef_528011)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, evalimport_299004)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, evalimportexcept_300211)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, evalfrom_299011)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, evalinclude_528089)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NI32, checkmodulename_299237)(tnode226816* n);
N_NIMCALL(void, excl_223884)(intset223056* s, NI key);
N_NIMCALL(tnode226816*, semexport_544058)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, sempragmablock_528200)(tcontext291021* c, tnode226816* n);
N_NIMCALL(NU8, whichpragma_263304)(tnode226816* n);
N_NIMCALL(void, setline_528142)(tnode226816* n, tlineinfo196539 info);
N_NIMCALL(tnode226816*, semstaticstmt_528330)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, evalstaticstmt_478249)(tsym226846* module, tnode226816* e, tsym226846* prc);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_198579)(tlineinfo196539 a, tlineinfo196539 b);
N_NIMCALL(tnode226816*, tryconstexpr_489423)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, semoperand_529624)(tcontext291021* c, tnode226816* n, NU16 flags);
N_NIMCALL(tnode226816*, seminferredlambda_525857)(tcontext291021* c, tidtable226864 pt, tnode226816* n_525861);
N_NIMCALL(tnode226816*, replacetypesinbody_321489)(tcontext291021* p, tidtable226864 pt, tnode226816* n);
N_NIMCALL(tsym226846*, instdeepcopy_415518)(tcontext291021* c, tsym226846* dc, ttype226852* t, tlineinfo196539 info);
N_NIMCALL(void, importallsymbols_299679)(tcontext291021* c, tsym226846* frommod);
N_NIMCALL(tpasscontext287005*, myopen_545456)(tsym226846* module);
N_NIMCALL(tnode226816*, semstmtandgenerategenerics_545539)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, addcodeforgenerics_545323)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, hlostmt_490511)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, buildechostmt_536138)(tcontext291021* c, tnode226816* n);
N_NIMCALL(tnode226816*, transformstmt_442607)(tsym226846* module, tnode226816* n);
N_NIMCALL(void, recovercontext_545582)(tcontext291021* 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_296202)(tcontext291021* c);
STRING_LITERAL(TMP955, "typedesc", 8);
STRING_LITERAL(TMP956, "destroy_", 8);
STRING_LITERAL(TMP957, "this_", 5);
STRING_LITERAL(TMP958, "destructor", 10);
STRING_LITERAL(TMP1980, "sem.myOpen", 10);
STRING_LITERAL(TMP2890, "", 0);
static NIM_CONST TY518462 TMP2891 = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
0x00, 0x00, 0xE0, 0x11, 0x02, 0x0C, 0x01, 0xC0,
0x00, 0x00, 0x00, 0x00}
;
STRING_LITERAL(TMP2892, "|", 1);
STRING_LITERAL(TMP2893, "invalid type", 12);
STRING_LITERAL(TMP2894, "region needs to be an object type", 33);
STRING_LITERAL(TMP2897, "compiler/semtypes.nim", 21);
NIM_CONST TY84745 TMP2896 = {((NimStringDesc*) &TMP2897),
231}
;
STRING_LITERAL(TMP2898, "openarray", 9);
STRING_LITERAL(TMP2899, "range", 5);
STRING_LITERAL(TMP2900, "set", 3);
STRING_LITERAL(TMP2901, "ordinal", 7);
STRING_LITERAL(TMP2902, "seq", 3);
STRING_LITERAL(TMP2903, "varargs", 7);
STRING_LITERAL(TMP2904, "cannot instantiate the \'$1\' $2", 30);
NIM_CONST TY84745 TMP2905 = {((NimStringDesc*) &TMP2897),
1006}
;
STRING_LITERAL(TMP2906, "cannot instantiate ", 19);
STRING_LITERAL(TMP2907, "\012got: (", 7);
STRING_LITERAL(TMP2911, ")\012but expected: (", 17);
STRING_LITERAL(TMP2912, ")", 1);
STRING_LITERAL(TMP2913, "result", 6);
NIM_CONST TY84745 TMP2914 = {((NimStringDesc*) &TMP2897),
1187}
;
STRING_LITERAL(TMP2915, "addInheritedFieldsAux", 21);
STRING_LITERAL(TMP2916, "addInheritedFieldsAux(record case branch)", 41);
STRING_LITERAL(TMP2917, "addInheritedFieldsAux()", 23);
STRING_LITERAL(TMP2918, "semObjectNode", 13);
STRING_LITERAL(TMP2919, "nesting too deep", 16);
STRING_LITERAL(TMP2921, "compiler/seminst.nim", 20);
NIM_CONST TY84745 TMP2920 = {((NimStringDesc*) &TMP2921),
214}
;
STRING_LITERAL(TMP2922, "instantiateGenericParamList; no generic params", 46);
STRING_LITERAL(TMP2923, "instantiateGenericParamList; no symbol", 38);
STRING_LITERAL(TMP2924, "owner is nil", 12);
STRING_LITERAL(TMP2925, "result", 6);
STRING_LITERAL(TMP2926, "PNimrodNode", 11);
static NIM_CONST tspecialwords205012 TMP2995 = {
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(TMP2997, "compiler/semexprs.nim", 21);
NIM_CONST TY84745 TMP2996 = {((NimStringDesc*) &TMP2997),
929}
;
STRING_LITERAL(TMP2998, "in", 2);
STRING_LITERAL(TMP2999, "not", 3);
STRING_LITERAL(TMP3000, "()", 2);
STRING_LITERAL(TMP3002, "compiler/sem.nim", 16);
NIM_CONST TY84745 TMP3001 = {((NimStringDesc*) &TMP3002),
163}
;
static NIM_CONST tspecialwords205012 TMP3003 = {
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 tspecialwords205012 TMP3004 = {
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 tspecialwords205012 TMP3005 = {
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(TMP3025, "\':\' expected", 12);
STRING_LITERAL(TMP3028, ":type", 5);
NIM_CONST TY84745 TMP3037 = {((NimStringDesc*) &TMP2897),
685}
;
STRING_LITERAL(TMP3040, "invalid return type: \'stmt\'", 27);
STRING_LITERAL(TMP3041, "*", 1);
STRING_LITERAL(TMP3042, "**", 2);
STRING_LITERAL(TMP3043, "~", 1);
STRING_LITERAL(TMP3048, "semProcAux", 10);
STRING_LITERAL(TMP3050, "destroy", 7);
STRING_LITERAL(TMP3051, "deepcopy", 8);
STRING_LITERAL(TMP3052, "=", 1);
STRING_LITERAL(TMP3053, "nimDestroyRange", 15);
STRING_LITERAL(TMP3055, "compiler/semdestruct.nim", 24);
NIM_CONST TY84745 TMP3054 = {((NimStringDesc*) &TMP3055),
114}
;
NIM_CONST TY84745 TMP3056 = {((NimStringDesc*) &TMP3055),
105}
;
NIM_CONST TY84745 TMP3057 = {((NimStringDesc*) &TMP3055),
153}
;
STRING_LITERAL(TMP3058, "AnonType", 8);
static NIM_CONST tspecialwords205012 TMP3059 = {
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(TMP3060, "use the {.experimental.} pragma to enable destructors", 53);
STRING_LITERAL(TMP3061, "cannot bind another \'deepCopy\' to: ", 35);
STRING_LITERAL(TMP3062, "cannot bind \'deepCopy\' to: ", 27);
STRING_LITERAL(TMP3063, "signature for \'deepCopy\' must be proc[T: ptr|ref](x: T): T", 58);
STRING_LITERAL(TMP3064, "\'destroy\' or \'deepCopy\' expected for \'override\'", 47);
STRING_LITERAL(TMP3078, "compiler/hlo.nim", 16);
NIM_CONST TY84745 TMP3077 = {((NimStringDesc*) &TMP3078),
15}
;
STRING_LITERAL(TMP3079, "changeType: no tuple type for constructor", 41);
STRING_LITERAL(TMP3080, "cannot convert ", 15);
STRING_LITERAL(TMP3081, " to ", 4);
static NIM_CONST TY533622 TMP3082 = {
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(TMP3083, "analyseIfAddressTaken", 21);
STRING_LITERAL(TMP3085, "compiler/semmagic.nim", 21);
NIM_CONST TY84745 TMP3084 = {((NimStringDesc*) &TMP3085),
52}
;
STRING_LITERAL(TMP3086, "name", 4);
STRING_LITERAL(TMP3087, "arity", 5);
NIM_CONST TY84745 TMP3088 = {((NimStringDesc*) &TMP3085),
47}
;
STRING_LITERAL(TMP3089, "low", 3);
STRING_LITERAL(TMP3090, "high", 4);
NIM_CONST TY531545 optostr_531544 = {((NimStringDesc*) &TMP3089),
((NimStringDesc*) &TMP3090)}
;
static NIM_CONST TY533622 TMP3091 = {
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(TMP3173, " --> \'", 6);
STRING_LITERAL(TMP3174, "\'", 1);
static NIM_CONST tspecialwords205012 TMP3229 = {
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(TMP3231, "compiler/semcall.nim", 20);
NIM_CONST TY84745 TMP3230 = {((NimStringDesc*) &TMP3231),
164}
;
STRING_LITERAL(TMP3232, ".()", 3);
STRING_LITERAL(TMP3233, ".", 1);
NIM_CONST TY84745 TMP3234 = {((NimStringDesc*) &TMP3231),
185}
;
STRING_LITERAL(TMP3235, ".=", 2);
STRING_LITERAL(TMP3236, ", ", 2);
STRING_LITERAL(TMP3237, "\012", 1);
NIM_CONST TY84745 TMP3238 = {((NimStringDesc*) &TMP3231),
213}
;
STRING_LITERAL(TMP3239, "ambiguous call", 14);
STRING_LITERAL(TMP3240, "(", 1);
STRING_LITERAL(TMP3241, "calleeSym.ast is nil", 20);
STRING_LITERAL(TMP3242, "semOverloadedCallAnalyseEffects", 31);
STRING_LITERAL(TMP3243, "[]=", 3);
STRING_LITERAL(TMP3244, "{}=", 3);
NIM_CONST TY84745 TMP3245 = {((NimStringDesc*) &TMP2997),
1227}
;
STRING_LITERAL(TMP3246, ") ", 2);
STRING_LITERAL(TMP3248, "semRecordNodeAux", 16);
STRING_LITERAL(TMP3249, "semRecordCase: discriminant is no symbol", 40);
STRING_LITERAL(TMP3250, "dummy", 5);
static NIM_CONST tspecialwords205012 TMP3251 = {
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 tspecialwords205012 TMP3252 = {
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(TMP3256, "bind", 4);
STRING_LITERAL(TMP3257, ":anon", 5);
STRING_LITERAL(TMP3258, "object constructor needs an object type", 39);
STRING_LITERAL(TMP3259, "checkInitialized", 16);
STRING_LITERAL(TMP3260, "field not initialized: ", 23);
STRING_LITERAL(TMP3261, "defined", 7);
STRING_LITERAL(TMP3262, "obsolete usage of \'defined\', use \'declared\' instead", 51);
STRING_LITERAL(TMP3263, "undeclared conditional symbol; use --symbol to declare it: ", 59);
STRING_LITERAL(TMP3265, "sizeof", 6);
STRING_LITERAL(TMP3266, "is", 2);
NIM_CONST TY84745 TMP3267 = {((NimStringDesc*) &TMP2997),
357}
;
STRING_LITERAL(TMP3268, "closure", 7);
STRING_LITERAL(TMP3269, "of", 2);
NIM_CONST TY84745 TMP3270 = {((NimStringDesc*) &TMP2997),
1455}
;
STRING_LITERAL(TMP3271, "PNimrodNode", 11);
NIM_CONST TY84745 TMP3272 = {((NimStringDesc*) &TMP2997),
1491}
;
STRING_LITERAL(TMP3273, "``", 2);
STRING_LITERAL(TMP3274, "block", 5);
STRING_LITERAL(TMP3275, "stmt", 4);
STRING_LITERAL(TMP3276, "expr", 4);
static NIM_CONST tspecialwords205012 TMP3277 = {
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(TMP3280, "FlowVar", 7);
STRING_LITERAL(TMP3281, "nimCreateFlowVar", 16);
STRING_LITERAL(TMP3283, ")\012", 2);
STRING_LITERAL(TMP3284, "cannot instantiate: ", 20);
STRING_LITERAL(TMP3285, "; got ", 6);
STRING_LITERAL(TMP3286, " type(s) but expected ", 22);
STRING_LITERAL(TMP3287, "[]", 2);
STRING_LITERAL(TMP3288, "{}", 2);
STRING_LITERAL(TMP3289, "semExpr() to implement", 22);
static NIM_CONST tspecialwords205012 TMP3290 = {
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(TMP3291, "usage of a type with a destructor in a non destructible context", 63);
STRING_LITERAL(TMP3292, "use \'defer\'; standalone \'finally\'", 33);
STRING_LITERAL(TMP3293, "use an explicit \'try\'; standalone \'except\'", 42);
STRING_LITERAL(TMP3294, "type class predicate failed", 27);
STRING_LITERAL(TMP3295, "tuple", 5);
STRING_LITERAL(TMP3296, "shared", 6);
STRING_LITERAL(TMP3298, "compiler/semstmts.nim", 21);
NIM_CONST TY84745 TMP3297 = {((NimStringDesc*) &TMP3298),
673}
;
NIM_CONST TY84745 TMP3299 = {((NimStringDesc*) &TMP3298),
699}
;
NIM_CONST TY84745 TMP3300 = {((NimStringDesc*) &TMP3298),
700}
;
STRING_LITERAL(TMP3301, ":ObjectType", 11);
STRING_LITERAL(TMP3302, "\'continue\' cannot have a label", 30);
STRING_LITERAL(TMP3303, "true", 4);
STRING_LITERAL(TMP3304, "true", 4);
STRING_LITERAL(TMP3305, "no object or tuple type", 23);
STRING_LITERAL(TMP3306, "Field", 5);
STRING_LITERAL(TMP3307, "\'continue\' not supported in a \'fields\' loop", 43);
STRING_LITERAL(TMP3308, "parallel \'fields\' iterator does not work for \'case\' objects", 59);
STRING_LITERAL(TMP3309, "items", 5);
STRING_LITERAL(TMP3310, "pairs", 5);
STRING_LITERAL(TMP3311, "use \'else: discard\'; non-ordinal case without \'else\'", 52);
STRING_LITERAL(TMP3312, "\'return\'", 8);
STRING_LITERAL(TMP3313, "use the {.experimental.} pragma to enable \'using\'", 49);
STRING_LITERAL(TMP3314, "semYield", 8);
STRING_LITERAL(TMP3315, "tuple constructor", 17);
STRING_LITERAL(TMP3316, "yield statement must yield a value", 34);
static NIM_CONST tspecialwords205012 TMP3317 = {
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 tspecialwords205012 TMP3318 = {
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(TMP3319, "iterator", 8);
STRING_LITERAL(TMP3320, "method", 6);
STRING_LITERAL(TMP3321, "converter", 9);
static NIM_CONST tspecialwords205012 TMP3322 = {
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(TMP3323, "macro", 5);
STRING_LITERAL(TMP3324, "import", 6);
STRING_LITERAL(TMP3335, "from", 4);
STRING_LITERAL(TMP3338, "include", 7);
STRING_LITERAL(TMP3339, "export", 6);
STRING_LITERAL(TMP3340, "cannot export: ", 15);
static NIM_CONST tspecialwords205012 TMP3341 = {
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(TMP3347, "no code for ", 12);
STRING_LITERAL(TMP3348, "echo", 4);
STRING_LITERAL(TMP3349, "echo", 4);
STRING_LITERAL(TMP3351, "n is not nil", 12);
ttype226852* commontypebegin_488459;
extern TNimType NTI226812; /* PType */
extern TNimType NTI226852; /* TType */
extern tgcheap47016 gch_47044;
tident201021* typedescid_501285;
ttype226852* enforcevoidcontext_516110;
tsym226846* analyzingdestructor_516727;
tsym226846* destructoristrivial_516728;
extern TNimType NTI226814; /* PSym */
extern TNimType NTI226846; /* TSym */
tident201021* destructorname_516761;
tident201021* destructorparam_516762;
tnode226816* destructorpragma_516763;
tsym226846* rangedestructorproc_516764;
extern NU8 gcmd_170120;
extern NI evaltemplatecounter_456330;
extern TNimType NTI226816; /* TNode */
extern TNimType NTI226445; /* TSymKind */
extern TNimType NTI226848; /* TTypeSeq */
extern TNimType NTI291009; /* PProcCon */
extern tnode226816* emptynode_227738;
extern TNimType NTI226810; /* TNodeSeq */
extern tident201021* iddelegator_201559;
extern tident201021* idanon_201504;
extern NU32 gglobaloptions_170118;
extern NIM_BOOL isserving_170133;
TNimType NTI502454; /* object */
extern TNimType NTI358033; /* range -1..0(int) */
extern TNimType NTI149; /* string */
extern TNimType NTI226808; /* PNode */
extern TNimType NTI196539; /* TLineInfo */
extern TNimType NTI291019; /* PContext */
TNimType NTI502512; /* ref object */
extern NU32 goptions_170116;
extern NIM_BOOL gexperimentalmode_170137;
extern NU64 gnotes_197302;
extern TNimType NTI406209; /* TCandidate */
extern TNimType NTI226818; /* TSymSeq */
extern NI gerrorcounter_197303;
extern NI gerrormax_197306;
extern tsymseq226818* gowners_291292;
extern NU8 erroroutputs_197440;
extern TNimType NTI291133; /* seq[TInstantiationPair] */
extern TSafePoint* exchandler_16243;
extern TNimType NTI196545; /* ERecoverableError */
extern Exception* currexception_16245;
extern TNimType NTI226532; /* TMagic */
extern tsym226846* systemmodule_283019;
extern tlineinfo196539 gcodegenlineinfo_197237;
extern NI ptrsize_175612;
extern TNimType NTI226258; /* TTypeKind */
extern NI intsize_175610;
extern NI floatsize_175611;
extern TY287069 gincludefile_287073;
extern TNimType NTI196547; /* ESuggestDone */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI517908; /* tuple[outer: PNode, inner: PNode] */

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

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

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

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

static N_INLINE(tnode226816*, inlineconst_529841)(tnode226816* n, tsym226846* s) {
	tnode226816* result;
	result = 0;
	result = copytree_227329((*s).Ast);
	asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
	(*result).Info = (*n).Info;
	return result;
}

static N_INLINE(NI, len_227364)(tnode226816* 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_227249)(tnode226816* 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(tnode226816*, lastson_227261)(tnode226816* n) {
	tnode226816* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_227249(n);
	result = (*n).kindU.S6.Sons->data[(NI64)(LOC1 - 1)];
	return result;
}

N_NIMCALL(NIM_BOOL, implicitlydiscardable_518457)(tnode226816* n_518459) {
	NIM_BOOL result;
	tnode226816* n;
	NIM_BOOL LOC3;
	NIM_BOOL LOC4;
	result = 0;
	n = n_518459;
	{
		while (1) {
			if (!((TMP2891[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA2;
			n = lastson_227261(n);
		} LA2: ;
	}
	LOC3 = 0;
	LOC4 = 0;
	LOC4 = iscallexpr_227335(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_233963)(tnode226816* 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_518549)(tnode226816* n) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isatom_233963(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_264031((*n).Typ, ((NU8) 0));
			localerror_198955((*n).Info, ((NU16) 140), LOC12);
		}
		LA10: ;
	}
	goto LA1;
	LA4: ;
	{
		if (!((*n).Kind == ((NU8) 115) || (*n).Kind == ((NU8) 126))) goto LA14;
		(*n).Kind = ((NU8) 115);
		{
			tnode226816* it_518592;
			it_518592 = 0;
			{
				NI i_518597;
				NI HEX3Atmp_518599;
				NI LOC18;
				NI res_518601;
				i_518597 = 0;
				HEX3Atmp_518599 = 0;
				LOC18 = 0;
				LOC18 = len_227364(n);
				HEX3Atmp_518599 = (LOC18 - 1);
				res_518601 = 0;
				{
					while (1) {
						if (!(res_518601 <= HEX3Atmp_518599)) goto LA20;
						i_518597 = res_518601;
						it_518592 = (*n).kindU.S6.Sons->data[i_518597];
						fixniltype_518549(it_518592);
						res_518601 += 1;
					} LA20: ;
				}
			}
		}
	}
	goto LA1;
	LA14: ;
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), NIM_NIL);
}

N_NIMCALL(void, discardcheck_518617)(tcontext291021* c, tnode226816* 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 = !(((136 &(IL64(1)<<(((*(*result).Typ).Kind)&IL64(63))))!=0));
		LA8: ;
		if (!LOC7) goto LA9;
		{
			if (!((*result).Kind == ((NU8) 23))) goto LA13;
			asgnRefNoCycle((void**) (&(*result).Typ), NIM_NIL);
			message_198976((*result).Info, ((NU16) 243), ((NimStringDesc*) &TMP2890));
		}
		goto LA11;
		LA13: ;
		{
			NIM_BOOL LOC16;
			tnode226816* n;
			LOC16 = 0;
			LOC16 = implicitlydiscardable_518457(result);
			if (!LOC16) goto LA17;
			n = result;
			asgnRefNoCycle((void**) (&(*result).Typ), NIM_NIL);
			{
				while (1) {
					if (!((TMP2891[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA20;
					n = lastson_227261(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_170120 == ((NU8) 18)));
			LA23: ;
			if (!LOC22) goto LA24;
			{
				if (!((*(*result).Typ).Kind == ((NU8) 5))) goto LA28;
				fixniltype_518549(result);
				message_198976((*result).Info, ((NU16) 243), ((NimStringDesc*) &TMP2890));
			}
			goto LA26;
			LA28: ;
			{
				tnode226816* n;
				NimStringDesc* LOC33;
				n = result;
				{
					while (1) {
						if (!((TMP2891[(*n).Kind/8] &(1<<((*n).Kind%8)))!=0)) goto LA32;
						n = lastson_227261(n);
					} LA32: ;
				}
				LOC33 = 0;
				LOC33 = typetostring_264031((*result).Typ, ((NU8) 0));
				localerror_198955((*n).Info, ((NU16) 140), LOC33);
			}
			LA26: ;
		}
		goto LA11;
		LA24: ;
		LA11: ;
	}
	LA9: ;
	BeforeRet: ;
}

N_NIMCALL(tnode226816*, semexprnotype_488221)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = semexpr_488201(c, n, 8);
	discardcheck_518617(c, result);
	return result;
}

N_NIMCALL(tnode226816*, semstmt_488277)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = semexprnotype_488221(c, n);
	return result;
}

N_NIMCALL(ttype226852*, neworprevtype_496130)(NU8 kind, ttype226852* prev, tcontext291021* c) {
	ttype226852* result;
	result = 0;
	{
		if (!(prev == NIM_NIL)) goto LA3;
		result = newtypes_291213(kind, c);
	}
	goto LA1;
	LA3: ;
	{
		result = prev;
		{
			if (!((*result).Kind == ((NU8) 30))) goto LA8;
			(*result).Kind = kind;
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, isrange_263216)(tnode226816* n) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 29))) goto LA3;
		{
			NIM_BOOL LOC7;
			NIM_BOOL LOC8;
			tnode226816* LOC9;
			tnode226816* LOC11;
			NIM_BOOL LOC13;
			tnode226816* LOC14;
			tnode226816* LOC16;
			tnode226816* LOC17;
			LOC7 = 0;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_227698(n, 0);
			LOC8 = ((*LOC9).Kind == ((NU8) 2));
			if (!(LOC8)) goto LA10;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_227698(n, 0);
			LOC8 = ((*(*LOC11).kindU.S5.Ident).Sup.Id == 74);
			LA10: ;
			LOC7 = LOC8;
			if (LOC7) goto LA12;
			LOC13 = 0;
			LOC14 = 0;
			LOC14 = HEX5BHEX5D_227698(n, 0);
			LOC13 = ((*LOC14).Kind == ((NU8) 56) || (*LOC14).Kind == ((NU8) 57));
			if (!(LOC13)) goto LA15;
			LOC16 = 0;
			LOC16 = HEX5BHEX5D_227698(n, 0);
			LOC17 = 0;
			LOC17 = HEX5BHEX5D_227698(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(ttype226852*, skipintlit_283533)(ttype226852* t) {
	ttype226852* result;
	result = 0;
	{
		if (!!(((*t).N == NIM_NIL))) goto LA3;
		{
			if (!((IL64(70866960384) &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA7;
			result = getsystype_283030((*t).Kind);
			goto BeforeRet;
		}
		LA7: ;
	}
	LA3: ;
	result = t;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semrangeaux_496955)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	TY497019 range;
	tnode226816* LOC9;
	tnode226816* LOC10;
	TY497024 ranget;
	result = 0;
	checksonslen_292415(n, 3);
	result = neworprevtype_496130(((NU8) 20), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 44), (*n).Info));
	{
		NIM_BOOL LOC3;
		tnode226816* LOC4;
		tnode226816* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_227698(n, 1);
		LOC3 = ((*LOC4).Kind == ((NU8) 1));
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_227698(n, 2);
		LOC3 = ((*LOC6).Kind == ((NU8) 1));
		LA5: ;
		if (!LOC3) goto LA7;
		localerror_198955((*n).Info, ((NU16) 106), ((NimStringDesc*) &TMP2890));
	}
	LA7: ;
	memset((void*)range, 0, sizeof(range));
	LOC9 = 0;
	LOC9 = HEX5BHEX5D_227698(n, 1);
	range[(0)- 0] = semexprwithtype_488211(c, LOC9, 16);
	LOC10 = 0;
	LOC10 = HEX5BHEX5D_227698(n, 2);
	range[(1)- 0] = semexprwithtype_488211(c, LOC10, 16);
	memset((void*)ranget, 0, sizeof(ranget));
	{
		NI i_497037;
		NI res_497066;
		i_497037 = 0;
		res_497066 = 0;
		{
			while (1) {
				ttype226852* LOC14;
				if (!(res_497066 <= 1)) goto LA13;
				i_497037 = res_497066;
				LOC14 = 0;
				LOC14 = skiptypes_231245((*range[(i_497037)- 0]).Typ, IL64(576460752303423488));
				ranget[(i_497037)- 0] = skipintlit_283533(LOC14);
				res_497066 += 1;
			} LA13: ;
		}
	}
	{
		ttype226852* LOC17;
		ttype226852* LOC18;
		NIM_BOOL LOC19;
		LOC17 = 0;
		LOC17 = skiptypes_231245(ranget[(0)- 0], 1048576);
		LOC18 = 0;
		LOC18 = skiptypes_231245(ranget[(1)- 0], 1048576);
		LOC19 = 0;
		LOC19 = sametype_269351(LOC17, LOC18, 0);
		if (!!(LOC19)) goto LA20;
		localerror_198955((*n).Info, ((NU16) 128), ((NimStringDesc*) &TMP2890));
	}
	goto LA15;
	LA20: ;
	{
		NIM_BOOL LOC23;
		LOC23 = 0;
		LOC23 = isordinaltype_264092(ranget[(0)- 0]);
		if (!!(LOC23)) goto LA24;
		localerror_198955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
	}
	goto LA15;
	LA24: ;
	{
		NIM_BOOL LOC27;
		LOC27 = 0;
		LOC27 = enumhasholes_264098(ranget[(0)- 0]);
		if (!LOC27) goto LA28;
		localerror_198955((*n).Info, ((NU16) 146), (*(*(*ranget[(0)- 0]).Sym).Name).S);
	}
	goto LA15;
	LA28: ;
	LA15: ;
	{
		NI i_497051;
		NI res_497071;
		i_497051 = 0;
		res_497071 = 0;
		{
			while (1) {
				if (!(res_497071 <= 1)) goto LA32;
				i_497051 = res_497071;
				{
					NIM_BOOL LOC35;
					tnode226816* LOC38;
					LOC35 = 0;
					LOC35 = hasgenericarguments_319243(range[(i_497051)- 0]);
					if (!LOC35) goto LA36;
					LOC38 = 0;
					LOC38 = makestaticexpr_291835(c, range[(i_497051)- 0]);
					addson_227287((*result).N, LOC38);
				}
				goto LA33;
				LA36: ;
				{
					tnode226816* LOC40;
					LOC40 = 0;
					LOC40 = semconstexpr_489503(c, range[(i_497051)- 0]);
					addson_227287((*result).N, LOC40);
				}
				LA33: ;
				res_497071 += 1;
			} LA32: ;
		}
	}
	{
		tnode226816* LOC43;
		tnode226816* LOC44;
		NU8 LOC45;
		LOC43 = 0;
		LOC43 = HEX5BHEX5D_227698((*result).N, 0);
		LOC44 = 0;
		LOC44 = HEX5BHEX5D_227698((*result).N, 1);
		LOC45 = 0;
		LOC45 = weaklevalue_236624(LOC43, LOC44);
		if (!(LOC45 == ((NU8) 1))) goto LA46;
		localerror_198955((*n).Info, ((NU16) 106), ((NimStringDesc*) &TMP2890));
	}
	LA46: ;
	addsonskipintlit_283574(result, ranget[(0)- 0]);
	return result;
}

N_NIMCALL(ttype226852*, semtypeexpr_503786)(tcontext291021* c, tnode226816* n_503789) {
	ttype226852* result;
	tnode226816* n;
	result = 0;
	n = semexprwithtype_488211(c, n_503789, 16);
	{
		if (!((*(*n).Typ).Kind == ((NU8) 8))) goto LA3;
		result = base_264038((*n).Typ);
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC6;
		LOC6 = 0;
		LOC6 = rendertree_251058(n, 0);
		localerror_198955((*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)), (NI64)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(ttype226852*, newconstraint_496165)(tcontext291021* c, NU8 k) {
	ttype226852* result;
	ttype226852* LOC1;
	result = 0;
	result = newtypes_291213(((NU8) 51), c);
	LOC1 = 0;
	LOC1 = newtypes_291213(k, c);
	addsonskipintlit_283574(result, LOC1);
	return result;
}

N_NIMCALL(ttype226852*, semanyref_496787)(tcontext291021* c, tnode226816* n_496790, NU8 kind, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_227364(n_496790);
		if (!(LOC3 < 1)) goto LA4;
		result = newconstraint_496165(c, kind);
	}
	goto LA1;
	LA4: ;
	{
		NI iscall;
		tnode226816* n;
		ttype226852* base;
		tnode226816* LOC24;
		iscall = ((*n_496790).Kind == ((NU8) 27) || (*n_496790).Kind == ((NU8) 29) || (*n_496790).Kind == ((NU8) 30) || (*n_496790).Kind == ((NU8) 31) || (*n_496790).Kind == ((NU8) 26) || (*n_496790).Kind == ((NU8) 28) || (*n_496790).Kind == ((NU8) 32));
		{
			tnode226816* LOC9;
			LOC9 = 0;
			LOC9 = HEX5BHEX5D_227698(n_496790, 0);
			if (!((*LOC9).Kind == ((NU8) 41))) goto LA10;
			n = HEX5BHEX5D_227698(n_496790, 0);
		}
		goto LA7;
		LA10: ;
		{
			n = n_496790;
		}
		LA7: ;
		checkminsonslen_292425(n, 1);
		result = neworprevtype_496130(kind, prev, c);
		{
			NI i_496862;
			NI HEX3Atmp_496881;
			NI LOC14;
			NI res_496884;
			i_496862 = 0;
			HEX3Atmp_496881 = 0;
			LOC14 = 0;
			LOC14 = len_227364(n);
			HEX3Atmp_496881 = (NI64)(LOC14 - 2);
			res_496884 = ((NI) (iscall));
			{
				while (1) {
					ttype226852* region;
					tnode226816* LOC17;
					if (!(res_496884 <= HEX3Atmp_496881)) goto LA16;
					i_496862 = res_496884;
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_227698(n, i_496862);
					region = semtypenode_488269(c, LOC17, NIM_NIL);
					{
						ttype226852* LOC20;
						tnode226816* LOC23;
						LOC20 = 0;
						LOC20 = skiptypes_231245(region, 2048);
						if (!!(((IL64(1125899906973696) &(IL64(1)<<(((*LOC20).Kind)&IL64(63))))!=0))) goto LA21;
						LOC23 = 0;
						LOC23 = HEX5BHEX5D_227698(n, i_496862);
						message_198976((*LOC23).Info, ((NU16) 4), ((NimStringDesc*) &TMP2894));
					}
					LA21: ;
					addsonskipintlit_283574(result, region);
					res_496884 += 1;
				} LA16: ;
			}
		}
		LOC24 = 0;
		LOC24 = lastson_227261(n);
		base = semtypenode_488269(c, LOC24, NIM_NIL);
		addsonskipintlit_283574(result, base);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semwhen_489040)(tcontext291021* c, tnode226816* n, NIM_BOOL semcheck) {
	tnode226816* result;
	result = 0;
	result = NIM_NIL;
	{
		NI i_541425;
		NI HEX3Atmp_541616;
		NI LOC2;
		NI res_541619;
		i_541425 = 0;
		HEX3Atmp_541616 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_541616 = (NI64)(LOC2 - 1);
		res_541619 = 0;
		{
			while (1) {
				tnode226816* it;
				if (!(res_541619 <= HEX3Atmp_541616)) goto LA4;
				i_541425 = res_541619;
				it = (*n).kindU.S6.Sons->data[i_541425];
				switch ((*it).Kind) {
				case ((NU8) 86):
				case ((NU8) 49):
				{
					tnode226816* e;
					checksonslen_292415(it, 2);
					e = semconstexpr_489503(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_488277(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_292415(it, 1);
					{
						if (!(result == NIM_NIL)) goto LA23;
						{
							if (!semcheck) goto LA27;
							result = semstmt_488277(c, (*it).kindU.S6.Sons->data[0]);
						}
						goto LA25;
						LA27: ;
						{
							result = (*it).kindU.S6.Sons->data[0];
						}
						LA25: ;
					}
					LA23: ;
				}
				break;
				default:
				{
					illformedast_292405(n);
				}
				break;
				}
				res_541619 += 1;
			} LA4: ;
		}
	}
	{
		if (!(result == NIM_NIL)) goto LA33;
		result = newnodei_227138(((NU8) 1), (*n).Info);
	}
	LA33: ;
	idsynchronizationpoint_225458(200);
	return result;
}

N_NIMCALL(tsym226846*, semtypeident_497731)(tcontext291021* c, tnode226816* n) {
	tsym226846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 3))) goto LA3;
		result = (*n).kindU.S4.Sym;
	}
	goto LA1;
	LA3: ;
	{
		result = qualifiedlookup_297122(c, n, 3);
		{
			if (!!((result == NIM_NIL))) goto LA8;
			markused_406251((*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;
				{
					tsym226846* 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_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					result = errorsym_296412(c, n);
					goto BeforeRet;
				}
				LA26: ;
				result = copysym_227203((*(*result).Typ).Sym, NIM_FALSE);
				asgnRefNoCycle((void**) (&(*result).Typ), copytype_227195((*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_231005((*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_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					result = errorsym_296412(c, n);
					goto BeforeRet;
				}
				LA32: ;
			}
			LA30: ;
			{
				toverloaditer296491 ov;
				tsym226846* amb;
				if (!!(((*result).Kind == ((NU8) 7)))) goto LA44;
				memset((void*)(&ov), 0, sizeof(ov));
				amb = initoverloaditer_297665((&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_298032((&ov), c, n);
					} LA47: ;
				}
				{
					if (!!((amb == NIM_NIL))) goto LA52;
					result = amb;
				}
				goto LA50;
				LA52: ;
				{
					{
						if (!!(((*result).Kind == ((NU8) 0)))) goto LA57;
						localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					}
					LA57: ;
					result = errorsym_296412(c, n);
					goto BeforeRet;
				}
				LA50: ;
			}
			LA44: ;
			{
				tlineinfo196539 oldinfo;
				if (!!(((*(*result).Typ).Kind == ((NU8) 12)))) goto LA61;
				oldinfo = (*n).Info;
				genericReset((void*)(&(*n)), (&NTI226816));
				(*n).Kind = ((NU8) 3);
				asgnRefNoCycle((void**) (&(*n).kindU.S4.Sym), result);
				(*n).Info = oldinfo;
			}
			LA61: ;
		}
		goto LA6;
		LA8: ;
		{
			localerror_198955((*n).Info, ((NU16) 19), ((NimStringDesc*) &TMP2890));
			result = errorsym_296412(c, n);
		}
		LA6: ;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, sonslen_227255)(ttype226852* 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(ttype226852*, lastson_227267)(ttype226852* n) {
	ttype226852* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = sonslen_227255(n);
	result = (*n).Sons->data[(NI64)(LOC1 - 1)];
	return result;
}

N_NIMCALL(ttype226852*, semarray_497411)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	ttype226852* indx;
	ttype226852* base;
	result = 0;
	indx = 0;
	base = 0;
	result = neworprevtype_496130(((NU8) 16), prev, c);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 3)) goto LA4;
		{
			tnode226816* LOC8;
			NIM_BOOL LOC9;
			tnode226816* LOC12;
			LOC8 = 0;
			LOC8 = HEX5BHEX5D_227698(n, 1);
			LOC9 = 0;
			LOC9 = isrange_263216(LOC8);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_227698(n, 1);
			indx = semrangeaux_496955(c, LOC12, NIM_NIL);
		}
		goto LA6;
		LA10: ;
		{
			tnode226816* e;
			e = semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 16);
			{
				if (!((*(*e).Typ).Kind == ((NU8) 60))) goto LA16;
				indx = makerangewithstaticexpr_292246(c, (*(*e).Typ).N);
			}
			goto LA14;
			LA16: ;
			{
				if (!((*e).Kind >= ((NU8) 6) && (*e).Kind <= ((NU8) 15))) goto LA19;
				indx = makerangetype_292350(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_497411(c, (*(*e).kindU.S4.Sym).Ast, NIM_NIL);
					goto BeforeRet;
				}
				LA28: ;
				{
					NimStringDesc* LOC34;
					if (!!((0 < (*c).Ingenericcontext))) goto LA32;
					LOC34 = 0;
					LOC34 = HEX24_199126(TMP2896);
					internalerror_199006(LOC34);
				}
				LA32: ;
				{
					ttype226852* LOC37;
					NIM_BOOL LOC38;
					tnode226816* LOC41;
					LOC37 = 0;
					LOC37 = lastson_227267((*e).Typ);
					LOC38 = 0;
					LOC38 = isordinaltype_264092(LOC37);
					if (!!(LOC38)) goto LA39;
					LOC41 = 0;
					LOC41 = HEX5BHEX5D_227698(n, 1);
					localerror_198955((*LOC41).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
				}
				LA39: ;
				indx = makerangewithstaticexpr_292246(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_319243(e);
				LA44: ;
				if (!LOC43) goto LA45;
				{
					NIM_BOOL LOC49;
					tnode226816* LOC52;
					LOC49 = 0;
					LOC49 = isordinaltype_264092((*e).Typ);
					if (!!(LOC49)) goto LA50;
					LOC52 = 0;
					LOC52 = HEX5BHEX5D_227698(n, 1);
					localerror_198955((*LOC52).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
				}
				LA50: ;
				indx = makerangewithstaticexpr_292246(c, e);
			}
			goto LA14;
			LA45: ;
			{
				if (!((*e).Kind == ((NU8) 2))) goto LA54;
				indx = skiptypes_231245((*e).Typ, 256);
			}
			goto LA14;
			LA54: ;
			{
				tnode226816* x;
				x = semconstexpr_489503(c, e);
				{
					ttype226852* LOC61;
					if (!((*x).Kind >= ((NU8) 6) && (*x).Kind <= ((NU8) 15))) goto LA59;
					LOC61 = 0;
					LOC61 = skiptypes_231245((*x).Typ, 256);
					indx = makerangetype_292350(c, IL64(0), (NI64)((*x).kindU.S1.Intval - IL64(1)), (*n).Info, LOC61);
				}
				goto LA57;
				LA59: ;
				{
					indx = skiptypes_231245((*x).Typ, 256);
				}
				LA57: ;
			}
			LA14: ;
		}
		LA6: ;
		addsonskipintlit_283574(result, indx);
		{
			if (!((*indx).Kind == ((NU8) 11))) goto LA65;
			indx = lastson_227267(indx);
		}
		LA65: ;
		{
			if (!!(((IL64(1729382256910274560) &(IL64(1)<<(((*indx).Kind)&IL64(63))))!=0))) goto LA69;
			{
				NIM_BOOL LOC73;
				LOC73 = 0;
				LOC73 = isordinaltype_264092(indx);
				if (!!(LOC73)) goto LA74;
				localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
			}
			goto LA71;
			LA74: ;
			{
				NIM_BOOL LOC77;
				LOC77 = 0;
				LOC77 = enumhasholes_264098(indx);
				if (!LOC77) goto LA78;
				localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 146), (*(*(*indx).Sym).Name).S);
			}
			goto LA71;
			LA78: ;
			LA71: ;
		}
		LA69: ;
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[2], NIM_NIL);
		addsonskipintlit_283574(result, base);
	}
	goto LA1;
	LA4: ;
	{
		localerror_198955((*n).Info, ((NU16) 173), ((NimStringDesc*) &TMP2890));
		result = neworprevtype_496130(((NU8) 50), prev, c);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semcontainer_496709)(tcontext291021* c, tnode226816* n, NU8 kind, NimStringDesc* kindstr, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = neworprevtype_496130(kind, prev, c);
	{
		NI LOC3;
		ttype226852* base;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_283574(result, base);
	}
	goto LA1;
	LA4: ;
	{
		ttype226852* LOC7;
		localerror_198955((*n).Info, ((NU16) 172), kindstr);
		LOC7 = 0;
		LOC7 = errortype_292318(c);
		addsonskipintlit_283574(result, LOC7);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semrange_497094)(tcontext291021* c, tnode226816* n_497097, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = NIM_NIL;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n_497097);
		if (!(LOC3 == 2)) goto LA4;
		{
			tnode226816* LOC8;
			NIM_BOOL LOC9;
			tnode226816* LOC12;
			tnode226816* n;
			LOC8 = 0;
			LOC8 = HEX5BHEX5D_227698(n_497097, 1);
			LOC9 = 0;
			LOC9 = isrange_263216(LOC8);
			if (!LOC9) goto LA10;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_227698(n_497097, 1);
			result = semrangeaux_496955(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_198955((*(*n_497097).kindU.S6.Sons->data[0]).Info, ((NU16) 96), ((NimStringDesc*) &TMP2890));
			result = neworprevtype_496130(((NU8) 50), prev, c);
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		localerror_198955((*n_497097).Info, ((NU16) 172), ((NimStringDesc*) &TMP2899));
		result = neworprevtype_496130(((NU8) 50), prev, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semset_496666)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = neworprevtype_496130(((NU8) 19), prev, c);
	{
		NI LOC3;
		ttype226852* base;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_283574(result, base);
		{
			if (!((*base).Kind == ((NU8) 11))) goto LA8;
			base = lastson_227267(base);
		}
		LA8: ;
		{
			if (!!(((*base).Kind == ((NU8) 12)))) goto LA12;
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = isordinaltype_264092(base);
				if (!!(LOC16)) goto LA17;
				localerror_198955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
			}
			goto LA14;
			LA17: ;
			{
				NI64 LOC20;
				LOC20 = 0;
				LOC20 = lengthord_264016(base);
				if (!(IL64(65536) < LOC20)) goto LA21;
				localerror_198955((*n).Info, ((NU16) 119), ((NimStringDesc*) &TMP2890));
			}
			goto LA14;
			LA21: ;
			LA14: ;
		}
		LA12: ;
	}
	goto LA1;
	LA4: ;
	{
		ttype226852* LOC24;
		localerror_198955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2900));
		LOC24 = 0;
		LOC24 = errortype_292318(c);
		addsonskipintlit_283574(result, LOC24);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semordinal_497684)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = neworprevtype_496130(((NU8) 15), prev, c);
	{
		NI LOC3;
		ttype226852* base;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 2)) goto LA4;
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		{
			if (!!(((*base).Kind == ((NU8) 12)))) goto LA8;
			{
				NIM_BOOL LOC12;
				LOC12 = 0;
				LOC12 = isordinaltype_264092(base);
				if (!!(LOC12)) goto LA13;
				localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
			}
			LA13: ;
		}
		LA8: ;
		addsonskipintlit_283574(result, base);
	}
	goto LA1;
	LA4: ;
	{
		localerror_198955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2901));
		result = neworprevtype_496130(((NU8) 50), prev, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semvarargs_496735)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = neworprevtype_496130(((NU8) 48), prev, c);
	{
		NIM_BOOL LOC3;
		NI LOC4;
		NI LOC6;
		ttype226852* base;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = sonslen_227249(n);
		LOC3 = (LOC4 == 2);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = sonslen_227249(n);
		LOC3 = (LOC6 == 3);
		LA5: ;
		if (!LOC3) goto LA7;
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
		addsonskipintlit_283574(result, base);
		{
			NI LOC11;
			tident201021* LOC14;
			LOC11 = 0;
			LOC11 = sonslen_227249(n);
			if (!(LOC11 == 3)) goto LA12;
			LOC14 = 0;
			LOC14 = considerquotedident_296010((*n).kindU.S6.Sons->data[2]);
			asgnRefNoCycle((void**) (&(*result).N), newidentnode_227125(LOC14, (*(*n).kindU.S6.Sons->data[2]).Info));
		}
		LA12: ;
	}
	goto LA1;
	LA7: ;
	{
		ttype226852* LOC16;
		localerror_198955((*n).Info, ((NU16) 172), ((NimStringDesc*) &TMP2903));
		LOC16 = 0;
		LOC16 = errortype_292318(c);
		addsonskipintlit_283574(result, LOC16);
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semgenericparamininvokation_503540)(tcontext291021* c, tnode226816* n) {
	ttype226852* result;
	result = 0;
	result = semtypenode_488269(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)), (NI64)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(ttype226852*, instgenericcontainer_491657)(tcontext291021* c, tlineinfo196539 info, ttype226852* header, NIM_BOOL allowmetatypes) {
	ttype226852* result;
	trepltypevars318786 cl;
	result = 0;
	memset((void*)(&cl), 0, sizeof(cl));
	initidtable_227167((&cl.Symmap));
	initidtable_227167((&cl.Typemap));
	initidtable_227167((&cl.Localcache));
	cl.Info = info;
	cl.C = c;
	cl.Allowmetatypes = allowmetatypes;
	result = replacetypevarst_318834((&cl), header);
	return result;
}

N_NIMCALL(ttype226852*, semgeneric_503548)(tcontext291021* c, tnode226816* n, tsym226846* s, ttype226852* prev) {
	ttype226852* result;
	ttype226852* t;
	result = 0;
	{
		TY170969 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, (&NTI226445)), 2);
		LOC5[1] = nsuToLowerStr(LOC6);
		LOC7 = 0;
		LOC7 = nsuFormatOpenArray(((NimStringDesc*) &TMP2904), LOC5, 2);
		localerror_198966((*n).Info, LOC7);
		result = neworprevtype_496130(((NU8) 50), prev, c);
		goto BeforeRet;
	}
	LA3: ;
	t = (*s).Typ;
	{
		NIM_BOOL LOC10;
		ttype226852* LOC12;
		LOC10 = 0;
		LOC10 = ((*t).Kind == ((NU8) 54));
		if (!(LOC10)) goto LA11;
		LOC12 = 0;
		LOC12 = base_264038(t);
		LOC10 = ((*LOC12).Kind == ((NU8) 10));
		LA11: ;
		if (!LOC10) goto LA13;
		t = base_264038(t);
	}
	LA13: ;
	result = neworprevtype_496130(((NU8) 9), prev, c);
	addsonskipintlit_283574(result, t);
	{
		if (!((*t).Kind == ((NU8) 30))) goto LA17;
		{
			NI i_503629;
			NI HEX3Atmp_503754;
			NI LOC20;
			NI res_503757;
			i_503629 = 0;
			HEX3Atmp_503754 = 0;
			LOC20 = 0;
			LOC20 = sonslen_227249(n);
			HEX3Atmp_503754 = (NI64)(LOC20 - 1);
			res_503757 = 1;
			{
				while (1) {
					ttype226852* elem;
					if (!(res_503757 <= HEX3Atmp_503754)) goto LA22;
					i_503629 = res_503757;
					elem = semgenericparamininvokation_503540(c, (*n).kindU.S6.Sons->data[i_503629]);
					{
						if (!elem == 0) goto LA25;
						{
							NimStringDesc* LOC31;
							if (!NIM_TRUE) goto LA29;
							LOC31 = 0;
							LOC31 = HEX24_199126(TMP2905);
							internalerror_199006(LOC31);
						}
						LA29: ;
						rawaddson_231562(result, elem);
					}
					goto LA23;
					LA25: ;
					{
						addsonskipintlit_283574(result, elem);
					}
					LA23: ;
					res_503757 += 1;
				} LA22: ;
			}
		}
		goto BeforeRet;
	}
	goto LA15;
	LA17: ;
	{
		if (!!(((*t).Kind == ((NU8) 10)))) goto LA34;
		localerror_198955((*n).Info, ((NU16) 156), (*(*s).Name).S);
		result = neworprevtype_496130(((NU8) 50), prev, c);
		goto BeforeRet;
	}
	goto LA15;
	LA34: ;
	{
		tcandidate406209 m;
		tnode226816* LOC37;
		NIM_BOOL isconcrete;
		memset((void*)(&m), 0, sizeof(m));
		chckNil((void*)(&m));
		memset((void*)(&m), 0, sizeof(m));
		newcandidate_406637(c, t, (&m));
		LOC37 = 0;
		LOC37 = copytree_227329(n);
		matches_415382(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_264031(t, ((NU8) 0));
			LOC44 = 0;
			LOC44 = describeargs_407200(c, n, 1, ((NU8) 0));
			LOC45 = 0;
			LOC45 = describeargs_407200(c, (*t).N, 0, ((NU8) 0));
			LOC42 = rawNewString(LOC43->Sup.len + LOC44->Sup.len + LOC45->Sup.len + 44);
appendString(LOC42, ((NimStringDesc*) &TMP2906));
appendString(LOC42, LOC43);
appendString(LOC42, ((NimStringDesc*) &TMP2907));
appendString(LOC42, LOC44);
appendString(LOC42, ((NimStringDesc*) &TMP2911));
appendString(LOC42, LOC45);
appendString(LOC42, ((NimStringDesc*) &TMP2912));
			err = LOC42;
			localerror_198955((*n).Info, ((NU16) 4), err);
			result = neworprevtype_496130(((NU8) 50), prev, c);
			goto BeforeRet;
		}
		LA40: ;
		isconcrete = NIM_TRUE;
		{
			NI i_503706;
			NI HEX3Atmp_503760;
			NI LOC47;
			NI res_503763;
			i_503706 = 0;
			HEX3Atmp_503760 = 0;
			LOC47 = 0;
			LOC47 = len_227364(m.Call);
			HEX3Atmp_503760 = (LOC47 - 1);
			res_503763 = 1;
			{
				while (1) {
					ttype226852* typ;
					tnode226816* LOC50;
					if (!(res_503763 <= HEX3Atmp_503760)) goto LA49;
					i_503706 = res_503763;
					LOC50 = 0;
					LOC50 = HEX5BHEX5D_227698(m.Call, i_503706);
					typ = skiptypes_231245((*LOC50).Typ, 256);
					{
						NIM_BOOL LOC53;
						LOC53 = 0;
						LOC53 = containsgenerictype_273929(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_199126(TMP2905);
							internalerror_199006(LOC64);
						}
						LA62: ;
						rawaddson_231562(result, typ);
					}
					goto LA56;
					LA58: ;
					{
						addsonskipintlit_283574(result, typ);
					}
					LA56: ;
					res_503763 += 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_198955((*n).Info, ((NU16) 124), (*(*s).Name).S);
				result = neworprevtype_496130(((NU8) 50), prev, c);
			}
			goto LA70;
			LA74: ;
			{
				result = instgenericcontainer_491657(c, (*n).Info, result, NIM_FALSE);
			}
			LA70: ;
		}
		LA68: ;
	}
	LA15: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, symchoice_505476)(tcontext291021* c, tnode226816* n, tsym226846* s, NU8 r) {
	tnode226816* result;
	tsym226846* a;
	toverloaditer296491 o;
	NI i;
	result = 0;
	a = 0;
	memset((void*)(&o), 0, sizeof(o));
	i = 0;
	a = initoverloaditer_297665((&o), c, n);
	{
		while (1) {
			if (!!((a == NIM_NIL))) goto LA2;
			a = nextoverloaditer_298032((&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_228754(s, (*n).Info);
		markused_406251((*n).Info, s);
	}
	goto LA7;
	LA11: ;
	{
		NU8 kind;
		ttype226852* 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_291213(((NU8) 0), c);
		result = newnodeit_227145(kind, (*n).Info, LOC21);
		a = initoverloaditer_297665((&o), c, n);
		{
			while (1) {
				tnode226816* LOC24;
				if (!!((a == NIM_NIL))) goto LA23;
				(*a).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				LOC24 = 0;
				LOC24 = newsymnode_228754(a, (*n).Info);
				addson_227287(result, LOC24);
				a = nextoverloaditer_298032((&o), c, n);
			} LA23: ;
		}
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode226816*, semtemplateexpr_489055)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags) {
	tnode226816* result;
	tsym226846* LOC1;
	result = 0;
	markused_406251((*n).Info, s);
	pushinfocontext_197930((*n).Info);
	LOC1 = 0;
	LOC1 = getcurrowner_291255();
	result = evaltemplate_456334(n, s, LOC1);
	{
		if (!!(((flags &(1<<((((NU8) 8))&15)))!=0))) goto LA4;
		result = semaftermacrocall_495770(c, result, s, flags);
	}
	LA4: ;
	popinfocontext_197957();
	return result;
}

N_NIMCALL(tnode226816*, semgenericstmtsymbol_511258)(tcontext291021* c, tnode226816* n, tsym226846* s, intset223056* ctx) {
	tnode226816* 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_505476(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_231005((*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_489055(c, n, s, 256);
			result = semgenericstmt_496120(c, result, 0, ctx);
		}
		goto LA4;
		LA11: ;
		{
			result = symchoice_505476(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_231005((*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_489066(c, n, n, s, 256);
			result = semgenericstmt_496120(c, result, 0, ctx);
		}
		goto LA15;
		LA22: ;
		{
			result = symchoice_505476(c, n, s, ((NU8) 1));
		}
		LA15: ;
	}
	break;
	case ((NU8) 4):
	{
		result = newsymnodetypedesc_308160(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_308160(s, (*n).Info);
		}
		goto LA28;
		LA32: ;
		{
			result = n;
		}
		LA28: ;
	}
	break;
	default:
	{
		result = newsymnode_228754(s, (*n).Info);
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, lookup_512404)(tcontext291021* c, tnode226816* n, NU8 flags, intset223056* ctx) {
	tnode226816* result;
	tident201021* ident;
	tsym226846* s;
	tsym226846* LOC1;
	result = 0;
	result = n;
	ident = considerquotedident_296010(n);
	LOC1 = 0;
	LOC1 = searchinscopes_296312(c, ident);
	s = skipalias_296255(LOC1, n);
	{
		if (!(s == NIM_NIL)) goto LA4;
		{
			NIM_BOOL LOC8;
			NIM_BOOL LOC9;
			LOC8 = 0;
			LOC9 = 0;
			LOC9 = contains_223837((&(*ctx)), (*ident).Sup.Id);
			LOC8 = !(LOC9);
			if (!(LOC8)) goto LA10;
			LOC8 = !(((flags &(1<<((((NU8) 2))&7)))!=0));
			LA10: ;
			if (!LOC8) goto LA11;
			localerror_198955((*n).Info, ((NU16) 61), (*ident).S);
		}
		LA11: ;
	}
	goto LA2;
	LA4: ;
	{
		{
			if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA16;
			result = symchoice_505476(c, n, s, ((NU8) 0));
		}
		goto LA14;
		LA16: ;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = contains_223837((&(*ctx)), (*(*s).Name).Sup.Id);
			if (!LOC19) goto LA20;
			result = symchoice_505476(c, n, s, ((NU8) 2));
		}
		goto LA14;
		LA20: ;
		{
			result = semgenericstmtsymbol_511258(c, n, s, ctx);
		}
		LA14: ;
	}
	LA2: ;
	return result;
}

N_NIMCALL(tnode226816*, newdot_512460)(tnode226816* n, tnode226816* b) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(((NU8) 45), (*n).Info);
	add_227498(result, (*n).kindU.S6.Sons->data[0]);
	add_227498(result, b);
	return result;
}

N_NIMCALL(tnode226816*, fuzzylookup_512482)(tcontext291021* c, tnode226816* n_512485, NU8 flags, intset223056* ctx, NIM_BOOL* ismacro) {
	tnode226816* result;
	NU8 luf;
	tsym226846* s_512618;
	result = 0;
	{
		if (!!(((flags &(1<<((((NU8) 2))&7)))!=0))) goto LA3;
		luf = 2;
	}
	goto LA1;
	LA3: ;
	{
		luf = 0;
	}
	LA1: ;
	s_512618 = qualifiedlookup_297122(c, n_512485, luf);
	{
		if (!!((s_512618 == NIM_NIL))) goto LA8;
		result = semgenericstmtsymbol_511258(c, n_512485, s_512618, ctx);
	}
	goto LA6;
	LA8: ;
	{
		tnode226816* n;
		tident201021* ident;
		tsym226846* s;
		tsym226846* LOC11;
		asgnRefNoCycle((void**) (&(*n_512485).kindU.S6.Sons->data[0]), semgenericstmt_496120(c, (*n_512485).kindU.S6.Sons->data[0], flags, ctx));
		result = n_512485;
		n = HEX5BHEX5D_227698(n_512485, 1);
		ident = considerquotedident_296010(n);
		LOC11 = 0;
		LOC11 = searchinscopes_296312(c, ident);
		s = skipalias_296255(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);
			{
				tnode226816* LOC22;
				if (!((flags &(1<<((((NU8) 0))&7)))!=0)) goto LA20;
				LOC22 = 0;
				LOC22 = symchoice_505476(c, n, s, ((NU8) 0));
				result = newdot_512460(result, LOC22);
			}
			goto LA18;
			LA20: ;
			{
				NIM_BOOL LOC24;
				tnode226816* LOC27;
				LOC24 = 0;
				LOC24 = contains_223837((&(*ctx)), (*(*s).Name).Sup.Id);
				if (!LOC24) goto LA25;
				LOC27 = 0;
				LOC27 = symchoice_505476(c, n, s, ((NU8) 2));
				result = newdot_512460(result, LOC27);
			}
			goto LA18;
			LA25: ;
			{
				tnode226816* sym;
				sym = semgenericstmtsymbol_511258(c, n, s, ctx);
				{
					tnode226816* LOC33;
					if (!((*sym).Kind == ((NU8) 3))) goto LA31;
					LOC33 = 0;
					LOC33 = symchoice_505476(c, n, s, ((NU8) 2));
					result = newdot_512460(result, LOC33);
				}
				goto LA29;
				LA31: ;
				{
					result = newdot_512460(result, sym);
				}
				LA29: ;
			}
			LA18: ;
		}
		LA16: ;
	}
	LA6: ;
	return result;
}

N_NIMCALL(tnode226816*, semmixinstmt_505740)(tcontext291021* c, tnode226816* n, intset223056* tomixin) {
	tnode226816* result;
	result = 0;
	{
		NI i_505768;
		NI HEX3Atmp_505784;
		NI LOC2;
		NI res_505787;
		i_505768 = 0;
		HEX3Atmp_505784 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_505784 = (LOC2 - 1);
		res_505787 = 0;
		{
			while (1) {
				tident201021* LOC5;
				if (!(res_505787 <= HEX3Atmp_505784)) goto LA4;
				i_505768 = res_505787;
				LOC5 = 0;
				LOC5 = considerquotedident_296010((*n).kindU.S6.Sons->data[i_505768]);
				incl_223869(tomixin, (*LOC5).Sup.Id);
				res_505787 += 1;
			} LA4: ;
		}
	}
	result = newnodei_227138(((NU8) 1), (*n).Info);
	return result;
}

N_NIMCALL(tnode226816*, semgenericstmtscope_511240)(tcontext291021* c, tnode226816* n, NU8 flags, intset223056* ctx) {
	tnode226816* result;
	tscope226840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	result = semgenericstmt_496120(c, n, flags, ctx);
	closescope_296211(c);
	return result;
}

N_NIMCALL(tsym226846*, newsyms_488918)(NU8 kind, tnode226816* n, tcontext291021* c) {
	tsym226846* result;
	tident201021* LOC1;
	tsym226846* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = considerquotedident_296010(n);
	LOC2 = 0;
	LOC2 = getcurrowner_291255();
	result = newsym_227074(kind, LOC1, LOC2, (*n).Info);
	return result;
}

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

N_NIMCALL(void, addtempdecl_512737)(tcontext291021* c, tnode226816* n, NU8 kind) {
	tsym226846* s;
	tnode226816* LOC1;
	LOC1 = 0;
	LOC1 = getidentnode_511205(n);
	s = newsyms_488918(((NU8) 0), LOC1, c);
	addprelimdecl_296704(c, s);
}

N_NIMCALL(tnode226816*, semgenericstmt_496120)(tcontext291021* c, tnode226816* n, NU8 flags_496124, intset223056* ctx) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		if (!(gcmd_170120 == ((NU8) 14))) goto LA3;
		suggeststmt_422299(c, n);
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 2):
	case ((NU8) 53):
	{
		result = lookup_512404(c, n, flags_496124, ctx);
	}
	break;
	case ((NU8) 45):
	{
		NIM_BOOL dummy;
		dummy = 0;
		result = fuzzylookup_512482(c, n, flags_496124, ctx, (&dummy));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 55):
	{
		result = semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[0], (flags_496124 | 1), ctx);
	}
	break;
	case ((NU8) 123):
	{
		result = semmixinstmt_505740(c, n, ctx);
	}
	break;
	case ((NU8) 27):
	case ((NU8) 32):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		tnode226816* fn;
		tsym226846* s;
		NI first;
		NIM_BOOL mixincontext;
		NU8 flags;
		checkminsonslen_292425(n, 1);
		fn = (*n).kindU.S6.Sons->data[0];
		s = qualifiedlookup_297122(c, fn, 0);
		{
			NIM_BOOL LOC13;
			NIM_BOOL LOC14;
			NIM_BOOL LOC15;
			tident201021* LOC19;
			NIM_BOOL LOC20;
			NimStringDesc* LOC23;
			LOC13 = 0;
			LOC14 = 0;
			LOC15 = 0;
			LOC15 = (s == NIM_NIL);
			if (!(LOC15)) goto LA16;
			LOC15 = !(((flags_496124 &(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_296010(fn);
			LOC20 = 0;
			LOC20 = contains_223837((&(*ctx)), (*LOC19).Sup.Id);
			LOC13 = !(LOC20);
			LA18: ;
			if (!LOC13) goto LA21;
			LOC23 = 0;
			LOC23 = rendertree_251058(fn, 0);
			localerror_198955((*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_223837((&(*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_231005((*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_489066(c, n, n, s, 256);
					result = semgenericstmt_496120(c, result, 0, ctx);
				}
				goto LA35;
				LA42: ;
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), symchoice_505476(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_231005((*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_489055(c, n, s, 256);
					result = semgenericstmt_496120(c, result, 0, ctx);
				}
				goto LA46;
				LA53: ;
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), symchoice_505476(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_505476(c, fn, s, scoption));
				first = 1;
			}
			break;
			case ((NU8) 4):
			{
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnodetypedesc_308160(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_308160(s, (*fn).Info));
					first = 1;
				}
				LA64: ;
			}
			break;
			default:
			{
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_228754(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_512482(c, fn, flags_496124, ctx, (&mixincontext)));
			first = 1;
		}
		goto LA24;
		LA68: ;
		LA24: ;
		{
			if (!mixincontext) goto LA72;
			flags = (flags_496124 | 4);
		}
		goto LA70;
		LA72: ;
		{
			flags = flags_496124;
		}
		LA70: ;
		{
			NI i_513856;
			NI HEX3Atmp_515790;
			NI LOC76;
			NI res_515793;
			i_513856 = 0;
			HEX3Atmp_515790 = 0;
			LOC76 = 0;
			LOC76 = sonslen_227249(result);
			HEX3Atmp_515790 = (NI64)(LOC76 - 1);
			res_515793 = first;
			{
				while (1) {
					if (!(res_515793 <= HEX3Atmp_515790)) goto LA78;
					i_513856 = res_515793;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_513856]), semgenericstmt_496120(c, (*result).kindU.S6.Sons->data[i_513856], flags, ctx));
					res_515793 += 1;
				} LA78: ;
			}
		}
	}
	break;
	case ((NU8) 92):
	{
		{
			NI i_513897;
			NI HEX3Atmp_515796;
			NI LOC81;
			NI res_515799;
			i_513897 = 0;
			HEX3Atmp_515796 = 0;
			LOC81 = 0;
			LOC81 = sonslen_227249(n);
			HEX3Atmp_515796 = (NI64)(LOC81 - 1);
			res_515799 = 0;
			{
				while (1) {
					if (!(res_515799 <= HEX3Atmp_515796)) goto LA83;
					i_513897 = res_515799;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_513897]), semgenericstmtscope_511240(c, (*n).kindU.S6.Sons->data[i_513897], flags_496124, ctx));
					res_515799 += 1;
				} LA83: ;
			}
		}
	}
	break;
	case ((NU8) 93):
	{
		{
			NI i_513938;
			NI HEX3Atmp_515802;
			NI LOC86;
			NI res_515805;
			i_513938 = 0;
			HEX3Atmp_515802 = 0;
			LOC86 = 0;
			LOC86 = sonslen_227249(n);
			HEX3Atmp_515802 = (NI64)(LOC86 - 1);
			res_515805 = 0;
			{
				while (1) {
					if (!(res_515805 <= HEX3Atmp_515802)) goto LA88;
					i_513938 = res_515805;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_513938]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[i_513938], (flags_496124 | 4), ctx));
					res_515805 += 1;
				} LA88: ;
			}
		}
	}
	break;
	case ((NU8) 96):
	{
		tscope226840* LOC90;
		LOC90 = 0;
		LOC90 = openscope_296191(c);
		{
			NI i_513997;
			NI HEX3Atmp_515808;
			NI LOC92;
			NI res_515811;
			i_513997 = 0;
			HEX3Atmp_515808 = 0;
			LOC92 = 0;
			LOC92 = sonslen_227249(n);
			HEX3Atmp_515808 = (NI64)(LOC92 - 1);
			res_515811 = 0;
			{
				while (1) {
					if (!(res_515811 <= HEX3Atmp_515808)) goto LA94;
					i_513997 = res_515811;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_513997]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[i_513997], flags_496124, ctx));
					res_515811 += 1;
				} LA94: ;
			}
		}
		closescope_296211(c);
	}
	break;
	case ((NU8) 97):
	{
		tscope226840* LOC96;
		LOC96 = 0;
		LOC96 = openscope_296191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[0], flags_496124, ctx));
		{
			NI i_514066;
			NI HEX3Atmp_515820;
			NI LOC98;
			NI res_515823;
			i_514066 = 0;
			HEX3Atmp_515820 = 0;
			LOC98 = 0;
			LOC98 = sonslen_227249(n);
			HEX3Atmp_515820 = (NI64)(LOC98 - 1);
			res_515823 = 1;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_515823 <= HEX3Atmp_515820)) goto LA100;
					i_514066 = res_515823;
					a = (*n).kindU.S6.Sons->data[i_514066];
					checkminsonslen_292425(a, 1);
					l = sonslen_227249(a);
					{
						NI j_514095;
						NI HEX3Atmp_515815;
						NI res_515818;
						j_514095 = 0;
						HEX3Atmp_515815 = 0;
						HEX3Atmp_515815 = (NI64)(l - 2);
						res_515818 = 0;
						{
							while (1) {
								if (!(res_515818 <= HEX3Atmp_515815)) goto LA103;
								j_514095 = res_515818;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_514095]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[j_514095], flags_496124, ctx));
								res_515818 += 1;
							} LA103: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semgenericstmtscope_511240(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)], flags_496124, ctx));
					res_515823 += 1;
				} LA100: ;
			}
		}
		closescope_296211(c);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		NI l;
		tscope226840* LOC105;
		l = sonslen_227249(n);
		LOC105 = 0;
		LOC105 = openscope_296191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(l - 2)]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[(NI64)(l - 2)], flags_496124, ctx));
		{
			NI i_514193;
			NI HEX3Atmp_515826;
			NI res_515829;
			i_514193 = 0;
			HEX3Atmp_515826 = 0;
			HEX3Atmp_515826 = (NI64)(l - 3);
			res_515829 = 0;
			{
				while (1) {
					if (!(res_515829 <= HEX3Atmp_515826)) goto LA108;
					i_514193 = res_515829;
					addtempdecl_512737(c, (*n).kindU.S6.Sons->data[i_514193], ((NU8) 21));
					res_515829 += 1;
				} LA108: ;
			}
		}
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(l - 1)]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[(NI64)(l - 1)], flags_496124, ctx));
		closescope_296211(c);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	case ((NU8) 129):
	{
		tscope226840* LOC110;
		checksonslen_292415(n, 2);
		LOC110 = 0;
		LOC110 = openscope_296191(c);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA113;
			addtempdecl_512737(c, (*n).kindU.S6.Sons->data[0], ((NU8) 22));
		}
		LA113: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[1], flags_496124, ctx));
		closescope_296211(c);
	}
	break;
	case ((NU8) 106):
	{
		checkminsonslen_292425(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmtscope_511240(c, (*n).kindU.S6.Sons->data[0], flags_496124, ctx));
		{
			NI i_514341;
			NI HEX3Atmp_515838;
			NI LOC117;
			NI res_515841;
			i_514341 = 0;
			HEX3Atmp_515838 = 0;
			LOC117 = 0;
			LOC117 = sonslen_227249(n);
			HEX3Atmp_515838 = (NI64)(LOC117 - 1);
			res_515841 = 1;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_515841 <= HEX3Atmp_515838)) goto LA119;
					i_514341 = res_515841;
					a = (*n).kindU.S6.Sons->data[i_514341];
					checkminsonslen_292425(a, 1);
					l = sonslen_227249(a);
					{
						NI j_514370;
						NI HEX3Atmp_515833;
						NI res_515836;
						j_514370 = 0;
						HEX3Atmp_515833 = 0;
						HEX3Atmp_515833 = (NI64)(l - 2);
						res_515836 = 0;
						{
							while (1) {
								if (!(res_515836 <= HEX3Atmp_515833)) goto LA122;
								j_514370 = res_515836;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_514370]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[j_514370], (flags_496124 | 2), ctx));
								res_515836 += 1;
							} LA122: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semgenericstmtscope_511240(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)], flags_496124, ctx));
					res_515841 += 1;
				} LA119: ;
			}
		}
	}
	break;
	case ((NU8) 99):
	case ((NU8) 100):
	{
		{
			NI i_514457;
			NI HEX3Atmp_515851;
			NI LOC125;
			NI res_515854;
			i_514457 = 0;
			HEX3Atmp_515851 = 0;
			LOC125 = 0;
			LOC125 = sonslen_227249(n);
			HEX3Atmp_515851 = (NI64)(LOC125 - 1);
			res_515854 = 0;
			{
				while (1) {
					if (!(res_515854 <= HEX3Atmp_515851)) goto LA127;
					i_514457 = res_515854;
					{
						tnode226816* a;
						NI l;
						a = (*n).kindU.S6.Sons->data[i_514457];
						{
							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_292405(a);
						}
						LA137: ;
						checkminsonslen_292425(a, 3);
						l = sonslen_227249(a);
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 2)]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[(NI64)(l - 2)], (flags_496124 | 2), ctx));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)], flags_496124, ctx));
						{
							NI j_514587;
							NI HEX3Atmp_515846;
							NI res_515849;
							j_514587 = 0;
							HEX3Atmp_515846 = 0;
							HEX3Atmp_515846 = (NI64)(l - 3);
							res_515849 = 0;
							{
								while (1) {
									tnode226816* LOC142;
									if (!(res_515849 <= HEX3Atmp_515846)) goto LA141;
									j_514587 = res_515849;
									LOC142 = 0;
									LOC142 = getidentnode_511205((*a).kindU.S6.Sons->data[j_514587]);
									addtempdecl_512737(c, LOC142, ((NU8) 8));
									res_515849 += 1;
								} LA141: ;
							}
						}
					} LA128: ;
					res_515854 += 1;
				} LA127: ;
			}
		}
	}
	break;
	case ((NU8) 75):
	{
		{
			NI i_514614;
			NI HEX3Atmp_515863;
			NI LOC145;
			NI res_515866;
			i_514614 = 0;
			HEX3Atmp_515863 = 0;
			LOC145 = 0;
			LOC145 = sonslen_227249(n);
			HEX3Atmp_515863 = (NI64)(LOC145 - 1);
			res_515866 = 0;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_515866 <= HEX3Atmp_515863)) goto LA147;
					i_514614 = res_515866;
					a = (*n).kindU.S6.Sons->data[i_514614];
					{
						if (!!(((*a).Kind == ((NU8) 35)))) goto LA150;
						illformedast_292405(a);
					}
					LA150: ;
					checkminsonslen_292425(a, 3);
					l = sonslen_227249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 2)]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[(NI64)(l - 2)], (flags_496124 | 2), ctx));
					{
						NI j_514698;
						NI HEX3Atmp_515858;
						NI res_515861;
						j_514698 = 0;
						HEX3Atmp_515858 = 0;
						HEX3Atmp_515858 = (NI64)(l - 3);
						res_515861 = 0;
						{
							while (1) {
								tnode226816* LOC155;
								if (!(res_515861 <= HEX3Atmp_515858)) goto LA154;
								j_514698 = res_515861;
								LOC155 = 0;
								LOC155 = getidentnode_511205((*a).kindU.S6.Sons->data[j_514698]);
								addtempdecl_512737(c, LOC155, ((NU8) 7));
								res_515861 += 1;
							} LA154: ;
						}
					}
					res_515866 += 1;
				} LA147: ;
			}
		}
	}
	break;
	case ((NU8) 101):
	{
		{
			NI i_514725;
			NI HEX3Atmp_515870;
			NI LOC158;
			NI res_515873;
			i_514725 = 0;
			HEX3Atmp_515870 = 0;
			LOC158 = 0;
			LOC158 = sonslen_227249(n);
			HEX3Atmp_515870 = (NI64)(LOC158 - 1);
			res_515873 = 0;
			{
				while (1) {
					if (!(res_515873 <= HEX3Atmp_515870)) goto LA160;
					i_514725 = res_515873;
					{
						tnode226816* a;
						tnode226816* LOC170;
						a = (*n).kindU.S6.Sons->data[i_514725];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA164;
							goto LA161;
						}
						LA164: ;
						{
							if (!!(((*a).Kind == ((NU8) 102)))) goto LA168;
							illformedast_292405(a);
						}
						LA168: ;
						checksonslen_292415(a, 3);
						LOC170 = 0;
						LOC170 = getidentnode_511205((*a).kindU.S6.Sons->data[0]);
						addtempdecl_512737(c, LOC170, ((NU8) 10));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[1], (flags_496124 | 2), ctx));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[2], flags_496124, ctx));
					} LA161: ;
					res_515873 += 1;
				} LA160: ;
			}
		}
	}
	break;
	case ((NU8) 98):
	{
		{
			NI i_514859;
			NI HEX3Atmp_515877;
			NI LOC173;
			NI res_515880;
			i_514859 = 0;
			HEX3Atmp_515877 = 0;
			LOC173 = 0;
			LOC173 = sonslen_227249(n);
			HEX3Atmp_515877 = (NI64)(LOC173 - 1);
			res_515880 = 0;
			{
				while (1) {
					if (!(res_515880 <= HEX3Atmp_515877)) goto LA175;
					i_514859 = res_515880;
					{
						tnode226816* a;
						tnode226816* LOC185;
						a = (*n).kindU.S6.Sons->data[i_514859];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA179;
							goto LA176;
						}
						LA179: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA183;
							illformedast_292405(a);
						}
						LA183: ;
						checksonslen_292415(a, 3);
						LOC185 = 0;
						LOC185 = getidentnode_511205((*a).kindU.S6.Sons->data[0]);
						addtempdecl_512737(c, LOC185, ((NU8) 7));
					} LA176: ;
					res_515880 += 1;
				} LA175: ;
			}
		}
		{
			NI i_514919;
			NI HEX3Atmp_515884;
			NI LOC187;
			NI res_515887;
			i_514919 = 0;
			HEX3Atmp_515884 = 0;
			LOC187 = 0;
			LOC187 = sonslen_227249(n);
			HEX3Atmp_515884 = (NI64)(LOC187 - 1);
			res_515887 = 0;
			{
				while (1) {
					if (!(res_515887 <= HEX3Atmp_515884)) goto LA189;
					i_514919 = res_515887;
					{
						tnode226816* a;
						a = (*n).kindU.S6.Sons->data[i_514919];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA193;
							goto LA190;
						}
						LA193: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA197;
							illformedast_292405(a);
						}
						LA197: ;
						checksonslen_292415(a, 3);
						{
							tscope226840* LOC203;
							if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA201;
							LOC203 = 0;
							LOC203 = openscope_296191(c);
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[1], flags_496124, ctx));
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[2], (flags_496124 | 2), ctx));
							closescope_296211(c);
						}
						goto LA199;
						LA201: ;
						{
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[2], (flags_496124 | 2), ctx));
						}
						LA199: ;
					} LA190: ;
					res_515887 += 1;
				} LA189: ;
			}
		}
	}
	break;
	case ((NU8) 149):
	{
		{
			NI LOC208;
			LOC208 = 0;
			LOC208 = sonslen_227249(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_496120(c, (*n).kindU.S6.Sons->data[0], (flags_496124 | 2), ctx));
			}
			LA213: ;
			{
				NI i_515178;
				NI HEX3Atmp_515891;
				NI LOC216;
				NI res_515894;
				i_515178 = 0;
				HEX3Atmp_515891 = 0;
				LOC216 = 0;
				LOC216 = sonslen_227249(n);
				HEX3Atmp_515891 = (NI64)(LOC216 - 1);
				res_515894 = 1;
				{
					while (1) {
						tnode226816* a;
						tnode226816* LOC222;
						tsym226846* LOC223;
						if (!(res_515894 <= HEX3Atmp_515891)) goto LA218;
						i_515178 = res_515894;
						a = 0;
						switch ((*(*n).kindU.S6.Sons->data[i_515178]).Kind) {
						case ((NU8) 150):
						{
							a = (*(*n).kindU.S6.Sons->data[i_515178]).kindU.S6.Sons->data[0];
						}
						break;
						case ((NU8) 2):
						{
							a = (*n).kindU.S6.Sons->data[i_515178];
						}
						break;
						default:
						{
							illformedast_292405(n);
						}
						break;
						}
						LOC222 = 0;
						LOC222 = getidentnode_511205((*a).kindU.S6.Sons->data[i_515178]);
						LOC223 = 0;
						LOC223 = newsyms_488918(((NU8) 0), LOC222, c);
						adddecl_296694(c, LOC223);
						res_515894 += 1;
					} LA218: ;
				}
			}
		}
		LA209: ;
	}
	break;
	case ((NU8) 133):
	case ((NU8) 134):
	{
	}
	break;
	case ((NU8) 76):
	{
		checkminsonslen_292425(n, 1);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA228;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[0], (flags_496124 | 2), ctx));
		}
		LA228: ;
		{
			NI i_515331;
			NI HEX3Atmp_515903;
			NI LOC231;
			NI res_515906;
			i_515331 = 0;
			HEX3Atmp_515903 = 0;
			LOC231 = 0;
			LOC231 = sonslen_227249(n);
			HEX3Atmp_515903 = (NI64)(LOC231 - 1);
			res_515906 = 1;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_515906 <= HEX3Atmp_515903)) goto LA233;
					i_515331 = res_515906;
					a = (*n).kindU.S6.Sons->data[i_515331];
					{
						if (!!(((*a).Kind == ((NU8) 35)))) goto LA236;
						illformedast_292405(a);
					}
					LA236: ;
					checkminsonslen_292425(a, 3);
					l = sonslen_227249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 2)]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[(NI64)(l - 2)], (flags_496124 | 2), ctx));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semgenericstmt_496120(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)], flags_496124, ctx));
					{
						NI j_515443;
						NI HEX3Atmp_515898;
						NI res_515901;
						j_515443 = 0;
						HEX3Atmp_515898 = 0;
						HEX3Atmp_515898 = (NI64)(l - 3);
						res_515901 = 0;
						{
							while (1) {
								tnode226816* LOC241;
								if (!(res_515901 <= HEX3Atmp_515898)) goto LA240;
								j_515443 = res_515901;
								LOC241 = 0;
								LOC241 = getidentnode_511205((*a).kindU.S6.Sons->data[j_515443]);
								addtempdecl_512737(c, LOC241, ((NU8) 3));
								res_515901 += 1;
							} LA240: ;
						}
					}
					res_515906 += 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):
	{
		tscope226840* LOC248;
		tnode226816* body;
		checksonslen_292415(n, 7);
		{
			tnode226816* LOC247;
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA245;
			LOC247 = 0;
			LOC247 = getidentnode_511205((*n).kindU.S6.Sons->data[0]);
			addtempdecl_512737(c, LOC247, ((NU8) 12));
		}
		LA245: ;
		LOC248 = 0;
		LOC248 = openscope_296191(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[2], flags_496124, ctx));
		{
			if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA251;
			{
				tident201021* LOC257;
				tsym226846* LOC258;
				if (!!(((*(*(*n).kindU.S6.Sons->data[3]).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA255;
				LOC257 = 0;
				LOC257 = getident_201472(((NimStringDesc*) &TMP2913));
				LOC258 = 0;
				LOC258 = newsym_227074(((NU8) 0), LOC257, NIM_NIL, (*n).Info);
				addprelimdecl_296704(c, LOC258);
			}
			LA255: ;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[3]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[3], flags_496124, ctx));
		}
		LA251: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[4]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[4], flags_496124, ctx));
		body = 0;
		{
			if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3))) goto LA261;
			body = getbody_280269((*(*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_511240(c, body, flags_496124, ctx));
		closescope_296211(c);
	}
	break;
	case ((NU8) 90):
	case ((NU8) 43):
	{
	}
	break;
	case ((NU8) 34):
	case ((NU8) 33):
	{
		checkminsonslen_292425(n, 2);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[1], flags_496124, ctx));
	}
	break;
	default:
	{
		{
			NI i_515759;
			NI HEX3Atmp_515910;
			NI LOC268;
			NI res_515913;
			i_515759 = 0;
			HEX3Atmp_515910 = 0;
			LOC268 = 0;
			LOC268 = sonslen_227249(n);
			HEX3Atmp_515910 = (NI64)(LOC268 - 1);
			res_515913 = 0;
			{
				while (1) {
					if (!(res_515913 <= HEX3Atmp_515910)) goto LA270;
					i_515759 = res_515913;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_515759]), semgenericstmt_496120(c, (*n).kindU.S6.Sons->data[i_515759], flags_496124, ctx));
					res_515913 += 1;
				} LA270: ;
			}
		}
	}
	break;
	}
	return result;
}

static N_INLINE(ttype226852*, skipgenericinvokation_500863)(ttype226852* t) {
	ttype226852* 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_227267(result);
	}
	LA7: ;
	return result;
}

N_NIMCALL(void, addinheritedfieldsaux_500662)(tcontext291021* c, intset223056* check, NI* pos, tnode226816* n) {
	switch ((*n).Kind) {
	case ((NU8) 138):
	{
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA4;
			internalerror_198987((*n).Info, ((NimStringDesc*) &TMP2915));
		}
		LA4: ;
		addinheritedfieldsaux_500662(c, check, pos, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_500719;
			NI HEX3Atmp_500802;
			NI LOC7;
			NI res_500805;
			i_500719 = 0;
			HEX3Atmp_500802 = 0;
			LOC7 = 0;
			LOC7 = sonslen_227249(n);
			HEX3Atmp_500802 = (NI64)(LOC7 - 1);
			res_500805 = 1;
			{
				while (1) {
					if (!(res_500805 <= HEX3Atmp_500802)) goto LA9;
					i_500719 = res_500805;
					switch ((*(*n).kindU.S6.Sons->data[i_500719]).Kind) {
					case ((NU8) 85):
					case ((NU8) 88):
					{
						tnode226816* LOC11;
						LOC11 = 0;
						LOC11 = lastson_227261((*n).kindU.S6.Sons->data[i_500719]);
						addinheritedfieldsaux_500662(c, check, pos, LOC11);
					}
					break;
					default:
					{
						internalerror_198987((*n).Info, ((NimStringDesc*) &TMP2916));
					}
					break;
					}
					res_500805 += 1;
				} LA9: ;
			}
		}
	}
	break;
	case ((NU8) 137):
	{
		{
			NI i_500760;
			NI HEX3Atmp_500808;
			NI LOC15;
			NI res_500811;
			i_500760 = 0;
			HEX3Atmp_500808 = 0;
			LOC15 = 0;
			LOC15 = sonslen_227249(n);
			HEX3Atmp_500808 = (NI64)(LOC15 - 1);
			res_500811 = 0;
			{
				while (1) {
					if (!(res_500811 <= HEX3Atmp_500808)) goto LA17;
					i_500760 = res_500811;
					addinheritedfieldsaux_500662(c, check, pos, (*n).kindU.S6.Sons->data[i_500760]);
					res_500811 += 1;
				} LA17: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		incl_223869(check, (*(*(*n).kindU.S4.Sym).Name).Sup.Id);
		(*pos) += 1;
	}
	break;
	default:
	{
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP2917));
	}
	break;
	}
}

N_NIMCALL(void, addinheritedfields_500834)(tcontext291021* c, intset223056* check, NI* pos, ttype226852* obj) {
	{
		NIM_BOOL LOC3;
		NI LOC4;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = sonslen_227255(obj);
		LOC3 = (0 < LOC4);
		if (!(LOC3)) goto LA5;
		LOC3 = !(((*obj).Sons->data[0] == NIM_NIL));
		LA5: ;
		if (!LOC3) goto LA6;
		addinheritedfields_500834(c, check, pos, (*obj).Sons->data[0]);
	}
	LA6: ;
	addinheritedfieldsaux_500662(c, check, pos, (*obj).N);
}

N_NIMCALL(void, instantiategenericparamlist_490543)(tcontext291021* c, tnode226816* n, tidtable226864 pt, tinstantiation226836* entry) {
	NI LOC5;
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP2922));
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = len_227364(n);
	unsureAsgnRef((void**) (&(*entry).Concretetypes), (ttypeseq226848*) newSeq((&NTI226848), LOC5));
	{
		NI i_490575;
		tnode226816* a_490576;
		i_490575 = 0;
		a_490576 = 0;
		{
			NI i_490705;
			NI HEX3Atmp_490707;
			NI LOC8;
			NI res_490709;
			i_490705 = 0;
			HEX3Atmp_490707 = 0;
			LOC8 = 0;
			LOC8 = len_227364(n);
			HEX3Atmp_490707 = (LOC8 - 1);
			res_490709 = 0;
			{
				while (1) {
					if (!(res_490709 <= HEX3Atmp_490707)) goto LA10;
					i_490705 = res_490709;
					i_490575 = i_490705;
					a_490576 = (*n).kindU.S6.Sons->data[i_490705];
					{
						tsym226846* q;
						tsym226846* s;
						tsym226846* LOC20;
						ttype226852* t;
						tidobj201015* LOC21;
						TNimObject* LOC22;
						{
							if (!!(((*a_490576).Kind == ((NU8) 3)))) goto LA14;
							internalerror_198987((*a_490576).Info, ((NimStringDesc*) &TMP2923));
						}
						LA14: ;
						q = (*a_490576).kindU.S4.Sym;
						{
							if (!!(((IL64(1151232654746587392) &(IL64(1)<<(((*(*q).Typ).Kind)&IL64(63))))!=0))) goto LA18;
							goto LA11;
						}
						LA18: ;
						LOC20 = 0;
						LOC20 = getcurrowner_291255();
						s = newsym_227074(((NU8) 7), (*q).Name, LOC20, (*q).Info);
						(*s).Flags = ((*s).Flags | 5);
						LOC21 = 0;
						LOC21 = &(*q).Typ->Sup;
						LOC22 = 0;
						LOC22 = idtableget_236182(pt, LOC21);
						t = ((ttype226852*) (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_198955((*a_490576).Info, ((NU16) 124), (*(*s).Name).S);
								t = errortype_292318(c);
							}
							LA27: ;
						}
						goto LA23;
						LA25: ;
						{
							if (!((*t).Kind == ((NU8) 12))) goto LA33;
							localerror_198955((*a_490576).Info, ((NU16) 124), (*(*q).Name).S);
							t = errortype_292318(c);
						}
						goto LA23;
						LA33: ;
						{
							if (!((*t).Kind == ((NU8) 9))) goto LA36;
							t = generatetypeinstance_321503(c, pt, (*a_490576).Info, t);
						}
						goto LA23;
						LA36: ;
						LA23: ;
						asgnRefNoCycle((void**) (&(*s).Typ), t);
						adddecl_296694(c, s);
						asgnRefNoCycle((void**) (&(*entry).Concretetypes->data[i_490575]), t);
					} LA11: ;
					res_490709 += 1;
				} LA10: ;
			}
		}
	}
}

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

static N_INLINE(void, rtladdcycleroot_49429)(tcell44933* 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)(tcell44933* c) {
	(*c).Refcount = (NI)((NU64)((*c).Refcount) + (NU64)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_48667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_49429(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_50604)(tcell44933* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU64)((*c).Refcount) < (NU64)(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) {
	{
		tcell44933* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_48646(src);
		incref_51025(LOC5);
	}
	LA3: ;
	{
		tcell44933* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_48646((*dest));
		decref_50604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(void, pushproccon_291380)(tcontext291021* c, tsym226846* owner) {
	tproccon291011* x;
	{
		if (!(owner == NIM_NIL)) goto LA3;
		internalerror_199006(((NimStringDesc*) &TMP2924));
		goto BeforeRet;
	}
	LA3: ;
	x = 0;
	x = (tproccon291011*) newObj((&NTI291009), sizeof(tproccon291011));
	asgnRefNoCycle((void**) (&(*x).Owner), owner);
	asgnRef((void**) (&(*x).Next), (*c).P);
	asgnRef((void**) (&(*c).P), x);
	BeforeRet: ;
}

N_NIMCALL(ttype226852*, findenforcedstatictype_501109)(ttype226852* t_501111) {
	ttype226852* result;
	result = 0;
	{
		if (!((*t_501111).Kind == ((NU8) 59))) goto LA3;
		result = t_501111;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*t_501111).Kind == ((NU8) 55))) goto LA7;
		{
			ttype226852* s_501143;
			ttypeseq226848* HEX3Atmp_501163;
			NI i_501166;
			NI l_501168;
			s_501143 = 0;
			HEX3Atmp_501163 = 0;
			HEX3Atmp_501163 = (*t_501111).Sons;
			i_501166 = 0;
			l_501168 = HEX3Atmp_501163->Sup.len;
			{
				while (1) {
					ttype226852* t;
					if (!(i_501166 < l_501168)) goto LA11;
					s_501143 = HEX3Atmp_501163->data[i_501166];
					t = findenforcedstatictype_501109(s_501143);
					{
						if (!!((t == NIM_NIL))) goto LA14;
						result = t;
						goto BeforeRet;
					}
					LA14: ;
					i_501166 += 1;
				} LA11: ;
			}
		}
	}
	LA7: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, addparamorresult_491371)(tcontext291021* c, tsym226846* param, NU8 kind) {
	{
		ttype226852* statictype;
		if (!(kind == ((NU8) 17))) goto LA3;
		statictype = findenforcedstatictype_501109((*param).Typ);
		{
			tsym226846* a;
			if (!!((statictype == NIM_NIL))) goto LA7;
			a = copysym_227203(param, NIM_FALSE);
			asgnRefNoCycle((void**) (&(*a).Typ), base_264038(statictype));
			{
				if (!!((((*a).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA11;
				adddecl_296694(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_296694(c, param);
			}
			LA18: ;
		}
		goto LA5;
		LA14: ;
		{
			tsym226846* nn;
			tsym226846* a;
			nn = getsyssym_283054(((NimStringDesc*) &TMP2926));
			a = copysym_227203(param, NIM_FALSE);
			asgnRefNoCycle((void**) (&(*a).Typ), (*nn).Typ);
			{
				if (!!((((*a).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA23;
				adddecl_296694(c, a);
			}
			LA23: ;
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!!((((*param).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA28;
			adddecl_296694(c, param);
		}
		LA28: ;
	}
	LA1: ;
}

N_NIMCALL(void, addresult_525075)(tcontext291021* c, ttype226852* t, tlineinfo196539 info, NU8 owner) {
	{
		tsym226846* s;
		tident201021* LOC5;
		tsym226846* LOC6;
		if (!!((t == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = getident_201472(((NimStringDesc*) &TMP2925));
		LOC6 = 0;
		LOC6 = getcurrowner_291255();
		s = newsym_227074(((NU8) 11), LOC5, LOC6, info);
		asgnRefNoCycle((void**) (&(*s).Typ), t);
		(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
		addparamorresult_491371(c, s, owner);
		asgnRefNoCycle((void**) (&(*(*c).P).Resultsym), s);
	}
	LA3: ;
}

N_NIMCALL(void, addresultnode_525118)(tcontext291021* c, tnode226816* n) {
	{
		tnode226816* LOC5;
		if (!!(((*(*c).P).Resultsym == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = newsymnode_227132((*(*c).P).Resultsym);
		addson_227287(n, LOC5);
	}
	LA3: ;
}

N_NIMCALL(void, maybeaddresult_488301)(tcontext291021* c, tsym226846* s, tnode226816* 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_525075(c, (*(*s).Typ).Sons->data[0], (*n).Info, (*s).Kind);
		addresultnode_525118(c, n);
	}
	LA5: ;
}

N_NIMCALL(void, instantiateproctype_491682)(tcontext291021* c, tidtable226864 pt, tsym226846* prc, tlineinfo196539 info) {
	trepltypevars318786 cl;
	ttype226852* result;
	tnode226816* originalparams;
	tnode226816* LOC10;
	adddecl_296694(c, prc);
	pushinfocontext_197930(info);
	memset((void*)(&cl), 0, sizeof(cl));
	chckNil((void*)(&cl));
	memset((void*)(&cl), 0, sizeof(cl));
	inittypevars_321474(c, pt, info, (&cl));
	result = instcopytype_320238((&cl), (*prc).Typ);
	originalparams = (*result).N;
	asgnRefNoCycle((void**) (&(*result).N), shallowcopy_232347(originalparams));
	{
		NI i_491714;
		NI HEX3Atmp_491785;
		NI LOC2;
		NI res_491788;
		i_491714 = 0;
		HEX3Atmp_491785 = 0;
		LOC2 = 0;
		LOC2 = len_231005(result);
		HEX3Atmp_491785 = (LOC2 - 1);
		res_491788 = 1;
		{
			while (1) {
				tnode226816* param;
				tnode226816* LOC5;
				if (!(res_491788 <= HEX3Atmp_491785)) goto LA4;
				i_491714 = res_491788;
				asgnRefNoCycle((void**) (&(*result).Sons->data[i_491714]), replacetypevarst_318834((&cl), (*result).Sons->data[i_491714]));
				propagatetoowner_231318(result, (*result).Sons->data[i_491714]);
				LOC5 = 0;
				LOC5 = HEX5BHEX5D_227698(originalparams, i_491714);
				param = replacetypevarsn_318812((&cl), LOC5);
				asgnRefNoCycle((void**) (&(*(*result).N).kindU.S6.Sons->data[i_491714]), param);
				{
					if (!((*param).Kind == ((NU8) 3))) goto LA8;
					asgnRefNoCycle((void**) (&(*(*param).kindU.S4.Sym).Owner), prc);
					adddecl_296694(c, (*param).kindU.S4.Sym);
				}
				LA8: ;
				res_491788 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Sons->data[0]), replacetypevarst_318834((&cl), (*result).Sons->data[0]));
	LOC10 = 0;
	LOC10 = HEX5BHEX5D_227698(originalparams, 0);
	asgnRefNoCycle((void**) (&(*(*result).N).kindU.S6.Sons->data[0]), copytree_227329(LOC10));
	erasevoidparams_320784(result);
	skipintliteralparams_320999(result);
	asgnRefNoCycle((void**) (&(*prc).Typ), result);
	maybeaddresult_488301(c, prc, (*prc).Ast);
	popinfocontext_197957();
}

N_NIMCALL(NIM_BOOL, sameinstantiation_490728)(tinstantiation226836* a, tinstantiation226836* b) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*a).Concretetypes->Sup.len == (*b).Concretetypes->Sup.len)) goto LA3;
		{
			NI i_490765;
			NI HEX3Atmp_490768;
			NI res_490771;
			i_490765 = 0;
			HEX3Atmp_490768 = 0;
			HEX3Atmp_490768 = ((*a).Concretetypes->Sup.len-1);
			res_490771 = 0;
			{
				while (1) {
					if (!(res_490771 <= HEX3Atmp_490768)) goto LA7;
					i_490765 = res_490771;
					{
						NIM_BOOL LOC10;
						LOC10 = 0;
						LOC10 = comparetypes_271571((*a).Concretetypes->data[i_490765], (*b).Concretetypes->data[i_490765], ((NU8) 0), 4);
						if (!!(LOC10)) goto LA11;
						goto BeforeRet;
					}
					LA11: ;
					res_490771 += 1;
				} LA7: ;
			}
		}
		result = NIM_TRUE;
	}
	LA3: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym226846*, genericcacheget_490785)(tsym226846* genericsym, tinstantiation226836* entry) {
	tsym226846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_230338((*genericsym).kindU.S2.Procinstcache, NIM_NIL);
		if (!!(LOC3)) goto LA4;
		{
			tinstantiation226836* inst_491011;
			TY226947* HEX3Atmp_491013;
			NI i_491016;
			NI l_491018;
			inst_491011 = 0;
			HEX3Atmp_491013 = 0;
			HEX3Atmp_491013 = (*genericsym).kindU.S2.Procinstcache;
			i_491016 = 0;
			l_491018 = HEX3Atmp_491013->Sup.len;
			{
				while (1) {
					if (!(i_491016 < l_491018)) goto LA8;
					inst_491011 = HEX3Atmp_491013->data[i_491016];
					{
						NIM_BOOL LOC11;
						LOC11 = 0;
						LOC11 = sameinstantiation_490728(entry, (&(*inst_491011)));
						if (!LOC11) goto LA12;
						result = (*inst_491011).Sym;
						goto BeforeRet;
					}
					LA12: ;
					i_491016 += 1;
				} LA8: ;
			}
		}
	}
	LA4: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, safelen_227424)(tnode226816* 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_491201)(tnode226816* n, tsym226846* owner, tidtable226864* symmap) {
	{
		NIM_BOOL LOC3;
		tsym226846* x;
		tidobj201015* 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_236182((*symmap), LOC7);
		x = ((tsym226846*) (LOC8));
		{
			tidobj201015* LOC13;
			TNimObject* LOC14;
			if (!(x == NIM_NIL)) goto LA11;
			x = copysym_227203((*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_236196(symmap, LOC13, LOC14);
		}
		LA11: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S4.Sym), x);
	}
	goto LA1;
	LA5: ;
	{
		{
			NI i_491338;
			NI HEX3Atmp_491354;
			NI LOC17;
			NI res_491357;
			i_491338 = 0;
			HEX3Atmp_491354 = 0;
			LOC17 = 0;
			LOC17 = safelen_227424(n);
			HEX3Atmp_491354 = (LOC17 - 1);
			res_491357 = 0;
			{
				while (1) {
					if (!(res_491357 <= HEX3Atmp_491354)) goto LA19;
					i_491338 = res_491357;
					freshgensyms_491201((*n).kindU.S6.Sons->data[i_491338], owner, symmap);
					res_491357 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
}

static N_INLINE(NIM_BOOL, isemptytype_233991)(ttype226852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (t == NIM_NIL);
	if (LOC1) goto LA2;
	LOC1 = ((136 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0);
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NIM_BOOL, istypeexpr_536187)(tnode226816* 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(tnode226816*, readtypeparameter_536641)(tcontext291021* c, ttype226852* typ, tident201021* paramname, tlineinfo196539 info) {
	tnode226816* result;
	ttype226852* ty;
	ttype226852* tbody;
	result = 0;
	{
		if (!((*typ).Kind == ((NU8) 11))) goto LA3;
		ty = skipgenericalias_270619(typ);
	}
	goto LA1;
	LA3: ;
	{
		{
			NimStringDesc* LOC10;
			if (!!(((*typ).Kind == ((NU8) 54)))) goto LA8;
			LOC10 = 0;
			LOC10 = HEX24_199126(TMP2996);
			internalerror_199006(LOC10);
		}
		LA8: ;
		ty = (*typ).Sons->data[1];
	}
	LA1: ;
	tbody = (*ty).Sons->data[0];
	{
		NI s_536696;
		NI HEX3Atmp_536710;
		NI LOC12;
		NI res_536713;
		s_536696 = 0;
		HEX3Atmp_536710 = 0;
		LOC12 = 0;
		LOC12 = len_231005(tbody);
		HEX3Atmp_536710 = (NI64)(LOC12 - 2);
		res_536713 = 0;
		{
			while (1) {
				ttype226852* tparam;
				if (!(res_536713 <= HEX3Atmp_536710)) goto LA14;
				s_536696 = res_536713;
				tparam = (*tbody).Sons->data[s_536696];
				{
					ttype226852* rawtyp;
					if (!((*(*(*tparam).Sym).Name).Sup.Id == (*paramname).Sup.Id)) goto LA17;
					rawtyp = (*ty).Sons->data[(NI64)(s_536696 + 1)];
					{
						if (!((*rawtyp).Kind == ((NU8) 59))) goto LA21;
						result = (*rawtyp).N;
						goto BeforeRet;
					}
					goto LA19;
					LA21: ;
					{
						ttype226852* foundtyp;
						tsym226846* LOC24;
						tsym226846* LOC25;
						foundtyp = maketypedesc_291762(c, rawtyp);
						LOC24 = 0;
						LOC24 = copysym_227203((*tparam).Sym, NIM_FALSE);
						LOC25 = 0;
						LOC25 = linkto_227825(LOC24, foundtyp);
						result = newsymnode_228754(LOC25, info);
						goto BeforeRet;
					}
					LA19: ;
				}
				LA17: ;
				res_536713 += 1;
			} LA14: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym226846*, lookupinrecordandbuildcheck_536217)(tcontext291021* c, tnode226816* n, tnode226816* r, tident201021* field, tnode226816** check) {
	tsym226846* result;
	result = 0;
	result = NIM_NIL;
	switch ((*r).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_536238;
			NI HEX3Atmp_536533;
			NI LOC3;
			NI res_536536;
			i_536238 = 0;
			HEX3Atmp_536533 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227249(r);
			HEX3Atmp_536533 = (NI64)(LOC3 - 1);
			res_536536 = 0;
			{
				while (1) {
					if (!(res_536536 <= HEX3Atmp_536533)) goto LA5;
					i_536238 = res_536536;
					result = lookupinrecordandbuildcheck_536217(c, n, (*r).kindU.S6.Sons->data[i_536238], field, check);
					{
						if (!!((result == NIM_NIL))) goto LA8;
						goto BeforeRet;
					}
					LA8: ;
					res_536536 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		tnode226816* s;
		checkminsonslen_292425(r, 2);
		{
			if (!!(((*(*r).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA13;
			illformedast_292405(r);
		}
		LA13: ;
		result = lookupinrecordandbuildcheck_536217(c, n, (*r).kindU.S6.Sons->data[0], field, check);
		{
			if (!!((result == NIM_NIL))) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
		s = newnodei_227138(((NU8) 39), (*r).Info);
		{
			NI i_536337;
			NI HEX3Atmp_536551;
			NI LOC20;
			NI res_536554;
			i_536337 = 0;
			HEX3Atmp_536551 = 0;
			LOC20 = 0;
			LOC20 = sonslen_227249(r);
			HEX3Atmp_536551 = (NI64)(LOC20 - 1);
			res_536554 = 1;
			{
				while (1) {
					tnode226816* it;
					if (!(res_536554 <= HEX3Atmp_536551)) goto LA22;
					i_536337 = res_536554;
					it = (*r).kindU.S6.Sons->data[i_536337];
					switch ((*it).Kind) {
					case ((NU8) 85):
					{
						tnode226816* LOC24;
						LOC24 = 0;
						LOC24 = lastson_227261(it);
						result = lookupinrecordandbuildcheck_536217(c, n, LOC24, field, check);
						{
							if (!(result == NIM_NIL)) goto LA27;
							{
								NI j_536380;
								NI HEX3Atmp_536540;
								NI LOC30;
								NI res_536543;
								j_536380 = 0;
								HEX3Atmp_536540 = 0;
								LOC30 = 0;
								LOC30 = sonslen_227249(it);
								HEX3Atmp_536540 = (NI64)(LOC30 - 2);
								res_536543 = 0;
								{
									while (1) {
										tnode226816* LOC33;
										if (!(res_536543 <= HEX3Atmp_536540)) goto LA32;
										j_536380 = res_536543;
										LOC33 = 0;
										LOC33 = copytree_227329((*it).kindU.S6.Sons->data[j_536380]);
										addson_227287(s, LOC33);
										res_536543 += 1;
									} LA32: ;
								}
							}
						}
						goto LA25;
						LA27: ;
						{
							tnode226816* inexpr;
							tident201021* LOC44;
							tnode226816* LOC45;
							tnode226816* LOC46;
							tnode226816* LOC47;
							{
								if (!((*check) == NIM_NIL)) goto LA37;
								unsureAsgnRef((void**) (&(*check)), newnodei_227138(((NU8) 46), (*n).Info));
								addson_227287((*check), emptynode_227738);
							}
							LA37: ;
							s = newnodei_227138(((NU8) 39), (*n).Info);
							{
								NI j_536424;
								NI HEX3Atmp_536546;
								NI LOC40;
								NI res_536549;
								j_536424 = 0;
								HEX3Atmp_536546 = 0;
								LOC40 = 0;
								LOC40 = sonslen_227249(it);
								HEX3Atmp_536546 = (NI64)(LOC40 - 2);
								res_536549 = 0;
								{
									while (1) {
										tnode226816* LOC43;
										if (!(res_536549 <= HEX3Atmp_536546)) goto LA42;
										j_536424 = res_536549;
										LOC43 = 0;
										LOC43 = copytree_227329((*it).kindU.S6.Sons->data[j_536424]);
										addson_227287(s, LOC43);
										res_536549 += 1;
									} LA42: ;
								}
							}
							inexpr = newnodei_227138(((NU8) 27), (*n).Info);
							LOC44 = 0;
							LOC44 = getident_201472(((NimStringDesc*) &TMP2998));
							LOC45 = 0;
							LOC45 = newidentnode_227125(LOC44, (*n).Info);
							addson_227287(inexpr, LOC45);
							LOC46 = 0;
							LOC46 = copytree_227329((*r).kindU.S6.Sons->data[0]);
							addson_227287(inexpr, LOC46);
							addson_227287(inexpr, s);
							LOC47 = 0;
							LOC47 = semexpr_488201(c, inexpr, 0);
							addson_227287((*check), LOC47);
							goto BeforeRet;
						}
						LA25: ;
					}
					break;
					case ((NU8) 88):
					{
						tnode226816* LOC49;
						LOC49 = 0;
						LOC49 = lastson_227261(it);
						result = lookupinrecordandbuildcheck_536217(c, n, LOC49, field, check);
						{
							tnode226816* inexpr;
							tident201021* LOC58;
							tnode226816* LOC59;
							tnode226816* LOC60;
							tnode226816* notexpr;
							tident201021* LOC61;
							tnode226816* LOC62;
							tnode226816* LOC63;
							if (!!((result == NIM_NIL))) goto LA52;
							{
								if (!((*check) == NIM_NIL)) goto LA56;
								unsureAsgnRef((void**) (&(*check)), newnodei_227138(((NU8) 46), (*n).Info));
								addson_227287((*check), emptynode_227738);
							}
							LA56: ;
							inexpr = newnodei_227138(((NU8) 27), (*n).Info);
							LOC58 = 0;
							LOC58 = getident_201472(((NimStringDesc*) &TMP2998));
							LOC59 = 0;
							LOC59 = newidentnode_227125(LOC58, (*n).Info);
							addson_227287(inexpr, LOC59);
							LOC60 = 0;
							LOC60 = copytree_227329((*r).kindU.S6.Sons->data[0]);
							addson_227287(inexpr, LOC60);
							addson_227287(inexpr, s);
							notexpr = newnodei_227138(((NU8) 27), (*n).Info);
							LOC61 = 0;
							LOC61 = getident_201472(((NimStringDesc*) &TMP2999));
							LOC62 = 0;
							LOC62 = newidentnode_227125(LOC61, (*n).Info);
							addson_227287(notexpr, LOC62);
							addson_227287(notexpr, inexpr);
							LOC63 = 0;
							LOC63 = semexpr_488201(c, notexpr, 0);
							addson_227287((*check), LOC63);
							goto BeforeRet;
						}
						LA52: ;
					}
					break;
					default:
					{
						illformedast_292405(it);
					}
					break;
					}
					res_536554 += 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_292405(n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, fieldvisible_415842)(tcontext291021* c, tsym226846* f) {
	NIM_BOOL result;
	NI fmoduleid;
	tsym226846* LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = getmodule_236243(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;
	{
		tsym226846* module_416011;
		tsymseq226818* HEX3Atmp_416013;
		NI i_416016;
		NI l_416018;
		module_416011 = 0;
		HEX3Atmp_416013 = 0;
		HEX3Atmp_416013 = (*c).Friendmodules;
		i_416016 = 0;
		l_416018 = HEX3Atmp_416013->Sup.len;
		{
			while (1) {
				if (!(i_416016 < l_416018)) goto LA6;
				module_416011 = HEX3Atmp_416013->data[i_416016];
				{
					if (!(fmoduleid == (*module_416011).Sup.Id)) goto LA9;
					result = NIM_TRUE;
					goto LA4;
				}
				LA9: ;
				i_416016 += 1;
			} LA6: ;
		}
	} LA4: ;
	return result;
}

N_NIMCALL(tnode226816*, makederef_536595)(tnode226816* n) {
	tnode226816* result;
	ttype226852* t;
	result = 0;
	t = skiptypes_231245((*n).Typ, 2048);
	result = n;
	{
		if (!((*t).Kind == ((NU8) 23))) goto LA3;
		result = newnodeit_227145(((NU8) 65), (*n).Info, (*t).Sons->data[0]);
		addson_227287(result, n);
		t = skiptypes_231245((*t).Sons->data[0], 2048);
	}
	LA3: ;
	{
		while (1) {
			tnode226816* a;
			ttype226852* LOC7;
			if (!((6291456 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA6;
			a = result;
			result = newnodeit_227145(((NU8) 65), (*n).Info, (*t).Sons->data[0]);
			addson_227287(result, a);
			LOC7 = 0;
			LOC7 = lastson_227267(t);
			t = skiptypes_231245(LOC7, 2048);
		} LA6: ;
	}
	return result;
}

N_NIMCALL(tnode226816*, builtinfieldaccess_536727)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tsym226846* s;
	tident201021* i;
	ttype226852* ty;
	tsym226846* f;
	tnode226816* check;
	result = 0;
	checksonslen_292415(n, 2);
	s = qualifiedlookup_297122(c, n, 3);
	{
		if (!!((s == NIM_NIL))) goto LA3;
		{
			if (!((520256 &(1<<(((*s).Kind)&31)))!=0)) goto LA7;
			result = symchoice_505476(c, n, s, ((NU8) 0));
			{
				if (!((*result).Kind == ((NU8) 3))) goto LA11;
				result = semsym_529849(c, n, s, flags);
			}
			LA11: ;
		}
		goto LA5;
		LA7: ;
		{
			markused_406251((*(*n).kindU.S6.Sons->data[1]).Info, s);
			result = semsym_529849(c, n, s, flags);
		}
		LA5: ;
		goto BeforeRet;
	}
	LA3: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], (flags | 16)));
	i = considerquotedident_296010((*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;
		ttype226852* LOC20;
		LOC16 = 0;
		LOC16 = istypeexpr_536187((*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_264038(ty);
		LOC18 = !(((*LOC20).Kind == ((NU8) 0)));
		LA19: ;
		LOC16 = LOC18;
		LA17: ;
		if (!LOC16) goto LA21;
		{
			if (!((*ty).Kind == ((NU8) 8))) goto LA25;
			ty = base_264038(ty);
		}
		LA25: ;
		ty = skiptypes_231245(ty, 14680064);
		switch ((*ty).Kind) {
		case ((NU8) 14):
		{
			{
				while (1) {
					if (!!((ty == NIM_NIL))) goto LA29;
					f = getsymfromlist_236228((*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_227132(f);
				(*result).Info = (*n).Info;
				asgnRefNoCycle((void**) (&(*result).Typ), ty);
				markused_406251((*n).Info, f);
				goto BeforeRet;
			}
			LA36: ;
		}
		break;
		case ((NU8) 11):
		case ((NU8) 54):
		{
			result = readtypeparameter_536641(c, ty, i, (*n).Info);
			goto BeforeRet;
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			{
				if (!((*(*ty).N).Kind == ((NU8) 137))) goto LA42;
				{
					tnode226816* field_537210;
					tnode226816* HEX3Atmp_537691;
					field_537210 = 0;
					HEX3Atmp_537691 = 0;
					HEX3Atmp_537691 = (*ty).N;
					{
						NI i_537695;
						NI HEX3Atmp_537697;
						NI LOC46;
						NI res_537699;
						i_537695 = 0;
						HEX3Atmp_537697 = 0;
						LOC46 = 0;
						LOC46 = len_227364(HEX3Atmp_537691);
						HEX3Atmp_537697 = (LOC46 - 1);
						res_537699 = 0;
						{
							while (1) {
								if (!(res_537699 <= HEX3Atmp_537697)) goto LA48;
								i_537695 = res_537699;
								field_537210 = (*HEX3Atmp_537691).kindU.S6.Sons->data[i_537695];
								{
									ttypeseq226848* LOC53;
									TY291918 LOC54;
									if (!((*(*field_537210).kindU.S4.Sym).Name == i)) goto LA51;
									LOC53 = 0;
									LOC53 = (ttypeseq226848*) newSeq((&NTI226848), 2);
									memset((void*)LOC54, 0, sizeof(LOC54));
									LOC54[0] = ty;
									LOC54[1] = (*(*field_537210).kindU.S4.Sym).Typ;
									asgnRefNoCycle((void**) (&LOC53->data[0]), LOC54[0]);
									asgnRefNoCycle((void**) (&LOC53->data[1]), LOC54[1]);
									asgnRefNoCycle((void**) (&(*n).Typ), newtypewithsons_291822(c, ((NU8) 61), LOC53));
									asgnRefNoCycle((void**) (&(*(*n).Typ).N), copytree_227329(n));
									result = n;
									goto BeforeRet;
								}
								LA51: ;
								res_537699 += 1;
							} LA48: ;
						}
					}
				}
			}
			LA42: ;
		}
		break;
		default:
		{
			goto BeforeRet;
		}
		break;
		}
		ty = (*(*n).kindU.S6.Sons->data[0]).Typ;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA21: ;
	ty = skiptypes_231245(ty, 14682112);
	{
		while (1) {
			if (!(((*ty).Flags &(1<<((((NU8) 27))&31)))!=0)) goto LA57;
			ty = skiptypes_231245(ty, 8192);
		} LA57: ;
	}
	check = NIM_NIL;
	{
		if (!((*ty).Kind == ((NU8) 17))) goto LA60;
		{
			while (1) {
				check = NIM_NIL;
				f = lookupinrecordandbuildcheck_536217(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_231245((*ty).Sons->data[0], 2048);
			}
		} LA62: ;
		{
			if (!!((f == NIM_NIL))) goto LA74;
			{
				NIM_BOOL LOC78;
				LOC78 = 0;
				LOC78 = fieldvisible_415842(c, f);
				if (!LOC78) goto LA79;
				markused_406251((*(*n).kindU.S6.Sons->data[1]).Info, f);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_536595((*n).kindU.S6.Sons->data[0]));
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), newsymnode_227132(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_236228((*ty).N, i, 0);
		{
			if (!!((f == NIM_NIL))) goto LA93;
			markused_406251((*(*n).kindU.S6.Sons->data[1]).Info, f);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_536595((*n).kindU.S6.Sons->data[0]));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), newsymnode_227132(f));
			asgnRefNoCycle((void**) (&(*n).Typ), (*f).Typ);
			result = n;
		}
		LA93: ;
	}
	goto LA58;
	LA89: ;
	LA58: ;
	{
		ttype226852* t;
		if (!(result == NIM_NIL)) goto LA97;
		t = skiptypes_231245((*(*n).kindU.S6.Sons->data[0]).Typ, 14680064);
		{
			if (!((IL64(18014398509484032) &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA101;
			result = readtypeparameter_536641(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[((NI64)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

N_NIMCALL(void, gatherusedsyms_492875)(tcontext291021* c, tnodeseq226810** usedsyms) {
	{
		tscope226840* scope_492881;
		tscope226840* HEX3Atmp_492992;
		tscope226840* current_492995;
		scope_492881 = 0;
		HEX3Atmp_492992 = 0;
		HEX3Atmp_492992 = (*c).Currentscope;
		current_492995 = HEX3Atmp_492992;
		{
			while (1) {
				if (!!((current_492995 == NIM_NIL))) goto LA3;
				scope_492881 = current_492995;
				{
					NIM_BOOL LOC6;
					LOC6 = 0;
					LOC6 = HEX3DHEX3D_316667((*scope_492881).Usingsyms, NIM_NIL);
					if (!!(LOC6)) goto LA7;
					{
						tnode226816* s_492911;
						tnodeseq226810* HEX3Atmp_492986;
						NI i_492989;
						NI l_492991;
						s_492911 = 0;
						HEX3Atmp_492986 = 0;
						HEX3Atmp_492986 = (*scope_492881).Usingsyms;
						i_492989 = 0;
						l_492991 = HEX3Atmp_492986->Sup.len;
						{
							while (1) {
								if (!(i_492989 < l_492991)) goto LA11;
								s_492911 = HEX3Atmp_492986->data[i_492989];
								safeadd_492915(usedsyms, s_492911);
								i_492989 += 1;
							} LA11: ;
						}
					}
				}
				LA7: ;
				current_492995 = (*current_492995).Parent;
			} LA3: ;
		}
	}
}

N_NIMCALL(tsym226846*, lookupmacro_525201)(tcontext291021* c, tnode226816* n) {
	tsym226846* 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: ;
	{
		tident201021* LOC10;
		LOC10 = 0;
		LOC10 = considerquotedident_296010(n);
		result = searchinscopes_296355(c, LOC10, 393216);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, copyexcept_525142)(tnode226816* n, NI i) {
	tnode226816* result;
	result = 0;
	result = copynode_227323(n);
	{
		NI j_525168;
		NI HEX3Atmp_525184;
		NI LOC2;
		NI res_525187;
		j_525168 = 0;
		HEX3Atmp_525184 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_525184 = (LOC2 - 1);
		res_525187 = 0;
		{
			while (1) {
				if (!(res_525187 <= HEX3Atmp_525184)) goto LA4;
				j_525168 = res_525187;
				{
					if (!!((j_525168 == i))) goto LA7;
					add_227498(result, (*n).kindU.S6.Sons->data[j_525168]);
				}
				LA7: ;
				res_525187 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode226816*, semprocannotation_525247)(tcontext291021* c, tnode226816* prc) {
	tnode226816* result;
	tnode226816* 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_525316;
		NI HEX3Atmp_525488;
		NI LOC8;
		NI res_525491;
		i_525316 = 0;
		HEX3Atmp_525488 = 0;
		LOC8 = 0;
		LOC8 = len_227364(n);
		HEX3Atmp_525488 = (LOC8 - 1);
		res_525491 = 0;
		{
			while (1) {
				if (!(res_525491 <= HEX3Atmp_525488)) goto LA10;
				i_525316 = res_525491;
				{
					tnode226816* it;
					tnode226816* key;
					tsym226846* m;
					tnode226816* x;
					tnode226816* LOC33;
					it = (*n).kindU.S6.Sons->data[i_525316];
					{
						if (!((*it).Kind == ((NU8) 34))) goto LA14;
						key = (*it).kindU.S6.Sons->data[0];
					}
					goto LA12;
					LA14: ;
					{
						key = it;
					}
					LA12: ;
					m = lookupmacro_525201(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;
							{
								tident201021* LOC29;
								LOC29 = 0;
								LOC29 = considerquotedident_296010((*prc).kindU.S6.Sons->data[0]);
								if (!eqStrings((*LOC29).S, ((NimStringDesc*) &TMP3000))) goto LA30;
								asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[0]), newidentnode_227125(iddelegator_201559, (*prc).Info));
								asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[4]), copyexcept_525142(n, i_525316));
							}
							goto LA27;
							LA30: ;
							{
								localerror_198955((*prc).Info, ((NU16) 199), ((NimStringDesc*) &TMP2890));
							}
							LA27: ;
						}
						LA25: ;
						goto LA11;
					}
					LA19: ;
					x = newnodei_227138(((NU8) 27), (*n).Info);
					LOC33 = 0;
					LOC33 = newsymnode_227132(m);
					add_227498(x, LOC33);
					asgnRefNoCycle((void**) (&(*prc).kindU.S6.Sons->data[4]), copyexcept_525142(n, i_525316));
					{
						if (!((*it).Kind == ((NU8) 34))) goto LA36;
						add_227498(x, (*it).kindU.S6.Sons->data[1]);
					}
					LA36: ;
					add_227498(x, prc);
					result = semstmt_488277(c, x);
					goto BeforeRet;
				} LA11: ;
				res_525491 += 1;
			} LA10: ;
		}
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(tsym226846*, newsymg_488930)(NU8 kind, tnode226816* n, tcontext291021* c) {
	tsym226846* 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_199126(TMP3001);
			internalerror_199006(LOC9);
		}
		LA7: ;
		asgnRefNoCycle((void**) (&(*result).Owner), getcurrowner_291255());
	}
	goto LA1;
	LA3: ;
	{
		tident201021* LOC11;
		tsym226846* LOC12;
		LOC11 = 0;
		LOC11 = considerquotedident_296010(n);
		LOC12 = 0;
		LOC12 = getcurrowner_291255();
		result = newsym_227074(kind, LOC11, LOC12, (*n).Info);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym226846*, semidentvis_488990)(tcontext291021* c, NU8 kind, tnode226816* n, NU32 allowed) {
	tsym226846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 31))) goto LA3;
		{
			NIM_BOOL LOC7;
			NI LOC8;
			tident201021* v;
			LOC7 = 0;
			LOC8 = 0;
			LOC8 = sonslen_227249(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_488930(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_198955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 174), (*v).S);
			}
			LA12: ;
		}
		goto LA5;
		LA10: ;
		{
			illformedast_292405(n);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		result = newsymg_488930(kind, n, c);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym226846*, semidentwithpragma_488999)(tcontext291021* c, NU8 kind, tnode226816* n, NU32 allowed) {
	tsym226846* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 43))) goto LA3;
		checksonslen_292415(n, 2);
		result = semidentvis_488990(c, kind, (*n).kindU.S6.Sons->data[0], allowed);
		switch (kind) {
		case ((NU8) 7):
		{
		}
		break;
		case ((NU8) 19):
		{
			pragma_311079(c, result, (*n).kindU.S6.Sons->data[1], TMP3003);
		}
		break;
		case ((NU8) 8):
		{
			pragma_311079(c, result, (*n).kindU.S6.Sons->data[1], TMP3004);
		}
		break;
		case ((NU8) 9):
		{
			pragma_311079(c, result, (*n).kindU.S6.Sons->data[1], TMP3004);
		}
		break;
		case ((NU8) 10):
		{
			pragma_311079(c, result, (*n).kindU.S6.Sons->data[1], TMP3005);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	goto LA1;
	LA3: ;
	{
		result = semidentvis_488990(c, kind, n, allowed);
	}
	LA1: ;
	{
		if (!(gcmd_170120 == ((NU8) 7))) goto LA14;
	}
	LA14: ;
	return result;
}

static N_INLINE(void, suggestsym_421882)(tlineinfo196539 info, tsym226846* s) {
	{
		if (!((gglobaloptions_170118 &(1<<((((NU8) 26))&31)))!=0)) goto LA3;
		findusages_419417(info, s);
	}
	LA3: ;
	{
		if (!((gglobaloptions_170118 &(1<<((((NU8) 25))&31)))!=0)) goto LA7;
		finddefinition_419457(info, s);
	}
	LA7: ;
	{
		if (!isserving_170133) goto LA11;
		addtosourcemap_419598(s, info);
	}
	LA11: ;
}

N_NIMCALL(tsym226846*, semidentdef_520665)(tcontext291021* c, tnode226816* n, NU8 kind) {
	tsym226846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_292436(c);
		if (!LOC3) goto LA4;
		result = semidentwithpragma_488999(c, kind, n, 2);
		(*result).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
	}
	goto LA1;
	LA4: ;
	{
		result = semidentwithpragma_488999(c, kind, n, 0);
	}
	LA1: ;
	suggestsym_421882((*n).Info, result);
	return result;
}

N_NIMCALL(ttype226852*, semgenericconstraints_504975)(tcontext291021* c, ttype226852* x) {
	ttype226852* result;
	ttypeseq226848* LOC1;
	TY412748 LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = (ttypeseq226848*) newSeq((&NTI226848), 1);
	memset((void*)LOC2, 0, sizeof(LOC2));
	LOC2[0] = x;
	asgnRefNoCycle((void**) (&LOC1->data[0]), LOC2[0]);
	result = newtypewithsons_291822(c, ((NU8) 12), LOC1);
	return result;
}

N_NIMCALL(tnode226816*, semgenericparamlist_505001)(tcontext291021* c, tnode226816* n, ttype226852* father) {
	tnode226816* result;
	result = 0;
	result = copynode_227323(n);
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		illformedast_292405(n);
		goto BeforeRet;
	}
	LA3: ;
	{
		NI i_505028;
		NI HEX3Atmp_505343;
		NI LOC6;
		NI res_505346;
		i_505028 = 0;
		HEX3Atmp_505343 = 0;
		LOC6 = 0;
		LOC6 = sonslen_227249(n);
		HEX3Atmp_505343 = (NI64)(LOC6 - 1);
		res_505346 = 0;
		{
			while (1) {
				tnode226816* a;
				NI l;
				tnode226816* def;
				NI LOC13;
				tnode226816* constraint;
				NI LOC20;
				ttype226852* typ;
				if (!(res_505346 <= HEX3Atmp_505343)) goto LA8;
				i_505028 = res_505346;
				a = (*n).kindU.S6.Sons->data[i_505028];
				{
					if (!!(((*a).Kind == ((NU8) 35)))) goto LA11;
					illformedast_292405(n);
				}
				LA11: ;
				l = len_227364(a);
				LOC13 = 0;
				{
					if (!NIM_FALSE) goto LA16;
					LOC13 = -1;
				}
				goto LA14;
				LA16: ;
				{
					NI LOC19;
					LOC19 = 0;
					LOC19 = len_227364(a);
					LOC13 = (NI64)(LOC19 + -1);
				}
				LA14: ;
				def = HEX5BHEX5D_227698(a, LOC13);
				LOC20 = 0;
				{
					if (!NIM_FALSE) goto LA23;
					LOC20 = -2;
				}
				goto LA21;
				LA23: ;
				{
					NI LOC26;
					LOC26 = 0;
					LOC26 = len_227364(a);
					LOC20 = (NI64)(LOC26 + -2);
				}
				LA21: ;
				constraint = HEX5BHEX5D_227698(a, LOC20);
				typ = 0;
				{
					if (!!(((*constraint).Kind == ((NU8) 1)))) goto LA29;
					typ = semtypenode_488269(c, constraint, NIM_NIL);
					{
						NIM_BOOL LOC33;
						NI LOC35;
						LOC33 = 0;
						LOC33 = !(((*typ).Kind == ((NU8) 59)));
						if (LOC33) goto LA34;
						LOC35 = 0;
						LOC35 = len_231005(typ);
						LOC33 = (LOC35 == 0);
						LA34: ;
						if (!LOC33) goto LA36;
						{
							if (!((*typ).Kind == ((NU8) 8))) goto LA40;
							{
								ttypeseq226848* LOC46;
								TY412748 LOC47;
								if (!((*(*typ).Sons->data[0]).Kind == ((NU8) 0))) goto LA44;
								LOC46 = 0;
								LOC46 = (ttypeseq226848*) newSeq((&NTI226848), 1);
								memset((void*)LOC47, 0, sizeof(LOC47));
								LOC47[0] = newtypes_291213(((NU8) 0), c);
								asgnRefNoCycle((void**) (&LOC46->data[0]), LOC47[0]);
								typ = newtypewithsons_291822(c, ((NU8) 8), LOC46);
							}
							LA44: ;
						}
						goto LA38;
						LA40: ;
						{
							typ = semgenericconstraints_504975(c, typ);
						}
						LA38: ;
					}
					LA36: ;
				}
				LA29: ;
				{
					if (!!(((*def).Kind == ((NU8) 1)))) goto LA51;
					def = semconstexpr_489503(c, def);
					{
						if (!(typ == NIM_NIL)) goto LA55;
						{
							ttypeseq226848* LOC61;
							TY412748 LOC62;
							if (!!(((*(*def).Typ).Kind == ((NU8) 8)))) goto LA59;
							LOC61 = 0;
							LOC61 = (ttypeseq226848*) newSeq((&NTI226848), 1);
							memset((void*)LOC62, 0, sizeof(LOC62));
							LOC62[0] = (*def).Typ;
							asgnRefNoCycle((void**) (&LOC61->data[0]), LOC62[0]);
							typ = newtypewithsons_291822(c, ((NU8) 59), LOC61);
						}
						LA59: ;
					}
					goto LA53;
					LA55: ;
					{
						asgnRefNoCycle((void**) (&(*def).Typ), skiptypes_231245((*def).Typ, 256));
						{
							NIM_BOOL LOC66;
							LOC66 = 0;
							LOC66 = containsgenerictype_273929((*def).Typ);
							if (!!(LOC66)) goto LA67;
							def = fitnode_488245(c, typ, def);
						}
						LA67: ;
					}
					LA53: ;
				}
				LA51: ;
				{
					if (!(typ == NIM_NIL)) goto LA71;
					typ = newtypes_291213(((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_505243;
					NI HEX3Atmp_505338;
					NI res_505341;
					j_505243 = 0;
					HEX3Atmp_505338 = 0;
					HEX3Atmp_505338 = (NI64)(l - 3);
					res_505341 = 0;
					{
						while (1) {
							ttype226852* finaltype;
							tsym226846* s;
							tnode226816* LOC102;
							if (!(res_505341 <= HEX3Atmp_505338)) goto LA79;
							j_505243 = res_505341;
							{
								if (!(j_505243 == 0)) goto LA82;
								finaltype = typ;
							}
							goto LA80;
							LA82: ;
							{
								finaltype = copytype_227195(typ, (*typ).Owner, NIM_FALSE);
							}
							LA80: ;
							{
								NIM_BOOL LOC87;
								tsym226846* 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_488930(((NU8) 4), (*a).kindU.S6.Sons->data[j_505243], c);
								s = linkto_227825(LOC91, finaltype);
							}
							goto LA85;
							LA89: ;
							{
								tsym226846* LOC93;
								LOC93 = 0;
								LOC93 = newsymg_488930(((NU8) 7), (*a).kindU.S6.Sons->data[j_505243], c);
								s = linkto_227825(LOC93, finaltype);
							}
							LA85: ;
							{
								if (!!(((*def).Kind == ((NU8) 1)))) goto LA96;
								asgnRefNoCycle((void**) (&(*s).Ast), def);
							}
							LA96: ;
							{
								if (!!((father == NIM_NIL))) goto LA100;
								addsonskipintlit_283574(father, (*s).Typ);
							}
							LA100: ;
							(*s).Position = len_227364(result);
							LOC102 = 0;
							LOC102 = newsymnode_227132(s);
							addson_227287(result, LOC102);
							{
								if (!!((((*s).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA105;
								adddecl_296694(c, s);
							}
							LA105: ;
							res_505341 += 1;
						} LA79: ;
					}
				}
				res_505346 += 1;
			} LA8: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semparamtype_502513)(tcontext291021* c, tnode226816* n, tnode226816** constraint) {
	ttype226852* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 40))) goto LA3;
		result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		unsureAsgnRef((void**) (&(*constraint)), semnodekindconstraints_322527(n));
	}
	goto LA1;
	LA3: ;
	{
		result = semtypenode_488269(c, n, NIM_NIL);
	}
	LA1: ;
	return result;
}
N_NIMCALL(void, TMP3027)(void* p, NI op) {
	TY502454* a;
	a = (TY502454*)p;
	nimGCvisit((void*)(*a).Paramname501297, op);
	nimGCvisit((void*)(*a).Genericparams501295, op);
	nimGCvisit((void*)(*a).C501293, op);
}

N_CLOSURE(ttype226852*, addimplicitgenericimpl_501318)(ttype226852* typeclass, tident201021* typid, void* ClEnv) {
	ttype226852* result;
	TY502454* HEX3Aenvp_502469;
	tident201021* finaltypid;
	tsym226846* owner;
	tsym226846* s;
	tsym226846* LOC28;
	tnode226816* LOC29;
	result = 0;
	HEX3Aenvp_502469 = (TY502454*) ClEnv;
	{
		if (!!((typid == NIM_NIL))) goto LA3;
		finaltypid = typid;
	}
	goto LA1;
	LA3: ;
	{
		NimStringDesc* LOC6;
		LOC6 = 0;
		LOC6 = rawNewString((*HEX3Aenvp_502469).Paramname501297->Sup.len + 5);
appendString(LOC6, (*HEX3Aenvp_502469).Paramname501297);
appendString(LOC6, ((NimStringDesc*) &TMP3028));
		finaltypid = getident_201472(LOC6);
	}
	LA1: ;
	{
		if (!((*HEX3Aenvp_502469).Genericparams501295 == NIM_NIL)) goto LA9;
		goto BeforeRet;
	}
	LA9: ;
	{
		NI i_501370;
		NI HEX3Atmp_501482;
		NI LOC12;
		NI res_501485;
		i_501370 = 0;
		HEX3Atmp_501482 = 0;
		LOC12 = 0;
		LOC12 = len_227364((*HEX3Aenvp_502469).Genericparams501295);
		HEX3Atmp_501482 = (NI64)(LOC12 - 1);
		res_501485 = 0;
		{
			while (1) {
				if (!(res_501485 <= HEX3Atmp_501482)) goto LA14;
				i_501370 = res_501485;
				{
					if (!((*(*(*(*(*HEX3Aenvp_502469).Genericparams501295).kindU.S6.Sons->data[i_501370]).kindU.S4.Sym).Name).Sup.Id == (*finaltypid).Sup.Id)) goto LA17;
					result = (*(*(*HEX3Aenvp_502469).Genericparams501295).kindU.S6.Sons->data[i_501370]).Typ;
					goto BeforeRet;
				}
				LA17: ;
				res_501485 += 1;
			} LA14: ;
		}
	}
	{
		if (!!(((*typeclass).Sym == NIM_NIL))) goto LA21;
		owner = (*typeclass).Sym;
	}
	goto LA19;
	LA21: ;
	{
		owner = getcurrowner_291255();
	}
	LA19: ;
	s = newsym_227074(((NU8) 7), finaltypid, owner, (*HEX3Aenvp_502469).Info501298);
	{
		if (!(typid == NIM_NIL)) goto LA26;
		(*s).Flags |= ((NI32)1)<<((((NU8) 29))%(sizeof(NI32)*8));
	}
	LA26: ;
	LOC28 = 0;
	LOC28 = linkto_227825(s, typeclass);
	(*typeclass).Flags |= ((NI32)1)<<((((NU8) 24))%(sizeof(NI32)*8));
	(*s).Position = len_227364((*HEX3Aenvp_502469).Genericparams501295);
	LOC29 = 0;
	LOC29 = newsymnode_227132(s);
	addson_227287((*HEX3Aenvp_502469).Genericparams501295, LOC29);
	result = typeclass;
	adddecl_296694((*HEX3Aenvp_502469).C501293, s);
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, liftparamtype_501291)(tcontext291021* c, NU8 prockind, tnode226816* genericparams, ttype226852* paramtype, NimStringDesc* paramname, tlineinfo196539 info, NIM_BOOL anon) {
	ttype226852* result;
	TY502454* HEX3Aenv_502511;
	NimStringDesc* LOC1;
	tident201021* paramtypid;
	result = 0;
	HEX3Aenv_502511 = 0;
	HEX3Aenv_502511 = (TY502454*) newObj((&NTI502512), sizeof(TY502454));
	LOC1 = 0;
	LOC1 = (*HEX3Aenv_502511).Paramname501297; (*HEX3Aenv_502511).Paramname501297 = copyStringRC1(paramname);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	asgnRefNoCycle((void**) (&(*HEX3Aenv_502511).Genericparams501295), genericparams);
	(*HEX3Aenv_502511).Info501298 = info;
	asgnRef((void**) (&(*HEX3Aenv_502511).C501293), 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):
	{
		TY501319 LOC14;
		ttype226852* LOC15;
		memset((void*)(&LOC14), 0, sizeof(LOC14));
		LOC14.ClPrc = addimplicitgenericimpl_501318; LOC14.ClEnv = HEX3Aenv_502511;
		LOC15 = 0;
		LOC15 = newtypes_291213(((NU8) 12), (*HEX3Aenv_502511).C501293);
		result = LOC14.ClEnv? LOC14.ClPrc(LOC15, paramtypid, LOC14.ClEnv):((TMP3029)(LOC14.ClPrc))(LOC15, paramtypid);
	}
	break;
	case ((NU8) 59):
	{
		ttype226852* base;
		ttype226852* lifted_501547;
		ttype226852* LOC25;
		TY501319 LOC37;
		ttypeseq226848* LOC38;
		TY412748 LOC39;
		ttype226852* 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_264038(paramtype);
		lifted_501547 = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, LOC25, (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, NIM_FALSE);
		{
			if (!!((lifted_501547 == NIM_NIL))) goto LA28;
			base = lifted_501547;
		}
		goto LA26;
		LA28: ;
		{
			base = base_264038(paramtype);
		}
		LA26: ;
		{
			NIM_BOOL LOC33;
			LOC33 = 0;
			LOC33 = ismetatype_227752(base);
			if (!(LOC33)) goto LA34;
			LOC33 = (prockind == ((NU8) 17));
			LA34: ;
			if (!LOC33) goto LA35;
			localerror_198955((*HEX3Aenv_502511).Info501298, ((NU16) 201), (*HEX3Aenv_502511).Paramname501297);
		}
		LA35: ;
		memset((void*)(&LOC37), 0, sizeof(LOC37));
		LOC37.ClPrc = addimplicitgenericimpl_501318; LOC37.ClEnv = HEX3Aenv_502511;
		LOC38 = 0;
		LOC38 = (ttypeseq226848*) newSeq((&NTI226848), 1);
		memset((void*)LOC39, 0, sizeof(LOC39));
		LOC39[0] = base;
		asgnRefNoCycle((void**) (&LOC38->data[0]), LOC39[0]);
		LOC40 = 0;
		LOC40 = newtypewithsons_291822((*HEX3Aenv_502511).C501293, ((NU8) 59), LOC38);
		result = LOC37.ClEnv? LOC37.ClPrc(LOC40, paramtypid, LOC37.ClEnv):((TMP3030)(LOC37.ClPrc))(LOC40, paramtypid);
		(*result).Flags = ((*result).Flags | 4194816);
	}
	break;
	case ((NU8) 8):
	{
		{
			TY501319 LOC55;
			ttypeseq226848* LOC56;
			TY412748 LOC57;
			ttype226852* LOC58;
			if (!!((((*paramtype).Flags &(1<<((((NU8) 9))&31)))!=0))) goto LA44;
			{
				NIM_BOOL LOC48;
				NIM_BOOL LOC49;
				ttype226852* LOC50;
				LOC48 = 0;
				LOC49 = 0;
				LOC50 = 0;
				LOC50 = base_264038(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_501285).Sup.Id);
				LA52: ;
				if (!LOC48) goto LA53;
				paramtypid = NIM_NIL;
			}
			LA53: ;
			memset((void*)(&LOC55), 0, sizeof(LOC55));
			LOC55.ClPrc = addimplicitgenericimpl_501318; LOC55.ClEnv = HEX3Aenv_502511;
			LOC56 = 0;
			LOC56 = (ttypeseq226848*) newSeq((&NTI226848), 1);
			memset((void*)LOC57, 0, sizeof(LOC57));
			LOC57[0] = base_264038(paramtype);
			asgnRefNoCycle((void**) (&LOC56->data[0]), LOC57[0]);
			LOC58 = 0;
			LOC58 = newtypewithsons_291822((*HEX3Aenv_502511).C501293, ((NU8) 8), LOC56);
			result = LOC55.ClEnv? LOC55.ClPrc(LOC58, paramtypid, LOC55.ClEnv):((TMP3031)(LOC55.ClPrc))(LOC58, paramtypid);
		}
		LA44: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			NI LOC62;
			LOC62 = 0;
			LOC62 = sonslen_227255(paramtype);
			if (!(LOC62 == 1)) goto LA63;
			result = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, (*paramtype).Sons->data[0], (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, 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;
			ttype226852* LOC70;
			ttype226852* typ;
			ttypeseq226848* LOC73;
			TY412748 LOC74;
			TY501319 LOC75;
			LOC68 = 0;
			LOC68 = ((*paramtype).Kind == ((NU8) 24));
			if (!(LOC68)) goto LA69;
			LOC70 = 0;
			LOC70 = lastson_227267(paramtype);
			LOC68 = ((*LOC70).Kind == ((NU8) 0));
			LA69: ;
			if (!LOC68) goto LA71;
			LOC73 = 0;
			LOC73 = (ttypeseq226848*) newSeq((&NTI226848), 1);
			memset((void*)LOC74, 0, sizeof(LOC74));
			LOC74[0] = newtypes_291213((*paramtype).Kind, (*HEX3Aenv_502511).C501293);
			asgnRefNoCycle((void**) (&LOC73->data[0]), LOC74[0]);
			typ = newtypewithsons_291822((*HEX3Aenv_502511).C501293, ((NU8) 51), LOC73);
			memset((void*)(&LOC75), 0, sizeof(LOC75));
			LOC75.ClPrc = addimplicitgenericimpl_501318; LOC75.ClEnv = HEX3Aenv_502511;
			result = LOC75.ClEnv? LOC75.ClPrc(typ, paramtypid, LOC75.ClEnv):((TMP3032)(LOC75.ClPrc))(typ, paramtypid);
		}
		goto LA66;
		LA71: ;
		{
			{
				NI i_501740;
				NI HEX3Atmp_502431;
				NI res_502434;
				i_501740 = 0;
				HEX3Atmp_502431 = 0;
				HEX3Atmp_502431 = ((*paramtype).Sons->Sup.len - 1);
				res_502434 = 0;
				{
					while (1) {
						ttype226852* lifted;
						if (!(res_502434 <= HEX3Atmp_502431)) goto LA79;
						i_501740 = res_502434;
						lifted = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, (*paramtype).Sons->data[i_501740], (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, NIM_FALSE);
						{
							if (!!((lifted == NIM_NIL))) goto LA82;
							asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_501740]), lifted);
							result = paramtype;
						}
						LA82: ;
						res_502434 += 1;
					} LA79: ;
				}
			}
		}
		LA66: ;
	}
	break;
	case ((NU8) 10):
	{
		ttypeseq226848* LOC97;
		TY291918 LOC98;
		TY501319 LOC99;
		result = newtypes_291213(((NU8) 9), (*HEX3Aenv_502511).C501293);
		rawaddson_231562(result, paramtype);
		{
			NI i_501769;
			NI HEX3Atmp_502437;
			NI LOC86;
			NI res_502440;
			i_501769 = 0;
			HEX3Atmp_502437 = 0;
			LOC86 = 0;
			LOC86 = sonslen_227255(paramtype);
			HEX3Atmp_502437 = (NI64)(LOC86 - 2);
			res_502440 = 0;
			{
				while (1) {
					ttype226852* LOC89;
					if (!(res_502440 <= HEX3Atmp_502437)) goto LA88;
					i_501769 = res_502440;
					LOC89 = 0;
					LOC89 = newtypes_291213(((NU8) 58), (*HEX3Aenv_502511).C501293);
					rawaddson_231562(result, LOC89);
					res_502440 += 1;
				} LA88: ;
			}
		}
		{
			ttype226852* LOC92;
			ttype226852* LOC95;
			TY501319 LOC96;
			LOC92 = 0;
			LOC92 = lastson_227267(paramtype);
			if (!((*LOC92).Kind == ((NU8) 52))) goto LA93;
			(*result).Kind = ((NU8) 53);
			LOC95 = 0;
			LOC95 = lastson_227267(paramtype);
			rawaddson_231562(result, LOC95);
			memset((void*)(&LOC96), 0, sizeof(LOC96));
			LOC96.ClPrc = addimplicitgenericimpl_501318; LOC96.ClEnv = HEX3Aenv_502511;
			result = LOC96.ClEnv? LOC96.ClPrc(result, paramtypid, LOC96.ClEnv):((TMP3033)(LOC96.ClPrc))(result, paramtypid);
			goto BeforeRet;
		}
		LA93: ;
		result = instgenericcontainer_491657((*HEX3Aenv_502511).C501293, (*(*paramtype).Sym).Info, result, NIM_TRUE);
		LOC97 = 0;
		LOC97 = (ttypeseq226848*) newSeq((&NTI226848), 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_291822((*HEX3Aenv_502511).C501293, ((NU8) 54), LOC97);
		memset((void*)(&LOC99), 0, sizeof(LOC99));
		LOC99.ClPrc = addimplicitgenericimpl_501318; LOC99.ClEnv = HEX3Aenv_502511;
		result = LOC99.ClEnv? LOC99.ClPrc(result, paramtypid, LOC99.ClEnv):((TMP3034)(LOC99.ClPrc))(result, paramtypid);
	}
	break;
	case ((NU8) 49):
	{
		{
			TY501319 LOC119;
			if (!((*paramtype).Callconv == ((NU8) 5))) goto LA103;
			{
				if (!!(((409600 &(1<<((prockind)&31)))!=0))) goto LA107;
				localerror_198955((*HEX3Aenv_502511).Info501298, ((NU16) 203), ((NimStringDesc*) &TMP2890));
			}
			LA107: ;
			{
				NI LOC111;
				ttype226852* lifted;
				ttype226852* LOC114;
				LOC111 = 0;
				LOC111 = len_231005(paramtype);
				if (!(LOC111 == 1)) goto LA112;
				LOC114 = 0;
				LOC114 = base_264038(paramtype);
				lifted = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, LOC114, (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, 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_501318; LOC119.ClEnv = HEX3Aenv_502511;
			result = LOC119.ClEnv? LOC119.ClPrc(paramtype, paramtypid, LOC119.ClEnv):((TMP3035)(LOC119.ClPrc))(paramtype, paramtypid);
		}
		LA103: ;
	}
	break;
	case ((NU8) 11):
	{
		ttype226852* liftbody;
		ttype226852* LOC141;
		{
			ttype226852* LOC123;
			ttype226852* cp;
			tsym226846* LOC126;
			TY501319 LOC127;
			LOC123 = 0;
			LOC123 = lastson_227267(paramtype);
			if (!((*LOC123).Kind == ((NU8) 52))) goto LA124;
			LOC126 = 0;
			LOC126 = getcurrowner_291255();
			cp = copytype_227195(paramtype, LOC126, NIM_FALSE);
			(*cp).Kind = ((NU8) 53);
			memset((void*)(&LOC127), 0, sizeof(LOC127));
			LOC127.ClPrc = addimplicitgenericimpl_501318; LOC127.ClEnv = HEX3Aenv_502511;
			result = LOC127.ClEnv? LOC127.ClPrc(cp, paramtypid, LOC127.ClEnv):((TMP3036)(LOC127.ClPrc))(cp, paramtypid);
			goto BeforeRet;
		}
		LA124: ;
		{
			NI i_501869;
			NI HEX3Atmp_502443;
			NI res_502446;
			i_501869 = 0;
			HEX3Atmp_502443 = 0;
			HEX3Atmp_502443 = (NI64)((*paramtype).Sons->Sup.len - 2);
			res_502446 = 1;
			{
				while (1) {
					ttype226852* lifted;
					if (!(res_502446 <= HEX3Atmp_502443)) goto LA130;
					i_501869 = res_502446;
					lifted = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, (*paramtype).Sons->data[i_501869], (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, NIM_FALSE);
					{
						if (!!((lifted == NIM_NIL))) goto LA133;
						asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_501869]), lifted);
						result = paramtype;
						{
							ttype226852* LOC137;
							NimStringDesc* LOC140;
							LOC137 = 0;
							LOC137 = lastson_227267(result);
							if (!!((((*LOC137).Flags &(1<<((((NU8) 19))&31)))!=0))) goto LA138;
							LOC140 = 0;
							LOC140 = HEX24_199126(TMP3037);
							internalerror_199006(LOC140);
						}
						LA138: ;
					}
					LA133: ;
					res_502446 += 1;
				} LA130: ;
			}
		}
		LOC141 = 0;
		LOC141 = lastson_227267(paramtype);
		liftbody = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, LOC141, (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, 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_199126(TMP3037);
				internalerror_199006(LOC150);
			}
			LA148: ;
		}
		LA144: ;
	}
	break;
	case ((NU8) 9):
	{
		{
			NI i_501993;
			NI HEX3Atmp_502449;
			NI LOC153;
			NI res_502452;
			i_501993 = 0;
			HEX3Atmp_502449 = 0;
			LOC153 = 0;
			LOC153 = sonslen_227255(paramtype);
			HEX3Atmp_502449 = (LOC153 - 1);
			res_502452 = 1;
			{
				while (1) {
					ttype226852* lifted;
					if (!(res_502452 <= HEX3Atmp_502449)) goto LA155;
					i_501993 = res_502452;
					lifted = liftparamtype_501291((*HEX3Aenv_502511).C501293, prockind, (*HEX3Aenv_502511).Genericparams501295, (*paramtype).Sons->data[i_501993], (*HEX3Aenv_502511).Paramname501297, (*HEX3Aenv_502511).Info501298, NIM_FALSE);
					{
						if (!!((lifted == NIM_NIL))) goto LA158;
						asgnRefNoCycle((void**) (&(*paramtype).Sons->data[i_501993]), lifted);
					}
					LA158: ;
					res_502452 += 1;
				} LA155: ;
			}
		}
	}
	break;
	case ((NU8) 52):
	case ((NU8) 51):
	case ((NU8) 55):
	case ((NU8) 56):
	case ((NU8) 57):
	{
		TY501319 LOC161;
		tsym226846* LOC162;
		ttype226852* LOC163;
		memset((void*)(&LOC161), 0, sizeof(LOC161));
		LOC161.ClPrc = addimplicitgenericimpl_501318; LOC161.ClEnv = HEX3Aenv_502511;
		LOC162 = 0;
		LOC162 = getcurrowner_291255();
		LOC163 = 0;
		LOC163 = copytype_227195(paramtype, LOC162, NIM_TRUE);
		result = LOC161.ClEnv? LOC161.ClPrc(LOC163, paramtypid, LOC161.ClEnv):((TMP3038)(LOC161.ClPrc))(LOC163, paramtypid);
	}
	break;
	case ((NU8) 6):
	{
		{
			TY501319 LOC169;
			ttype226852* LOC170;
			if (!!(((393216 &(1<<((prockind)&31)))!=0))) goto LA167;
			memset((void*)(&LOC169), 0, sizeof(LOC169));
			LOC169.ClPrc = addimplicitgenericimpl_501318; LOC169.ClEnv = HEX3Aenv_502511;
			LOC170 = 0;
			LOC170 = newtypes_291213(((NU8) 58), (*HEX3Aenv_502511).C501293);
			result = LOC169.ClEnv? LOC169.ClPrc(LOC170, paramtypid, LOC169.ClEnv):((TMP3039)(LOC169.ClPrc))(LOC170, paramtypid);
		}
		LA167: ;
	}
	break;
	case ((NU8) 12):
	{
		markused_406251((*HEX3Aenv_502511).Info501298, (*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(ttype226852*, semproctypenode_502546)(tcontext291021* c, tnode226816* n, tnode226816* genericparams, ttype226852* prev, NU8 kind, NIM_BOOL istype) {
	ttype226852* result;
	tnode226816* res;
	intset223056 cl;
	toptionentry291005* LOC1;
	intset223056 check;
	NI counter;
	ttype226852* r;
	result = 0;
	res = 0;
	memset((void*)(&cl), 0, sizeof(cl));
	checkminsonslen_292425(n, 1);
	result = neworprevtype_496130(((NU8) 25), prev, c);
	LOC1 = 0;
	LOC1 = lastoptionentry_291175(c);
	(*result).Callconv = (*LOC1).Defaultcc;
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 76), (*n).Info));
	{
		NIM_BOOL LOC4;
		NI LOC6;
		LOC4 = 0;
		LOC4 = !((genericparams == NIM_NIL));
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = sonslen_227249(genericparams);
		LOC4 = (LOC6 == 0);
		LA5: ;
		if (!LOC4) goto LA7;
		chckNil((void*)(&cl));
		memset((void*)(&cl), 0, sizeof(cl));
		initintset_223950((&cl));
	}
	LA7: ;
	rawaddson_231562(result, NIM_NIL);
	res = newnodei_227138(((NU8) 151), (*n).Info);
	addson_227287((*result).N, res);
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_223950((&check));
	counter = 0;
	{
		NI i_502588;
		NI HEX3Atmp_503291;
		NI LOC10;
		NI res_503294;
		i_502588 = 0;
		HEX3Atmp_503291 = 0;
		LOC10 = 0;
		LOC10 = len_227364(n);
		HEX3Atmp_503291 = (NI64)(LOC10 - 1);
		res_503294 = 1;
		{
			while (1) {
				if (!(res_503294 <= HEX3Atmp_503291)) goto LA12;
				i_502588 = res_503294;
				{
					tnode226816* a;
					ttype226852* typ;
					tnode226816* def;
					tnode226816* constraint;
					NI length;
					NIM_BOOL hastype;
					NIM_BOOL hasdefault;
					a = (*n).kindU.S6.Sons->data[i_502588];
					{
						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_292405(a);
					}
					LA16: ;
					checkminsonslen_292425(a, 3);
					typ = NIM_NIL;
					def = NIM_NIL;
					constraint = NIM_NIL;
					length = sonslen_227249(a);
					hastype = !(((*(*a).kindU.S6.Sons->data[(NI64)(length - 2)]).Kind == ((NU8) 1)));
					hasdefault = !(((*(*a).kindU.S6.Sons->data[(NI64)(length - 1)]).Kind == ((NU8) 1)));
					{
						if (!hastype) goto LA26;
						typ = semparamtype_502513(c, (*a).kindU.S6.Sons->data[(NI64)(length - 2)], &constraint);
					}
					LA26: ;
					{
						if (!hasdefault) goto LA30;
						def = semexprwithtype_488211(c, (*a).kindU.S6.Sons->data[(NI64)(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_273929(typ);
								if (!!(LOC41)) goto LA42;
								def = fitnode_488245(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_198966((*a).Info, ((NimStringDesc*) &TMP3025));
						}
						LA52: ;
						{
							if (!((393216 &(1<<((kind)&31)))!=0)) goto LA56;
							tdef = ((NU8) 6);
						}
						goto LA54;
						LA56: ;
						{
							tdef = ((NU8) 58);
						}
						LA54: ;
						typ = newtypes_291213(tdef, c);
					}
					LA48: ;
					{
						ttype226852* LOC61;
						LOC61 = 0;
						LOC61 = skiptypes_231245(typ, 2048);
						if (!((*LOC61).Kind == ((NU8) 3))) goto LA62;
						goto LA13;
					}
					LA62: ;
					{
						NI j_502801;
						NI HEX3Atmp_503286;
						NI res_503289;
						j_502801 = 0;
						HEX3Atmp_503286 = 0;
						HEX3Atmp_503286 = (NI64)(length - 3);
						res_503289 = 0;
						{
							while (1) {
								tsym226846* arg;
								ttype226852* lifted;
								ttype226852* finaltype;
								tnode226816* LOC83;
								if (!(res_503289 <= HEX3Atmp_503286)) goto LA66;
								j_502801 = res_503289;
								arg = newsymg_488930(((NU8) 3), (*a).kindU.S6.Sons->data[j_502801], c);
								lifted = liftparamtype_501291(c, kind, genericparams, typ, (*(*arg).Name).S, (*arg).Info, NIM_FALSE);
								{
									if (!!((lifted == NIM_NIL))) goto LA69;
									finaltype = lifted;
								}
								goto LA67;
								LA69: ;
								{
									finaltype = skipintlit_283533(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_227329(def));
								}
								LA76: ;
								{
									NIM_BOOL LOC80;
									LOC80 = 0;
									LOC80 = containsorincl_223916((&check), (*(*arg).Name).Sup.Id);
									if (!LOC80) goto LA81;
									localerror_198955((*(*a).kindU.S6.Sons->data[j_502801]).Info, ((NU16) 40), (*(*arg).Name).S);
								}
								LA81: ;
								LOC83 = 0;
								LOC83 = newsymnode_227132(arg);
								addson_227287((*result).N, LOC83);
								rawaddson_231562(result, finaltype);
								addparamorresult_491371(c, arg, kind);
								{
									if (!(gcmd_170120 == ((NU8) 7))) goto LA86;
								}
								LA86: ;
								res_503289 += 1;
							} LA66: ;
						}
					}
				} LA13: ;
				res_503294 += 1;
			} LA12: ;
		}
	}
	r = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA90;
		r = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	}
	goto LA88;
	LA90: ;
	{
		if (!(kind == ((NU8) 14))) goto LA93;
		r = newtypes_291213(((NU8) 58), c);
	}
	goto LA88;
	LA93: ;
	LA88: ;
	{
		if (!!((r == NIM_NIL))) goto LA97;
		{
			ttype226852* LOC101;
			LOC101 = 0;
			LOC101 = skiptypes_231245(r, 2048);
			if (!!(((*LOC101).Kind == ((NU8) 3)))) goto LA102;
			{
				if (!!(((*r).Kind == ((NU8) 6)))) goto LA106;
				{
					NIM_BOOL LOC110;
					ttype226852* 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_501291(c, kind, genericparams, r, ((NimStringDesc*) &TMP2913), (*(*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_283533(r);
				{
					if (!(kind == ((NU8) 14))) goto LA120;
					{
						NIM_BOOL LOC124;
						ttypeseq226848* LOC127;
						TY412748 LOC128;
						LOC124 = 0;
						LOC124 = isinlineiterator_412610(r);
						if (!!(LOC124)) goto LA125;
						LOC127 = 0;
						LOC127 = (ttypeseq226848*) newSeq((&NTI226848), 1);
						memset((void*)LOC128, 0, sizeof(LOC128));
						LOC128[0] = r;
						asgnRefNoCycle((void**) (&LOC127->data[0]), LOC128[0]);
						r = newtypewithsons_291822(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;
		{
			tnode226816* n_503206;
			n_503206 = 0;
			{
				NI i_503301;
				NI HEX3Atmp_503303;
				NI LOC135;
				NI res_503305;
				i_503301 = 0;
				HEX3Atmp_503303 = 0;
				LOC135 = 0;
				LOC135 = len_227364(genericparams);
				HEX3Atmp_503303 = (LOC135 - 1);
				res_503305 = 0;
				{
					while (1) {
						if (!(res_503305 <= HEX3Atmp_503303)) goto LA137;
						i_503301 = res_503305;
						n_503206 = (*genericparams).kindU.S6.Sons->data[i_503301];
						{
							if (!(((*(*(*n_503206).kindU.S4.Sym).Typ).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA140;
							(*(*n_503206).kindU.S4.Sym).Kind = ((NU8) 7);
							(*(*(*n_503206).kindU.S4.Sym).Typ).Flags &= ~(((NI32)1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
						}
						LA140: ;
						res_503305 += 1;
					} LA137: ;
				}
			}
		}
	}
	LA131: ;
	return result;
}

N_NIMCALL(void, semparamlist_488284)(tcontext291021* c, tnode226816* n, tnode226816* genericparams, tsym226846* s) {
	asgnRefNoCycle((void**) (&(*s).Typ), semproctypenode_502546(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_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3040));
		}
		LA9: ;
	}
	LA3: ;
}

N_NIMCALL(tnode226816*, newparam_509940)(templctx505840* c, tnode226816* n, tsym226846* s) {
	tnode226816* result;
	tsym226846* x;
	result = 0;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
	x = (*(*(*(*(*c).Owner).Typ).N).kindU.S6.Sons->data[(NI64)((*s).Position + 1)]).kindU.S4.Sym;
	result = newsymnode_228754(x, (*n).Info);
	return result;
}

N_NIMCALL(tnode226816*, handlesym_510201)(templctx505840* c, tnode226816* n, tsym226846* s) {
	tnode226816* 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_509940(c, n, s);
		}
		goto LA5;
		LA9: ;
		{
			NIM_BOOL LOC12;
			LOC12 = 0;
			LOC12 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
			if (!LOC12) goto LA13;
			result = symchoice_505476((*c).C, n, s, ((NU8) 0));
		}
		goto LA5;
		LA13: ;
		{
			NIM_BOOL LOC16;
			NIM_BOOL LOC18;
			NI LOC19;
			tnode226816* LOC23;
			LOC16 = 0;
			LOC16 = ((*s).Kind == ((NU8) 18));
			if (!(LOC16)) goto LA17;
			LOC18 = 0;
			LOC19 = 0;
			LOC19 = len_231005((*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_489055((*c).C, n, s, 256);
			result = sempatternbody_509926(c, LOC23);
		}
		goto LA5;
		LA21: ;
		{
		}
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, sembindstmt_505600)(tcontext291021* c, tnode226816* n, intset223056* tobind) {
	tnode226816* result;
	result = 0;
	{
		NI i_505628;
		NI HEX3Atmp_505711;
		NI LOC2;
		NI res_505714;
		i_505628 = 0;
		HEX3Atmp_505711 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_505711 = (LOC2 - 1);
		res_505714 = 0;
		{
			while (1) {
				tnode226816* a;
				tsym226846* s;
				if (!(res_505714 <= HEX3Atmp_505711)) goto LA4;
				i_505628 = res_505714;
				a = (*n).kindU.S6.Sons->data[i_505628];
				s = qualifiedlookup_297122(c, a, 2);
				{
					tnode226816* sc;
					if (!!((s == NIM_NIL))) goto LA7;
					sc = symchoice_505476(c, n, s, ((NU8) 0));
					{
						if (!((*sc).Kind == ((NU8) 3))) goto LA11;
						incl_223869(tobind, (*(*sc).kindU.S4.Sym).Sup.Id);
					}
					goto LA9;
					LA11: ;
					{
						{
							tnode226816* x_505686;
							x_505686 = 0;
							{
								NI i_505706;
								NI HEX3Atmp_505708;
								NI LOC16;
								NI res_505710;
								i_505706 = 0;
								HEX3Atmp_505708 = 0;
								LOC16 = 0;
								LOC16 = len_227364(sc);
								HEX3Atmp_505708 = (LOC16 - 1);
								res_505710 = 0;
								{
									while (1) {
										if (!(res_505710 <= HEX3Atmp_505708)) goto LA18;
										i_505706 = res_505710;
										x_505686 = (*sc).kindU.S6.Sons->data[i_505706];
										incl_223869(tobind, (*(*x_505686).kindU.S4.Sym).Sup.Id);
										res_505710 += 1;
									} LA18: ;
								}
							}
						}
					}
					LA9: ;
				}
				goto LA5;
				LA7: ;
				{
					illformedast_292405(a);
				}
				LA5: ;
				res_505714 += 1;
			} LA4: ;
		}
	}
	result = newnodei_227138(((NU8) 1), (*n).Info);
	return result;
}

N_NIMCALL(tnode226816*, expectparam_510273)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* s;
	result = 0;
	s = qualifiedlookup_297122((*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_509940(c, n, s);
	}
	goto LA1;
	LA7: ;
	{
		localerror_198955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2890));
		result = n;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, sempatternbody_509926)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym226846* s;
		s = qualifiedlookup_297122((*c).C, n, 0);
		result = handlesym_510201(c, n, s);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_505600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 40):
	{
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = len_227364(n);
			if (!!((LOC7 == 2))) goto LA8;
			localerror_198955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2890));
		}
		goto LA5;
		LA8: ;
		{
			if (!((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 2))) goto LA11;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[0]));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), expectparam_510273(c, (*n).kindU.S6.Sons->data[1]));
		}
		goto LA5;
		LA11: ;
		{
			NIM_BOOL LOC14;
			tnode226816* 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*) &TMP2892))) goto LA20;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[0]));
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[1]), expectparam_510273(c, (*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[1]));
			}
			goto LA18;
			LA20: ;
			{
				localerror_198955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2890));
			}
			LA18: ;
		}
		goto LA5;
		LA16: ;
		{
			localerror_198955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2890));
		}
		LA5: ;
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	case ((NU8) 32):
	{
		tsym226846* s;
		s = qualifiedlookup_297122((*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_223837((&(*c).Tobind), (*s).Sup.Id);
				if (!LOC36) goto LA37;
			}
			goto LA29;
			LA37: ;
			{
				NIM_BOOL LOC40;
				NIM_BOOL LOC42;
				NI LOC43;
				tnode226816* LOC47;
				LOC40 = 0;
				LOC40 = ((*s).Kind == ((NU8) 18));
				if (!(LOC40)) goto LA41;
				LOC42 = 0;
				LOC43 = 0;
				LOC43 = len_231005((*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_489055((*c).C, n, s, 256);
				result = sempatternbody_509926(c, LOC47);
				goto BeforeRet;
			}
			goto LA29;
			LA45: ;
			LA29: ;
		}
		LA27: ;
		{
			NIM_BOOL LOC50;
			tnode226816* 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*) &TMP3041));
				if (LOC56) goto LA57;
				LOC56 = eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP3042));
				LA57: ;
				if (!LOC56) goto LA58;
				LOC60 = 0;
				LOC60 = len_227364(n);
				result = newnodei_229007(((NU8) 152), (*n).Info, LOC60);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[1]));
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), expectparam_510273(c, (*n).kindU.S6.Sons->data[2]));
				goto BeforeRet;
			}
			goto LA54;
			LA58: ;
			{
				NI LOC64;
				if (!eqStrings((*(*opr).kindU.S5.Ident).S, ((NimStringDesc*) &TMP2892))) goto LA62;
				LOC64 = 0;
				LOC64 = len_227364(n);
				result = newnodei_229007(((NU8) 152), (*n).Info, LOC64);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[1]));
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[2]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[2]));
				goto BeforeRet;
			}
			goto LA54;
			LA62: ;
			LA54: ;
		}
		LA52: ;
		{
			NIM_BOOL LOC67;
			tnode226816* 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*) &TMP3043))) goto LA73;
				LOC75 = 0;
				LOC75 = len_227364(n);
				result = newnodei_229007(((NU8) 152), (*n).Info, LOC75);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), opr);
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[1]));
				goto BeforeRet;
			}
			LA73: ;
		}
		LA69: ;
		{
			NI i_511020;
			NI HEX3Atmp_511125;
			NI LOC77;
			NI res_511128;
			i_511020 = 0;
			HEX3Atmp_511125 = 0;
			LOC77 = 0;
			LOC77 = sonslen_227249(n);
			HEX3Atmp_511125 = (NI64)(LOC77 - 1);
			res_511128 = 0;
			{
				while (1) {
					if (!(res_511128 <= HEX3Atmp_511125)) goto LA79;
					i_511020 = res_511128;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_511020]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[i_511020]));
					res_511128 += 1;
				} LA79: ;
			}
		}
	}
	break;
	default:
	{
		switch ((*n).Kind) {
		case ((NU8) 45):
		case ((NU8) 53):
		{
			tsym226846* s;
			s = qualifiedlookup_297122((*c).C, n, 0);
			{
				if (!!((s == NIM_NIL))) goto LA84;
				{
					NIM_BOOL LOC88;
					LOC88 = 0;
					LOC88 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
					if (!LOC88) goto LA89;
					result = symchoice_505476((*c).C, n, s, ((NU8) 0));
					goto BeforeRet;
				}
				goto LA86;
				LA89: ;
				{
					result = newidentnode_227125((*s).Name, (*n).Info);
					goto BeforeRet;
				}
				LA86: ;
			}
			LA84: ;
		}
		break;
		case ((NU8) 37):
		{
			{
				NI LOC95;
				LOC95 = 0;
				LOC95 = len_227364(n);
				if (!(LOC95 == 1)) goto LA96;
				result = sempatternbody_509926(c, (*n).kindU.S6.Sons->data[0]);
				goto BeforeRet;
			}
			LA96: ;
		}
		break;
		default:
		{
		}
		break;
		}
		{
			NI i_511095;
			NI HEX3Atmp_511131;
			NI LOC100;
			NI res_511134;
			i_511095 = 0;
			HEX3Atmp_511131 = 0;
			LOC100 = 0;
			LOC100 = sonslen_227249(n);
			HEX3Atmp_511131 = (NI64)(LOC100 - 1);
			res_511134 = 0;
			{
				while (1) {
					if (!(res_511134 <= HEX3Atmp_511131)) goto LA102;
					i_511095 = res_511134;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_511095]), sempatternbody_509926(c, (*n).kindU.S6.Sons->data[i_511095]));
					res_511134 += 1;
				} LA102: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, sempattern_507110)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	templctx505840 ctx;
	tnode226816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	memset((void*)(&ctx), 0, sizeof(ctx));
	initintset_223950((&ctx.Tobind));
	initintset_223950((&ctx.Tomixin));
	initintset_223950((&ctx.Toinject));
	ctx.C = c;
	ctx.Owner = getcurrowner_291255();
	LOC2 = 0;
	LOC2 = sempatternbody_509926((&ctx), n);
	result = flattenstmts_263416(LOC2);
	{
		if (!((*result).Kind == ((NU8) 115) || (*result).Kind == ((NU8) 126))) goto LA5;
		{
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_227364(result);
			if (!(LOC9 == 1)) goto LA10;
			result = (*result).kindU.S6.Sons->data[0];
		}
		goto LA7;
		LA10: ;
		{
			NI LOC13;
			LOC13 = 0;
			LOC13 = len_227364(result);
			if (!(LOC13 == 0)) goto LA14;
			localerror_198955((*n).Info, ((NU16) 167), ((NimStringDesc*) &TMP2890));
		}
		goto LA7;
		LA14: ;
		LA7: ;
	}
	LA5: ;
	closescope_296211(c);
	return result;
}

N_NIMCALL(void, addgenericparamlisttoscope_523747)(tcontext291021* c, tnode226816* n) {
	{
		if (!!(((*n).Kind == ((NU8) 75)))) goto LA3;
		illformedast_292405(n);
	}
	LA3: ;
	{
		NI i_523772;
		NI HEX3Atmp_523812;
		NI LOC6;
		NI res_523815;
		i_523772 = 0;
		HEX3Atmp_523812 = 0;
		LOC6 = 0;
		LOC6 = sonslen_227249(n);
		HEX3Atmp_523812 = (NI64)(LOC6 - 1);
		res_523815 = 0;
		{
			while (1) {
				tnode226816* a;
				if (!(res_523815 <= HEX3Atmp_523812)) goto LA8;
				i_523772 = res_523815;
				a = (*n).kindU.S6.Sons->data[i_523772];
				{
					if (!((*a).Kind == ((NU8) 3))) goto LA11;
					adddecl_296694(c, (*a).kindU.S4.Sym);
				}
				goto LA9;
				LA11: ;
				{
					illformedast_292405(a);
				}
				LA9: ;
				res_523815 += 1;
			} LA8: ;
		}
	}
}

N_NIMCALL(void, addparams_488293)(tcontext291021* c, tnode226816* n, NU8 kind) {
	{
		NI i_524965;
		NI HEX3Atmp_525018;
		NI LOC2;
		NI res_525021;
		i_524965 = 0;
		HEX3Atmp_525018 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_525018 = (NI64)(LOC2 - 1);
		res_525021 = 1;
		{
			while (1) {
				if (!(res_525021 <= HEX3Atmp_525018)) goto LA4;
				i_524965 = res_525021;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_524965]).Kind == ((NU8) 3))) goto LA7;
					addparamorresult_491371(c, (*(*n).kindU.S6.Sons->data[i_524965]).kindU.S4.Sym, kind);
				}
				goto LA5;
				LA7: ;
				{
					illformedast_292405(n);
				}
				LA5: ;
				res_525021 += 1;
			} LA4: ;
		}
	}
}

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

static N_INLINE(NI, find_517617)(tsym226846** a_517622, NI a_517622Len0, tsym226846* item_517624) {
	NI result;
	result = 0;
	{
		tsym226846* i_517668;
		NI i_517700;
		i_517668 = 0;
		i_517700 = 0;
		{
			while (1) {
				if (!(i_517700 < a_517622Len0)) goto LA3;
				i_517668 = a_517622[i_517700];
				{
					if (!(i_517668 == item_517624)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				result += 1;
				i_517700 += 1;
			} LA3: ;
		}
	}
	result = -1;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, contains_517605)(tsym226846** a_517611, NI a_517611Len0, tsym226846* item_517614) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = find_517617(a_517611, a_517611Len0, item_517614);
	result = (0 <= LOC1);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(slice84178, HEX2EHEX2E_92299)(NI a_92303, NI b_92305) {
	slice84178 result;
	memset((void*)(&result), 0, sizeof(result));
	result.A = a_92303;
	result.B = b_92305;
	return result;
}

N_NIMCALL(tnode226816*, destroycase_517056)(tcontext291021* c, tnode226816* n, tnode226816* holder) {
	tnode226816* result;
	NI nontrivialfields;
	tnodeseq226810* LOC1;
	tnodeseq226810* LOC2;
	TY292286 LOC3;
	tnode226816* LOC4;
	result = 0;
	nontrivialfields = 0;
	LOC1 = 0;
	LOC1 = (tnodeseq226810*) newSeq((&NTI226810), 0);
	result = newnode_229207(((NU8) 97), (*n).Info, LOC1, NIM_NIL);
	LOC2 = 0;
	LOC2 = (tnodeseq226810*) newSeq((&NTI226810), 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_229207(((NU8) 45), (*n).Info, LOC2, NIM_NIL);
	addson_227287(result, LOC4);
	{
		NI i_517127;
		NI HEX3Atmp_517302;
		NI LOC6;
		NI res_517305;
		i_517127 = 0;
		HEX3Atmp_517302 = 0;
		LOC6 = 0;
		LOC6 = len_227364(n);
		HEX3Atmp_517302 = (NI64)(LOC6 - 1);
		res_517305 = 1;
		{
			while (1) {
				tnode226816* casebranch;
				tnode226816* LOC9;
				tnode226816* LOC10;
				tnode226816* LOC11;
				slice84178 LOC12;
				tnodeseq226810* LOC13;
				tnode226816* stmt;
				tnode226816* LOC14;
				tnode226816* LOC15;
				if (!(res_517305 <= HEX3Atmp_517302)) goto LA8;
				i_517127 = res_517305;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_227698(n, i_517127);
				LOC10 = 0;
				LOC10 = HEX5BHEX5D_227698(n, i_517127);
				LOC11 = 0;
				LOC11 = HEX5BHEX5D_227698(n, i_517127);
				LOC12 = HEX2EHEX2E_92299(0, -2);
				LOC13 = 0;
				LOC13 = HEX5BHEX5D_517155((*LOC11).kindU.S6.Sons, LOC12);
				casebranch = newnode_229207((*LOC9).Kind, (*LOC10).Info, LOC13, NIM_NIL);
				LOC14 = 0;
				LOC14 = HEX5BHEX5D_227698(n, i_517127);
				LOC15 = 0;
				LOC15 = lastson_227261(LOC14);
				stmt = destroyfieldorfields_516988(c, LOC15, holder);
				{
					tnode226816* LOC20;
					tnodeseq226810* LOC21;
					tnode226816* LOC22;
					if (!(stmt == NIM_NIL)) goto LA18;
					LOC20 = 0;
					LOC20 = HEX5BHEX5D_227698(n, i_517127);
					LOC21 = 0;
					LOC21 = (tnodeseq226810*) newSeq((&NTI226810), 0);
					LOC22 = 0;
					LOC22 = newnode_229207(((NU8) 115), (*LOC20).Info, LOC21, NIM_NIL);
					addson_227287(casebranch, LOC22);
				}
				goto LA16;
				LA18: ;
				{
					NI LOC24;
					addson_227287(casebranch, stmt);
					LOC24 = 0;
					LOC24 = len_227364(stmt);
					nontrivialfields += LOC24;
				}
				LA16: ;
				addson_227287(result, casebranch);
				res_517305 += 1;
			} LA8: ;
		}
	}
	{
		if (!(nontrivialfields == 0)) goto LA27;
		result = NIM_NIL;
	}
	LA27: ;
	return result;
}

N_NIMCALL(tnode226816*, destroysym_516993)(tcontext291021* c, tsym226846* field, tnode226816* holder) {
	tnode226816* result;
	ttype226852* destructablet;
	result = 0;
	destructablet = instantiatedestructor_516765(c, (*field).Typ);
	{
		tnodeseq226810* LOC5;
		TY292286 LOC6;
		tnodeseq226810* LOC7;
		TY292286 LOC8;
		if (!!((destructablet == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = (tnodeseq226810*) newSeq((&NTI226810), 2);
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = usesym_422001((*destructablet).Destructor);
		LOC7 = 0;
		LOC7 = (tnodeseq226810*) newSeq((&NTI226810), 2);
		memset((void*)LOC8, 0, sizeof(LOC8));
		LOC8[0] = holder;
		LOC8[1] = usesym_422001(field);
		asgnRefNoCycle((void**) (&LOC7->data[0]), LOC8[0]);
		asgnRefNoCycle((void**) (&LOC7->data[1]), LOC8[1]);
		LOC6[1] = newnode_229207(((NU8) 45), (*field).Info, LOC7, NIM_NIL);
		asgnRefNoCycle((void**) (&LOC5->data[0]), LOC6[0]);
		asgnRefNoCycle((void**) (&LOC5->data[1]), LOC6[1]);
		result = newnode_229207(((NU8) 27), (*field).Info, LOC5, NIM_NIL);
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, destroyfieldorfields_516988)(tcontext291021* c, tnode226816* field, tnode226816* holder) {
	tnode226816* result;
	result = 0;
	switch ((*field).Kind) {
	case ((NU8) 138):
	{
		tnode226816* stmt_517332;
		stmt_517332 = destroycase_517056(c, field, holder);
		{
			if (!!((stmt_517332 == NIM_NIL))) goto LA4;
			{
				if (!(result == NIM_NIL)) goto LA8;
				result = newnode_227090(((NU8) 115));
			}
			LA8: ;
			addson_227287(result, stmt_517332);
		}
		LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		tnode226816* stmt_517368;
		stmt_517368 = destroysym_516993(c, (*field).kindU.S4.Sym, holder);
		{
			if (!!((stmt_517368 == NIM_NIL))) goto LA13;
			{
				if (!(result == NIM_NIL)) goto LA17;
				result = newnode_227090(((NU8) 115));
			}
			LA17: ;
			addson_227287(result, stmt_517368);
		}
		LA13: ;
	}
	break;
	case ((NU8) 137):
	{
		{
			tnode226816* son_517417;
			son_517417 = 0;
			{
				NI i_517465;
				NI HEX3Atmp_517467;
				NI LOC22;
				NI res_517469;
				i_517465 = 0;
				HEX3Atmp_517467 = 0;
				LOC22 = 0;
				LOC22 = len_227364(field);
				HEX3Atmp_517467 = (LOC22 - 1);
				res_517469 = 0;
				{
					while (1) {
						tnode226816* stmt_517419;
						if (!(res_517469 <= HEX3Atmp_517467)) goto LA24;
						i_517465 = res_517469;
						son_517417 = (*field).kindU.S6.Sons->data[i_517465];
						stmt_517419 = destroyfieldorfields_516988(c, son_517417, holder);
						{
							if (!!((stmt_517419 == NIM_NIL))) goto LA27;
							{
								if (!(result == NIM_NIL)) goto LA31;
								result = newnode_227090(((NU8) 115));
							}
							LA31: ;
							addson_227287(result, stmt_517419);
						}
						LA27: ;
						res_517469 += 1;
					} LA24: ;
				}
			}
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC38;
			if (!NIM_TRUE) goto LA36;
			LOC38 = 0;
			LOC38 = HEX24_199126(TMP3056);
			internalerror_199006(LOC38);
		}
		LA36: ;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, generatedestructor_517485)(tcontext291021* c, ttype226852* t) {
	tnode226816* result;
	tnode226816* destructedobj;
	tlineinfo196539 LOC12;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*t).N == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = HEX3DHEX3D_316667((*(*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_199126(TMP3054);
		internalerror_199006(LOC11);
	}
	LA9: ;
	LOC12 = unknownlineinfo_197405();
	destructedobj = newidentnode_227125(destructorparam_516762, LOC12);
	result = destroyfieldorfields_516988(c, (*t).N, destructedobj);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym226846*, symfromtype_489078)(ttype226852* t, tlineinfo196539 info) {
	tsym226846* result;
	tident201021* LOC5;
	result = 0;
	{
		if (!!(((*t).Sym == NIM_NIL))) goto LA3;
		result = (*t).Sym;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getident_201472(((NimStringDesc*) &TMP3058));
	result = newsym_227074(((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(tnode226816*, symnodefromtype_489122)(tcontext291021* c, ttype226852* t, tlineinfo196539 info) {
	tnode226816* result;
	tsym226846* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = symfromtype_489078(t, info);
	result = newsymnode_228754(LOC1, info);
	asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_291762(c, t));
	return result;
}

N_NIMCALL(tnode226816*, semproc_516723)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = semprocaux_526170(c, n, ((NU8) 12), TMP3059, ((NU8) 0));
	return result;
}

N_NIMCALL(ttype226852*, instantiatedestructor_516765)(tcontext291021* c, ttype226852* typ) {
	ttype226852* result;
	ttype226852* t;
	ttype226852* LOC1;
	ttype226852* typeholdinguserdefinition;
	result = 0;
	LOC1 = 0;
	LOC1 = skiptypes_231245(typ, IL64(211106232532992));
	t = skipgenericalias_270619(LOC1);
	{
		if (!((*t).Kind == ((NU8) 11))) goto LA4;
		typeholdinguserdefinition = base_264038(t);
	}
	goto LA2;
	LA4: ;
	{
		typeholdinguserdefinition = t;
	}
	LA2: ;
	{
		if (!!(((*typeholdinguserdefinition).Destructor == NIM_NIL))) goto LA9;
		{
			TY517716 LOC13;
			NIM_BOOL LOC14;
			memset((void*)LOC13, 0, sizeof(LOC13));
			LOC13[0] = analyzingdestructor_516727;
			LOC13[1] = destructoristrivial_516728;
			LOC14 = 0;
			LOC14 = contains_517605(LOC13, 2, (*typeholdinguserdefinition).Destructor);
			if (!!(LOC14)) goto LA15;
			result = typeholdinguserdefinition;
			goto BeforeRet;
		}
		goto LA11;
		LA15: ;
		{
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA11: ;
	}
	LA9: ;
	t = skiptypes_231245(t, 2048);
	switch ((*t).Kind) {
	case ((NU8) 24):
	case ((NU8) 16):
	case ((NU8) 4):
	case ((NU8) 27):
	case ((NU8) 48):
	{
		{
			ttype226852* LOC21;
			LOC21 = 0;
			LOC21 = instantiatedestructor_516765(c, (*t).Sons->data[0]);
			if (!!((LOC21 == NIM_NIL))) goto LA22;
			{
				tident201021* LOC28;
				if (!(rangedestructorproc_516764 == NIM_NIL)) goto LA26;
				LOC28 = 0;
				LOC28 = getident_201472(((NimStringDesc*) &TMP3053));
				asgnRefNoCycle((void**) (&rangedestructorproc_516764), searchinscopes_296312(c, LOC28));
			}
			LA26: ;
			asgnRefNoCycle((void**) (&(*t).Destructor), rangedestructorproc_516764);
			result = t;
			goto BeforeRet;
		}
		goto LA19;
		LA22: ;
		{
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA19: ;
	}
	break;
	case ((NU8) 18):
	case ((NU8) 17):
	{
		tnode226816* generated;
		asgnRefNoCycle((void**) (&(*t).Destructor), analyzingdestructor_516727);
		generated = generatedestructor_517485(c, t);
		{
			tlineinfo196539 i;
			tnode226816* fulldef;
			tnodeseq226810* LOC40;
			TY229474 LOC41;
			tnodeseq226810* LOC42;
			TY292286 LOC43;
			tnodeseq226810* LOC44;
			TY538311 LOC45;
			ttype226852* LOC46;
			tnodeseq226810* LOC47;
			TY247892 LOC48;
			tnode226816* semantizeddef;
			tnode226816* LOC49;
			if (!!((generated == NIM_NIL))) goto LA33;
			{
				NimStringDesc* LOC39;
				if (!!(!(((*t).Sym == NIM_NIL)))) goto LA37;
				LOC39 = 0;
				LOC39 = HEX24_199126(TMP3057);
				internalerror_199006(LOC39);
			}
			LA37: ;
			i = (*(*t).Sym).Info;
			LOC40 = 0;
			LOC40 = (tnodeseq226810*) newSeq((&NTI226810), 7);
			memset((void*)LOC41, 0, sizeof(LOC41));
			LOC41[0] = newidentnode_227125(destructorname_516761, i);
			LOC41[1] = emptynode_227738;
			LOC41[2] = emptynode_227738;
			LOC42 = 0;
			LOC42 = (tnodeseq226810*) newSeq((&NTI226810), 2);
			memset((void*)LOC43, 0, sizeof(LOC43));
			LOC43[0] = emptynode_227738;
			LOC44 = 0;
			LOC44 = (tnodeseq226810*) newSeq((&NTI226810), 3);
			memset((void*)LOC45, 0, sizeof(LOC45));
			LOC45[0] = newidentnode_227125(destructorparam_516762, i);
			LOC46 = 0;
			LOC46 = makevartype_291206(c, t);
			LOC45[1] = symnodefromtype_489122(c, LOC46, (*(*t).Sym).Info);
			LOC45[2] = emptynode_227738;
			asgnRefNoCycle((void**) (&LOC44->data[0]), LOC45[0]);
			asgnRefNoCycle((void**) (&LOC44->data[1]), LOC45[1]);
			asgnRefNoCycle((void**) (&LOC44->data[2]), LOC45[2]);
			LOC43[1] = newnode_229207(((NU8) 35), i, LOC44, NIM_NIL);
			asgnRefNoCycle((void**) (&LOC42->data[0]), LOC43[0]);
			asgnRefNoCycle((void**) (&LOC42->data[1]), LOC43[1]);
			LOC41[3] = newnode_229207(((NU8) 76), i, LOC42, NIM_NIL);
			LOC47 = 0;
			LOC47 = (tnodeseq226810*) newSeq((&NTI226810), 1);
			memset((void*)LOC48, 0, sizeof(LOC48));
			LOC48[0] = destructorpragma_516763;
			asgnRefNoCycle((void**) (&LOC47->data[0]), LOC48[0]);
			LOC41[4] = newnode_229207(((NU8) 90), i, LOC47, NIM_NIL);
			LOC41[5] = emptynode_227738;
			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_229207(((NU8) 79), i, LOC40, NIM_NIL);
			semantizeddef = semproc_516723(c, fulldef);
			LOC49 = 0;
			LOC49 = HEX5BHEX5D_227698(semantizeddef, 0);
			asgnRefNoCycle((void**) (&(*t).Destructor), (*LOC49).kindU.S4.Sym);
			result = t;
			goto BeforeRet;
		}
		goto LA31;
		LA33: ;
		{
			asgnRefNoCycle((void**) (&(*t).Destructor), destructoristrivial_516728);
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA31: ;
	}
	break;
	default:
	{
		result = NIM_NIL;
		goto BeforeRet;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, dodestructorstuff_516769)(tcontext291021* c, tsym226846* s, tnode226816* n) {
	ttype226852* t;
	t = skiptypes_231245((*(*s).Typ).Sons->data[1], 8388608);
	{
		if (!((*t).Kind == ((NU8) 9))) goto LA3;
		{
			NI i_516806;
			NI HEX3Atmp_516952;
			NI LOC6;
			NI res_516955;
			i_516806 = 0;
			HEX3Atmp_516952 = 0;
			LOC6 = 0;
			LOC6 = sonslen_227255(t);
			HEX3Atmp_516952 = (LOC6 - 1);
			res_516955 = 1;
			{
				while (1) {
					if (!(res_516955 <= HEX3Atmp_516952)) goto LA8;
					i_516806 = res_516955;
					{
						if (!!(((*(*t).Sons->data[i_516806]).Kind == ((NU8) 12)))) goto LA11;
						localerror_198955((*n).Info, ((NU16) 202), ((NimStringDesc*) &TMP2890));
						goto BeforeRet;
					}
					LA11: ;
					res_516955 += 1;
				} LA8: ;
			}
		}
		t = base_264038(t);
	}
	goto LA1;
	LA3: ;
	{
		if (!((*t).Kind == ((NU8) 54))) goto LA14;
		t = base_264038(t);
		{
			if (!!(((*t).Kind == ((NU8) 10)))) goto LA18;
			localerror_198955((*n).Info, ((NU16) 202), ((NimStringDesc*) &TMP2890));
			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_516869;
			NI HEX3Atmp_516959;
			NI LOC25;
			NI res_516962;
			i_516869 = 0;
			HEX3Atmp_516959 = 0;
			LOC25 = 0;
			LOC25 = sonslen_227255(t);
			HEX3Atmp_516959 = (NI64)(LOC25 - 1);
			res_516962 = 0;
			{
				while (1) {
					if (!(res_516962 <= HEX3Atmp_516959)) goto LA27;
					i_516869 = res_516962;
					{
						ttype226852* destructablet;
						{
							if (!((*t).Sons->data[i_516869] == NIM_NIL)) goto LA31;
							goto LA28;
						}
						LA31: ;
						destructablet = instantiatedestructor_516765(c, (*t).Sons->data[i_516869]);
						{
							tnodeseq226810* LOC37;
							TY292286 LOC38;
							tnode226816* LOC39;
							tnode226816* LOC40;
							if (!!((destructablet == NIM_NIL))) goto LA35;
							LOC37 = 0;
							LOC37 = (tnodeseq226810*) newSeq((&NTI226810), 2);
							memset((void*)LOC38, 0, sizeof(LOC38));
							LOC38[0] = usesym_422001((*destructablet).Destructor);
							LOC39 = 0;
							LOC39 = HEX5BHEX5D_227698((*n).kindU.S6.Sons->data[3], 1);
							LOC38[1] = HEX5BHEX5D_227698(LOC39, 0);
							asgnRefNoCycle((void**) (&LOC37->data[0]), LOC38[0]);
							asgnRefNoCycle((void**) (&LOC37->data[1]), LOC38[1]);
							LOC40 = 0;
							LOC40 = newnode_229207(((NU8) 27), (*(*t).Sym).Info, LOC37, NIM_NIL);
							addson_227287((*n).kindU.S6.Sons->data[6], LOC40);
						}
						LA35: ;
					} LA28: ;
					res_516962 += 1;
				} LA27: ;
			}
		}
	}
	LA22: ;
	BeforeRet: ;
}

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

N_NIMCALL(void, semoverride_526035)(tcontext291021* c, tsym226846* s, tnode226816* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = nsuNormalize((*(*s).Name).S);
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3050))) goto LA2;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3051))) goto LA3;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3052))) goto LA4;
	goto LA5;
	LA2: ;
	{
		dodestructorstuff_516769(c, s, n);
		{
			NIM_BOOL LOC10;
			LOC10 = 0;
			LOC10 = experimentalmode_292446(c);
			if (!!(LOC10)) goto LA11;
			localerror_198966((*n).Info, ((NimStringDesc*) &TMP3060));
		}
		LA11: ;
	}
	goto LA6;
	LA3: ;
	{
		{
			NIM_BOOL LOC16;
			NIM_BOOL LOC17;
			NI LOC18;
			ttype226852* LOC20;
			ttype226852* t;
			ttype226852* LOC24;
			ttype226852* LOC25;
			LOC16 = 0;
			LOC17 = 0;
			LOC18 = 0;
			LOC18 = len_231005((*s).Typ);
			LOC17 = (LOC18 == 2);
			if (!(LOC17)) goto LA19;
			LOC20 = 0;
			LOC20 = skiptypes_231245((*(*s).Typ).Sons->data[1], IL64(211106232576256));
			LOC17 = ((6291456 &(IL64(1)<<(((*LOC20).Kind)&IL64(63))))!=0);
			LA19: ;
			LOC16 = LOC17;
			if (!(LOC16)) goto LA21;
			LOC16 = sametype_269351((*(*s).Typ).Sons->data[1], (*(*s).Typ).Sons->data[0], 0);
			LA21: ;
			if (!LOC16) goto LA22;
			LOC24 = 0;
			LOC24 = skiptypes_231245((*(*s).Typ).Sons->data[1], IL64(211106232576256));
			LOC25 = 0;
			LOC25 = lastson_227267(LOC24);
			t = skiptypes_231245(LOC25, IL64(211106232576256));
			{
				while (1) {
					{
						if (!((*t).Kind == ((NU8) 10))) goto LA30;
						t = lastson_227267(t);
					}
					goto LA28;
					LA30: ;
					{
						if (!((*t).Kind == ((NU8) 9))) goto LA33;
						t = (*t).Sons->data[0];
					}
					goto LA28;
					LA33: ;
					{
						goto LA26;
					}
					LA28: ;
				}
			} LA26: ;
			{
				if (!((155648 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) 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_264031(t, ((NU8) 0));
					LOC45 = rawNewString(LOC46->Sup.len + 35);
appendString(LOC45, ((NimStringDesc*) &TMP3061));
appendString(LOC45, LOC46);
					localerror_198955((*n).Info, ((NU16) 4), LOC45);
				}
				LA40: ;
			}
			goto LA36;
			LA38: ;
			{
				NimStringDesc* LOC48;
				NimStringDesc* LOC49;
				LOC48 = 0;
				LOC49 = 0;
				LOC49 = typetostring_264031(t, ((NU8) 0));
				LOC48 = rawNewString(LOC49->Sup.len + 27);
appendString(LOC48, ((NimStringDesc*) &TMP3062));
appendString(LOC48, LOC49);
				localerror_198955((*n).Info, ((NU16) 4), LOC48);
			}
			LA36: ;
		}
		goto LA14;
		LA22: ;
		{
			localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3063));
		}
		LA14: ;
	}
	goto LA6;
	LA4: ;
	{
	}
	goto LA6;
	LA5: ;
	{
		localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3064));
	}
	LA6: ;
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
}

static N_INLINE(void, paramstypecheck_489015)(tcontext291021* c, ttype226852* typ) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = typeallowed_264231(typ, ((NU8) 10));
		if (!!(LOC3)) goto LA4;
		LOC6 = 0;
		LOC6 = typetostring_264031(typ, ((NU8) 0));
		localerror_198955((*(*typ).N).Info, ((NU16) 165), LOC6);
	}
	LA4: ;
}

N_NIMCALL(void, activate_488327)(tcontext291021* c, tnode226816* n) {
}

N_NIMCALL(ttype226852*, arrayconstrtype_532546)(tcontext291021* c, tnode226816* n) {
	ttype226852* result;
	ttype226852* typ;
	NI LOC9;
	ttype226852* LOC10;
	result = 0;
	typ = newtypes_291213(((NU8) 4), c);
	rawaddson_231562(typ, NIM_NIL);
	{
		NI LOC3;
		ttype226852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_291213(((NU8) 3), c);
		rawaddson_231562(typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode226816* x;
		NI64 lastindex;
		NI LOC8;
		ttype226852* t;
		x = (*n).kindU.S6.Sons->data[0];
		LOC8 = 0;
		LOC8 = sonslen_227249(n);
		lastindex = ((NI64) ((NI64)(LOC8 - 1)));
		t = skiptypes_231245((*(*n).kindU.S6.Sons->data[0]).Typ, 8423424);
		addsonskipintlit_283574(typ, t);
	}
	LA1: ;
	LOC9 = 0;
	LOC9 = sonslen_227249(n);
	LOC10 = 0;
	LOC10 = getsystype_283030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*typ).Sons->data[0]), makerangetype_292350(c, IL64(0), ((NI64) ((NI64)(LOC9 - 1))), (*n).Info, LOC10));
	result = typ;
	return result;
}

N_NIMCALL(void, changetype_488253)(tnode226816* n, ttype226852* newtype, NIM_BOOL check) {
	switch ((*n).Kind) {
	case ((NU8) 39):
	case ((NU8) 41):
	{
		{
			NI i_532405;
			NI HEX3Atmp_532514;
			NI LOC3;
			NI res_532517;
			i_532405 = 0;
			HEX3Atmp_532514 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227249(n);
			HEX3Atmp_532514 = (NI64)(LOC3 - 1);
			res_532517 = 0;
			{
				while (1) {
					ttype226852* LOC6;
					if (!(res_532517 <= HEX3Atmp_532514)) goto LA5;
					i_532405 = res_532517;
					LOC6 = 0;
					LOC6 = elemtype_264656(newtype);
					changetype_488253((*n).kindU.S6.Sons->data[i_532405], LOC6, check);
					res_532517 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 37):
	{
		ttype226852* tup;
		tup = skiptypes_231245(newtype, 2048);
		{
			if (!!(((*tup).Kind == ((NU8) 18)))) goto LA10;
			internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3079));
		}
		goto LA8;
		LA10: ;
		{
			{
				NI i_532443;
				NI HEX3Atmp_532520;
				NI LOC14;
				NI res_532523;
				i_532443 = 0;
				HEX3Atmp_532520 = 0;
				LOC14 = 0;
				LOC14 = sonslen_227249(n);
				HEX3Atmp_532520 = (NI64)(LOC14 - 1);
				res_532523 = 0;
				{
					while (1) {
						tnode226816* m;
						if (!(res_532523 <= HEX3Atmp_532520)) goto LA16;
						i_532443 = res_532523;
						m = (*n).kindU.S6.Sons->data[i_532443];
						{
							if (!((*m).Kind == ((NU8) 34))) goto LA19;
							m = (*m).kindU.S6.Sons->data[1];
							asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_532443]), m);
						}
						LA19: ;
						changetype_488253(m, (*tup).Sons->data[i_532443], check);
						res_532523 += 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_264004(newtype);
				LOC28 = (value < LOC29);
				if (LOC28) goto LA30;
				LOC31 = 0;
				LOC31 = lastord_264010(newtype);
				LOC28 = (LOC31 < value);
				LA30: ;
				if (!LOC28) goto LA32;
				LOC34 = 0;
				LOC35 = 0;
				LOC35 = nimInt64ToStr(value);
				LOC36 = 0;
				LOC36 = typetostring_264031(newtype, ((NU8) 0));
				LOC34 = rawNewString(LOC35->Sup.len + LOC36->Sup.len + 19);
appendString(LOC34, ((NimStringDesc*) &TMP3080));
appendString(LOC34, LOC35);
appendString(LOC34, ((NimStringDesc*) &TMP3081));
appendString(LOC34, LOC36);
				localerror_198955((*n).Info, ((NU16) 4), LOC34);
			}
			LA32: ;
		}
		LA24: ;
	}
	break;
	default:
	{
	}
	break;
	}
	asgnRefNoCycle((void**) (&(*n).Typ), newtype);
}

N_NIMCALL(NIM_BOOL, isemptycontainer_488464)(ttype226852* 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):
	{
		ttype226852* LOC5;
		LOC5 = 0;
		LOC5 = lastson_227267(t);
		result = isemptycontainer_488464(LOC5);
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(ttype226852*, commontype_488492)(ttype226852* x, ttype226852* y) {
	ttype226852* result;
	ttype226852* a;
	ttype226852* 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_231245(x, 2048);
	b = skiptypes_231245(y, 2048);
	result = x;
	{
		if (!((96 &(IL64(1)<<(((*a).Kind)&IL64(63))))!=0)) goto LA11;
		result = y;
	}
	goto LA9;
	LA11: ;
	{
		if (!((96 &(IL64(1)<<(((*b).Kind)&IL64(63))))!=0)) 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_274497((*a).Sons, NIM_NIL);
			if (!LOC27) goto LA28;
			result = a;
		}
		goto LA25;
		LA28: ;
		{
			ttype226852* LOC31;
			result = newtype_227083(((NU8) 8), (*a).Owner);
			LOC31 = 0;
			LOC31 = newtype_227083(((NU8) 0), (*a).Owner);
			rawaddson_231562(result, LOC31);
		}
		LA25: ;
	}
	goto LA9;
	LA23: ;
	{
		NIM_BOOL LOC33;
		NI idx;
		LOC33 = 0;
		LOC33 = ((17367056 &(IL64(1)<<(((*b).Kind)&IL64(63))))!=0);
		if (!(LOC33)) goto LA34;
		LOC33 = ((*a).Kind == (*b).Kind);
		LA34: ;
		if (!LOC33) goto LA35;
		idx = ((65552 &(IL64(1)<<(((*b).Kind)&IL64(63))))!=0);
		{
			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;
		ttype226852* 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_231005(a);
		LOC47 = 0;
		LOC47 = len_231005(b);
		LOC42 = (LOC46 == LOC47);
		LA45: ;
		if (!LOC42) goto LA48;
		nt = 0;
		{
			NI i_488702;
			NI HEX3Atmp_488898;
			NI LOC51;
			NI res_488901;
			i_488702 = 0;
			HEX3Atmp_488898 = 0;
			LOC51 = 0;
			LOC51 = len_231005(a);
			HEX3Atmp_488898 = (LOC51 - 1);
			res_488901 = 0;
			{
				while (1) {
					if (!(res_488901 <= HEX3Atmp_488898)) goto LA53;
					i_488702 = res_488901;
					{
						NIM_BOOL LOC56;
						NIM_BOOL LOC58;
						LOC56 = 0;
						LOC56 = isemptycontainer_488464((*a).Sons->data[i_488702]);
						if (!(LOC56)) goto LA57;
						LOC58 = 0;
						LOC58 = isemptycontainer_488464((*b).Sons->data[i_488702]);
						LOC56 = !(LOC58);
						LA57: ;
						if (!LOC56) goto LA59;
						{
							if (!nt == 0) goto LA63;
							nt = copytype_227195(a, (*a).Owner, NIM_FALSE);
						}
						LA63: ;
						asgnRefNoCycle((void**) (&(*nt).Sons->data[i_488702]), (*b).Sons->data[i_488702]);
					}
					LA59: ;
					res_488901 += 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;
			ttype226852* LOC79;
			LOC76 = 0;
			LOC76 = sametype_269351(a, b, 0);
			if (!!(LOC76)) goto LA77;
			LOC79 = 0;
			LOC79 = skiptypes_231245(a, 1048576);
			result = skipintlit_283533(LOC79);
		}
		LA77: ;
	}
	goto LA9;
	LA72: ;
	{
		NU8 k;
		k = ((NU8) 0);
		{
			if (!((6291456 &(IL64(1)<<(((*a).Kind)&IL64(63))))!=0)) goto LA83;
			k = (*a).Kind;
			{
				if (!!(((*b).Kind == (*a).Kind))) goto LA87;
				result = x;
				goto BeforeRet;
			}
			LA87: ;
			a = lastson_227267(a);
			b = lastson_227267(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_272084(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: ;
			{
				ttype226852* r;
				if (!!((k == ((NU8) 0)))) goto LA107;
				r = result;
				result = newtype_227083(k, (*r).Owner);
				addsonskipintlit_283574(result, r);
			}
			LA107: ;
		}
		LA93: ;
	}
	LA9: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semarrayconstr_532588)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	NI LOC35;
	ttype226852* LOC36;
	result = 0;
	result = newnodei_227138(((NU8) 41), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), newtypes_291213(((NU8) 4), c));
	rawaddson_231562((*result).Typ, NIM_NIL);
	{
		NI LOC3;
		ttype226852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_291213(((NU8) 3), c);
		rawaddson_231562((*result).Typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		tnode226816* x;
		NI64 lastindex;
		ttype226852* indextype;
		tnode226816* yy;
		ttype226852* typ;
		x = (*n).kindU.S6.Sons->data[0];
		lastindex = IL64(0);
		indextype = getsystype_283030(((NU8) 31));
		{
			NIM_BOOL LOC10;
			NI LOC12;
			tnode226816* idx;
			LOC10 = 0;
			LOC10 = ((*x).Kind == ((NU8) 34));
			if (!(LOC10)) goto LA11;
			LOC12 = 0;
			LOC12 = sonslen_227249(x);
			LOC10 = (LOC12 == 2);
			LA11: ;
			if (!LOC10) goto LA13;
			idx = semconstexpr_489503(c, (*x).kindU.S6.Sons->data[0]);
			lastindex = getordvalue_264187(idx);
			indextype = (*idx).Typ;
			x = (*x).kindU.S6.Sons->data[1];
		}
		LA13: ;
		yy = semexprwithtype_488211(c, x, 0);
		typ = (*yy).Typ;
		addson_227287(result, yy);
		{
			NI i_532663;
			NI HEX3Atmp_532799;
			NI LOC16;
			NI res_532802;
			i_532663 = 0;
			HEX3Atmp_532799 = 0;
			LOC16 = 0;
			LOC16 = sonslen_227249(n);
			HEX3Atmp_532799 = (NI64)(LOC16 - 1);
			res_532802 = 1;
			{
				while (1) {
					tnode226816* xx;
					if (!(res_532802 <= HEX3Atmp_532799)) goto LA18;
					i_532663 = res_532802;
					x = (*n).kindU.S6.Sons->data[i_532663];
					{
						NIM_BOOL LOC21;
						NI LOC23;
						tnode226816* idx;
						LOC21 = 0;
						LOC21 = ((*x).Kind == ((NU8) 34));
						if (!(LOC21)) goto LA22;
						LOC23 = 0;
						LOC23 = sonslen_227249(x);
						LOC21 = (LOC23 == 2);
						LA22: ;
						if (!LOC21) goto LA24;
						idx = semconstexpr_489503(c, (*x).kindU.S6.Sons->data[0]);
						idx = fitnode_488245(c, indextype, idx);
						{
							NI64 LOC28;
							LOC28 = 0;
							LOC28 = getordvalue_264187(idx);
							if (!!(((NI64)(lastindex + IL64(1)) == LOC28))) goto LA29;
							localerror_198955((*x).Info, ((NU16) 144), ((NimStringDesc*) &TMP2890));
						}
						LA29: ;
						x = (*x).kindU.S6.Sons->data[1];
					}
					LA24: ;
					xx = semexprwithtype_488211(c, x, (flags & 32));
					add_227498(result, xx);
					typ = commontype_488492(typ, (*xx).Typ);
					lastindex += 1;
					res_532802 += 1;
				} LA18: ;
			}
		}
		addsonskipintlit_283574((*result).Typ, typ);
		{
			NI i_532768;
			NI HEX3Atmp_532805;
			NI LOC32;
			NI res_532808;
			i_532768 = 0;
			HEX3Atmp_532805 = 0;
			LOC32 = 0;
			LOC32 = len_227364(result);
			HEX3Atmp_532805 = (LOC32 - 1);
			res_532808 = 0;
			{
				while (1) {
					if (!(res_532808 <= HEX3Atmp_532805)) goto LA34;
					i_532768 = res_532808;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_532768]), fitnode_488245(c, typ, (*result).kindU.S6.Sons->data[i_532768]));
					res_532808 += 1;
				} LA34: ;
			}
		}
	}
	LA1: ;
	LOC35 = 0;
	LOC35 = sonslen_227249(result);
	LOC36 = 0;
	LOC36 = getsystype_283030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*(*result).Typ).Sons->data[0]), makerangetype_292350(c, IL64(0), ((NI64) ((NI64)(LOC35 - 1))), (*n).Info, LOC36));
	return result;
}

N_NIMCALL(void, fixabstracttype_532831)(tcontext291021* c, tnode226816* n) {
	{
		NI i_532847;
		NI HEX3Atmp_533104;
		NI LOC2;
		NI res_533107;
		i_532847 = 0;
		HEX3Atmp_533104 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_533104 = (NI64)(LOC2 - 1);
		res_533107 = 1;
		{
			while (1) {
				tnode226816* it;
				if (!(res_533107 <= HEX3Atmp_533104)) goto LA4;
				i_532847 = res_533107;
				it = (*n).kindU.S6.Sons->data[i_532847];
				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_532546(c, (*it).kindU.S6.Sons->data[1]));
					}
					LA8: ;
					{
						ttype226852* LOC12;
						ttype226852* s;
						LOC12 = 0;
						LOC12 = skiptypes_231245((*it).Typ, IL64(211106240964864));
						if (!((IL64(281475110928384) &(IL64(1)<<(((*LOC12).Kind)&IL64(63))))!=0)) goto LA13;
						s = skiptypes_231245((*(*it).kindU.S6.Sons->data[1]).Typ, IL64(211106240964864));
						{
							NIM_BOOL LOC17;
							tsym226846* LOC21;
							ttype226852* LOC22;
							ttype226852* 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_291255();
							s = copytype_227195(s, LOC21, NIM_FALSE);
							LOC22 = 0;
							LOC22 = skiptypes_231245(s, IL64(211106240964864));
							LOC23 = 0;
							LOC23 = skiptypes_231245((*it).Typ, IL64(211106240964864));
							asgnRefNoCycle((void**) (&(*LOC22).Sons->data[1]), elemtype_264656(LOC23));
							asgnRefNoCycle((void**) (&(*(*it).kindU.S6.Sons->data[1]).Typ), s);
						}
						goto LA15;
						LA19: ;
						{
							NIM_BOOL LOC25;
							tsym226846* LOC29;
							ttype226852* LOC30;
							ttype226852* 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_291255();
							s = copytype_227195(s, LOC29, NIM_FALSE);
							LOC30 = 0;
							LOC30 = skiptypes_231245(s, IL64(211106240964864));
							LOC31 = 0;
							LOC31 = skiptypes_231245((*it).Typ, IL64(211106240964864));
							asgnRefNoCycle((void**) (&(*LOC30).Sons->data[0]), elemtype_264656(LOC31));
							asgnRefNoCycle((void**) (&(*(*it).kindU.S6.Sons->data[1]).Typ), s);
						}
						goto LA15;
						LA27: ;
						LA15: ;
					}
					goto LA10;
					LA13: ;
					{
						ttype226852* LOC33;
						ttype226852* s;
						LOC33 = 0;
						LOC33 = skiptypes_231245((*(*it).kindU.S6.Sons->data[1]).Typ, IL64(211106240964864));
						if (!((786480 &(IL64(1)<<(((*LOC33).Kind)&IL64(63))))!=0)) goto LA34;
						s = skiptypes_231245((*it).Typ, IL64(211106240964864));
						{
							if (!!(((*s).Kind == ((NU8) 6)))) goto LA38;
							changetype_488253((*it).kindU.S6.Sons->data[1], s, NIM_TRUE);
						}
						LA38: ;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_532847]), (*it).kindU.S6.Sons->data[1]);
					}
					goto LA10;
					LA34: ;
					LA10: ;
				}
				break;
				case ((NU8) 41):
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_532847]), semarrayconstr_532588(c, it, 0));
				}
				break;
				default:
				{
				}
				break;
				}
				res_533107 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(NU8, isassignable_533184)(tcontext291021* c, tnode226816* n) {
	NU8 result;
	result = 0;
	result = isassignable_323003((*(*c).P).Owner, n);
	return result;
}

N_NIMCALL(void, performprocvarcheck_516600)(tcontext291021* c, tnode226816* n, tsym226846* s) {
	NI smoduleid;
	tsym226846* LOC1;
	LOC1 = 0;
	LOC1 = getmodule_236243(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;
		{
			{
				tsym226846* module_516641;
				tsymseq226818* HEX3Atmp_516643;
				NI i_516646;
				NI l_516648;
				module_516641 = 0;
				HEX3Atmp_516643 = 0;
				HEX3Atmp_516643 = (*c).Friendmodules;
				i_516646 = 0;
				l_516648 = HEX3Atmp_516643->Sup.len;
				{
					while (1) {
						if (!(i_516646 < l_516648)) goto LA13;
						module_516641 = HEX3Atmp_516643->data[i_516646];
						{
							if (!(smoduleid == (*module_516641).Sup.Id)) goto LA16;
							goto LA10;
						}
						LA16: ;
						i_516646 += 1;
					} LA13: ;
				}
			}
			localerror_198955((*n).Info, ((NU16) 134), (*(*s).Name).S);
		} LA10: ;
	}
	LA8: ;
}

N_NIMCALL(void, semprocvarcheck_516664)(tcontext291021* c, tnode226816* n_516667) {
	tnode226816* n;
	n = skipconv_274732(n_516667);
	{
		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_516600(c, n, (*n).kindU.S4.Sym);
	}
	LA5: ;
}

N_NIMCALL(tnode226816*, newhiddenaddrtaken_533192)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		if (!((*n).Kind == ((NU8) 65))) goto LA3;
		checksonslen_292415(n, 1);
		result = (*n).kindU.S6.Sons->data[0];
	}
	goto LA1;
	LA3: ;
	{
		ttype226852* LOC6;
		LOC6 = 0;
		LOC6 = makevartype_291206(c, (*n).Typ);
		result = newnodeit_227145(((NU8) 64), (*n).Info, LOC6);
		addson_227287(result, n);
		{
			NU8 LOC9;
			LOC9 = 0;
			LOC9 = isassignable_533184(c, n);
			if (!!(((6 &(1<<((LOC9)&7)))!=0))) goto LA10;
			localerror_198955((*n).Info, ((NU16) 127), ((NimStringDesc*) &TMP2890));
		}
		LA10: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, analyseifaddresstaken_533237)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 3):
	{
		{
			NIM_BOOL LOC4;
			ttype226852* LOC6;
			LOC4 = 0;
			LOC4 = !(((*(*n).kindU.S4.Sym).Typ == NIM_NIL));
			if (!(LOC4)) goto LA5;
			LOC6 = 0;
			LOC6 = skiptypes_231245((*(*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_533192(c, n);
		}
		LA7: ;
	}
	break;
	case ((NU8) 45):
	{
		checksonslen_292415(n, 2);
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 3)))) goto LA12;
			internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3083));
			goto BeforeRet;
		}
		LA12: ;
		{
			ttype226852* LOC16;
			LOC16 = 0;
			LOC16 = skiptypes_231245((*(*(*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_533192(c, n);
		}
		LA17: ;
	}
	break;
	case ((NU8) 42):
	{
		checkminsonslen_292425(n, 1);
		{
			ttype226852* LOC22;
			LOC22 = 0;
			LOC22 = skiptypes_231245((*(*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_533192(c, n);
		}
		LA23: ;
	}
	break;
	default:
	{
		result = newhiddenaddrtaken_533192(c, n);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, analyseifaddresstakenincall_533577)(tcontext291021* c, tnode226816* n) {
	ttype226852* t;
	checkminsonslen_292425(n, 1);
	t = skiptypes_231245((*(*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 = ((TMP3082[(*(*(*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_533675;
			NI HEX3Atmp_533930;
			NI LOC8;
			NI res_533933;
			i_533675 = 0;
			HEX3Atmp_533930 = 0;
			LOC8 = 0;
			LOC8 = sonslen_227249(n);
			HEX3Atmp_533930 = (NI64)(LOC8 - 1);
			res_533933 = 1;
			{
				while (1) {
					if (!(res_533933 <= HEX3Atmp_533930)) goto LA10;
					i_533675 = res_533933;
					{
						NIM_BOOL LOC13;
						NIM_BOOL LOC14;
						NI LOC15;
						ttype226852* LOC18;
						LOC13 = 0;
						LOC14 = 0;
						LOC15 = 0;
						LOC15 = sonslen_227255(t);
						LOC14 = (i_533675 < LOC15);
						if (!(LOC14)) goto LA16;
						LOC14 = !(((*t).Sons->data[i_533675] == NIM_NIL));
						LA16: ;
						LOC13 = LOC14;
						if (!(LOC13)) goto LA17;
						LOC18 = 0;
						LOC18 = skiptypes_231245((*t).Sons->data[i_533675], IL64(211106232576000));
						LOC13 = ((*LOC18).Kind == ((NU8) 23));
						LA17: ;
						if (!LOC13) goto LA19;
						{
							NU8 LOC23;
							LOC23 = 0;
							LOC23 = isassignable_533184(c, (*n).kindU.S6.Sons->data[i_533675]);
							if (!!(((6 &(1<<((LOC23)&7)))!=0))) goto LA24;
							{
								if (!!(((*(*n).kindU.S6.Sons->data[i_533675]).Kind == ((NU8) 64)))) goto LA28;
								localerror_198955((*(*n).kindU.S6.Sons->data[i_533675]).Info, ((NU16) 127), ((NimStringDesc*) &TMP2890));
							}
							LA28: ;
						}
						LA24: ;
					}
					LA19: ;
					res_533933 += 1;
				} LA10: ;
			}
		}
		goto BeforeRet;
	}
	LA5: ;
	{
		NI i_533798;
		NI HEX3Atmp_533936;
		NI LOC31;
		NI res_533939;
		i_533798 = 0;
		HEX3Atmp_533936 = 0;
		LOC31 = 0;
		LOC31 = sonslen_227249(n);
		HEX3Atmp_533936 = (NI64)(LOC31 - 1);
		res_533939 = 1;
		{
			while (1) {
				if (!(res_533939 <= HEX3Atmp_533936)) goto LA33;
				i_533798 = res_533939;
				{
					if (!((*(*n).kindU.S6.Sons->data[i_533798]).Kind == ((NU8) 32))) goto LA36;
					analyseifaddresstakenincall_533577(c, (*n).kindU.S6.Sons->data[i_533798]);
				}
				LA36: ;
				semprocvarcheck_516664(c, (*n).kindU.S6.Sons->data[i_533798]);
				{
					NIM_BOOL LOC40;
					NI LOC41;
					ttype226852* LOC43;
					LOC40 = 0;
					LOC41 = 0;
					LOC41 = sonslen_227255(t);
					LOC40 = (i_533798 < LOC41);
					if (!(LOC40)) goto LA42;
					LOC43 = 0;
					LOC43 = skiptypes_231245((*t).Sons->data[i_533798], IL64(211106232576000));
					LOC40 = ((*LOC43).Kind == ((NU8) 23));
					LA42: ;
					if (!LOC40) goto LA44;
					{
						if (!!(((*(*n).kindU.S6.Sons->data[i_533798]).Kind == ((NU8) 64)))) goto LA48;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_533798]), analyseifaddresstaken_533237(c, (*n).kindU.S6.Sons->data[i_533798]));
					}
					LA48: ;
				}
				LA44: ;
				res_533939 += 1;
			} LA33: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tnode226816*, semispartof_533962)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	NU8 r;
	tnode226816* LOC1;
	tnode226816* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(n, 1);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_227698(n, 2);
	r = ispartof_479430(LOC1, LOC2);
	result = newintnodet_305028(((NI64) (r)), n);
	return result;
}

N_NIMCALL(tnode226816*, evaltypetrait_534073)(tnode226816* trait, ttype226852* operand, tsym226846* context) {
	tnode226816* result;
	ttype226852* typ;
	NimStringDesc* LOC1;
	result = 0;
	typ = skiptypes_231245(operand, 256);
	LOC1 = 0;
	LOC1 = nsuNormalize((*(*(*trait).kindU.S4.Sym).Name).S);
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3086))) goto LA2;
	if (eqStrings(LOC1, ((NimStringDesc*) &TMP3087))) goto LA3;
	goto LA4;
	LA2: ;
	{
		NimStringDesc* LOC7;
		LOC7 = 0;
		LOC7 = typetostring_264031(typ, ((NU8) 0));
		result = newstrnode_227118(((NU8) 20), LOC7);
		asgnRefNoCycle((void**) (&(*result).Typ), newtype_227083(((NU8) 28), context));
		(*result).Info = (*trait).Info;
	}
	goto LA5;
	LA3: ;
	{
		NI LOC9;
		LOC9 = 0;
		LOC9 = len_227364((*typ).N);
		result = newintnode_227096(((NU8) 6), ((NI64) ((NI64)(LOC9 - 1))));
		asgnRefNoCycle((void**) (&(*result).Typ), newtype_227083(((NU8) 31), context));
		(*result).Info = (*trait).Info;
	}
	goto LA5;
	LA4: ;
	{
		{
			NimStringDesc* LOC15;
			if (!NIM_TRUE) goto LA13;
			LOC15 = 0;
			LOC15 = HEX24_199126(TMP3088);
			internalerror_199006(LOC15);
		}
		LA13: ;
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode226816*, semtypetraits_534105)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* t;
	result = 0;
	checkminsonslen_292425(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_199126(TMP3084);
		internalerror_199006(LOC7);
	}
	LA5: ;
	{
		NI LOC10;
		tnode226816* LOC13;
		tsym226846* LOC14;
		LOC10 = 0;
		LOC10 = sonslen_227255(t);
		if (!(0 < LOC10)) goto LA11;
		LOC13 = 0;
		LOC13 = HEX5BHEX5D_227698(n, 0);
		LOC14 = 0;
		LOC14 = getcurrowner_291255();
		result = evaltypetrait_534073(LOC13, t, LOC14);
	}
	goto LA8;
	LA11: ;
	{
		result = n;
	}
	LA8: ;
	return result;
}

N_NIMCALL(NI, expectintlit_533980)(tcontext291021* c, tnode226816* n) {
	NI result;
	tnode226816* 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_198955((*n).Info, ((NU16) 7), ((NimStringDesc*) &TMP2890));
	}
	break;
	}
	return result;
}

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

N_NIMCALL(tnode226816*, seminstantiationinfo_534004)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI idx;
	NI usefullpaths;
	tlineinfo196539 info;
	tnode226816* filename;
	ttype226852* LOC1;
	tnode226816* line;
	ttype226852* LOC7;
	NI LOC8;
	result = 0;
	result = newnodeit_227145(((NU8) 37), (*n).Info, (*n).Typ);
	idx = expectintlit_533980(c, (*n).kindU.S6.Sons->data[1]);
	usefullpaths = expectintlit_533980(c, (*n).kindU.S6.Sons->data[2]);
	info = getinfocontext_197992(idx);
	LOC1 = 0;
	LOC1 = getsystype_283030(((NU8) 28));
	filename = newnodeit_227145(((NU8) 20), (*n).Info, LOC1);
	{
		if (!!((usefullpaths == 0))) goto LA4;
		asgnRefNoCycle((void**) (&(*filename).kindU.S3.Strval), tofullpath_198037(info.Fileindex));
	}
	goto LA2;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*filename).kindU.S3.Strval), tofilename_198025(info.Fileindex));
	}
	LA2: ;
	LOC7 = 0;
	LOC7 = getsystype_283030(((NU8) 31));
	line = newnodeit_227145(((NU8) 6), (*n).Info, LOC7);
	LOC8 = 0;
	LOC8 = tolinenumber_198073(info);
	(*line).kindU.S1.Intval = ((NI64) (LOC8));
	add_227498(result, filename);
	add_227498(result, line);
	return result;
}

N_NIMCALL(tnode226816*, semord_534188)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI64 LOC1;
	NI64 LOC2;
	ttype226852* LOC3;
	result = 0;
	result = n;
	LOC1 = 0;
	LOC1 = firstord_264004((*(*n).kindU.S6.Sons->data[1]).Typ);
	LOC2 = 0;
	LOC2 = lastord_264010((*(*n).kindU.S6.Sons->data[1]).Typ);
	LOC3 = 0;
	LOC3 = getsystype_283030(((NU8) 31));
	asgnRefNoCycle((void**) (&(*result).Typ), makerangetype_292350(c, LOC1, LOC2, (*n).Info, LOC3));
	return result;
}

N_NIMCALL(tnode226816*, semlowhigh_531538)(tcontext291021* c, tnode226816* n, NU16 m) {
	tnode226816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_198955((*n).Info, ((NU16) 69), optostr_531544[(m)- 4]);
	}
	goto LA1;
	LA4: ;
	{
		ttype226852* typ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 16));
		typ = skiptypes_231245((*(*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_283030(((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_231245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(2306054115454658816)));
		}
		break;
		case ((NU8) 12):
		{
			tnode226816* LOC11;
			LOC11 = 0;
			LOC11 = copytree_227329(n);
			asgnRefNoCycle((void**) (&(*n).Typ), maketypefromexpr_291811(c, LOC11));
		}
		break;
		default:
		{
			localerror_198955((*n).Info, ((NU16) 67), optostr_531544[(m)- 4]);
		}
		break;
		}
	}
	LA1: ;
	result = n;
	return result;
}

N_NIMCALL(tnode226816*, semshallowcopy_534549)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	{
		NI LOC3;
		tnode226816* LOC6;
		tnode226816* LOC7;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 3)) goto LA4;
		result = newnodei_227138(((NU8) 74), (*n).Info);
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_227698(n, 1);
		add_227498(result, LOC6);
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_227698(n, 2);
		add_227498(result, LOC7);
		result = semasgn_538534(c, result);
	}
	goto LA1;
	LA4: ;
	{
		result = semdirectop_489032(c, n, flags);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, sembindsym_534224)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* sl;
	tnode226816* ismixin;
	tnode226816* id;
	tident201021* LOC13;
	tsym226846* s;
	result = 0;
	result = copynode_227323(n);
	add_227498(result, (*n).kindU.S6.Sons->data[0]);
	sl = semconstexpr_489503(c, (*n).kindU.S6.Sons->data[1]);
	{
		if (!!(((*sl).Kind == ((NU8) 20) || (*sl).Kind == ((NU8) 21) || (*sl).Kind == ((NU8) 22)))) goto LA3;
		localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 6), ((NimStringDesc*) &TMP2890));
		result = errornode_292328(c, n);
		goto BeforeRet;
	}
	LA3: ;
	ismixin = semconstexpr_489503(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_198955((*(*n).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
		result = errornode_292328(c, n);
		goto BeforeRet;
	}
	LA11: ;
	LOC13 = 0;
	LOC13 = getident_201472((*sl).kindU.S3.Strval);
	id = newidentnode_227125(LOC13, (*n).Info);
	s = qualifiedlookup_297122(c, id, 2);
	{
		tnode226816* sc;
		if (!!((s == NIM_NIL))) goto LA16;
		sc = symchoice_505476(c, id, s, ((NU8) ((*ismixin).kindU.S1.Intval)));
		add_227498(result, sc);
	}
	goto LA14;
	LA16: ;
	{
		localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 61), (*sl).kindU.S3.Strval);
	}
	LA14: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(tnode226816*, newderef_518404)(tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = newnodeit_227145(((NU8) 65), (*n).Info, (*(*n).Typ).Sons->data[0]);
	addson_227287(result, n);
	return result;
}

N_NIMCALL(tnode226816*, semlocals_534438)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI counter;
	ttype226852* tupletype;
	result = 0;
	counter = 0;
	tupletype = newtypes_291213(((NU8) 18), c);
	result = newnodeit_227145(((NU8) 37), (*n).Info, tupletype);
	asgnRefNoCycle((void**) (&(*tupletype).N), newnodei_227138(((NU8) 137), (*n).Info));
	{
		tscope226840* scope_534445;
		tscope226840* HEX3Atmp_534524;
		tscope226840* current_534527;
		scope_534445 = 0;
		HEX3Atmp_534524 = 0;
		HEX3Atmp_534524 = (*c).Currentscope;
		current_534527 = HEX3Atmp_534524;
		{
			while (1) {
				if (!!((current_534527 == NIM_NIL))) goto LA3;
				scope_534445 = current_534527;
				{
					if (!(scope_534445 == (*c).Toplevelscope)) goto LA6;
					goto LA1;
				}
				LA6: ;
				{
					tsym226846* it_534462;
					tstrtable226820 HEX3Atmp_534518;
					ttabiter236119 it_534521;
					tsym226846* s_534523;
					it_534462 = 0;
					memset((void*)(&HEX3Atmp_534518), 0, sizeof(HEX3Atmp_534518));
					HEX3Atmp_534518.Counter = (*scope_534445).Symbols.Counter;
					HEX3Atmp_534518.Data = (*scope_534445).Symbols.Data;
					memset((void*)(&it_534521), 0, sizeof(it_534521));
					s_534523 = inittabiter_236124((&it_534521), HEX3Atmp_534518);
					{
						while (1) {
							if (!!((s_534523 == NIM_NIL))) goto LA10;
							it_534462 = s_534523;
							{
								NIM_BOOL LOC13;
								ttype226852* LOC15;
								tsym226846* field;
								tsym226846* LOC18;
								tnode226816* LOC19;
								tnode226816* a;
								LOC13 = 0;
								LOC13 = ((2099976 &(1<<(((*it_534462).Kind)&31)))!=0);
								if (!(LOC13)) goto LA14;
								LOC15 = 0;
								LOC15 = skiptypes_231245((*it_534462).Typ, 8390656);
								LOC13 = !(((IL64(576742227414352328) &(IL64(1)<<(((*LOC15).Kind)&IL64(63))))!=0));
								LA14: ;
								if (!LOC13) goto LA16;
								LOC18 = 0;
								LOC18 = getcurrowner_291255();
								field = newsym_227074(((NU8) 19), (*it_534462).Name, LOC18, (*n).Info);
								asgnRefNoCycle((void**) (&(*field).Typ), skiptypes_231245((*it_534462).Typ, 8390656));
								(*field).Position = counter;
								counter += 1;
								LOC19 = 0;
								LOC19 = newsymnode_227132(field);
								addson_227287((*tupletype).N, LOC19);
								addsonskipintlit_283574(tupletype, (*field).Typ);
								a = newsymnode_228754(it_534462, (*result).Info);
								{
									ttype226852* LOC22;
									LOC22 = 0;
									LOC22 = skiptypes_231245((*it_534462).Typ, 2048);
									if (!((*LOC22).Kind == ((NU8) 23))) goto LA23;
									a = newderef_518404(a);
								}
								LA23: ;
								add_227498(result, a);
							}
							LA16: ;
							s_534523 = nextiter_236132((&it_534521), HEX3Atmp_534518);
						} LA10: ;
					}
				}
				current_534527 = (*current_534527).Parent;
			} LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, magicsafteroverloadresolution_534554)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tnode226816* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(n, 0);
	switch ((*(*LOC1).kindU.S4.Sym).Magic) {
	case ((NU16) 164):
	{
		result = semispartof_533962(c, n, flags);
	}
	break;
	case ((NU16) 7):
	{
		result = semtypetraits_534105(c, n);
	}
	break;
	case ((NU16) 165):
	{
		tnode226816* LOC5;
		NimStringDesc* LOC6;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_227698(n, 1);
		LOC6 = 0;
		LOC6 = rendertree_251058(LOC5, 4);
		result = newstrnodet_305042(LOC6, n);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 28)));
	}
	break;
	case ((NU16) 261):
	{
		result = seminstantiationinfo_534004(c, n);
	}
	break;
	case ((NU16) 23):
	{
		result = semord_534188(c, n);
	}
	break;
	case ((NU16) 5):
	case ((NU16) 4):
	{
		tnode226816* LOC10;
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_227698(n, 0);
		result = semlowhigh_531538(c, n, (*(*LOC10).kindU.S4.Sym).Magic);
	}
	break;
	case ((NU16) 11):
	{
		result = semshallowcopy_534549(c, n, flags);
	}
	break;
	case ((NU16) 253):
	{
		result = sembindsym_534224(c, n);
	}
	break;
	case ((NU16) 254):
	{
		result = semlocals_534438(c, n);
	}
	break;
	case ((NU16) 218):
	{
		tnode226816* LOC15;
		result = n;
		LOC15 = 0;
		LOC15 = HEX5BHEX5D_227698(n, 1);
		asgnRefNoCycle((void**) (&(*result).Typ), (*LOC15).Typ);
	}
	break;
	default:
	{
		result = n;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, fixuptypeaftereval_489201)(tcontext291021* c, tnode226816* evaluated, tnode226816* eorig) {
	tnode226816* result;
	result = 0;
	{
		if (!((448 &(IL64(1)<<(((*(*eorig).Typ).Kind)&IL64(63))))!=0)) goto LA3;
		result = semexprwithtype_488211(c, evaluated, 0);
	}
	goto LA1;
	LA3: ;
	{
		ttype226852* expectedtype;
		result = evaluated;
		expectedtype = skiptypes_231245((*eorig).Typ, IL64(576460752303423488));
		annotatetype_483223(result, expectedtype);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, evalatcompiletime_534592)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* 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;
		tnode226816* call;
		NIM_BOOL allconst;
		LOC9 = 0;
		LOC10 = 0;
		LOC10 = !(((*callee).Magic == ((NU16) 0)));
		if (!(LOC10)) goto LA11;
		LOC10 = ((TMP3091[(*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_227145(((NU8) 27), (*n).Info, (*n).Typ);
		add_227498(call, (*n).kindU.S6.Sons->data[0]);
		allconst = NIM_TRUE;
		{
			NI i_534738;
			NI HEX3Atmp_535165;
			NI LOC16;
			NI res_535168;
			i_534738 = 0;
			HEX3Atmp_535165 = 0;
			LOC16 = 0;
			LOC16 = len_227364(n);
			HEX3Atmp_535165 = (LOC16 - 1);
			res_535168 = 1;
			{
				while (1) {
					tnode226816* a;
					if (!(res_535168 <= HEX3Atmp_535165)) goto LA18;
					i_534738 = res_535168;
					a = getconstexpr_305004((*c).Module, (*n).kindU.S6.Sons->data[i_534738]);
					{
						if (!(a == NIM_NIL)) goto LA21;
						allconst = NIM_FALSE;
						a = (*n).kindU.S6.Sons->data[i_534738];
						{
							if (!((*a).Kind == ((NU8) 58))) goto LA25;
							a = (*a).kindU.S6.Sons->data[1];
						}
						LA25: ;
					}
					LA21: ;
					add_227498(call, a);
					res_535168 += 1;
				} LA18: ;
			}
		}
		{
			if (!allconst) goto LA29;
			result = getconstexpr_305004((*c).Module, call);
			{
				if (!result == 0) goto LA33;
				result = n;
			}
			goto LA31;
			LA33: ;
			{
				goto BeforeRet;
			}
			LA31: ;
		}
		LA29: ;
		asgnRefNoCycle((void**) (&(*result).Typ), getintervaltype_305465((*callee).Magic, call));
	}
	LA13: ;
	{
		{
			NI LOC39;
			ttypeseq226848* LOC54;
			TY412748 LOC55;
			LOC39 = 0;
			LOC39 = len_227364(n);
			if (!(1 < LOC39)) goto LA40;
			{
				NI i_534842;
				NI HEX3Atmp_535171;
				NI LOC43;
				NI res_535174;
				i_534842 = 0;
				HEX3Atmp_535171 = 0;
				LOC43 = 0;
				LOC43 = len_227364(n);
				HEX3Atmp_535171 = (LOC43 - 1);
				res_535174 = 1;
				{
					while (1) {
						if (!(res_535174 <= HEX3Atmp_535171)) goto LA45;
						i_534842 = res_535174;
						{
							NIM_BOOL LOC48;
							tnode226816* LOC49;
							tnode226816* LOC51;
							LOC48 = 0;
							LOC49 = 0;
							LOC49 = HEX5BHEX5D_227698(n, i_534842);
							LOC48 = !(((*(*LOC49).Typ).Kind == ((NU8) 59)));
							if (LOC48) goto LA50;
							LOC51 = 0;
							LOC51 = HEX5BHEX5D_227698(n, i_534842);
							LOC48 = !((((*(*LOC51).Typ).Flags &(1<<((((NU8) 9))&31)))!=0));
							LA50: ;
							if (!LOC48) goto LA52;
							goto LA36;
						}
						LA52: ;
						res_535174 += 1;
					} LA45: ;
				}
			}
			LOC54 = 0;
			LOC54 = (ttypeseq226848*) newSeq((&NTI226848), 1);
			memset((void*)LOC55, 0, sizeof(LOC55));
			LOC55[0] = (*n).Typ;
			asgnRefNoCycle((void**) (&LOC54->data[0]), LOC55[0]);
			asgnRefNoCycle((void**) (&(*n).Typ), newtypewithsons_291822(c, ((NU8) 59), LOC54));
			(*(*n).Typ).Flags |= ((NI32)1)<<((((NU8) 9))%(sizeof(NI32)*8));
		}
		LA40: ;
	} LA36: ;
	{
		NIM_BOOL LOC58;
		NIM_BOOL LOC59;
		tnode226816* 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_170116 &(1<<((((NU8) 20))&31)))!=0));
			LA67: ;
			if (!LOC66) goto LA68;
			goto BeforeRet;
		}
		LA68: ;
		{
			if (!!(((TMP3091[(*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_233650(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_264231((*n).Typ, ((NU8) 10));
			LOC82 = !(LOC84);
			LA83: ;
			if (!LOC82) goto LA85;
			goto BeforeRet;
		}
		LA85: ;
		call = newnodeit_227145(((NU8) 27), (*n).Info, (*n).Typ);
		add_227498(call, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_535096;
			NI HEX3Atmp_535177;
			NI LOC88;
			NI res_535180;
			i_535096 = 0;
			HEX3Atmp_535177 = 0;
			LOC88 = 0;
			LOC88 = len_227364(n);
			HEX3Atmp_535177 = (LOC88 - 1);
			res_535180 = 1;
			{
				while (1) {
					tnode226816* a;
					if (!(res_535180 <= HEX3Atmp_535177)) goto LA90;
					i_535096 = res_535180;
					a = getconstexpr_305004((*c).Module, (*n).kindU.S6.Sons->data[i_535096]);
					{
						if (!(a == NIM_NIL)) goto LA93;
						result = n;
						goto BeforeRet;
					}
					LA93: ;
					add_227498(call, a);
					res_535180 += 1;
				} LA90: ;
			}
		}
		{
			if (!(((*callee).Flags &(1<<((((NU8) 23))&31)))!=0)) goto LA97;
			result = evalstaticexpr_478237((*c).Module, call, (*(*c).P).Owner);
			{
				NimStringDesc* LOC103;
				if (!result == 0) goto LA101;
				LOC103 = 0;
				LOC103 = rendertree_251058(call, 0);
				localerror_198955((*n).Info, ((NU16) 208), LOC103);
			}
			goto LA99;
			LA101: ;
			{
				result = fixuptypeaftereval_489201(c, result, n);
			}
			LA99: ;
		}
		goto LA95;
		LA97: ;
		{
			result = evalconstexpr_478226((*c).Module, call);
			{
				if (!result == 0) goto LA108;
				result = n;
			}
			goto LA106;
			LA108: ;
			{
				result = fixuptypeaftereval_489201(c, result, n);
			}
			LA106: ;
		}
		LA95: ;
	}
	LA62: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, aftercallactions_536063)(tcontext291021* c, tnode226816* n, tnode226816* orig, NU16 flags) {
	tnode226816* result;
	tsym226846* callee;
	result = 0;
	result = n;
	callee = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	switch ((*callee).Kind) {
	case ((NU8) 17):
	{
		result = semmacroexpr_489066(c, result, orig, callee, flags);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_489055(c, result, callee, flags);
	}
	break;
	default:
	{
		semfinishoperands_415292(c, result);
		activate_488327(c, result);
		fixabstracttype_532831(c, result);
		analyseifaddresstakenincall_533577(c, result);
		{
			if (!!(((*callee).Magic == ((NU16) 0)))) goto LA6;
			result = magicsafteroverloadresolution_534554(c, result, flags);
		}
		LA6: ;
	}
	break;
	}
	{
		if (!((*c).Intypeclass == 0)) goto LA10;
		result = evalatcompiletime_534592(c, result);
	}
	LA10: ;
	return result;
}

N_NIMCALL(tnode226816*, semdirectop_489032)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tnode226816* norig;
	result = 0;
	norig = copytree_227329(n);
	result = semoverloadedcallanalyseeffects_535249(c, n, norig, flags);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		result = aftercallactions_536063(c, result, norig, flags);
	}
	goto LA1;
	LA3: ;
	{
		result = errornode_292328(c, n);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, evalpattern_489579)(tcontext291021* c, tnode226816* n, tnode226816* orig) {
	tnode226816* result;
	NimStringDesc* rule;
	tsym226846* 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_199126(TMP3077);
		internalerror_199006(LOC7);
	}
	LA5: ;
	rule = 0;
	{
		NIM_BOOL LOC10;
		LOC10 = 0;
		LOC10 = ((goptions_170116 &(1<<((((NU8) 12))&31)))!=0);
		if (!(LOC10)) goto LA11;
		LOC10 = ((gnotes_197302 &(IL64(1)<<(((((NU16) 274)- 230))&IL64(63))))!=0);
		LA11: ;
		if (!LOC10) goto LA12;
		rule = rendertree_251058(n, 4);
	}
	LA12: ;
	s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	switch ((*s).Kind) {
	case ((NU8) 17):
	{
		result = semmacroexpr_489066(c, n, orig, s, 0);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_489055(c, n, s, 0);
	}
	break;
	default:
	{
		result = semdirectop_489032(c, n, 0);
	}
	break;
	}
	{
		NIM_BOOL LOC19;
		NimStringDesc* LOC23;
		NimStringDesc* LOC24;
		LOC19 = 0;
		LOC19 = ((goptions_170116 &(1<<((((NU8) 12))&31)))!=0);
		if (!(LOC19)) goto LA20;
		LOC19 = ((gnotes_197302 &(IL64(1)<<(((((NU16) 274)- 230))&IL64(63))))!=0);
		LA20: ;
		if (!LOC19) goto LA21;
		LOC23 = 0;
		LOC24 = 0;
		LOC24 = rendertree_251058(result, 4);
		LOC23 = rawNewString(rule->Sup.len + LOC24->Sup.len + 7);
appendString(LOC23, rule);
appendString(LOC23, ((NimStringDesc*) &TMP3173));
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP3174));
		message_198976((*orig).Info, ((NU16) 274), LOC23);
	}
	LA21: ;
	return result;
}

N_NIMCALL(tnode226816*, applypatterns_489746)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		NI i_489784;
		NI HEX3Atmp_490242;
		NI res_490245;
		i_489784 = 0;
		HEX3Atmp_490242 = 0;
		HEX3Atmp_490242 = ((*c).Patterns->Sup.len - 1);
		res_490245 = HEX3Atmp_490242;
		{
			while (1) {
				tsym226846* pattern;
				if (!(0 <= res_490245)) goto LA3;
				i_489784 = res_490245;
				pattern = (*c).Patterns->data[i_489784];
				{
					tnode226816* x;
					if (!!(pattern == 0)) goto LA6;
					x = applyrule_482563(c, pattern, result);
					{
						if (!!(x == 0)) goto LA10;
						evaltemplatecounter_456330 += 1;
						{
							if (!(100 < evaltemplatecounter_456330)) goto LA14;
							globalerror_198934((*n).Info, ((NU16) 183), ((NimStringDesc*) &TMP2890));
						}
						LA14: ;
						asgnRefNoCycle((void**) (&(*c).Patterns->data[i_489784]), NIM_NIL);
						{
							if (!((*x).Kind == ((NU8) 115))) goto LA18;
							asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[1]), evalpattern_489579(c, (*x).kindU.S6.Sons->data[1], result));
							result = flattenstmts_263416(x);
						}
						goto LA16;
						LA18: ;
						{
							result = evalpattern_489579(c, x, result);
						}
						LA16: ;
						evaltemplatecounter_456330 -= 1;
						asgnRefNoCycle((void**) (&(*c).Patterns->data[i_489784]), pattern);
					}
					LA10: ;
				}
				LA6: ;
				res_490245 -= 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(tnode226816*, hlo_489575)(tcontext291021* c, tnode226816* n) {
	tnode226816* 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_489746(c, n);
		{
			if (!(result == n)) goto LA17;
			{
				NI i_490414;
				NI HEX3Atmp_490462;
				NI LOC20;
				NI res_490465;
				i_490414 = 0;
				HEX3Atmp_490462 = 0;
				LOC20 = 0;
				LOC20 = safelen_227424(result);
				HEX3Atmp_490462 = (LOC20 - 1);
				res_490465 = 0;
				{
					while (1) {
						tnode226816* a;
						tnode226816* h;
						if (!(res_490465 <= HEX3Atmp_490462)) goto LA22;
						i_490414 = res_490465;
						a = (*result).kindU.S6.Sons->data[i_490414];
						h = hlo_489575(c, a);
						{
							if (!!((h == a))) goto LA25;
							asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_490414]), h);
						}
						LA25: ;
						res_490465 += 1;
					} LA22: ;
				}
			}
		}
		goto LA15;
		LA17: ;
		{
			{
				NIM_BOOL LOC30;
				LOC30 = 0;
				LOC30 = isemptytype_233991((*n).Typ);
				if (!(LOC30)) goto LA31;
				LOC30 = isemptytype_233991((*result).Typ);
				LA31: ;
				if (!LOC30) goto LA32;
			}
			goto LA28;
			LA32: ;
			{
				result = fitnode_488245(c, (*n).Typ, result);
			}
			LA28: ;
			result = commonoptimizations_441642((*c).Module, result);
			result = hlo_489575(c, result);
			result = commonoptimizations_441642((*c).Module, result);
		}
		LA15: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, hlobody_490479)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*c).Patterns->Sup.len == 0);
		if (LOC3) goto LA4;
		LOC3 = !(((goptions_170116 &(1<<((((NU8) 21))&31)))!=0));
		LA4: ;
		if (!LOC3) goto LA5;
		result = n;
		goto BeforeRet;
	}
	LA5: ;
	(*c).Hloloopdetector = 0;
	result = hlo_489575(c, n);
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(void, fixupinstantiatedsymbols_491553)(tcontext291021* c, tsym226846* s) {
	{
		NI i_491580;
		NI HEX3Atmp_491598;
		NI res_491601;
		i_491580 = 0;
		HEX3Atmp_491598 = 0;
		HEX3Atmp_491598 = (NI64)((*c).Generics->Sup.len - 1);
		res_491601 = 0;
		{
			while (1) {
				if (!(res_491601 <= HEX3Atmp_491598)) goto LA3;
				i_491580 = res_491601;
				{
					tsym226846* oldprc;
					tscope226840* LOC8;
					tnode226816* n;
					tnode226816* LOC9;
					if (!((*(*c).Generics->data[i_491580].Genericsym).Sup.Id == (*s).Sup.Id)) goto LA6;
					oldprc = (*(*c).Generics->data[i_491580].Inst).Sym;
					pushinfocontext_197930((*oldprc).Info);
					LOC8 = 0;
					LOC8 = openscope_296191(c);
					n = (*oldprc).Ast;
					LOC9 = 0;
					LOC9 = getbody_280269(s);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), copytree_227329(LOC9));
					instantiatebody_491449(c, n, oldprc);
					closescope_296211(c);
					popinfocontext_197957();
				}
				LA6: ;
				res_491601 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(tsym226846*, searchforborrowproc_495620)(tcontext291021* c, tscope226840* startscope, tsym226846* fn) {
	tsym226846* result;
	tnode226816* call;
	NIM_BOOL hasdistinct;
	tnode226816* LOC1;
	result = 0;
	call = newnodei_227138(((NU8) 27), (*fn).Info);
	hasdistinct = NIM_FALSE;
	LOC1 = 0;
	LOC1 = newidentnode_227125((*fn).Name, (*fn).Info);
	add_227498(call, LOC1);
	{
		NI i_495649;
		NI HEX3Atmp_495750;
		NI LOC3;
		NI res_495753;
		i_495649 = 0;
		HEX3Atmp_495750 = 0;
		LOC3 = 0;
		LOC3 = len_227364((*(*fn).Typ).N);
		HEX3Atmp_495750 = (LOC3 - 1);
		res_495753 = 1;
		{
			while (1) {
				tnode226816* param;
				ttype226852* t;
				ttype226852* LOC12;
				tnode226816* LOC13;
				if (!(res_495753 <= HEX3Atmp_495750)) goto LA5;
				i_495649 = res_495753;
				param = (*(*(*fn).Typ).N).kindU.S6.Sons->data[i_495649];
				t = skiptypes_231245((*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_273939(t);
				LOC13 = 0;
				LOC13 = newnodeit_227145(((NU8) 1), (*fn).Info, LOC12);
				add_227498(call, LOC13);
				res_495753 += 1;
			} LA5: ;
		}
	}
	{
		tnode226816* resolved;
		NU32 LOC18;
		if (!hasdistinct) goto LA16;
		LOC18 = 0;
		LOC18 |=(1<<((NI32)((*fn).Kind)%(sizeof(NI32)*8)));
		resolved = semoverloadedcall_495100(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_525035)(tcontext291021* c, tnode226816* n, tsym226846* s) {
	tsym226846* b;
	b = searchforborrowproc_495620(c, (*(*c).Currentscope).Parent, s);
	{
		if (!!((b == NIM_NIL))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), newsymnode_227132(b));
	}
	goto LA1;
	LA3: ;
	{
		localerror_198955((*n).Info, ((NU16) 139), ((NimStringDesc*) &TMP2890));
	}
	LA1: ;
}

N_NIMCALL(void, sideeffectscheck_491615)(tcontext291021* c, tsym226846* s) {
	{
		if (!((3072 & (*s).Flags) == 3072)) goto LA3;
		localerror_198955((*s).Info, ((NU16) 217), (*(*s).Name).S);
	}
	LA3: ;
}

N_NIMCALL(tnode226816*, semprocaux_526170)(tcontext291021* c, tnode226816* n, NU8 kind, tspecialwords205012 validpragmas, NU8 phase) {
	tnode226816* result;
	tsym226846* s;
	NIM_BOOL typeisdetermined;
	NIM_BOOL isanon;
	tscope226840* oldscope;
	tscope226840* LOC25;
	tnode226816* gp;
	tsym226846* proto;
	result = 0;
	result = semprocannotation_525247(c, n);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = n;
	checksonslen_292415(n, 7);
	s = 0;
	typeisdetermined = NIM_FALSE;
	isanon = NIM_FALSE;
	{
		tnode226816* LOC7;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_227698(n, 0);
		if (!!(((*LOC7).Kind == ((NU8) 3)))) goto LA8;
		{
			tnode226816* LOC12;
			tsym226846* LOC15;
			LOC12 = 0;
			LOC12 = HEX5BHEX5D_227698(n, 0);
			if (!((*LOC12).Kind == ((NU8) 1))) goto LA13;
			LOC15 = 0;
			LOC15 = getcurrowner_291255();
			s = newsym_227074(kind, idanon_201504, LOC15, (*n).Info);
			isanon = NIM_TRUE;
		}
		goto LA10;
		LA13: ;
		{
			s = semidentdef_520665(c, (*n).kindU.S6.Sons->data[0], kind);
		}
		LA10: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227132(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_296855(c, (*c).Currentscope, s);
			(*s).Flags |= ((NI32)1)<<((((NU8) 4))%(sizeof(NI32)*8));
			goto BeforeRet;
		}
		LA21: ;
	}
	goto LA5;
	LA8: ;
	{
		tnode226816* LOC24;
		LOC24 = 0;
		LOC24 = HEX5BHEX5D_227698(n, 0);
		s = (*LOC24).kindU.S4.Sym;
		asgnRefNoCycle((void**) (&(*s).Owner), getcurrowner_291255());
		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_291260(s);
	LOC25 = 0;
	LOC25 = openscope_296191(c);
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA28;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_505001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA26;
	LA28: ;
	{
		gp = newnodei_227138(((NU8) 75), (*n).Info);
	}
	LA26: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA33;
		semparamlist_488284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NI LOC37;
			LOC37 = 0;
			LOC37 = sonslen_227249(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_291213(((NU8) 25), c));
		rawaddson_231562((*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_507110(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_310414(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: ;
		{
			toptionentry291005* LOC62;
			LOC62 = 0;
			LOC62 = lastoptionentry_291175(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_296855(c, (*s).kindU.S2.Scope, s);
			}
			LA72: ;
		}
		goto LA63;
		LA68: ;
		{
			{
				if (!!(typeisdetermined)) goto LA77;
				addinterfacedeclat_296779(c, (*s).kindU.S2.Scope, s);
			}
			LA77: ;
		}
		LA63: ;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA81;
			pragma_311079(c, s, (*n).kindU.S6.Sons->data[4], validpragmas);
		}
		goto LA79;
		LA81: ;
		{
			implicitpragmas_316398(c, s, n, validpragmas);
		}
		LA79: ;
	}
	goto LA53;
	LA55: ;
	{
		tscope226840* LOC93;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA87;
			localerror_198955((*(*n).kindU.S6.Sons->data[4]).Info, ((NU16) 136), ((NimStringDesc*) &TMP2890));
		}
		LA87: ;
		{
			if (!!((((*proto).Flags &(1<<((((NU8) 4))&31)))!=0))) goto LA91;
			wrongredefinition_296675((*n).Info, (*(*proto).Name).S);
		}
		LA91: ;
		(*proto).Flags &= ~(((NI32)1) << ((((NU8) 4)) % (sizeof(NI32)*8)));
		closescope_296211(c);
		LOC93 = 0;
		LOC93 = openscope_296191(c);
		{
			if (!!(((*(*(*proto).Ast).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA96;
			addgenericparamlisttoscope_523747(c, (*(*proto).Ast).kindU.S6.Sons->data[2]);
		}
		LA96: ;
		addparams_488293(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_198987((*n).Info, ((NimStringDesc*) &TMP3048));
		}
		LA100: ;
		asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym), proto);
		{
			NIM_BOOL LOC104;
			NimStringDesc* LOC108;
			LOC104 = 0;
			LOC104 = importantcomments_170156();
			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_291266();
		pushowner_291260(s);
	}
	LA53: ;
	(*s).Options = goptions_170116;
	{
		if (!(((*s).Flags &(1<<((((NU8) 30))&31)))!=0)) goto LA111;
		semoverride_526035(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_198955((*(*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_489015(c, (*s).Typ);
			}
			LA129: ;
			pushproccon_291380(c, s);
			maybeaddresult_488301(c, s, n);
			{
				tnode226816* sembody;
				tnode226816* LOC135;
				if (!!((((*s).Flags &(1<<((((NU8) 5))&31)))!=0))) goto LA133;
				LOC135 = 0;
				LOC135 = semprocbody_488238(c, (*n).kindU.S6.Sons->data[6]);
				sembody = hlobody_490479(c, LOC135);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_442373((*c).Module, sembody, s));
			}
			LA133: ;
			popproccon_291425(c);
		}
		goto LA121;
		LA125: ;
		{
			intset223056 tobind;
			{
				NIM_BOOL LOC139;
				tident201021* LOC143;
				tsym226846* 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_201472(((NimStringDesc*) &TMP2925));
				LOC144 = 0;
				LOC144 = newsym_227074(((NU8) 0), LOC143, NIM_NIL, (*n).Info);
				adddecl_296694(c, LOC144);
			}
			LA141: ;
			memset((void*)(&tobind), 0, sizeof(tobind));
			chckNil((void*)(&tobind));
			memset((void*)(&tobind), 0, sizeof(tobind));
			initintset_223950((&tobind));
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semgenericstmtscope_511240(c, (*n).kindU.S6.Sons->data[6], 0, (&tobind)));
			fixupinstantiatedsymbols_491553(c, s);
		}
		LA121: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 5))&31)))!=0)) goto LA147;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), emptynode_227738);
		}
		LA147: ;
	}
	goto LA113;
	LA115: ;
	{
		{
			if (!!((proto == NIM_NIL))) goto LA152;
			localerror_198955((*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_525035(c, n, s);
		}
		goto LA154;
		LA161: ;
		LA154: ;
	}
	LA113: ;
	sideeffectscheck_491615(c, s);
	closescope_296211(c);
	asgnRef((void**) (&(*c).Currentscope), oldscope);
	popowner_291266();
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA165;
		(*c).Patterns = (tsymseq226818*) incrSeq(&((*c).Patterns)->Sup, sizeof(tsym226846*));
		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_492327)(tcontext291021* c, tsym226846* s) {
	tnode226816* LOC5;
	{
		if (!!(((*s).Typ == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = semprocaux_526170(c, (*s).Ast, (*s).Kind, TMP3229, ((NU8) 1));
	BeforeRet: ;
}

N_NIMCALL(void, pickbestcandidate_492331)(tcontext291021* c, tnode226816* headsymbol, tnode226816* n, tnode226816* orig, tnode226816* initialbinding, NU32 filter, tcandidate406209* best, tcandidate406209* alt, tsymseq226818** errors) {
	toverloaditer296491 o;
	tsym226846* sym;
	NI symscope;
	tcandidate406209 z;
	memset((void*)(&o), 0, sizeof(o));
	sym = initoverloaditer_297665((&o), c, headsymbol);
	symscope = lastoverloadscope_298011((&o));
	memset((void*)(&z), 0, sizeof(z));
	{
		if (!(sym == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	initcandidate_406295(c, best, sym, initialbinding, symscope);
	initcandidate_406295(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_492327(c, sym);
				LOC11 = 0;
				LOC11 = lastoverloadscope_298011((&o));
				initcandidate_406295(c, (&z), sym, initialbinding, LOC11);
				z.Calleesym = sym;
				matches_415382(c, n, orig, (&z));
				{
					NIM_BOOL LOC14;
					LOC14 = 0;
					LOC14 = HEX3DHEX3D_492401((*errors), NIM_NIL);
					if (!!(LOC14)) goto LA15;
					safeadd_492544(errors, sym);
					{
						NIM_BOOL LOC19;
						LOC19 = 0;
						LOC19 = HEX3DHEX3D_492401(z.Errors, NIM_NIL);
						if (!!(LOC19)) goto LA20;
						{
							tsym226846* err_492642;
							tsymseq226818* HEX3Atmp_492703;
							NI i_492706;
							NI l_492708;
							err_492642 = 0;
							HEX3Atmp_492703 = 0;
							HEX3Atmp_492703 = z.Errors;
							i_492706 = 0;
							l_492708 = HEX3Atmp_492703->Sup.len;
							{
								while (1) {
									if (!(i_492706 < l_492708)) goto LA24;
									err_492642 = HEX3Atmp_492703->data[i_492706];
									(*errors) = (tsymseq226818*) incrSeq(&((*errors))->Sup, sizeof(tsym226846*));
									asgnRefNoCycle((void**) (&(*errors)->data[(*errors)->Sup.len-1]), err_492642);
									i_492706 += 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), (&NTI406209));
					}
					break;
					case ((NU8) 1):
					{
						NI cmp;
						cmp = cmpcandidates_407039((&(*best)), (&z));
						{
							if (!(cmp < 0)) goto LA37;
							genericAssign((void*)(&(*best)), (void*)(&z), (&NTI406209));
						}
						goto LA35;
						LA37: ;
						{
							if (!(cmp == 0)) goto LA40;
							genericAssign((void*)(&(*alt)), (void*)(&z), (&NTI406209));
						}
						goto LA35;
						LA40: ;
						{
						}
						LA35: ;
					}
					break;
					}
				}
				LA27: ;
			}
			LA9: ;
			sym = nextoverloaditer_298032((&o), c, headsymbol);
		} LA6: ;
	}
	BeforeRet: ;
}

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

N_NIMCALL(void, notfounderror_492727)(tcontext291021* c, tnode226816* n_492730, tsymseq226818* errors) {
	NimStringDesc* proto;
	NU8 prefer;
	NimStringDesc* result;
	NimStringDesc* LOC32;
	NimStringDesc* candidates;
	{
		if (!(0 < (*c).Incompilescontext)) goto LA3;
		globalerror_198934((*n_492730).Info, ((NU16) 129), ((NimStringDesc*) &TMP2890));
	}
	LA3: ;
	{
		tnode226816* LOC9;
		NimStringDesc* LOC10;
		if (!(errors->Sup.len == 0)) goto LA7;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_227698(n_492730, 0);
		LOC10 = 0;
		LOC10 = rendertree_251058(LOC9, 0);
		localerror_198955((*n_492730).Info, ((NU16) 88), LOC10);
	}
	LA7: ;
	proto = describeargs_407200(c, n_492730, 1, ((NU8) 0));
	prefer = ((NU8) 0);
	{
		tsym226846* err_492758;
		NI i_492836;
		NI l_492838;
		err_492758 = 0;
		i_492836 = 0;
		l_492838 = errors->Sup.len;
		{
			while (1) {
				NimStringDesc* errproto;
				tnode226816* n;
				if (!(i_492836 < l_492838)) goto LA13;
				err_492758 = errors->data[i_492836];
				errproto = copyString(((NimStringDesc*) &TMP2890));
				n = (*(*err_492758).Typ).N;
				{
					NI i_492773;
					NI HEX3Atmp_492829;
					NI LOC15;
					NI res_492832;
					i_492773 = 0;
					HEX3Atmp_492829 = 0;
					LOC15 = 0;
					LOC15 = len_227364(n);
					HEX3Atmp_492829 = (NI64)(LOC15 - 1);
					res_492832 = 1;
					{
						while (1) {
							tnode226816* p;
							if (!(res_492832 <= HEX3Atmp_492829)) goto LA17;
							i_492773 = res_492832;
							p = (*n).kindU.S6.Sons->data[i_492773];
							{
								NimStringDesc* LOC22;
								if (!((*p).Kind == ((NU8) 3))) goto LA20;
								LOC22 = 0;
								LOC22 = typetostring_264031((*(*p).kindU.S4.Sym).Typ, ((NU8) 0));
								errproto = resizeString(errproto, LOC22->Sup.len + 0);
appendString(errproto, LOC22);
								{
									NI LOC25;
									LOC25 = 0;
									LOC25 = len_227364(n);
									if (!!((i_492773 == (NI64)(LOC25 - 1)))) goto LA26;
									errproto = resizeString(errproto, 2);
appendString(errproto, ((NimStringDesc*) &TMP3236));
								}
								LA26: ;
							}
							LA20: ;
							res_492832 += 1;
						} LA17: ;
					}
				}
				{
					if (!eqStrings(errproto, proto)) goto LA30;
					prefer = ((NU8) 3);
					goto LA11;
				}
				LA30: ;
				i_492836 += 1;
			} LA13: ;
		}
	} LA11: ;
	result = msgkindtostring_198378(((NU16) 129));
	LOC32 = 0;
	LOC32 = describeargs_407200(c, n_492730, 1, prefer);
	result = resizeString(result, LOC32->Sup.len + 0);
appendString(result, LOC32);
	result = addChar(result, 41);
	candidates = copyString(((NimStringDesc*) &TMP2890));
	{
		tsym226846* err_492826;
		NI i_492842;
		NI l_492844;
		err_492826 = 0;
		i_492842 = 0;
		l_492844 = errors->Sup.len;
		{
			while (1) {
				NimStringDesc* LOC36;
				if (!(i_492842 < l_492844)) goto LA35;
				err_492826 = errors->data[i_492842];
				LOC36 = 0;
				LOC36 = getprocheader_264519(err_492826, prefer);
				candidates = resizeString(candidates, LOC36->Sup.len + 0);
appendString(candidates, LOC36);
				candidates = resizeString(candidates, 1);
appendString(candidates, ((NimStringDesc*) &TMP3237));
				i_492842 += 1;
			} LA35: ;
		}
	}
	{
		NimStringDesc* LOC41;
		NimStringDesc* LOC42;
		if (!!(((candidates) && (candidates)->Sup.len == 0))) goto LA39;
		LOC41 = 0;
		LOC42 = 0;
		LOC42 = msgkindtostring_198378(((NU16) 130));
		LOC41 = rawNewString(LOC42->Sup.len + candidates->Sup.len + 2);
appendString(LOC41, ((NimStringDesc*) &TMP3237));
appendString(LOC41, LOC42);
appendString(LOC41, ((NimStringDesc*) &TMP3237));
appendString(LOC41, candidates);
		result = resizeString(result, LOC41->Sup.len + 0);
appendString(result, LOC41);
	}
	LA39: ;
	localerror_198955((*n_492730).Info, ((NU16) 4), result);
}

N_NIMCALL(NIM_BOOL, samemethoddispatcher_492237)(tsym226846* a, tsym226846* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	{
		NIM_BOOL LOC3;
		tnode226816* aa;
		tnode226816* bb;
		LOC3 = 0;
		LOC3 = ((*a).Kind == ((NU8) 13));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*b).Kind == ((NU8) 13));
		LA4: ;
		if (!LOC3) goto LA5;
		aa = lastson_227261((*a).Ast);
		bb = lastson_227261((*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_493017)(tcontext291021* c, tnode226816* n, tnode226816* orig, NU32 filter, tcandidate406209* Result) {
	tnode226816* initialbinding;
	tcandidate406209 alt;
	tnode226816* f;
	tsymseq226818* errors;
	tnodeseq226810* 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_492875(c, (&usedsyms));
	{
		NIM_BOOL LOC8;
		tnode226816* hiddenarg;
		LOC8 = 0;
		LOC8 = HEX3DHEX3D_316667(usedsyms, NIM_NIL);
		if (!!(LOC8)) goto LA9;
		{
			if (!(1 < usedsyms->Sup.len)) goto LA13;
			hiddenarg = newnode_229207(((NU8) 56), (*n).Info, usedsyms, NIM_NIL);
		}
		goto LA11;
		LA13: ;
		{
			hiddenarg = usedsyms->data[0];
		}
		LA11: ;
		insert_493119((&(*n).kindU.S6.Sons), hiddenarg, 1);
		insert_493119((&(*orig).kindU.S6.Sons), hiddenarg, 1);
		pickbestcandidate_492331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
		{
			if (!!(((*Result).State == ((NU8) 1)))) goto LA18;
			delete_493248((&(*n).kindU.S6.Sons), 1);
			delete_493248((&(*orig).kindU.S6.Sons), 1);
		}
		goto LA16;
		LA18: ;
		{
			goto BeforeRet;
		}
		LA16: ;
	}
	LA9: ;
	pickbestcandidate_492331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
	overloadsstate = (*Result).State;
	{
		if (!!((overloadsstate == ((NU8) 1)))) goto LA23;
		{
			tnode226816* calleename;
			tnode226816* LOC37;
			slice84178 LOC38;
			TY538311 LOC39;
			slice84178 LOC40;
			TY538311 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_227249(n);
				LOC31 = (2 <= LOC33);
				LA32: ;
				if (!!(LOC31)) goto LA34;
				LOC36 = 0;
				LOC36 = HEX24_199126(TMP3230);
				internalerror_199006(LOC36);
			}
			LA34: ;
			LOC37 = 0;
			LOC37 = newstrnode_227118(((NU8) 20), (*(*f).kindU.S5.Ident).S);
			calleename = withinfo_228694(LOC37, (*n).Info);
			LOC38 = HEX2EHEX2E_92299(0, 1);
			memset((void*)LOC39, 0, sizeof(LOC39));
			LOC39[0] = NIM_NIL;
			LOC39[1] = HEX5BHEX5D_227698(n, 1);
			LOC39[2] = calleename;
			HEX5BHEX5DHEX3D_493447((&(*n).kindU.S6.Sons), LOC38, LOC39, 3);
			LOC40 = HEX2EHEX2E_92299(0, 1);
			memset((void*)LOC41, 0, sizeof(LOC41));
			LOC41[0] = NIM_NIL;
			LOC41[1] = HEX5BHEX5D_227698(orig, 1);
			LOC41[2] = calleename;
			HEX5BHEX5DHEX3D_493447((&(*orig).kindU.S6.Sons), LOC40, LOC41, 3);
			{
				tnode226816* op_493796;
				tident201021* LOC46;
				if (!(((*n).Flags &(1<<((((NU8) 10))&15)))!=0)) goto LA44;
				LOC46 = 0;
				LOC46 = getident_201472(((NimStringDesc*) &TMP3232));
				op_493796 = newidentnode_227125(LOC46, (*n).Info);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), op_493796);
				asgnRefNoCycle((void**) (&(*orig).kindU.S6.Sons->data[0]), op_493796);
				pickbestcandidate_492331(c, op_493796, n, orig, initialbinding, filter, Result, (&alt), (&errors));
			}
			LA44: ;
			{
				tnode226816* op_493843;
				tident201021* LOC51;
				if (!((5 &(1<<(((*Result).State)&7)))!=0)) goto LA49;
				LOC51 = 0;
				LOC51 = getident_201472(((NimStringDesc*) &TMP3233));
				op_493843 = newidentnode_227125(LOC51, (*n).Info);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), op_493843);
				asgnRefNoCycle((void**) (&(*orig).kindU.S6.Sons->data[0]), op_493843);
				pickbestcandidate_492331(c, op_493843, n, orig, initialbinding, filter, Result, (&alt), (&errors));
			}
			LA49: ;
		}
		goto LA25;
		LA27: ;
		{
			tnode226816* calleename;
			slice84178 LOC63;
			NimStringDesc* LOC64;
			tnode226816* LOC65;
			tnode226816* callop;
			tident201021* LOC66;
			slice84178 LOC67;
			TY538311 LOC68;
			slice84178 LOC69;
			TY538311 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_227249(n);
				LOC57 = (LOC59 == 3);
				LA58: ;
				if (!!(LOC57)) goto LA60;
				LOC62 = 0;
				LOC62 = HEX24_199126(TMP3234);
				internalerror_199006(LOC62);
			}
			LA60: ;
			LOC63 = HEX2EHEX2E_92299(0, -2);
			LOC64 = 0;
			LOC64 = HEX5BHEX5D_84171((*(*f).kindU.S5.Ident).S, LOC63);
			LOC65 = 0;
			LOC65 = newstrnode_227118(((NU8) 20), LOC64);
			calleename = withinfo_228694(LOC65, (*n).Info);
			LOC66 = 0;
			LOC66 = getident_201472(((NimStringDesc*) &TMP3235));
			callop = newidentnode_227125(LOC66, (*n).Info);
			LOC67 = HEX2EHEX2E_92299(0, 1);
			memset((void*)LOC68, 0, sizeof(LOC68));
			LOC68[0] = callop;
			LOC68[1] = HEX5BHEX5D_227698(n, 1);
			LOC68[2] = calleename;
			HEX5BHEX5DHEX3D_493447((&(*n).kindU.S6.Sons), LOC67, LOC68, 3);
			LOC69 = HEX2EHEX2E_92299(0, 1);
			memset((void*)LOC70, 0, sizeof(LOC70));
			LOC70[0] = callop;
			LOC70[1] = HEX5BHEX5D_227698(orig, 1);
			LOC70[2] = calleename;
			HEX5BHEX5DHEX3D_493447((&(*orig).kindU.S6.Sons), LOC69, LOC70, 3);
			pickbestcandidate_492331(c, callop, n, orig, initialbinding, filter, Result, (&alt), (&errors));
		}
		goto LA25;
		LA53: ;
		LA25: ;
		{
			NIM_BOOL LOC73;
			tident201021* 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_296010(f);
			localerror_198955((*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_251058(n, 4);
				localerror_198955((*n).Info, ((NU16) 88), LOC85);
			}
			goto LA81;
			LA83: ;
			{
				{
					if (!!(((768 & (*n).Flags) == 0))) goto LA89;
					delete_493248((&(*n).kindU.S6.Sons), 2);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), f);
				}
				LA89: ;
				errors = (tsymseq226818*) newSeq((&NTI226818), 0);
				pickbestcandidate_492331(c, f, n, orig, initialbinding, filter, Result, (&alt), (&errors));
				notfounderror_492727(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_407039(Result, (&alt));
		LOC94 = (LOC96 == 0);
		LA95: ;
		LOC93 = LOC94;
		if (!(LOC93)) goto LA97;
		LOC98 = 0;
		LOC98 = samemethoddispatcher_492237((*Result).Calleesym, alt.Calleesym);
		LOC93 = !(LOC98);
		LA97: ;
		if (!LOC93) goto LA99;
		{
			NimStringDesc* LOC105;
			if (!!(((*Result).State == ((NU8) 1)))) goto LA103;
			LOC105 = 0;
			LOC105 = HEX24_199126(TMP3238);
			internalerror_199006(LOC105);
		}
		LA103: ;
		{
			if (!(0 < (*c).Incompilescontext)) goto LA108;
			globalerror_198934((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3239));
		}
		goto LA106;
		LA108: ;
		{
			NimStringDesc* args;
			NimStringDesc* LOC122;
			TY209063 LOC123;
			NimStringDesc* LOC124;
			if (!(gerrorcounter_197303 == 0)) goto LA111;
			args = copyString(((NimStringDesc*) &TMP3240));
			{
				NI i_494247;
				NI HEX3Atmp_494272;
				NI LOC114;
				NI res_494275;
				i_494247 = 0;
				HEX3Atmp_494272 = 0;
				LOC114 = 0;
				LOC114 = sonslen_227249(n);
				HEX3Atmp_494272 = (NI64)(LOC114 - 1);
				res_494275 = 1;
				{
					while (1) {
						NimStringDesc* LOC121;
						if (!(res_494275 <= HEX3Atmp_494272)) goto LA116;
						i_494247 = res_494275;
						{
							if (!(1 < i_494247)) goto LA119;
							args = resizeString(args, 2);
appendString(args, ((NimStringDesc*) &TMP3236));
						}
						LA119: ;
						LOC121 = 0;
						LOC121 = typetostring_264031((*(*n).kindU.S6.Sons->data[i_494247]).Typ, ((NU8) 0));
						args = resizeString(args, LOC121->Sup.len + 0);
appendString(args, LOC121);
						res_494275 += 1;
					} LA116: ;
				}
			}
			args = resizeString(args, 1);
appendString(args, ((NimStringDesc*) &TMP2912));
			LOC122 = 0;
			LOC122 = msgkindtostring_198378(((NU16) 132));
			memset((void*)LOC123, 0, sizeof(LOC123));
			LOC123[0] = getprocheader_264519((*Result).Calleesym, ((NU8) 0));
			LOC123[1] = getprocheader_264519(alt.Calleesym, ((NU8) 0));
			LOC123[2] = copyString(args);
			LOC124 = 0;
			LOC124 = nsuFormatOpenArray(LOC122, LOC123, 3);
			localerror_198955((*n).Info, ((NU16) 4), LOC124);
		}
		goto LA106;
		LA111: ;
		LA106: ;
	}
	LA99: ;
	BeforeRet: ;
}

N_NIMCALL(void, instgenericconverterssons_494428)(tcontext291021* c, tnode226816* n, tcandidate406209* x) {
	{
		if (!(*x).Genericconverter) goto LA3;
		{
			NI i_494622;
			NI HEX3Atmp_494638;
			NI LOC6;
			NI res_494641;
			i_494622 = 0;
			HEX3Atmp_494638 = 0;
			LOC6 = 0;
			LOC6 = len_227364(n);
			HEX3Atmp_494638 = (LOC6 - 1);
			res_494641 = 1;
			{
				while (1) {
					if (!(res_494641 <= HEX3Atmp_494638)) goto LA8;
					i_494622 = res_494641;
					instgenericconvertersarg_494289(c, (*n).kindU.S6.Sons->data[i_494622], x);
					res_494641 += 1;
				} LA8: ;
			}
		}
	}
	LA3: ;
}

N_NIMCALL(tnode226816*, semresolvedcall_494735)(tcontext291021* c, tnode226816* n, tcandidate406209* x) {
	tnode226816* result;
	tsym226846* finalcallee;
	result = 0;
	finalcallee = (*x).Calleesym;
	markused_406251((*(*n).kindU.S6.Sons->data[0]).Info, finalcallee);
	{
		if (!((*finalcallee).Ast == NIM_NIL)) goto LA3;
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3241));
	}
	LA3: ;
	{
		if (!!(((*(*(*finalcallee).Ast).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA7;
		{
			if (!!((*x).Proxymatch)) goto LA11;
			finalcallee = generateinstance_491802(c, (*x).Calleesym, (*x).Bindings, (*n).Info);
		}
		goto LA9;
		LA11: ;
		{
			result = (*x).Call;
			asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_228754(finalcallee, (*(*result).kindU.S6.Sons->data[0]).Info));
			asgnRefNoCycle((void**) (&(*result).Typ), (*(*finalcallee).Typ).Sons->data[0]);
			{
				NIM_BOOL LOC16;
				LOC16 = 0;
				LOC16 = containsgenerictype_273929((*result).Typ);
				if (!LOC16) goto LA17;
				asgnRefNoCycle((void**) (&(*result).Typ), errortype_292318(c));
			}
			LA17: ;
			goto BeforeRet;
		}
		LA9: ;
	}
	LA7: ;
	result = (*x).Call;
	instgenericconverterssons_494428(c, result, x);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_228754(finalcallee, (*(*result).kindU.S6.Sons->data[0]).Info));
	asgnRefNoCycle((void**) (&(*result).Typ), (*(*finalcallee).Typ).Sons->data[0]);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semoverloadedcall_495100)(tcontext291021* c, tnode226816* n, tnode226816* norig, NU32 filter) {
	tnode226816* result;
	tcandidate406209 r;
	result = 0;
	memset((void*)(&r), 0, sizeof(r));
	chckNil((void*)(&r));
	memset((void*)(&r), 0, sizeof(r));
	resolveoverloads_493017(c, n, norig, filter, (&r));
	{
		if (!(r.State == ((NU8) 1))) goto LA3;
		result = semresolvedcall_494735(c, n, (&r));
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, semoverloadedcallanalyseeffects_535249)(tcontext291021* c, tnode226816* n, tnode226816* norig, NU16 flags) {
	tnode226816* result;
	result = 0;
	{
		if (!!(((flags & 6) == 0))) goto LA3;
		result = semoverloadedcall_495100(c, n, norig, 520192);
	}
	goto LA1;
	LA3: ;
	{
		result = semoverloadedcall_495100(c, n, norig, 471040);
	}
	LA1: ;
	{
		tsym226846* callee;
		if (!!((result == NIM_NIL))) goto LA8;
		{
			if (!!(((*(*result).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA12;
			internalerror_199006(((NimStringDesc*) &TMP3242));
			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_198955((*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(tnode226816*, propertywriteaccess_538285)(tcontext291021* c, tnode226816* n, tnode226816* norig, tnode226816* a) {
	tnode226816* result;
	tident201021* id;
	tnode226816* LOC1;
	tnode226816* setterid;
	NimStringDesc* LOC2;
	tident201021* LOC3;
	tnode226816* aorig;
	tnodeseq226810* LOC4;
	TY538311 LOC5;
	tnode226816* LOC6;
	tnode226816* orig;
	tnodeseq226810* LOC7;
	TY538311 LOC8;
	result = 0;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(a, 1);
	id = considerquotedident_296010(LOC1);
	LOC2 = 0;
	LOC2 = rawNewString((*id).S->Sup.len + 1);
appendString(LOC2, (*id).S);
appendChar(LOC2, 61);
	LOC3 = 0;
	LOC3 = getident_201472(LOC2);
	setterid = newidentnode_227125(LOC3, (*n).Info);
	aorig = HEX5BHEX5D_227698(norig, 0);
	LOC4 = 0;
	LOC4 = (tnodeseq226810*) newSeq((&NTI226810), 3);
	memset((void*)LOC5, 0, sizeof(LOC5));
	LOC5[0] = setterid;
	LOC5[1] = HEX5BHEX5D_227698(a, 0);
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_227698(n, 1);
	LOC5[2] = semexpr_488201(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_229207(((NU8) 27), (*n).Info, LOC4, NIM_NIL);
	(*result).Flags |= ((NI16)1)<<((((NU8) 9))%(sizeof(NI16)*8));
	LOC7 = 0;
	LOC7 = (tnodeseq226810*) newSeq((&NTI226810), 3);
	memset((void*)LOC8, 0, sizeof(LOC8));
	LOC8[0] = setterid;
	LOC8[1] = HEX5BHEX5D_227698(aorig, 0);
	LOC8[2] = HEX5BHEX5D_227698(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_229207(((NU8) 27), (*n).Info, LOC7, NIM_NIL);
	result = semoverloadedcallanalyseeffects_535249(c, result, orig, 0);
	{
		if (!!((result == NIM_NIL))) goto LA11;
		result = aftercallactions_536063(c, result, norig, 0);
	}
	LA11: ;
	return result;
}

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

N_NIMCALL(tnode226816*, dottransformation_537736)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode226816* LOC6;
		tnode226816* LOC7;
		LOC3 = 0;
		LOC3 = issymchoice_531121((*n).kindU.S6.Sons->data[1]);
		if (!LOC3) goto LA4;
		result = newnodei_227138(((NU8) 25), (*n).Info);
		addson_227287(result, (*n).kindU.S6.Sons->data[1]);
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_227698(n, 0);
		LOC7 = 0;
		LOC7 = copytree_227329(LOC6);
		addson_227287(result, LOC7);
	}
	goto LA1;
	LA4: ;
	{
		tident201021* i;
		tnode226816* LOC9;
		tnode226816* LOC10;
		tnode226816* LOC11;
		tnode226816* LOC12;
		i = considerquotedident_296010((*n).kindU.S6.Sons->data[1]);
		result = newnodei_227138(((NU8) 25), (*n).Info);
		(*result).Flags |= ((NI16)1)<<((((NU8) 8))%(sizeof(NI16)*8));
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_227698(n, 1);
		LOC10 = 0;
		LOC10 = newidentnode_227125(i, (*LOC9).Info);
		addson_227287(result, LOC10);
		LOC11 = 0;
		LOC11 = HEX5BHEX5D_227698(n, 0);
		LOC12 = 0;
		LOC12 = copytree_227329(LOC11);
		addson_227287(result, LOC12);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semderef_537863)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* t;
	result = 0;
	checksonslen_292415(n, 1);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
	result = n;
	t = skiptypes_231245((*(*n).kindU.S6.Sons->data[0]).Typ, 8390656);
	switch ((*t).Kind) {
	case ((NU8) 22):
	case ((NU8) 21):
	{
		asgnRefNoCycle((void**) (&(*n).Typ), lastson_227267(t));
	}
	break;
	default:
	{
		result = NIM_NIL;
	}
	break;
	}
	return result;
}

N_NIMCALL(tnode226816*, semsubscript_537915)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	ttype226852* arr;
	result = 0;
	{
		NI LOC3;
		tnode226816* x;
		tnode226816* LOC10;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 1)) goto LA4;
		x = semderef_537863(c, n);
		{
			if (!(x == NIM_NIL)) goto LA8;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA8: ;
		result = newnodeit_227145(((NU8) 47), (*x).Info, (*x).Typ);
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_227698(x, 0);
		add_227498(result, LOC10);
		goto BeforeRet;
	}
	LA4: ;
	checkminsonslen_292425(n, 2);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
	arr = skiptypes_231245((*(*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):
	{
		ttype226852* indextype;
		tnode226816* arg;
		{
			NI LOC14;
			LOC14 = 0;
			LOC14 = len_227364(n);
			if (!!((LOC14 == 2))) goto LA15;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA15: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_536595((*n).kindU.S6.Sons->data[0]));
		{
			NI i_538023;
			NI HEX3Atmp_538242;
			NI LOC18;
			NI res_538245;
			i_538023 = 0;
			HEX3Atmp_538242 = 0;
			LOC18 = 0;
			LOC18 = sonslen_227249(n);
			HEX3Atmp_538242 = (NI64)(LOC18 - 1);
			res_538245 = 1;
			{
				while (1) {
					if (!(res_538245 <= HEX3Atmp_538242)) goto LA20;
					i_538023 = res_538245;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_538023]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[i_538023], (flags & 20)));
					res_538245 += 1;
				} LA20: ;
			}
		}
		{
			if (!((*arr).Kind == ((NU8) 16))) goto LA23;
			indextype = (*arr).Sons->data[0];
		}
		goto LA21;
		LA23: ;
		{
			indextype = getsystype_283030(((NU8) 31));
		}
		LA21: ;
		arg = indextypesmatch_488348(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_264656(arr));
		}
		LA28: ;
	}
	break;
	case ((NU8) 8):
	{
		ttype226852* LOC31;
		result = n;
		LOC31 = 0;
		LOC31 = semtypenode_488269(c, n, NIM_NIL);
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_291762(c, LOC31));
	}
	break;
	case ((NU8) 18):
	{
		checksonslen_292415(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), makederef_536595((*n).kindU.S6.Sons->data[0]));
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semconstexpr_489503(c, (*n).kindU.S6.Sons->data[1]));
		{
			ttype226852* LOC35;
			NI64 idx;
			LOC35 = 0;
			LOC35 = skiptypes_231245((*(*n).kindU.S6.Sons->data[1]).Typ, 1083392);
			if (!((IL64(66571993088) &(IL64(1)<<(((*LOC35).Kind)&IL64(63))))!=0)) goto LA36;
			idx = getordvalue_264187((*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_227255(arr);
				LOC40 = (idx < ((NI64) (LOC42)));
				LA41: ;
				if (!LOC40) goto LA43;
				asgnRefNoCycle((void**) (&(*n).Typ), (*arr).Sons->data[idx]);
			}
			goto LA38;
			LA43: ;
			{
				localerror_198955((*n).Info, ((NU16) 185), ((NimStringDesc*) &TMP2890));
			}
			LA38: ;
		}
		goto LA33;
		LA36: ;
		{
			localerror_198955((*n).Info, ((NU16) 83), ((NimStringDesc*) &TMP2890));
		}
		LA33: ;
		result = n;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, buildoverloadedsubscripts_537829)(tnode226816* n, tident201021* ident) {
	tnode226816* result;
	tnode226816* LOC1;
	result = 0;
	result = newnodei_227138(((NU8) 27), (*n).Info);
	LOC1 = 0;
	LOC1 = newidentnode_227125(ident, (*n).Info);
	add_227498(result, LOC1);
	{
		NI i_537844;
		NI HEX3Atmp_537846;
		NI LOC3;
		NI res_537849;
		i_537844 = 0;
		HEX3Atmp_537846 = 0;
		LOC3 = 0;
		LOC3 = len_227364(n);
		HEX3Atmp_537846 = (NI64)(LOC3 - 1);
		res_537849 = 0;
		{
			while (1) {
				tnode226816* LOC6;
				if (!(res_537849 <= HEX3Atmp_537846)) goto LA5;
				i_537844 = res_537849;
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_227698(n, i_537844);
				add_227498(result, LOC6);
				res_537849 += 1;
			} LA5: ;
		}
	}
	return result;
}

N_NIMCALL(void, typemismatch_488357)(tnode226816* n, ttype226852* formal, ttype226852* actual) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		NimStringDesc* LOC8;
		NimStringDesc* LOC9;
		NimStringDesc* LOC10;
		TY198301 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_198378(((NU16) 129));
		LOC9 = 0;
		LOC9 = typetostring_264031(actual, ((NU8) 0));
		LOC10 = 0;
		LOC10 = msgkindtostring_198378(((NU16) 131));
		memset((void*)LOC11, 0, sizeof(LOC11));
		LOC11[0] = typetostring_264031(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*) &TMP3246));
appendString(LOC7, LOC12);
		localerror_198955((*n).Info, ((NU16) 4), LOC7);
	}
	LA5: ;
}

N_NIMCALL(tnode226816*, takeimplicitaddr_538372)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NU8 valid;
	ttype226852* 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_227364(n);
			if (!(LOC6 == 1)) goto LA7;
			result = (*n).kindU.S6.Sons->data[0];
			goto BeforeRet;
		}
		LA7: ;
	}
	break;
	default:
	{
	}
	break;
	}
	valid = isassignable_533184(c, n);
	{
		if (!!((valid == ((NU8) 1)))) goto LA12;
		{
			NimStringDesc* LOC18;
			if (!(valid == ((NU8) 2))) goto LA16;
			LOC18 = 0;
			LOC18 = rendertree_251058(n, 4);
			localerror_198955((*n).Info, ((NU16) 126), LOC18);
		}
		goto LA14;
		LA16: ;
		{
			localerror_198955((*n).Info, ((NU16) 125), ((NimStringDesc*) &TMP2890));
		}
		LA14: ;
	}
	LA12: ;
	LOC20 = 0;
	LOC20 = makeptrtype_291199(c, (*n).Typ);
	result = newnodeit_227145(((NU8) 64), (*n).Info, LOC20);
	add_227498(result, n);
	BeforeRet: ;
	return result;
}

static N_INLINE(void, asgntoresultvar_538428)(tcontext291021* c, tnode226816* n, tnode226816* le, tnode226816* ri) {
	{
		tnode226816* 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_538372(c, ri));
		}
		LA11: ;
	}
	LA3: ;
}

N_NIMCALL(tnode226816*, semasgn_538534)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* a;
	ttype226852* le;
	result = 0;
	checksonslen_292415(n, 2);
	a = (*n).kindU.S6.Sons->data[0];
	switch ((*a).Kind) {
	case ((NU8) 45):
	{
		tnode226816* norig;
		norig = copytree_227329(n);
		a = builtinfieldaccess_536727(c, a, 1);
		{
			tnode226816* LOC6;
			tnode226816* LOC11;
			if (!(a == NIM_NIL)) goto LA4;
			LOC6 = 0;
			LOC6 = HEX5BHEX5D_227698(n, 0);
			a = propertywriteaccess_538285(c, n, norig, LOC6);
			{
				if (!!((a == NIM_NIL))) goto LA9;
				result = a;
				goto BeforeRet;
			}
			LA9: ;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_227698(n, 0);
			a = dottransformation_537736(c, LOC11);
			{
				if (!((*a).Kind == ((NU8) 25))) goto LA14;
				(*a).Kind = ((NU8) 27);
				a = semexprwithtype_488211(c, a, 1);
			}
			LA14: ;
		}
		LA4: ;
	}
	break;
	case ((NU8) 42):
	{
		a = semsubscript_537915(c, a, 1);
		{
			tident201021* LOC21;
			tnode226816* LOC22;
			if (!(a == NIM_NIL)) goto LA19;
			LOC21 = 0;
			LOC21 = getident_201472(((NimStringDesc*) &TMP3243));
			result = buildoverloadedsubscripts_537829((*n).kindU.S6.Sons->data[0], LOC21);
			LOC22 = 0;
			LOC22 = HEX5BHEX5D_227698(n, 1);
			add_227498(result, LOC22);
			result = semexprnotype_488221(c, result);
			goto BeforeRet;
		}
		LA19: ;
	}
	break;
	case ((NU8) 40):
	{
		tident201021* LOC24;
		tnode226816* LOC25;
		LOC24 = 0;
		LOC24 = getident_201472(((NimStringDesc*) &TMP3244));
		result = buildoverloadedsubscripts_537829((*n).kindU.S6.Sons->data[0], LOC24);
		LOC25 = 0;
		LOC25 = HEX5BHEX5D_227698(n, 1);
		add_227498(result, LOC25);
		result = semexprnotype_488221(c, result);
		goto BeforeRet;
	}
	break;
	default:
	{
		a = semexprwithtype_488211(c, a, 1);
	}
	break;
	}
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), a);
	le = (*a).Typ;
	{
		NIM_BOOL LOC29;
		ttype226852* LOC30;
		NU8 LOC32;
		NimStringDesc* LOC35;
		LOC29 = 0;
		LOC30 = 0;
		LOC30 = skiptypes_231245(le, 2048);
		LOC29 = !(((*LOC30).Kind == ((NU8) 23)));
		if (!(LOC29)) goto LA31;
		LOC32 = 0;
		LOC32 = isassignable_533184(c, a);
		LOC29 = (LOC32 == ((NU8) 0));
		LA31: ;
		if (!LOC29) goto LA33;
		LOC35 = 0;
		LOC35 = rendertree_251058(a, 4);
		localerror_198955((*a).Info, ((NU16) 176), LOC35);
	}
	goto LA27;
	LA33: ;
	{
		tnode226816* lhs;
		NIM_BOOL lhsisresult;
		NIM_BOOL LOC37;
		tnode226816* 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_488211(c, (*n).kindU.S6.Sons->data[1], LOC39);
		{
			if (!lhsisresult) goto LA47;
			asgnRefNoCycle((void**) (&(*n).Typ), enforcevoidcontext_516110);
			{
				NIM_BOOL LOC51;
				NIM_BOOL LOC53;
				LOC51 = 0;
				LOC51 = !(((*(*(*c).P).Owner).Kind == ((NU8) 17)));
				if (!(LOC51)) goto LA52;
				LOC53 = 0;
				LOC53 = ismetatype_227752((*(*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_412293(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_199126(TMP3245);
						internalerror_199006(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_488357(n, (*lhs).Typ, (*rhs).Typ);
				}
				LA57: ;
			}
			LA55: ;
		}
		LA47: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), fitnode_488245(c, le, rhs));
		fixabstracttype_532831(c, n);
		asgntoresultvar_538428(c, n, (*n).kindU.S6.Sons->data[0], (*n).kindU.S6.Sons->data[1]);
	}
	LA27: ;
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semprocbody_488238)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	result = semexpr_488201(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_233991((*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_518549(result);
		}
		goto LA9;
		LA21: ;
		{
			tnode226816* a;
			a = newnodei_229007(((NU8) 73), (*n).Info, 2);
			asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newsymnode_227132((*(*c).P).Resultsym));
			asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), result);
			result = semasgn_538534(c, a);
		}
		LA9: ;
	}
	goto LA2;
	LA7: ;
	{
		discardcheck_518617(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_227752((*(*(*c).P).Resultsym).Typ);
		LA30: ;
		if (!LOC27) goto LA31;
		localerror_198955((*(*(*c).P).Resultsym).Info, ((NU16) 226), ((NimStringDesc*) &TMP2890));
	}
	LA31: ;
	closescope_296211(c);
	return result;
}

N_NIMCALL(void, instantiatebody_491449)(tcontext291021* c, tnode226816* n, tsym226846* result) {
	{
		tnode226816* b;
		tidtable226864 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_227167((&symmap));
		freshgensyms_491201(b, result, (&symmap));
		b = semprocbody_488238(c, b);
		b = hlobody_490479(c, b);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_442373((*c).Module, b, result));
		(*result).Flags &= ~(((NI32)1) << ((((NU8) 4)) % (sizeof(NI32)*8)));
		(*c).Ingenericinst -= 1;
	}
	LA3: ;
}

static N_INLINE(tsym226846*, pop_438736)(tsymseq226818** s_438744) {
	tsym226846* result;
	NI l;
	result = 0;
	l = (NI64)((*s_438744)->Sup.len - 1);
	result = (*s_438744)->data[l];
	(*s_438744) = (tsymseq226818*) setLengthSeq(&((*s_438744))->Sup, sizeof(tsym226846*), l);
	return result;
}

N_NIMCALL(NIM_BOOL, hasobjparam_527844)(tsym226846* s) {
	NIM_BOOL result;
	ttype226852* t;
	result = 0;
	t = (*s).Typ;
	{
		NI col_527861;
		NI HEX3Atmp_527872;
		NI LOC2;
		NI res_527875;
		col_527861 = 0;
		HEX3Atmp_527872 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227255(t);
		HEX3Atmp_527872 = (NI64)(LOC2 - 1);
		res_527875 = 1;
		{
			while (1) {
				if (!(res_527875 <= HEX3Atmp_527872)) goto LA4;
				col_527861 = res_527875;
				{
					ttype226852* LOC7;
					LOC7 = 0;
					LOC7 = skiptypes_231245((*t).Sons->data[col_527861], IL64(211106247215360));
					if (!((*LOC7).Kind == ((NU8) 17))) goto LA8;
					result = NIM_TRUE;
					goto BeforeRet;
				}
				LA8: ;
				res_527875 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, finishmethod_488341)(tcontext291021* c, tsym226846* s) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = hasobjparam_527844(s);
		if (!LOC3) goto LA4;
		methoddef_423824(s, NIM_FALSE);
	}
	LA4: ;
}

N_NIMCALL(tsym226846*, generateinstance_491802)(tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info) {
	tsym226846* result;
	tnode226816* n;
	tsym226846* LOC9;
	tscope226840* LOC10;
	tinstantiation226836* entry;
	tsym226846* oldprc;
	tsym226846* LOC35;
	result = 0;
	{
		if (!((393216 &(1<<(((*fn).Kind)&31)))!=0)) goto LA3;
		result = fn;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(1000 < (*c).Instcounter)) goto LA7;
		internalerror_198987((*(*fn).Ast).Info, ((NimStringDesc*) &TMP2919));
	}
	LA7: ;
	(*c).Instcounter += 1;
	n = copytree_227329((*fn).Ast);
	LOC9 = 0;
	LOC9 = getmodule_236243(fn);
	(*c).Friendmodules = (tsymseq226818*) incrSeq(&((*c).Friendmodules)->Sup, sizeof(tsym226846*));
	asgnRefNoCycle((void**) (&(*c).Friendmodules->data[(*c).Friendmodules->Sup.len-1]), LOC9);
	result = copysym_227203(fn, NIM_FALSE);
	(*result).Flags |= ((NI32)1)<<((((NU8) 2))%(sizeof(NI32)*8));
	asgnRefNoCycle((void**) (&(*result).Owner), fn);
	asgnRefNoCycle((void**) (&(*result).Ast), n);
	pushowner_291260(result);
	LOC10 = 0;
	LOC10 = openscope_296191(c);
	{
		NimStringDesc* LOC15;
		if (!!(!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1))))) goto LA13;
		LOC15 = 0;
		LOC15 = HEX24_199126(TMP2920);
		internalerror_199006(LOC15);
	}
	LA13: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227132(result));
	pushinfocontext_197930(info);
	entry = new_491941();
	asgnRefNoCycle((void**) (&(*entry).Sym), result);
	instantiategenericparamlist_490543(c, (*n).kindU.S6.Sons->data[2], pt, entry);
	pushproccon_291380(c, result);
	instantiateproctype_491682(c, pt, result, info);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), emptynode_227738);
	oldprc = genericcacheget_490785(fn, (&(*entry)));
	{
		tinstantiationpair291013 LOC24;
		if (!(oldprc == NIM_NIL)) goto LA18;
		{
			if (!((*c).Incompilescontext == 0)) goto LA22;
			safeadd_492032((&(*fn).kindU.S2.Procinstcache), entry);
		}
		LA22: ;
		memset((void*)(&LOC24), 0, sizeof(LOC24));
		makeinstpair_291148(fn, entry, (&LOC24));
		(*c).Generics = (TY291133*) incrSeq(&((*c).Generics)->Sup, sizeof(tinstantiationpair291013));
		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_311079(c, result, (*n).kindU.S6.Sons->data[4], TMP2995);
		}
		LA27: ;
		{
			tnode226816* LOC33;
			if (!(*n).kindU.S6.Sons->data[6] == 0) goto LA31;
			LOC33 = 0;
			LOC33 = getbody_280269(fn);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), copytree_227329(LOC33));
		}
		LA31: ;
		instantiatebody_491449(c, n, result);
		sideeffectscheck_491615(c, result);
		paramstypecheck_489015(c, (*result).Typ);
	}
	goto LA16;
	LA18: ;
	{
		result = oldprc;
	}
	LA16: ;
	popproccon_291425(c);
	popinfocontext_197957();
	closescope_296211(c);
	popowner_291266();
	LOC35 = 0;
	LOC35 = pop_438736((&(*c).Friendmodules));
	(*c).Instcounter -= 1;
	{
		if (!((*result).Kind == ((NU8) 13))) goto LA38;
		finishmethod_488341(c, result);
	}
	LA38: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, instgenericconvertersarg_494289)(tcontext291021* c, tnode226816* a, tcandidate406209* x) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		tsym226846* 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_233650((*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym);
		LA6: ;
		if (!LOC3) goto LA7;
		finalcallee = generateinstance_491802(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(tnode226816*, indextypesmatch_488348)(tcontext291021* c, ttype226852* f, ttype226852* a, tnode226816* arg) {
	tnode226816* result;
	tcandidate406209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406270(c, (&m), f);
	result = paramtypesmatch_413263((&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_494289(c, result, (&m));
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode226816*, fitnode_488245)(tcontext291021* c, ttype226852* formal, tnode226816* arg) {
	tnode226816* result;
	result = 0;
	{
		NimStringDesc* LOC5;
		if (!(*arg).Typ == 0) goto LA3;
		LOC5 = 0;
		LOC5 = rendertree_251058(arg, 4);
		localerror_198955((*arg).Info, ((NU16) 90), LOC5);
		result = copynode_227323(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), formal);
	}
	goto LA1;
	LA3: ;
	{
		result = indextypesmatch_488348(c, formal, (*arg).Typ, arg);
		{
			if (!(result == NIM_NIL)) goto LA9;
			typemismatch_488357(arg, formal, (*arg).Typ);
			result = copytree_227329(arg);
			asgnRefNoCycle((void**) (&(*result).Typ), formal);
		}
		goto LA7;
		LA9: ;
		{
			tnode226816* x;
			x = skipconv_274732(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_488253(x, formal, NIM_TRUE);
			}
			LA16: ;
		}
		LA7: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semconstboolexpr_496064)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* nn;
	ttype226852* LOC1;
	result = 0;
	nn = semexprwithtype_488211(c, n, 0);
	LOC1 = 0;
	LOC1 = getsystype_283030(((NU8) 1));
	result = fitnode_488245(c, LOC1, nn);
	{
		if (!(result == NIM_NIL)) goto LA4;
		localerror_198955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
		result = nn;
		goto BeforeRet;
	}
	LA4: ;
	result = getconstexpr_305004((*c).Module, result);
	{
		if (!(result == NIM_NIL)) goto LA8;
		localerror_198955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
		result = nn;
	}
	LA8: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, forcebool_496036)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getsystype_283030(((NU8) 1));
	result = fitnode_488245(c, LOC1, n);
	{
		if (!(result == NIM_NIL)) goto LA4;
		result = n;
	}
	LA4: ;
	return result;
}

N_NIMCALL(tnode226816*, sembranchrange_499111)(tcontext291021* c, tnode226816* t, tnode226816* a, tnode226816* b, NI64* covered) {
	tnode226816* result;
	tnode226816* ac;
	tnode226816* bc;
	tnode226816* at;
	tnode226816* LOC1;
	tnode226816* bt;
	tnode226816* LOC2;
	result = 0;
	checkminsonslen_292425(t, 1);
	ac = semconstexpr_489503(c, a);
	bc = semconstexpr_489503(c, b);
	LOC1 = 0;
	LOC1 = fitnode_488245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, ac);
	at = skipconvtaketype_274816(LOC1);
	LOC2 = 0;
	LOC2 = fitnode_488245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, bc);
	bt = skipconvtaketype_274816(LOC2);
	result = newnodei_227138(((NU8) 44), (*a).Info);
	add_227498(result, at);
	add_227498(result, bt);
	{
		NIM_BOOL LOC5;
		LOC5 = 0;
		LOC5 = emptyrange_285034(ac, bc);
		if (!LOC5) goto LA6;
		localerror_198955((*b).Info, ((NU16) 106), ((NimStringDesc*) &TMP2890));
	}
	goto LA3;
	LA6: ;
	{
		NI64 LOC9;
		NI64 LOC10;
		LOC9 = 0;
		LOC9 = getordvalue_264187(bc);
		LOC10 = 0;
		LOC10 = getordvalue_264187(ac);
		(*covered) = (NI64)((NI64)((NI64)((*covered) + LOC9) - LOC10) + IL64(1));
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, semcasebranchrange_499155)(tcontext291021* c, tnode226816* t, tnode226816* b, NI64* covered) {
	tnode226816* result;
	result = 0;
	checksonslen_292415(b, 3);
	result = sembranchrange_499111(c, t, (*b).kindU.S6.Sons->data[1], (*b).kindU.S6.Sons->data[2], covered);
	return result;
}

N_NIMCALL(tnode226816*, semcasebranchsetelem_499194)(tcontext291021* c, tnode226816* t, tnode226816* b, NI64* covered) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isrange_263216(b);
		if (!LOC3) goto LA4;
		checksonslen_292415(b, 3);
		result = sembranchrange_499111(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_292415(b, 2);
		result = sembranchrange_499111(c, t, (*b).kindU.S6.Sons->data[0], (*b).kindU.S6.Sons->data[1], covered);
	}
	goto LA1;
	LA7: ;
	{
		result = fitnode_488245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, b);
		(*covered) += 1;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, checkforoverlap_499004)(tcontext291021* c, tnode226816* t, NI currentex, NI branchindex) {
	tnode226816* ex;
	tnode226816* LOC1;
	tnode226816* LOC2;
	LOC1 = 0;
	LOC1 = HEX5BHEX5D_227698(t, branchindex);
	LOC2 = 0;
	LOC2 = HEX5BHEX5D_227698(LOC1, currentex);
	ex = skipconv_274732(LOC2);
	{
		NI i_499023;
		NI res_499088;
		i_499023 = 0;
		res_499088 = 1;
		{
			while (1) {
				if (!(res_499088 <= branchindex)) goto LA5;
				i_499023 = res_499088;
				{
					NI j_499050;
					NI HEX3Atmp_499081;
					NI LOC7;
					NI res_499084;
					j_499050 = 0;
					HEX3Atmp_499081 = 0;
					LOC7 = 0;
					LOC7 = sonslen_227249((*t).kindU.S6.Sons->data[i_499023]);
					HEX3Atmp_499081 = (NI64)(LOC7 - 2);
					res_499084 = 0;
					{
						while (1) {
							if (!(res_499084 <= HEX3Atmp_499081)) goto LA9;
							j_499050 = res_499084;
							{
								NIM_BOOL LOC12;
								LOC12 = 0;
								LOC12 = (i_499023 == branchindex);
								if (!(LOC12)) goto LA13;
								LOC12 = (j_499050 == currentex);
								LA13: ;
								if (!LOC12) goto LA14;
								goto LA6;
							}
							LA14: ;
							{
								tnode226816* LOC18;
								NIM_BOOL LOC19;
								LOC18 = 0;
								LOC18 = skipconv_274732((*(*t).kindU.S6.Sons->data[i_499023]).kindU.S6.Sons->data[j_499050]);
								LOC19 = 0;
								LOC19 = overlap_285012(LOC18, ex);
								if (!LOC19) goto LA20;
								localerror_198955((*ex).Info, ((NU16) 105), ((NimStringDesc*) &TMP2890));
							}
							LA20: ;
							res_499084 += 1;
						} LA9: ;
					}
				} LA6: ;
				res_499088 += 1;
			} LA5: ;
		}
	}
}

N_NIMCALL(void, semcasebranch_499296)(tcontext291021* c, tnode226816* t, tnode226816* branch, NI branchindex, NI64* covered) {
	{
		NI i_499316;
		NI HEX3Atmp_499511;
		NI LOC2;
		NI res_499514;
		i_499316 = 0;
		HEX3Atmp_499511 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(branch);
		HEX3Atmp_499511 = (NI64)(LOC2 - 2);
		res_499514 = 0;
		{
			while (1) {
				tnode226816* b;
				if (!(res_499514 <= HEX3Atmp_499511)) goto LA4;
				i_499316 = res_499514;
				b = (*branch).kindU.S6.Sons->data[i_499316];
				{
					if (!((*b).Kind == ((NU8) 44))) goto LA7;
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_499316]), b);
				}
				goto LA5;
				LA7: ;
				{
					NIM_BOOL LOC10;
					LOC10 = 0;
					LOC10 = isrange_263216(b);
					if (!LOC10) goto LA11;
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_499316]), semcasebranchrange_499155(c, t, b, covered));
				}
				goto LA5;
				LA11: ;
				{
					tnode226816* r;
					r = semconstexpr_489503(c, b);
					{
						NIM_BOOL LOC16;
						NI LOC18;
						tnode226816* LOC21;
						LOC16 = 0;
						LOC16 = !(((*r).Kind == ((NU8) 39) || (*r).Kind == ((NU8) 41)));
						if (LOC16) goto LA17;
						LOC18 = 0;
						LOC18 = len_227364(r);
						LOC16 = (LOC18 == 0);
						LA17: ;
						if (!LOC16) goto LA19;
						checkminsonslen_292425(t, 1);
						LOC21 = 0;
						LOC21 = fitnode_488245(c, (*(*t).kindU.S6.Sons->data[0]).Typ, r);
						asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_499316]), skipconv_274732(LOC21));
						(*covered) += 1;
					}
					goto LA14;
					LA19: ;
					{
						tnode226816* LOC23;
						LOC23 = 0;
						LOC23 = HEX5BHEX5D_227698(r, 0);
						asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[i_499316]), semcasebranchsetelem_499194(c, t, LOC23, covered));
						{
							NI j_499459;
							NI HEX3Atmp_499506;
							NI LOC25;
							NI res_499509;
							j_499459 = 0;
							HEX3Atmp_499506 = 0;
							LOC25 = 0;
							LOC25 = len_227364(r);
							HEX3Atmp_499506 = (LOC25 - 1);
							res_499509 = 1;
							{
								while (1) {
									tnode226816* LOC28;
									tnode226816* LOC29;
									NI l;
									tnode226816* LOC30;
									if (!(res_499509 <= HEX3Atmp_499506)) goto LA27;
									j_499459 = res_499509;
									LOC28 = 0;
									LOC28 = HEX5BHEX5D_227698(r, j_499459);
									LOC29 = 0;
									LOC29 = semcasebranchsetelem_499194(c, t, LOC28, covered);
									add_227498(branch, LOC29);
									l = len_227364(branch);
									LOC30 = 0;
									LOC30 = (*branch).kindU.S6.Sons->data[(NI64)(l - 2)];
									asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI64)(l - 2)]), (*branch).kindU.S6.Sons->data[(NI64)(l - 1)]);
									asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI64)(l - 1)]), LOC30);
									res_499509 += 1;
								} LA27: ;
							}
						}
					}
					LA14: ;
				}
				LA5: ;
				checkforoverlap_499004(c, t, i_499316, branchindex);
				res_499514 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(void, semrecordcase_499547)(tcontext291021* c, tnode226816* n, intset223056* check, NI* pos, tnode226816* father, ttype226852* rectype) {
	tnode226816* a;
	NI64 covered;
	ttype226852* typ;
	NIM_BOOL chckcovered;
	a = copynode_227323(n);
	checkminsonslen_292425(n, 2);
	semrecordnodeaux_499537(c, (*n).kindU.S6.Sons->data[0], check, pos, a, rectype);
	{
		if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA3;
		internalerror_199006(((NimStringDesc*) &TMP3249));
		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_231245((*(*a).kindU.S6.Sons->data[0]).Typ, IL64(211106240964608));
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = isordinaltype_264092(typ);
		if (!!(LOC7)) goto LA8;
		localerror_198955((*n).Info, ((NU16) 108), ((NimStringDesc*) &TMP2890));
	}
	goto LA5;
	LA8: ;
	{
		NI64 LOC11;
		LOC11 = 0;
		LOC11 = firstord_264004(typ);
		if (!(LOC11 < IL64(0))) goto LA12;
		localerror_198955((*n).Info, ((NU16) 109), (*(*(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	goto LA5;
	LA12: ;
	{
		NI64 LOC15;
		LOC15 = 0;
		LOC15 = lengthord_264016(typ);
		if (!(IL64(32767) < LOC15)) goto LA16;
		localerror_198955((*n).Info, ((NU16) 110), (*(*(*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	goto LA5;
	LA16: ;
	LA5: ;
	chckcovered = NIM_TRUE;
	{
		NI i_499746;
		NI HEX3Atmp_499807;
		NI LOC19;
		NI res_499810;
		i_499746 = 0;
		HEX3Atmp_499807 = 0;
		LOC19 = 0;
		LOC19 = sonslen_227249(n);
		HEX3Atmp_499807 = (NI64)(LOC19 - 1);
		res_499810 = 1;
		{
			while (1) {
				tnode226816* b;
				NI LOC25;
				tnode226816* LOC26;
				if (!(res_499810 <= HEX3Atmp_499807)) goto LA21;
				i_499746 = res_499810;
				b = copytree_227329((*n).kindU.S6.Sons->data[i_499746]);
				addson_227287(a, b);
				switch ((*(*n).kindU.S6.Sons->data[i_499746]).Kind) {
				case ((NU8) 85):
				{
					checkminsonslen_292425(b, 2);
					semcasebranch_499296(c, a, b, i_499746, (&covered));
				}
				break;
				case ((NU8) 88):
				{
					chckcovered = NIM_FALSE;
					checksonslen_292415(b, 1);
				}
				break;
				default:
				{
					illformedast_292405(n);
				}
				break;
				}
				LOC25 = 0;
				LOC25 = sonslen_227249(b);
				delson_227294(b, (NI64)(LOC25 - 1));
				LOC26 = 0;
				LOC26 = lastson_227261((*n).kindU.S6.Sons->data[i_499746]);
				semrecordnodeaux_499537(c, LOC26, check, pos, b, rectype);
				res_499810 += 1;
			} LA21: ;
		}
	}
	{
		NIM_BOOL LOC29;
		NI64 LOC31;
		LOC29 = 0;
		LOC29 = chckcovered;
		if (!(LOC29)) goto LA30;
		LOC31 = 0;
		LOC31 = lengthord_264016((*(*a).kindU.S6.Sons->data[0]).Typ);
		LOC29 = !((covered == LOC31));
		LA30: ;
		if (!LOC29) goto LA32;
		localerror_198955((*a).Info, ((NU16) 151), ((NimStringDesc*) &TMP2890));
	}
	LA32: ;
	addson_227287(father, a);
	BeforeRet: ;
}

N_NIMCALL(void, semrecordnodeaux_499537)(tcontext291021* c, tnode226816* n, intset223056* check, NI* pos, tnode226816* father, ttype226852* rectype) {
	{
		if (!(n == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 139):
	{
		tnode226816* branch;
		branch = NIM_NIL;
		{
			NI i_499864;
			NI HEX3Atmp_500613;
			NI LOC7;
			NI res_500616;
			i_499864 = 0;
			HEX3Atmp_500613 = 0;
			LOC7 = 0;
			LOC7 = sonslen_227249(n);
			HEX3Atmp_500613 = (NI64)(LOC7 - 1);
			res_500616 = 0;
			{
				while (1) {
					tnode226816* it;
					NI idx;
					if (!(res_500616 <= HEX3Atmp_500613)) goto LA9;
					i_499864 = res_500616;
					it = (*n).kindU.S6.Sons->data[i_499864];
					{
						if (!(it == NIM_NIL)) goto LA12;
						illformedast_292405(n);
					}
					LA12: ;
					idx = 1;
					switch ((*it).Kind) {
					case ((NU8) 86):
					{
						checksonslen_292415(it, 2);
						{
							tnode226816* e;
							if (!((*c).Ingenericcontext == 0)) goto LA17;
							e = semconstboolexpr_496064(c, (*it).kindU.S6.Sons->data[0]);
							{
								if (!!(((*e).Kind == ((NU8) 6)))) goto LA21;
								internalerror_198987((*e).Info, ((NimStringDesc*) &TMP3248));
							}
							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: ;
						{
							tnode226816* LOC29;
							LOC29 = 0;
							LOC29 = semexprwithtype_488211(c, (*it).kindU.S6.Sons->data[0], 0);
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), forcebool_496036(c, LOC29));
						}
						LA15: ;
					}
					break;
					case ((NU8) 88):
					{
						checksonslen_292415(it, 1);
						{
							if (!(branch == NIM_NIL)) goto LA33;
							branch = (*it).kindU.S6.Sons->data[0];
						}
						LA33: ;
						idx = 0;
					}
					break;
					default:
					{
						illformedast_292405(n);
					}
					break;
					}
					{
						intset223056 newcheck;
						NI newpos;
						tnode226816* newf;
						if (!(0 < (*c).Ingenericcontext)) goto LA38;
						memset((void*)(&newcheck), 0, sizeof(newcheck));
						assign_223975((&newcheck), (&(*check)));
						newpos = (*pos);
						newf = newnodei_227138(((NU8) 137), (*n).Info);
						semrecordnodeaux_499537(c, (*it).kindU.S6.Sons->data[idx], (&newcheck), (&newpos), newf, rectype);
						{
							NI LOC42;
							LOC42 = 0;
							LOC42 = len_227364(newf);
							if (!(LOC42 == 1)) goto LA43;
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[idx]), HEX5BHEX5D_227698(newf, 0));
						}
						goto LA40;
						LA43: ;
						{
							asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[idx]), newf);
						}
						LA40: ;
					}
					LA38: ;
					res_500616 += 1;
				} LA9: ;
			}
		}
		{
			if (!(0 < (*c).Ingenericcontext)) goto LA48;
			addson_227287(father, n);
		}
		goto LA46;
		LA48: ;
		{
			if (!!((branch == NIM_NIL))) goto LA51;
			semrecordnodeaux_499537(c, branch, check, pos, father, rectype);
		}
		goto LA46;
		LA51: ;
		LA46: ;
	}
	break;
	case ((NU8) 138):
	{
		semrecordcase_499547(c, n, check, pos, father, rectype);
	}
	break;
	case ((NU8) 23):
	{
		{
			tnode226816* LOC59;
			if (!!(((*father).Kind == ((NU8) 137)))) goto LA57;
			LOC59 = 0;
			LOC59 = newnodei_227138(((NU8) 137), (*n).Info);
			addson_227287(father, LOC59);
		}
		LA57: ;
	}
	break;
	case ((NU8) 137):
	{
		tnode226816* a;
		{
			if (!((*father).Kind == ((NU8) 137))) goto LA63;
			a = father;
		}
		goto LA61;
		LA63: ;
		{
			a = copynode_227323(n);
		}
		LA61: ;
		{
			NI i_500110;
			NI HEX3Atmp_500619;
			NI LOC67;
			NI res_500622;
			i_500110 = 0;
			HEX3Atmp_500619 = 0;
			LOC67 = 0;
			LOC67 = sonslen_227249(n);
			HEX3Atmp_500619 = (NI64)(LOC67 - 1);
			res_500622 = 0;
			{
				while (1) {
					if (!(res_500622 <= HEX3Atmp_500619)) goto LA69;
					i_500110 = res_500622;
					semrecordnodeaux_499537(c, (*n).kindU.S6.Sons->data[i_500110], check, pos, a, rectype);
					res_500622 += 1;
				} LA69: ;
			}
		}
		{
			if (!!((a == father))) goto LA72;
			addson_227287(father, a);
		}
		LA72: ;
	}
	break;
	case ((NU8) 35):
	{
		NI length;
		tnode226816* a;
		ttype226852* typ;
		tsym226846* rec;
		checkminsonslen_292425(n, 3);
		length = sonslen_227249(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_227138(((NU8) 137), (*n).Info);
		}
		goto LA75;
		LA79: ;
		{
			a = emptynode_227738;
		}
		LA75: ;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[(NI64)(length - 1)]).Kind == ((NU8) 1)))) goto LA84;
			localerror_198955((*(*n).kindU.S6.Sons->data[(NI64)(length - 1)]).Info, ((NU16) 175), ((NimStringDesc*) &TMP2890));
		}
		LA84: ;
		typ = 0;
		{
			if (!((*(*n).kindU.S6.Sons->data[(NI64)(length - 2)]).Kind == ((NU8) 1))) goto LA88;
			localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
			typ = errortype_292318(c);
		}
		goto LA86;
		LA88: ;
		{
			typ = semtypenode_488269(c, (*n).kindU.S6.Sons->data[(NI64)(length - 2)], NIM_NIL);
			propagatetoowner_231318(rectype, typ);
		}
		LA86: ;
		rec = (*rectype).Sym;
		{
			NI i_500240;
			NI HEX3Atmp_500627;
			NI LOC92;
			NI res_500630;
			i_500240 = 0;
			HEX3Atmp_500627 = 0;
			LOC92 = 0;
			LOC92 = sonslen_227249(n);
			HEX3Atmp_500627 = (NI64)(LOC92 - 3);
			res_500630 = 0;
			{
				while (1) {
					tsym226846* f;
					if (!(res_500630 <= HEX3Atmp_500627)) goto LA94;
					i_500240 = res_500630;
					f = semidentwithpragma_488999(c, ((NU8) 19), (*n).kindU.S6.Sons->data[i_500240], 2);
					suggestsym_421882((*(*n).kindU.S6.Sons->data[i_500240]).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_178076((*(*f).Name).S));
						(*f).Flags = ((*f).Flags | (96 & (*rec).Flags));
					}
					LA101: ;
					(*pos) += 1;
					{
						NIM_BOOL LOC105;
						LOC105 = 0;
						LOC105 = containsorincl_223916(check, (*(*f).Name).Sup.Id);
						if (!LOC105) goto LA106;
						localerror_198955((*(*n).kindU.S6.Sons->data[i_500240]).Info, ((NU16) 40), (*(*f).Name).S);
					}
					LA106: ;
					{
						tnode226816* LOC112;
						if (!((*a).Kind == ((NU8) 1))) goto LA110;
						LOC112 = 0;
						LOC112 = newsymnode_227132(f);
						addson_227287(father, LOC112);
					}
					goto LA108;
					LA110: ;
					{
						tnode226816* LOC114;
						LOC114 = 0;
						LOC114 = newsymnode_227132(f);
						addson_227287(a, LOC114);
					}
					LA108: ;
					res_500630 += 1;
				} LA94: ;
			}
		}
		{
			if (!!(((*a).Kind == ((NU8) 1)))) goto LA117;
			addson_227287(father, a);
		}
		LA117: ;
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	default:
	{
		illformedast_292405(n);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(ttype226852*, semobjectnode_500888)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	intset223056 check;
	NI pos;
	ttype226852* base;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_496165(c, ((NU8) 17));
		goto BeforeRet;
	}
	LA4: ;
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_223950((&check));
	pos = 0;
	base = NIM_NIL;
	checksonslen_292415(n, 3);
	{
		ttype226852* LOC10;
		ttype226852* concretebase;
		ttype226852* LOC11;
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA8;
		LOC10 = 0;
		LOC10 = semtypenode_488269(c, (*(*n).kindU.S6.Sons->data[1]).kindU.S6.Sons->data[0], NIM_NIL);
		base = skiptypes_231245(LOC10, IL64(211106247215360));
		LOC11 = 0;
		LOC11 = skipgenericinvokation_500863(base);
		concretebase = skiptypes_231245(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_500834(c, (&check), (&pos), concretebase);
		}
		goto LA12;
		LA16: ;
		{
			{
				if (!!(((*concretebase).Kind == ((NU8) 50)))) goto LA21;
				localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 121), ((NimStringDesc*) &TMP2890));
			}
			LA21: ;
			base = NIM_NIL;
		}
		LA12: ;
	}
	LA8: ;
	{
		if (!!(((*n).Kind == ((NU8) 133)))) goto LA25;
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP2918));
	}
	LA25: ;
	result = neworprevtype_496130(((NU8) 17), prev, c);
	rawaddson_231562(result, base);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 137), (*n).Info));
	semrecordnodeaux_499537(c, (*n).kindU.S6.Sons->data[2], (&check), (&pos), (*result).N, result);
	{
		tsym226846* s;
		tident201021* LOC31;
		tnode226816* LOC32;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA29;
		LOC31 = 0;
		LOC31 = getident_201472(((NimStringDesc*) &TMP3250));
		LOC32 = 0;
		LOC32 = newidentnode_227125(LOC31, (*n).Info);
		s = newsyms_488918(((NU8) 7), LOC32, c);
		asgnRefNoCycle((void**) (&(*s).Typ), result);
		pragma_311079(c, s, (*n).kindU.S6.Sons->data[0], TMP3251);
	}
	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(ttype226852*, semtuple_498228)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	ttype226852* typ;
	intset223056 check;
	NI counter;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_496165(c, ((NU8) 18));
		goto BeforeRet;
	}
	LA4: ;
	typ = 0;
	result = neworprevtype_496130(((NU8) 18), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 137), (*n).Info));
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_223950((&check));
	counter = 0;
	{
		NI i_498249;
		NI HEX3Atmp_498609;
		NI LOC7;
		NI res_498612;
		i_498249 = 0;
		HEX3Atmp_498609 = 0;
		LOC7 = 0;
		LOC7 = sonslen_227249(n);
		HEX3Atmp_498609 = (NI64)(LOC7 - 1);
		res_498612 = 0;
		{
			while (1) {
				tnode226816* a;
				NI length;
				if (!(res_498612 <= HEX3Atmp_498609)) goto LA9;
				i_498249 = res_498612;
				a = (*n).kindU.S6.Sons->data[i_498249];
				{
					if (!!(((*a).Kind == ((NU8) 35)))) goto LA12;
					illformedast_292405(a);
				}
				LA12: ;
				checkminsonslen_292425(a, 3);
				length = sonslen_227249(a);
				{
					if (!!(((*(*a).kindU.S6.Sons->data[(NI64)(length - 2)]).Kind == ((NU8) 1)))) goto LA16;
					typ = semtypenode_488269(c, (*a).kindU.S6.Sons->data[(NI64)(length - 2)], NIM_NIL);
				}
				goto LA14;
				LA16: ;
				{
					localerror_198955((*a).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					typ = errortype_292318(c);
				}
				LA14: ;
				{
					if (!!(((*(*a).kindU.S6.Sons->data[(NI64)(length - 1)]).Kind == ((NU8) 1)))) goto LA21;
					localerror_198955((*(*a).kindU.S6.Sons->data[(NI64)(length - 1)]).Info, ((NU16) 175), ((NimStringDesc*) &TMP2890));
				}
				LA21: ;
				{
					NI j_498361;
					NI HEX3Atmp_498604;
					NI res_498607;
					j_498361 = 0;
					HEX3Atmp_498604 = 0;
					HEX3Atmp_498604 = (NI64)(length - 3);
					res_498607 = 0;
					{
						while (1) {
							tsym226846* field;
							if (!(res_498607 <= HEX3Atmp_498604)) goto LA25;
							j_498361 = res_498607;
							field = newsymg_488930(((NU8) 19), (*a).kindU.S6.Sons->data[j_498361], c);
							asgnRefNoCycle((void**) (&(*field).Typ), typ);
							(*field).Position = counter;
							counter += 1;
							{
								NIM_BOOL LOC28;
								LOC28 = 0;
								LOC28 = containsorincl_223916((&check), (*(*field).Name).Sup.Id);
								if (!LOC28) goto LA29;
								localerror_198955((*(*a).kindU.S6.Sons->data[j_498361]).Info, ((NU16) 40), (*(*field).Name).S);
							}
							goto LA26;
							LA29: ;
							{
								tnode226816* LOC32;
								LOC32 = 0;
								LOC32 = newsymnode_227132(field);
								addson_227287((*result).N, LOC32);
								addsonskipintlit_283574(result, typ);
							}
							LA26: ;
							{
								if (!(gcmd_170120 == ((NU8) 7))) goto LA35;
							}
							LA35: ;
							res_498607 += 1;
						} LA25: ;
					}
				}
				res_498612 += 1;
			} LA9: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semtypeclass_503824)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	tnode226816* pragmas;
	tnode226816* inherited;
	result = 0;
	result = neworprevtype_496130(((NU8) 52), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), n);
	pragmas = HEX5BHEX5D_227698(n, 1);
	inherited = HEX5BHEX5D_227698(n, 2);
	{
		if (!!(((*inherited).Kind == ((NU8) 1)))) goto LA3;
		{
			tnode226816* n_503867;
			tnodeseq226810* HEX3Atmp_503887;
			NI i_503890;
			NI l_503892;
			n_503867 = 0;
			HEX3Atmp_503887 = 0;
			HEX3Atmp_503887 = (*inherited).kindU.S6.Sons;
			i_503890 = 0;
			l_503892 = HEX3Atmp_503887->Sup.len;
			{
				while (1) {
					ttype226852* typ;
					if (!(i_503890 < l_503892)) goto LA7;
					n_503867 = HEX3Atmp_503887->data[i_503890];
					typ = semtypenode_488269(c, n_503867, NIM_NIL);
					safeadd_318709((&(*result).Sons), typ);
					i_503890 += 1;
				} LA7: ;
			}
		}
	}
	LA3: ;
	return result;
}

N_NIMCALL(ttype226852*, semvartype_496898)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	{
		NI LOC3;
		ttype226852* base;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 1)) goto LA4;
		result = neworprevtype_496130(((NU8) 23), prev, c);
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		{
			if (!((*base).Kind == ((NU8) 23))) goto LA8;
			localerror_198955((*n).Info, ((NU16) 197), ((NimStringDesc*) &TMP2890));
			base = (*base).Sons->data[0];
		}
		LA8: ;
		addsonskipintlit_283574(result, base);
	}
	goto LA1;
	LA4: ;
	{
		result = newconstraint_496165(c, ((NU8) 23));
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, semdistinct_496931)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	ttype226852* LOC6;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = len_227364(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_496165(c, ((NU8) 13));
		goto BeforeRet;
	}
	LA4: ;
	result = neworprevtype_496130(((NU8) 13), prev, c);
	LOC6 = 0;
	LOC6 = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	addsonskipintlit_283574(result, LOC6);
	{
		NI LOC9;
		LOC9 = 0;
		LOC9 = len_227364(n);
		if (!(1 < LOC9)) goto LA10;
		asgnRefNoCycle((void**) (&(*result).N), HEX5BHEX5D_227698(n, 1));
	}
	LA10: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semproctypewithscope_503905)(tcontext291021* c, tnode226816* n, ttype226852* prev, NU8 kind) {
	ttype226852* result;
	tscope226840* LOC1;
	tsym226846* s;
	tident201021* LOC2;
	tnode226816* LOC3;
	result = 0;
	checksonslen_292415(n, 2);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	result = semproctypenode_502546(c, (*n).kindU.S6.Sons->data[0], NIM_NIL, prev, kind, NIM_TRUE);
	LOC2 = 0;
	LOC2 = getident_201472(((NimStringDesc*) &TMP3250));
	LOC3 = 0;
	LOC3 = newidentnode_227125(LOC2, (*n).Info);
	s = newsyms_488918(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_227364((*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_311079(c, s, (*n).kindU.S6.Sons->data[1], TMP3252);
		seteffectsforproctype_384811(result, (*n).kindU.S6.Sons->data[1]);
	}
	LA4: ;
	closescope_296211(c);
	return result;
}

N_NIMCALL(ttype226852*, semenum_496173)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	NI64 counter;
	NI64 x;
	tsym226846* e;
	ttype226852* base;
	NIM_BOOL ispure;
	NIM_BOOL LOC15;
	NIM_BOOL hasnull;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		result = newconstraint_496165(c, ((NU8) 14));
		goto BeforeRet;
	}
	LA4: ;
	counter = 0;
	x = 0;
	e = 0;
	base = 0;
	counter = IL64(0);
	base = NIM_NIL;
	result = neworprevtype_496130(((NU8) 14), prev, c);
	asgnRefNoCycle((void**) (&(*result).N), newnodei_227138(((NU8) 149), (*n).Info));
	checkminsonslen_292425(n, 1);
	{
		NI64 LOC14;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA8;
		base = semtypenode_488269(c, (*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[0], NIM_NIL);
		{
			if (!!(((*base).Kind == ((NU8) 14)))) goto LA12;
			localerror_198955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 122), ((NimStringDesc*) &TMP2890));
		}
		LA12: ;
		LOC14 = 0;
		LOC14 = lastord_264010(base);
		counter = (NI64)(LOC14 + IL64(1));
	}
	LA8: ;
	rawaddson_231562(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_496301;
		NI HEX3Atmp_496649;
		NI LOC18;
		NI res_496652;
		i_496301 = 0;
		HEX3Atmp_496649 = 0;
		LOC18 = 0;
		LOC18 = sonslen_227249(n);
		HEX3Atmp_496649 = (NI64)(LOC18 - 1);
		res_496652 = 1;
		{
			while (1) {
				tnode226816* LOC68;
				if (!(res_496652 <= HEX3Atmp_496649)) goto LA20;
				i_496301 = res_496652;
				switch ((*(*n).kindU.S6.Sons->data[i_496301]).Kind) {
				case ((NU8) 150):
				{
					tnode226816* v;
					tnode226816* strval;
					ttype226852* LOC22;
					e = newsyms_488918(((NU8) 20), (*(*n).kindU.S6.Sons->data[i_496301]).kindU.S6.Sons->data[0], c);
					v = semconstexpr_489503(c, (*(*n).kindU.S6.Sons->data[i_496301]).kindU.S6.Sons->data[1]);
					strval = NIM_NIL;
					LOC22 = 0;
					LOC22 = skiptypes_231245((*v).Typ, IL64(211106232576000));
					switch ((*LOC22).Kind) {
					case ((NU8) 18):
					{
						{
							NI LOC26;
							LOC26 = 0;
							LOC26 = sonslen_227249(v);
							if (!(LOC26 == 2)) goto LA27;
							strval = (*v).kindU.S6.Sons->data[1];
							{
								ttype226852* LOC31;
								LOC31 = 0;
								LOC31 = skiptypes_231245((*strval).Typ, IL64(211106232576256));
								if (!((805306368 &(IL64(1)<<(((*LOC31).Kind)&IL64(63))))!=0)) goto LA32;
								x = getordvalue_264187((*v).kindU.S6.Sons->data[0]);
							}
							goto LA29;
							LA32: ;
							{
								localerror_198955((*strval).Info, ((NU16) 6), ((NimStringDesc*) &TMP2890));
							}
							LA29: ;
						}
						goto LA24;
						LA27: ;
						{
							localerror_198955((*v).Info, ((NU16) 111), ((NimStringDesc*) &TMP2890));
						}
						LA24: ;
					}
					break;
					case ((NU8) 28):
					case ((NU8) 29):
					{
						strval = v;
						x = counter;
					}
					break;
					default:
					{
						x = getordvalue_264187(v);
					}
					break;
					}
					{
						if (!!((i_496301 == 1))) goto LA40;
						{
							if (!!((x == counter))) goto LA44;
							(*result).Flags |= ((NI32)1)<<((((NU8) 5))%(sizeof(NI32)*8));
						}
						LA44: ;
						{
							if (!(x < counter)) goto LA48;
							localerror_198955((*(*n).kindU.S6.Sons->data[i_496301]).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_496301]).kindU.S4.Sym;
				}
				break;
				case ((NU8) 2):
				case ((NU8) 53):
				{
					e = newsyms_488918(((NU8) 20), (*n).kindU.S6.Sons->data[i_496301], c);
				}
				break;
				default:
				{
					tnode226816* LOC53;
					LOC53 = 0;
					LOC53 = HEX5BHEX5D_227698(n, i_496301);
					illformedast_292405(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_236103((&(*(*c).Module).kindU.S3.Tab), e);
					}
					LA66: ;
				}
				LA62: ;
				LOC68 = 0;
				LOC68 = newsymnode_227132(e);
				addson_227287((*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_296694(c, e);
				}
				LA73: ;
				counter += 1;
				res_496652 += 1;
			} LA20: ;
		}
	}
	{
		if (!!(hasnull)) goto LA77;
		(*result).Flags |= ((NI32)1)<<((((NU8) 17))%(sizeof(NI32)*8));
	}
	LA77: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, semstmtlisttype_503342)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	NI length;
	result = 0;
	checkminsonslen_292425(n, 1);
	length = sonslen_227249(n);
	{
		NI i_503361;
		NI HEX3Atmp_503420;
		NI res_503423;
		i_503361 = 0;
		HEX3Atmp_503420 = 0;
		HEX3Atmp_503420 = (NI64)(length - 2);
		res_503423 = 0;
		{
			while (1) {
				if (!(res_503423 <= HEX3Atmp_503420)) goto LA3;
				i_503361 = res_503423;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_503361]), semstmt_488277(c, (*n).kindU.S6.Sons->data[i_503361]));
				res_503423 += 1;
			} LA3: ;
		}
	}
	{
		if (!(0 < length)) goto LA6;
		result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[(NI64)(length - 1)], prev);
		asgnRefNoCycle((void**) (&(*n).Typ), result);
		asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[(NI64)(length - 1)]).Typ), result);
	}
	goto LA4;
	LA6: ;
	{
		result = NIM_NIL;
	}
	LA4: ;
	return result;
}

N_NIMCALL(ttype226852*, semblocktype_503437)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	tscope226840* LOC1;
	result = 0;
	(*(*c).P).Nestedblockcounter += 1;
	checksonslen_292415(n, 2);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	{
		tsym226846* 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_488918(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
		adddecl_296694(c, LOC6);
	}
	LA4: ;
	result = semstmtlisttype_503342(c, (*n).kindU.S6.Sons->data[1], prev);
	asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[1]).Typ), result);
	asgnRefNoCycle((void**) (&(*n).Typ), result);
	closescope_296211(c);
	(*(*c).P).Nestedblockcounter -= 1;
	return result;
}

N_NIMCALL(ttype226852*, semtypenode_488269)(tcontext291021* c, tnode226816* n, ttype226852* prev) {
	ttype226852* result;
	result = 0;
	result = NIM_NIL;
	{
		if (!(gcmd_170120 == ((NU8) 14))) goto LA3;
		suggestexpr_422008(c, n);
	}
	LA3: ;
	switch ((*n).Kind) {
	case ((NU8) 1):
	{
	}
	break;
	case ((NU8) 132):
	{
		tnode226816* typexpr;
		checksonslen_292415(n, 1);
		typexpr = semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 4);
		result = skiptypes_231245((*typexpr).Typ, IL64(562949953421312));
	}
	break;
	case ((NU8) 37):
	{
		{
			NI LOC10;
			LOC10 = 0;
			LOC10 = sonslen_227249(n);
			if (!(LOC10 == 1)) goto LA11;
			result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], prev);
		}
		goto LA8;
		LA11: ;
		{
			localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
			result = neworprevtype_496130(((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_263216(n);
			if (!LOC17) goto LA18;
			result = semrangeaux_496955(c, n, prev);
		}
		goto LA15;
		LA18: ;
		{
			tnode226816* LOC21;
			LOC21 = 0;
			LOC21 = HEX5BHEX5D_227698(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_503786(c, n);
		}
		goto LA15;
		LA22: ;
		{
			tident201021* op;
			op = considerquotedident_296010((*n).kindU.S6.Sons->data[0]);
			{
				NIM_BOOL LOC27;
				ttype226852* t1;
				ttype226852* t2;
				LOC27 = 0;
				LOC27 = ((*op).Sup.Id == 2 || (*op).Sup.Id == 48);
				if (LOC27) goto LA28;
				LOC27 = eqStrings((*op).S, ((NimStringDesc*) &TMP2892));
				LA28: ;
				if (!LOC27) goto LA29;
				checksonslen_292415(n, 3);
				t1 = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], NIM_NIL);
				t2 = semtypenode_488269(c, (*n).kindU.S6.Sons->data[2], NIM_NIL);
				{
					if (!(t1 == NIM_NIL)) goto LA33;
					localerror_198955((*(*n).kindU.S6.Sons->data[1]).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					result = neworprevtype_496130(((NU8) 50), prev, c);
				}
				goto LA31;
				LA33: ;
				{
					if (!(t2 == NIM_NIL)) goto LA36;
					localerror_198955((*(*n).kindU.S6.Sons->data[2]).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
					result = neworprevtype_496130(((NU8) 50), prev, c);
				}
				goto LA31;
				LA36: ;
				{
					{
						if (!((*op).Sup.Id == 2)) goto LA41;
						result = makeandtype_291896(c, t1, t2);
					}
					goto LA39;
					LA41: ;
					{
						result = makeortype_292015(c, t1, t2);
					}
					LA39: ;
				}
				LA31: ;
			}
			goto LA25;
			LA29: ;
			{
				NI LOC47;
				if (!((*op).Sup.Id == 44)) goto LA45;
				LOC47 = 0;
				LOC47 = len_227364(n);
				switch (LOC47) {
				case 3:
				{
					result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], prev);
					{
						NIM_BOOL LOC51;
						LOC51 = 0;
						LOC51 = ((IL64(1125900835880960) &(IL64(1)<<(((*result).Kind)&IL64(63))))!=0);
						if (!(LOC51)) goto LA52;
						LOC51 = ((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 23));
						LA52: ;
						if (!LOC51) goto LA53;
						result = freshtype_503805(result, prev);
						(*result).Flags |= ((NI32)1)<<((((NU8) 16))%(sizeof(NI32)*8));
					}
					goto LA49;
					LA53: ;
					{
						localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP2893));
					}
					LA49: ;
				}
				break;
				case 2:
				{
					ttype226852* negated;
					negated = semtypenode_488269(c, (*n).kindU.S6.Sons->data[1], prev);
					result = makenottype_292134(c, negated);
				}
				break;
				default:
				{
					localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP2893));
				}
				break;
				}
			}
			goto LA25;
			LA45: ;
			{
				if (!((*op).Sup.Id == 51)) goto LA59;
				result = semanyref_496787(c, n, ((NU8) 21), prev);
			}
			goto LA25;
			LA59: ;
			{
				if (!((*op).Sup.Id == 53)) goto LA62;
				result = semanyref_496787(c, n, ((NU8) 22), prev);
			}
			goto LA25;
			LA62: ;
			{
				result = semtypeexpr_503786(c, n);
			}
			LA25: ;
		}
		LA15: ;
	}
	break;
	case ((NU8) 93):
	{
		tnode226816* whenresult;
		whenresult = semwhen_489040(c, n, NIM_FALSE);
		{
			if (!((*whenresult).Kind == ((NU8) 115))) goto LA68;
			(*whenresult).Kind = ((NU8) 128);
		}
		LA68: ;
		result = semtypenode_488269(c, whenresult, prev);
	}
	break;
	case ((NU8) 42):
	{
		tsym226846* s;
		checkminsonslen_292425(n, 2);
		s = semtypeident_497731(c, (*n).kindU.S6.Sons->data[0]);
		switch ((*s).Magic) {
		case ((NU16) 176):
		{
			result = semarray_497411(c, n, prev);
		}
		break;
		case ((NU16) 177):
		{
			result = semcontainer_496709(c, n, ((NU8) 27), ((NimStringDesc*) &TMP2898), prev);
		}
		break;
		case ((NU16) 178):
		{
			result = semrange_497094(c, n, prev);
		}
		break;
		case ((NU16) 179):
		{
			result = semset_496666(c, n, prev);
		}
		break;
		case ((NU16) 182):
		{
			result = semordinal_497684(c, n, prev);
		}
		break;
		case ((NU16) 180):
		{
			result = semcontainer_496709(c, n, ((NU8) 24), ((NimStringDesc*) &TMP2902), prev);
		}
		break;
		case ((NU16) 181):
		{
			result = semvarargs_496735(c, n, prev);
		}
		break;
		case ((NU16) 207):
		{
			tnode226816* LOC79;
			ttype226852* LOC80;
			LOC79 = 0;
			LOC79 = HEX5BHEX5D_227698(n, 1);
			LOC80 = 0;
			LOC80 = semtypenode_488269(c, LOC79, NIM_NIL);
			result = maketypedesc_291762(c, LOC80);
		}
		break;
		case ((NU16) 205):
		{
			result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
			{
				tsym226846* LOC86;
				if (!!((result == NIM_NIL))) goto LA84;
				LOC86 = 0;
				LOC86 = getcurrowner_291255();
				result = copytype_227195(result, LOC86, NIM_FALSE);
				{
					NI i_504398;
					NI HEX3Atmp_504911;
					NI LOC88;
					NI res_504914;
					i_504398 = 0;
					HEX3Atmp_504911 = 0;
					LOC88 = 0;
					LOC88 = len_227364(n);
					HEX3Atmp_504911 = (NI64)(LOC88 - 1);
					res_504914 = 1;
					{
						while (1) {
							ttype226852* LOC91;
							if (!(res_504914 <= HEX3Atmp_504911)) goto LA90;
							i_504398 = res_504914;
							LOC91 = 0;
							LOC91 = semtypenode_488269(c, (*n).kindU.S6.Sons->data[i_504398], NIM_NIL);
							rawaddson_231562(result, LOC91);
							res_504914 += 1;
						} LA90: ;
					}
				}
			}
			LA84: ;
		}
		break;
		default:
		{
			result = semgeneric_503548(c, n, s, prev);
		}
		break;
		}
	}
	break;
	case ((NU8) 45):
	{
		tnode226816* typeexpr;
		typeexpr = semexpr_488201(c, n, 0);
		{
			if (!!(((*(*typeexpr).Typ).Kind == ((NU8) 8)))) goto LA96;
			localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
			result = errortype_292318(c);
			goto BeforeRet;
		}
		LA96: ;
		result = base_264038((*typeexpr).Typ);
		{
			NIM_BOOL LOC100;
			intset223056 tobind;
			tnode226816* preprocessed;
			LOC100 = 0;
			LOC100 = ismetatype_227752(result);
			if (!LOC100) goto LA101;
			memset((void*)(&tobind), 0, sizeof(tobind));
			chckNil((void*)(&tobind));
			memset((void*)(&tobind), 0, sizeof(tobind));
			initintset_223950((&tobind));
			preprocessed = semgenericstmt_496120(c, n, 0, (&tobind));
			result = maketypefromexpr_291811(c, preprocessed);
			goto BeforeRet;
		}
		LA101: ;
	}
	break;
	case ((NU8) 2):
	case ((NU8) 53):
	{
		tsym226846* s;
		s = semtypeident_497731(c, n);
		{
			if (!((*s).Typ == NIM_NIL)) goto LA106;
			{
				if (!!(((*s).Kind == ((NU8) 0)))) goto LA110;
				localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
			}
			LA110: ;
			result = neworprevtype_496130(((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;
				ttype226852* LOC120;
				NimStringDesc* LOC124;
				LOC119 = 0;
				LOC120 = 0;
				LOC120 = base_264038((*s).Typ);
				LOC119 = !(((*LOC120).Kind == ((NU8) 0)));
				if (!(LOC119)) goto LA121;
				LOC119 = (prev == NIM_NIL);
				LA121: ;
				if (!!(LOC119)) goto LA122;
				LOC124 = 0;
				LOC124 = HEX24_199126(TMP2914);
				internalerror_199006(LOC124);
			}
			LA122: ;
			result = base_264038((*s).Typ);
		}
		goto LA104;
		LA115: ;
		{
			if (!(prev == NIM_NIL)) goto LA126;
			result = (*s).Typ;
		}
		goto LA104;
		LA126: ;
		{
			assigntype_227210(prev, (*s).Typ);
			{
				if (!!(((IL64(35182224605190) &(IL64(1)<<(((*(*s).Typ).Kind)&IL64(63))))!=0))) goto LA131;
				(*prev).Sup.Id = (*(*s).Typ).Sup.Id;
			}
			LA131: ;
			result = prev;
		}
		LA104: ;
	}
	break;
	case ((NU8) 3):
	{
		{
			NIM_BOOL LOC136;
			ttype226852* 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_227210(prev, t);
				result = prev;
			}
			LA140: ;
			markused_406251((*n).Info, (*n).kindU.S4.Sym);
		}
		goto LA134;
		LA138: ;
		{
			{
				if (!!(((*(*n).kindU.S4.Sym).Kind == ((NU8) 0)))) goto LA148;
				localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
			}
			LA148: ;
			result = neworprevtype_496130(((NU8) 50), prev, c);
		}
		LA134: ;
	}
	break;
	case ((NU8) 133):
	{
		result = semobjectnode_500888(c, n, prev);
	}
	break;
	case ((NU8) 134):
	{
		result = semtuple_498228(c, n, prev);
	}
	break;
	case ((NU8) 135):
	{
		result = semtypeclass_503824(c, n, prev);
	}
	break;
	case ((NU8) 140):
	{
		result = semanyref_496787(c, n, ((NU8) 22), prev);
	}
	break;
	case ((NU8) 141):
	{
		result = semanyref_496787(c, n, ((NU8) 21), prev);
	}
	break;
	case ((NU8) 142):
	{
		result = semvartype_496898(c, n, prev);
	}
	break;
	case ((NU8) 145):
	{
		result = semdistinct_496931(c, n, prev);
	}
	break;
	case ((NU8) 136):
	{
		ttype226852* base;
		result = neworprevtype_496130(((NU8) 59), prev, c);
		base = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
		rawaddson_231562(result, base);
		(*result).Flags |= ((NI32)1)<<((((NU8) 22))%(sizeof(NI32)*8));
	}
	break;
	case ((NU8) 147):
	{
		{
			NI LOC161;
			LOC161 = 0;
			LOC161 = sonslen_227249(n);
			if (!(LOC161 == 0)) goto LA162;
			result = newconstraint_496165(c, ((NU8) 49));
		}
		goto LA159;
		LA162: ;
		{
			result = semproctypewithscope_503905(c, n, prev, ((NU8) 15));
			{
				NIM_BOOL LOC167;
				tnode226816* LOC168;
				tnode226816* LOC170;
				LOC167 = 0;
				LOC168 = 0;
				LOC168 = lastson_227261(n);
				LOC167 = ((*LOC168).Kind == ((NU8) 90));
				if (!(LOC167)) goto LA169;
				LOC170 = 0;
				LOC170 = lastson_227261(n);
				LOC167 = haspragma_316628(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_227249(n);
			if (!(LOC177 == 0)) goto LA178;
			result = newconstraint_496165(c, ((NU8) 25));
		}
		goto LA175;
		LA178: ;
		{
			result = semproctypewithscope_503905(c, n, prev, ((NU8) 12));
		}
		LA175: ;
	}
	break;
	case ((NU8) 149):
	{
		result = semenum_496173(c, n, prev);
	}
	break;
	case ((NU8) 4):
	{
		result = (*n).Typ;
	}
	break;
	case ((NU8) 128):
	{
		result = semstmtlisttype_503342(c, n, prev);
	}
	break;
	case ((NU8) 129):
	{
		result = semblocktype_503437(c, n, prev);
	}
	break;
	case ((NU8) 148):
	{
		checksonslen_292415(n, 1);
		result = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], prev);
		result = freshtype_503805(result, prev);
		(*result).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
	}
	break;
	default:
	{
		localerror_198955((*n).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
		result = neworprevtype_496130(((NU8) 50), prev, c);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semaftermacrocall_495770)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags) {
	tnode226816* result;
	tsym226846* LOC5;
	tsym226846* LOC19;
	result = 0;
	evaltemplatecounter_456330 += 1;
	{
		if (!(100 < evaltemplatecounter_456330)) goto LA3;
		globalerror_198934((*s).Info, ((NU16) 183), ((NimStringDesc*) &TMP2890));
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = getmodule_236243((*s).Owner);
	(*c).Friendmodules = (tsymseq226818*) incrSeq(&((*c).Friendmodules)->Sup, sizeof(tsym226846*));
	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_488277(c, result);
	}
	goto LA6;
	LA8: ;
	{
		switch ((*(*(*s).Typ).Sons->data[0]).Kind) {
		case ((NU8) 6):
		{
			result = semexpr_488201(c, result, flags);
		}
		break;
		case ((NU8) 7):
		{
			result = semstmt_488277(c, result);
		}
		break;
		case ((NU8) 8):
		{
			ttype226852* typ;
			{
				if (!((*n).Kind == ((NU8) 115))) goto LA16;
				(*result).Kind = ((NU8) 128);
			}
			LA16: ;
			typ = semtypenode_488269(c, result, NIM_NIL);
			asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_291762(c, typ));
		}
		break;
		default:
		{
			result = semexpr_488201(c, result, flags);
			result = fitnode_488245(c, (*(*s).Typ).Sons->data[0], result);
		}
		break;
		}
	}
	LA6: ;
	evaltemplatecounter_456330 -= 1;
	LOC19 = 0;
	LOC19 = pop_438736((&(*c).Friendmodules));
	return result;
}

N_NIMCALL(tnode226816*, semmacroexpr_489066)(tcontext291021* c, tnode226816* n, tnode226816* norig, tsym226846* sym, NU16 flags) {
	tnode226816* result;
	result = 0;
	pushinfocontext_197930((*norig).Info);
	markused_406251((*n).Info, sym);
	{
		if (!(sym == (*(*c).P).Owner)) goto LA3;
		globalerror_198934((*n).Info, ((NU16) 25), (*(*sym).Name).S);
	}
	LA3: ;
	result = evalmacrocall_478329((*c).Module, n, norig, sym);
	{
		if (!!(((flags &(1<<((((NU8) 8))&15)))!=0))) goto LA7;
		result = semaftermacrocall_495770(c, result, sym, flags);
	}
	LA7: ;
	popinfocontext_197957();
	return result;
}

N_NIMCALL(tnode226816*, semsym_529849)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags) {
	tnode226816* result;
	result = 0;
	switch ((*s).Kind) {
	case ((NU8) 10):
	{
		ttype226852* LOC2;
		markused_406251((*n).Info, s);
		LOC2 = 0;
		LOC2 = skiptypes_231245((*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_529841(n, s);
			}
			goto LA4;
			LA6: ;
			{
				result = newsymnode_228754(s, (*n).Info);
			}
			LA4: ;
		}
		break;
		case ((NU8) 4):
		case ((NU8) 24):
		{
			{
				NI LOC12;
				LOC12 = 0;
				LOC12 = len_227364((*s).Ast);
				if (!(LOC12 == 0)) goto LA13;
				result = inlineconst_529841(n, s);
			}
			goto LA10;
			LA13: ;
			{
				result = newsymnode_228754(s, (*n).Info);
			}
			LA10: ;
		}
		break;
		default:
		{
			result = newsymnode_228754(s, (*n).Info);
		}
		break;
		}
	}
	break;
	case ((NU8) 17):
	{
		result = semmacroexpr_489066(c, n, n, s, flags);
	}
	break;
	case ((NU8) 18):
	{
		result = semtemplateexpr_489055(c, n, s, flags);
	}
	break;
	case ((NU8) 8):
	case ((NU8) 9):
	case ((NU8) 11):
	case ((NU8) 3):
	case ((NU8) 21):
	{
		markused_406251((*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_228754(s, (*n).Info);
	}
	break;
	case ((NU8) 4):
	{
		{
			if (!((*(*s).Typ).Kind == ((NU8) 59))) goto LA34;
			result = newsymnode_228754(s, (*n).Info);
			asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
		}
		goto LA32;
		LA34: ;
		{
			if (!!(((*s).Ast == NIM_NIL))) goto LA37;
			result = semexpr_488201(c, (*s).Ast, 0);
		}
		goto LA32;
		LA37: ;
		{
			asgnRefNoCycle((void**) (&(*n).Typ), (*s).Typ);
			result = n;
			goto BeforeRet;
		}
		LA32: ;
	}
	break;
	case ((NU8) 7):
	{
		markused_406251((*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_228754(s, (*n).Info);
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_291762(c, (*s).Typ));
	}
	break;
	default:
	{
		markused_406251((*n).Info, s);
		result = newsymnode_228754(s, (*n).Info);
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(tnode226816*, semfieldaccess_529617)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = builtinfieldaccess_536727(c, n, flags);
	{
		if (!(result == NIM_NIL)) goto LA3;
		result = dottransformation_537736(c, n);
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, maybelifttype_531141)(ttype226852** t, tcontext291021* c, tlineinfo196539 info) {
	tscope226840* LOC1;
	ttype226852* lifted;
	tnode226816* LOC2;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	LOC2 = 0;
	LOC2 = newnodei_227138(((NU8) 151), info);
	lifted = liftparamtype_501291(c, ((NU8) 7), LOC2, (*t), ((NimStringDesc*) &TMP3257), info, NIM_FALSE);
	closescope_296211(c);
	{
		if (!!((lifted == NIM_NIL))) goto LA5;
		unsureAsgnRef((void**) (&(*t)), lifted);
	}
	LA5: ;
}

N_NIMCALL(tnode226816*, inferwithmetatype_488450)(tcontext291021* c, ttype226852* formal, tnode226816* arg, NIM_BOOL coercedistincts) {
	tnode226816* result;
	tcandidate406209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406270(c, (&m), formal);
	m.Coercedistincts = coercedistincts;
	result = paramtypesmatch_413263((&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_494289(c, result, (&m));
	}
	LA5: ;
	{
		ttype226852* LOC11;
		if (!!((result == NIM_NIL))) goto LA9;
		LOC11 = 0;
		LOC11 = skiptypes_231245(formal, IL64(18014398509481984));
		asgnRefNoCycle((void**) (&(*result).Typ), generatetypeinstance_321503(c, m.Bindings, (*arg).Info, LOC11));
	}
	goto LA7;
	LA9: ;
	{
		typemismatch_488357(arg, formal, (*arg).Typ);
		result = copytree_227329(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), formal);
	}
	LA7: ;
	return result;
}

N_NIMCALL(NU8, checkconversionbetweenobjects_530809)(ttype226852* castdest, ttype226852* src) {
	NU8 result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = inheritancediff_271588(castdest, src);
		if (!(LOC3 == IL64(9223372036854775807))) goto LA4;
		result = ((NU8) 2);
	}
	goto LA1;
	LA4: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, checkconvertible_530823)(tcontext291021* c, ttype226852* castdest, ttype226852* src) {
	NU8 result;
	ttype226852* d;
	ttype226852* s;
	result = 0;
	result = ((NU8) 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametype_269351(castdest, src, 0);
		if (!(LOC3)) goto LA4;
		LOC3 = ((*castdest).Sym == (*src).Sym);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			if (!!(((IL64(35182225670150) &(IL64(1)<<(((*castdest).Kind)&IL64(63))))!=0))) goto LA9;
			result = ((NU8) 1);
		}
		LA9: ;
		goto BeforeRet;
	}
	LA5: ;
	d = skiptypes_231245(castdest, IL64(211106240964864));
	s = skiptypes_231245(src, IL64(211106240964608));
	{
		while (1) {
			NIM_BOOL LOC13;
			NIM_BOOL LOC14;
			LOC13 = 0;
			LOC14 = 0;
			LOC14 = !((d == NIM_NIL));
			if (!(LOC14)) goto LA15;
			LOC14 = ((6291456 &(IL64(1)<<(((*d).Kind)&IL64(63))))!=0);
			LA15: ;
			LOC13 = LOC14;
			if (!(LOC13)) goto LA16;
			LOC13 = ((*d).Kind == (*s).Kind);
			LA16: ;
			if (!LOC13) goto LA12;
			d = lastson_227267(d);
			s = lastson_227267(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_530809(d, s);
	}
	goto LA17;
	LA24: ;
	{
		NIM_BOOL LOC27;
		ttype226852* LOC28;
		ttype226852* LOC30;
		LOC27 = 0;
		LOC28 = 0;
		LOC28 = skiptypes_231245(castdest, IL64(211106242013440));
		LOC27 = ((IL64(35182224621574) &(IL64(1)<<(((*LOC28).Kind)&IL64(63))))!=0);
		if (!(LOC27)) goto LA29;
		LOC30 = 0;
		LOC30 = skiptypes_231245(src, IL64(211106242013184));
		LOC27 = ((IL64(35182224621574) &(IL64(1)<<(((*LOC30).Kind)&IL64(63))))!=0);
		LA29: ;
		if (!LOC27) goto LA31;
	}
	goto LA17;
	LA31: ;
	{
		NU8 LOC34;
		LOC34 = 0;
		LOC34 = cmptypes_412293(c, d, s);
		switch (LOC34) {
		case ((NU8) 0):
		case ((NU8) 7):
		{
			{
				NIM_BOOL LOC38;
				LOC38 = 0;
				LOC38 = comparetypes_271571(castdest, src, ((NU8) 1), 0);
				if (!!(LOC38)) goto LA39;
				result = ((NU8) 2);
			}
			LA39: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA17: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semconv_531168)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* targettype;
	tnode226816* LOC6;
	tnode226816* LOC7;
	tnode226816* op;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_198955((*n).Info, ((NU16) 161), ((NimStringDesc*) &TMP2890));
		result = n;
		goto BeforeRet;
	}
	LA4: ;
	result = newnodei_227138(((NU8) 60), (*n).Info);
	targettype = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_227698(n, 0);
	maybelifttype_531141(&targettype, c, (*LOC6).Info);
	LOC7 = 0;
	LOC7 = copytree_227329((*n).kindU.S6.Sons->data[0]);
	addson_227287(result, LOC7);
	op = semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 0);
	{
		NIM_BOOL LOC10;
		tnode226816* final;
		LOC10 = 0;
		LOC10 = ismetatype_227752(targettype);
		if (!LOC10) goto LA11;
		final = inferwithmetatype_488450(c, targettype, op, NIM_TRUE);
		addson_227287(result, final);
		asgnRefNoCycle((void**) (&(*result).Typ), (*final).Typ);
		goto BeforeRet;
	}
	LA11: ;
	asgnRefNoCycle((void**) (&(*result).Typ), targettype);
	addson_227287(result, op);
	{
		NIM_BOOL LOC15;
		NU8 status;
		LOC15 = 0;
		LOC15 = issymchoice_531121(op);
		if (!!(LOC15)) goto LA16;
		status = checkconvertible_530823(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_233650((*op).kindU.S4.Sym);
				LA22: ;
				if (!LOC21) goto LA23;
				asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), fitnode_488245(c, (*result).Typ, (*result).kindU.S6.Sons->data[1]));
			}
			LA23: ;
		}
		break;
		case ((NU8) 1):
		{
			NimStringDesc* LOC26;
			LOC26 = 0;
			LOC26 = typetostring_264031((*result).Typ, ((NU8) 0));
			message_198976((*n).Info, ((NU16) 264), LOC26);
		}
		break;
		case ((NU8) 2):
		{
			NimStringDesc* LOC28;
			TY170969 LOC29;
			NimStringDesc* LOC30;
			LOC28 = 0;
			LOC28 = msgkindtostring_198378(((NU16) 142));
			memset((void*)LOC29, 0, sizeof(LOC29));
			LOC29[0] = typetostring_264031((*op).Typ, ((NU8) 0));
			LOC29[1] = typetostring_264031((*result).Typ, ((NU8) 0));
			LOC30 = 0;
			LOC30 = nsuFormatOpenArray(LOC28, LOC29, 2);
			localerror_198955((*n).Info, ((NU16) 4), LOC30);
		}
		break;
		}
	}
	goto LA13;
	LA16: ;
	{
		{
			NI i_531287;
			NI HEX3Atmp_531444;
			NI LOC33;
			NI res_531447;
			i_531287 = 0;
			HEX3Atmp_531444 = 0;
			LOC33 = 0;
			LOC33 = sonslen_227249(op);
			HEX3Atmp_531444 = (NI64)(LOC33 - 1);
			res_531447 = 0;
			{
				while (1) {
					tnode226816* it;
					NU8 status;
					if (!(res_531447 <= HEX3Atmp_531444)) goto LA35;
					i_531287 = res_531447;
					it = (*op).kindU.S6.Sons->data[i_531287];
					status = checkconvertible_530823(c, (*result).Typ, (*it).Typ);
					{
						if (!((3 &(1<<((status)&7)))!=0)) goto LA38;
						markused_406251((*n).Info, (*it).kindU.S4.Sym);
						markindirect_292365(c, (*it).kindU.S4.Sym);
						result = it;
						goto BeforeRet;
					}
					LA38: ;
					res_531447 += 1;
				} LA35: ;
			}
		}
		localerror_198955((*n).Info, ((NU16) 62), (*(*(*(*op).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name).S);
	}
	LA13: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, checkinitialized_542997)(tnode226816* n, intset223056* ids, tlineinfo196539 info) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_543014;
			NI HEX3Atmp_543257;
			NI LOC3;
			NI res_543260;
			i_543014 = 0;
			HEX3Atmp_543257 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227249(n);
			HEX3Atmp_543257 = (NI64)(LOC3 - 1);
			res_543260 = 0;
			{
				while (1) {
					if (!(res_543260 <= HEX3Atmp_543257)) goto LA5;
					i_543014 = res_543260;
					checkinitialized_542997((*n).kindU.S6.Sons->data[i_543014], ids, info);
					res_543260 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		{
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA9;
			internalerror_198987(info, ((NimStringDesc*) &TMP3259));
		}
		LA9: ;
		checkinitialized_542997((*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_223837(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*) &TMP3260));
appendString(LOC19, (*(*(*n).kindU.S4.Sym).Name).S);
			message_198976(info, ((NU16) 4), LOC19);
		}
		LA17: ;
	}
	break;
	default:
	{
		internalerror_198987(info, ((NimStringDesc*) &TMP3259));
	}
	break;
	}
}

N_NIMCALL(tnode226816*, semobjconstr_535463)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	ttype226852* t;
	ttype226852* objtype;
	intset223056 ids;
	result = 0;
	t = semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL);
	result = n;
	asgnRefNoCycle((void**) (&(*result).Typ), t);
	(*result).Kind = ((NU8) 38);
	t = skiptypes_231245(t, 2048);
	{
		if (!((*t).Kind == ((NU8) 22))) goto LA3;
		t = skiptypes_231245((*t).Sons->data[0], 2048);
	}
	LA3: ;
	{
		if (!!(((*t).Kind == ((NU8) 17)))) goto LA7;
		localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3258));
		goto BeforeRet;
	}
	LA7: ;
	objtype = t;
	memset((void*)(&ids), 0, sizeof(ids));
	chckNil((void*)(&ids));
	memset((void*)(&ids), 0, sizeof(ids));
	initintset_223950((&ids));
	{
		NI i_543338;
		NI HEX3Atmp_543669;
		NI LOC10;
		NI res_543672;
		i_543338 = 0;
		HEX3Atmp_543669 = 0;
		LOC10 = 0;
		LOC10 = len_227364(n);
		HEX3Atmp_543669 = (LOC10 - 1);
		res_543672 = 1;
		{
			while (1) {
				tnode226816* it;
				tident201021* id;
				tnode226816* e;
				tnode226816* check;
				tsym226846* f;
				if (!(res_543672 <= HEX3Atmp_543669)) goto LA12;
				i_543338 = res_543672;
				it = (*n).kindU.S6.Sons->data[i_543338];
				{
					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_198955((*n).Info, ((NU16) 170), ((NimStringDesc*) &TMP2890));
					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_223916((&ids), (*id).Sup.Id);
					if (!LOC26) goto LA27;
					localerror_198955((*it).Info, ((NU16) 86), (*id).S);
				}
				LA27: ;
				e = semexprwithtype_488211(c, (*it).kindU.S6.Sons->data[1], (flags & 32));
				check = NIM_NIL;
				f = 0;
				t = objtype;
				{
					while (1) {
						check = NIM_NIL;
						f = lookupinrecordandbuildcheck_536217(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_231245((*t).Sons->data[0], 2048);
					}
				} LA29: ;
				{
					NIM_BOOL LOC41;
					LOC41 = 0;
					LOC41 = !((f == NIM_NIL));
					if (!(LOC41)) goto LA42;
					LOC41 = fieldvisible_415842(c, f);
					LA42: ;
					if (!LOC41) goto LA43;
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), newsymnode_227132(f));
					e = fitnode_488245(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_227498(it, check);
					}
					LA47: ;
				}
				goto LA39;
				LA43: ;
				{
					localerror_198955((*it).Info, ((NU16) 80), (*id).S);
				}
				LA39: ;
				asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), e);
				res_543672 += 1;
			} LA12: ;
		}
	} LA9: ;
	{
		if (!(((*objtype).Flags &(1<<((((NU8) 17))&31)))!=0)) goto LA52;
		{
			while (1) {
				checkinitialized_542997((*objtype).N, (&ids), (*n).Info);
				{
					if (!((*objtype).Sons->data[0] == NIM_NIL)) goto LA58;
					goto LA54;
				}
				LA58: ;
				objtype = skiptypes_231245((*objtype).Sons->data[0], 2048);
			}
		} LA54: ;
	}
	LA52: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym226846*, lookupfordefined_539750)(tcontext291021* c, tident201021* i, NIM_BOOL onlycurrentscope) {
	tsym226846* result;
	result = 0;
	{
		if (!onlycurrentscope) goto LA3;
		result = localsearchinscope_296301(c, i);
	}
	goto LA1;
	LA3: ;
	{
		result = searchinscopes_296312(c, i);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tsym226846*, lookupfordefined_539759)(tcontext291021* c, tnode226816* n, NIM_BOOL onlycurrentscope) {
	tsym226846* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		result = lookupfordefined_539750(c, (*n).kindU.S5.Ident, onlycurrentscope);
	}
	break;
	case ((NU8) 45):
	{
		tsym226846* m;
		result = NIM_NIL;
		{
			if (!onlycurrentscope) goto LA5;
			goto BeforeRet;
		}
		LA5: ;
		checksonslen_292415(n, 2);
		m = lookupfordefined_539759(c, (*n).kindU.S6.Sons->data[0], onlycurrentscope);
		{
			NIM_BOOL LOC9;
			tident201021* ident;
			tnode226816* 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_227698(n, 1);
			ident = considerquotedident_296010(LOC13);
			{
				if (!(m == (*c).Module)) goto LA16;
				result = strtableget_236111((*(*c).Toplevelscope).Symbols, ident);
			}
			goto LA14;
			LA16: ;
			{
				result = strtableget_236111((*m).kindU.S3.Tab, ident);
			}
			LA14: ;
		}
		LA11: ;
	}
	break;
	case ((NU8) 53):
	{
		tident201021* LOC20;
		LOC20 = 0;
		LOC20 = considerquotedident_296010(n);
		result = lookupfordefined_539750(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_251058(n, 0);
		localerror_198955((*n).Info, ((NU16) 19), LOC24);
		result = NIM_NIL;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semdefined_539896)(tcontext291021* c, tnode226816* n, NIM_BOOL onlycurrentscope) {
	tnode226816* result;
	result = 0;
	checksonslen_292415(n, 2);
	result = newintnode_227096(((NU8) 6), IL64(0));
	{
		NIM_BOOL LOC3;
		tnode226816* LOC5;
		tident201021* LOC6;
		LOC3 = 0;
		LOC3 = !(onlycurrentscope);
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_227698(n, 0);
		LOC6 = 0;
		LOC6 = considerquotedident_296010(LOC5);
		LOC3 = eqStrings((*LOC6).S, ((NimStringDesc*) &TMP3261));
		LA4: ;
		if (!LOC3) goto LA7;
		{
			if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 2)))) goto LA11;
			localerror_198966((*n).Info, ((NimStringDesc*) &TMP3262));
		}
		goto LA9;
		LA11: ;
		{
			NIM_BOOL LOC14;
			LOC14 = 0;
			LOC14 = isdefined_202046((*(*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;
			tnode226816* LOC22;
			LOC18 = 0;
			LOC18 = isdeclared_202056((*(*n).kindU.S6.Sons->data[1]).kindU.S5.Ident);
			if (!!(LOC18)) goto LA19;
			LOC21 = 0;
			LOC22 = 0;
			LOC22 = HEX5BHEX5D_227698(n, 1);
			LOC21 = rawNewString((*(*LOC22).kindU.S5.Ident).S->Sup.len + 59);
appendString(LOC21, ((NimStringDesc*) &TMP3263));
appendString(LOC21, (*(*LOC22).kindU.S5.Ident).S);
			message_198976((*n).Info, ((NU16) 258), LOC21);
		}
		goto LA9;
		LA19: ;
		LA9: ;
	}
	goto LA1;
	LA7: ;
	{
		tsym226846* LOC24;
		LOC24 = 0;
		LOC24 = lookupfordefined_539759(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_283030(((NU8) 1)));
	return result;
}

N_NIMCALL(tnode226816*, setms_541228)(tnode226816* n, tsym226846* s) {
	tnode226816* result;
	result = 0;
	result = n;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227132(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(tnode226816*, tryexpr_488317)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* volatile result;
	NI olderrorcount;
	NI olderrormax;
	tscope226840* oldscope;
	tscope226840* LOC1;
	NI oldownerlen;
	TY291133* oldgenerics;
	NU8 olderroroutputs;
	NI oldcontextlen;
	NI oldingenericcontext;
	NI oldinunrolledcontext;
	NI oldingenericinst;
	tproccon291011* oldproccon;
	TSafePoint TMP3264;
	result = 0;
	olderrorcount = gerrorcounter_197303;
	olderrormax = gerrormax_197306;
	(*c).Incompilescontext += 1;
	gerrormax_197306 = IL64(9223372036854775807);
	oldscope = (*c).Currentscope;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	oldownerlen = gowners_291292->Sup.len;
	oldgenerics = (*c).Generics;
	olderroroutputs = erroroutputs_197440;
	erroroutputs_197440 = 0;
	oldcontextlen = getinfocontextlen_197885();
	oldingenericcontext = (*c).Ingenericcontext;
	oldinunrolledcontext = (*c).Inunrolledcontext;
	oldingenericinst = (*c).Ingenericinst;
	oldproccon = (*c).P;
	if ((*c).Generics) nimGCunrefNoCycle((*c).Generics);
	(*c).Generics = (TY291133*) newSeqRC1((&NTI291133), 0);
	pushSafePoint(&TMP3264);
	TMP3264.status = setjmp(TMP3264.context);
	if (TMP3264.status == 0) {
		result = semexpr_488201(c, n, flags);
		{
			if (!!((gerrorcounter_197303 == olderrorcount))) goto LA5;
			result = NIM_NIL;
		}
		LA5: ;
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI196545))) {
			TMP3264.status = 0;
			popCurrentException();
		}
	}
	if (TMP3264.status != 0) reraiseException();
	genericSeqAssign((&(*c).Generics), oldgenerics, (&NTI291133));
	(*c).Ingenericcontext = oldingenericcontext;
	(*c).Inunrolledcontext = oldinunrolledcontext;
	(*c).Ingenericinst = oldingenericinst;
	asgnRef((void**) (&(*c).P), oldproccon);
	setinfocontextlen_197905(oldcontextlen);
	gowners_291292 = (tsymseq226818*) setLengthSeq(&(gowners_291292)->Sup, sizeof(tsym226846*), oldownerlen);
	asgnRef((void**) (&(*c).Currentscope), oldscope);
	(*c).Incompilescontext -= 1;
	erroroutputs_197440 = olderroroutputs;
	gerrorcounter_197303 = olderrorcount;
	gerrormax_197306 = olderrormax;
	return result;
}

N_NIMCALL(tnode226816*, semcompiles_541100)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tnode226816* LOC6;
	tnode226816* LOC7;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!!((LOC3 == 2))) goto LA4;
		result = semdirectop_489032(c, n, flags);
		goto BeforeRet;
	}
	LA4: ;
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_227698(n, 1);
	LOC7 = 0;
	LOC7 = tryexpr_488317(c, LOC6, flags);
	result = newintnode_227096(((NU8) 6), ((NI64) (!((LOC7 == NIM_NIL)))));
	(*result).Info = (*n).Info;
	asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 1)));
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semsizeof_531646)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!!((LOC3 == 2))) goto LA4;
		localerror_198955((*n).Info, ((NU16) 69), ((NimStringDesc*) &TMP3265));
	}
	goto LA1;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 16));
	}
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_283030(((NU8) 31)));
	result = n;
	return result;
}

N_NIMCALL(tnode226816*, isopimpl_489048)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* t1;
	tnode226816* LOC16;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NI LOC6;
		tnode226816* LOC8;
		tnode226816* LOC10;
		tnode226816* LOC12;
		NimStringDesc* LOC15;
		LOC3 = 0;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = sonslen_227249(n);
		LOC5 = (LOC6 == 3);
		if (!(LOC5)) goto LA7;
		LOC8 = 0;
		LOC8 = HEX5BHEX5D_227698(n, 1);
		LOC5 = !(((*LOC8).Typ == NIM_NIL));
		LA7: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA9;
		LOC10 = 0;
		LOC10 = HEX5BHEX5D_227698(n, 1);
		LOC4 = ((*(*LOC10).Typ).Kind == ((NU8) 8));
		LA9: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA11;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(n, 2);
		LOC3 = ((*LOC12).Kind >= ((NU8) 20) && (*LOC12).Kind <= ((NU8) 22) || (*LOC12).Kind == ((NU8) 4));
		LA11: ;
		if (!!(LOC3)) goto LA13;
		LOC15 = 0;
		LOC15 = HEX24_199126(TMP3267);
		internalerror_199006(LOC15);
	}
	LA13: ;
	LOC16 = 0;
	LOC16 = HEX5BHEX5D_227698(n, 1);
	t1 = skiptypes_231245((*LOC16).Typ, IL64(2305843009213694208));
	{
		tnode226816* LOC19;
		tnode226816* LOC22;
		NimStringDesc* LOC23;
		LOC19 = 0;
		LOC19 = HEX5BHEX5D_227698(n, 2);
		if (!((*LOC19).Kind >= ((NU8) 20) && (*LOC19).Kind <= ((NU8) 22))) goto LA20;
		LOC22 = 0;
		LOC22 = HEX5BHEX5D_227698(n, 2);
		LOC23 = 0;
		LOC23 = nsuNormalize((*LOC22).kindU.S3.Strval);
		if (eqStrings(LOC23, ((NimStringDesc*) &TMP3268))) goto LA24;
		goto LA25;
		LA24: ;
		{
			ttype226852* t;
			NIM_BOOL LOC28;
			NIM_BOOL LOC29;
			t = skiptypes_231245(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_227096(((NU8) 6), ((NI64) (LOC28)));
		}
		goto LA26;
		LA25: ;
		{
		}
		LA26: ;
	}
	goto LA17;
	LA20: ;
	{
		ttype226852* t2;
		tnode226816* LOC34;
		tcandidate406209 m;
		NIM_BOOL match;
		NU8 LOC35;
		LOC34 = 0;
		LOC34 = HEX5BHEX5D_227698(n, 2);
		t2 = skiptypes_231245((*LOC34).Typ, 256);
		maybelifttype_531141(&t2, c, (*n).Info);
		memset((void*)(&m), 0, sizeof(m));
		initcandidate_406270(c, (&m), t2);
		LOC35 = 0;
		LOC35 = typerel_407436((&m), t2, t1, NIM_TRUE);
		match = !((LOC35 == ((NU8) 0)));
		result = newintnode_227096(((NU8) 6), ((NI64) (match)));
	}
	LA17: ;
	asgnRefNoCycle((void**) (&(*result).Typ), (*n).Typ);
	return result;
}

N_NIMCALL(tnode226816*, semis_532075)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* LOC6;
	ttype226852* lhstype;
	tnode226816* LOC14;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!!((LOC3 == 3))) goto LA4;
		localerror_198955((*n).Info, ((NU16) 204), ((NimStringDesc*) &TMP3266));
	}
	LA4: ;
	result = n;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_283030(((NU8) 1)));
	LOC6 = 0;
	LOC6 = HEX5BHEX5D_227698(n, 1);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, LOC6, 18));
	{
		tnode226816* LOC9;
		ttype226852* t2;
		tnode226816* LOC12;
		tnode226816* LOC13;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_227698(n, 2);
		if (!!(((*LOC9).Kind >= ((NU8) 20) && (*LOC9).Kind <= ((NU8) 22)))) goto LA10;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(n, 2);
		t2 = semtypenode_488269(c, LOC12, NIM_NIL);
		LOC13 = 0;
		LOC13 = HEX5BHEX5D_227698(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), newnodeit_227145(((NU8) 4), (*LOC13).Info, t2));
	}
	LA10: ;
	LOC14 = 0;
	LOC14 = HEX5BHEX5D_227698(n, 1);
	lhstype = (*LOC14).Typ;
	{
		tnode226816* LOC19;
		if (!!(((*lhstype).Kind == ((NU8) 8)))) goto LA17;
		LOC19 = 0;
		LOC19 = HEX5BHEX5D_227698(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), maketypesymnode_291797(c, lhstype, (*LOC19).Info));
	}
	goto LA15;
	LA17: ;
	{
		ttype226852* LOC21;
		LOC21 = 0;
		LOC21 = base_264038(lhstype);
		if (!((*LOC21).Kind == ((NU8) 0))) goto LA22;
		goto BeforeRet;
	}
	goto LA15;
	LA22: ;
	LA15: ;
	{
		tnode226816* LOC26;
		ttype226852* LOC27;
		NIM_BOOL LOC28;
		LOC26 = 0;
		LOC26 = HEX5BHEX5D_227698(n, 1);
		LOC27 = 0;
		LOC27 = base_264038((*LOC26).Typ);
		LOC28 = 0;
		LOC28 = containsgenerictype_273929(LOC27);
		if (!!(LOC28)) goto LA29;
		result = isopimpl_489048(c, n);
	}
	LA29: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semof_531683)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NI LOC3;
		ttype226852* a;
		ttype226852* b;
		ttype226852* x;
		ttype226852* y;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 3)) goto LA4;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 0));
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[2], 16));
		a = skiptypes_231245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(211106247256320));
		b = skiptypes_231245((*(*n).kindU.S6.Sons->data[2]).Typ, IL64(211106247256320));
		x = skiptypes_231245((*(*n).kindU.S6.Sons->data[1]).Typ, IL64(211106247256064));
		y = skiptypes_231245((*(*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_198955((*n).Info, ((NU16) 205), ((NimStringDesc*) &TMP3269));
		}
		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_198955((*n).Info, ((NU16) 205), ((NimStringDesc*) &TMP3269));
		}
		goto LA6;
		LA15: ;
		{
			NI diff;
			diff = inheritancediff_271588(a, b);
			{
				NimStringDesc* LOC22;
				if (!(diff <= 0)) goto LA20;
				LOC22 = 0;
				LOC22 = rendertree_251058(n, 0);
				message_198976((*n).Info, ((NU16) 272), LOC22);
				result = newintnode_227096(((NU8) 6), IL64(1));
				(*result).Info = (*n).Info;
				asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 1)));
				goto BeforeRet;
			}
			goto LA18;
			LA20: ;
			{
				NimStringDesc* LOC26;
				if (!(diff == IL64(9223372036854775807))) goto LA24;
				LOC26 = 0;
				LOC26 = typetostring_264031(a, ((NU8) 0));
				localerror_198955((*n).Info, ((NU16) 206), LOC26);
			}
			goto LA18;
			LA24: ;
			LA18: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		localerror_198955((*n).Info, ((NU16) 204), ((NimStringDesc*) &TMP3269));
	}
	LA1: ;
	asgnRefNoCycle((void**) (&(*n).Typ), getsystype_283030(((NU8) 1)));
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tsym226846*, expectmacroortemplatecall_489025)(tcontext291021* c, tnode226816* n) {
	tsym226846* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tsym226846* expandedsym;
		tnode226816* LOC6;
		LOC3 = 0;
		LOC3 = iscallexpr_227335(n);
		if (!LOC3) goto LA4;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_227698(n, 0);
		expandedsym = qualifiedlookup_297122(c, LOC6, 2);
		{
			tnode226816* LOC11;
			NimStringDesc* LOC12;
			tnode226816* LOC13;
			if (!(expandedsym == NIM_NIL)) goto LA9;
			LOC11 = 0;
			LOC11 = HEX5BHEX5D_227698(n, 0);
			LOC12 = 0;
			LOC12 = rendertree_251058(LOC11, 0);
			localerror_198955((*n).Info, ((NU16) 61), LOC12);
			LOC13 = 0;
			LOC13 = HEX5BHEX5D_227698(n, 0);
			result = errorsym_296412(c, LOC13);
			goto BeforeRet;
		}
		LA9: ;
		{
			tnode226816* LOC18;
			if (!!(((393216 &(1<<(((*expandedsym).Kind)&31)))!=0))) goto LA16;
			localerror_198955((*n).Info, ((NU16) 216), (*(*expandedsym).Name).S);
			LOC18 = 0;
			LOC18 = HEX5BHEX5D_227698(n, 0);
			result = errorsym_296412(c, LOC18);
			goto BeforeRet;
		}
		LA16: ;
		result = expandedsym;
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* LOC20;
		LOC20 = 0;
		LOC20 = rendertree_251058(n, 0);
		localerror_198955((*n).Info, ((NU16) 216), LOC20);
		result = errorsym_296412(c, n);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semexpandtoast_540286)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* macrocall;
	tsym226846* expandedsym;
	tsym226846* LOC15;
	result = 0;
	macrocall = HEX5BHEX5D_227698(n, 1);
	expandedsym = expectmacroortemplatecall_489025(c, macrocall);
	{
		if (!((*expandedsym).Kind == ((NU8) 0))) goto LA3;
		result = n;
		goto BeforeRet;
	}
	LA3: ;
	asgnRefNoCycle((void**) (&(*macrocall).kindU.S6.Sons->data[0]), newsymnode_228754(expandedsym, (*macrocall).Info));
	markused_406251((*n).Info, expandedsym);
	{
		NI i_540413;
		NI HEX3Atmp_540512;
		NI LOC6;
		NI res_540515;
		i_540413 = 0;
		HEX3Atmp_540512 = 0;
		LOC6 = 0;
		LOC6 = len_227364(macrocall);
		HEX3Atmp_540512 = (NI64)(LOC6 - 1);
		res_540515 = 1;
		{
			while (1) {
				tnode226816* LOC9;
				if (!(res_540515 <= HEX3Atmp_540512)) goto LA8;
				i_540413 = res_540515;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_227698(macrocall, i_540413);
				asgnRefNoCycle((void**) (&(*macrocall).kindU.S6.Sons->data[i_540413]), semexprwithtype_488211(c, LOC9, 0));
				res_540515 += 1;
			} LA8: ;
		}
	}
	{
		NimStringDesc* LOC14;
		if (!!(((*(*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym).Magic == ((NU16) 16)))) goto LA12;
		LOC14 = 0;
		LOC14 = HEX24_199126(TMP3270);
		internalerror_199006(LOC14);
	}
	LA12: ;
	LOC15 = 0;
	LOC15 = getsyssym_283054(((NimStringDesc*) &TMP3271));
	asgnRefNoCycle((void**) (&(*n).Typ), (*LOC15).Typ);
	result = n;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semexpandtoast_540529)(tcontext291021* c, tnode226816* n, tsym226846* magicsym, NU16 flags) {
	tnode226816* result;
	result = 0;
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 2)) goto LA4;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_228754(magicsym, (*n).Info));
		result = semexpandtoast_540286(c, n);
	}
	goto LA1;
	LA4: ;
	{
		result = semdirectop_489032(c, n, flags);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, expectstring_540098)(tcontext291021* c, tnode226816* n_540101) {
	NimStringDesc* result;
	tnode226816* n;
	result = 0;
	n = semconstexpr_489503(c, n_540101);
	{
		if (!((*n).Kind >= ((NU8) 20) && (*n).Kind <= ((NU8) 22))) goto LA3;
		result = copyString((*n).kindU.S3.Strval);
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		localerror_198955((*n).Info, ((NU16) 6), ((NimStringDesc*) &TMP2890));
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, processquotations_540555)(tnode226816** n, NimStringDesc* op, tnodeseq226810** quotes, tnodeseq226810** ids) {
	{
		if (!((*(*n)).Kind == ((NU8) 30))) goto LA3;
		checksonslen_292415((*n), 2);
		{
			tnode226816* LOC7;
			NimStringDesc* examinedop;
			tnode226816* LOC10;
			LOC7 = 0;
			LOC7 = HEX5BHEX5D_227698((*n), 0);
			if (!((*LOC7).Kind == ((NU8) 2))) goto LA8;
			LOC10 = 0;
			LOC10 = HEX5BHEX5D_227698((*n), 0);
			examinedop = copyString((*(*LOC10).kindU.S5.Ident).S);
			{
				tnode226816* LOC15;
				NimStringDesc* LOC16;
				tident201021* LOC17;
				if (!eqStrings(examinedop, op)) goto LA13;
				LOC15 = 0;
				LOC15 = HEX5BHEX5D_227698((*n), 1);
				(*quotes) = (tnodeseq226810*) incrSeq(&((*quotes))->Sup, sizeof(tnode226816*));
				asgnRefNoCycle((void**) (&(*quotes)->data[(*quotes)->Sup.len-1]), LOC15);
				LOC16 = 0;
				LOC16 = nimIntToStr((*quotes)->Sup.len);
				LOC17 = 0;
				LOC17 = getident_201472(LOC16);
				unsureAsgnRef((void**) (&(*n)), newidentnode_227125(LOC17, (*(*n)).Info));
				(*ids) = (tnodeseq226810*) incrSeq(&((*ids))->Sup, sizeof(tnode226816*));
				asgnRefNoCycle((void**) (&(*ids)->data[(*ids)->Sup.len-1]), (*n));
				goto BeforeRet;
			}
			goto LA11;
			LA13: ;
			{
				NIM_BOOL LOC19;
				NimStringDesc* LOC22;
				tident201021* LOC23;
				LOC19 = 0;
				LOC19 = nsuStartsWith(examinedop, op);
				if (!LOC19) goto LA20;
				LOC22 = 0;
				LOC22 = copyStr(examinedop, op->Sup.len);
				LOC23 = 0;
				LOC23 = getident_201472(LOC22);
				asgnRefNoCycle((void**) (&(*(*n)).kindU.S6.Sons->data[0]), newidentnode_227125(LOC23, (*(*n)).Info));
			}
			goto LA11;
			LA20: ;
			LA11: ;
		}
		LA8: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC25;
		tnode226816* LOC29;
		NimStringDesc* LOC30;
		tident201021* LOC31;
		LOC25 = 0;
		LOC25 = ((*(*n)).Kind == ((NU8) 53));
		if (!(LOC25)) goto LA26;
		LOC25 = eqStrings(op, ((NimStringDesc*) &TMP3273));
		LA26: ;
		if (!LOC25) goto LA27;
		LOC29 = 0;
		LOC29 = HEX5BHEX5D_227698((*n), 0);
		(*quotes) = (tnodeseq226810*) incrSeq(&((*quotes))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*quotes)->data[(*quotes)->Sup.len-1]), LOC29);
		LOC30 = 0;
		LOC30 = nimIntToStr((*quotes)->Sup.len);
		LOC31 = 0;
		LOC31 = getident_201472(LOC30);
		unsureAsgnRef((void**) (&(*n)), newidentnode_227125(LOC31, (*(*n)).Info));
		(*ids) = (tnodeseq226810*) incrSeq(&((*ids))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*ids)->data[(*ids)->Sup.len-1]), (*n));
		goto BeforeRet;
	}
	goto LA1;
	LA27: ;
	LA1: ;
	{
		NI i_540747;
		NI HEX3Atmp_540764;
		NI LOC33;
		NI res_540767;
		i_540747 = 0;
		HEX3Atmp_540764 = 0;
		LOC33 = 0;
		LOC33 = safelen_227424((*n));
		HEX3Atmp_540764 = (LOC33 - 1);
		res_540767 = 0;
		{
			while (1) {
				if (!(res_540767 <= HEX3Atmp_540764)) goto LA35;
				i_540747 = res_540767;
				processquotations_540555(&(*(*n)).kindU.S6.Sons->data[i_540747], op, quotes, ids);
				res_540767 += 1;
			} LA35: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tsym226846*, newanonsym_540148)(NU8 kind, tlineinfo196539 info, tsym226846* owner) {
	tsym226846* result;
	result = 0;
	result = newsym_227074(kind, idanon_201504, owner, info);
	(*result).Flags = IL64(2147483648);
	return result;
}

N_NIMCALL(tnode226816*, semtemplbodydirty_509030)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym226846* s;
		s = qualifiedlookup_297122((*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_228754(s, (*n).Info);
			}
			goto LA6;
			LA10: ;
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
				if (!LOC13) goto LA14;
				result = symchoice_505476((*c).C, n, s, ((NU8) 0));
			}
			goto LA6;
			LA14: ;
			LA6: ;
		}
		LA4: ;
	}
	break;
	case ((NU8) 55):
	{
		result = semtemplbodydirty_509030(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_505600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC22;
			tsym226846* s;
			LOC22 = 0;
			LOC22 = ((*n).Kind == ((NU8) 45));
			if (LOC22) goto LA23;
			LOC22 = ((*n).Kind == ((NU8) 53));
			LA23: ;
			if (!LOC22) goto LA24;
			s = qualifiedlookup_297122((*c).C, n, 0);
			{
				NIM_BOOL LOC28;
				LOC28 = 0;
				LOC28 = !((s == NIM_NIL));
				if (!(LOC28)) goto LA29;
				LOC28 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
				LA29: ;
				if (!LOC28) goto LA30;
				result = symchoice_505476((*c).C, n, s, ((NU8) 0));
				goto BeforeRet;
			}
			LA30: ;
		}
		LA24: ;
		result = n;
		{
			NI i_509146;
			NI HEX3Atmp_509176;
			NI LOC33;
			NI res_509179;
			i_509146 = 0;
			HEX3Atmp_509176 = 0;
			LOC33 = 0;
			LOC33 = sonslen_227249(n);
			HEX3Atmp_509176 = (NI64)(LOC33 - 1);
			res_509179 = 0;
			{
				while (1) {
					if (!(res_509179 <= HEX3Atmp_509176)) goto LA35;
					i_509146 = res_509179;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_509146]), semtemplbodydirty_509030(c, (*n).kindU.S6.Sons->data[i_509146]));
					res_509179 += 1;
				} LA35: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semtemplsymbol_506411)(tcontext291021* c, tnode226816* n, tsym226846* s) {
	tnode226816* 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_505476(c, n, s, ((NU8) 1));
	}
	break;
	case ((NU8) 4):
	{
		result = newsymnodetypedesc_308160(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_308160(s, (*n).Info);
		}
		goto LA6;
		LA10: ;
		{
			result = n;
		}
		LA6: ;
	}
	break;
	default:
	{
		result = newsymnode_228754(s, (*n).Info);
	}
	break;
	}
	return result;
}

N_NIMCALL(void, openscope_506003)(templctx505840* c) {
	tscope226840* LOC1;
	LOC1 = 0;
	LOC1 = openscope_296191((*c).C);
}

N_NIMCALL(void, closescope_506010)(templctx505840* c) {
	closescope_296211((*c).C);
}

N_NIMCALL(tnode226816*, semtemplbodyscope_506017)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	openscope_506003(c);
	result = semtemplbody_505998(c, n);
	closescope_506010(c);
	return result;
}

N_NIMCALL(NU8, symbinding_505374)(tnode226816* n) {
	NU8 result;
	result = 0;
	{
		NI i_505390;
		NI HEX3Atmp_505454;
		NI LOC2;
		NI res_505457;
		i_505390 = 0;
		HEX3Atmp_505454 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_505454 = (NI64)(LOC2 - 1);
		res_505457 = 0;
		{
			while (1) {
				tnode226816* it;
				tnode226816* key;
				if (!(res_505457 <= HEX3Atmp_505454)) goto LA4;
				i_505390 = res_505457;
				it = (*n).kindU.S6.Sons->data[i_505390];
				{
					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_205382((*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_505457 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, onlyreplaceparams_506026)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		tsym226846* s;
		if (!((*n).Kind == ((NU8) 2))) goto LA3;
		s = qualifiedlookup_297122((*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_228754(s, (*n).Info);
			}
			LA13: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_506222;
			NI HEX3Atmp_506252;
			NI LOC17;
			NI res_506255;
			i_506222 = 0;
			HEX3Atmp_506252 = 0;
			LOC17 = 0;
			LOC17 = safelen_227424(n);
			HEX3Atmp_506252 = (LOC17 - 1);
			res_506255 = 0;
			{
				while (1) {
					if (!(res_506255 <= HEX3Atmp_506252)) goto LA19;
					i_506222 = res_506255;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_506222]), onlyreplaceparams_506026(c, (*n).kindU.S6.Sons->data[i_506222]));
					res_506255 += 1;
				} LA19: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, getidentnode_505846)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	switch ((*n).Kind) {
	case ((NU8) 31):
	{
		result = getidentnode_505846(c, (*n).kindU.S6.Sons->data[1]);
	}
	break;
	case ((NU8) 43):
	{
		result = getidentnode_505846(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 2):
	{
		tsym226846* s;
		result = n;
		s = qualifiedlookup_297122((*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_228754(s, (*n).Info);
			}
			LA12: ;
		}
		LA6: ;
	}
	break;
	case ((NU8) 53):
	case ((NU8) 3):
	{
		result = n;
	}
	break;
	default:
	{
		illformedast_292405(n);
		result = n;
	}
	break;
	}
	return result;
}

static N_INLINE(NIM_BOOL, istemplparam_505928)(templctx505840* c, tnode226816* 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_505801)(tnode226816** n, tnode226816* s) {
	switch ((*(*n)).Kind) {
	case ((NU8) 31):
	{
		replaceidentbysym_505801(&(*(*n)).kindU.S6.Sons->data[1], s);
	}
	break;
	case ((NU8) 43):
	{
		replaceidentbysym_505801(&(*(*n)).kindU.S6.Sons->data[0], s);
	}
	break;
	case ((NU8) 2):
	case ((NU8) 53):
	case ((NU8) 3):
	{
		unsureAsgnRef((void**) (&(*n)), s);
	}
	break;
	default:
	{
		illformedast_292405((*n));
	}
	break;
	}
}

N_NIMCALL(tsym226846*, newgensym_506269)(NU8 kind, tnode226816* n, templctx505840* c) {
	tsym226846* result;
	tident201021* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = considerquotedident_296010(n);
	result = newsym_227074(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_506311)(templctx505840* c, tnode226816** n, NU8 k) {
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		tnode226816* x;
		tnode226816* ident;
		LOC3 = 0;
		LOC3 = ((*(*n)).Kind == ((NU8) 43));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = symbinding_505374((*(*n)).kindU.S6.Sons->data[1]);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		x = HEX5BHEX5D_227698((*n), 0);
		{
			while (1) {
				switch ((*x).Kind) {
				case ((NU8) 31):
				{
					x = HEX5BHEX5D_227698(x, 1);
				}
				break;
				case ((NU8) 43):
				{
					x = HEX5BHEX5D_227698(x, 0);
				}
				break;
				case ((NU8) 2):
				{
					goto LA8;
				}
				break;
				case ((NU8) 53):
				{
					unsureAsgnRef((void**) (&(*n)), onlyreplaceparams_506026(c, (*n)));
					goto BeforeRet;
				}
				break;
				default:
				{
					illformedast_292405(x);
				}
				break;
				}
			}
		} LA8: ;
		ident = getidentnode_505846(c, x);
		{
			NIM_BOOL LOC17;
			LOC17 = 0;
			LOC17 = istemplparam_505928((&(*c)), ident);
			if (!!(LOC17)) goto LA18;
			incl_223869((&(*c).Toinject), (*(*x).kindU.S5.Ident).Sup.Id);
		}
		goto LA15;
		LA18: ;
		{
			replaceidentbysym_505801(n, ident);
		}
		LA15: ;
	}
	goto LA1;
	LA6: ;
	{
		tnode226816* ident;
		ident = getidentnode_505846(c, (*n));
		{
			NIM_BOOL LOC24;
			tsym226846* local;
			tnode226816* LOC27;
			LOC24 = 0;
			LOC24 = istemplparam_505928((&(*c)), ident);
			if (!!(LOC24)) goto LA25;
			local = newgensym_506269(k, ident, c);
			addprelimdecl_296704((*c).C, local);
			LOC27 = 0;
			LOC27 = newsymnode_228754(local, (*(*n)).Info);
			replaceidentbysym_505801(n, LOC27);
		}
		goto LA22;
		LA25: ;
		{
			replaceidentbysym_505801(n, ident);
		}
		LA22: ;
	}
	LA1: ;
	BeforeRet: ;
}

N_NIMCALL(void, semtemplsomedecl_506927)(templctx505840* c, tnode226816* n, NU8 symkind) {
	{
		NI i_506945;
		NI HEX3Atmp_507081;
		NI LOC2;
		NI res_507084;
		i_506945 = 0;
		HEX3Atmp_507081 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_507081 = (NI64)(LOC2 - 1);
		res_507084 = 0;
		{
			while (1) {
				if (!(res_507084 <= HEX3Atmp_507081)) goto LA4;
				i_506945 = res_507084;
				{
					tnode226816* a;
					NI l;
					a = (*n).kindU.S6.Sons->data[i_506945];
					{
						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_292405(a);
					}
					LA14: ;
					checkminsonslen_292425(a, 3);
					l = sonslen_227249(a);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 2)]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[(NI64)(l - 2)]));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)]));
					{
						NI j_507057;
						NI HEX3Atmp_507076;
						NI res_507079;
						j_507057 = 0;
						HEX3Atmp_507076 = 0;
						HEX3Atmp_507076 = (NI64)(l - 3);
						res_507079 = 0;
						{
							while (1) {
								if (!(res_507079 <= HEX3Atmp_507076)) goto LA18;
								j_507057 = res_507079;
								addlocaldecl_506311(c, &(*a).kindU.S6.Sons->data[j_507057], symkind);
								res_507079 += 1;
							} LA18: ;
						}
					}
				} LA5: ;
				res_507084 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode226816*, semroutineintemplname_506462)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		tsym226846* s;
		if (!((*n).Kind == ((NU8) 2))) goto LA3;
		s = qualifiedlookup_297122((*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_228754(s, (*n).Info);
			}
			LA15: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		{
			NI i_506613;
			NI HEX3Atmp_506643;
			NI LOC19;
			NI res_506646;
			i_506613 = 0;
			HEX3Atmp_506643 = 0;
			LOC19 = 0;
			LOC19 = safelen_227424(n);
			HEX3Atmp_506643 = (NI64)(LOC19 - 1);
			res_506646 = 0;
			{
				while (1) {
					if (!(res_506646 <= HEX3Atmp_506643)) goto LA21;
					i_506613 = res_506646;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_506613]), semroutineintemplname_506462(c, (*n).kindU.S6.Sons->data[i_506613]));
					res_506646 += 1;
				} LA21: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semroutineintemplbody_506660)(templctx505840* c, tnode226816* n, NU8 k) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(n, 7);
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		tnode226816* ident;
		LOC3 = 0;
		LOC3 = !(((*n).Kind == ((NU8) 51) || (*n).Kind == ((NU8) 52)));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = symbinding_505374((*n).kindU.S6.Sons->data[4]);
		LOC3 = (LOC5 == ((NU8) 1));
		LA4: ;
		if (!LOC3) goto LA6;
		ident = getidentnode_505846(c, (*n).kindU.S6.Sons->data[0]);
		{
			NIM_BOOL LOC10;
			tsym226846* s;
			LOC10 = 0;
			LOC10 = istemplparam_505928((&(*c)), ident);
			if (!!(LOC10)) goto LA11;
			s = newgensym_506269(k, ident, c);
			asgnRefNoCycle((void**) (&(*s).Ast), n);
			addprelimdecl_296704((*c).C, s);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_228754(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_506462(c, (*n).kindU.S6.Sons->data[0]));
	}
	LA1: ;
	openscope_506003(c);
	{
		NI i_506881;
		NI res_506913;
		i_506881 = 0;
		res_506913 = 1;
		{
			while (1) {
				if (!(res_506913 <= 6)) goto LA17;
				i_506881 = res_506913;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_506881]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[i_506881]));
				res_506913 += 1;
			} LA17: ;
		}
	}
	closescope_506010(c);
	return result;
}

N_NIMCALL(tnode226816*, semtemplbody_505998)(templctx505840* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 2):
	{
		tsym226846* s;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = contains_223837((&(*c).Toinject), (*(*n).kindU.S5.Ident).Sup.Id);
			if (!LOC4) goto LA5;
			result = n;
			goto BeforeRet;
		}
		LA5: ;
		s = qualifiedlookup_297122((*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_228754(s, (*n).Info);
			}
			goto LA11;
			LA15: ;
			{
				NIM_BOOL LOC18;
				LOC18 = 0;
				LOC18 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
				if (!LOC18) goto LA19;
				result = symchoice_505476((*c).C, n, s, ((NU8) 0));
			}
			goto LA11;
			LA19: ;
			{
				NIM_BOOL LOC22;
				LOC22 = 0;
				LOC22 = contains_223837((&(*c).Tomixin), (*(*s).Name).Sup.Id);
				if (!LOC22) goto LA23;
				result = symchoice_505476((*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_228754(s, (*n).Info);
			}
			goto LA11;
			LA28: ;
			{
				result = semtemplsymbol_506411((*c).C, n, s);
			}
			LA11: ;
		}
		LA9: ;
	}
	break;
	case ((NU8) 55):
	{
		result = semtemplbody_505998(c, (*n).kindU.S6.Sons->data[0]);
	}
	break;
	case ((NU8) 122):
	{
		result = sembindstmt_505600((*c).C, n, (&(*c).Tobind));
	}
	break;
	case ((NU8) 123):
	{
		result = semmixinstmt_505740((*c).C, n, (&(*c).Tomixin));
	}
	break;
	case ((NU8) 1):
	case ((NU8) 3) ... ((NU8) 23):
	{
	}
	break;
	case ((NU8) 92):
	{
		{
			NI i_507429;
			NI HEX3Atmp_508851;
			NI LOC37;
			NI res_508854;
			i_507429 = 0;
			HEX3Atmp_508851 = 0;
			LOC37 = 0;
			LOC37 = sonslen_227249(n);
			HEX3Atmp_508851 = (NI64)(LOC37 - 1);
			res_508854 = 0;
			{
				while (1) {
					tnode226816* it;
					if (!(res_508854 <= HEX3Atmp_508851)) goto LA39;
					i_507429 = res_508854;
					it = (*n).kindU.S6.Sons->data[i_507429];
					{
						NI LOC42;
						LOC42 = 0;
						LOC42 = len_227364(it);
						if (!(LOC42 == 2)) goto LA43;
						openscope_506003(c);
						asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), semtemplbody_505998(c, (*it).kindU.S6.Sons->data[0]));
						asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), semtemplbody_505998(c, (*it).kindU.S6.Sons->data[1]));
						closescope_506010(c);
					}
					goto LA40;
					LA43: ;
					{
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_507429]), semtemplbodyscope_506017(c, it));
					}
					LA40: ;
					res_508854 += 1;
				} LA39: ;
			}
		}
	}
	break;
	case ((NU8) 96):
	{
		openscope_506003(c);
		{
			NI i_507855;
			NI HEX3Atmp_508857;
			NI LOC48;
			NI res_508860;
			i_507855 = 0;
			HEX3Atmp_508857 = 0;
			LOC48 = 0;
			LOC48 = sonslen_227249(n);
			HEX3Atmp_508857 = (NI64)(LOC48 - 1);
			res_508860 = 0;
			{
				while (1) {
					if (!(res_508860 <= HEX3Atmp_508857)) goto LA50;
					i_507855 = res_508860;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_507855]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[i_507855]));
					res_508860 += 1;
				} LA50: ;
			}
		}
		closescope_506010(c);
	}
	break;
	case ((NU8) 97):
	{
		openscope_506003(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_507924;
			NI HEX3Atmp_508869;
			NI LOC53;
			NI res_508872;
			i_507924 = 0;
			HEX3Atmp_508869 = 0;
			LOC53 = 0;
			LOC53 = sonslen_227249(n);
			HEX3Atmp_508869 = (NI64)(LOC53 - 1);
			res_508872 = 1;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_508872 <= HEX3Atmp_508869)) goto LA55;
					i_507924 = res_508872;
					a = (*n).kindU.S6.Sons->data[i_507924];
					checkminsonslen_292425(a, 1);
					l = sonslen_227249(a);
					{
						NI j_507953;
						NI HEX3Atmp_508864;
						NI res_508867;
						j_507953 = 0;
						HEX3Atmp_508864 = 0;
						HEX3Atmp_508864 = (NI64)(l - 2);
						res_508867 = 0;
						{
							while (1) {
								if (!(res_508867 <= HEX3Atmp_508864)) goto LA58;
								j_507953 = res_508867;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_507953]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[j_507953]));
								res_508867 += 1;
							} LA58: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semtemplbodyscope_506017(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)]));
					res_508872 += 1;
				} LA55: ;
			}
		}
		closescope_506010(c);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		NI l;
		l = sonslen_227249(n);
		openscope_506003(c);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(l - 2)]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[(NI64)(l - 2)]));
		{
			NI i_508051;
			NI HEX3Atmp_508875;
			NI res_508878;
			i_508051 = 0;
			HEX3Atmp_508875 = 0;
			HEX3Atmp_508875 = (NI64)(l - 3);
			res_508878 = 0;
			{
				while (1) {
					if (!(res_508878 <= HEX3Atmp_508875)) goto LA62;
					i_508051 = res_508878;
					addlocaldecl_506311(c, &(*n).kindU.S6.Sons->data[i_508051], ((NU8) 21));
					res_508878 += 1;
				} LA62: ;
			}
		}
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(l - 1)]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[(NI64)(l - 1)]));
		closescope_506010(c);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	case ((NU8) 129):
	{
		checksonslen_292415(n, 2);
		openscope_506003(c);
		{
			tsym226846* s;
			if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA66;
			s = newgensym_506269(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
			addprelimdecl_296704((*c).C, s);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_228754(s, (*(*n).kindU.S6.Sons->data[0]).Info));
		}
		LA66: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[1]));
		closescope_506010(c);
	}
	break;
	case ((NU8) 106):
	{
		checkminsonslen_292425(n, 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semtemplbodyscope_506017(c, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_508297;
			NI HEX3Atmp_508887;
			NI LOC70;
			NI res_508890;
			i_508297 = 0;
			HEX3Atmp_508887 = 0;
			LOC70 = 0;
			LOC70 = sonslen_227249(n);
			HEX3Atmp_508887 = (NI64)(LOC70 - 1);
			res_508890 = 1;
			{
				while (1) {
					tnode226816* a;
					NI l;
					if (!(res_508890 <= HEX3Atmp_508887)) goto LA72;
					i_508297 = res_508890;
					a = (*n).kindU.S6.Sons->data[i_508297];
					checkminsonslen_292425(a, 1);
					l = sonslen_227249(a);
					{
						NI j_508326;
						NI HEX3Atmp_508882;
						NI res_508885;
						j_508326 = 0;
						HEX3Atmp_508882 = 0;
						HEX3Atmp_508882 = (NI64)(l - 2);
						res_508885 = 0;
						{
							while (1) {
								if (!(res_508885 <= HEX3Atmp_508882)) goto LA75;
								j_508326 = res_508885;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_508326]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[j_508326]));
								res_508885 += 1;
							} LA75: ;
						}
					}
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(l - 1)]), semtemplbodyscope_506017(c, (*a).kindU.S6.Sons->data[(NI64)(l - 1)]));
					res_508890 += 1;
				} LA72: ;
			}
		}
	}
	break;
	case ((NU8) 99):
	{
		semtemplsomedecl_506927(c, n, ((NU8) 8));
	}
	break;
	case ((NU8) 100):
	{
		semtemplsomedecl_506927(c, n, ((NU8) 9));
	}
	break;
	case ((NU8) 101):
	{
		{
			NI i_508395;
			NI HEX3Atmp_508894;
			NI LOC80;
			NI res_508897;
			i_508395 = 0;
			HEX3Atmp_508894 = 0;
			LOC80 = 0;
			LOC80 = sonslen_227249(n);
			HEX3Atmp_508894 = (NI64)(LOC80 - 1);
			res_508897 = 0;
			{
				while (1) {
					if (!(res_508897 <= HEX3Atmp_508894)) goto LA82;
					i_508395 = res_508897;
					{
						tnode226816* a;
						a = (*n).kindU.S6.Sons->data[i_508395];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA86;
							goto LA83;
						}
						LA86: ;
						{
							if (!!(((*a).Kind == ((NU8) 102)))) goto LA90;
							illformedast_292405(a);
						}
						LA90: ;
						checksonslen_292415(a, 3);
						addlocaldecl_506311(c, &(*a).kindU.S6.Sons->data[0], ((NU8) 10));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[1]));
						asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[2]));
					} LA83: ;
					res_508897 += 1;
				} LA82: ;
			}
		}
	}
	break;
	case ((NU8) 98):
	{
		{
			NI i_508512;
			NI HEX3Atmp_508901;
			NI LOC94;
			NI res_508904;
			i_508512 = 0;
			HEX3Atmp_508901 = 0;
			LOC94 = 0;
			LOC94 = sonslen_227249(n);
			HEX3Atmp_508901 = (NI64)(LOC94 - 1);
			res_508904 = 0;
			{
				while (1) {
					if (!(res_508904 <= HEX3Atmp_508901)) goto LA96;
					i_508512 = res_508904;
					{
						tnode226816* a;
						a = (*n).kindU.S6.Sons->data[i_508512];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA100;
							goto LA97;
						}
						LA100: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA104;
							illformedast_292405(a);
						}
						LA104: ;
						checksonslen_292415(a, 3);
						addlocaldecl_506311(c, &(*a).kindU.S6.Sons->data[0], ((NU8) 7));
					} LA97: ;
					res_508904 += 1;
				} LA96: ;
			}
		}
		{
			NI i_508573;
			NI HEX3Atmp_508908;
			NI LOC107;
			NI res_508911;
			i_508573 = 0;
			HEX3Atmp_508908 = 0;
			LOC107 = 0;
			LOC107 = sonslen_227249(n);
			HEX3Atmp_508908 = (NI64)(LOC107 - 1);
			res_508911 = 0;
			{
				while (1) {
					if (!(res_508911 <= HEX3Atmp_508908)) goto LA109;
					i_508573 = res_508911;
					{
						tnode226816* a;
						a = (*n).kindU.S6.Sons->data[i_508573];
						{
							if (!((*a).Kind == ((NU8) 125))) goto LA113;
							goto LA110;
						}
						LA113: ;
						{
							if (!!(((*a).Kind == ((NU8) 103)))) goto LA117;
							illformedast_292405(a);
						}
						LA117: ;
						checksonslen_292415(a, 3);
						{
							if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA121;
							openscope_506003(c);
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[1]));
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[2]));
							closescope_506010(c);
						}
						goto LA119;
						LA121: ;
						{
							asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[2]), semtemplbody_505998(c, (*a).kindU.S6.Sons->data[2]));
						}
						LA119: ;
					} LA110: ;
					res_508911 += 1;
				} LA109: ;
			}
		}
	}
	break;
	case ((NU8) 79):
	case ((NU8) 51):
	case ((NU8) 52):
	{
		result = semroutineintemplbody_506660(c, n, ((NU8) 12));
	}
	break;
	case ((NU8) 80):
	{
		result = semroutineintemplbody_506660(c, n, ((NU8) 13));
	}
	break;
	case ((NU8) 84):
	{
		NU8 kind;
		{
			tnode226816* LOC129;
			NIM_BOOL LOC130;
			LOC129 = 0;
			LOC129 = HEX5BHEX5D_227698(n, 4);
			LOC130 = 0;
			LOC130 = haspragma_316628(LOC129, ((NU8) 135));
			if (!LOC130) goto LA131;
			kind = ((NU8) 15);
		}
		goto LA127;
		LA131: ;
		{
			kind = ((NU8) 14);
		}
		LA127: ;
		result = semroutineintemplbody_506660(c, n, kind);
	}
	break;
	case ((NU8) 83):
	{
		result = semroutineintemplbody_506660(c, n, ((NU8) 18));
	}
	break;
	case ((NU8) 82):
	{
		result = semroutineintemplbody_506660(c, n, ((NU8) 17));
	}
	break;
	case ((NU8) 81):
	{
		result = semroutineintemplbody_506660(c, n, ((NU8) 16));
	}
	break;
	case ((NU8) 43):
	{
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[0]));
	}
	break;
	case ((NU8) 31):
	{
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[1]));
	}
	break;
	case ((NU8) 90):
	{
		result = onlyreplaceparams_506026(c, n);
	}
	break;
	default:
	{
		{
			NIM_BOOL LOC143;
			tsym226846* s;
			LOC143 = 0;
			LOC143 = ((*n).Kind == ((NU8) 45));
			if (LOC143) goto LA144;
			LOC143 = ((*n).Kind == ((NU8) 53));
			LA144: ;
			if (!LOC143) goto LA145;
			s = qualifiedlookup_297122((*c).C, n, 0);
			{
				if (!!((s == NIM_NIL))) goto LA149;
				{
					NIM_BOOL LOC153;
					LOC153 = 0;
					LOC153 = contains_223837((&(*c).Tobind), (*s).Sup.Id);
					if (!LOC153) goto LA154;
					result = symchoice_505476((*c).C, n, s, ((NU8) 0));
					goto BeforeRet;
				}
				goto LA151;
				LA154: ;
				{
					NIM_BOOL LOC157;
					LOC157 = 0;
					LOC157 = contains_223837((&(*c).Tomixin), (*(*s).Name).Sup.Id);
					if (!LOC157) goto LA158;
					result = symchoice_505476((*c).C, n, s, ((NU8) 2));
					goto BeforeRet;
				}
				goto LA151;
				LA158: ;
				{
					result = symchoice_505476((*c).C, n, s, ((NU8) 1));
					goto BeforeRet;
				}
				LA151: ;
			}
			LA149: ;
		}
		LA145: ;
		result = n;
		{
			NI i_508821;
			NI HEX3Atmp_508914;
			NI LOC162;
			NI res_508917;
			i_508821 = 0;
			HEX3Atmp_508914 = 0;
			LOC162 = 0;
			LOC162 = sonslen_227249(n);
			HEX3Atmp_508914 = (NI64)(LOC162 - 1);
			res_508917 = 0;
			{
				while (1) {
					if (!(res_508917 <= HEX3Atmp_508914)) goto LA164;
					i_508821 = res_508917;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_508821]), semtemplbody_505998(c, (*n).kindU.S6.Sons->data[i_508821]));
					res_508917 += 1;
				} LA164: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, transformtoexpr_509193)(tnode226816* n) {
	tnode226816* result;
	NI realstmt;
	result = 0;
	realstmt = 0;
	result = n;
	switch ((*n).Kind) {
	case ((NU8) 115):
	{
		realstmt = -1;
		{
			NI i_509210;
			NI HEX3Atmp_509241;
			NI LOC3;
			NI res_509244;
			i_509210 = 0;
			HEX3Atmp_509241 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227249(n);
			HEX3Atmp_509241 = (NI64)(LOC3 - 1);
			res_509244 = 0;
			{
				while (1) {
					if (!(res_509244 <= HEX3Atmp_509241)) goto LA5;
					i_509210 = res_509244;
					switch ((*(*n).kindU.S6.Sons->data[i_509210]).Kind) {
					case ((NU8) 125):
					case ((NU8) 1):
					case ((NU8) 23):
					{
					}
					break;
					default:
					{
						{
							if (!(realstmt == -1)) goto LA10;
							realstmt = i_509210;
						}
						goto LA8;
						LA10: ;
						{
							realstmt = -2;
						}
						LA8: ;
					}
					break;
					}
					res_509244 += 1;
				} LA5: ;
			}
		}
		{
			if (!(0 <= realstmt)) goto LA15;
			result = transformtoexpr_509193((*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(tnode226816*, semtemplatedef_509258)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* s;
	tscope226840* LOC6;
	tnode226816* gp;
	templctx505840 ctx;
	tsym226846* proto;
	result = 0;
	s = 0;
	{
		if (!((*(*(*c).P).Owner).Kind == ((NU8) 6))) goto LA3;
		s = semidentvis_488990(c, ((NU8) 18), (*n).kindU.S6.Sons->data[0], 2);
		(*s).Flags |= ((NI32)1)<<((((NU8) 3))%(sizeof(NI32)*8));
	}
	goto LA1;
	LA3: ;
	{
		s = semidentvis_488990(c, ((NU8) 18), (*n).kindU.S6.Sons->data[0], 0);
	}
	LA1: ;
	asgnRef((void**) (&(*s).kindU.S2.Scope), (*c).Currentscope);
	pushowner_291260(s);
	LOC6 = 0;
	LOC6 = openscope_296191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_228754(s, (*(*n).kindU.S6.Sons->data[0]).Info));
	{
		if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA9;
		pragma_311079(c, s, (*n).kindU.S6.Sons->data[4], TMP3277);
	}
	LA9: ;
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA13;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_505001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA11;
	LA13: ;
	{
		gp = newnodei_227138(((NU8) 75), (*n).Info);
	}
	LA11: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA18;
		semparamlist_488284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NI LOC22;
			LOC22 = 0;
			LOC22 = sonslen_227249(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_291213(((NU8) 7), c));
			asgnRefNoCycle((void**) (&(*(*(*s).Typ).N).kindU.S6.Sons->data[0]), newnodeit_227145(((NU8) 4), (*n).Info, (*(*s).Typ).Sons->data[0]));
		}
		LA31: ;
	}
	goto LA16;
	LA18: ;
	{
		ttype226852* LOC34;
		tnode226816* LOC35;
		asgnRefNoCycle((void**) (&(*s).Typ), newtypes_291213(((NU8) 25), c));
		asgnRefNoCycle((void**) (&(*(*s).Typ).N), newnodei_227138(((NU8) 76), (*n).Info));
		LOC34 = 0;
		LOC34 = newtypes_291213(((NU8) 7), c);
		rawaddson_231562((*s).Typ, LOC34);
		LOC35 = 0;
		LOC35 = newnodeit_227145(((NU8) 4), (*n).Info, (*(*s).Typ).Sons->data[0]);
		addson_227287((*(*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_507110(c, (*n).kindU.S6.Sons->data[1]));
	}
	LA38: ;
	memset((void*)(&ctx), 0, sizeof(ctx));
	initintset_223950((&ctx.Tobind));
	initintset_223950((&ctx.Tomixin));
	initintset_223950((&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_509030((&ctx), (*n).kindU.S6.Sons->data[6]));
	}
	goto LA40;
	LA42: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), semtemplbody_505998((&ctx), (*n).kindU.S6.Sons->data[6]));
	}
	LA40: ;
	{
		if (!!(((384 &(IL64(1)<<(((*(*(*s).Typ).Sons->data[0]).Kind)&IL64(63))))!=0))) goto LA47;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformtoexpr_509193((*n).kindU.S6.Sons->data[6]));
	}
	LA47: ;
	closescope_296211(c);
	popowner_291266();
	asgnRefNoCycle((void**) (&(*s).Ast), n);
	result = n;
	{
		if (!((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1))) goto LA51;
		localerror_198955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA51: ;
	proto = searchforproc_310414(c, (*c).Currentscope, s);
	{
		if (!(proto == NIM_NIL)) goto LA55;
		addinterfaceoverloadablesymat_296855(c, (*c).Currentscope, s);
	}
	goto LA53;
	LA55: ;
	{
		symtabreplace_241615((&(*(*c).Currentscope).Symbols), proto, s);
	}
	LA53: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA60;
		(*c).Patterns = (tsymseq226818*) incrSeq(&((*c).Patterns)->Sup, sizeof(tsym226846*));
		asgnRefNoCycle((void**) (&(*c).Patterns->data[(*c).Patterns->Sup.len-1]), s);
	}
	LA60: ;
	return result;
}

N_NIMCALL(tsym226846*, getmagicsym_540134)(NU16 magic) {
	tsym226846* result;
	tident201021* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getident_201472(reprEnum(magic, (&NTI226532)));
	result = newsym_227074(((NU8) 12), LOC1, systemmodule_283019, gcodegenlineinfo_197237);
	(*result).Magic = magic;
	return result;
}

N_NIMCALL(tnode226816*, semquoteast_488334)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* doblk;
	NI LOC10;
	NimStringDesc* op;
	tnodeseq226810* quotes;
	tnodeseq226810* ids;
	tsym226846* LOC28;
	tsym226846* LOC29;
	tnode226816* tmpl;
	tnodeseq226810* LOC41;
	TY292286 LOC42;
	tsym226846* LOC43;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC4;
		NI LOC6;
		NimStringDesc* LOC9;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = len_227364(n);
		LOC3 = (LOC4 == 2);
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = len_227364(n);
		LOC3 = (LOC6 == 3);
		LA5: ;
		if (!!(LOC3)) goto LA7;
		LOC9 = 0;
		LOC9 = HEX24_199126(TMP3272);
		internalerror_199006(LOC9);
	}
	LA7: ;
	LOC10 = 0;
	{
		if (!NIM_FALSE) goto LA13;
		LOC10 = -1;
	}
	goto LA11;
	LA13: ;
	{
		NI LOC16;
		LOC16 = 0;
		LOC16 = len_227364(n);
		LOC10 = (NI64)(LOC16 + -1);
	}
	LA11: ;
	doblk = HEX5BHEX5D_227698(n, LOC10);
	{
		NI LOC19;
		tnode226816* LOC22;
		LOC19 = 0;
		LOC19 = len_227364(n);
		if (!(LOC19 == 3)) goto LA20;
		LOC22 = 0;
		LOC22 = HEX5BHEX5D_227698(n, 1);
		op = expectstring_540098(c, LOC22);
	}
	goto LA17;
	LA20: ;
	{
		op = copyString(((NimStringDesc*) &TMP3273));
	}
	LA17: ;
	quotes = newseq_540811(1);
	ids = newseq_540811(0);
	{
		if (!!(((*doblk).Kind == ((NU8) 52)))) goto LA26;
		localerror_198955((*n).Info, ((NU16) 188), ((NimStringDesc*) &TMP3274));
	}
	LA26: ;
	processquotations_540555(&(*doblk).kindU.S6.Sons->data[6], op, (&quotes), (&ids));
	LOC28 = 0;
	LOC28 = getcurrowner_291255();
	LOC29 = 0;
	LOC29 = newanonsym_540148(((NU8) 18), (*n).Info, LOC28);
	asgnRefNoCycle((void**) (&(*doblk).kindU.S6.Sons->data[0]), newsymnode_227132(LOC29));
	{
		tnode226816* LOC34;
		tsym226846* LOC35;
		tnode226816* LOC36;
		tsym226846* LOC37;
		tnode226816* LOC38;
		tnode226816* LOC39;
		tnode226816* LOC40;
		if (!(0 < ids->Sup.len)) goto LA32;
		asgnRefNoCycle((void**) (&(*doblk).kindU.S6.Sons->data[3]), newnodei_227138(((NU8) 76), (*n).Info));
		LOC34 = 0;
		LOC34 = HEX5BHEX5D_227698(doblk, 3);
		LOC35 = 0;
		LOC35 = getsyssym_283054(((NimStringDesc*) &TMP3275));
		LOC36 = 0;
		LOC36 = newsymnode_227132(LOC35);
		add_227498(LOC34, LOC36);
		LOC37 = 0;
		LOC37 = getsyssym_283054(((NimStringDesc*) &TMP3276));
		LOC38 = 0;
		LOC38 = newsymnode_227132(LOC37);
		ids = (tnodeseq226810*) incrSeq(&(ids)->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&ids->data[ids->Sup.len-1]), LOC38);
		ids = (tnodeseq226810*) incrSeq(&(ids)->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&ids->data[ids->Sup.len-1]), emptynode_227738);
		LOC39 = 0;
		LOC39 = HEX5BHEX5D_227698(doblk, 3);
		LOC40 = 0;
		LOC40 = newnode_229207(((NU8) 35), (*n).Info, ids, NIM_NIL);
		add_227498(LOC39, LOC40);
	}
	LA32: ;
	tmpl = semtemplatedef_509258(c, doblk);
	asgnRefNoCycle((void**) (&quotes->data[0]), HEX5BHEX5D_227698(tmpl, 0));
	LOC41 = 0;
	LOC41 = (tnodeseq226810*) newSeq((&NTI226810), 2);
	memset((void*)LOC42, 0, sizeof(LOC42));
	LOC43 = 0;
	LOC43 = getmagicsym_540134(((NU16) 16));
	LOC42[0] = newsymnode_227132(LOC43);
	LOC42[1] = newnode_229207(((NU8) 27), (*n).Info, quotes, NIM_NIL);
	asgnRefNoCycle((void**) (&LOC41->data[0]), LOC42[0]);
	asgnRefNoCycle((void**) (&LOC41->data[1]), LOC42[1]);
	result = newnode_229207(((NU8) 27), (*n).Info, LOC41, NIM_NIL);
	result = semexpandtoast_540286(c, result);
	return result;
}

N_NIMCALL(ttype226852*, createflowvar_541143)(tcontext291021* c, ttype226852* t, tlineinfo196539 info) {
	ttype226852* result;
	tsym226846* LOC1;
	result = 0;
	result = newtype_227083(((NU8) 9), (*c).Module);
	LOC1 = 0;
	LOC1 = getcompilerproc_283036(((NimStringDesc*) &TMP3280));
	addsonskipintlit_283574(result, (*LOC1).Typ);
	addsonskipintlit_283574(result, t);
	result = instgenericcontainer_491657(c, info, result, NIM_FALSE);
	return result;
}

N_NIMCALL(tsym226846*, instantiatecreateflowvarcall_541152)(tcontext291021* c, ttype226852* t, tlineinfo196539 info) {
	tsym226846* result;
	tsym226846* sym;
	tidtable226864 bindings;
	tnode226816* LOC5;
	tidobj201015* LOC6;
	TNimObject* LOC7;
	result = 0;
	sym = getcompilerproc_283036(((NimStringDesc*) &TMP3281));
	{
		if (!(sym == NIM_NIL)) goto LA3;
		localerror_198955(info, ((NU16) 64), ((NimStringDesc*) &TMP3281));
	}
	LA3: ;
	memset((void*)(&bindings), 0, sizeof(bindings));
	initidtable_227167((&bindings));
	LOC5 = 0;
	LOC5 = HEX5BHEX5D_227698((*sym).Ast, 2);
	LOC6 = 0;
	LOC6 = &(*(*LOC5).kindU.S6.Sons->data[0]).Typ->Sup;
	LOC7 = 0;
	LOC7 = &t->Sup.Sup;
	idtableput_236196((&bindings), LOC6, LOC7);
	result = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, sym, bindings, info, (*c).Semgenerateinstance.ClEnv):((TMP3282)((*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(tnode226816*, semmagic_541264)(tcontext291021* c, tnode226816* n, tsym226846* s, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = n;
	switch ((*s).Magic) {
	case ((NU16) 1):
	{
		tnode226816* LOC2;
		LOC2 = 0;
		LOC2 = setms_541228(n, s);
		result = semdefined_539896(c, LOC2, NIM_FALSE);
	}
	break;
	case ((NU16) 2):
	{
		tnode226816* LOC4;
		LOC4 = 0;
		LOC4 = setms_541228(n, s);
		result = semdefined_539896(c, LOC4, NIM_TRUE);
	}
	break;
	case ((NU16) 3):
	{
		tnode226816* LOC6;
		LOC6 = 0;
		LOC6 = setms_541228(n, s);
		result = semcompiles_541100(c, LOC6, flags);
	}
	break;
	case ((NU16) 4):
	{
		tnode226816* LOC8;
		LOC8 = 0;
		LOC8 = setms_541228(n, s);
		result = semlowhigh_531538(c, LOC8, ((NU16) 4));
	}
	break;
	case ((NU16) 5):
	{
		tnode226816* LOC10;
		LOC10 = 0;
		LOC10 = setms_541228(n, s);
		result = semlowhigh_531538(c, LOC10, ((NU16) 5));
	}
	break;
	case ((NU16) 6):
	{
		tnode226816* LOC12;
		LOC12 = 0;
		LOC12 = setms_541228(n, s);
		result = semsizeof_531646(c, LOC12);
	}
	break;
	case ((NU16) 8):
	{
		tnode226816* LOC14;
		LOC14 = 0;
		LOC14 = setms_541228(n, s);
		result = semis_532075(c, LOC14);
	}
	break;
	case ((NU16) 9):
	{
		tnode226816* LOC16;
		LOC16 = 0;
		LOC16 = setms_541228(n, s);
		result = semof_531683(c, LOC16);
	}
	break;
	case ((NU16) 11):
	{
		result = semshallowcopy_534549(c, n, flags);
	}
	break;
	case ((NU16) 16):
	{
		result = semexpandtoast_540529(c, n, s, flags);
	}
	break;
	case ((NU16) 17):
	{
		result = semquoteast_488334(c, n);
	}
	break;
	case ((NU16) 165):
	{
		tnode226816* LOC21;
		NimStringDesc* LOC22;
		checksonslen_292415(n, 2);
		LOC21 = 0;
		LOC21 = HEX5BHEX5D_227698(n, 1);
		LOC22 = 0;
		LOC22 = rendertree_251058(LOC21, 4);
		result = newstrnodet_305042(LOC22, n);
		asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 28)));
	}
	break;
	case ((NU16) 166):
	{
		tnode226816* x;
		result = setms_541228(n, s);
		x = lastson_227261(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_488277(c, x));
		(*c).Inparallelstmt -= 1;
	}
	break;
	case ((NU16) 213):
	{
		result = setms_541228(n, s);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semexpr_488201(c, (*n).kindU.S6.Sons->data[1], 0));
		{
			tnode226816* LOC31;
			NIM_BOOL LOC32;
			tnode226816* LOC44;
			tsym226846* LOC45;
			tnode226816* LOC46;
			LOC31 = 0;
			LOC31 = HEX5BHEX5D_227698(result, 1);
			LOC32 = 0;
			LOC32 = isemptytype_233991((*LOC31).Typ);
			if (!!(LOC32)) goto LA33;
			{
				tnode226816* LOC37;
				NU8 LOC38;
				tnode226816* LOC41;
				LOC37 = 0;
				LOC37 = HEX5BHEX5D_227698(result, 1);
				LOC38 = 0;
				LOC38 = spawnresult_426994((*LOC37).Typ, (0 < (*c).Inparallelstmt));
				if (!(LOC38 == ((NU8) 1))) goto LA39;
				LOC41 = 0;
				LOC41 = HEX5BHEX5D_227698(result, 1);
				asgnRefNoCycle((void**) (&(*result).Typ), createflowvar_541143(c, (*LOC41).Typ, (*n).Info));
			}
			goto LA35;
			LA39: ;
			{
				tnode226816* LOC43;
				LOC43 = 0;
				LOC43 = HEX5BHEX5D_227698(result, 1);
				asgnRefNoCycle((void**) (&(*result).Typ), (*LOC43).Typ);
			}
			LA35: ;
			LOC44 = 0;
			LOC44 = HEX5BHEX5D_227698(result, 1);
			LOC45 = 0;
			LOC45 = instantiatecreateflowvarcall_541152(c, (*LOC44).Typ, (*n).Info);
			LOC46 = 0;
			LOC46 = newsymnode_227132(LOC45);
			add_227498(result, LOC46);
		}
		LA33: ;
	}
	break;
	case ((NU16) 218):
	{
		tnode226816* LOC48;
		result = setms_541228(n, s);
		asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), semexpr_488201(c, (*n).kindU.S6.Sons->data[1], 0));
		LOC48 = 0;
		LOC48 = HEX5BHEX5D_227698(n, 1);
		asgnRefNoCycle((void**) (&(*result).Typ), (*LOC48).Typ);
	}
	break;
	default:
	{
		result = semdirectop_489032(c, n, flags);
	}
	break;
	}
	return result;
}

N_NIMCALL(void, semopaux_532160)(tcontext291021* c, tnode226816* n) {
	{
		NI i_532178;
		NI HEX3Atmp_532303;
		NI LOC2;
		NI res_532306;
		i_532178 = 0;
		HEX3Atmp_532303 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_532303 = (NI64)(LOC2 - 1);
		res_532306 = 1;
		{
			while (1) {
				tnode226816* a;
				if (!(res_532306 <= HEX3Atmp_532303)) goto LA4;
				i_532178 = res_532306;
				a = (*n).kindU.S6.Sons->data[i_532178];
				{
					NIM_BOOL LOC7;
					NI LOC9;
					tlineinfo196539 info;
					tident201021* LOC12;
					LOC7 = 0;
					LOC7 = ((*a).Kind == ((NU8) 33));
					if (!(LOC7)) goto LA8;
					LOC9 = 0;
					LOC9 = sonslen_227249(a);
					LOC7 = (LOC9 == 2);
					LA8: ;
					if (!LOC7) goto LA10;
					info = (*(*a).kindU.S6.Sons->data[0]).Info;
					LOC12 = 0;
					LOC12 = considerquotedident_296010((*a).kindU.S6.Sons->data[0]);
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newidentnode_227125(LOC12, info));
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[1]), semexprwithtype_488211(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_532178]), semexprwithtype_488211(c, a, 16));
				}
				LA5: ;
				res_532306 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode226816*, overloadedcallopr_532320)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tident201021* par;
	result = 0;
	par = getident_201472(((NimStringDesc*) &TMP3000));
	{
		tsym226846* LOC3;
		LOC3 = 0;
		LOC3 = searchinscopes_296312(c, par);
		if (!(LOC3 == NIM_NIL)) goto LA4;
		result = NIM_NIL;
	}
	goto LA1;
	LA4: ;
	{
		tnode226816* LOC7;
		result = newnodei_227138(((NU8) 27), (*n).Info);
		LOC7 = 0;
		LOC7 = newidentnode_227125(par, (*n).Info);
		addson_227287(result, LOC7);
		{
			NI i_532355;
			NI HEX3Atmp_532371;
			NI LOC9;
			NI res_532374;
			i_532355 = 0;
			HEX3Atmp_532371 = 0;
			LOC9 = 0;
			LOC9 = sonslen_227249(n);
			HEX3Atmp_532371 = (NI64)(LOC9 - 1);
			res_532374 = 0;
			{
				while (1) {
					if (!(res_532374 <= HEX3Atmp_532371)) goto LA11;
					i_532355 = res_532374;
					addson_227287(result, (*n).kindU.S6.Sons->data[i_532355]);
					res_532374 += 1;
				} LA11: ;
			}
		}
		result = semexpr_488201(c, result, 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semindirectop_535468)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tnode226816* prc;
	tnode226816* norig;
	ttype226852* t;
	result = 0;
	result = NIM_NIL;
	checkminsonslen_292425(n, 1);
	prc = (*n).kindU.S6.Sons->data[0];
	{
		if (!((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 45))) goto LA3;
		checksonslen_292415((*n).kindU.S6.Sons->data[0], 2);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semfieldaccess_529617(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_535619;
				NI HEX3Atmp_536029;
				NI LOC10;
				NI res_536032;
				i_535619 = 0;
				HEX3Atmp_536029 = 0;
				LOC10 = 0;
				LOC10 = sonslen_227249(n);
				HEX3Atmp_536029 = (NI64)(LOC10 - 1);
				res_536032 = 1;
				{
					while (1) {
						if (!(res_536032 <= HEX3Atmp_536029)) goto LA12;
						i_535619 = res_536032;
						addson_227287(result, (*n).kindU.S6.Sons->data[i_535619]);
						res_536032 += 1;
					} LA12: ;
				}
			}
			result = semexpr_488201(c, result, flags);
			goto BeforeRet;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexpr_488201(c, (*n).kindU.S6.Sons->data[0], 0));
	}
	LA1: ;
	norig = copytree_227329(n);
	semopaux_532160(c, n);
	t = NIM_NIL;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Typ == NIM_NIL))) goto LA16;
		t = skiptypes_231245((*(*n).kindU.S6.Sons->data[0]).Typ, IL64(211106232576000));
	}
	LA16: ;
	{
		NIM_BOOL LOC20;
		tcandidate406209 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_406270(c, (&m), t);
		matches_415382(c, n, norig, (&m));
		{
			if (!!((m.State == ((NU8) 1)))) goto LA26;
			{
				if (!(0 < (*c).Incompilescontext)) goto LA30;
				globalerror_198934((*n).Info, ((NU16) 129), ((NimStringDesc*) &TMP2890));
				result = emptynode_227738;
				goto BeforeRet;
			}
			goto LA28;
			LA30: ;
			{
				NIM_BOOL haserrortype;
				NimStringDesc* msg;
				haserrortype = NIM_FALSE;
				msg = msgkindtostring_198378(((NU16) 129));
				{
					NI i_535780;
					NI HEX3Atmp_536037;
					NI LOC34;
					NI res_536040;
					i_535780 = 0;
					HEX3Atmp_536037 = 0;
					LOC34 = 0;
					LOC34 = sonslen_227249(n);
					HEX3Atmp_536037 = (NI64)(LOC34 - 1);
					res_536040 = 1;
					{
						while (1) {
							ttype226852* nt;
							NimStringDesc* LOC41;
							if (!(res_536040 <= HEX3Atmp_536037)) goto LA36;
							i_535780 = res_536040;
							{
								if (!(1 < i_535780)) goto LA39;
								msg = resizeString(msg, 2);
appendString(msg, ((NimStringDesc*) &TMP3236));
							}
							LA39: ;
							nt = (*(*n).kindU.S6.Sons->data[i_535780]).Typ;
							LOC41 = 0;
							LOC41 = typetostring_264031(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_536040 += 1;
						} LA36: ;
					}
				} LA33: ;
				{
					NimStringDesc* LOC50;
					NimStringDesc* LOC51;
					NimStringDesc* LOC52;
					if (!!(haserrortype)) goto LA48;
					LOC50 = 0;
					LOC51 = 0;
					LOC51 = msgkindtostring_198378(((NU16) 130));
					LOC52 = 0;
					LOC52 = typetostring_264031((*(*n).kindU.S6.Sons->data[0]).Typ, ((NU8) 0));
					LOC50 = rawNewString(LOC51->Sup.len + LOC52->Sup.len + 3);
appendString(LOC50, ((NimStringDesc*) &TMP3283));
appendString(LOC50, LOC51);
appendString(LOC50, ((NimStringDesc*) &TMP3237));
appendString(LOC50, LOC52);
					msg = resizeString(msg, LOC50->Sup.len + 0);
appendString(msg, LOC50);
					localerror_198955((*n).Info, ((NU16) 4), msg);
				}
				LA48: ;
				result = errornode_292328(c, n);
				goto BeforeRet;
			}
			LA28: ;
			result = NIM_NIL;
		}
		goto LA24;
		LA26: ;
		{
			result = m.Call;
			instgenericconverterssons_494428(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;
		ttype226852* 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_227364(n);
			if (!(LOC65 == 1)) goto LA66;
			result = semobjconstr_535463(c, n, flags);
			goto BeforeRet;
		}
		LA66: ;
		desttype = skiptypes_231245(t, 2304);
		result = semconv_531168(c, n);
		goto BeforeRet;
	}
	goto LA18;
	LA61: ;
	{
		result = overloadedcallopr_532320(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_535249(c, n, norig, flags);
			{
				if (!(result == NIM_NIL)) goto LA75;
				result = errornode_292328(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_532831(c, result);
	analyseifaddresstakenincall_533577(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_534554(c, result, flags);
	}
	LA84: ;
	result = evalatcompiletime_534592(c, result);
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, setgenericparams_544435)(tcontext291021* c, tnode226816* n) {
	{
		NI i_544460;
		NI HEX3Atmp_544462;
		NI LOC2;
		NI res_544465;
		i_544460 = 0;
		HEX3Atmp_544462 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_544462 = (LOC2 - 1);
		res_544465 = 1;
		{
			while (1) {
				tnode226816* LOC5;
				tnode226816* LOC6;
				if (!(res_544465 <= HEX3Atmp_544462)) goto LA4;
				i_544460 = res_544465;
				LOC5 = 0;
				LOC5 = HEX5BHEX5D_227698(n, i_544460);
				LOC6 = 0;
				LOC6 = HEX5BHEX5D_227698(n, i_544460);
				asgnRefNoCycle((void**) (&(*LOC5).Typ), semtypenode_488269(c, LOC6, NIM_NIL));
				res_544465 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode226816*, semsymgenericinstantiation_529832)(tcontext291021* c, tnode226816* n, tsym226846* s) {
	tnode226816* result;
	result = 0;
	result = symchoice_505476(c, n, s, ((NU8) 0));
	return result;
}

N_NIMCALL(tnode226816*, explicitgenericsym_495127)(tcontext291021* c, tnode226816* n, tsym226846* s) {
	tnode226816* result;
	tcandidate406209 m;
	tsym226846* newinst;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406295(c, (&m), s, n, -1);
	newinst = generateinstance_491802(c, s, m.Bindings, (*n).Info);
	markused_406251((*n).Info, s);
	result = newsymnode_228754(newinst, (*n).Info);
	return result;
}

N_NIMCALL(tnode226816*, explicitgenericinsterror_495120)(tnode226816* n) {
	tnode226816* result;
	NimStringDesc* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = rendertree_251058(n, 0);
	localerror_198955((*n).Info, ((NU16) 124), LOC1);
	result = n;
	return result;
}

N_NIMCALL(tnode226816*, explicitgenericinstantiation_495205)(tcontext291021* c, tnode226816* n, tsym226846* s_495209) {
	tnode226816* result;
	tsym226846* s;
	tnode226816* a;
	result = 0;
	{
		NI i_495411;
		NI HEX3Atmp_495588;
		NI LOC2;
		NI res_495591;
		i_495411 = 0;
		HEX3Atmp_495588 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_495588 = (NI64)(LOC2 - 1);
		res_495591 = 1;
		{
			while (1) {
				if (!(res_495591 <= HEX3Atmp_495588)) goto LA4;
				i_495411 = res_495591;
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_495411]).Typ), semtypenode_488269(c, (*n).kindU.S6.Sons->data[i_495411], NIM_NIL));
				res_495591 += 1;
			} LA4: ;
		}
	}
	s = s_495209;
	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_227424((*(*s).Ast).kindU.S6.Sons->data[2]);
			LOC12 = 0;
			LOC12 = len_227364(n);
			if (!!((LOC11 == (NI64)(LOC12 - 1)))) goto LA13;
			expected = safelen_227424((*(*s).Ast).kindU.S6.Sons->data[2]);
			LOC15 = 0;
			LOC16 = 0;
			LOC16 = rendertree_251058(n, 0);
			LOC17 = 0;
			LOC17 = len_227364(n);
			LOC18 = 0;
			LOC18 = nimIntToStr((NI64)(LOC17 - 1));
			LOC19 = 0;
			LOC19 = nimIntToStr(expected);
			LOC15 = rawNewString(LOC16->Sup.len + LOC18->Sup.len + LOC19->Sup.len + 48);
appendString(LOC15, ((NimStringDesc*) &TMP3284));
appendString(LOC15, LOC16);
appendString(LOC15, ((NimStringDesc*) &TMP3285));
appendString(LOC15, LOC18);
appendString(LOC15, ((NimStringDesc*) &TMP3286));
appendString(LOC15, LOC19);
			localerror_198955((*n).Info, ((NU16) 4), LOC15);
			result = n;
			goto BeforeRet;
		}
		LA13: ;
		result = explicitgenericsym_495127(c, n, s);
	}
	goto LA5;
	LA7: ;
	{
		if (!((*a).Kind == ((NU8) 56) || (*a).Kind == ((NU8) 57))) goto LA21;
		result = newnodei_227138((*a).Kind, (*n).Info);
		{
			NI i_495520;
			NI HEX3Atmp_495594;
			NI LOC24;
			NI res_495597;
			i_495520 = 0;
			HEX3Atmp_495594 = 0;
			LOC24 = 0;
			LOC24 = len_227364(a);
			HEX3Atmp_495594 = (NI64)(LOC24 - 1);
			res_495597 = 0;
			{
				while (1) {
					tsym226846* candidate;
					if (!(res_495597 <= HEX3Atmp_495594)) goto LA26;
					i_495520 = res_495597;
					candidate = (*(*a).kindU.S6.Sons->data[i_495520]).kindU.S4.Sym;
					{
						if (!((126976 &(1<<(((*candidate).Kind)&31)))!=0)) goto LA29;
						{
							NI LOC33;
							NI LOC34;
							tnode226816* LOC37;
							LOC33 = 0;
							LOC33 = safelen_227424((*(*candidate).Ast).kindU.S6.Sons->data[2]);
							LOC34 = 0;
							LOC34 = len_227364(n);
							if (!(LOC33 == (NI64)(LOC34 - 1))) goto LA35;
							LOC37 = 0;
							LOC37 = explicitgenericsym_495127(c, n, candidate);
							add_227498(result, LOC37);
						}
						LA35: ;
					}
					LA29: ;
					res_495597 += 1;
				} LA26: ;
			}
		}
		{
			NIM_BOOL LOC40;
			NI LOC41;
			LOC40 = 0;
			LOC41 = 0;
			LOC41 = len_227364(result);
			LOC40 = (LOC41 == 1);
			if (!(LOC40)) goto LA42;
			LOC40 = ((*a).Kind == ((NU8) 56));
			LA42: ;
			if (!LOC40) goto LA43;
			result = HEX5BHEX5D_227698(result, 0);
		}
		LA43: ;
	}
	goto LA5;
	LA21: ;
	{
		result = explicitgenericinsterror_495120(n);
	}
	LA5: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semarrayaccess_538259)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = semsubscript_537915(c, n, flags);
	{
		tident201021* LOC5;
		tnode226816* LOC6;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = getident_201472(((NimStringDesc*) &TMP3287));
		LOC6 = 0;
		LOC6 = buildoverloadedsubscripts_537829(n, LOC5);
		result = semexpr_488201(c, LOC6, 0);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NU8, checkpar_542305)(tnode226816* n) {
	NU8 result;
	NI length;
	result = 0;
	length = sonslen_227249(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_542368;
			NI HEX3Atmp_542495;
			NI res_542498;
			i_542368 = 0;
			HEX3Atmp_542495 = 0;
			HEX3Atmp_542495 = (NI64)(length - 1);
			res_542498 = 0;
			{
				while (1) {
					if (!(res_542498 <= HEX3Atmp_542495)) goto LA21;
					i_542368 = res_542498;
					{
						if (!(result == ((NU8) 2))) goto LA24;
						{
							NIM_BOOL LOC28;
							LOC28 = 0;
							LOC28 = !(((*(*n).kindU.S6.Sons->data[i_542368]).Kind == ((NU8) 34)));
							if (LOC28) goto LA29;
							LOC28 = !(((*(*(*n).kindU.S6.Sons->data[i_542368]).kindU.S6.Sons->data[0]).Kind == ((NU8) 3) || (*(*(*n).kindU.S6.Sons->data[i_542368]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)));
							LA29: ;
							if (!LOC28) goto LA30;
							localerror_198955((*(*n).kindU.S6.Sons->data[i_542368]).Info, ((NU16) 170), ((NimStringDesc*) &TMP2890));
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA30: ;
					}
					goto LA22;
					LA24: ;
					{
						{
							if (!((*(*n).kindU.S6.Sons->data[i_542368]).Kind == ((NU8) 34))) goto LA35;
							localerror_198955((*(*n).kindU.S6.Sons->data[i_542368]).Info, ((NU16) 171), ((NimStringDesc*) &TMP2890));
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA35: ;
					}
					LA22: ;
					res_542498 += 1;
				} LA21: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semtuplepositionsconstr_542899)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	ttype226852* typ;
	result = 0;
	result = n;
	typ = newtypes_291213(((NU8) 18), c);
	{
		NI i_542918;
		NI HEX3Atmp_542980;
		NI LOC2;
		NI res_542983;
		i_542918 = 0;
		HEX3Atmp_542980 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_542980 = (NI64)(LOC2 - 1);
		res_542983 = 0;
		{
			while (1) {
				if (!(res_542983 <= HEX3Atmp_542980)) goto LA4;
				i_542918 = res_542983;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_542918]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[i_542918], (flags & 32)));
				addsonskipintlit_283574(typ, (*(*n).kindU.S6.Sons->data[i_542918]).Typ);
				res_542983 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	return result;
}

N_NIMCALL(tnode226816*, semtuplefieldsconstr_542512)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	ttype226852* typ;
	intset223056 ids;
	result = 0;
	result = newnodei_227138(((NU8) 37), (*n).Info);
	typ = newtypes_291213(((NU8) 18), c);
	asgnRefNoCycle((void**) (&(*typ).N), newnodei_227138(((NU8) 137), (*n).Info));
	memset((void*)(&ids), 0, sizeof(ids));
	chckNil((void*)(&ids));
	memset((void*)(&ids), 0, sizeof(ids));
	initintset_223950((&ids));
	{
		NI i_542532;
		NI HEX3Atmp_542882;
		NI LOC2;
		NI res_542885;
		i_542532 = 0;
		HEX3Atmp_542882 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_542882 = (NI64)(LOC2 - 1);
		res_542885 = 0;
		{
			while (1) {
				tident201021* id;
				tsym226846* f;
				tnode226816* LOC24;
				if (!(res_542885 <= HEX3Atmp_542882)) goto LA4;
				i_542532 = res_542885;
				{
					NIM_BOOL LOC7;
					tnode226816* LOC8;
					tnode226816* LOC10;
					tnode226816* LOC11;
					LOC7 = 0;
					LOC8 = 0;
					LOC8 = HEX5BHEX5D_227698(n, i_542532);
					LOC7 = !(((*LOC8).Kind == ((NU8) 34)));
					if (LOC7) goto LA9;
					LOC10 = 0;
					LOC10 = HEX5BHEX5D_227698(n, i_542532);
					LOC11 = 0;
					LOC11 = HEX5BHEX5D_227698(LOC10, 0);
					LOC7 = !(((*LOC11).Kind == ((NU8) 3) || (*LOC11).Kind == ((NU8) 2)));
					LA9: ;
					if (!LOC7) goto LA12;
					illformedast_292405((*n).kindU.S6.Sons->data[i_542532]);
				}
				LA12: ;
				id = 0;
				{
					if (!((*(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2))) goto LA16;
					id = (*(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[0]).kindU.S5.Ident;
				}
				goto LA14;
				LA16: ;
				{
					id = (*(*(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[0]).kindU.S4.Sym).Name;
				}
				LA14: ;
				{
					NIM_BOOL LOC21;
					LOC21 = 0;
					LOC21 = containsorincl_223916((&ids), (*id).Sup.Id);
					if (!LOC21) goto LA22;
					localerror_198955((*(*n).kindU.S6.Sons->data[i_542532]).Info, ((NU16) 86), (*id).S);
				}
				LA22: ;
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, (*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[1], (flags & 32)));
				f = newsyms_488918(((NU8) 19), (*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[0], c);
				asgnRefNoCycle((void**) (&(*f).Typ), skipintlit_283533((*(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[1]).Typ));
				(*f).Position = i_542532;
				rawaddson_231562(typ, (*f).Typ);
				LOC24 = 0;
				LOC24 = newsymnode_227132(f);
				addson_227287((*typ).N, LOC24);
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_542532]).kindU.S6.Sons->data[0]), newsymnode_227132(f));
				addson_227287(result, (*n).kindU.S6.Sons->data[i_542532]);
				res_542885 += 1;
			} LA4: ;
		}
	}
	asgnRefNoCycle((void**) (&(*result).Typ), typ);
	return result;
}

N_NIMCALL(tnode226816*, semsetconstr_541633)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(((NU8) 39), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), newtypes_291213(((NU8) 19), c));
	{
		NI LOC3;
		ttype226852* LOC6;
		LOC3 = 0;
		LOC3 = sonslen_227249(n);
		if (!(LOC3 == 0)) goto LA4;
		LOC6 = 0;
		LOC6 = newtypes_291213(((NU8) 3), c);
		rawaddson_231562((*result).Typ, LOC6);
	}
	goto LA1;
	LA4: ;
	{
		ttype226852* typ;
		typ = NIM_NIL;
		{
			NI i_541651;
			NI HEX3Atmp_542163;
			NI LOC9;
			NI res_542166;
			i_541651 = 0;
			HEX3Atmp_542163 = 0;
			LOC9 = 0;
			LOC9 = sonslen_227249(n);
			HEX3Atmp_542163 = (NI64)(LOC9 - 1);
			res_542166 = 0;
			{
				while (1) {
					if (!(res_542166 <= HEX3Atmp_542163)) goto LA11;
					i_541651 = res_542166;
					{
						NIM_BOOL LOC14;
						LOC14 = 0;
						LOC14 = isrange_263216((*n).kindU.S6.Sons->data[i_541651]);
						if (!LOC14) goto LA15;
						checksonslen_292415((*n).kindU.S6.Sons->data[i_541651], 3);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[1]), semexprwithtype_488211(c, (*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[1], 0));
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[2]), semexprwithtype_488211(c, (*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[2], 0));
						{
							if (!(typ == NIM_NIL)) goto LA19;
							typ = skiptypes_231245((*(*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[1]).Typ, 8423424);
						}
						LA19: ;
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_541651]).Typ), (*(*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[2]).Typ);
					}
					goto LA12;
					LA15: ;
					{
						if (!((*(*n).kindU.S6.Sons->data[i_541651]).Kind == ((NU8) 44))) goto LA22;
						{
							if (!(typ == NIM_NIL)) goto LA26;
							typ = skiptypes_231245((*(*(*n).kindU.S6.Sons->data[i_541651]).kindU.S6.Sons->data[0]).Typ, 8423424);
						}
						LA26: ;
					}
					goto LA12;
					LA22: ;
					{
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_541651]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[i_541651], 0));
						{
							if (!(typ == NIM_NIL)) goto LA31;
							typ = skiptypes_231245((*(*n).kindU.S6.Sons->data[i_541651]).Typ, 8423424);
						}
						LA31: ;
					}
					LA12: ;
					res_542166 += 1;
				} LA11: ;
			}
		}
		{
			NIM_BOOL LOC35;
			ttype226852* LOC38;
			LOC35 = 0;
			LOC35 = isordinaltype_264092(typ);
			if (!!(LOC35)) goto LA36;
			localerror_198955((*n).Info, ((NU16) 74), ((NimStringDesc*) &TMP2890));
			LOC38 = 0;
			LOC38 = getsystype_283030(((NU8) 31));
			typ = makerangetype_292350(c, IL64(0), IL64(65535), (*n).Info, LOC38);
		}
		goto LA33;
		LA36: ;
		{
			NI64 LOC40;
			ttype226852* LOC43;
			LOC40 = 0;
			LOC40 = lengthord_264016(typ);
			if (!(IL64(65536) < LOC40)) goto LA41;
			LOC43 = 0;
			LOC43 = getsystype_283030(((NU8) 31));
			typ = makerangetype_292350(c, IL64(0), IL64(65535), (*n).Info, LOC43);
		}
		goto LA33;
		LA41: ;
		LA33: ;
		addsonskipintlit_283574((*result).Typ, typ);
		{
			NI i_542024;
			NI HEX3Atmp_542170;
			NI LOC45;
			NI res_542173;
			i_542024 = 0;
			HEX3Atmp_542170 = 0;
			LOC45 = 0;
			LOC45 = sonslen_227249(n);
			HEX3Atmp_542170 = (NI64)(LOC45 - 1);
			res_542173 = 0;
			{
				while (1) {
					tnode226816* m;
					if (!(res_542173 <= HEX3Atmp_542170)) goto LA47;
					i_542024 = res_542173;
					m = 0;
					{
						NIM_BOOL LOC50;
						tnode226816* LOC53;
						tnode226816* LOC54;
						LOC50 = 0;
						LOC50 = isrange_263216((*n).kindU.S6.Sons->data[i_542024]);
						if (!LOC50) goto LA51;
						m = newnodei_227138(((NU8) 44), (*(*n).kindU.S6.Sons->data[i_542024]).Info);
						LOC53 = 0;
						LOC53 = fitnode_488245(c, typ, (*(*n).kindU.S6.Sons->data[i_542024]).kindU.S6.Sons->data[1]);
						addson_227287(m, LOC53);
						LOC54 = 0;
						LOC54 = fitnode_488245(c, typ, (*(*n).kindU.S6.Sons->data[i_542024]).kindU.S6.Sons->data[2]);
						addson_227287(m, LOC54);
					}
					goto LA48;
					LA51: ;
					{
						if (!((*(*n).kindU.S6.Sons->data[i_542024]).Kind == ((NU8) 44))) goto LA56;
						m = (*n).kindU.S6.Sons->data[i_542024];
					}
					goto LA48;
					LA56: ;
					{
						m = fitnode_488245(c, typ, (*n).kindU.S6.Sons->data[i_542024]);
					}
					LA48: ;
					addson_227287(result, m);
					res_542173 += 1;
				} LA47: ;
			}
		}
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semlambda_488261)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	tsym226846* s;
	tscope226840* LOC13;
	tnode226816* gp;
	result = 0;
	result = semprocannotation_525247(c, n);
	{
		if (!!((result == NIM_NIL))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = n;
	checksonslen_292415(n, 7);
	s = 0;
	{
		tnode226816* LOC7;
		tsym226846* LOC10;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_227698(n, 0);
		if (!!(((*LOC7).Kind == ((NU8) 3)))) goto LA8;
		LOC10 = 0;
		LOC10 = getcurrowner_291255();
		s = newsym_227074(((NU8) 12), idanon_201504, LOC10, (*n).Info);
		asgnRefNoCycle((void**) (&(*s).Ast), n);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_227132(s));
	}
	goto LA5;
	LA8: ;
	{
		tnode226816* LOC12;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(n, 0);
		s = (*LOC12).kindU.S4.Sym;
	}
	LA5: ;
	pushowner_291260(s);
	LOC13 = 0;
	LOC13 = openscope_296191(c);
	gp = 0;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA16;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), semgenericparamlist_505001(c, (*n).kindU.S6.Sons->data[2], NIM_NIL));
		gp = (*n).kindU.S6.Sons->data[2];
	}
	goto LA14;
	LA16: ;
	{
		gp = newnodei_227138(((NU8) 75), (*n).Info);
	}
	LA14: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[3]).Kind == ((NU8) 1)))) goto LA21;
		semparamlist_488284(c, (*n).kindU.S6.Sons->data[3], gp, s);
		{
			NIM_BOOL LOC25;
			NI LOC26;
			LOC25 = 0;
			LOC26 = 0;
			LOC26 = sonslen_227249(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_291213(((NU8) 25), c));
		rawaddson_231562((*s).Typ, NIM_NIL);
	}
	LA19: ;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[4]).Kind == ((NU8) 1)))) goto LA33;
		pragma_311079(c, s, (*n).kindU.S6.Sons->data[4], TMP3290);
	}
	LA33: ;
	(*s).Options = goptions_170116;
	{
		if (!!(((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1)))) goto LA37;
		{
			if (!(((*s).Flags &(1<<((((NU8) 5))&31)))!=0)) goto LA41;
			localerror_198955((*(*n).kindU.S6.Sons->data[6]).Info, ((NU16) 137), (*(*s).Name).S);
		}
		LA41: ;
		{
			NIM_BOOL LOC45;
			NI LOC46;
			NIM_BOOL LOC48;
			NI LOC49;
			tnode226816* LOC51;
			tnode226816* sembody;
			tnode226816* LOC54;
			LOC45 = 0;
			LOC46 = 0;
			LOC46 = len_227364(gp);
			LOC45 = (LOC46 == 0);
			if (LOC45) goto LA47;
			LOC48 = 0;
			LOC49 = 0;
			LOC49 = len_227364(gp);
			LOC48 = (LOC49 == 1);
			if (!(LOC48)) goto LA50;
			LOC51 = 0;
			LOC51 = HEX5BHEX5D_227698(gp, 0);
			LOC48 = (((*(*LOC51).Typ).Flags &(1<<((((NU8) 10))&31)))!=0);
			LA50: ;
			LOC45 = LOC48;
			LA47: ;
			if (!LOC45) goto LA52;
			pushproccon_291380(c, s);
			addresult_525075(c, (*(*s).Typ).Sons->data[0], (*n).Info, ((NU8) 12));
			LOC54 = 0;
			LOC54 = semprocbody_488238(c, (*n).kindU.S6.Sons->data[6]);
			sembody = hlobody_490479(c, LOC54);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_442373((*c).Module, sembody, s));
			addresultnode_525118(c, n);
			popproccon_291425(c);
		}
		goto LA43;
		LA52: ;
		{
			if (!!(((flags &(1<<((((NU8) 7))&15)))!=0))) goto LA56;
			localerror_198955((*n).Info, ((NU16) 227), ((NimStringDesc*) &TMP2890));
		}
		goto LA43;
		LA56: ;
		LA43: ;
		sideeffectscheck_491615(c, s);
	}
	goto LA35;
	LA37: ;
	{
		localerror_198955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA35: ;
	closescope_296211(c);
	popowner_291266();
	asgnRefNoCycle((void**) (&(*result).Typ), (*s).Typ);
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, iscastable_531025)(ttype226852* dst, ttype226852* src) {
	NIM_BOOL result;
	NI64 dstsize;
	NI64 srcsize;
	result = 0;
	{
		ttype226852* LOC3;
		LOC3 = 0;
		LOC3 = skiptypes_231245(dst, IL64(211106232576256));
		if (!((*LOC3).Kind == ((NU8) 27))) goto LA4;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA4: ;
	dstsize = 0;
	srcsize = 0;
	dstsize = computesize_264193(dst);
	srcsize = computesize_264193(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_264231(dst, ((NU8) 3));
		if (!!(LOC14)) goto LA15;
		result = NIM_FALSE;
	}
	goto LA6;
	LA15: ;
	{
		NIM_BOOL LOC18;
		NIM_BOOL LOC19;
		ttype226852* LOC21;
		ttype226852* LOC23;
		LOC18 = 0;
		LOC19 = 0;
		LOC19 = (srcsize <= dstsize);
		if (LOC19) goto LA20;
		LOC21 = 0;
		LOC21 = skiptypes_231245(dst, IL64(211106232576256));
		LOC19 = ((IL64(35182224621574) &(IL64(1)<<(((*LOC21).Kind)&IL64(63))))!=0);
		LA20: ;
		LOC18 = LOC19;
		if (LOC18) goto LA22;
		LOC23 = 0;
		LOC23 = skiptypes_231245(src, IL64(211106232576000));
		LOC18 = ((IL64(35182224621574) &(IL64(1)<<(((*LOC23).Kind)&IL64(63))))!=0);
		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_175612)));
	}
	LA28: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semcast_531461)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* LOC5;
	tnode226816* LOC6;
	result = 0;
	{
		if (!((gglobaloptions_170118 &(1<<((((NU8) 6))&31)))!=0)) goto LA3;
		localerror_198955((*n).Info, ((NU16) 91), ((NimStringDesc*) &TMP2890));
	}
	LA3: ;
	checksonslen_292415(n, 2);
	result = newnodei_227138(((NU8) 61), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).Typ), semtypenode_488269(c, (*n).kindU.S6.Sons->data[0], NIM_NIL));
	LOC5 = 0;
	LOC5 = copytree_227329((*n).kindU.S6.Sons->data[0]);
	addson_227287(result, LOC5);
	LOC6 = 0;
	LOC6 = semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[1], 0);
	addson_227287(result, LOC6);
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC12;
		LOC9 = 0;
		LOC9 = iscastable_531025((*result).Typ, (*(*result).kindU.S6.Sons->data[1]).Typ);
		if (!!(LOC9)) goto LA10;
		LOC12 = 0;
		LOC12 = typetostring_264031((*result).Typ, ((NU8) 0));
		localerror_198955((*result).Info, ((NU16) 92), LOC12);
	}
	LA10: ;
	return result;
}

static N_INLINE(void, semdestructorcheck_518185)(tcontext291021* c, tnode226816* 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;
		{
			ttype226852* LOC9;
			LOC9 = 0;
			LOC9 = instantiatedestructor_516765(c, (*n).Typ);
			if (!!((LOC9 == NIM_NIL))) goto LA10;
			localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3291));
		}
		LA10: ;
	}
	LA5: ;
}

N_NIMCALL(tnode226816*, semexprbranch_518411)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = semexpr_488201(c, n, 0);
	{
		if (!!(((*result).Typ == NIM_NIL))) goto LA3;
		semprocvarcheck_516664(c, result);
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA7;
			result = newderef_518404(result);
		}
		LA7: ;
		semdestructorcheck_518185(c, result, 0);
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, semexprbranchscope_518447)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	result = semexprbranch_518411(c, n);
	closescope_296211(c);
	return result;
}

N_NIMCALL(tnode226816*, semif_518734)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* typ;
	NIM_BOOL haselse;
	result = 0;
	result = n;
	typ = commontypebegin_488459;
	haselse = NIM_FALSE;
	{
		NI i_518753;
		NI HEX3Atmp_519142;
		NI LOC2;
		NI res_519145;
		i_518753 = 0;
		HEX3Atmp_519142 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_519142 = (NI64)(LOC2 - 1);
		res_519145 = 0;
		{
			while (1) {
				tnode226816* it;
				if (!(res_519145 <= HEX3Atmp_519142)) goto LA4;
				i_518753 = res_519145;
				it = (*n).kindU.S6.Sons->data[i_518753];
				{
					NI LOC7;
					tscope226840* LOC10;
					tnode226816* LOC11;
					LOC7 = 0;
					LOC7 = len_227364(it);
					if (!(LOC7 == 2)) goto LA8;
					LOC10 = 0;
					LOC10 = openscope_296191(c);
					LOC11 = 0;
					LOC11 = semexprwithtype_488211(c, (*it).kindU.S6.Sons->data[0], 0);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), forcebool_496036(c, LOC11));
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[1]), semexprbranch_518411(c, (*it).kindU.S6.Sons->data[1]));
					typ = commontype_488492(typ, (*(*it).kindU.S6.Sons->data[1]).Typ);
					closescope_296211(c);
				}
				goto LA5;
				LA8: ;
				{
					NI LOC13;
					LOC13 = 0;
					LOC13 = len_227364(it);
					if (!(LOC13 == 1)) goto LA14;
					haselse = NIM_TRUE;
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[0]), semexprbranchscope_518447(c, (*it).kindU.S6.Sons->data[0]));
					typ = commontype_488492(typ, (*(*it).kindU.S6.Sons->data[0]).Typ);
				}
				goto LA5;
				LA14: ;
				{
					illformedast_292405(it);
				}
				LA5: ;
				res_519145 += 1;
			} LA4: ;
		}
	}
	{
		NIM_BOOL LOC19;
		NIM_BOOL LOC20;
		LOC19 = 0;
		LOC20 = 0;
		LOC20 = isemptytype_233991(typ);
		if (LOC20) goto LA21;
		LOC20 = ((*typ).Kind == ((NU8) 5));
		LA21: ;
		LOC19 = LOC20;
		if (LOC19) goto LA22;
		LOC19 = !(haselse);
		LA22: ;
		if (!LOC19) goto LA23;
		{
			tnode226816* it_519094;
			it_519094 = 0;
			{
				NI i_519151;
				NI HEX3Atmp_519153;
				NI LOC27;
				NI res_519155;
				i_519151 = 0;
				HEX3Atmp_519153 = 0;
				LOC27 = 0;
				LOC27 = len_227364(n);
				HEX3Atmp_519153 = (LOC27 - 1);
				res_519155 = 0;
				{
					while (1) {
						tnode226816* LOC30;
						if (!(res_519155 <= HEX3Atmp_519153)) goto LA29;
						i_519151 = res_519155;
						it_519094 = (*n).kindU.S6.Sons->data[i_519151];
						LOC30 = 0;
						LOC30 = lastson_227261(it_519094);
						discardcheck_518617(c, LOC30);
						res_519155 += 1;
					} LA29: ;
				}
			}
		}
		(*result).Kind = ((NU8) 92);
		{
			if (!(typ == enforcevoidcontext_516110)) goto LA33;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_516110);
		}
		LA33: ;
	}
	goto LA17;
	LA23: ;
	{
		{
			tnode226816* it_519111;
			it_519111 = 0;
			{
				NI i_519160;
				NI HEX3Atmp_519162;
				NI LOC38;
				NI res_519164;
				i_519160 = 0;
				HEX3Atmp_519162 = 0;
				LOC38 = 0;
				LOC38 = len_227364(n);
				HEX3Atmp_519162 = (LOC38 - 1);
				res_519164 = 0;
				{
					while (1) {
						NI j;
						NI LOC41;
						if (!(res_519164 <= HEX3Atmp_519162)) goto LA40;
						i_519160 = res_519164;
						it_519111 = (*n).kindU.S6.Sons->data[i_519160];
						LOC41 = 0;
						LOC41 = len_227364(it_519111);
						j = (NI64)(LOC41 - 1);
						asgnRefNoCycle((void**) (&(*it_519111).kindU.S6.Sons->data[j]), fitnode_488245(c, typ, (*it_519111).kindU.S6.Sons->data[j]));
						res_519164 += 1;
					} LA40: ;
				}
			}
		}
		(*result).Kind = ((NU8) 48);
		asgnRefNoCycle((void**) (&(*result).Typ), typ);
	}
	LA17: ;
	return result;
}

N_NIMCALL(tnode226816*, semtableconstr_542196)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI lastkey;
	result = 0;
	result = newnodei_227138(((NU8) 41), (*n).Info);
	lastkey = 0;
	{
		NI i_542212;
		NI HEX3Atmp_542273;
		NI LOC2;
		NI res_542276;
		i_542212 = 0;
		HEX3Atmp_542273 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_542273 = (NI64)(LOC2 - 1);
		res_542276 = 0;
		{
			while (1) {
				tnode226816* x;
				if (!(res_542276 <= HEX3Atmp_542273)) goto LA4;
				i_542212 = res_542276;
				x = (*n).kindU.S6.Sons->data[i_542212];
				{
					NIM_BOOL LOC7;
					NI LOC9;
					tnode226816* pair;
					tnode226816* LOC16;
					tnode226816* LOC17;
					LOC7 = 0;
					LOC7 = ((*x).Kind == ((NU8) 34));
					if (!(LOC7)) goto LA8;
					LOC9 = 0;
					LOC9 = sonslen_227249(x);
					LOC7 = (LOC9 == 2);
					LA8: ;
					if (!LOC7) goto LA10;
					{
						NI j_542249;
						NI HEX3Atmp_542268;
						NI res_542271;
						j_542249 = 0;
						HEX3Atmp_542268 = 0;
						HEX3Atmp_542268 = (NI64)(i_542212 - 1);
						res_542271 = lastkey;
						{
							while (1) {
								tnode226816* pair;
								tnode226816* LOC15;
								if (!(res_542271 <= HEX3Atmp_542268)) goto LA14;
								j_542249 = res_542271;
								pair = newnodei_227138(((NU8) 37), (*x).Info);
								add_227498(pair, (*n).kindU.S6.Sons->data[j_542249]);
								LOC15 = 0;
								LOC15 = HEX5BHEX5D_227698(x, 1);
								add_227498(pair, LOC15);
								add_227498(result, pair);
								res_542271 += 1;
							} LA14: ;
						}
					}
					pair = newnodei_227138(((NU8) 37), (*x).Info);
					LOC16 = 0;
					LOC16 = HEX5BHEX5D_227698(x, 0);
					add_227498(pair, LOC16);
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_227698(x, 1);
					add_227498(pair, LOC17);
					add_227498(result, pair);
					lastkey = (NI64)(i_542212 + 1);
				}
				LA10: ;
				res_542276 += 1;
			} LA4: ;
		}
	}
	{
		NI LOC20;
		LOC20 = 0;
		LOC20 = len_227364(n);
		if (!!((lastkey == LOC20))) goto LA21;
		illformedast_292405(n);
	}
	LA21: ;
	result = semexpr_488201(c, result, 0);
	return result;
}

N_NIMCALL(tnode226816*, semstaticexpr_535215)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* a;
	result = 0;
	a = semexpr_488201(c, (*n).kindU.S6.Sons->data[0], 0);
	result = evalstaticexpr_478237((*c).Module, a, (*(*c).P).Owner);
	{
		NimStringDesc* LOC5;
		if (!result == 0) goto LA3;
		LOC5 = 0;
		LOC5 = rendertree_251058(n, 0);
		localerror_198955((*n).Info, ((NU16) 208), LOC5);
		result = emptynode_227738;
	}
	goto LA1;
	LA3: ;
	{
		result = fixuptypeaftereval_489201(c, result, a);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semblock_543699)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	result = 0;
	result = n;
	(*(*c).P).Nestedblockcounter += 1;
	checksonslen_292415(n, 2);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	{
		tsym226846* labl;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA4;
		labl = newsymg_488930(((NU8) 22), (*n).kindU.S6.Sons->data[0], c);
		{
			if (!!((((*labl).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA8;
			adddecl_296694(c, labl);
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), newsymnode_228754(labl, (*(*n).kindU.S6.Sons->data[0]).Info));
		}
		LA8: ;
		suggestsym_421882((*(*n).kindU.S6.Sons->data[0]).Info, labl);
	}
	LA4: ;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semexpr_488201(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_233991((*n).Typ);
		if (!LOC12) goto LA13;
		(*n).Kind = ((NU8) 112);
	}
	goto LA10;
	LA13: ;
	{
		(*n).Kind = ((NU8) 127);
	}
	LA10: ;
	closescope_296211(c);
	(*(*c).P).Nestedblockcounter -= 1;
	return result;
}

N_NIMCALL(tnode226816*, semtry_519853)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	ttype226852* typ_519870;
	intset223056 check;
	NI last;
	NI LOC1;
	result = 0;
	result = n;
	(*(*c).P).Intrystmt += 1;
	checkminsonslen_292425(n, 2);
	typ_519870 = commontypebegin_488459;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprbranchscope_518447(c, (*n).kindU.S6.Sons->data[0]));
	typ_519870 = commontype_488492(typ_519870, (*(*n).kindU.S6.Sons->data[0]).Typ);
	memset((void*)(&check), 0, sizeof(check));
	chckNil((void*)(&check));
	memset((void*)(&check), 0, sizeof(check));
	initintset_223950((&check));
	LOC1 = 0;
	LOC1 = sonslen_227249(n);
	last = (NI64)(LOC1 - 1);
	{
		NI i_519927;
		NI res_520421;
		i_519927 = 0;
		res_520421 = 1;
		{
			while (1) {
				tnode226816* a;
				NI length;
				if (!(res_520421 <= last)) goto LA4;
				i_519927 = res_520421;
				a = (*n).kindU.S6.Sons->data[i_519927];
				checkminsonslen_292425(a, 1);
				length = sonslen_227249(a);
				{
					if (!((*a).Kind == ((NU8) 87))) goto LA7;
					{
						NIM_BOOL LOC11;
						slice84178 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_92299(0, 0);
						HEX5BHEX5DHEX3D_493447((&(*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_227249(a);
					}
					LA13: ;
					{
						NI j_520067;
						NI HEX3Atmp_520414;
						NI res_520417;
						j_520067 = 0;
						HEX3Atmp_520414 = 0;
						HEX3Atmp_520414 = (NI64)(length - 2);
						res_520417 = 0;
						{
							while (1) {
								ttype226852* typ;
								if (!(res_520417 <= HEX3Atmp_520414)) goto LA18;
								j_520067 = res_520417;
								typ = semtypenode_488269(c, (*a).kindU.S6.Sons->data[j_520067], NIM_NIL);
								{
									if (!((*typ).Kind == ((NU8) 22))) goto LA21;
									typ = (*typ).Sons->data[0];
								}
								LA21: ;
								{
									if (!!(((*typ).Kind == ((NU8) 17)))) goto LA25;
									localerror_198955((*(*a).kindU.S6.Sons->data[j_520067]).Info, ((NU16) 112), ((NimStringDesc*) &TMP2890));
								}
								LA25: ;
								asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[j_520067]), newnodei_227138(((NU8) 4), (*(*a).kindU.S6.Sons->data[j_520067]).Info));
								asgnRefNoCycle((void**) (&(*(*a).kindU.S6.Sons->data[j_520067]).Typ), typ);
								{
									NIM_BOOL LOC29;
									LOC29 = 0;
									LOC29 = containsorincl_223916((&check), (*typ).Sup.Id);
									if (!LOC29) goto LA30;
									localerror_198955((*(*a).kindU.S6.Sons->data[j_520067]).Info, ((NU16) 35), ((NimStringDesc*) &TMP2890));
								}
								LA30: ;
								res_520417 += 1;
							} LA18: ;
						}
					}
				}
				goto LA5;
				LA7: ;
				{
					if (!!(((*a).Kind == ((NU8) 107)))) goto LA33;
					illformedast_292405(n);
				}
				goto LA5;
				LA33: ;
				LA5: ;
				asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[(NI64)(length - 1)]), semexprbranchscope_518447(c, (*a).kindU.S6.Sons->data[(NI64)(length - 1)]));
				{
					if (!!(((*a).Kind == ((NU8) 107)))) goto LA37;
					typ_519870 = commontype_488492(typ_519870, (*(*a).kindU.S6.Sons->data[(NI64)(length - 1)]).Typ);
				}
				goto LA35;
				LA37: ;
				{
					last -= 1;
				}
				LA35: ;
				res_520421 += 1;
			} LA4: ;
		}
	}
	(*(*c).P).Intrystmt -= 1;
	{
		NIM_BOOL LOC42;
		LOC42 = 0;
		LOC42 = isemptytype_233991(typ_519870);
		if (LOC42) goto LA43;
		LOC42 = ((*typ_519870).Kind == ((NU8) 5));
		LA43: ;
		if (!LOC42) goto LA44;
		discardcheck_518617(c, (*n).kindU.S6.Sons->data[0]);
		{
			NI i_520289;
			NI HEX3Atmp_520424;
			NI LOC47;
			NI res_520427;
			i_520289 = 0;
			HEX3Atmp_520424 = 0;
			LOC47 = 0;
			LOC47 = len_227364(n);
			HEX3Atmp_520424 = (NI64)(LOC47 - 1);
			res_520427 = 1;
			{
				while (1) {
					tnode226816* LOC50;
					if (!(res_520427 <= HEX3Atmp_520424)) goto LA49;
					i_520289 = res_520427;
					LOC50 = 0;
					LOC50 = lastson_227261((*n).kindU.S6.Sons->data[i_520289]);
					discardcheck_518617(c, LOC50);
					res_520427 += 1;
				} LA49: ;
			}
		}
		{
			if (!(typ_519870 == enforcevoidcontext_516110)) goto LA53;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_516110);
		}
		LA53: ;
	}
	goto LA40;
	LA44: ;
	{
		{
			tnode226816* LOC58;
			tnode226816* LOC61;
			tnode226816* LOC62;
			LOC58 = 0;
			LOC58 = lastson_227261(n);
			if (!((*LOC58).Kind == ((NU8) 107))) goto LA59;
			LOC61 = 0;
			LOC61 = lastson_227261(n);
			LOC62 = 0;
			LOC62 = lastson_227261(LOC61);
			discardcheck_518617(c, LOC62);
		}
		LA59: ;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), fitnode_488245(c, typ_519870, (*n).kindU.S6.Sons->data[0]));
		{
			NI i_520367;
			NI res_520432;
			i_520367 = 0;
			res_520432 = 1;
			{
				while (1) {
					tnode226816* it;
					NI j;
					NI LOC66;
					if (!(res_520432 <= last)) goto LA65;
					i_520367 = res_520432;
					it = (*n).kindU.S6.Sons->data[i_520367];
					LOC66 = 0;
					LOC66 = len_227364(it);
					j = (NI64)(LOC66 - 1);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[j]), fitnode_488245(c, typ_519870, (*it).kindU.S6.Sons->data[j]));
					res_520432 += 1;
				} LA65: ;
			}
		}
		asgnRefNoCycle((void**) (&(*result).Typ), typ_519870);
	}
	LA40: ;
	return result;
}

N_NIMCALL(NIM_BOOL, usesresult_528404)(tnode226816* 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_233963(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: ;
		{
			{
				tnode226816* c_528480;
				c_528480 = 0;
				{
					NI i_528485;
					NI HEX3Atmp_528487;
					NI LOC18;
					NI res_528489;
					i_528485 = 0;
					HEX3Atmp_528487 = 0;
					LOC18 = 0;
					LOC18 = len_227364(n);
					HEX3Atmp_528487 = (LOC18 - 1);
					res_528489 = 0;
					{
						while (1) {
							if (!(res_528489 <= HEX3Atmp_528487)) goto LA20;
							i_528485 = res_528489;
							c_528480 = (*n).kindU.S6.Sons->data[i_528485];
							{
								NIM_BOOL LOC23;
								LOC23 = 0;
								LOC23 = usesresult_528404(c_528480);
								if (!LOC23) goto LA24;
								result = NIM_TRUE;
								goto BeforeRet;
							}
							LA24: ;
							res_528489 += 1;
						} LA20: ;
					}
				}
			}
		}
		LA5: ;
	}
	LA3: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, insertdestructors_517904)(tcontext291021* c, tnode226816* varsection, TY517908* Result) {
	NI totalvars;
	totalvars = sonslen_227249(varsection);
	{
		NI j_517925;
		NI HEX3Atmp_518165;
		NI res_518168;
		j_517925 = 0;
		HEX3Atmp_518165 = 0;
		HEX3Atmp_518165 = (NI64)(totalvars - 1);
		res_518168 = 0;
		{
			while (1) {
				if (!(res_518168 <= HEX3Atmp_518165)) goto LA3;
				j_517925 = res_518168;
				{
					tnode226816* varid;
					tnode226816* LOC5;
					ttype226852* vartyp;
					tlineinfo196539 info;
					ttype226852* destructablet;
					LOC5 = 0;
					LOC5 = HEX5BHEX5D_227698(varsection, j_517925);
					varid = HEX5BHEX5D_227698(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_516765(c, vartyp);
					{
						tnode226816* trystmt;
						tnodeseq226810* LOC28;
						TY247892 LOC29;
						tnodeseq226810* LOC30;
						TY292286 LOC31;
						tnode226816* LOC32;
						tnode226816* LOC33;
						if (!!((destructablet == NIM_NIL))) goto LA14;
						trystmt = newnodei_227138(((NU8) 106), info);
						{
							tnode226816* remainingvars;
							slice84178 LOC20;
							TY517908 LOC21;
							tnode226816* outer;
							tnode226816* inner;
							if (!(j_517925 < (NI64)(totalvars - 1))) goto LA18;
							remainingvars = newnodei_227138((*varsection).Kind, info);
							LOC20 = HEX2EHEX2E_92299((NI64)(j_517925 + 1), -1);
							asgnRefNoCycle((void**) (&(*remainingvars).kindU.S6.Sons), HEX5BHEX5D_517155((*varsection).kindU.S6.Sons, LOC20));
							memset((void*)(&LOC21), 0, sizeof(LOC21));
							insertdestructors_517904(c, remainingvars, (&LOC21));
							outer = 0;
							outer = LOC21.Field0;
							inner = 0;
							inner = LOC21.Field1;
							{
								if (!!((outer == NIM_NIL))) goto LA24;
								addson_227287(trystmt, outer);
								unsureAsgnRef((void**) (&(*Result).Field1), inner);
							}
							goto LA22;
							LA24: ;
							{
								unsureAsgnRef((void**) (&(*Result).Field1), newnodei_227138(((NU8) 115), info));
								addson_227287((*Result).Field1, remainingvars);
								addson_227287(trystmt, (*Result).Field1);
							}
							LA22: ;
						}
						goto LA16;
						LA18: ;
						{
							unsureAsgnRef((void**) (&(*Result).Field1), newnodei_227138(((NU8) 115), info));
							addson_227287(trystmt, (*Result).Field1);
						}
						LA16: ;
						LOC28 = 0;
						LOC28 = (tnodeseq226810*) newSeq((&NTI226810), 1);
						memset((void*)LOC29, 0, sizeof(LOC29));
						LOC30 = 0;
						LOC30 = (tnodeseq226810*) newSeq((&NTI226810), 2);
						memset((void*)LOC31, 0, sizeof(LOC31));
						LOC31[0] = usesym_422001((*destructablet).Destructor);
						LOC31[1] = usesym_422001((*varid).kindU.S4.Sym);
						asgnRefNoCycle((void**) (&LOC30->data[0]), LOC31[0]);
						asgnRefNoCycle((void**) (&LOC30->data[1]), LOC31[1]);
						LOC32 = 0;
						LOC32 = newnode_229207(((NU8) 27), info, LOC30, NIM_NIL);
						LOC29[0] = semstmt_488277(c, LOC32);
						asgnRefNoCycle((void**) (&LOC28->data[0]), LOC29[0]);
						LOC33 = 0;
						LOC33 = newnode_229207(((NU8) 107), info, LOC28, NIM_NIL);
						addson_227287(trystmt, LOC33);
						unsureAsgnRef((void**) (&(*Result).Field0), newnodei_227138(((NU8) 115), info));
						(*varsection).kindU.S6.Sons = (tnodeseq226810*) setLengthSeq(&((*varsection).kindU.S6.Sons)->Sup, sizeof(tnode226816*), (NI64)(j_517925 + 1));
						addson_227287((*Result).Field0, varsection);
						addson_227287((*Result).Field0, trystmt);
						goto BeforeRet;
					}
					LA14: ;
				} LA4: ;
				res_518168 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(tnode226816*, semstmtlist_528505)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	NI length;
	NIM_BOOL voidcontext;
	NI last;
	result = 0;
	result = n;
	(*result).Kind = ((NU8) 115);
	length = sonslen_227249(n);
	voidcontext = NIM_FALSE;
	last = (NI64)(length - 1);
	{
		NI i_528528;
		NI HEX3Atmp_529410;
		NI res_529413;
		i_528528 = 0;
		HEX3Atmp_529410 = 0;
		HEX3Atmp_529410 = (NI64)(length - 1);
		res_529413 = 0;
		{
			while (1) {
				NU8 k;
				if (!(res_529413 <= HEX3Atmp_529410)) goto LA3;
				i_528528 = res_529413;
				k = (*(*n).kindU.S6.Sons->data[i_528528]).Kind;
				switch (k) {
				case ((NU8) 107):
				case ((NU8) 87):
				case ((NU8) 105):
				{
					tnode226816* deferpart;
					tnode226816* trystmt;
					tnode226816* body;
					deferpart = 0;
					{
						if (!(k == ((NU8) 105))) goto LA7;
						deferpart = newnodei_227138(((NU8) 107), (*(*n).kindU.S6.Sons->data[i_528528]).Info);
						add_227498(deferpart, (*(*n).kindU.S6.Sons->data[i_528528]).kindU.S6.Sons->data[0]);
					}
					goto LA5;
					LA7: ;
					{
						if (!(k == ((NU8) 107))) goto LA10;
						message_198976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3292));
						deferpart = (*n).kindU.S6.Sons->data[i_528528];
					}
					goto LA5;
					LA10: ;
					{
						message_198976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3293));
						deferpart = (*n).kindU.S6.Sons->data[i_528528];
					}
					LA5: ;
					trystmt = newnodei_227138(((NU8) 106), (*(*n).kindU.S6.Sons->data[i_528528]).Info);
					body = newnodei_227138(((NU8) 115), (*(*n).kindU.S6.Sons->data[i_528528]).Info);
					{
						NI LOC15;
						slice84178 LOC18;
						LOC15 = 0;
						LOC15 = sonslen_227249(n);
						if (!(i_528528 < (NI64)(LOC15 - 1))) goto LA16;
						LOC18 = HEX2EHEX2E_92299((NI64)(i_528528 + 1), -1);
						asgnRefNoCycle((void**) (&(*body).kindU.S6.Sons), HEX5BHEX5D_517155((*n).kindU.S6.Sons, LOC18));
					}
					LA16: ;
					addson_227287(trystmt, body);
					addson_227287(trystmt, deferpart);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_528528]), semtry_519853(c, trystmt));
					(*n).kindU.S6.Sons = (tnodeseq226810*) setLengthSeq(&((*n).kindU.S6.Sons)->Sup, sizeof(tnode226816*), (NI64)(i_528528 + 1));
					asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[i_528528]).Typ);
					goto BeforeRet;
				}
				break;
				default:
				{
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_528528]), semexpr_488201(c, (*n).kindU.S6.Sons->data[i_528528], 0));
					{
						NIM_BOOL LOC22;
						NIM_BOOL LOC23;
						tnode226816* LOC25;
						tnode226816* LOC27;
						tnode226816* verdict;
						tnode226816* LOC30;
						LOC22 = 0;
						LOC23 = 0;
						LOC23 = (0 < (*c).Intypeclass);
						if (!(LOC23)) goto LA24;
						LOC25 = 0;
						LOC25 = HEX5BHEX5D_227698(n, i_528528);
						LOC23 = !(((*LOC25).Typ == NIM_NIL));
						LA24: ;
						LOC22 = LOC23;
						if (!(LOC22)) goto LA26;
						LOC27 = 0;
						LOC27 = HEX5BHEX5D_227698(n, i_528528);
						LOC22 = ((*(*LOC27).Typ).Kind == ((NU8) 1));
						LA26: ;
						if (!LOC22) goto LA28;
						LOC30 = 0;
						LOC30 = HEX5BHEX5D_227698(n, i_528528);
						verdict = semconstexpr_489503(c, LOC30);
						{
							if (!((*verdict).kindU.S1.Intval == IL64(0))) goto LA33;
							localerror_198966((*result).Info, ((NimStringDesc*) &TMP3294));
						}
						LA33: ;
					}
					LA28: ;
					{
						NIM_BOOL LOC37;
						LOC37 = 0;
						LOC37 = ((*(*n).kindU.S6.Sons->data[i_528528]).Typ == enforcevoidcontext_516110);
						if (LOC37) goto LA38;
						LOC37 = usesresult_528404((*n).kindU.S6.Sons->data[i_528528]);
						LA38: ;
						if (!LOC37) goto LA39;
						voidcontext = NIM_TRUE;
						asgnRefNoCycle((void**) (&(*n).Typ), enforcevoidcontext_516110);
					}
					LA39: ;
					{
						NIM_BOOL LOC43;
						NIM_BOOL LOC45;
						LOC43 = 0;
						LOC43 = (i_528528 == 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_528528]).Typ);
						{
							NIM_BOOL LOC51;
							LOC51 = 0;
							LOC51 = isemptytype_233991((*n).Typ);
							if (!!(LOC51)) goto LA52;
							(*n).Kind = ((NU8) 126);
						}
						LA52: ;
					}
					goto LA41;
					LA47: ;
					{
						NIM_BOOL LOC55;
						LOC55 = 0;
						LOC55 = !((i_528528 == last));
						if (LOC55) goto LA56;
						LOC55 = voidcontext;
						LA56: ;
						if (!LOC55) goto LA57;
						discardcheck_518617(c, (*n).kindU.S6.Sons->data[i_528528]);
					}
					goto LA41;
					LA57: ;
					{
						asgnRefNoCycle((void**) (&(*n).Typ), (*(*n).kindU.S6.Sons->data[i_528528]).Typ);
						{
							NIM_BOOL LOC62;
							LOC62 = 0;
							LOC62 = isemptytype_233991((*n).Typ);
							if (!!(LOC62)) goto LA63;
							(*n).Kind = ((NU8) 126);
						}
						LA63: ;
					}
					LA41: ;
					switch ((*(*n).kindU.S6.Sons->data[i_528528]).Kind) {
					case ((NU8) 99):
					case ((NU8) 100):
					{
						TY517908 LOC66;
						tnode226816* outer;
						tnode226816* inner;
						memset((void*)(&LOC66), 0, sizeof(LOC66));
						insertdestructors_517904(c, (*n).kindU.S6.Sons->data[i_528528], (&LOC66));
						outer = 0;
						outer = LOC66.Field0;
						inner = 0;
						inner = LOC66.Field1;
						{
							tnode226816* rest;
							slice84178 LOC71;
							tnodeseq226810* LOC72;
							tnode226816* LOC73;
							if (!!((outer == NIM_NIL))) goto LA69;
							asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_528528]), outer);
							LOC71 = HEX2EHEX2E_92299((NI64)(i_528528 + 1), (NI64)(length - 1));
							LOC72 = 0;
							LOC72 = HEX5BHEX5D_517155((*n).kindU.S6.Sons, LOC71);
							rest = newnode_229207(((NU8) 115), (*n).Info, LOC72, NIM_NIL);
							LOC73 = 0;
							LOC73 = semstmtlist_528505(c, rest, flags);
							addson_227287(inner, LOC73);
							(*n).kindU.S6.Sons = (tnodeseq226810*) setLengthSeq(&((*n).kindU.S6.Sons)->Sup, sizeof(tnode226816*), (NI64)(i_528528 + 1));
							goto BeforeRet;
						}
						LA69: ;
					}
					break;
					case ((NU8) 108):
					case ((NU8) 109):
					case ((NU8) 110):
					case ((NU8) 111):
					{
						{
							NI j_529093;
							NI HEX3Atmp_529404;
							NI HEX3Atmp_529405;
							NI res_529408;
							j_529093 = 0;
							HEX3Atmp_529404 = 0;
							HEX3Atmp_529405 = 0;
							HEX3Atmp_529404 = (NI64)(i_528528 + 1);
							HEX3Atmp_529405 = (NI64)(length - 1);
							res_529408 = HEX3Atmp_529404;
							{
								while (1) {
									if (!(res_529408 <= HEX3Atmp_529405)) goto LA77;
									j_529093 = res_529408;
									switch ((*(*n).kindU.S6.Sons->data[j_529093]).Kind) {
									case ((NU8) 90):
									case ((NU8) 125):
									case ((NU8) 23):
									case ((NU8) 1):
									{
									}
									break;
									default:
									{
										localerror_198955((*(*n).kindU.S6.Sons->data[j_529093]).Info, ((NU16) 41), ((NimStringDesc*) &TMP2890));
									}
									break;
									}
									res_529408 += 1;
								} LA77: ;
							}
						}
					}
					break;
					default:
					{
					}
					break;
					}
				}
				break;
				}
				res_529413 += 1;
			} LA3: ;
		}
	}
	{
		NI LOC83;
		LOC83 = 0;
		LOC83 = len_227364(result);
		if (!(LOC83 == 1)) goto LA84;
		result = (*result).kindU.S6.Sons->data[0];
	}
	LA84: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semraise_523655)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(n, 1);
	{
		ttype226852* typ;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(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_198955((*n).Info, ((NU16) 112), ((NimStringDesc*) &TMP2890));
		}
		LA9: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tsym226846*, findshadowedvar_520524)(tcontext291021* c, tsym226846* v) {
	tsym226846* result;
	result = 0;
	{
		tscope226840* scope_520529;
		tscope226840* HEX3Atmp_520578;
		tscope226840* current_520581;
		scope_520529 = 0;
		HEX3Atmp_520578 = 0;
		HEX3Atmp_520578 = (*(*c).Currentscope).Parent;
		current_520581 = HEX3Atmp_520578;
		{
			while (1) {
				tsym226846* shadowed;
				if (!!((current_520581 == NIM_NIL))) goto LA3;
				scope_520529 = current_520581;
				{
					if (!(scope_520529 == (*c).Toplevelscope)) goto LA6;
					goto LA1;
				}
				LA6: ;
				shadowed = strtableget_236111((*scope_520529).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_520581 = (*current_520581).Parent;
			} LA3: ;
		}
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, identwithin_520594)(tnode226816* n, tident201021* s) {
	NIM_BOOL result;
	NIM_BOOL LOC10;
	result = 0;
	{
		NI i_520609;
		NI HEX3Atmp_520648;
		NI LOC2;
		NI res_520651;
		i_520609 = 0;
		HEX3Atmp_520648 = 0;
		LOC2 = 0;
		LOC2 = safelen_227424(n);
		HEX3Atmp_520648 = (NI64)(LOC2 - 1);
		res_520651 = 0;
		{
			while (1) {
				if (!(res_520651 <= HEX3Atmp_520648)) goto LA4;
				i_520609 = res_520651;
				{
					NIM_BOOL LOC7;
					LOC7 = 0;
					LOC7 = identwithin_520594((*n).kindU.S6.Sons->data[i_520609], s);
					if (!LOC7) goto LA8;
					result = NIM_TRUE;
					goto BeforeRet;
				}
				LA8: ;
				res_520651 += 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_520804)(tsym226846* 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_198976((*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_198976((*v).Info, ((NU16) 250), (*(*v).Name).S);
		}
		goto LA7;
		LA14: ;
		LA7: ;
	}
	LA5: ;
}

N_NIMCALL(tnode226816*, semvarorlet_520897)(tcontext291021* c, tnode226816* n, NU8 symkind) {
	tnode226816* result;
	tnode226816* b;
	NIM_BOOL hascompiletime;
	result = 0;
	b = 0;
	result = copynode_227323(n);
	hascompiletime = NIM_FALSE;
	{
		NI i_520917;
		NI HEX3Atmp_521574;
		NI LOC2;
		NI res_521577;
		i_520917 = 0;
		HEX3Atmp_521574 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_521574 = (NI64)(LOC2 - 1);
		res_521577 = 0;
		{
			while (1) {
				if (!(res_521577 <= HEX3Atmp_521574)) goto LA4;
				i_520917 = res_521577;
				{
					tnode226816* a;
					NI length;
					ttype226852* typ;
					tnode226816* def;
					ttype226852* tup;
					a = (*n).kindU.S6.Sons->data[i_520917];
					{
						if (!(gcmd_170120 == ((NU8) 14))) goto LA8;
						suggeststmt_422299(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_292405(a);
					}
					LA16: ;
					checkminsonslen_292425(a, 3);
					length = sonslen_227249(a);
					typ = 0;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[(NI64)(length - 2)]).Kind == ((NU8) 1)))) goto LA20;
						typ = semtypenode_488269(c, (*a).kindU.S6.Sons->data[(NI64)(length - 2)], NIM_NIL);
					}
					goto LA18;
					LA20: ;
					{
						typ = NIM_NIL;
					}
					LA18: ;
					def = 0;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[(NI64)(length - 1)]).Kind == ((NU8) 1)))) goto LA25;
						def = semexprwithtype_488211(c, (*a).kindU.S6.Sons->data[(NI64)(length - 1)], 32);
						{
							if (!!((typ == NIM_NIL))) goto LA29;
							{
								NIM_BOOL LOC33;
								LOC33 = 0;
								LOC33 = ismetatype_227752(typ);
								if (!LOC33) goto LA34;
								def = inferwithmetatype_488450(c, typ, def, NIM_FALSE);
								typ = (*def).Typ;
							}
							goto LA31;
							LA34: ;
							{
								def = fitnode_488245(c, typ, def);
							}
							LA31: ;
						}
						goto LA27;
						LA29: ;
						{
							typ = skipintlit_283533((*def).Typ);
							{
								NIM_BOOL LOC40;
								ttype226852* LOC42;
								NimStringDesc* LOC45;
								NimStringDesc* LOC46;
								LOC40 = 0;
								LOC40 = ((17367040 &(IL64(1)<<(((*typ).Kind)&IL64(63))))!=0);
								if (!(LOC40)) goto LA41;
								LOC42 = 0;
								LOC42 = lastson_227267(typ);
								LOC40 = ((*LOC42).Kind == ((NU8) 3));
								LA41: ;
								if (!LOC40) goto LA43;
								LOC45 = 0;
								LOC45 = copyStr(reprEnum((*typ).Kind, (&NTI226258)), 2);
								LOC46 = 0;
								LOC46 = nsuToLowerStr(LOC45);
								localerror_198955((*def).Info, ((NU16) 225), LOC46);
							}
							LA43: ;
						}
						LA27: ;
					}
					goto LA23;
					LA25: ;
					{
						def = emptynode_227738;
						{
							if (!(symkind == ((NU8) 9))) goto LA50;
							localerror_198955((*a).Info, ((NU16) 219), ((NimStringDesc*) &TMP2890));
						}
						LA50: ;
					}
					LA23: ;
					{
						if (!(typ == NIM_NIL)) goto LA54;
						goto LA5;
					}
					LA54: ;
					{
						NIM_BOOL LOC58;
						NimStringDesc* LOC61;
						LOC58 = 0;
						LOC58 = typeallowed_264231(typ, symkind);
						if (!!(LOC58)) goto LA59;
						LOC61 = 0;
						LOC61 = typetostring_264031(typ, ((NU8) 0));
						localerror_198955((*a).Info, ((NU16) 165), LOC61);
					}
					LA59: ;
					tup = skiptypes_231245(typ, 2048);
					{
						if (!((*a).Kind == ((NU8) 36))) goto LA64;
						{
							if (!!(((*tup).Kind == ((NU8) 18)))) goto LA68;
							localerror_198955((*a).Info, ((NU16) 188), ((NimStringDesc*) &TMP3295));
						}
						goto LA66;
						LA68: ;
						{
							NI LOC71;
							LOC71 = 0;
							LOC71 = sonslen_227255(tup);
							if (!!(((NI64)(length - 2) == LOC71))) goto LA72;
							localerror_198955((*a).Info, ((NU16) 111), ((NimStringDesc*) &TMP2890));
						}
						goto LA66;
						LA72: ;
						{
							b = newnodei_227138(((NU8) 36), (*a).Info);
							newsons_227273(b, length);
							asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[(NI64)(length - 2)]), (*a).kindU.S6.Sons->data[(NI64)(length - 2)]);
							asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[(NI64)(length - 1)]), def);
							addson_227287(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_227364(a);
						LOC76 = (3 < LOC82);
						LA81: ;
						if (!LOC76) goto LA83;
						message_198976((*a).Info, ((NU16) 248), ((NimStringDesc*) &TMP2890));
					}
					goto LA62;
					LA83: ;
					LA62: ;
					{
						NI j_521218;
						NI HEX3Atmp_521569;
						NI res_521572;
						j_521218 = 0;
						HEX3Atmp_521569 = 0;
						HEX3Atmp_521569 = (NI64)(length - 3);
						res_521572 = 0;
						{
							while (1) {
								tsym226846* v;
								if (!(res_521572 <= HEX3Atmp_521569)) goto LA87;
								j_521218 = res_521572;
								v = semidentdef_520665(c, (*a).kindU.S6.Sons->data[j_521218], symkind);
								{
									if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA90;
									addinterfacedecl_296845(c, v);
								}
								LA90: ;
								{
									if (!(0 < (*c).Inunrolledcontext)) goto LA94;
									(*v).Flags |= ((NI32)1)<<((((NU8) 21))%(sizeof(NI32)*8));
								}
								goto LA92;
								LA94: ;
								{
									tsym226846* shadowed;
									shadowed = findshadowedvar_520524(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_197302 &(IL64(1)<<(((((NU16) 249)- 230))&IL64(63))))!=0);
											if (!(LOC103)) goto LA104;
											LOC105 = 0;
											LOC105 = identwithin_520594(def, (*v).Name);
											LOC103 = !(LOC105);
											LA104: ;
											if (!LOC103) goto LA106;
											message_198976((*a).Info, ((NU16) 249), (*(*v).Name).S);
										}
										LA106: ;
									}
									LA99: ;
								}
								LA92: ;
								{
									tnode226816* LOC128;
									tnode226816* 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_198955((*def).Info, ((NU16) 220), ((NimStringDesc*) &TMP2890));
										}
										LA120: ;
									}
									LA116: ;
									asgnRefNoCycle((void**) (&(*v).Typ), typ);
									b = newnodei_227138(((NU8) 35), (*a).Info);
									{
										NIM_BOOL LOC124;
										NimStringDesc* LOC127;
										LOC124 = 0;
										LOC124 = importantcomments_170156();
										if (!LOC124) goto LA125;
										LOC127 = 0;
										LOC127 = (*b).Comment; (*b).Comment = copyStringRC1((*a).Comment);
										if (LOC127) nimGCunrefNoCycle(LOC127);
									}
									LA125: ;
									LOC128 = 0;
									LOC128 = newsymnode_227132(v);
									addson_227287(b, LOC128);
									addson_227287(b, (*a).kindU.S6.Sons->data[(NI64)(length - 2)]);
									LOC129 = 0;
									LOC129 = copytree_227329(def);
									addson_227287(b, LOC129);
									addson_227287(result, b);
								}
								goto LA108;
								LA110: ;
								{
									{
										if (!((*def).Kind == ((NU8) 37))) goto LA133;
										asgnRefNoCycle((void**) (&(*v).Ast), HEX5BHEX5D_227698(def, j_521218));
									}
									LA133: ;
									asgnRefNoCycle((void**) (&(*v).Typ), (*tup).Sons->data[j_521218]);
									asgnRefNoCycle((void**) (&(*b).kindU.S6.Sons->data[j_521218]), newsymnode_227132(v));
								}
								LA108: ;
								checknilable_520804(v);
								{
									if (!(((*v).Flags &(1<<((((NU8) 23))&31)))!=0)) goto LA137;
									hascompiletime = NIM_TRUE;
								}
								LA137: ;
								res_521572 += 1;
							} LA87: ;
						}
					}
				} LA5: ;
				res_521577 += 1;
			} LA4: ;
		}
	}
	{
		if (!hascompiletime) goto LA141;
		setupcompiletimevar_478260((*c).Module, result);
	}
	LA141: ;
	return result;
}

N_NIMCALL(tnode226816*, fitremovehiddenconv_520473)(tcontext291021* c, ttype226852* typ, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = fitnode_488245(c, typ, n);
	{
		if (!((*result).Kind == ((NU8) 58) || (*result).Kind == ((NU8) 59))) goto LA3;
		changetype_488253((*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_269351((*result).Typ, typ, 0);
		if (!!(LOC6)) goto LA7;
		changetype_488253(result, typ, NIM_FALSE);
	}
	goto LA1;
	LA7: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semconst_521603)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = copynode_227323(n);
	{
		NI i_521620;
		NI HEX3Atmp_521850;
		NI LOC2;
		NI res_521853;
		i_521620 = 0;
		HEX3Atmp_521850 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_521850 = (NI64)(LOC2 - 1);
		res_521853 = 0;
		{
			while (1) {
				if (!(res_521853 <= HEX3Atmp_521850)) goto LA4;
				i_521620 = res_521853;
				{
					tnode226816* a;
					tsym226846* v;
					ttype226852* typ;
					tnode226816* def;
					tnode226816* b;
					tnode226816* LOC53;
					tnode226816* LOC54;
					a = (*n).kindU.S6.Sons->data[i_521620];
					{
						if (!(gcmd_170120 == ((NU8) 14))) goto LA8;
						suggeststmt_422299(c, a);
					}
					LA8: ;
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA12;
						goto LA5;
					}
					LA12: ;
					{
						if (!!(((*a).Kind == ((NU8) 102)))) goto LA16;
						illformedast_292405(a);
					}
					LA16: ;
					checksonslen_292415(a, 3);
					v = semidentdef_520665(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_488269(c, (*a).kindU.S6.Sons->data[1], NIM_NIL);
					}
					LA20: ;
					def = semconstexpr_489503(c, (*a).kindU.S6.Sons->data[2]);
					{
						if (!(def == NIM_NIL)) goto LA24;
						localerror_198955((*(*a).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
						goto LA5;
					}
					LA24: ;
					{
						if (!!((typ == NIM_NIL))) goto LA28;
						def = fitremovehiddenconv_520473(c, typ, def);
					}
					goto LA26;
					LA28: ;
					{
						typ = (*def).Typ;
					}
					LA26: ;
					{
						if (!(typ == NIM_NIL)) goto LA33;
						localerror_198955((*(*a).kindU.S6.Sons->data[2]).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
						goto LA5;
					}
					LA33: ;
					{
						NIM_BOOL LOC37;
						NIM_BOOL LOC38;
						NimStringDesc* LOC42;
						LOC37 = 0;
						LOC38 = 0;
						LOC38 = typeallowed_264231(typ, ((NU8) 10));
						LOC37 = !(LOC38);
						if (!(LOC37)) goto LA39;
						LOC37 = !(((*def).Kind == ((NU8) 23)));
						LA39: ;
						if (!LOC37) goto LA40;
						LOC42 = 0;
						LOC42 = typetostring_264031(typ, ((NU8) 0));
						localerror_198955((*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_296845(c, v);
					}
					LA45: ;
					b = newnodei_227138(((NU8) 102), (*a).Info);
					{
						NIM_BOOL LOC49;
						NimStringDesc* LOC52;
						LOC49 = 0;
						LOC49 = importantcomments_170156();
						if (!LOC49) goto LA50;
						LOC52 = 0;
						LOC52 = (*b).Comment; (*b).Comment = copyStringRC1((*a).Comment);
						if (LOC52) nimGCunrefNoCycle(LOC52);
					}
					LA50: ;
					LOC53 = 0;
					LOC53 = newsymnode_227132(v);
					addson_227287(b, LOC53);
					addson_227287(b, (*a).kindU.S6.Sons->data[1]);
					LOC54 = 0;
					LOC54 = copytree_227329(def);
					addson_227287(b, LOC54);
					addson_227287(result, b);
				} LA5: ;
				res_521853 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(void, typesectionleftsidepass_523829)(tcontext291021* c, tnode226816* n) {
	{
		NI i_523845;
		NI HEX3Atmp_523983;
		NI LOC2;
		NI res_523986;
		i_523845 = 0;
		HEX3Atmp_523983 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_523983 = (NI64)(LOC2 - 1);
		res_523986 = 0;
		{
			while (1) {
				if (!(res_523986 <= HEX3Atmp_523983)) goto LA4;
				i_523845 = res_523986;
				{
					tnode226816* a;
					tsym226846* s;
					a = (*n).kindU.S6.Sons->data[i_523845];
					{
						if (!(gcmd_170120 == ((NU8) 14))) goto LA8;
						suggeststmt_422299(c, a);
					}
					LA8: ;
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA12;
						goto LA5;
					}
					LA12: ;
					{
						if (!!(((*a).Kind == ((NU8) 103)))) goto LA16;
						illformedast_292405(a);
					}
					LA16: ;
					checksonslen_292415(a, 3);
					s = semidentdef_520665(c, (*a).kindU.S6.Sons->data[0], ((NU8) 7));
					asgnRefNoCycle((void**) (&(*s).Typ), newtypes_291213(((NU8) 30), c));
					asgnRefNoCycle((void**) (&(*(*s).Typ).Sym), s);
					{
						if (!((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 43))) goto LA20;
						pragma_311079(c, s, (*(*a).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[1], TMP3251);
					}
					LA20: ;
					{
						if (!!((((*s).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA24;
						addinterfacedecl_296845(c, s);
					}
					LA24: ;
					asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newsymnode_227132(s));
				} LA5: ;
				res_523986 += 1;
			} LA4: ;
		}
	}
}

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

N_NIMCALL(void, processmagictype_504936)(tcontext291021* c, tsym226846* m) {
	switch ((*m).Magic) {
	case ((NU16) 183):
	{
		setmagictype_504928(m, ((NU8) 31), intsize_175610);
	}
	break;
	case ((NU16) 184):
	{
		setmagictype_504928(m, ((NU8) 32), 1);
	}
	break;
	case ((NU16) 185):
	{
		setmagictype_504928(m, ((NU8) 33), 2);
	}
	break;
	case ((NU16) 186):
	{
		setmagictype_504928(m, ((NU8) 34), 4);
	}
	break;
	case ((NU16) 187):
	{
		setmagictype_504928(m, ((NU8) 35), 8);
	}
	break;
	case ((NU16) 188):
	{
		setmagictype_504928(m, ((NU8) 40), intsize_175610);
	}
	break;
	case ((NU16) 189):
	{
		setmagictype_504928(m, ((NU8) 41), 1);
	}
	break;
	case ((NU16) 190):
	{
		setmagictype_504928(m, ((NU8) 42), 2);
	}
	break;
	case ((NU16) 191):
	{
		setmagictype_504928(m, ((NU8) 43), 4);
	}
	break;
	case ((NU16) 192):
	{
		setmagictype_504928(m, ((NU8) 44), 8);
	}
	break;
	case ((NU16) 193):
	{
		setmagictype_504928(m, ((NU8) 36), floatsize_175611);
	}
	break;
	case ((NU16) 194):
	{
		setmagictype_504928(m, ((NU8) 37), 4);
	}
	break;
	case ((NU16) 195):
	{
		setmagictype_504928(m, ((NU8) 38), 8);
	}
	break;
	case ((NU16) 196):
	{
		setmagictype_504928(m, ((NU8) 39), 16);
	}
	break;
	case ((NU16) 197):
	{
		setmagictype_504928(m, ((NU8) 1), 1);
	}
	break;
	case ((NU16) 198):
	{
		setmagictype_504928(m, ((NU8) 2), 1);
	}
	break;
	case ((NU16) 199):
	{
		ttype226852* LOC18;
		setmagictype_504928(m, ((NU8) 28), ptrsize_175612);
		LOC18 = 0;
		LOC18 = getsystype_283030(((NU8) 2));
		rawaddson_231562((*m).Typ, LOC18);
	}
	break;
	case ((NU16) 200):
	{
		ttype226852* LOC20;
		setmagictype_504928(m, ((NU8) 29), ptrsize_175612);
		LOC20 = 0;
		LOC20 = getsystype_283030(((NU8) 2));
		rawaddson_231562((*m).Typ, LOC20);
	}
	break;
	case ((NU16) 201):
	{
		setmagictype_504928(m, ((NU8) 26), ptrsize_175612);
	}
	break;
	case ((NU16) 202):
	{
		ttype226852* LOC23;
		setmagictype_504928(m, ((NU8) 19), 1);
		LOC23 = 0;
		LOC23 = newtypes_291213(((NU8) 3), c);
		rawaddson_231562((*m).Typ, LOC23);
	}
	break;
	case ((NU16) 203):
	{
		setmagictype_504928(m, ((NU8) 20), intsize_175610);
	}
	break;
	case ((NU16) 204):
	{
		setmagictype_504928(m, ((NU8) 5), ptrsize_175612);
	}
	break;
	case ((NU16) 205):
	{
		setmagictype_504928(m, ((NU8) 6), 0);
	}
	break;
	case ((NU16) 206):
	{
		setmagictype_504928(m, ((NU8) 7), 0);
	}
	break;
	case ((NU16) 207):
	{
		ttype226852* LOC29;
		setmagictype_504928(m, ((NU8) 8), 0);
		LOC29 = 0;
		LOC29 = newtypes_291213(((NU8) 0), c);
		rawaddson_231562((*m).Typ, LOC29);
	}
	break;
	case ((NU16) 208):
	{
		setmagictype_504928(m, ((NU8) 3), 0);
	}
	break;
	case ((NU16) 176):
	{
		setmagictype_504928(m, ((NU8) 16), 0);
	}
	break;
	case ((NU16) 177):
	{
		setmagictype_504928(m, ((NU8) 27), 0);
	}
	break;
	case ((NU16) 181):
	{
		setmagictype_504928(m, ((NU8) 48), 0);
	}
	break;
	case ((NU16) 178):
	{
		ttype226852* LOC35;
		setmagictype_504928(m, ((NU8) 20), 0);
		LOC35 = 0;
		LOC35 = newtypes_291213(((NU8) 0), c);
		rawaddson_231562((*m).Typ, LOC35);
	}
	break;
	case ((NU16) 179):
	{
		setmagictype_504928(m, ((NU8) 19), 0);
	}
	break;
	case ((NU16) 180):
	{
		setmagictype_504928(m, ((NU8) 24), 0);
	}
	break;
	case ((NU16) 182):
	{
		ttype226852* LOC39;
		setmagictype_504928(m, ((NU8) 15), 0);
		LOC39 = 0;
		LOC39 = newtypes_291213(((NU8) 0), c);
		rawaddson_231562((*m).Typ, LOC39);
	}
	break;
	case ((NU16) 209):
	{
	}
	break;
	case ((NU16) 210):
	{
		setmagictype_504928(m, ((NU8) 17), 0);
		asgnRefNoCycle((void**) (&(*(*m).Typ).N), newnodei_227138(((NU8) 137), (*m).Info));
		(*(*m).Typ).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
	}
	break;
	case ((NU16) 211):
	{
		ttype226852* LOC43;
		setmagictype_504928(m, ((NU8) 17), 0);
		asgnRefNoCycle((void**) (&(*(*m).Typ).N), newnodei_227138(((NU8) 137), (*m).Info));
		(*(*m).Typ).Flags |= ((NI32)1)<<((((NU8) 15))%(sizeof(NI32)*8));
		LOC43 = 0;
		LOC43 = systypefromname_283261(((NimStringDesc*) &TMP3296));
		rawaddson_231562((*m).Typ, LOC43);
	}
	break;
	default:
	{
		localerror_198955((*m).Info, ((NU16) 63), ((NimStringDesc*) &TMP2890));
	}
	break;
	}
}

N_NIMCALL(void, typesectionrightsidepass_524003)(tcontext291021* c, tnode226816* n) {
	{
		NI i_524019;
		NI HEX3Atmp_524335;
		NI LOC2;
		NI res_524338;
		i_524019 = 0;
		HEX3Atmp_524335 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_524335 = (NI64)(LOC2 - 1);
		res_524338 = 0;
		{
			while (1) {
				if (!(res_524338 <= HEX3Atmp_524335)) goto LA4;
				i_524019 = res_524338;
				{
					tnode226816* a;
					tsym226846* s;
					a = (*n).kindU.S6.Sons->data[i_524019];
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA8;
						goto LA5;
					}
					LA8: ;
					{
						if (!!(((*a).Kind == ((NU8) 103)))) goto LA12;
						illformedast_292405(a);
					}
					LA12: ;
					checksonslen_292415(a, 3);
					{
						if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA16;
						illformedast_292405(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_198955((*a).Info, ((NU16) 138), (*(*s).Name).S);
					}
					LA22: ;
					{
						if (!!(((*s).Magic == ((NU16) 0)))) goto LA26;
						processmagictype_504936(c, s);
					}
					LA26: ;
					{
						tscope226840* LOC32;
						ttype226852* LOC37;
						ttype226852* body;
						if (!!(((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1)))) goto LA30;
						LOC32 = 0;
						LOC32 = openscope_296191(c);
						pushowner_291260(s);
						{
							if (!((*s).Magic == ((NU16) 0))) goto LA35;
							(*(*s).Typ).Kind = ((NU8) 10);
						}
						LA35: ;
						asgnRefNoCycle((void**) (&(*(*s).Typ).N), semgenericparamlist_505001(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_291213(((NU8) 0), c);
						rawaddson_231562((*s).Typ, LOC37);
						asgnRefNoCycle((void**) (&(*s).Ast), a);
						(*c).Ingenericcontext += 1;
						body = semtypenode_488269(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_227255((*s).Typ);
							asgnRefNoCycle((void**) (&(*(*s).Typ).Sons->data[(NI64)(LOC42 - 1)]), body);
						}
						LA40: ;
						popowner_291266();
						closescope_296211(c);
					}
					goto LA28;
					LA30: ;
					{
						ttype226852* t;
						if (!!(((*(*a).kindU.S6.Sons->data[2]).Kind == ((NU8) 1)))) goto LA44;
						pushowner_291260(s);
						t = semtypenode_488269(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_227210((*s).Typ, t);
						}
						goto LA46;
						LA51: ;
						LA46: ;
						asgnRefNoCycle((void**) (&(*s).Ast), a);
						popowner_291266();
					}
					goto LA28;
					LA44: ;
					LA28: ;
				} LA5: ;
				res_524338 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(void, checkformetafields_524355)(tnode226816* n) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	case ((NU8) 138):
	{
		{
			tnode226816* s_524366;
			s_524366 = 0;
			{
				NI i_524509;
				NI HEX3Atmp_524511;
				NI LOC4;
				NI res_524513;
				i_524509 = 0;
				HEX3Atmp_524511 = 0;
				LOC4 = 0;
				LOC4 = len_227364(n);
				HEX3Atmp_524511 = (LOC4 - 1);
				res_524513 = 0;
				{
					while (1) {
						if (!(res_524513 <= HEX3Atmp_524511)) goto LA6;
						i_524509 = res_524513;
						s_524366 = (*n).kindU.S6.Sons->data[i_524509];
						checkformetafields_524355(s_524366);
						res_524513 += 1;
					} LA6: ;
				}
			}
		}
	}
	break;
	case ((NU8) 85):
	case ((NU8) 88):
	{
		tnode226816* LOC8;
		LOC8 = 0;
		LOC8 = lastson_227261(n);
		checkformetafields_524355(LOC8);
	}
	break;
	case ((NU8) 3):
	{
		ttype226852* 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 = ((2560 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0);
			{
				NI i_524437;
				NI HEX3Atmp_524515;
				NI res_524518;
				i_524437 = 0;
				HEX3Atmp_524515 = 0;
				HEX3Atmp_524515 = ((*t).Sons->Sup.len - 1);
				res_524518 = ((NI) (start));
				{
					while (1) {
						if (!(res_524518 <= HEX3Atmp_524515)) goto LA13;
						i_524437 = res_524518;
						{
							NIM_BOOL LOC16;
							NIM_BOOL LOC17;
							NimStringDesc* LOC22;
							LOC16 = 0;
							LOC17 = 0;
							LOC17 = !(((*t).Sons->data[i_524437] == NIM_NIL));
							if (!(LOC17)) goto LA18;
							LOC17 = ismetatype_227752((*t).Sons->data[i_524437]);
							LA18: ;
							LOC16 = LOC17;
							if (!(LOC16)) goto LA19;
							LOC16 = !((((*(*t).Sons->data[i_524437]).Flags &(1<<((((NU8) 23))&31)))!=0));
							LA19: ;
							if (!LOC16) goto LA20;
							LOC22 = 0;
							LOC22 = typetostring_264031((*t).Sons->data[i_524437], ((NU8) 0));
							localerror_198955((*n).Info, ((NU16) 189), LOC22);
						}
						LA20: ;
						res_524518 += 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_227752(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_264031(t, ((NU8) 0));
				localerror_198955((*n).Info, ((NU16) 189), LOC32);
			}
			LA30: ;
		}
		break;
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC38;
			if (!NIM_TRUE) goto LA36;
			LOC38 = 0;
			LOC38 = HEX24_199126(TMP3297);
			internalerror_199006(LOC38);
		}
		LA36: ;
	}
	break;
	}
}

N_NIMCALL(void, typesectionfinalpass_524544)(tcontext291021* c, tnode226816* n) {
	{
		NI i_524560;
		NI HEX3Atmp_524871;
		NI LOC2;
		NI res_524874;
		i_524560 = 0;
		HEX3Atmp_524871 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_524871 = (NI64)(LOC2 - 1);
		res_524874 = 0;
		{
			while (1) {
				if (!(res_524874 <= HEX3Atmp_524871)) goto LA4;
				i_524560 = res_524874;
				{
					tnode226816* a;
					tsym226846* s;
					tnode226816* aa;
					a = (*n).kindU.S6.Sons->data[i_524560];
					{
						if (!((*a).Kind == ((NU8) 125))) goto LA8;
						goto LA5;
					}
					LA8: ;
					{
						if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 3)))) goto LA12;
						illformedast_292405(a);
					}
					LA12: ;
					s = (*(*a).kindU.S6.Sons->data[0]).kindU.S4.Sym;
					{
						if (!((*(*a).kindU.S6.Sons->data[1]).Kind == ((NU8) 1))) goto LA16;
						{
							ttype226852* 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_488269(c, (*a).kindU.S6.Sons->data[2], NIM_NIL);
							{
								if (!((147456 &(IL64(1)<<(((*t).Kind)&IL64(63))))!=0)) goto LA24;
								assigntype_227210((*s).Typ, t);
								(*(*s).Typ).Sup.Id = (*t).Sup.Id;
							}
							LA24: ;
						}
						LA20: ;
						checkconstructedtype_318152((*s).Info, (*s).Typ);
						{
							if (!((393216 &(IL64(1)<<(((*(*s).Typ).Kind)&IL64(63))))!=0)) goto LA28;
							checkformetafields_524355((*(*s).Typ).N);
						}
						LA28: ;
					}
					LA16: ;
					aa = (*a).kindU.S6.Sons->data[2];
					{
						NIM_BOOL LOC32;
						NIM_BOOL LOC33;
						NI LOC35;
						ttype226852* st;
						ttype226852* LOC54;
						NimStringDesc* LOC55;
						tident201021* LOC56;
						tsym226846* LOC57;
						LOC32 = 0;
						LOC33 = 0;
						LOC33 = ((*aa).Kind == ((NU8) 140) || (*aa).Kind == ((NU8) 141));
						if (!(LOC33)) goto LA34;
						LOC35 = 0;
						LOC35 = len_227364(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_227267(st);
						}
						LA41: ;
						{
							NimStringDesc* LOC47;
							if (!!(((6291456 &(IL64(1)<<(((*st).Kind)&IL64(63))))!=0))) goto LA45;
							LOC47 = 0;
							LOC47 = HEX24_199126(TMP3299);
							internalerror_199006(LOC47);
						}
						LA45: ;
						{
							ttype226852* LOC50;
							NimStringDesc* LOC53;
							LOC50 = 0;
							LOC50 = lastson_227267(st);
							if (!!(((*LOC50).Sym == NIM_NIL))) goto LA51;
							LOC53 = 0;
							LOC53 = HEX24_199126(TMP3300);
							internalerror_199006(LOC53);
						}
						LA51: ;
						LOC54 = 0;
						LOC54 = lastson_227267(st);
						LOC55 = 0;
						LOC55 = rawNewString((*(*s).Name).S->Sup.len + 11);
appendString(LOC55, (*(*s).Name).S);
appendString(LOC55, ((NimStringDesc*) &TMP3301));
						LOC56 = 0;
						LOC56 = getident_201472(LOC55);
						LOC57 = 0;
						LOC57 = getcurrowner_291255();
						asgnRefNoCycle((void**) (&(*LOC54).Sym), newsym_227074(((NU8) 7), LOC56, LOC57, (*s).Info));
					}
					LA37: ;
				} LA5: ;
				res_524874 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(tnode226816*, semtypesection_524891)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	typesectionleftsidepass_523829(c, n);
	typesectionrightsidepass_524003(c, n);
	typesectionfinalpass_524544(c, n);
	result = n;
	return result;
}

N_NIMCALL(tnode226816*, semdiscard_516111)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(n, 1);
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isemptytype_233991((*(*n).kindU.S6.Sons->data[0]).Typ);
			if (!LOC7) goto LA8;
			localerror_198955((*n).Info, ((NU16) 141), ((NimStringDesc*) &TMP2890));
		}
		LA8: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(tnode226816*, semwhile_516429)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	tnode226816* LOC2;
	result = 0;
	result = n;
	checksonslen_292415(n, 2);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	LOC2 = 0;
	LOC2 = semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), forcebool_496036(c, LOC2));
	(*(*c).P).Nestedloopcounter += 1;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), semstmt_488277(c, (*n).kindU.S6.Sons->data[1]));
	(*(*c).P).Nestedloopcounter -= 1;
	closescope_296211(c);
	{
		if (!((*(*n).kindU.S6.Sons->data[1]).Typ == enforcevoidcontext_516110)) goto LA5;
		asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_516110);
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode226816*, sembreakorcontinue_516184)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(n, 1);
	{
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA3;
		{
			tsym226846* s;
			if (!!(((*n).Kind == ((NU8) 111)))) goto LA7;
			s = 0;
			switch ((*(*n).kindU.S6.Sons->data[0]).Kind) {
			case ((NU8) 2):
			{
				s = lookup_297004(c, (*n).kindU.S6.Sons->data[0]);
			}
			break;
			case ((NU8) 3):
			{
				s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
			}
			break;
			default:
			{
				illformedast_292405(n);
			}
			break;
			}
			{
				NIM_BOOL LOC14;
				tnode226816* 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_227132(s);
				(*x).Info = (*n).Info;
				(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), x);
				suggestsym_421882((*x).Info, s);
			}
			goto LA12;
			LA16: ;
			{
				localerror_198955((*n).Info, ((NU16) 164), (*(*s).Name).S);
			}
			LA12: ;
		}
		goto LA5;
		LA7: ;
		{
			localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3302));
		}
		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_251058(n, 4);
		localerror_198955((*n).Info, ((NU16) 164), LOC25);
	}
	goto LA1;
	LA23: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semexprnoderef_488228)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = semexpr_488201(c, n, flags);
	{
		if (!((*result).Kind == ((NU8) 1))) goto LA3;
		result = errornode_292328(c, n);
	}
	LA3: ;
	{
		NimStringDesc* LOC9;
		if (!((*result).Typ == NIM_NIL)) goto LA7;
		LOC9 = 0;
		LOC9 = rendertree_251058(result, 4);
		localerror_198955((*n).Info, ((NU16) 90), LOC9);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_292318(c));
	}
	goto LA5;
	LA7: ;
	{
		semprocvarcheck_516664(c, result);
		semdestructorcheck_518185(c, result, flags);
	}
	LA5: ;
	return result;
}

N_NIMCALL(tsym226846*, symforvar_522803)(tcontext291021* c, tnode226816* n) {
	tsym226846* result;
	tnode226816* 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_488930(((NU8) 21), m, c);
	return result;
}

N_NIMCALL(void, addforvardecl_522765)(tcontext291021* c, tsym226846* v) {
	{
		tsym226846* shadowed;
		if (!((gnotes_197302 &(IL64(1)<<(((((NU16) 249)- 230))&IL64(63))))!=0)) goto LA3;
		shadowed = findshadowedvar_520524(c, v);
		{
			if (!!((shadowed == NIM_NIL))) goto LA7;
			message_198976((*v).Info, ((NU16) 249), (*(*v).Name).S);
		}
		LA7: ;
	}
	LA3: ;
	adddecl_296694(c, v);
}

N_NIMCALL(tnode226816*, semforvars_523004)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI length;
	ttype226852* iterbase;
	ttype226852* iter;
	result = 0;
	result = n;
	length = sonslen_227249(n);
	iterbase = skiptypes_231245((*(*n).kindU.S6.Sons->data[(NI64)(length - 2)]).Typ, IL64(562949953421312));
	iter = skiptypes_231245(iterbase, 2048);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((*iter).Kind == ((NU8) 18)));
		if (LOC3) goto LA4;
		LOC3 = (length == 3);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			tsym226846* v;
			if (!(length == 3)) goto LA9;
			v = symforvar_522803(c, (*n).kindU.S6.Sons->data[0]);
			{
				tsym226846* LOC13;
				LOC13 = 0;
				LOC13 = getcurrowner_291255();
				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_227132(v));
			{
				if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA18;
				addforvardecl_522765(c, v);
			}
			LA18: ;
		}
		goto LA7;
		LA9: ;
		{
			localerror_198955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2890));
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		NI LOC22;
		LOC22 = 0;
		LOC22 = sonslen_227255(iter);
		if (!!(((NI64)(length - 2) == LOC22))) goto LA23;
		localerror_198955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2890));
	}
	goto LA1;
	LA23: ;
	{
		{
			NI i_523116;
			NI HEX3Atmp_523237;
			NI res_523240;
			i_523116 = 0;
			HEX3Atmp_523237 = 0;
			HEX3Atmp_523237 = (NI64)(length - 3);
			res_523240 = 0;
			{
				while (1) {
					tsym226846* v;
					if (!(res_523240 <= HEX3Atmp_523237)) goto LA28;
					i_523116 = res_523240;
					v = symforvar_522803(c, (*n).kindU.S6.Sons->data[i_523116]);
					{
						tsym226846* LOC31;
						LOC31 = 0;
						LOC31 = getcurrowner_291255();
						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_523116]);
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_523116]), newsymnode_227132(v));
					{
						if (!!((((*v).Flags &(1<<((((NU8) 31))&31)))!=0))) goto LA36;
						addforvardecl_522765(c, v);
					}
					LA36: ;
					res_523240 += 1;
				} LA28: ;
			}
		}
	}
	LA1: ;
	(*(*c).P).Nestedloopcounter += 1;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(length - 1)]), semstmt_488277(c, (*n).kindU.S6.Sons->data[(NI64)(length - 1)]));
	(*(*c).P).Nestedloopcounter -= 1;
	return result;
}

N_NIMCALL(tnode226816*, instfieldloopbody_521876)(tfieldinstctx521871* c, tnode226816* n, tnode226816* forloop) {
	tnode226816* 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_227249(forloop);
		{
			if (!(*c).Replacebyfieldname) goto LA5;
			{
				tnode226816* LOC9;
				NimStringDesc* fieldname;
				LOC9 = 0;
				LOC9 = HEX5BHEX5D_227698(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*) &TMP3306));
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_227118(((NU8) 20), fieldname);
				goto BeforeRet;
			}
			LA10: ;
		}
		LA5: ;
		{
			NI i_522006;
			NI HEX3Atmp_522135;
			NI HEX3Atmp_522136;
			NI res_522139;
			i_522006 = 0;
			HEX3Atmp_522135 = 0;
			HEX3Atmp_522136 = 0;
			HEX3Atmp_522135 = (*c).Replacebyfieldname;
			HEX3Atmp_522136 = (NI64)(l - 3);
			res_522139 = ((NI) (HEX3Atmp_522135));
			{
				while (1) {
					if (!(res_522139 <= HEX3Atmp_522136)) goto LA24;
					i_522006 = res_522139;
					{
						tnode226816* LOC27;
						tnode226816* call;
						tnode226816* tupl;
						LOC27 = 0;
						LOC27 = HEX5BHEX5D_227698(forloop, i_522006);
						if (!((*(*n).kindU.S5.Ident).Sup.Id == (*(*LOC27).kindU.S5.Ident).Sup.Id)) goto LA28;
						call = (*forloop).kindU.S6.Sons->data[(NI64)(l - 2)];
						tupl = (*call).kindU.S6.Sons->data[(NI64)((NI64)(i_522006 + 1) - ((NI) ((*c).Replacebyfieldname)))];
						{
							tnode226816* LOC34;
							if (!(*c).Field == 0) goto LA32;
							result = newnodei_227138(((NU8) 42), (*n).Info);
							add_227498(result, tupl);
							LOC34 = 0;
							LOC34 = newintnode_227096(((NU8) 6), ((NI64) ((*c).Tupleindex)));
							add_227498(result, LOC34);
						}
						goto LA30;
						LA32: ;
						{
							tnode226816* LOC36;
							result = newnodei_227138(((NU8) 45), (*n).Info);
							add_227498(result, tupl);
							LOC36 = 0;
							LOC36 = newsymnode_228754((*c).Field, (*n).Info);
							add_227498(result, LOC36);
						}
						LA30: ;
						goto LA22;
					}
					LA28: ;
					res_522139 += 1;
				} LA24: ;
			}
		} LA22: ;
	}
	break;
	default:
	{
		NI LOC42;
		{
			if (!((*n).Kind == ((NU8) 111))) goto LA40;
			localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3307));
		}
		LA40: ;
		result = copynode_227323(n);
		LOC42 = 0;
		LOC42 = sonslen_227249(n);
		newsons_227273(result, LOC42);
		{
			NI i_522105;
			NI HEX3Atmp_522142;
			NI LOC44;
			NI res_522145;
			i_522105 = 0;
			HEX3Atmp_522142 = 0;
			LOC44 = 0;
			LOC44 = sonslen_227249(n);
			HEX3Atmp_522142 = (NI64)(LOC44 - 1);
			res_522145 = 0;
			{
				while (1) {
					if (!(res_522145 <= HEX3Atmp_522142)) goto LA46;
					i_522105 = res_522145;
					asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[i_522105]), instfieldloopbody_521876(c, (*n).kindU.S6.Sons->data[i_522105], forloop));
					res_522145 += 1;
				} LA46: ;
			}
		}
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, semforobjectfields_522172)(tfieldsctx522169 c, tnode226816* typ, tnode226816* forloop, tnode226816* father) {
	switch ((*typ).Kind) {
	case ((NU8) 3):
	{
		tfieldinstctx521871 fc;
		tscope226840* LOC2;
		tnode226816* body;
		tnode226816* LOC3;
		tnode226816* LOC4;
		memset((void*)(&fc), 0, sizeof(fc));
		fc.Field = (*typ).kindU.S4.Sym;
		fc.Replacebyfieldname = (c.M == ((NU16) 153));
		LOC2 = 0;
		LOC2 = openscope_296191(c.C);
		(*c.C).Inunrolledcontext += 1;
		LOC3 = 0;
		LOC3 = lastson_227261(forloop);
		body = instfieldloopbody_521876((&fc), LOC3, forloop);
		LOC4 = 0;
		LOC4 = semstmt_488277(c.C, body);
		add_227498(father, LOC4);
		(*c.C).Inunrolledcontext -= 1;
		closescope_296211(c.C);
	}
	break;
	case ((NU8) 23):
	{
	}
	break;
	case ((NU8) 138):
	{
		NI l_522227;
		tnode226816* call;
		tnode226816* LOC12;
		tnode226816* casestmt;
		tnode226816* access;
		tnode226816* LOC13;
		l_522227 = len_227364(forloop);
		call = (*forloop).kindU.S6.Sons->data[(NI64)(l_522227 - 2)];
		{
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_227364(call);
			if (!(2 < LOC9)) goto LA10;
			localerror_198955((*forloop).Info, ((NU16) 4), ((NimStringDesc*) &TMP3308));
			goto BeforeRet;
		}
		LA10: ;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(typ, 0);
		semforobjectfields_522172(c, LOC12, forloop, father);
		casestmt = newnodei_227138(((NU8) 97), (*forloop).Info);
		access = newnodei_229007(((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_228754((*(*typ).kindU.S6.Sons->data[0]).kindU.S4.Sym, (*forloop).Info));
		LOC13 = 0;
		LOC13 = semexprwithtype_488211(c.C, access, 0);
		add_227498(casestmt, LOC13);
		{
			NI i_522337;
			NI HEX3Atmp_522357;
			NI LOC15;
			NI res_522360;
			i_522337 = 0;
			HEX3Atmp_522357 = 0;
			LOC15 = 0;
			LOC15 = len_227364(typ);
			HEX3Atmp_522357 = (LOC15 - 1);
			res_522360 = 1;
			{
				while (1) {
					tnode226816* branch;
					tnode226816* LOC18;
					NI l;
					tnode226816* LOC19;
					tnode226816* LOC20;
					tnode226816* LOC21;
					if (!(res_522360 <= HEX3Atmp_522357)) goto LA17;
					i_522337 = res_522360;
					LOC18 = 0;
					LOC18 = HEX5BHEX5D_227698(typ, i_522337);
					branch = copytree_227329(LOC18);
					l = len_227364(branch);
					asgnRefNoCycle((void**) (&(*branch).kindU.S6.Sons->data[(NI64)(l - 1)]), newnodei_227138(((NU8) 115), (*forloop).Info));
					LOC19 = 0;
					LOC19 = HEX5BHEX5D_227698(typ, i_522337);
					LOC20 = 0;
					LOC20 = lastson_227261(LOC19);
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_227698(branch, (NI64)(l - 1));
					semforobjectfields_522172(c, LOC20, forloop, LOC21);
					add_227498(casestmt, branch);
					res_522360 += 1;
				} LA17: ;
			}
		}
		add_227498(father, casestmt);
	}
	break;
	case ((NU8) 137):
	{
		{
			tnode226816* t_522354;
			t_522354 = 0;
			{
				NI i_522366;
				NI HEX3Atmp_522368;
				NI LOC25;
				NI res_522370;
				i_522366 = 0;
				HEX3Atmp_522368 = 0;
				LOC25 = 0;
				LOC25 = len_227364(typ);
				HEX3Atmp_522368 = (LOC25 - 1);
				res_522370 = 0;
				{
					while (1) {
						if (!(res_522370 <= HEX3Atmp_522368)) goto LA27;
						i_522366 = res_522370;
						t_522354 = (*typ).kindU.S6.Sons->data[i_522366];
						semforobjectfields_522172(c, t_522354, forloop, father);
						res_522370 += 1;
					} LA27: ;
				}
			}
		}
	}
	break;
	default:
	{
		illformedast_292405(typ);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(tnode226816*, semforfields_522395)(tcontext291021* c, tnode226816* n, NU16 m) {
	tnode226816* result;
	tsym226846* truesymbol;
	tident201021* LOC1;
	tnode226816* stmts;
	NI length;
	tnode226816* call;
	ttype226852* tupletypea;
	result = 0;
	result = newnodei_229007(((NU8) 96), (*n).Info, 2);
	LOC1 = 0;
	LOC1 = getident_201472(((NimStringDesc*) &TMP3303));
	truesymbol = strtableget_236111((*systemmodule_283019).kindU.S3.Tab, LOC1);
	{
		tident201021* LOC6;
		tsym226846* LOC7;
		if (!(truesymbol == NIM_NIL)) goto LA4;
		localerror_198955((*n).Info, ((NU16) 64), ((NimStringDesc*) &TMP3304));
		LOC6 = 0;
		LOC6 = getident_201472(((NimStringDesc*) &TMP3303));
		LOC7 = 0;
		LOC7 = getcurrowner_291255();
		truesymbol = newsym_227074(((NU8) 0), LOC6, LOC7, (*n).Info);
		asgnRefNoCycle((void**) (&(*truesymbol).Typ), getsystype_283030(((NU8) 1)));
	}
	LA4: ;
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), newsymnode_228754(truesymbol, (*n).Info));
	stmts = newnodei_227138(((NU8) 115), (*n).Info);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[1]), stmts);
	length = sonslen_227249(n);
	call = (*n).kindU.S6.Sons->data[(NI64)(length - 2)];
	{
		NI LOC10;
		LOC10 = 0;
		LOC10 = sonslen_227249(call);
		if (!!(((NI64)(length - 2) == (NI64)((NI64)(LOC10 - 1) + ((NI) ((m == ((NU16) 153)))))))) goto LA11;
		localerror_198955((*n).Info, ((NU16) 111), ((NimStringDesc*) &TMP2890));
		goto BeforeRet;
	}
	LA11: ;
	tupletypea = skiptypes_231245((*(*call).kindU.S6.Sons->data[1]).Typ, IL64(211106240964608));
	{
		if (!!(((393216 &(IL64(1)<<(((*tupletypea).Kind)&IL64(63))))!=0))) goto LA15;
		localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3305));
		goto BeforeRet;
	}
	LA15: ;
	{
		NI i_522552;
		NI HEX3Atmp_522724;
		NI LOC18;
		NI res_522727;
		i_522552 = 0;
		HEX3Atmp_522724 = 0;
		LOC18 = 0;
		LOC18 = len_227364(call);
		HEX3Atmp_522724 = (NI64)(LOC18 - 1);
		res_522727 = 1;
		{
			while (1) {
				ttype226852* tupletypeb;
				if (!(res_522727 <= HEX3Atmp_522724)) goto LA20;
				i_522552 = res_522727;
				tupletypeb = skiptypes_231245((*(*call).kindU.S6.Sons->data[i_522552]).Typ, IL64(211106240964608));
				{
					NIM_BOOL LOC23;
					LOC23 = 0;
					LOC23 = sametype_269351(tupletypea, tupletypeb, 0);
					if (!!(LOC23)) goto LA24;
					typemismatch_488357((*call).kindU.S6.Sons->data[i_522552], tupletypea, tupletypeb);
				}
				LA24: ;
				res_522727 += 1;
			} LA20: ;
		}
	}
	(*(*c).P).Nestedloopcounter += 1;
	{
		tnode226816* loopbody;
		if (!((*tupletypea).Kind == ((NU8) 18))) goto LA28;
		loopbody = (*n).kindU.S6.Sons->data[(NI64)(length - 1)];
		{
			NI i_522646;
			NI HEX3Atmp_522731;
			NI LOC31;
			NI res_522734;
			i_522646 = 0;
			HEX3Atmp_522731 = 0;
			LOC31 = 0;
			LOC31 = sonslen_227255(tupletypea);
			HEX3Atmp_522731 = (NI64)(LOC31 - 1);
			res_522734 = 0;
			{
				while (1) {
					tscope226840* LOC34;
					tfieldinstctx521871 fc;
					tnode226816* body;
					tnode226816* LOC35;
					if (!(res_522734 <= HEX3Atmp_522731)) goto LA33;
					i_522646 = res_522734;
					LOC34 = 0;
					LOC34 = openscope_296191(c);
					memset((void*)(&fc), 0, sizeof(fc));
					fc.Tupletype = tupletypea;
					fc.Tupleindex = i_522646;
					fc.Replacebyfieldname = (m == ((NU16) 153));
					body = instfieldloopbody_521876((&fc), loopbody, n);
					(*c).Inunrolledcontext += 1;
					LOC35 = 0;
					LOC35 = semstmt_488277(c, body);
					add_227498(stmts, LOC35);
					(*c).Inunrolledcontext -= 1;
					closescope_296211(c);
					res_522734 += 1;
				} LA33: ;
			}
		}
	}
	goto LA26;
	LA28: ;
	{
		tfieldsctx522169 fc;
		ttype226852* 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_522172(fc, (*t).N, n, stmts);
				{
					if (!((*t).Sons->data[0] == NIM_NIL)) goto LA41;
					goto LA37;
				}
				LA41: ;
				t = skiptypes_231245((*t).Sons->data[0], IL64(211106247256320));
			} LA38: ;
		} LA37: ;
	}
	LA26: ;
	(*(*c).P).Nestedloopcounter -= 1;
	{
		NIM_BOOL LOC45;
		tnode226816* b;
		LOC45 = 0;
		LOC45 = hassonwith_227301(stmts, ((NU8) 110));
		if (!LOC45) goto LA46;
		b = newnodei_227138(((NU8) 110), (*n).Info);
		add_227498(b, emptynode_227738);
		add_227498(stmts, b);
	}
	goto LA43;
	LA46: ;
	{
		result = stmts;
	}
	LA43: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, implicititerator_523254)(tcontext291021* c, NimStringDesc* it, tnode226816* arg) {
	tnode226816* result;
	tident201021* LOC1;
	tnode226816* LOC2;
	result = 0;
	result = newnodei_227138(((NU8) 27), (*arg).Info);
	LOC1 = 0;
	LOC1 = getident_201472(it);
	LOC2 = 0;
	LOC2 = newidentnode_227125(LOC1, (*arg).Info);
	add_227498(result, LOC2);
	{
		NIM_BOOL LOC5;
		tnode226816* 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_518404(arg);
		add_227498(result, LOC9);
	}
	goto LA3;
	LA7: ;
	{
		add_227498(result, arg);
	}
	LA3: ;
	result = semexprnoderef_488228(c, result, 2);
	return result;
}

N_NIMCALL(tnode226816*, semfor_523290)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NI length;
	tscope226840* LOC1;
	tnode226816* call;
	NIM_BOOL iscallexpr;
	result = 0;
	result = n;
	checkminsonslen_292425(n, 3);
	length = sonslen_227249(n);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(length - 2)]), semexprnoderef_488228(c, (*n).kindU.S6.Sons->data[(NI64)(length - 2)], 2));
	call = (*n).kindU.S6.Sons->data[(NI64)(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;
		tnode226816* LOC7;
		tnode226816* LOC9;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = iscallexpr;
		if (!(LOC5)) goto LA6;
		LOC7 = 0;
		LOC7 = HEX5BHEX5D_227698(call, 0);
		LOC5 = ((*LOC7).Kind == ((NU8) 3));
		LA6: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA8;
		LOC9 = 0;
		LOC9 = HEX5BHEX5D_227698(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_523004(c, n);
			(*result).Kind = ((NU8) 95);
		}
		goto LA12;
		LA14: ;
		{
			result = semforfields_522395(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_523004(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[(NI64)(length - 2)]), implicititerator_523254(c, ((NimStringDesc*) &TMP3309), (*n).kindU.S6.Sons->data[(NI64)(length - 2)]));
		}
		goto LA31;
		LA33: ;
		{
			if (!(length == 4)) goto LA36;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[(NI64)(length - 2)]), implicititerator_523254(c, ((NimStringDesc*) &TMP3310), (*n).kindU.S6.Sons->data[(NI64)(length - 2)]));
		}
		goto LA31;
		LA36: ;
		{
			localerror_198955((*(*n).kindU.S6.Sons->data[(NI64)(length - 2)]).Info, ((NU16) 218), ((NimStringDesc*) &TMP2890));
		}
		LA31: ;
		result = semforvars_523004(c, n);
	}
	goto LA2;
	LA29: ;
	{
		result = semforvars_523004(c, n);
	}
	LA2: ;
	{
		if (!((*(*n).kindU.S6.Sons->data[(NI64)(length - 1)]).Typ == enforcevoidcontext_516110)) goto LA42;
		asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_516110);
	}
	LA42: ;
	closescope_296211(c);
	return result;
}

N_NIMCALL(NI64, tocover_516547)(ttype226852* t) {
	NI64 result;
	ttype226852* t2;
	result = 0;
	t2 = skiptypes_231245(t, IL64(211106242013184));
	{
		NIM_BOOL LOC3;
		NI LOC7;
		LOC3 = 0;
		LOC3 = ((*t2).Kind == ((NU8) 14));
		if (!(LOC3)) goto LA4;
		LOC3 = enumhasholes_264098(t2);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = sonslen_227249((*t2).N);
		result = ((NI64) (LOC7));
	}
	goto LA1;
	LA5: ;
	{
		ttype226852* LOC9;
		LOC9 = 0;
		LOC9 = skiptypes_231245(t, IL64(211106240964608));
		result = lengthord_264016(LOC9);
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semcase_519201)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tscope226840* LOC1;
	NIM_BOOL chckcovered;
	NI64 covered;
	ttype226852* typ;
	NIM_BOOL haselse;
	NIM_BOOL notordinal;
	ttype226852* LOC2;
	result = 0;
	result = n;
	checkminsonslen_292425(n, 2);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
	chckcovered = NIM_FALSE;
	covered = IL64(0);
	typ = commontypebegin_488459;
	haselse = NIM_FALSE;
	notordinal = NIM_FALSE;
	LOC2 = 0;
	LOC2 = skiptypes_231245((*(*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_198955((*n).Info, ((NU16) 107), ((NimStringDesc*) &TMP2890));
		goto BeforeRet;
	}
	break;
	}
	{
		NI i_519283;
		NI HEX3Atmp_519806;
		NI LOC7;
		NI res_519809;
		i_519283 = 0;
		HEX3Atmp_519806 = 0;
		LOC7 = 0;
		LOC7 = sonslen_227249(n);
		HEX3Atmp_519806 = (NI64)(LOC7 - 1);
		res_519809 = 1;
		{
			while (1) {
				tnode226816* x;
				if (!(res_519809 <= HEX3Atmp_519806)) goto LA9;
				i_519283 = res_519809;
				x = (*n).kindU.S6.Sons->data[i_519283];
				switch ((*x).Kind) {
				case ((NU8) 85):
				{
					NI last;
					NI LOC11;
					checkminsonslen_292425(x, 2);
					semcasebranch_499296(c, n, x, i_519283, (&covered));
					LOC11 = 0;
					LOC11 = sonslen_227249(x);
					last = (NI64)(LOC11 - 1);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[last]), semexprbranchscope_518447(c, (*x).kindU.S6.Sons->data[last]));
					typ = commontype_488492(typ, (*(*x).kindU.S6.Sons->data[last]).Typ);
				}
				break;
				case ((NU8) 86):
				{
					tscope226840* LOC13;
					tnode226816* LOC14;
					chckcovered = NIM_FALSE;
					checksonslen_292415(x, 2);
					LOC13 = 0;
					LOC13 = openscope_296191(c);
					LOC14 = 0;
					LOC14 = semexprwithtype_488211(c, (*x).kindU.S6.Sons->data[0], 0);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[0]), forcebool_496036(c, LOC14));
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[1]), semexprbranch_518411(c, (*x).kindU.S6.Sons->data[1]));
					typ = commontype_488492(typ, (*(*x).kindU.S6.Sons->data[1]).Typ);
					closescope_296211(c);
				}
				break;
				case ((NU8) 88):
				{
					chckcovered = NIM_FALSE;
					checksonslen_292415(x, 1);
					asgnRefNoCycle((void**) (&(*x).kindU.S6.Sons->data[0]), semexprbranchscope_518447(c, (*x).kindU.S6.Sons->data[0]));
					typ = commontype_488492(typ, (*(*x).kindU.S6.Sons->data[0]).Typ);
					haselse = NIM_TRUE;
				}
				break;
				default:
				{
					illformedast_292405(x);
				}
				break;
				}
				res_519809 += 1;
			} LA9: ;
		}
	}
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = notordinal;
		if (!(LOC19)) goto LA20;
		LOC19 = !(haselse);
		LA20: ;
		if (!LOC19) goto LA21;
		message_198976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3311));
	}
	LA21: ;
	{
		if (!chckcovered) goto LA25;
		{
			NI64 LOC29;
			LOC29 = 0;
			LOC29 = tocover_516547((*(*n).kindU.S6.Sons->data[0]).Typ);
			if (!(covered == LOC29)) goto LA30;
			haselse = NIM_TRUE;
		}
		goto LA27;
		LA30: ;
		{
			localerror_198955((*n).Info, ((NU16) 151), ((NimStringDesc*) &TMP2890));
		}
		LA27: ;
	}
	LA25: ;
	closescope_296211(c);
	{
		NIM_BOOL LOC35;
		NIM_BOOL LOC36;
		LOC35 = 0;
		LOC36 = 0;
		LOC36 = isemptytype_233991(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_519718;
			NI HEX3Atmp_519812;
			NI LOC42;
			NI res_519815;
			i_519718 = 0;
			HEX3Atmp_519812 = 0;
			LOC42 = 0;
			LOC42 = len_227364(n);
			HEX3Atmp_519812 = (NI64)(LOC42 - 1);
			res_519815 = 1;
			{
				while (1) {
					tnode226816* LOC45;
					if (!(res_519815 <= HEX3Atmp_519812)) goto LA44;
					i_519718 = res_519815;
					LOC45 = 0;
					LOC45 = lastson_227261((*n).kindU.S6.Sons->data[i_519718]);
					discardcheck_518617(c, LOC45);
					res_519815 += 1;
				} LA44: ;
			}
		}
		{
			if (!(typ == enforcevoidcontext_516110)) goto LA48;
			asgnRefNoCycle((void**) (&(*result).Typ), enforcevoidcontext_516110);
		}
		LA48: ;
	}
	goto LA33;
	LA39: ;
	{
		{
			NI i_519759;
			NI HEX3Atmp_519818;
			NI LOC52;
			NI res_519821;
			i_519759 = 0;
			HEX3Atmp_519818 = 0;
			LOC52 = 0;
			LOC52 = len_227364(n);
			HEX3Atmp_519818 = (NI64)(LOC52 - 1);
			res_519821 = 1;
			{
				while (1) {
					tnode226816* it;
					NI j;
					NI LOC55;
					if (!(res_519821 <= HEX3Atmp_519818)) goto LA54;
					i_519759 = res_519821;
					it = (*n).kindU.S6.Sons->data[i_519759];
					LOC55 = 0;
					LOC55 = len_227364(it);
					j = (NI64)(LOC55 - 1);
					asgnRefNoCycle((void**) (&(*it).kindU.S6.Sons->data[j]), fitnode_488245(c, typ, (*it).kindU.S6.Sons->data[j]));
					res_519821 += 1;
				} LA54: ;
			}
		}
		asgnRefNoCycle((void**) (&(*result).Typ), typ);
	}
	LA33: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semreturn_538903)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(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;
			{
				tnode226816* a;
				tnode226816* LOC13;
				if (!!(((*(*c).P).Resultsym == NIM_NIL))) goto LA11;
				a = newnodei_227138(((NU8) 73), (*(*n).kindU.S6.Sons->data[0]).Info);
				LOC13 = 0;
				LOC13 = newsymnode_227132((*(*c).P).Resultsym);
				addson_227287(a, LOC13);
				addson_227287(a, (*n).kindU.S6.Sons->data[0]);
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semasgn_538534(c, a));
				{
					NIM_BOOL LOC16;
					tnode226816* LOC17;
					tnode226816* LOC18;
					tnode226816* LOC20;
					tnode226816* LOC21;
					LOC16 = 0;
					LOC17 = 0;
					LOC17 = HEX5BHEX5D_227698(n, 0);
					LOC18 = 0;
					LOC18 = HEX5BHEX5D_227698(LOC17, 1);
					LOC16 = ((*LOC18).Kind == ((NU8) 3));
					if (!(LOC16)) goto LA19;
					LOC20 = 0;
					LOC20 = HEX5BHEX5D_227698(n, 0);
					LOC21 = 0;
					LOC21 = HEX5BHEX5D_227698(LOC20, 1);
					LOC16 = ((*LOC21).kindU.S4.Sym == (*(*c).P).Resultsym);
					LA19: ;
					if (!LOC16) goto LA22;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), emptynode_227738);
				}
				LA22: ;
			}
			goto LA9;
			LA11: ;
			{
				localerror_198955((*n).Info, ((NU16) 179), ((NimStringDesc*) &TMP2890));
			}
			LA9: ;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		localerror_198955((*n).Info, ((NU16) 163), ((NimStringDesc*) &TMP3312));
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semusing_540158)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(((NU8) 1), (*n).Info);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = experimentalmode_292446(c);
		if (!!(LOC3)) goto LA4;
		localerror_198966((*n).Info, ((NimStringDesc*) &TMP3313));
	}
	LA4: ;
	{
		tnode226816* e_540189;
		tnodeseq226810* HEX3Atmp_540265;
		NI i_540268;
		NI l_540270;
		e_540189 = 0;
		HEX3Atmp_540265 = 0;
		HEX3Atmp_540265 = (*n).kindU.S6.Sons;
		i_540268 = 0;
		l_540270 = HEX3Atmp_540265->Sup.len;
		{
			while (1) {
				if (!(i_540268 < l_540270)) goto LA8;
				e_540189 = HEX3Atmp_540265->data[i_540268];
				{
					tnode226816* usedsym;
					NimStringDesc* LOC17;
					usedsym = semexpr_488201(c, e_540189, 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_492915((&(*(*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_296714((*c).Currentscope, (*usedsym).kindU.S4.Sym);
							goto LA9;
						}
						break;
						default:
						{
						}
						break;
						}
					}
					LA12: ;
					LOC17 = 0;
					LOC17 = rendertree_251058(e_540189, 0);
					localerror_198955((*e_540189).Info, ((NU16) 200), LOC17);
				} LA9: ;
				i_540268 += 1;
			} LA8: ;
		}
	}
	return result;
}

N_NIMCALL(tnode226816*, semasm_516406)(tcontext291021* con, tnode226816* n) {
	tnode226816* result;
	NIM_CHAR marker;
	result = 0;
	checksonslen_292415(n, 2);
	marker = pragmaasm_311098(con, (*n).kindU.S6.Sons->data[0]);
	{
		if (!((NU8)(marker) == (NU8)(0))) goto LA3;
		marker = 96;
	}
	LA3: ;
	result = semasmoremit_313634(con, n, marker);
	return result;
}

N_NIMCALL(void, semyieldvarresult_539212)(tcontext291021* c, tnode226816* n, ttype226852* restype) {
	ttype226852* t;
	t = skiptypes_231245(restype, 2048);
	switch ((*t).Kind) {
	case ((NU8) 23):
	{
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), takeimplicitaddr_538372(c, (*n).kindU.S6.Sons->data[0]));
	}
	break;
	case ((NU8) 18):
	{
		{
			NI i_539268;
			NI HEX3Atmp_539496;
			NI LOC4;
			NI res_539499;
			i_539268 = 0;
			HEX3Atmp_539496 = 0;
			LOC4 = 0;
			LOC4 = sonslen_227255(t);
			HEX3Atmp_539496 = (LOC4 - 1);
			res_539499 = 0;
			{
				while (1) {
					ttype226852* e;
					if (!(res_539499 <= HEX3Atmp_539496)) goto LA6;
					i_539268 = res_539499;
					e = skiptypes_231245((*t).Sons->data[i_539268], 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_539268]), takeimplicitaddr_538372(c, (*(*n).kindU.S6.Sons->data[0]).kindU.S6.Sons->data[i_539268]));
						}
						goto LA11;
						LA13: ;
						{
							NIM_BOOL LOC16;
							tnode226816* 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_539268]), takeimplicitaddr_538372(c, (*a).kindU.S6.Sons->data[i_539268]));
						}
						goto LA11;
						LA18: ;
						{
							localerror_198955((*(*n).kindU.S6.Sons->data[0]).Info, ((NU16) 188), ((NimStringDesc*) &TMP3315));
						}
						LA11: ;
					}
					LA9: ;
					res_539499 += 1;
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(tnode226816*, semyield_539513)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = n;
	checksonslen_292415(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_198955((*n).Info, ((NU16) 36), ((NimStringDesc*) &TMP2890));
	}
	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_198955((*n).Info, ((NU16) 37), ((NimStringDesc*) &TMP2890));
	}
	goto LA1;
	LA10: ;
	{
		ttype226852* itertype;
		ttype226852* restype;
		if (!!(((*(*n).kindU.S6.Sons->data[0]).Kind == ((NU8) 1)))) goto LA13;
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
		itertype = (*(*(*c).P).Owner).Typ;
		restype = (*itertype).Sons->data[0];
		{
			ttype226852* adjustedres;
			if (!!((restype == NIM_NIL))) goto LA17;
			{
				if (!((*(*(*c).P).Owner).Kind == ((NU8) 14))) goto LA21;
				adjustedres = base_264038(restype);
			}
			goto LA19;
			LA21: ;
			{
				adjustedres = restype;
			}
			LA19: ;
			asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), fitnode_488245(c, adjustedres, (*n).kindU.S6.Sons->data[0]));
			{
				if (!((*(*n).kindU.S6.Sons->data[0]).Typ == NIM_NIL)) goto LA26;
				internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3314));
			}
			LA26: ;
			{
				NIM_BOOL LOC30;
				ttype226852* inferred;
				LOC30 = 0;
				LOC30 = ismetatype_227752(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_539212(c, n, adjustedres);
		}
		goto LA15;
		LA17: ;
		{
			localerror_198955((*n).Info, ((NU16) 39), ((NimStringDesc*) &TMP2890));
		}
		LA15: ;
	}
	goto LA1;
	LA13: ;
	{
		if (!!(((*(*(*(*c).P).Owner).Typ).Sons->data[0] == NIM_NIL))) goto LA41;
		localerror_198955((*n).Info, ((NU16) 4), ((NimStringDesc*) &TMP3316));
	}
	goto LA1;
	LA41: ;
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, semiterator_527541)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	NU8 kind;
	tsym226846* s;
	ttype226852* t;
	result = 0;
	{
		NIM_BOOL LOC3;
		tnode226816* LOC4;
		tnode226816* LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = HEX5BHEX5D_227698(n, 4);
		LOC3 = haspragma_316628(LOC4, ((NU8) 135));
		if (LOC3) goto LA5;
		LOC6 = 0;
		LOC6 = HEX5BHEX5D_227698(n, 0);
		LOC3 = ((*LOC6).Kind == ((NU8) 1));
		LA5: ;
		if (!LOC3) goto LA7;
		kind = ((NU8) 15);
	}
	goto LA1;
	LA7: ;
	{
		kind = ((NU8) 14);
	}
	LA1: ;
	{
		tnode226816* LOC12;
		tnode226816* LOC15;
		tnode226816* LOC16;
		LOC12 = 0;
		LOC12 = HEX5BHEX5D_227698(n, 0);
		if (!((*LOC12).Kind == ((NU8) 3))) goto LA13;
		LOC15 = 0;
		LOC15 = HEX5BHEX5D_227698(n, 0);
		asgnRefNoCycle((void**) (&(*(*LOC15).kindU.S4.Sym).Owner), getcurrowner_291255());
		LOC16 = 0;
		LOC16 = HEX5BHEX5D_227698(n, 0);
		(*(*LOC16).kindU.S4.Sym).Kind = kind;
	}
	LA13: ;
	result = semprocaux_526170(c, n, kind, TMP3318, ((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_198955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3319));
	}
	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_198955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA32: ;
	return result;
}

N_NIMCALL(tnode226816*, semmethod_527896)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* s;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_292436(c);
		if (!!(LOC3)) goto LA4;
		localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3320));
	}
	LA4: ;
	result = semprocaux_526170(c, n, ((NU8) 13), TMP3059, ((NU8) 0));
	s = (*(*result).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	{
		NIM_BOOL LOC8;
		NIM_BOOL LOC9;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = isgenericroutine_233650(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_527844(s);
			if (!LOC15) goto LA16;
			methoddef_423824(s, NIM_FALSE);
		}
		goto LA13;
		LA16: ;
		{
			localerror_198955((*n).Info, ((NU16) 182), ((NimStringDesc*) &TMP3320));
		}
		LA13: ;
	}
	LA11: ;
	return result;
}

N_NIMCALL(tnode226816*, semconverterdef_527956)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* s;
	ttype226852* t;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = istoplevel_292436(c);
		if (!!(LOC3)) goto LA4;
		localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3321));
	}
	LA4: ;
	checksonslen_292415(n, 7);
	result = semprocaux_526170(c, n, ((NU8) 16), TMP3059, ((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_198955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3321));
	}
	LA8: ;
	{
		NI LOC12;
		LOC12 = 0;
		LOC12 = sonslen_227255(t);
		if (!!((LOC12 == 2))) goto LA13;
		localerror_198955((*n).Info, ((NU16) 213), ((NimStringDesc*) &TMP3321));
	}
	LA13: ;
	addconverter_291634(c, s);
	return result;
}

N_NIMCALL(tnode226816*, semmacrodef_528011)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* s;
	ttype226852* t;
	result = 0;
	checksonslen_292415(n, 7);
	result = semprocaux_526170(c, n, ((NU8) 17), TMP3322, ((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_198955((*n).Info, ((NU16) 178), ((NimStringDesc*) &TMP3323));
	}
	LA3: ;
	{
		if (!((*(*n).kindU.S6.Sons->data[6]).Kind == ((NU8) 1))) goto LA7;
		localerror_198955((*n).Info, ((NU16) 138), (*(*s).Name).S);
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode226816*, evalinclude_528089)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(((NU8) 115), (*n).Info);
	addson_227287(result, n);
	{
		NI i_528106;
		NI HEX3Atmp_528125;
		NI LOC2;
		NI res_528128;
		i_528106 = 0;
		HEX3Atmp_528125 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(n);
		HEX3Atmp_528125 = (NI64)(LOC2 - 1);
		res_528128 = 0;
		{
			while (1) {
				NI32 f;
				if (!(res_528128 <= HEX3Atmp_528125)) goto LA4;
				i_528106 = res_528128;
				f = checkmodulename_299237((*n).kindU.S6.Sons->data[i_528106]);
				{
					if (!!((f == ((NI32) -1)))) goto LA7;
					{
						NIM_BOOL LOC11;
						NimStringDesc* LOC14;
						LOC11 = 0;
						LOC11 = containsorincl_223916((&(*c).Includedfiles), ((NI) (f)));
						if (!LOC11) goto LA12;
						LOC14 = 0;
						LOC14 = tofilename_198025(f);
						localerror_198955((*n).Info, ((NU16) 25), LOC14);
					}
					goto LA9;
					LA12: ;
					{
						tnode226816* LOC16;
						tnode226816* LOC17;
						LOC16 = 0;
						LOC16 = gincludefile_287073((*c).Module, f);
						LOC17 = 0;
						LOC17 = semstmt_488277(c, LOC16);
						addson_227287(result, LOC17);
						excl_223884((&(*c).Includedfiles), ((NI) (f)));
					}
					LA9: ;
				}
				LA7: ;
				res_528128 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode226816*, semexport_544058)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* x;
	result = 0;
	x = newnodei_227138((*n).Kind, (*n).Info);
	{
		NI i_544085;
		NI HEX3Atmp_544406;
		NI LOC2;
		NI res_544409;
		i_544085 = 0;
		HEX3Atmp_544406 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_544406 = (LOC2 - 1);
		res_544409 = 0;
		{
			while (1) {
				tnode226816* a;
				toverloaditer296491 o;
				tsym226846* s;
				if (!(res_544409 <= HEX3Atmp_544406)) goto LA4;
				i_544085 = res_544409;
				a = (*n).kindU.S6.Sons->data[i_544085];
				memset((void*)(&o), 0, sizeof(o));
				s = initoverloaditer_297665((&o), c, a);
				{
					NimStringDesc* LOC9;
					NimStringDesc* LOC10;
					if (!(s == NIM_NIL)) goto LA7;
					LOC9 = 0;
					LOC10 = 0;
					LOC10 = rendertree_251058(a, 0);
					LOC9 = rawNewString(LOC10->Sup.len + 15);
appendString(LOC9, ((NimStringDesc*) &TMP3340));
appendString(LOC9, LOC10);
					localerror_198955((*a).Info, ((NU16) 4), LOC9);
				}
				goto LA5;
				LA7: ;
				{
					tnode226816* LOC14;
					ttabiter236119 ti;
					tsym226846* it;
					if (!((*s).Kind == ((NU8) 6))) goto LA12;
					strtableadd_236103((&(*(*c).Module).kindU.S3.Tab), s);
					LOC14 = 0;
					LOC14 = newsymnode_228754(s, (*a).Info);
					add_227498(x, LOC14);
					memset((void*)(&ti), 0, sizeof(ti));
					it = inittabiter_236124((&ti), (*s).kindU.S3.Tab);
					{
						while (1) {
							if (!!((it == NIM_NIL))) goto LA16;
							{
								if (!((43513792 &(1<<(((*it).Kind)&31)))!=0)) goto LA19;
								strtableadd_236103((&(*(*c).Module).kindU.S3.Tab), it);
							}
							LA19: ;
							it = nextiter_236132((&ti), (*s).kindU.S3.Tab);
						} LA16: ;
					}
				}
				goto LA5;
				LA12: ;
				{
					{
						while (1) {
							if (!!((s == NIM_NIL))) goto LA23;
							{
								tnode226816* LOC28;
								if (!((43513792 &(1<<(((*s).Kind)&31)))!=0)) goto LA26;
								LOC28 = 0;
								LOC28 = newsymnode_228754(s, (*a).Info);
								add_227498(x, LOC28);
								strtableadd_236103((&(*(*c).Module).kindU.S3.Tab), s);
							}
							LA26: ;
							s = nextoverloaditer_298032((&o), c, a);
						} LA23: ;
					}
				}
				LA5: ;
				res_544409 += 1;
			} LA4: ;
		}
	}
	result = n;
	return result;
}

N_NIMCALL(void, setline_528142)(tnode226816* n, tlineinfo196539 info) {
	{
		NI i_528167;
		NI HEX3Atmp_528183;
		NI LOC2;
		NI res_528186;
		i_528167 = 0;
		HEX3Atmp_528183 = 0;
		LOC2 = 0;
		LOC2 = safelen_227424(n);
		HEX3Atmp_528183 = (LOC2 - 1);
		res_528186 = 0;
		{
			while (1) {
				if (!(res_528186 <= HEX3Atmp_528183)) goto LA4;
				i_528167 = res_528186;
				setline_528142((*n).kindU.S6.Sons->data[i_528167], info);
				res_528186 += 1;
			} LA4: ;
		}
	}
	(*n).Info = info;
}

N_NIMCALL(tnode226816*, sempragmablock_528200)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* pragmalist;
	result = 0;
	pragmalist = (*n).kindU.S6.Sons->data[0];
	pragma_311079(c, NIM_NIL, pragmalist, TMP3341);
	result = semexpr_488201(c, (*n).kindU.S6.Sons->data[1], 0);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[1]), result);
	{
		NI i_528269;
		NI HEX3Atmp_528313;
		NI LOC2;
		NI res_528316;
		i_528269 = 0;
		HEX3Atmp_528313 = 0;
		LOC2 = 0;
		LOC2 = len_227364(pragmalist);
		HEX3Atmp_528313 = (LOC2 - 1);
		res_528316 = 0;
		{
			while (1) {
				NU8 LOC5;
				if (!(res_528316 <= HEX3Atmp_528313)) goto LA4;
				i_528269 = res_528316;
				LOC5 = 0;
				LOC5 = whichpragma_263304((*pragmalist).kindU.S6.Sons->data[i_528269]);
				switch (LOC5) {
				case ((NU8) 111):
				{
					setline_528142(result, (*(*pragmalist).kindU.S6.Sons->data[i_528269]).Info);
				}
				break;
				case ((NU8) 191):
				{
					result = n;
					asgnRefNoCycle((void**) (&(*result).Typ), (*(*n).kindU.S6.Sons->data[1]).Typ);
				}
				break;
				default:
				{
				}
				break;
				}
				res_528316 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(tnode226816*, semstaticstmt_528330)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* a;
	result = 0;
	a = semstmt_488277(c, (*n).kindU.S6.Sons->data[0]);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), a);
	evalstaticstmt_478249((*c).Module, a, (*(*c).P).Owner);
	result = newnodei_229007(((NU8) 114), (*n).Info, 1);
	asgnRefNoCycle((void**) (&(*result).kindU.S6.Sons->data[0]), emptynode_227738);
	return result;
}

N_NIMCALL(tnode226816*, semexpr_488201)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = n;
	{
		if (!(gcmd_170120 == ((NU8) 14))) goto LA3;
		suggestexpr_422008(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):
	{
		tsym226846* s;
		s = lookup_297004(c, n);
		semcapturesym_430685(s, (*(*c).P).Owner);
		result = semsym_529849(c, n, s, flags);
		{
			if (!((126976 &(1<<(((*s).Kind)&31)))!=0)) goto LA12;
			result = symchoice_505476(c, n, s, ((NU8) 0));
			{
				if (!((*result).Kind == ((NU8) 3))) goto LA16;
				markindirect_292365(c, (*result).kindU.S4.Sym);
			}
			LA16: ;
		}
		LA12: ;
	}
	break;
	case ((NU8) 3):
	{
		result = semsym_529849(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_283030(((NU8) 5)));
	}
	break;
	case ((NU8) 6):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA24;
			setintlittype_283634(result);
		}
		LA24: ;
	}
	break;
	case ((NU8) 7):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA29;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 32)));
		}
		LA29: ;
	}
	break;
	case ((NU8) 8):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA34;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 33)));
		}
		LA34: ;
	}
	break;
	case ((NU8) 9):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA39;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 34)));
		}
		LA39: ;
	}
	break;
	case ((NU8) 10):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA44;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 35)));
		}
		LA44: ;
	}
	break;
	case ((NU8) 11):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA49;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 40)));
		}
		LA49: ;
	}
	break;
	case ((NU8) 12):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA54;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 41)));
		}
		LA54: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA59;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 42)));
		}
		LA59: ;
	}
	break;
	case ((NU8) 14):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA64;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 43)));
		}
		LA64: ;
	}
	break;
	case ((NU8) 15):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA69;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 44)));
		}
		LA69: ;
	}
	break;
	case ((NU8) 16):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA74;
			asgnRefNoCycle((void**) (&(*result).Typ), getfloatlittype_283523(result));
		}
		LA74: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA79;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 37)));
		}
		LA79: ;
	}
	break;
	case ((NU8) 18):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA84;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 38)));
		}
		LA84: ;
	}
	break;
	case ((NU8) 19):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA89;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 39)));
		}
		LA89: ;
	}
	break;
	case ((NU8) 20) ... ((NU8) 22):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA94;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 28)));
		}
		LA94: ;
	}
	break;
	case ((NU8) 5):
	{
		{
			if (!((*result).Typ == NIM_NIL)) goto LA99;
			asgnRefNoCycle((void**) (&(*result).Typ), getsystype_283030(((NU8) 2)));
		}
		LA99: ;
	}
	break;
	case ((NU8) 45):
	{
		result = semfieldaccess_529617(c, n, flags);
		{
			if (!((*result).Kind == ((NU8) 25))) goto LA104;
			(*result).Kind = ((NU8) 27);
			result = semexpr_488201(c, result, flags);
		}
		LA104: ;
	}
	break;
	case ((NU8) 55):
	{
		message_198976((*n).Info, ((NU16) 234), ((NimStringDesc*) &TMP3256));
		result = semexpr_488201(c, (*n).kindU.S6.Sons->data[0], flags);
	}
	break;
	case ((NU8) 132):
	case ((NU8) 134):
	case ((NU8) 140) ... ((NU8) 149):
	case ((NU8) 136):
	{
		ttype226852* typ;
		ttype226852* LOC108;
		LOC108 = 0;
		LOC108 = semtypenode_488269(c, n, NIM_NIL);
		typ = skiptypes_231245(LOC108, IL64(562949953421568));
		asgnRefNoCycle((void**) (&(*result).Typ), maketypedesc_291762(c, typ));
	}
	break;
	case ((NU8) 27):
	case ((NU8) 29):
	case ((NU8) 30):
	case ((NU8) 31):
	case ((NU8) 26):
	case ((NU8) 28):
	{
		NU8 mode;
		tsym226846* s;
		checkminsonslen_292425(n, 1);
		{
			if (!(((*n).Flags &(1<<((((NU8) 8))&15)))!=0)) goto LA112;
			mode = 0;
		}
		goto LA110;
		LA112: ;
		{
			mode = 2;
		}
		LA110: ;
		s = qualifiedlookup_297122(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_489032(c, n, flags);
				}
				goto LA120;
				LA122: ;
				{
					result = semmacroexpr_489066(c, n, n, s, flags);
				}
				LA120: ;
			}
			break;
			case ((NU8) 18):
			{
				{
					if (!!((((*s).Flags &(1<<((((NU8) 25))&31)))!=0))) goto LA128;
					result = semdirectop_489032(c, n, flags);
				}
				goto LA126;
				LA128: ;
				{
					result = semtemplateexpr_489055(c, n, s, flags);
				}
				LA126: ;
			}
			break;
			case ((NU8) 7):
			{
				{
					NI LOC134;
					LOC134 = 0;
					LOC134 = len_227364(n);
					if (!(LOC134 == 2)) goto LA135;
					result = semconv_531168(c, n);
				}
				goto LA132;
				LA135: ;
				{
					NI LOC138;
					LOC138 = 0;
					LOC138 = len_227364(n);
					if (!(LOC138 == 1)) goto LA139;
					result = semobjconstr_535463(c, n, flags);
				}
				goto LA132;
				LA139: ;
				{
					NIM_BOOL LOC142;
					LOC142 = 0;
					LOC142 = contains_223837((&(*c).Ambiguoussymbols), (*s).Sup.Id);
					if (!LOC142) goto LA143;
					localerror_198955((*n).Info, ((NU16) 62), (*(*s).Name).S);
				}
				goto LA132;
				LA143: ;
				{
					if (!((*s).Magic == ((NU16) 0))) goto LA146;
					result = semdirectop_489032(c, n, flags);
				}
				goto LA132;
				LA146: ;
				{
					result = semmagic_541264(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_489032(c, n, flags);
				}
				goto LA150;
				LA152: ;
				{
					result = semmagic_541264(c, n, s, flags);
				}
				LA150: ;
			}
			break;
			default:
			{
				result = semindirectop_535468(c, n, flags);
			}
			break;
			}
		}
		goto LA115;
		LA117: ;
		{
			NIM_BOOL LOC157;
			tnode226816* LOC158;
			tnode226816* LOC160;
			tnode226816* LOC161;
			LOC157 = 0;
			LOC158 = 0;
			LOC158 = HEX5BHEX5D_227698(n, 0);
			LOC157 = ((*LOC158).Kind == ((NU8) 42));
			if (!(LOC157)) goto LA159;
			LOC160 = 0;
			LOC160 = HEX5BHEX5D_227698(n, 0);
			LOC161 = 0;
			LOC161 = HEX5BHEX5D_227698(LOC160, 0);
			LOC157 = issymchoice_531121(LOC161);
			LA159: ;
			if (!LOC157) goto LA162;
			setgenericparams_544435(c, (*n).kindU.S6.Sons->data[0]);
			result = semdirectop_489032(c, n, flags);
		}
		goto LA115;
		LA162: ;
		{
			NIM_BOOL LOC165;
			LOC165 = 0;
			LOC165 = issymchoice_531121((*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_489032(c, n, flags);
		}
		goto LA115;
		LA167: ;
		{
			result = semindirectop_535468(c, n, flags);
		}
		LA115: ;
	}
	break;
	case ((NU8) 93):
	{
		{
			if (!((flags &(1<<((((NU8) 3))&15)))!=0)) goto LA173;
			result = semwhen_489040(c, n, NIM_TRUE);
		}
		goto LA171;
		LA173: ;
		{
			result = semwhen_489040(c, n, NIM_FALSE);
			result = semexpr_488201(c, result, flags);
		}
		LA171: ;
	}
	break;
	case ((NU8) 42):
	{
		tsym226846* s;
		checkminsonslen_292425(n, 1);
		s = qualifiedlookup_297122(c, (*n).kindU.S6.Sons->data[0], 2);
		{
			NIM_BOOL LOC179;
			NIM_BOOL LOC180;
			tnode226816* 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_227698(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_529832(c, (*n).kindU.S6.Sons->data[0], s));
			result = explicitgenericinstantiation_495205(c, n, s);
		}
		goto LA177;
		LA184: ;
		{
			NIM_BOOL LOC187;
			ttype226852* 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_488269(c, n, NIM_NIL);
			result = symnodefromtype_489122(c, LOC191, (*n).Info);
		}
		goto LA177;
		LA189: ;
		{
			result = semarrayaccess_538259(c, n, flags);
		}
		LA177: ;
	}
	break;
	case ((NU8) 40):
	{
		tident201021* LOC194;
		tnode226816* LOC195;
		LOC194 = 0;
		LOC194 = getident_201472(((NimStringDesc*) &TMP3288));
		LOC195 = 0;
		LOC195 = buildoverloadedsubscripts_537829(n, LOC194);
		result = semexpr_488201(c, LOC195, flags);
	}
	break;
	case ((NU8) 43):
	{
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3289));
	}
	break;
	case ((NU8) 37):
	{
		NU8 LOC198;
		LOC198 = 0;
		LOC198 = checkpar_542305(n);
		switch (LOC198) {
		case ((NU8) 0):
		{
			result = errornode_292328(c, n);
		}
		break;
		case ((NU8) 3):
		{
			result = semtuplepositionsconstr_542899(c, n, flags);
		}
		break;
		case ((NU8) 2):
		{
			result = semtuplefieldsconstr_542512(c, n, flags);
		}
		break;
		case ((NU8) 1):
		{
			result = semexpr_488201(c, (*n).kindU.S6.Sons->data[0], flags);
		}
		break;
		}
	}
	break;
	case ((NU8) 39):
	{
		result = semsetconstr_541633(c, n);
	}
	break;
	case ((NU8) 41):
	{
		result = semarrayconstr_532588(c, n, flags);
	}
	break;
	case ((NU8) 38):
	{
		result = semobjconstr_535463(c, n, flags);
	}
	break;
	case ((NU8) 51):
	case ((NU8) 52):
	{
		result = semlambda_488261(c, n, flags);
	}
	break;
	case ((NU8) 47):
	{
		result = semderef_537863(c, n);
	}
	break;
	case ((NU8) 63):
	{
		result = n;
		checksonslen_292415(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexprwithtype_488211(c, (*n).kindU.S6.Sons->data[0], 0));
		{
			NU8 LOC211;
			LOC211 = 0;
			LOC211 = isassignable_533184(c, (*n).kindU.S6.Sons->data[0]);
			if (!!(((6 &(1<<((LOC211)&7)))!=0))) goto LA212;
			localerror_198955((*n).Info, ((NU16) 125), ((NimStringDesc*) &TMP2890));
		}
		LA212: ;
		asgnRefNoCycle((void**) (&(*n).Typ), makeptrtype_291199(c, (*(*n).kindU.S6.Sons->data[0]).Typ));
	}
	break;
	case ((NU8) 64):
	case ((NU8) 65):
	{
		checksonslen_292415(n, 1);
		asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[0]), semexpr_488201(c, (*n).kindU.S6.Sons->data[0], flags));
	}
	break;
	case ((NU8) 61):
	{
		result = semcast_531461(c, n);
	}
	break;
	case ((NU8) 48):
	case ((NU8) 92):
	{
		result = semif_518734(c, n);
	}
	break;
	case ((NU8) 58):
	case ((NU8) 59):
	case ((NU8) 60):
	case ((NU8) 32):
	{
		checksonslen_292415(n, 2);
	}
	break;
	case ((NU8) 71):
	case ((NU8) 72):
	case ((NU8) 66):
	case ((NU8) 67):
	{
		checksonslen_292415(n, 1);
	}
	break;
	case ((NU8) 68):
	case ((NU8) 69):
	case ((NU8) 70):
	{
		checksonslen_292415(n, 3);
	}
	break;
	case ((NU8) 46):
	{
		checkminsonslen_292425(n, 2);
	}
	break;
	case ((NU8) 54):
	{
		result = semtableconstr_542196(c, n);
	}
	break;
	case ((NU8) 56):
	case ((NU8) 57):
	{
	}
	break;
	case ((NU8) 62):
	{
		result = semstaticexpr_535215(c, n);
	}
	break;
	case ((NU8) 73):
	{
		result = semasgn_538534(c, n);
	}
	break;
	case ((NU8) 112):
	case ((NU8) 127):
	{
		result = semblock_543699(c, n);
	}
	break;
	case ((NU8) 115):
	case ((NU8) 126):
	{
		result = semstmtlist_528505(c, n, flags);
	}
	break;
	case ((NU8) 108):
	{
		result = semraise_523655(c, n);
	}
	break;
	case ((NU8) 99):
	{
		result = semvarorlet_520897(c, n, ((NU8) 8));
	}
	break;
	case ((NU8) 100):
	{
		result = semvarorlet_520897(c, n, ((NU8) 9));
	}
	break;
	case ((NU8) 101):
	{
		result = semconst_521603(c, n);
	}
	break;
	case ((NU8) 98):
	{
		result = semtypesection_524891(c, n);
	}
	break;
	case ((NU8) 114):
	{
		result = semdiscard_516111(c, n);
	}
	break;
	case ((NU8) 96):
	{
		result = semwhile_516429(c, n);
	}
	break;
	case ((NU8) 106):
	{
		result = semtry_519853(c, n);
	}
	break;
	case ((NU8) 110):
	case ((NU8) 111):
	{
		result = sembreakorcontinue_516184(c, n);
	}
	break;
	case ((NU8) 94):
	case ((NU8) 95):
	{
		result = semfor_523290(c, n);
	}
	break;
	case ((NU8) 97):
	{
		result = semcase_519201(c, n);
	}
	break;
	case ((NU8) 109):
	{
		result = semreturn_538903(c, n);
	}
	break;
	case ((NU8) 124):
	{
		result = semusing_540158(c, n);
	}
	break;
	case ((NU8) 89):
	{
		result = semasm_516406(c, n);
	}
	break;
	case ((NU8) 104):
	{
		result = semyield_539513(c, n);
	}
	break;
	case ((NU8) 90):
	{
		pragma_311079(c, (*(*c).P).Owner, n, TMP3317);
	}
	break;
	case ((NU8) 84):
	{
		result = semiterator_527541(c, n);
	}
	break;
	case ((NU8) 79):
	{
		result = semproc_516723(c, n);
	}
	break;
	case ((NU8) 80):
	{
		result = semmethod_527896(c, n);
	}
	break;
	case ((NU8) 81):
	{
		result = semconverterdef_527956(c, n);
	}
	break;
	case ((NU8) 82):
	{
		result = semmacrodef_528011(c, n);
	}
	break;
	case ((NU8) 83):
	{
		result = semtemplatedef_509258(c, n);
	}
	break;
	case ((NU8) 116):
	{
		{
			NIM_BOOL LOC252;
			LOC252 = 0;
			LOC252 = istoplevel_292436(c);
			if (!!(LOC252)) goto LA253;
			localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3324));
		}
		LA253: ;
		result = evalimport_299004(c, n);
	}
	break;
	case ((NU8) 117):
	{
		{
			NIM_BOOL LOC258;
			LOC258 = 0;
			LOC258 = istoplevel_292436(c);
			if (!!(LOC258)) goto LA259;
			localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3324));
		}
		LA259: ;
		result = evalimportexcept_300211(c, n);
	}
	break;
	case ((NU8) 120):
	{
		{
			NIM_BOOL LOC264;
			LOC264 = 0;
			LOC264 = istoplevel_292436(c);
			if (!!(LOC264)) goto LA265;
			localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3335));
		}
		LA265: ;
		result = evalfrom_299011(c, n);
	}
	break;
	case ((NU8) 121):
	{
		{
			NIM_BOOL LOC270;
			LOC270 = 0;
			LOC270 = istoplevel_292436(c);
			if (!!(LOC270)) goto LA271;
			localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3338));
		}
		LA271: ;
		result = evalinclude_528089(c, n);
	}
	break;
	case ((NU8) 118):
	case ((NU8) 119):
	{
		{
			NIM_BOOL LOC276;
			LOC276 = 0;
			LOC276 = istoplevel_292436(c);
			if (!!(LOC276)) goto LA277;
			localerror_198955((*n).Info, ((NU16) 181), ((NimStringDesc*) &TMP3339));
		}
		LA277: ;
		result = semexport_544058(c, n);
	}
	break;
	case ((NU8) 91):
	{
		result = sempragmablock_528200(c, n);
	}
	break;
	case ((NU8) 113):
	{
		result = semstaticstmt_528330(c, n);
	}
	break;
	default:
	{
		NimStringDesc* LOC282;
		LOC282 = 0;
		LOC282 = rendertree_251058(n, 4);
		localerror_198955((*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(tnode226816*, semexprwithtype_488211)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = semexpr_488201(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_292328(c, n);
	}
	LA5: ;
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC13;
		LOC9 = 0;
		LOC9 = ((*result).Typ == NIM_NIL);
		if (LOC9) goto LA10;
		LOC9 = ((*result).Typ == enforcevoidcontext_516110);
		LA10: ;
		if (!LOC9) goto LA11;
		LOC13 = 0;
		LOC13 = rendertree_251058(result, 4);
		localerror_198955((*n).Info, ((NU16) 90), LOC13);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_292318(c));
	}
	goto LA7;
	LA11: ;
	{
		semprocvarcheck_516664(c, result);
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA17;
			result = newderef_518404(result);
		}
		LA17: ;
		semdestructorcheck_518185(c, result, flags);
	}
	LA7: ;
	return result;
}

N_NIMCALL(tnode226816*, semconstexpr_489503)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tnode226816* e;
	result = 0;
	e = semexprwithtype_488211(c, n, 0);
	{
		if (!(e == NIM_NIL)) goto LA3;
		localerror_198955((*n).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
		result = n;
		goto BeforeRet;
	}
	LA3: ;
	result = getconstexpr_305004((*c).Module, e);
	{
		if (!(result == NIM_NIL)) goto LA7;
		result = evalconstexpr_478226((*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_198579((*e).Info, (*n).Info);
				if (!!(LOC17)) goto LA18;
				pushinfocontext_197930((*n).Info);
				localerror_198955((*e).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
				popinfocontext_197957();
			}
			goto LA15;
			LA18: ;
			{
				localerror_198955((*e).Info, ((NU16) 104), ((NimStringDesc*) &TMP2890));
			}
			LA15: ;
			result = e;
		}
		goto LA9;
		LA13: ;
		{
			result = fixuptypeaftereval_489201(c, result, e);
		}
		LA9: ;
	}
	LA7: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, tryconstexpr_489423)(tcontext291021* c, tnode226816* n) {
	tnode226816* volatile result;
	tnode226816* e;
	NI olderrorcount;
	NI olderrormax;
	NU8 olderroroutputs;
	TSafePoint TMP3342;
	result = 0;
	e = semexprwithtype_488211(c, n, 0);
	{
		if (!(e == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = getconstexpr_305004((*c).Module, e);
	{
		if (!!((result == NIM_NIL))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	olderrorcount = gerrorcounter_197303;
	olderrormax = gerrormax_197306;
	olderroroutputs = erroroutputs_197440;
	erroroutputs_197440 = 0;
	gerrormax_197306 = IL64(9223372036854775807);
	pushSafePoint(&TMP3342);
	TMP3342.status = setjmp(TMP3342.context);
	if (TMP3342.status == 0) {
		result = evalconstexpr_478226((*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_489201(c, result, e);
		}
		LA10: ;
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI196545))) {
			TMP3342.status = 0;
			result = NIM_NIL;
			popCurrentException();
		}
	}
	if (TMP3342.status != 0) reraiseException();
	gerrorcounter_197303 = olderrorcount;
	gerrormax_197306 = olderrormax;
	erroroutputs_197440 = olderroroutputs;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, semoperand_529624)(tcontext291021* c, tnode226816* n, NU16 flags) {
	tnode226816* result;
	result = 0;
	result = semexpr_488201(c, n, (flags | 128));
	{
		if (!((*result).Kind == ((NU8) 1))) goto LA3;
		result = errornode_292328(c, n);
	}
	LA3: ;
	{
		if (!!(((*result).Typ == NIM_NIL))) goto LA7;
		{
			if (!((*(*result).Typ).Kind == ((NU8) 23))) goto LA11;
			result = newderef_518404(result);
		}
		LA11: ;
	}
	goto LA5;
	LA7: ;
	{
		if (!((flags &(1<<((((NU8) 3))&15)))!=0)) goto LA14;
		asgnRefNoCycle((void**) (&(*result).Typ), newtypes_291213(((NU8) 3), c));
	}
	goto LA5;
	LA14: ;
	{
		NimStringDesc* LOC17;
		LOC17 = 0;
		LOC17 = rendertree_251058(result, 4);
		localerror_198955((*n).Info, ((NU16) 90), LOC17);
		asgnRefNoCycle((void**) (&(*result).Typ), errortype_292318(c));
	}
	LA5: ;
	return result;
}

N_NIMCALL(tnode226816*, seminferredlambda_525857)(tcontext291021* c, tidtable226864 pt, tnode226816* n_525861) {
	tnode226816* result;
	tnode226816* n;
	tscope226840* LOC1;
	tsym226846* s;
	tnode226816* sembody;
	tnode226816* LOC2;
	result = 0;
	n = n_525861;
	n = replacetypesinbody_321489(c, pt, n);
	result = n;
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[2]), emptynode_227738);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[3]), (*(*n).Typ).N);
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	s = (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym;
	addparams_488293(c, (*(*n).Typ).N, ((NU8) 12));
	pushproccon_291380(c, s);
	addresult_525075(c, (*(*n).Typ).Sons->data[0], (*n).Info, ((NU8) 12));
	LOC2 = 0;
	LOC2 = semprocbody_488238(c, (*n).kindU.S6.Sons->data[6]);
	sembody = hlobody_490479(c, LOC2);
	asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[6]), transformbody_442373((*c).Module, sembody, (*(*n).kindU.S6.Sons->data[0]).kindU.S4.Sym));
	addresultnode_525118(c, n);
	popproccon_291425(c);
	closescope_296211(c);
	asgnRefNoCycle((void**) (&(*s).Ast), result);
	return result;
}

N_NIMCALL(tpasscontext287005*, myopen_545456)(tsym226846* module) {
	tpasscontext287005* result;
	tcontext291021* c;
	TY291116 LOC5;
	TY291122 LOC6;
	result = 0;
	c = newcontext_291169(module);
	{
		if (!!(((*c).P == NIM_NIL))) goto LA3;
		internalerror_198987((*module).Info, ((NimStringDesc*) &TMP1980));
	}
	LA3: ;
	(*c).Semconstexpr = semconstexpr_489503;
	(*c).Semexpr = semexpr_488201;
	(*c).Semtryexpr = tryexpr_488317;
	(*c).Semtryconstexpr = tryconstexpr_489423;
	(*c).Semoperand = semoperand_529624;
	(*c).Semconstboolexpr = semconstboolexpr_496064;
	(*c).Semoverloadedcall = semoverloadedcall_495100;
	memset((void*)(&LOC5), 0, sizeof(LOC5));
	LOC5.ClPrc = ((TMP3343) (seminferredlambda_525857)); LOC5.ClEnv = NIM_NIL;
	asgnRef((void**) (&(*c).Seminferredlambda.ClEnv), LOC5.ClEnv);
	(*c).Seminferredlambda.ClPrc = LOC5.ClPrc;
	memset((void*)(&LOC6), 0, sizeof(LOC6));
	LOC6.ClPrc = ((TMP3344) (generateinstance_491802)); LOC6.ClEnv = NIM_NIL;
	asgnRef((void**) (&(*c).Semgenerateinstance.ClEnv), LOC6.ClEnv);
	(*c).Semgenerateinstance.ClPrc = LOC6.ClPrc;
	(*c).Semtypenode = semtypenode_488269;
	(*c).Instdeepcopy = instdeepcopy_415518;
	pushproccon_291380(c, module);
	pushowner_291260((*c).Module);
	asgnRef((void**) (&(*c).Importtable), openscope_296191(c));
	strtableadd_236103((&(*(*c).Importtable).Symbols), module);
	{
		if (!(((*module).Flags &(1<<((((NU8) 13))&31)))!=0)) goto LA9;
		asgnRefNoCycle((void**) (&systemmodule_283019), module);
	}
	goto LA7;
	LA9: ;
	{
		strtableadd_236103((&(*(*c).Importtable).Symbols), systemmodule_283019);
		importallsymbols_299679(c, systemmodule_283019);
	}
	LA7: ;
	asgnRef((void**) (&(*c).Toplevelscope), openscope_296191(c));
	result = &c->Sup;
	return result;
}

N_NIMCALL(tpasscontext287005*, myopencached_545499)(tsym226846* module, trodreader277030* rd) {
	tpasscontext287005* result;
	result = 0;
	result = myopen_545456(module);
	{
		tsym226846* m_545516;
		tsymseq226818* HEX3Atmp_545518;
		NI i_545521;
		NI l_545523;
		m_545516 = 0;
		HEX3Atmp_545518 = 0;
		HEX3Atmp_545518 = (*rd).Methods;
		i_545521 = 0;
		l_545523 = HEX3Atmp_545518->Sup.len;
		{
			while (1) {
				if (!(i_545521 < l_545523)) goto LA3;
				m_545516 = HEX3Atmp_545518->data[i_545521];
				methoddef_423824(m_545516, NIM_TRUE);
				i_545521 += 1;
			} LA3: ;
		}
	}
	return result;
}

N_NIMCALL(void, addcodeforgenerics_545323)(tcontext291021* c, tnode226816* n) {
	{
		NI i_545350;
		NI HEX3Atmp_545435;
		NI HEX3Atmp_545436;
		NI res_545439;
		i_545350 = 0;
		HEX3Atmp_545435 = 0;
		HEX3Atmp_545436 = 0;
		HEX3Atmp_545435 = (*c).Lastgenericidx;
		HEX3Atmp_545436 = (NI64)((*c).Generics->Sup.len - 1);
		res_545439 = HEX3Atmp_545435;
		{
			while (1) {
				tsym226846* prc;
				if (!(res_545439 <= HEX3Atmp_545436)) goto LA3;
				i_545350 = res_545439;
				prc = (*(*c).Generics->data[i_545350].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*) &TMP3347));
appendString(LOC16, (*(*prc).Name).S);
						internalerror_198987((*prc).Info, LOC16);
					}
					goto LA10;
					LA14: ;
					{
						addson_227287(n, (*prc).Ast);
					}
					LA10: ;
				}
				LA8: ;
				res_545439 += 1;
			} LA3: ;
		}
	}
	(*c).Lastgenericidx = (*c).Generics->Sup.len;
}

N_NIMCALL(tnode226816*, hlostmt_490511)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*c).Patterns->Sup.len == 0);
		if (LOC3) goto LA4;
		LOC3 = !(((goptions_170116 &(1<<((((NU8) 21))&31)))!=0));
		LA4: ;
		if (!LOC3) goto LA5;
		result = n;
		goto BeforeRet;
	}
	LA5: ;
	(*c).Hloloopdetector = 0;
	result = hlo_489575(c, n);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, buildechostmt_536138)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	tsym226846* e;
	tident201021* LOC1;
	result = 0;
	result = newnodei_227138(((NU8) 27), (*n).Info);
	LOC1 = 0;
	LOC1 = getident_201472(((NimStringDesc*) &TMP3348));
	e = strtableget_236111((*systemmodule_283019).kindU.S3.Tab, LOC1);
	{
		tnode226816* LOC6;
		if (!!((e == NIM_NIL))) goto LA4;
		LOC6 = 0;
		LOC6 = newsymnode_227132(e);
		add_227498(result, LOC6);
	}
	goto LA2;
	LA4: ;
	{
		tnode226816* LOC8;
		localerror_198955((*n).Info, ((NU16) 64), ((NimStringDesc*) &TMP3349));
		LOC8 = 0;
		LOC8 = errornode_292328(c, n);
		add_227498(result, LOC8);
	}
	LA2: ;
	add_227498(result, n);
	result = semexpr_488201(c, result, 0);
	return result;
}

N_NIMCALL(tnode226816*, semstmtandgenerategenerics_545539)(tcontext291021* c, tnode226816* n) {
	tnode226816* result;
	result = 0;
	result = semstmt_488277(c, n);
	{
		tnode226816* a;
		if (!((*c).Lastgenericidx < (*c).Generics->Sup.len)) goto LA3;
		a = newnodei_227138(((NU8) 115), (*n).Info);
		addcodeforgenerics_545323(c, a);
		{
			NI LOC7;
			LOC7 = 0;
			LOC7 = sonslen_227249(a);
			if (!(0 < LOC7)) goto LA8;
			{
				if (!!(((*result).Kind == ((NU8) 1)))) goto LA12;
				addson_227287(a, result);
			}
			LA12: ;
			result = a;
		}
		LA8: ;
	}
	LA3: ;
	result = hlostmt_490511(c, result);
	{
		NIM_BOOL LOC16;
		NIM_BOOL LOC18;
		LOC16 = 0;
		LOC16 = (gcmd_170120 == ((NU8) 18));
		if (!(LOC16)) goto LA17;
		LOC18 = 0;
		LOC18 = isemptytype_233991((*result).Typ);
		LOC16 = !(LOC18);
		LA17: ;
		if (!LOC16) goto LA19;
		result = buildechostmt_536138(c, result);
	}
	LA19: ;
	result = transformstmt_442607((*c).Module, result);
	return result;
}

N_NIMCALL(void, recovercontext_545582)(tcontext291021* c) {
	asgnRef((void**) (&(*c).Currentscope), (*c).Toplevelscope);
	{
		while (1) {
			tsym226846* LOC3;
			LOC3 = 0;
			LOC3 = getcurrowner_291255();
			if (!!(((*LOC3).Kind == ((NU8) 6)))) goto LA2;
			popowner_291266();
		} 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(tnode226816*, myprocess_545640)(tpasscontext287005* context, tnode226816* n) {
	tnode226816* volatile result;
	tcontext291021* c;
	result = 0;
	c = ((tcontext291021*) (context));
	{
		if (!(gerrormax_197306 <= 1)) goto LA3;
		result = semstmtandgenerategenerics_545539(c, n);
	}
	goto LA1;
	LA3: ;
	{
		NI oldcontextlen;
		NI oldingenericinst;
		TSafePoint TMP3350;
		oldcontextlen = getinfocontextlen_197885();
		oldingenericinst = (*c).Ingenericinst;
		pushSafePoint(&TMP3350);
		TMP3350.status = setjmp(TMP3350.context);
		if (TMP3350.status == 0) {
			result = semstmtandgenerategenerics_545539(c, n);
			popSafePoint();
		}
		else {
			popSafePoint();
			if (isObj(getCurrentException()->Sup.m_type, (&NTI196545))||isObj(getCurrentException()->Sup.m_type, (&NTI196547))) {
				TMP3350.status = 0;
				recovercontext_545582(c);
				(*c).Ingenericinst = oldingenericinst;
				setinfocontextlen_197905(oldcontextlen);
				{
					Exception* LOC11;
					LOC11 = 0;
					LOC11 = getCurrentException();
					if (!((LOC11) && (isObjWithCache((*LOC11).Sup.m_type, (&NTI196547), Nim_OfCheck_CACHE1)))) goto LA12;
					result = NIM_NIL;
				}
				goto LA9;
				LA12: ;
				{
					result = emptynode_227738;
				}
				LA9: ;
				popCurrentException();
			}
		}
		if (TMP3350.status != 0) reraiseException();
	}
	LA1: ;
	return result;
}

N_NIMCALL(tnode226816*, myclose_545656)(tpasscontext287005* context, tnode226816* n) {
	tnode226816* result;
	tcontext291021* c;
	result = 0;
	c = ((tcontext291021*) (context));
	closescope_296211(c);
	rawclosescope_296202(c);
	result = newnode_227090(((NU8) 115));
	{
		if (!!((n == NIM_NIL))) goto LA3;
		internalerror_198987((*n).Info, ((NimStringDesc*) &TMP3351));
	}
	LA3: ;
	addcodeforgenerics_545323(c, result);
	{
		if (!!(((*(*c).Module).Ast == NIM_NIL))) goto LA7;
		add_227498(result, (*(*c).Module).Ast);
	}
	LA7: ;
	popowner_291266();
	popproccon_291425(c);
	return result;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_semInit)(void) {
	ttype226852* LOC1;
	ttype226852* LOC2;
	tident201021* LOC3;
	tlineinfo196539 LOC4;
	LOC1 = 0;
	LOC1 = (ttype226852*) newObj((&NTI226812), sizeof(ttype226852));
	(*LOC1).Sup.Sup.m_type = (&NTI226852);
	(*LOC1).Kind = ((NU8) 6);
	asgnRefNoCycle((void**) (&commontypebegin_488459), LOC1);
	asgnRefNoCycle((void**) (&typedescid_501285), getident_201472(((NimStringDesc*) &TMP955)));
	LOC2 = 0;
	LOC2 = (ttype226852*) newObj((&NTI226812), sizeof(ttype226852));
	(*LOC2).Sup.Sup.m_type = (&NTI226852);
	(*LOC2).Kind = ((NU8) 7);
	asgnRefNoCycle((void**) (&enforcevoidcontext_516110), LOC2);
	if (analyzingdestructor_516727) nimGCunrefNoCycle(analyzingdestructor_516727);
	analyzingdestructor_516727 = (tsym226846*) newObjRC1((&NTI226814), sizeof(tsym226846));
	(*analyzingdestructor_516727).Sup.Sup.m_type = (&NTI226846);
	if (destructoristrivial_516728) nimGCunrefNoCycle(destructoristrivial_516728);
	destructoristrivial_516728 = (tsym226846*) newObjRC1((&NTI226814), sizeof(tsym226846));
	(*destructoristrivial_516728).Sup.Sup.m_type = (&NTI226846);
	asgnRefNoCycle((void**) (&destructorname_516761), getident_201472(((NimStringDesc*) &TMP956)));
	asgnRefNoCycle((void**) (&destructorparam_516762), getident_201472(((NimStringDesc*) &TMP957)));
	LOC3 = 0;
	LOC3 = getident_201472(((NimStringDesc*) &TMP958));
	LOC4 = unknownlineinfo_197405();
	asgnRefNoCycle((void**) (&destructorpragma_516763), newidentnode_227125(LOC3, LOC4));
}

NIM_EXTERNC N_NOINLINE(void, HEX00_semDatInit)(void) {
static TNimNode* TMP3026[5];
static TNimNode* TMP3872[2];
static TNimNode TMP860[9];
NTI502454.size = sizeof(TY502454);
NTI502454.kind = 18;
NTI502454.base = 0;
TMP3026[0] = &TMP860[1];
TMP860[1].kind = 1;
TMP860[1].offset = offsetof(TY502454, HEX3Astate);
TMP860[1].typ = (&NTI358033);
TMP860[1].name = ":state";
TMP3026[1] = &TMP860[2];
TMP860[2].kind = 1;
TMP860[2].offset = offsetof(TY502454, Paramname501297);
TMP860[2].typ = (&NTI149);
TMP860[2].name = "paramName501297";
TMP3026[2] = &TMP860[3];
TMP860[3].kind = 1;
TMP860[3].offset = offsetof(TY502454, Genericparams501295);
TMP860[3].typ = (&NTI226808);
TMP860[3].name = "genericParams501295";
TMP3026[3] = &TMP860[4];
TMP860[4].kind = 1;
TMP860[4].offset = offsetof(TY502454, Info501298);
TMP860[4].typ = (&NTI196539);
TMP860[4].name = "info501298";
TMP3026[4] = &TMP860[5];
TMP860[5].kind = 1;
TMP860[5].offset = offsetof(TY502454, C501293);
TMP860[5].typ = (&NTI291019);
TMP860[5].name = "c501293";
TMP860[0].len = 5; TMP860[0].kind = 2; TMP860[0].sons = &TMP3026[0];
NTI502454.node = &TMP860[0];
NTI502512.size = sizeof(TY502454*);
NTI502512.kind = 22;
NTI502512.base = (&NTI502454);
NTI502512.marker = TMP3027;
NTI517908.size = sizeof(TY517908);
NTI517908.kind = 18;
NTI517908.base = 0;
NTI517908.flags = 2;
TMP3872[0] = &TMP860[7];
TMP860[7].kind = 1;
TMP860[7].offset = offsetof(TY517908, Field0);
TMP860[7].typ = (&NTI226808);
TMP860[7].name = "Field0";
TMP3872[1] = &TMP860[8];
TMP860[8].kind = 1;
TMP860[8].offset = offsetof(TY517908, Field1);
TMP860[8].typ = (&NTI226808);
TMP860[8].name = "Field1";
TMP860[6].len = 2; TMP860[6].kind = 2; TMP860[6].sons = &TMP3872[0];
NTI517908.node = &TMP860[6];
}

