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

#include <setjmp.h>

#include <string.h>
typedef struct tsym226846 tsym226846;
typedef struct tlineinfo196539 tlineinfo196539;
typedef struct TY419487 TY419487;
typedef struct tsourcemap419476 tsourcemap419476;
typedef struct TY419481 TY419481;
typedef struct tlinemap419480 tlinemap419480;
typedef struct TY419485 TY419485;
typedef struct tentry419478 tentry419478;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tcell44733 tcell44733;
typedef struct tcellseq44749 tcellseq44749;
typedef struct tgcheap46816 tgcheap46816;
typedef struct tcellset44745 tcellset44745;
typedef struct tpagedesc44741 tpagedesc44741;
typedef struct tmemregion27010 tmemregion27010;
typedef struct tsmallchunk26240 tsmallchunk26240;
typedef struct tllchunk27004 tllchunk27004;
typedef struct tbigchunk26242 tbigchunk26242;
typedef struct tintset26217 tintset26217;
typedef struct ttrunk26213 ttrunk26213;
typedef struct tavlnode27008 tavlnode27008;
typedef struct tgcstat46814 tgcstat46814;
typedef struct tcontext291021 tcontext291021;
typedef struct tnode226816 tnode226816;
typedef struct ttype226852 ttype226852;
typedef struct NimStringDesc NimStringDesc;
typedef struct tident201021 tident201021;
typedef struct tnodeseq226810 tnodeseq226810;
typedef struct tpasscontext287005 tpasscontext287005;
typedef struct TNimObject TNimObject;
typedef struct tscope226840 tscope226840;
typedef struct tproccon291011 tproccon291011;
typedef struct tsymseq226818 tsymseq226818;
typedef struct intset223056 intset223056;
typedef struct ttrunk223052 ttrunk223052;
typedef struct ttrunkseq223054 ttrunkseq223054;
typedef struct tlinkedlist129028 tlinkedlist129028;
typedef struct tlistentry129022 tlistentry129022;
typedef struct tidtable226864 tidtable226864;
typedef struct tidpairseq226862 tidpairseq226862;
typedef struct tidpair226860 tidpair226860;
typedef struct tidobj201015 tidobj201015;
typedef struct tstrtable226820 tstrtable226820;
typedef struct tctx290048 tctx290048;
typedef struct TY291133 TY291133;
typedef struct tinstantiationpair291013 tinstantiationpair291013;
typedef struct tinstantiation226836 tinstantiation226836;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct ttypeseq226848 ttypeseq226848;
typedef struct TY226947 TY226947;
typedef struct tloc226830 tloc226830;
typedef struct trope178009 trope178009;
typedef struct tlib226834 tlib226834;
typedef struct ttabiter236119 ttabiter236119;
typedef struct TY196621 TY196621;
typedef struct tfileinfo196537 tfileinfo196537;
typedef struct TY196552 TY196552;
typedef struct tdocumentor401007 tdocumentor401007;
typedef struct tcandidate406209 tcandidate406209;
typedef struct TY86345 TY86345;
typedef struct TY197414 TY197414;
typedef struct tbasechunk26238 tbasechunk26238;
typedef struct tfreecell26230 tfreecell26230;
typedef struct TY290250 TY290250;
typedef struct pprocHEX3Aobjecttype290230 pprocHEX3Aobjecttype290230;
typedef struct TY290269 TY290269;
typedef struct TY290270 TY290270;
typedef struct vmargs290042 vmargs290042;
typedef struct TY226936 TY226936;
typedef struct trstgenerator359016 trstgenerator359016;
typedef struct stringtableobj133012 stringtableobj133012;
typedef struct TY359034 TY359034;
typedef struct ttocentry359012 ttocentry359012;
typedef struct trstnode343011 trstnode343011;
typedef struct table359052 table359052;
typedef struct keyvaluepairseq359055 keyvaluepairseq359055;
typedef struct keyvaluepair359058 keyvaluepair359058;
typedef struct TY290231 TY290231;
typedef struct tblock290030 tblock290030;
typedef struct TY290211 TY290211;
typedef struct TY290237 TY290237;
typedef struct keyvaluepairseq133010 keyvaluepairseq133010;
typedef struct keyvaluepair133008 keyvaluepair133008;
typedef struct trstnodeseq343009 trstnodeseq343009;
struct  tlineinfo196539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tentry419478  {
NI Pos;
tsym226846* Sym;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tlinemap419480  {
TY419485* Entries;
};
struct  tsourcemap419476  {
TY419481* Lines;
};
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  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tcell44733  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44749  {
NI Len;
NI Cap;
tcell44733** D;
};
struct  tcellset44745  {
NI Counter;
NI Max;
tpagedesc44741* Head;
tpagedesc44741** Data;
};
typedef tsmallchunk26240* TY27022[512];
typedef ttrunk26213* ttrunkbuckets26215[256];
struct  tintset26217  {
ttrunkbuckets26215 Data;
};
struct  tmemregion27010  {
NI Minlargeobj;
NI Maxlargeobj;
TY27022 Freesmallchunks;
tllchunk27004* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26242* Freechunkslist;
tintset26217 Chunkstarts;
tavlnode27008* Root;
tavlnode27008* Deleted;
tavlnode27008* Last;
tavlnode27008* Freeavlnodes;
};
struct  tgcstat46814  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap46816  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44749 Zct;
tcellseq44749 Decstack;
tcellset44745 Cycleroots;
tcellseq44749 Tempstack;
NI Recgclock;
tmemregion27010 Region;
tgcstat46814 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
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  TNimObject  {
TNimType* m_type;
};
struct  tpasscontext287005  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  intset223056  {
NI Counter;
NI Max;
ttrunk223052* Head;
ttrunkseq223054* Data;
};
struct  tlinkedlist129028  {
tlistentry129022* Head;
tlistentry129022* 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  tstrtable226820  {
NI Counter;
tsymseq226818* Data;
};
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;
tlinkedlist129028 Optionstack;
tidtable226864 Symmapping;
tlinkedlist129028 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  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;
};
struct  tidobj201015  {
  TNimObject Sup;
NI Id;
};
struct  tloc226830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype226852* T;
trope178009* R;
trope178009* Heaproot;
};
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  tscope226840  {
NI Depthlevel;
tstrtable226820 Symbols;
tnodeseq226810* Usingsyms;
tscope226840* Parent;
};
struct  ttabiter236119  {
NI H;
};
struct  tident201021  {
  tidobj201015 Sup;
NimStringDesc* S;
tident201021* Next;
NI H;
};
struct  tfileinfo196537  {
NimStringDesc* Fullpath;
NimStringDesc* Projpath;
NimStringDesc* Shortname;
trope178009* Quotedname;
TY196552* Lines;
};
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;
};
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tsym226846* x_416632, tsym226846* y_416634, void* ClEnv);
void* ClEnv;
} TY416638;
typedef N_CLOSURE_PTR(NI, TMP2638) (tsym226846* x_418477, tsym226846* y_418479, void* ClEnv);
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;
};
typedef ttype226852* TY412748[1];
struct TY86345 {
NimStringDesc* Field0;
NI Field1;
};
typedef N_CLOSURE_PTR(tnode226816*, TMP2696) (tcontext291021* c, tidtable226864 pt, tnode226816* n);
typedef N_CLOSURE_PTR(tsym226846*, TMP2697) (tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info);
typedef N_CLOSURE_PTR(NI, TMP2707) (tsym226846* x_416615, tsym226846* y_416617, void* ClEnv);
typedef N_CLOSURE_PTR(tsym226846*, TMP3342) (tcontext291021* c, tsym226846* fn, tidtable226864 pt, tlineinfo196539 info);
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tentry419478 x_420138, tentry419478 y_420140, void* ClEnv);
void* ClEnv;
} TY420144;
typedef N_CLOSURE_PTR(NI, TMP4853) (tentry419478 x_420121, tentry419478 y_420123, void* ClEnv);
typedef NI TY26220[16];
struct  tpagedesc44741  {
tpagedesc44741* Next;
NI Key;
TY26220 Bits;
};
struct  tbasechunk26238  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26240  {
  tbasechunk26238 Sup;
tsmallchunk26240* Next;
tsmallchunk26240* Prev;
tfreecell26230* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27004  {
NI Size;
NI Acc;
tllchunk27004* Next;
};
struct  tbigchunk26242  {
  tbasechunk26238 Sup;
tbigchunk26242* Next;
tbigchunk26242* Prev;
NI Align;
NF Data;
};
struct  ttrunk26213  {
ttrunk26213* Next;
NI Key;
TY26220 Bits;
};
typedef tavlnode27008* TY27014[2];
struct  tavlnode27008  {
TY27014 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tproccon291011  {
tsym226846* Owner;
tsym226846* Resultsym;
NI Nestedloopcounter;
NI Nestedblockcounter;
NI Intrystmt;
tproccon291011* Next;
};
struct  ttrunk223052  {
ttrunk223052* Next;
NI Key;
TY26220 Bits;
};
struct  tlistentry129022  {
  TNimObject Sup;
tlistentry129022* Prev;
tlistentry129022* Next;
};
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  tinstantiation226836  {
tsym226846* Sym;
ttypeseq226848* Concretetypes;
TY226936* Usedby;
};
struct  trope178009  {
  TNimObject Sup;
trope178009* Left;
trope178009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlib226834  {
  tlistentry129022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope178009* Name;
tnode226816* Path;
};
struct  ttocentry359012  {
trstnode343011* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler344023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler344021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY359042[5];
struct keyvaluepair359058 {
NU8 Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  table359052  {
keyvaluepairseq359055* Data;
NI Counter;
};
struct  trstgenerator359016  {
  TNimObject Sup;
NU8 Target;
stringtableobj133012* Config;
NI Splitafter;
TY359034* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler344023 Findfile;
tmsghandler344021 Msghandler;
NimStringDesc* Filename;
TY359042 Meta;
NimStringDesc* Currentsection;
table359052 Seenindexterms;
};
typedef trope178009* tsections401005[26];
struct  tdocumentor401007  {
  trstgenerator359016 Sup;
trope178009* Moddesc;
NI Id;
tsections401005 Toc;
tsections401005 Section;
NimStringDesc* Indexvalfilename;
stringtableobj133012* Seensymbols;
};
struct  tfreecell26230  {
tfreecell26230* 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 keyvaluepair133008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  stringtableobj133012  {
  TNimObject Sup;
NI Counter;
keyvaluepairseq133010* Data;
NU8 Mode;
};
struct  trstnode343011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq343009* Sons;
};
struct TY419485 {
  TGenericSeq Sup;
  tentry419478 data[SEQ_DECL_SIZE];
};
struct TY419481 {
  TGenericSeq Sup;
  tlinemap419480 data[SEQ_DECL_SIZE];
};
struct TY419487 {
  TGenericSeq Sup;
  tsourcemap419476 data[SEQ_DECL_SIZE];
};
struct tnodeseq226810 {
  TGenericSeq Sup;
  tnode226816* 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 ttypeseq226848 {
  TGenericSeq Sup;
  ttype226852* data[SEQ_DECL_SIZE];
};
struct TY226947 {
  TGenericSeq Sup;
  tinstantiation226836* data[SEQ_DECL_SIZE];
};
struct TY196552 {
  TGenericSeq Sup;
  trope178009* data[SEQ_DECL_SIZE];
};
struct TY196621 {
  TGenericSeq Sup;
  tfileinfo196537 data[SEQ_DECL_SIZE];
};
struct TY197414 {
  TGenericSeq Sup;
  tlineinfo196539 data[SEQ_DECL_SIZE];
};
struct TY290250 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY290269 {
  TGenericSeq Sup;
  TY290270 data[SEQ_DECL_SIZE];
};
struct TY226936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY359034 {
  TGenericSeq Sup;
  ttocentry359012 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq359055 {
  TGenericSeq Sup;
  keyvaluepair359058 data[SEQ_DECL_SIZE];
};
struct TY290211 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY290231 {
  TGenericSeq Sup;
  tblock290030 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq133010 {
  TGenericSeq Sup;
  keyvaluepair133008 data[SEQ_DECL_SIZE];
};
struct trstnodeseq343009 {
  TGenericSeq Sup;
  trstnode343011* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP936)(void* p, NI op);
N_NIMCALL(void, TMP937)(void* p, NI op);
N_NIMCALL(void, TMP938)(void* p, NI op);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44733*, usrtocell_48446)(void* usr);
static N_INLINE(void, rtladdzct_50004)(tcell44733* c);
N_NOINLINE(void, addzct_48417)(tcellseq44749* s, tcell44733* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, ensureidx_419534)(TY419487** x_419540, NI y_419543);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NU8, incheckpoint_198411)(tlineinfo196539 current);
N_NIMCALL(tnode226816*, findclosestdot_418972)(tnode226816* n);
static N_INLINE(NI, safelen_227424)(tnode226816* n);
N_NIMCALL(tnode226816*, safesemexpr_419308)(tcontext291021* c, tnode226816* n);
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);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_50825)(tcell44733* c);
static N_INLINE(NIM_BOOL, canbecycleroot_48467)(tcell44733* c);
static N_INLINE(void, rtladdcycleroot_49229)(tcell44733* c);
N_NOINLINE(void, incl_45471)(tcellset44745* s, tcell44733* cell);
static N_INLINE(void, decref_50404)(tcell44733* c);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, suggestfieldaccess_418669)(tcontext291021* c, tnode226816* n, NI* outputs);
N_NIMCALL(tsym226846*, inittabiter_236124)(ttabiter236119* ti, tstrtable226820 tab);
static N_INLINE(NIM_BOOL, filtersym_415813)(tsym226846* s);
N_NIMCALL(void, suggestwriteln_197457)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, symtostr_415804)(tsym226846* s, NIM_BOOL islocal, NimStringDesc* section);
N_NIMCALL(NimStringDesc*, symtostr_415620)(tsym226846* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo196539 li);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_82507, TNimType* typ);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, origmodulename_415613)(tsym226846* m);
N_NIMCALL(NimStringDesc*, typetostring_264031)(ttype226852* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, tofullpath_198037)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_198073)(tlineinfo196539 info);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(NI, tocolumn_198083)(tlineinfo196539 info);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, extractdoccomment_401721)(tsym226846* s, tdocumentor401007* d);
N_NIMCALL(tsym226846*, nextiter_236132)(ttabiter236119* ti, tstrtable226820 tab);
N_NIMCALL(void, suggesteverything_418583)(tcontext291021* c, tnode226816* n, NI* outputs);
N_NIMCALL(void, suggestsymlist_416216)(tcontext291021* c, tnode226816* list, NI* outputs);
static N_INLINE(NI, sonslen_227249)(tnode226816* n);
N_NIMCALL(void, suggestfield_416031)(tcontext291021* c, tsym226846* s, NI* outputs);
static N_INLINE(NIM_BOOL, fieldvisible_415842)(tcontext291021* c, tsym226846* f);
N_NIMCALL(tsym226846*, getmodule_236243)(tsym226846* s);
N_NIMCALL(void, suggestoperations_418202)(tcontext291021* c, tnode226816* n, ttype226852* typ, NI* outputs);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_81204, TNimType* mt);
N_NIMCALL(void, sort_416619)(tsym226846** a_416627, NI a_416627Len0, TY416638 cmp_416637, NU8 order_416640);
N_NIMCALL(NI, HEX3Aanonymous_418470)(tsym226846* a, tsym226846* b);
N_NIMCALL(NI, cmp_4517)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(NIM_BOOL, typefits_418158)(tcontext291021* c, tsym226846* s, ttype226852* firstarg);
static N_INLINE(NI, sonslen_227255)(ttype226852* n);
N_NIMCALL(NIM_BOOL, argtypematches_415484)(tcontext291021* c, ttype226852* f, ttype226852* a);
N_NIMCALL(void, initcandidate_406270)(tcontext291021* ctx, tcandidate406209* c, ttype226852* callee);
static N_INLINE(void, initcandidateaux_406258)(tcontext291021* ctx, tcandidate406209* c, ttype226852* callee);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, initidtable_227167)(tidtable226864* x);
N_NIMCALL(tnode226816*, paramtypesmatch_413263)(tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg, tnode226816* argorig);
N_NIMCALL(tnode226816*, paramtypesmatchaux_412647)(tcandidate406209* m, ttype226852* f, ttype226852* argtype_412652, tnode226816* argsemantized, tnode226816* argorig);
N_NIMCALL(ttype226852*, skiptypes_231245)(ttype226852* t, NU64 kinds);
N_NIMCALL(void, assigntype_227210)(ttype226852* dest, ttype226852* src);
N_NIMCALL(tnode226816*, newnodei_227138)(NU8 kind, tlineinfo196539 info);
N_NIMCALL(ttype226852*, maketypefromexpr_291812)(tcontext291021* c, tnode226816* n);
N_NIMCALL(ttype226852*, newtypes_291214)(NU8 kind, tcontext291021* c);
N_NIMCALL(NU8, typerel_407436)(tcandidate406209* c, ttype226852* f, ttype226852* aorig, NIM_BOOL dobind);
static N_INLINE(void, put_406283)(tidtable226864* t, ttype226852* key, ttype226852* val);
N_NIMCALL(void, idtableput_236196)(tidtable226864* t, tidobj201015* key, TNimObject* val);
N_NIMCALL(ttype226852*, maybeskipdistinct_409369)(ttype226852* t, tsym226846* callee);
N_NIMCALL(NIM_BOOL, shouldskipdistinct_409273)(tnode226816* rules, tident201021* callident);
static N_INLINE(NI, len_227364)(tnode226816* n);
N_NIMCALL(tident201021*, considerquotedident_296010)(tnode226816* n);
N_NIMCALL(ttype226852*, base_264038)(ttype226852* t);
static N_INLINE(ttype226852*, lastson_227267)(ttype226852* n);
static N_INLINE(NIM_BOOL, sameenumtypes_270230)(ttype226852* a, ttype226852* b);
N_NOINLINE(NU8, typerangerel_409035)(ttype226852* f, ttype226852* a);
N_NIMCALL(NI64, firstord_264004)(ttype226852* t);
N_NIMCALL(NI64, lastord_264010)(ttype226852* t);
N_NIMCALL(NIM_BOOL, isconvertibletorange_407676)(ttype226852* f, ttype226852* a);
N_NIMCALL(NU8, handlerange_407499)(ttype226852* f, ttype226852* a, NU8 min, NU8 max);
static N_INLINE(NIM_BOOL, isintlit_264386)(ttype226852* t);
static N_INLINE(tnode226816*, HEX5BHEX5D_227698)(tnode226816* n, NI i);
N_NIMCALL(NU8, handlefloatrange_407743)(ttype226852* f, ttype226852* a);
static N_INLINE(NIM_BOOL, isfloatlit_264431)(ttype226852* t);
N_NIMCALL(TNimObject*, idtableget_236182)(tidtable226864 t, tidobj201015* key);
N_NIMCALL(ttype226852*, newtypewithsons_291823)(tcontext291021* c, NU8 kind, ttypeseq226848* sons);
N_NIMCALL(ttype226852*, getsystype_283030)(NU8 kind);
N_NIMCALL(tnode226816*, newintnode_227096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lengthord_264016)(ttype226852* t);
static N_INLINE(NU8, allowsnil_408537)(ttype226852* f);
N_NIMCALL(NIM_BOOL, isordinaltype_264092)(ttype226852* t);
N_NIMCALL(void, internalerror_199006)(NimStringDesc* errmsg);
N_NIMCALL(NU8, recordrel_408281)(tcandidate406209* c, ttype226852* f, ttype226852* a);
N_NIMCALL(NIM_BOOL, sametype_269351)(ttype226852* a, ttype226852* b, NU8 flags);
N_NIMCALL(NU8, minrel_408261)(NU8 a, NU8 b);
N_NIMCALL(void, internalerror_198987)(tlineinfo196539 info, NimStringDesc* errmsg);
N_NIMCALL(NIM_BOOL, sameobjecttypes_270146)(ttype226852* a, ttype226852* b);
N_NIMCALL(NI, isobjectsubtype_407802)(ttype226852* a, ttype226852* f);
static N_INLINE(NIM_BOOL, samedistincttypes_270219)(ttype226852* a, ttype226852* b);
N_NIMCALL(NI, len_231005)(ttype226852* n);
N_NIMCALL(NU8, proctyperel_408681)(tcandidate406209* c, ttype226852* f, ttype226852* a);
N_NIMCALL(NU8, procparamtyperel_408598)(tcandidate406209* c, ttype226852* f_408602, ttype226852* a);
N_NIMCALL(NIM_BOOL, ismetatype_227752)(ttype226852* t);
N_NIMCALL(ttype226852*, generatetypeinstance_321503)(tcontext291021* p, tidtable226864 pt, tlineinfo196539 info, ttype226852* t);
static N_INLINE(NIM_BOOL, inconsistentvartypes_408560)(ttype226852* f, ttype226852* a);
N_NIMCALL(NIM_BOOL, compatibleeffects_274131)(ttype226852* formal, ttype226852* actual);
N_NIMCALL(ttype226852*, skipgenericalias_270619)(ttype226852* t);
static N_INLINE(ttype226852*, skipintlit_283531)(ttype226852* t);
N_NIMCALL(ttype226852*, concretetype_407446)(tcandidate406209* c, ttype226852* t);
N_NIMCALL(ttype226852*, newtype_227083)(NU8 kind, tsym226846* owner);
N_NIMCALL(void, addsonskipintlit_283572)(ttype226852* father, ttype226852* son);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NU8, matchusertypeclass_409050)(tcontext291021* c, tcandidate406209* m, ttype226852* ff, ttype226852* a);
N_NIMCALL(tscope226840*, openscope_296191)(tcontext291021* c);
N_NIMCALL(tsym226846*, newsym_227074)(NU8 symkind, tident201021* name, tsym226846* owner, tlineinfo196539 info);
N_NIMCALL(ttype226852*, maketypedesc_291763)(tcontext291021* c, ttype226852* typ);
N_NIMCALL(void, adddecl_296694)(tcontext291021* c, tsym226846* sym);
N_NIMCALL(ttype226852*, makevartype_291207)(tcontext291021* c, ttype226852* basetype);
N_NIMCALL(NimStringDesc*, HEX24_199126)(TY86345 x_199130);
N_NIMCALL(tnode226816*, copytree_227329)(tnode226816* src);
N_NIMCALL(void, clearbufferedmsgs_197449)(void);
N_NIMCALL(void, closescope_296211)(tcontext291021* c);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_274497)(ttypeseq226848* x_274503, ttypeseq226848* y_274508);
N_NIMCALL(tnode226816*, replacetypesinbody_321489)(tcontext291021* p, tidtable226864 pt, tnode226816* n);
N_NIMCALL(NIM_BOOL, exprstructuralequivalent_262184)(tnode226816* a, tnode226816* b);
N_NIMCALL(void, localerror_198955)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NIM_BOOL, isinlineiterator_412610)(ttype226852* t);
N_NIMCALL(tnode226816*, implicitconv_412356)(NU8 kind, ttype226852* f, tnode226816* arg, tcandidate406209* m, tcontext291021* c);
N_NIMCALL(NIM_BOOL, containsgenerictype_273929)(ttype226852* t);
N_NIMCALL(ttype226852*, getinstantiatedtype_412309)(tcontext291021* c, tnode226816* arg, tcandidate406209* m, ttype226852* f);
N_NIMCALL(ttype226852*, errortype_292319)(tcontext291021* c);
N_NIMCALL(void, addson_227287)(tnode226816* father, tnode226816* son);
N_NIMCALL(tnode226816*, newsymnode_228755)(tsym226846* sym, tlineinfo196539 info);
N_NIMCALL(tnode226816*, userconvmatch_412387)(tcontext291021* c, tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg);
N_NIMCALL(void, markused_406251)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, message_198976)(tlineinfo196539 info, NU16 msg, NimStringDesc* arg);
static N_INLINE(void, suggestsym_421882)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, findusages_419417)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(NIM_BOOL, istracked_419164)(tlineinfo196539 current, NI tokenlen);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_198579)(tlineinfo196539 a, tlineinfo196539 b);
N_NIMCALL(void, finddefinition_419457)(tlineinfo196539 info, tsym226846* s);
N_NIMCALL(void, suggestquit_197846)(void);
N_NIMCALL(void, addtosourcemap_419598)(tsym226846* sym, tlineinfo196539 info);
N_NIMCALL(void, ensureseq_419618)(TY419481** x_419626);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419632)(TY419481* x_419638, TY419481* y_419643);
N_NIMCALL(void, ensureidx_419962)(TY419481** x_419968, NI y_419971);
N_NIMCALL(void, ensureseq_420006)(TY419485** x_420014);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419758)(TY419485* x_419764, TY419485* y_419769);
N_NIMCALL(tnode226816*, newsymnode_227132)(tsym226846* sym);
N_NIMCALL(tnode226816*, newnodeit_227145)(NU8 kind, tlineinfo196539 info, ttype226852* typ);
N_NIMCALL(tnode226816*, localconvmatch_412500)(tcontext291021* c, tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg);
N_NIMCALL(void, add_227498)(tnode226816* father, tnode226816* son);
N_NIMCALL(void, copycandidate_406649)(tcandidate406209* a, tcandidate406209* b);
N_NIMCALL(void, copyidtable_227241)(tidtable226864* dest, tidtable226864 src);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NI, cmpcandidates_407039)(tcandidate406209* a, tcandidate406209* b);
N_NIMCALL(NI, complexdisambiguation_406757)(ttype226852* a, ttype226852* b);
N_NIMCALL(NI, sumgeneric_406661)(ttype226852* t_406663);
N_NIMCALL(void, suggestobject_416304)(tcontext291021* c, tnode226816* n, NI* outputs);
static N_INLINE(tnode226816*, lastson_227261)(tnode226816* n);
N_NIMCALL(tnode226816*, findclosestcall_419067)(tnode226816* n);
N_NIMCALL(tnode226816*, copynode_227323)(tnode226816* src);
N_NIMCALL(void, suggestcall_416532)(tcontext291021* c, tnode226816* n_416535, tnode226816* norig, NI* outputs);
N_NIMCALL(NI, HEX3Aanonymous_416608)(tsym226846* a, tsym226846* b);
N_NIMCALL(NIM_BOOL, namefits_416427)(tcontext291021* c, tsym226846* s, tnode226816* n);
N_NIMCALL(NIM_BOOL, argsfit_416509)(tcontext291021* c, tsym226846* candidate, tnode226816* n, tnode226816* norig);
N_NIMCALL(void, initcandidate_406295)(tcontext291021* ctx, tcandidate406209* c, tsym226846* callee, tnode226816* binding, NI calleescope);
N_NIMCALL(tsym226846*, originatingmodule_233754)(tsym226846* s);
N_NIMCALL(void, partialmatch_415367)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m);
N_NIMCALL(void, initintset_223950)(intset223056* Result);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, matchesaux_414047)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m, intset223056* marker);
N_NIMCALL(void, preparenamedparam_413785)(tnode226816* a);
N_NIMCALL(tnode226816*, newidentnode_227125)(tident201021* ident, tlineinfo196539 info);
N_NIMCALL(tsym226846*, getsymfromlist_236228)(tnode226816* list, tident201021* ident, NI start);
N_NIMCALL(NIM_BOOL, containsorincl_223916)(intset223056* s, NI key);
N_NIMCALL(tnode226816*, prepareoperand_413708)(tcontext291021* c, ttype226852* formal, tnode226816* a);
N_NIMCALL(NIM_BOOL, matchnodekinds_323381)(tnode226816* p, tnode226816* n);
N_NIMCALL(ttype226852*, arrayconstr_413860)(tcontext291021* c, tnode226816* n);
N_NIMCALL(void, rawaddson_231562)(ttype226852* father, ttype226852* son);
N_NIMCALL(ttype226852*, makerangetype_292351)(tcontext291021* c, NI64 first, NI64 last, tlineinfo196539 info, ttype226852* inttype);
N_NIMCALL(void, setson_413653)(tnode226816* father, NI at, tnode226816* son);
N_NIMCALL(tnode226816*, prepareoperand_413762)(tcontext291021* c, tnode226816* a);
N_NIMCALL(void, incrindextype_413883)(ttype226852* t);
N_NIMCALL(ttype226852*, arrayconstr_413872)(tcontext291021* c, tlineinfo196539 info);
N_NIMCALL(NimStringDesc*, rendertree_251058)(tnode226816* n, NU8 renderflags);
N_NIMCALL(NimStringDesc*, argtypetostring_407139)(tnode226816* arg, NU8 prefer);
N_NIMCALL(void, suggestexpr_422008)(tcontext291021* c, tnode226816* node);
N_NIMCALL(void, deffromline_420076)(TY419485** entries, NI32 col);
N_NIMCALL(void, sort_420125)(tentry419478* a_420133, NI a_420133Len0, TY420144 cmp_420143, NU8 order_420146);
N_NIMCALL(NI, HEX3Aanonymous_420101)(tentry419478 a, tentry419478 b);
N_NIMCALL(NI, cmp_420107)(NI x_420111, NI y_420113);
STRING_LITERAL(TMP2634, "\"", 1);
STRING_LITERAL(TMP2635, "sug", 3);
STRING_LITERAL(TMP2665, "forward type in typeRel()", 25);
STRING_LITERAL(TMP2669, "recordRel", 9);
STRING_LITERAL(TMP2684, "wrong instantiated type!", 24);
STRING_LITERAL(TMP2685, "cannot resolve type: ", 21);
STRING_LITERAL(TMP2689, "compiler/sigmatch.nim", 21);
NIM_CONST TY86345 TMP2688 = {((NimStringDesc*) &TMP2689),
483}
;
NIM_CONST TY86345 TMP2691 = {((NimStringDesc*) &TMP2689),
931}
;
STRING_LITERAL(TMP2692, "", 0);
NIM_CONST TY86345 TMP2693 = {((NimStringDesc*) &TMP2689),
1024}
;
STRING_LITERAL(TMP2694, "getInstantiatedType", 19);
STRING_LITERAL(TMP2695, "implicitConv", 12);
STRING_LITERAL(TMP2698, "use", 3);
STRING_LITERAL(TMP2699, "def", 3);
STRING_LITERAL(TMP2706, "x.state is not csMatch", 22);
STRING_LITERAL(TMP2709, "matches", 7);
STRING_LITERAL(TMP2710, "con", 3);
STRING_LITERAL(TMP2904, ": ", 2);
STRING_LITERAL(TMP2905, " | ", 3);
STRING_LITERAL(TMP2906, ", ", 2);
STRING_LITERAL(TMP3341, "cannot instantiate \'deepCopy\'", 29);
tsym226846* usagesym_419415;
tlineinfo196539 lastlineinfo_419416;
TY419487* gsourcemaps_419508;
TNimType NTI419476; /* TSourceMap */
TNimType NTI419480; /* TLineMap */
TNimType NTI419478; /* TEntry */
extern TNimType NTI108; /* int */
extern TNimType NTI226814; /* PSym */
TNimType NTI419485; /* seq[TEntry] */
TNimType NTI419481; /* seq[TLineMap] */
TNimType NTI419487; /* seq[TSourceMap] */
extern tgcheap46816 gch_46844;
extern NU32 gglobaloptions_170118;
extern TSafePoint* exchandler_16243;
extern TNimType NTI196545; /* ERecoverableError */
extern Exception* currexception_16245;
extern tnode226816* emptynode_227738;
extern TNimType NTI226445; /* TSymKind */
extern NI32 gdirtybufferidx_170134;
extern TY196621* fileinfos_196642;
extern NI32 gdirtyoriginalidx_170135;
extern TNimType NTI226818; /* TSymSeq */
extern TNimType NTI226848; /* TTypeSeq */
extern TY197414* checkpoints_198151;
extern NIM_BOOL isserving_170133;
TNimType NTI406209; /* TCandidate */
extern TNimType NTI291019; /* PContext */
TNimType NTI406205; /* TCandidateState */
extern TNimType NTI226812; /* PType */
extern TNimType NTI226808; /* PNode */
extern TNimType NTI226864; /* TIdTable */
extern TNimType NTI138; /* bool */
N_NIMCALL(void, TMP936)(void* p, NI op) {
	TY419485* a;
	NI LOC1;
	a = (TY419485*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Sym, op);
	}
}
N_NIMCALL(void, TMP937)(void* p, NI op) {
	TY419481* a;
	NI LOC1;
	a = (TY419481*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Entries, op);
	}
}
N_NIMCALL(void, TMP938)(void* p, NI op) {
	TY419487* a;
	NI LOC1;
	a = (TY419487*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Lines, op);
	}
}

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

static N_INLINE(void, rtladdzct_50004)(tcell44733* c) {
	addzct_48417((&gch_46844.Zct), c);
}

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

N_NIMCALL(void, ensureidx_419534)(TY419487** x_419540, NI y_419543) {
	{
		if (!((*x_419540)->Sup.len <= y_419543)) goto LA3;
		(*x_419540) = (TY419487*) setLengthSeq(&((*x_419540))->Sup, sizeof(tsourcemap419476), (NI32)(y_419543 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, resetsourcemap_419529)(NI32 fileidx) {
	ensureidx_419534((&gsourcemaps_419508), ((NI) (fileidx)));
	if (gsourcemaps_419508->data[fileidx].Lines) nimGCunrefNoCycle(gsourcemaps_419508->data[fileidx].Lines);
	gsourcemaps_419508->data[fileidx].Lines = (TY419481*) newSeqRC1((&NTI419481), 0);
}

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(tnode226816*, findclosestdot_418972)(tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 45));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = incheckpoint_198411((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		{
			NI i_419015;
			NI HEX3Atmp_419048;
			NI LOC10;
			NI res_419051;
			i_419015 = 0;
			HEX3Atmp_419048 = 0;
			LOC10 = 0;
			LOC10 = safelen_227424(n);
			HEX3Atmp_419048 = (LOC10 - 1);
			res_419051 = 0;
			{
				while (1) {
					if (!(res_419051 <= HEX3Atmp_419048)) goto LA12;
					i_419015 = res_419051;
					result = findclosestdot_418972((*n).kindU.S6.Sons->data[i_419015]);
					{
						if (!!((result == NIM_NIL))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_419051 += 1;
				} LA12: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	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(NIM_BOOL, canbecycleroot_48467)(tcell44733* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).Typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_49229)(tcell44733* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_45471((&gch_46844.Cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_50825)(tcell44733* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_48467(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_49229(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_50404)(tcell44733* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_50004(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_48467(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_49229(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell44733* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_48446(src);
		incref_50825(LOC5);
	}
	LA3: ;
	{
		tcell44733* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_48446((*dest));
		decref_50404(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

N_NIMCALL(tnode226816*, safesemexpr_419308)(tcontext291021* c, tnode226816* n) {
	tnode226816* volatile result;
	TSafePoint TMP1983;
	result = 0;
	pushSafePoint(&TMP1983);
	TMP1983.status = setjmp(TMP1983.context);
	if (TMP1983.status == 0) {
		result = (*c).Semexpr(c, n, 0);
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI196545))) {
			TMP1983.status = 0;
			result = emptynode_227738;
			popCurrentException();
		}
	}
	if (TMP1983.status != 0) reraiseException();
	return result;
}

static N_INLINE(NIM_BOOL, filtersym_415813)(tsym226846* s) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = (((NU8)((*(*s).Name).S->data[0])) >= ((NU8)(97)) && ((NU8)((*(*s).Name).S->data[0])) <= ((NU8)(122)) || ((NU8)((*(*s).Name).S->data[0])) >= ((NU8)(65)) && ((NU8)((*(*s).Name).S->data[0])) <= ((NU8)(90)) || ((NU8)((*(*s).Name).S->data[0])) >= ((NU8)(48)) && ((NU8)((*(*s).Name).S->data[0])) <= ((NU8)(57)) || ((NU8)((*(*s).Name).S->data[0])) >= ((NU8)(128)) && ((NU8)((*(*s).Name).S->data[0])) <= ((NU8)(255)));
	if (!(LOC1)) goto LA2;
	LOC1 = !(((*s).Kind == ((NU8) 6)));
	LA2: ;
	result = LOC1;
	return result;
}

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

N_NIMCALL(NimStringDesc*, origmodulename_415613)(tsym226846* m) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*m).Position == ((NI) (gdirtybufferidx_170134)))) goto LA3;
		result = copyString(fileinfos_196642->data[gdirtyoriginalidx_170135].Shortname);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString((*(*m).Name).S);
	}
	LA1: ;
	return result;
}

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

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

N_NIMCALL(NimStringDesc*, symtostr_415620)(tsym226846* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo196539 li) {
	NimStringDesc* result;
	NimStringDesc* LOC20;
	NI LOC21;
	NimStringDesc* LOC22;
	NI LOC23;
	NimStringDesc* LOC24;
	NimStringDesc* LOC25;
	NimStringDesc* LOC26;
	result = 0;
	result = copyString(section);
	result = addChar(result, 9);
	result = resizeString(result, reprEnum((*s).Kind, (&NTI226445))->Sup.len + 0);
appendString(result, reprEnum((*s).Kind, (&NTI226445)));
	result = addChar(result, 9);
	{
		NIM_BOOL LOC3;
		tsym226846* ow;
		NimStringDesc* LOC14;
		LOC3 = 0;
		LOC3 = !(islocal);
		if (!(LOC3)) goto LA4;
		LOC3 = !(((*s).Kind == ((NU8) 6)));
		LA4: ;
		if (!LOC3) goto LA5;
		ow = (*s).Owner;
		{
			NIM_BOOL LOC9;
			tsym226846* ow2;
			NimStringDesc* LOC13;
			LOC9 = 0;
			LOC9 = !(((*ow).Kind == ((NU8) 6)));
			if (!(LOC9)) goto LA10;
			LOC9 = !(((*ow).Owner == NIM_NIL));
			LA10: ;
			if (!LOC9) goto LA11;
			ow2 = (*ow).Owner;
			LOC13 = 0;
			LOC13 = origmodulename_415613(ow2);
			result = resizeString(result, LOC13->Sup.len + 0);
appendString(result, LOC13);
			result = addChar(result, 46);
		}
		LA11: ;
		LOC14 = 0;
		LOC14 = origmodulename_415613(ow);
		result = resizeString(result, LOC14->Sup.len + 0);
appendString(result, LOC14);
		result = addChar(result, 46);
	}
	LA5: ;
	result = resizeString(result, (*(*s).Name).S->Sup.len + 0);
appendString(result, (*(*s).Name).S);
	result = addChar(result, 9);
	{
		NimStringDesc* LOC19;
		if (!!(((*s).Typ == NIM_NIL))) goto LA17;
		LOC19 = 0;
		LOC19 = typetostring_264031((*s).Typ, ((NU8) 0));
		result = resizeString(result, LOC19->Sup.len + 0);
appendString(result, LOC19);
	}
	LA17: ;
	result = addChar(result, 9);
	LOC20 = 0;
	LOC20 = tofullpath_198037(li.Fileindex);
	result = resizeString(result, LOC20->Sup.len + 0);
appendString(result, LOC20);
	result = addChar(result, 9);
	LOC21 = 0;
	LOC21 = tolinenumber_198073(li);
	LOC22 = 0;
	LOC22 = nimIntToStr(LOC21);
	result = resizeString(result, LOC22->Sup.len + 0);
appendString(result, LOC22);
	result = addChar(result, 9);
	LOC23 = 0;
	LOC23 = tocolumn_198083(li);
	LOC24 = 0;
	LOC24 = nimIntToStr(LOC23);
	result = resizeString(result, LOC24->Sup.len + 0);
appendString(result, LOC24);
	result = addChar(result, 9);
	LOC25 = 0;
	LOC25 = extractdoccomment_401721(s, NIM_NIL);
	LOC26 = 0;
	LOC26 = nsuEscape(LOC25, ((NimStringDesc*) &TMP2634), ((NimStringDesc*) &TMP2634));
	result = resizeString(result, LOC26->Sup.len + 0);
appendString(result, LOC26);
	return result;
}

N_NIMCALL(NimStringDesc*, symtostr_415804)(tsym226846* s, NIM_BOOL islocal, NimStringDesc* section) {
	NimStringDesc* result;
	result = 0;
	result = symtostr_415620(s, islocal, section, (*s).Info);
	return result;
}

N_NIMCALL(void, suggesteverything_418583)(tcontext291021* c, tnode226816* n, NI* outputs) {
	NIM_BOOL islocal;
	islocal = NIM_TRUE;
	{
		tscope226840* scope_418590;
		tscope226840* HEX3Atmp_418644;
		tscope226840* current_418647;
		scope_418590 = 0;
		HEX3Atmp_418644 = 0;
		HEX3Atmp_418644 = (*c).Currentscope;
		current_418647 = HEX3Atmp_418644;
		{
			while (1) {
				if (!!((current_418647 == NIM_NIL))) goto LA3;
				scope_418590 = current_418647;
				{
					if (!(scope_418590 == (*c).Toplevelscope)) goto LA6;
					islocal = NIM_FALSE;
				}
				LA6: ;
				{
					tsym226846* it_418607;
					tstrtable226820 HEX3Atmp_418638;
					ttabiter236119 it_418641;
					tsym226846* s_418643;
					it_418607 = 0;
					memset((void*)(&HEX3Atmp_418638), 0, sizeof(HEX3Atmp_418638));
					HEX3Atmp_418638.Counter = (*scope_418590).Symbols.Counter;
					HEX3Atmp_418638.Data = (*scope_418590).Symbols.Data;
					memset((void*)(&it_418641), 0, sizeof(it_418641));
					s_418643 = inittabiter_236124((&it_418641), HEX3Atmp_418638);
					{
						while (1) {
							if (!!((s_418643 == NIM_NIL))) goto LA10;
							it_418607 = s_418643;
							{
								NIM_BOOL LOC13;
								NimStringDesc* LOC16;
								LOC13 = 0;
								LOC13 = filtersym_415813(it_418607);
								if (!LOC13) goto LA14;
								LOC16 = 0;
								LOC16 = symtostr_415804(it_418607, islocal, ((NimStringDesc*) &TMP2635));
								suggestwriteln_197457(LOC16);
								(*outputs) += 1;
							}
							LA14: ;
							s_418643 = nextiter_236132((&it_418641), HEX3Atmp_418638);
						} LA10: ;
					}
				}
				{
					if (!(scope_418590 == (*c).Toplevelscope)) goto LA19;
					goto LA1;
				}
				LA19: ;
				current_418647 = (*current_418647).Parent;
			} LA3: ;
		}
	} LA1: ;
}

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(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(void, suggestfield_416031)(tcontext291021* c, tsym226846* s, NI* outputs) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = filtersym_415813(s);
		if (!(LOC3)) goto LA4;
		LOC3 = fieldvisible_415842(c, s);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = symtostr_415804(s, NIM_TRUE, ((NimStringDesc*) &TMP2635));
		suggestwriteln_197457(LOC7);
		(*outputs) += 1;
	}
	LA5: ;
}

N_NIMCALL(void, suggestsymlist_416216)(tcontext291021* c, tnode226816* list, NI* outputs) {
	{
		NI i_416234;
		NI HEX3Atmp_416287;
		NI LOC2;
		NI res_416290;
		i_416234 = 0;
		HEX3Atmp_416287 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227249(list);
		HEX3Atmp_416287 = (NI32)(LOC2 - 1);
		res_416290 = 0;
		{
			while (1) {
				if (!(res_416290 <= HEX3Atmp_416287)) goto LA4;
				i_416234 = res_416290;
				{
					if (!((*(*list).kindU.S6.Sons->data[i_416234]).Kind == ((NU8) 3))) goto LA7;
					suggestfield_416031(c, (*(*list).kindU.S6.Sons->data[i_416234]).kindU.S4.Sym, outputs);
				}
				LA7: ;
				res_416290 += 1;
			} LA4: ;
		}
	}
}

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

N_NIMCALL(NI, HEX3Aanonymous_418470)(tsym226846* a, tsym226846* b) {
	NI result;
	result = 0;
	result = cmp_4517((*(*a).Name).S, (*(*b).Name).S);
	goto BeforeRet;
	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(void, initcandidateaux_406258)(tcontext291021* ctx, tcandidate406209* c, ttype226852* callee) {
	unsureAsgnRef((void**) (&(*c).C), ctx);
	(*c).Exactmatches = 0;
	(*c).Subtypematches = 0;
	(*c).Convmatches = 0;
	(*c).Intconvmatches = 0;
	(*c).Genericmatches = 0;
	(*c).State = ((NU8) 0);
	unsureAsgnRef((void**) (&(*c).Callee), callee);
	unsureAsgnRef((void**) (&(*c).Call), NIM_NIL);
	(*c).Basetypematch = NIM_FALSE;
	(*c).Genericconverter = NIM_FALSE;
	(*c).Inheritancepenalty = 0;
}

N_NIMCALL(void, initcandidate_406270)(tcontext291021* ctx, tcandidate406209* c, ttype226852* callee) {
	initcandidateaux_406258(ctx, c, callee);
	unsureAsgnRef((void**) (&(*c).Calleesym), NIM_NIL);
	initidtable_227167((&(*c).Bindings));
}

static N_INLINE(void, put_406283)(tidtable226864* t, ttype226852* key, ttype226852* val) {
	tidobj201015* LOC1;
	TNimObject* LOC2;
	LOC1 = 0;
	LOC1 = &key->Sup;
	LOC2 = 0;
	LOC2 = &val->Sup.Sup;
	idtableput_236196(t, LOC1, LOC2);
}

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;
}

N_NIMCALL(NIM_BOOL, shouldskipdistinct_409273)(tnode226816* rules, tident201021* callident) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*rules).Kind == ((NU8) 130))) goto LA3;
		{
			tnode226816* r_409287;
			r_409287 = 0;
			{
				NI i_409325;
				NI HEX3Atmp_409327;
				NI LOC7;
				NI res_409329;
				i_409325 = 0;
				HEX3Atmp_409327 = 0;
				LOC7 = 0;
				LOC7 = len_227364(rules);
				HEX3Atmp_409327 = (LOC7 - 1);
				res_409329 = 0;
				{
					while (1) {
						if (!(res_409329 <= HEX3Atmp_409327)) goto LA9;
						i_409325 = res_409329;
						r_409287 = (*rules).kindU.S6.Sons->data[i_409325];
						{
							tident201021* LOC12;
							LOC12 = 0;
							LOC12 = considerquotedident_296010(r_409287);
							if (!(LOC12 == callident)) goto LA13;
							result = NIM_TRUE;
							goto BeforeRet;
						}
						LA13: ;
						res_409329 += 1;
					} LA9: ;
				}
			}
		}
		result = NIM_FALSE;
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		{
			tnode226816* r_409304;
			r_409304 = 0;
			{
				NI i_409334;
				NI HEX3Atmp_409336;
				NI LOC18;
				NI res_409338;
				i_409334 = 0;
				HEX3Atmp_409336 = 0;
				LOC18 = 0;
				LOC18 = len_227364(rules);
				HEX3Atmp_409336 = (LOC18 - 1);
				res_409338 = 0;
				{
					while (1) {
						if (!(res_409338 <= HEX3Atmp_409336)) goto LA20;
						i_409334 = res_409338;
						r_409304 = (*rules).kindU.S6.Sons->data[i_409334];
						{
							tident201021* LOC23;
							LOC23 = 0;
							LOC23 = considerquotedident_296010(r_409304);
							if (!(LOC23 == callident)) goto LA24;
							result = NIM_FALSE;
							goto BeforeRet;
						}
						LA24: ;
						res_409338 += 1;
					} LA20: ;
				}
			}
		}
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype226852*, maybeskipdistinct_409369)(ttype226852* t, tsym226846* callee) {
	ttype226852* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		LOC3 = 0;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = !((t == NIM_NIL));
		if (!(LOC5)) goto LA6;
		LOC5 = ((*t).Kind == ((NU8) 13));
		LA6: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA7;
		LOC4 = !(((*t).N == NIM_NIL));
		LA7: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA8;
		LOC3 = shouldskipdistinct_409273((*t).N, (*callee).Name);
		LA8: ;
		if (!LOC3) goto LA9;
		result = base_264038(t);
	}
	goto LA1;
	LA9: ;
	{
		result = t;
	}
	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[(NI32)(LOC1 - 1)];
	return result;
}

static N_INLINE(NIM_BOOL, sameenumtypes_270230)(ttype226852* a, ttype226852* b) {
	NIM_BOOL result;
	result = 0;
	result = ((*a).Sup.Id == (*b).Sup.Id);
	return result;
}

N_NOINLINE(NU8, typerangerel_409035)(ttype226852* f, ttype226852* a) {
	NU8 result;
	NI64 a0;
	NI64 a1;
	NI64 f0;
	NI64 f1;
	result = 0;
	a0 = firstord_264004(a);
	a1 = lastord_264010(a);
	f0 = firstord_264004(f);
	f1 = lastord_264010(f);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (a0 == f0);
		if (!(LOC3)) goto LA4;
		LOC3 = (a1 == f1);
		LA4: ;
		if (!LOC3) goto LA5;
		result = ((NU8) 9);
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		LOC8 = 0;
		LOC8 = (f0 <= a0);
		if (!(LOC8)) goto LA9;
		LOC8 = (a1 <= f1);
		LA9: ;
		if (!LOC8) goto LA10;
		result = ((NU8) 1);
	}
	goto LA1;
	LA10: ;
	{
		NIM_BOOL LOC13;
		LOC13 = 0;
		LOC13 = (a0 <= f1);
		if (!(LOC13)) goto LA14;
		LOC13 = (f0 <= a1);
		LA14: ;
		if (!LOC13) goto LA15;
		result = ((NU8) 1);
	}
	goto LA1;
	LA15: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isconvertibletorange_407676)(ttype226852* f, ttype226852* a) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((*f).Kind >= ((NU8) 31) && (*f).Kind <= ((NU8) 35) || (*f).Kind >= ((NU8) 40) && (*f).Kind <= ((NU8) 44));
		if (!(LOC3)) goto LA4;
		LOC3 = ((*a).Kind >= ((NU8) 31) && (*a).Kind <= ((NU8) 35) || (*a).Kind >= ((NU8) 40) && (*a).Kind <= ((NU8) 44));
		LA4: ;
		if (!LOC3) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		LOC8 = 0;
		LOC8 = ((*f).Kind >= ((NU8) 36) && (*f).Kind <= ((NU8) 39));
		if (!(LOC8)) goto LA9;
		LOC8 = ((*a).Kind >= ((NU8) 36) && (*a).Kind <= ((NU8) 39));
		LA9: ;
		if (!LOC8) goto LA10;
		result = NIM_TRUE;
	}
	goto LA1;
	LA10: ;
	LA1: ;
	return result;
}

static N_INLINE(NIM_BOOL, isintlit_264386)(ttype226852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*t).Kind == ((NU8) 31));
	if (!(LOC2)) goto LA3;
	LOC2 = !(((*t).N == NIM_NIL));
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = ((*(*t).N).Kind == ((NU8) 6));
	LA4: ;
	result = LOC1;
	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;
}

N_NIMCALL(NU8, handlerange_407499)(ttype226852* f, ttype226852* a, NU8 min, NU8 max) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype226852* ab;
		NU8 k;
		ab = skiptypes_231245(a, 1048576);
		k = (*ab).Kind;
		{
			if (!(k == (*f).Kind)) goto LA8;
			result = ((NU8) 4);
		}
		goto LA6;
		LA8: ;
		{
			NIM_BOOL LOC11;
			NIM_BOOL LOC12;
			NIM_BOOL LOC13;
			NIM_BOOL LOC14;
			NI64 LOC18;
			NI64 LOC20;
			LOC11 = 0;
			LOC12 = 0;
			LOC13 = 0;
			LOC14 = 0;
			LOC14 = (k == ((NU8) 31));
			if (!(LOC14)) goto LA15;
			LOC14 = ((*f).Kind == ((NU8) 20) || (*f).Kind >= ((NU8) 32) && (*f).Kind <= ((NU8) 35) || (*f).Kind >= ((NU8) 40) && (*f).Kind <= ((NU8) 44));
			LA15: ;
			LOC13 = LOC14;
			if (!(LOC13)) goto LA16;
			LOC13 = isintlit_264386(ab);
			LA16: ;
			LOC12 = LOC13;
			if (!(LOC12)) goto LA17;
			LOC18 = 0;
			LOC18 = firstord_264004(f);
			LOC12 = (LOC18 <= (*(*ab).N).kindU.S1.Intval);
			LA17: ;
			LOC11 = LOC12;
			if (!(LOC11)) goto LA19;
			LOC20 = 0;
			LOC20 = lastord_264010(f);
			LOC11 = ((*(*ab).N).kindU.S1.Intval <= LOC20);
			LA19: ;
			if (!LOC11) goto LA21;
			result = ((NU8) 8);
		}
		goto LA6;
		LA21: ;
		{
			NIM_BOOL LOC24;
			LOC24 = 0;
			LOC24 = ((*f).Kind == ((NU8) 31));
			if (!(LOC24)) goto LA25;
			LOC24 = (k >= ((NU8) 32) && k <= ((NU8) 34));
			LA25: ;
			if (!LOC24) goto LA26;
			result = ((NU8) 2);
		}
		goto LA6;
		LA26: ;
		{
			NIM_BOOL LOC29;
			LOC29 = 0;
			LOC29 = (min <= k);
			if (!(LOC29)) goto LA30;
			LOC29 = (k <= max);
			LA30: ;
			if (!LOC29) goto LA31;
			result = ((NU8) 1);
		}
		goto LA6;
		LA31: ;
		{
			NIM_BOOL LOC34;
			NIM_BOOL LOC35;
			NIM_BOOL LOC36;
			NI64 LOC39;
			tnode226816* LOC40;
			tnode226816* LOC42;
			NI64 LOC43;
			LOC34 = 0;
			LOC35 = 0;
			LOC36 = 0;
			LOC36 = ((*a).Kind == ((NU8) 20));
			if (!(LOC36)) goto LA37;
			LOC36 = ((*(*a).Sons->data[0]).Kind >= ((NU8) 31) && (*(*a).Sons->data[0]).Kind <= ((NU8) 35) || (*(*a).Sons->data[0]).Kind >= ((NU8) 41) && (*(*a).Sons->data[0]).Kind <= ((NU8) 43));
			LA37: ;
			LOC35 = LOC36;
			if (!(LOC35)) goto LA38;
			LOC39 = 0;
			LOC39 = firstord_264004(f);
			LOC40 = 0;
			LOC40 = HEX5BHEX5D_227698((*a).N, 0);
			LOC35 = (LOC39 <= (*LOC40).kindU.S1.Intval);
			LA38: ;
			LOC34 = LOC35;
			if (!(LOC34)) goto LA41;
			LOC42 = 0;
			LOC42 = HEX5BHEX5D_227698((*a).N, 1);
			LOC43 = 0;
			LOC43 = lastord_264010(f);
			LOC34 = ((*LOC42).kindU.S1.Intval <= LOC43);
			LA41: ;
			if (!LOC34) goto LA44;
			result = ((NU8) 1);
		}
		goto LA6;
		LA44: ;
		{
			result = ((NU8) 0);
		}
		LA6: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(NIM_BOOL, isfloatlit_264431)(ttype226852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC2;
	result = 0;
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = ((*t).Kind == ((NU8) 36));
	if (!(LOC2)) goto LA3;
	LOC2 = !(((*t).N == NIM_NIL));
	LA3: ;
	LOC1 = LOC2;
	if (!(LOC1)) goto LA4;
	LOC1 = ((*(*t).N).Kind == ((NU8) 16));
	LA4: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, handlefloatrange_407743)(ttype226852* f, ttype226852* a) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype226852* ab;
		NU8 k;
		ab = skiptypes_231245(a, 1048576);
		k = (*ab).Kind;
		{
			if (!(k == (*f).Kind)) goto LA8;
			result = ((NU8) 4);
		}
		goto LA6;
		LA8: ;
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = isfloatlit_264431(ab);
			if (!LOC11) goto LA12;
			result = ((NU8) 8);
		}
		goto LA6;
		LA12: ;
		{
			NIM_BOOL LOC15;
			LOC15 = 0;
			LOC15 = isintlit_264386(ab);
			if (!LOC15) goto LA16;
			result = ((NU8) 1);
		}
		goto LA6;
		LA16: ;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = (((NU8) 36) <= k);
			if (!(LOC19)) goto LA20;
			LOC19 = (k <= ((NU8) 39));
			LA20: ;
			if (!LOC19) goto LA21;
			{
				if (!((*f).Kind == ((NU8) 37))) goto LA25;
				result = ((NU8) 1);
			}
			goto LA23;
			LA25: ;
			{
				result = ((NU8) 2);
			}
			LA23: ;
		}
		goto LA6;
		LA21: ;
		{
			result = ((NU8) 0);
		}
		LA6: ;
	}
	LA1: ;
	return result;
}

static N_INLINE(NU8, allowsnil_408537)(ttype226852* f) {
	NU8 result;
	result = 0;
	{
		if (!!((((*f).Flags &(1<<((((NU8) 16))&31)))!=0))) goto LA3;
		result = ((NU8) 3);
	}
	goto LA1;
	LA3: ;
	{
		result = ((NU8) 0);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, minrel_408261)(NU8 a, NU8 b) {
	NU8 result;
	result = 0;
	{
		if (!(a <= b)) goto LA3;
		result = a;
	}
	goto LA1;
	LA3: ;
	{
		result = b;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NU8, recordrel_408281)(tcandidate406209* c, ttype226852* f, ttype226852* a) {
	NU8 result;
	result = 0;
	result = ((NU8) 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametype_269351(f, a, 0);
		if (!LOC3) goto LA4;
		result = ((NU8) 9);
	}
	goto LA1;
	LA4: ;
	{
		NI LOC7;
		NI LOC8;
		NI firstfield;
		LOC7 = 0;
		LOC7 = sonslen_227255(a);
		LOC8 = 0;
		LOC8 = sonslen_227255(f);
		if (!(LOC7 == LOC8)) goto LA9;
		result = ((NU8) 9);
		{
			if (!((*f).Kind == ((NU8) 18))) goto LA13;
			firstfield = 0;
		}
		goto LA11;
		LA13: ;
		{
			firstfield = 1;
		}
		LA11: ;
		{
			NI i_408310;
			NI HEX3Atmp_408502;
			NI LOC17;
			NI res_408505;
			i_408310 = 0;
			HEX3Atmp_408502 = 0;
			LOC17 = 0;
			LOC17 = sonslen_227255(f);
			HEX3Atmp_408502 = (NI32)(LOC17 - 1);
			res_408505 = firstfield;
			{
				while (1) {
					NU8 m;
					if (!(res_408505 <= HEX3Atmp_408502)) goto LA19;
					i_408310 = res_408505;
					m = typerel_407436(c, (*f).Sons->data[i_408310], (*a).Sons->data[i_408310], NIM_TRUE);
					{
						if (!(m < ((NU8) 3))) goto LA22;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA22: ;
					result = minrel_408261(result, m);
					res_408505 += 1;
				} LA19: ;
			}
		}
		{
			NIM_BOOL LOC26;
			LOC26 = 0;
			LOC26 = !(((*f).N == NIM_NIL));
			if (!(LOC26)) goto LA27;
			LOC26 = !(((*a).N == NIM_NIL));
			LA27: ;
			if (!LOC26) goto LA28;
			{
				NI i_408368;
				NI HEX3Atmp_408508;
				NI LOC31;
				NI res_408511;
				i_408368 = 0;
				HEX3Atmp_408508 = 0;
				LOC31 = 0;
				LOC31 = sonslen_227249((*f).N);
				HEX3Atmp_408508 = (NI32)(LOC31 - 1);
				res_408511 = 0;
				{
					while (1) {
						if (!(res_408511 <= HEX3Atmp_408508)) goto LA33;
						i_408368 = res_408511;
						{
							if (!!(((*(*(*f).N).kindU.S6.Sons->data[i_408368]).Kind == ((NU8) 3)))) goto LA36;
							internalerror_198987((*(*f).N).Info, ((NimStringDesc*) &TMP2669));
						}
						goto LA34;
						LA36: ;
						{
							if (!!(((*(*(*a).N).kindU.S6.Sons->data[i_408368]).Kind == ((NU8) 3)))) goto LA39;
							internalerror_198987((*(*a).N).Info, ((NimStringDesc*) &TMP2669));
						}
						goto LA34;
						LA39: ;
						{
							tsym226846* x;
							tsym226846* y;
							x = (*(*(*f).N).kindU.S6.Sons->data[i_408368]).kindU.S4.Sym;
							y = (*(*(*a).N).kindU.S6.Sons->data[i_408368]).kindU.S4.Sym;
							{
								NIM_BOOL LOC44;
								NU8 LOC46;
								LOC44 = 0;
								LOC44 = ((*f).Kind == ((NU8) 17));
								if (!(LOC44)) goto LA45;
								LOC46 = 0;
								LOC46 = typerel_407436(c, (*x).Typ, (*y).Typ, NIM_TRUE);
								LOC44 = (LOC46 < ((NU8) 3));
								LA45: ;
								if (!LOC44) goto LA47;
								result = ((NU8) 0);
								goto BeforeRet;
							}
							LA47: ;
							{
								NIM_BOOL LOC51;
								LOC51 = 0;
								LOC51 = !(((*(*x).Name).Sup.Id == (*(*y).Name).Sup.Id));
								if (!(LOC51)) goto LA52;
								LOC51 = !(((*f).Kind == ((NU8) 18)));
								LA52: ;
								if (!LOC51) goto LA53;
								result = ((NU8) 0);
								goto BeforeRet;
							}
							LA53: ;
						}
						LA34: ;
						res_408511 += 1;
					} LA33: ;
				}
			}
		}
		LA28: ;
	}
	goto LA1;
	LA9: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, isobjectsubtype_407802)(ttype226852* a, ttype226852* f) {
	NI result;
	ttype226852* t;
	NI depth;
	result = 0;
	t = a;
	depth = 0;
	{
		while (1) {
			NIM_BOOL LOC3;
			NIM_BOOL LOC5;
			LOC3 = 0;
			LOC3 = !((t == NIM_NIL));
			if (!(LOC3)) goto LA4;
			LOC5 = 0;
			LOC5 = sameobjecttypes_270146(f, t);
			LOC3 = !(LOC5);
			LA4: ;
			if (!LOC3) goto LA2;
			t = (*t).Sons->data[0];
			{
				if (!(t == NIM_NIL)) goto LA8;
				goto LA1;
			}
			LA8: ;
			t = skiptypes_231245(t, 2048);
			depth += 1;
		} LA2: ;
	} LA1: ;
	{
		if (!!((t == NIM_NIL))) goto LA12;
		result = depth;
	}
	LA12: ;
	return result;
}

static N_INLINE(NIM_BOOL, samedistincttypes_270219)(ttype226852* a, ttype226852* b) {
	NIM_BOOL result;
	result = 0;
	result = sameobjecttypes_270146(a, b);
	return result;
}

static N_INLINE(NIM_BOOL, inconsistentvartypes_408560)(ttype226852* f, ttype226852* a) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = !(((*f).Kind == (*a).Kind));
	if (!(LOC1)) goto LA2;
	LOC3 = 0;
	LOC3 = ((*f).Kind == ((NU8) 23));
	if (LOC3) goto LA4;
	LOC3 = ((*a).Kind == ((NU8) 23));
	LA4: ;
	LOC1 = LOC3;
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(NU8, procparamtyperel_408598)(tcandidate406209* c, ttype226852* f_408602, ttype226852* a) {
	NU8 result;
	ttype226852* f;
	result = 0;
	f = f_408602;
	{
		NIM_BOOL LOC3;
		NU8 reverserel;
		LOC3 = 0;
		LOC3 = ismetatype_227752(a);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = ismetatype_227752(f);
			if (!LOC8) goto LA9;
			f = generatetypeinstance_321503((*c).C, (*c).Bindings, (*(*c).Call).Info, f);
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = (f == NIM_NIL);
				if (LOC13) goto LA14;
				LOC13 = ismetatype_227752(f);
				LA14: ;
				if (!LOC13) goto LA15;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA15: ;
		}
		LA9: ;
		reverserel = typerel_407436(c, a, f, NIM_TRUE);
		{
			if (!(reverserel == ((NU8) 7))) goto LA19;
			result = ((NU8) 5);
			(*c).Genericmatches += 1;
		}
		LA19: ;
	}
	goto LA1;
	LA4: ;
	{
		result = typerel_407436(c, f, a, NIM_TRUE);
	}
	LA1: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = (result <= ((NU8) 3));
		if (LOC24) goto LA25;
		LOC24 = inconsistentvartypes_408560(f, a);
		LA25: ;
		if (!LOC24) goto LA26;
		result = ((NU8) 0);
	}
	LA26: ;
	{
		if (!(result == ((NU8) 9))) goto LA30;
		(*c).Exactmatches += 1;
	}
	LA30: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, proctyperel_408681)(tcandidate406209* c, ttype226852* f, ttype226852* a) {
	NU8 result;
	result = 0;
	switch ((*a).Kind) {
	case ((NU8) 25):
	{
		{
			NI LOC4;
			NI LOC5;
			LOC4 = 0;
			LOC4 = sonslen_227255(f);
			LOC5 = 0;
			LOC5 = sonslen_227255(a);
			if (!!((LOC4 == LOC5))) goto LA6;
			goto BeforeRet;
		}
		LA6: ;
		result = ((NU8) 9);
		{
			NI i_408716;
			NI HEX3Atmp_409015;
			NI LOC9;
			NI res_409018;
			i_408716 = 0;
			HEX3Atmp_409015 = 0;
			LOC9 = 0;
			LOC9 = sonslen_227255(f);
			HEX3Atmp_409015 = (LOC9 - 1);
			res_409018 = 1;
			{
				while (1) {
					NU8 LOC12;
					if (!(res_409018 <= HEX3Atmp_409015)) goto LA11;
					i_408716 = res_409018;
					LOC12 = 0;
					LOC12 = procparamtyperel_408598(c, (*f).Sons->data[i_408716], (*a).Sons->data[i_408716]);
					result = minrel_408261(result, LOC12);
					{
						if (!(result == ((NU8) 0))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_409018 += 1;
				} LA11: ;
			}
		}
		{
			if (!!(((*f).Sons->data[0] == NIM_NIL))) goto LA19;
			{
				NU8 LOC25;
				if (!!(((*a).Sons->data[0] == NIM_NIL))) goto LA23;
				LOC25 = 0;
				LOC25 = procparamtyperel_408598(c, (*f).Sons->data[0], (*a).Sons->data[0]);
				result = minrel_408261(result, LOC25);
				{
					if (!(result == ((NU8) 0))) goto LA28;
					goto BeforeRet;
				}
				LA28: ;
			}
			goto LA21;
			LA23: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA21: ;
		}
		goto LA17;
		LA19: ;
		{
			if (!!(((*a).Sons->data[0] == NIM_NIL))) goto LA32;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA17;
		LA32: ;
		LA17: ;
		{
			NIM_BOOL LOC36;
			LOC36 = 0;
			LOC36 = (((*f).Flags &(1<<((((NU8) 1))&31)))!=0);
			if (!(LOC36)) goto LA37;
			LOC36 = !((((*a).Flags &(1<<((((NU8) 1))&31)))!=0));
			LA37: ;
			if (!LOC36) goto LA38;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA34;
		LA38: ;
		{
			NIM_BOOL LOC41;
			LOC41 = 0;
			LOC41 = (((*f).Flags &(1<<((((NU8) 7))&31)))!=0);
			if (!(LOC41)) goto LA42;
			LOC41 = (((*a).Flags & 130) == 0);
			LA42: ;
			if (!LOC41) goto LA43;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA34;
		LA43: ;
		{
			if (!!((((*f).Flags & 16384) == ((*a).Flags & 16384)))) goto LA46;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA34;
		LA46: ;
		{
			if (!!(((*f).Callconv == (*a).Callconv))) goto LA49;
			{
				NIM_BOOL LOC53;
				LOC53 = 0;
				LOC53 = ((*f).Callconv == ((NU8) 8));
				if (!(LOC53)) goto LA54;
				LOC53 = ((*a).Callconv == ((NU8) 0));
				LA54: ;
				if (!LOC53) goto LA55;
				{
					if (!!((result == ((NU8) 5)))) goto LA59;
					result = ((NU8) 1);
				}
				goto LA57;
				LA59: ;
				{
					result = ((NU8) 6);
				}
				LA57: ;
			}
			goto LA51;
			LA55: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA51: ;
		}
		goto LA34;
		LA49: ;
		LA34: ;
		{
			NIM_BOOL LOC65;
			LOC65 = 0;
			LOC65 = compatibleeffects_274131(f, a);
			if (!!(LOC65)) goto LA66;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		LA66: ;
	}
	break;
	case ((NU8) 5):
	{
		result = allowsnil_408537(f);
	}
	break;
	case ((NU8) 49):
	{
		{
			ttype226852* LOC74;
			ttype226852* LOC75;
			if (!(((*f).Flags &(1<<((((NU8) 14))&31)))!=0)) goto LA72;
			LOC74 = 0;
			LOC74 = base_264038(f);
			LOC75 = 0;
			LOC75 = base_264038(a);
			result = typerel_407436(c, LOC74, LOC75, NIM_TRUE);
		}
		LA72: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(ttype226852*, concretetype_407446)(tcandidate406209* c, ttype226852* t) {
	ttype226852* result;
	result = 0;
	switch ((*t).Kind) {
	case ((NU8) 4):
	{
		result = newtype_227083(((NU8) 16), (*t).Owner);
		addsonskipintlit_283572(result, (*t).Sons->data[0]);
		addsonskipintlit_283572(result, (*t).Sons->data[1]);
	}
	break;
	case ((NU8) 5):
	{
		result = NIM_NIL;
	}
	break;
	case ((NU8) 24):
	case ((NU8) 19):
	{
		{
			if (!((*(*t).Sons->data[0]).Kind == ((NU8) 3))) goto LA6;
			result = NIM_NIL;
		}
		goto LA4;
		LA6: ;
		{
			result = t;
		}
		LA4: ;
	}
	break;
	case ((NU8) 12):
	case ((NU8) 58):
	{
		result = t;
		{
			while (1) {
				tidobj201015* LOC12;
				TNimObject* LOC13;
				LOC12 = 0;
				LOC12 = &t->Sup;
				LOC13 = 0;
				LOC13 = idtableget_236182((*c).Bindings, LOC12);
				result = ((ttype226852*) (LOC13));
				{
					if (!(result == NIM_NIL)) goto LA16;
					goto LA10;
				}
				LA16: ;
				{
					if (!!(((*result).Kind == ((NU8) 12)))) goto LA20;
					goto LA10;
				}
				LA20: ;
			}
		} LA10: ;
	}
	break;
	case ((NU8) 9):
	{
		NimStringDesc* LOC23;
		NimStringDesc* LOC24;
		LOC23 = 0;
		LOC24 = 0;
		LOC24 = typetostring_264031(t, ((NU8) 0));
		LOC23 = rawNewString(LOC24->Sup.len + 21);
appendString(LOC23, ((NimStringDesc*) &TMP2685));
appendString(LOC23, LOC24);
		internalerror_199006(LOC23);
		result = t;
	}
	break;
	default:
	{
		result = t;
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, matchusertypeclass_409050)(tcontext291021* c, tcandidate406209* m, ttype226852* ff, ttype226852* a) {
	NU8 volatile result;
	ttype226852* body;
	tscope226840* LOC1;
	TSafePoint TMP2686;
	result = 0;
	body = skiptypes_231245(ff, IL64(9007199254740992));
	LOC1 = 0;
	LOC1 = openscope_296191(c);
	(*c).Intypeclass += 1;
	pushSafePoint(&TMP2686);
	TMP2686.status = setjmp(TMP2686.context);
	if (TMP2686.status == 0) {
		tnode226816* checkedbody;
		tnode226816* LOC32;
		tnode226816* LOC33;
		{
			if (!((*ff).Kind == ((NU8) 53))) goto LA5;
			{
				NI i_409102;
				NI HEX3Atmp_409208;
				NI LOC8;
				NI res_409211;
				i_409102 = 0;
				HEX3Atmp_409208 = 0;
				LOC8 = 0;
				LOC8 = len_231005(ff);
				HEX3Atmp_409208 = ((NI32)(LOC8 - 1) - 1);
				res_409211 = 1;
				{
					while (1) {
						tident201021* typeparamname;
						ttype226852* LOC11;
						ttype226852* typ;
						tsym226846* param;
						if (!(res_409211 <= HEX3Atmp_409208)) goto LA10;
						i_409102 = res_409211;
						LOC11 = 0;
						LOC11 = base_264038(ff);
						typeparamname = (*(*(*LOC11).Sons->data[(NI32)(i_409102 - 1)]).Sym).Name;
						typ = (*ff).Sons->data[i_409102];
						param = newsym_227074(((NU8) 7), typeparamname, (*body).Sym, (*(*body).Sym).Info);
						asgnRefNoCycle((void**) (&(*param).Typ), maketypedesc_291763(c, typ));
						adddecl_296694(c, param);
						res_409211 += 1;
					} LA10: ;
				}
			}
		}
		LA5: ;
		{
			tnode226816* param_409106;
			tnode226816* HEX3Atmp_409216;
			param_409106 = 0;
			HEX3Atmp_409216 = 0;
			HEX3Atmp_409216 = HEX5BHEX5D_227698((*body).N, 0);
			{
				NI i_409220;
				NI HEX3Atmp_409222;
				NI LOC14;
				NI res_409224;
				i_409220 = 0;
				HEX3Atmp_409222 = 0;
				LOC14 = 0;
				LOC14 = len_227364(HEX3Atmp_409216);
				HEX3Atmp_409222 = (LOC14 - 1);
				res_409224 = 0;
				{
					while (1) {
						tnode226816* volatile dummyname;
						ttype226852* volatile dummytype;
						tsym226846* dummyparam;
						if (!(res_409224 <= HEX3Atmp_409222)) goto LA16;
						i_409220 = res_409224;
						param_409106 = (*HEX3Atmp_409216).kindU.S6.Sons->data[i_409220];
						dummyname = 0;
						dummytype = 0;
						{
							if (!((*param_409106).Kind == ((NU8) 142))) goto LA19;
							dummyname = HEX5BHEX5D_227698(param_409106, 0);
							{
								if (!!(((*a).Kind == ((NU8) 23)))) goto LA23;
								dummytype = makevartype_291207(c, a);
							}
							goto LA21;
							LA23: ;
							{
								dummytype = a;
							}
							LA21: ;
						}
						goto LA17;
						LA19: ;
						{
							dummyname = param_409106;
							dummytype = a;
						}
						LA17: ;
						{
							NimStringDesc* LOC31;
							if (!!(((*dummyname).Kind == ((NU8) 2)))) goto LA29;
							LOC31 = 0;
							LOC31 = HEX24_199126(TMP2688);
							internalerror_199006(LOC31);
						}
						LA29: ;
						dummyparam = newsym_227074(((NU8) 7), (*dummyname).kindU.S5.Ident, (*body).Sym, (*(*body).Sym).Info);
						asgnRefNoCycle((void**) (&(*dummyparam).Typ), dummytype);
						adddecl_296694(c, dummyparam);
						res_409224 += 1;
					} LA16: ;
				}
			}
		}
		LOC32 = 0;
		LOC32 = HEX5BHEX5D_227698((*body).N, 3);
		LOC33 = 0;
		LOC33 = copytree_227329(LOC32);
		checkedbody = (*c).Semtryexpr(c, LOC33, 0);
		clearbufferedmsgs_197449();
		{
			if (!(checkedbody == NIM_NIL)) goto LA36;
			result = ((NU8) 0);
			popSafePoint();
			(*c).Intypeclass -= 1;
			closescope_296211(c);
			goto BeforeRet;
		}
		LA36: ;
		{
			if (!((*checkedbody).Kind == ((NU8) 115))) goto LA40;
			{
				tnode226816* stmt_409194;
				stmt_409194 = 0;
				{
					NI i_409229;
					NI HEX3Atmp_409231;
					NI LOC44;
					NI res_409233;
					i_409229 = 0;
					HEX3Atmp_409231 = 0;
					LOC44 = 0;
					LOC44 = len_227364(checkedbody);
					HEX3Atmp_409231 = (LOC44 - 1);
					res_409233 = 0;
					{
						while (1) {
							if (!(res_409233 <= HEX3Atmp_409231)) goto LA46;
							i_409229 = res_409233;
							stmt_409194 = (*checkedbody).kindU.S6.Sons->data[i_409229];
							switch ((*stmt_409194).Kind) {
							case ((NU8) 109):
							{
							}
							break;
							case ((NU8) 98):
							{
							}
							break;
							case ((NU8) 102):
							{
							}
							break;
							default:
							{
							}
							break;
							}
							res_409233 += 1;
						} LA46: ;
					}
				}
			}
		}
		LA40: ;
		result = ((NU8) 7);
		popSafePoint();
		(*c).Intypeclass -= 1;
		closescope_296211(c);
		goto BeforeRet;
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		(*c).Intypeclass -= 1;
		closescope_296211(c);
	}
	if (TMP2686.status != 0) reraiseException();
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, typerel_407436)(tcandidate406209* c, ttype226852* f, ttype226852* aorig, NIM_BOOL dobind) {
	NU8 result;
	ttype226852* a;
	ttype226852* LOC5;
	result = 0;
	result = ((NU8) 0);
	{
		if (!((*f).Kind == ((NU8) 6))) goto LA3;
		put_406283((&(*c).Bindings), f, aorig);
		result = ((NU8) 7);
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = skiptypes_231245(aorig, IL64(576460752311812096));
	a = maybeskipdistinct_409369(LOC5, (*c).Calleesym);
	{
		NIM_BOOL LOC8;
		ttype226852* LOC10;
		ttype226852* LOC13;
		LOC8 = 0;
		LOC8 = ((*a).Kind == ((NU8) 11));
		if (!(LOC8)) goto LA9;
		LOC10 = 0;
		LOC10 = skiptypes_231245(f, 8388608);
		LOC8 = !(((*LOC10).Kind >= ((NU8) 9) && (*LOC10).Kind <= ((NU8) 12) || (*LOC10).Kind >= ((NU8) 51) && (*LOC10).Kind <= ((NU8) 58)));
		LA9: ;
		if (!LOC8) goto LA11;
		LOC13 = 0;
		LOC13 = lastson_227267(a);
		result = typerel_407436(c, f, LOC13, NIM_TRUE);
		goto BeforeRet;
	}
	LA11: ;
	switch ((*a).Kind) {
	case ((NU8) 56):
	{
		{
			ttype226852* branch_409871;
			ttypeseq226848* HEX3Atmp_412148;
			NI i_412151;
			NI l_412153;
			branch_409871 = 0;
			HEX3Atmp_412148 = 0;
			HEX3Atmp_412148 = (*a).Sons;
			i_412151 = 0;
			l_412153 = HEX3Atmp_412148->Sup.len;
			{
				while (1) {
					if (!(i_412151 < l_412153)) goto LA17;
					branch_409871 = HEX3Atmp_412148->data[i_412151];
					{
						NU8 LOC20;
						LOC20 = 0;
						LOC20 = typerel_407436(c, f, branch_409871, NIM_FALSE);
						if (!(LOC20 == ((NU8) 0))) goto LA21;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA21: ;
					i_412151 += 1;
				} LA17: ;
			}
		}
		result = ((NU8) 7);
		goto BeforeRet;
	}
	break;
	case ((NU8) 55):
	{
		{
			ttype226852* branch_409893;
			ttypeseq226848* HEX3Atmp_412155;
			NI i_412158;
			NI l_412160;
			branch_409893 = 0;
			HEX3Atmp_412155 = 0;
			HEX3Atmp_412155 = (*a).Sons;
			i_412158 = 0;
			l_412160 = HEX3Atmp_412155->Sup.len;
			{
				while (1) {
					if (!(i_412158 < l_412160)) goto LA26;
					branch_409893 = HEX3Atmp_412155->data[i_412158];
					{
						NU8 LOC29;
						LOC29 = 0;
						LOC29 = typerel_407436(c, f, branch_409893, NIM_FALSE);
						if (!!((LOC29 == ((NU8) 0)))) goto LA30;
						result = ((NU8) 7);
						goto BeforeRet;
					}
					LA30: ;
					i_412158 += 1;
				} LA26: ;
			}
		}
		result = ((NU8) 0);
		goto BeforeRet;
	}
	break;
	case ((NU8) 57):
	{
		switch ((*f).Kind) {
		case ((NU8) 57):
		{
			ttype226852* LOC34;
			ttype226852* LOC35;
			LOC34 = 0;
			LOC34 = lastson_227267(a);
			LOC35 = 0;
			LOC35 = lastson_227267(f);
			result = typerel_407436(c, LOC34, LOC35, NIM_TRUE);
			goto BeforeRet;
		}
		break;
		default:
		{
			{
				if (!((*f).Kind == ((NU8) 58))) goto LA39;
				result = ((NU8) 7);
			}
			goto LA37;
			LA39: ;
			{
				result = ((NU8) 0);
			}
			LA37: ;
			goto BeforeRet;
		}
		break;
		}
	}
	break;
	case ((NU8) 58):
	{
		{
			if (!((*f).Kind == ((NU8) 58))) goto LA45;
			result = ((NU8) 7);
		}
		goto LA43;
		LA45: ;
		{
			result = ((NU8) 0);
		}
		LA43: ;
		goto BeforeRet;
	}
	break;
	default:
	{
	}
	break;
	}
	switch ((*f).Kind) {
	case ((NU8) 14):
	{
		{
			NIM_BOOL LOC52;
			LOC52 = 0;
			LOC52 = ((*a).Kind == (*f).Kind);
			if (!(LOC52)) goto LA53;
			LOC52 = sameenumtypes_270230(f, a);
			LA53: ;
			if (!LOC52) goto LA54;
			result = ((NU8) 9);
		}
		goto LA50;
		LA54: ;
		{
			ttype226852* LOC57;
			NIM_BOOL LOC58;
			LOC57 = 0;
			LOC57 = skiptypes_231245(a, 1048576);
			LOC58 = 0;
			LOC58 = sameenumtypes_270230(f, LOC57);
			if (!LOC58) goto LA59;
			result = ((NU8) 3);
		}
		goto LA50;
		LA59: ;
		LA50: ;
	}
	break;
	case ((NU8) 1):
	case ((NU8) 2):
	{
		{
			if (!((*a).Kind == (*f).Kind)) goto LA64;
			result = ((NU8) 9);
		}
		goto LA62;
		LA64: ;
		{
			ttype226852* LOC67;
			LOC67 = 0;
			LOC67 = skiptypes_231245(a, 1048576);
			if (!((*LOC67).Kind == (*f).Kind)) goto LA68;
			result = ((NU8) 3);
		}
		goto LA62;
		LA68: ;
		LA62: ;
	}
	break;
	case ((NU8) 20):
	{
		{
			ttype226852* LOC75;
			ttype226852* LOC76;
			if (!((*a).Kind == (*f).Kind)) goto LA73;
			LOC75 = 0;
			LOC75 = base_264038(f);
			LOC76 = 0;
			LOC76 = base_264038(a);
			result = typerel_407436(c, LOC75, LOC76, NIM_TRUE);
			{
				if (!!(((129 &(1<<((result)&15)))!=0))) goto LA79;
				result = typerangerel_409035(f, a);
			}
			LA79: ;
		}
		goto LA71;
		LA73: ;
		{
			{
				ttype226852* LOC84;
				LOC84 = 0;
				LOC84 = skiptypes_231245(f, 1048576);
				if (!((*LOC84).Kind == (*a).Kind)) goto LA85;
				result = ((NU8) 2);
			}
			goto LA82;
			LA85: ;
			{
				ttype226852* LOC88;
				NIM_BOOL LOC89;
				LOC88 = 0;
				LOC88 = skiptypes_231245(f, 1048576);
				LOC89 = 0;
				LOC89 = isconvertibletorange_407676(LOC88, a);
				if (!LOC89) goto LA90;
				result = ((NU8) 1);
			}
			goto LA82;
			LA90: ;
			LA82: ;
		}
		LA71: ;
	}
	break;
	case ((NU8) 31):
	{
		result = handlerange_407499(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 32):
	{
		result = handlerange_407499(f, a, ((NU8) 32), ((NU8) 32));
	}
	break;
	case ((NU8) 33):
	{
		result = handlerange_407499(f, a, ((NU8) 32), ((NU8) 33));
	}
	break;
	case ((NU8) 34):
	{
		result = handlerange_407499(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 35):
	{
		result = handlerange_407499(f, a, ((NU8) 31), ((NU8) 35));
	}
	break;
	case ((NU8) 40):
	{
		result = handlerange_407499(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 41):
	{
		result = handlerange_407499(f, a, ((NU8) 41), ((NU8) 41));
	}
	break;
	case ((NU8) 42):
	{
		result = handlerange_407499(f, a, ((NU8) 41), ((NU8) 42));
	}
	break;
	case ((NU8) 43):
	{
		result = handlerange_407499(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 44):
	{
		result = handlerange_407499(f, a, ((NU8) 40), ((NU8) 44));
	}
	break;
	case ((NU8) 36):
	{
		result = handlefloatrange_407743(f, a);
	}
	break;
	case ((NU8) 37):
	{
		result = handlefloatrange_407743(f, a);
	}
	break;
	case ((NU8) 38):
	{
		result = handlefloatrange_407743(f, a);
	}
	break;
	case ((NU8) 39):
	{
		result = handlefloatrange_407743(f, a);
	}
	break;
	case ((NU8) 23):
	{
		{
			ttype226852* LOC111;
			ttype226852* LOC112;
			if (!((*aorig).Kind == ((NU8) 23))) goto LA109;
			LOC111 = 0;
			LOC111 = base_264038(f);
			LOC112 = 0;
			LOC112 = base_264038(aorig);
			result = typerel_407436(c, LOC111, LOC112, NIM_TRUE);
		}
		goto LA107;
		LA109: ;
		{
			ttype226852* LOC114;
			LOC114 = 0;
			LOC114 = base_264038(f);
			result = typerel_407436(c, LOC114, aorig, NIM_TRUE);
		}
		LA107: ;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		switch ((*a).Kind) {
		case ((NU8) 16):
		case ((NU8) 4):
		{
			ttype226852* frange;
			frange = (*f).Sons->data[0];
			{
				ttype226852* prev;
				tidobj201015* LOC121;
				TNimObject* LOC122;
				if (!((*frange).Kind == ((NU8) 12))) goto LA119;
				LOC121 = 0;
				LOC121 = &frange->Sup;
				LOC122 = 0;
				LOC122 = idtableget_236182((*c).Bindings, LOC121);
				prev = ((ttype226852*) (LOC122));
				{
					if (!(prev == NIM_NIL)) goto LA125;
					put_406283((&(*c).Bindings), frange, (*a).Sons->data[0]);
					frange = a;
				}
				goto LA123;
				LA125: ;
				{
					frange = prev;
				}
				LA123: ;
			}
			LA119: ;
			result = typerel_407436(c, (*f).Sons->data[1], (*a).Sons->data[1], NIM_TRUE);
			{
				if (!(result < ((NU8) 7))) goto LA130;
				result = ((NU8) 0);
			}
			goto LA128;
			LA130: ;
			{
				NIM_BOOL LOC133;
				tnode226816* LOC135;
				ttype226852* rangestatict;
				tnode226816* LOC138;
				tnode226816* LOC139;
				tnode226816* LOC140;
				ttype226852* replacementt;
				ttypeseq226848* LOC141;
				TY412748 LOC142;
				NI64 inputupperbound;
				tnode226816* LOC143;
				LOC133 = 0;
				LOC133 = (((*frange).Flags &(1<<((((NU8) 9))&31)))!=0);
				if (!(LOC133)) goto LA134;
				LOC135 = 0;
				LOC135 = HEX5BHEX5D_227698((*frange).N, 1);
				LOC133 = ((*LOC135).Kind == ((NU8) 62));
				LA134: ;
				if (!LOC133) goto LA136;
				LOC138 = 0;
				LOC138 = HEX5BHEX5D_227698((*frange).N, 1);
				LOC139 = 0;
				LOC139 = HEX5BHEX5D_227698(LOC138, 0);
				LOC140 = 0;
				LOC140 = HEX5BHEX5D_227698(LOC139, 1);
				rangestatict = (*LOC140).Typ;
				LOC141 = 0;
				LOC141 = (ttypeseq226848*) newSeq((&NTI226848), 1);
				memset((void*)LOC142, 0, sizeof(LOC142));
				LOC142[0] = getsystype_283030(((NU8) 31));
				asgnRefNoCycle((void**) (&LOC141->data[0]), LOC142[0]);
				replacementt = newtypewithsons_291823((*c).C, ((NU8) 59), LOC141);
				LOC143 = 0;
				LOC143 = HEX5BHEX5D_227698((*(*a).Sons->data[0]).N, 1);
				inputupperbound = (*LOC143).kindU.S1.Intval;
				asgnRefNoCycle((void**) (&(*replacementt).N), newintnode_227096(((NU8) 6), (NI64)(inputupperbound + IL64(1))));
				put_406283((&(*c).Bindings), rangestatict, replacementt);
				result = ((NU8) 7);
			}
			goto LA128;
			LA136: ;
			{
				NI64 LOC145;
				NI64 LOC146;
				LOC145 = 0;
				LOC145 = lengthord_264016(frange);
				LOC146 = 0;
				LOC146 = lengthord_264016(a);
				if (!!((LOC145 == LOC146))) goto LA147;
				result = ((NU8) 0);
			}
			goto LA128;
			LA147: ;
			LA128: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 27):
	case ((NU8) 48):
	{
		{
			NIM_BOOL LOC153;
			LOC153 = 0;
			LOC153 = ((*f).Kind == ((NU8) 48));
			if (!(LOC153)) goto LA154;
			LOC153 = ((*(*f).Sons->data[0]).Kind == ((NU8) 6));
			LA154: ;
			if (!LOC153) goto LA155;
			goto BeforeRet;
		}
		LA155: ;
		switch ((*a).Kind) {
		case ((NU8) 27):
		case ((NU8) 48):
		{
			ttype226852* LOC158;
			ttype226852* LOC159;
			LOC158 = 0;
			LOC158 = base_264038(f);
			LOC159 = 0;
			LOC159 = base_264038(a);
			result = typerel_407436(c, LOC158, LOC159, NIM_TRUE);
			{
				if (!(result < ((NU8) 7))) goto LA162;
				result = ((NU8) 0);
			}
			LA162: ;
		}
		break;
		case ((NU8) 4):
		{
			{
				NIM_BOOL LOC167;
				LOC167 = 0;
				LOC167 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC167)) goto LA168;
				LOC167 = ((*(*a).Sons->data[1]).Kind == ((NU8) 3));
				LA168: ;
				if (!LOC167) goto LA169;
				result = ((NU8) 3);
			}
			goto LA165;
			LA169: ;
			{
				ttype226852* LOC172;
				NU8 LOC173;
				LOC172 = 0;
				LOC172 = base_264038(f);
				LOC173 = 0;
				LOC173 = typerel_407436(c, LOC172, (*a).Sons->data[1], NIM_TRUE);
				if (!(((NU8) 7) <= LOC173)) goto LA174;
				result = ((NU8) 3);
			}
			goto LA165;
			LA174: ;
			LA165: ;
		}
		break;
		case ((NU8) 16):
		{
			{
				NIM_BOOL LOC179;
				LOC179 = 0;
				LOC179 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC179)) goto LA180;
				LOC179 = ((*(*a).Sons->data[1]).Kind == ((NU8) 3));
				LA180: ;
				if (!LOC179) goto LA181;
				result = ((NU8) 3);
			}
			goto LA177;
			LA181: ;
			{
				ttype226852* LOC184;
				NU8 LOC185;
				LOC184 = 0;
				LOC184 = base_264038(f);
				LOC185 = 0;
				LOC185 = typerel_407436(c, LOC184, (*a).Sons->data[1], NIM_TRUE);
				if (!(((NU8) 7) <= LOC185)) goto LA186;
				result = ((NU8) 1);
			}
			goto LA177;
			LA186: ;
			LA177: ;
		}
		break;
		case ((NU8) 24):
		{
			{
				NIM_BOOL LOC191;
				LOC191 = 0;
				LOC191 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC191)) goto LA192;
				LOC191 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA192: ;
				if (!LOC191) goto LA193;
				result = ((NU8) 1);
			}
			goto LA189;
			LA193: ;
			{
				ttype226852* LOC196;
				NU8 LOC197;
				LOC196 = 0;
				LOC196 = base_264038(f);
				LOC197 = 0;
				LOC197 = typerel_407436(c, LOC196, (*a).Sons->data[0], NIM_TRUE);
				if (!(((NU8) 7) <= LOC197)) goto LA198;
				result = ((NU8) 1);
			}
			goto LA189;
			LA198: ;
			LA189: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 24):
	{
		switch ((*a).Kind) {
		case ((NU8) 24):
		{
			{
				NIM_BOOL LOC205;
				LOC205 = 0;
				LOC205 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC205)) goto LA206;
				LOC205 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA206: ;
				if (!LOC205) goto LA207;
				result = ((NU8) 3);
			}
			goto LA203;
			LA207: ;
			{
				result = typerel_407436(c, (*f).Sons->data[0], (*a).Sons->data[0], NIM_TRUE);
				{
					if (!(result < ((NU8) 7))) goto LA212;
					result = ((NU8) 0);
				}
				goto LA210;
				LA212: ;
				{
					NIM_BOOL LOC215;
					LOC215 = 0;
					LOC215 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
					if (!(LOC215)) goto LA216;
					LOC215 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
					LA216: ;
					if (!LOC215) goto LA217;
					result = ((NU8) 1);
				}
				goto LA210;
				LA217: ;
				LA210: ;
			}
			LA203: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_408537(f);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 15):
	{
		{
			NIM_BOOL LOC224;
			ttype226852* x;
			LOC224 = 0;
			LOC224 = isordinaltype_264092(a);
			if (!LOC224) goto LA225;
			{
				if (!((*a).Kind == ((NU8) 15))) goto LA229;
				x = (*a).Sons->data[0];
			}
			goto LA227;
			LA229: ;
			{
				x = a;
			}
			LA227: ;
			{
				if (!((*(*f).Sons->data[0]).Kind == ((NU8) 0))) goto LA234;
				result = ((NU8) 7);
			}
			goto LA232;
			LA234: ;
			{
				result = typerel_407436(c, (*f).Sons->data[0], x, NIM_TRUE);
				{
					if (!(result < ((NU8) 7))) goto LA239;
					result = ((NU8) 0);
				}
				LA239: ;
			}
			LA232: ;
		}
		goto LA222;
		LA225: ;
		{
			if (!((*a).Kind == ((NU8) 12))) goto LA242;
			result = ((NU8) 7);
		}
		goto LA222;
		LA242: ;
		LA222: ;
	}
	break;
	case ((NU8) 30):
	{
		internalerror_199006(((NimStringDesc*) &TMP2665));
	}
	break;
	case ((NU8) 5):
	{
		{
			if (!((*a).Kind == (*f).Kind)) goto LA248;
			result = ((NU8) 9);
		}
		LA248: ;
	}
	break;
	case ((NU8) 18):
	{
		{
			if (!((*a).Kind == ((NU8) 18))) goto LA253;
			result = recordrel_408281(c, f, a);
		}
		LA253: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			if (!((*a).Kind == ((NU8) 17))) goto LA258;
			{
				NIM_BOOL LOC262;
				LOC262 = 0;
				LOC262 = sameobjecttypes_270146(f, a);
				if (!LOC262) goto LA263;
				result = ((NU8) 9);
			}
			goto LA260;
			LA263: ;
			{
				NI depth;
				depth = isobjectsubtype_407802(a, f);
				{
					if (!(0 < depth)) goto LA268;
					(*c).Inheritancepenalty += depth;
					result = ((NU8) 3);
				}
				LA268: ;
			}
			LA260: ;
		}
		LA258: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			NIM_BOOL LOC273;
			LOC273 = 0;
			LOC273 = ((*a).Kind == ((NU8) 13));
			if (!(LOC273)) goto LA274;
			LOC273 = samedistincttypes_270219(f, a);
			LA274: ;
			if (!LOC273) goto LA275;
			result = ((NU8) 9);
		}
		goto LA271;
		LA275: ;
		{
			ttype226852* LOC280;
			if (!(*c).Coercedistincts) goto LA278;
			LOC280 = 0;
			LOC280 = base_264038(f);
			result = typerel_407436(c, LOC280, a, NIM_TRUE);
		}
		goto LA271;
		LA278: ;
		LA271: ;
	}
	break;
	case ((NU8) 19):
	{
		{
			if (!((*a).Kind == ((NU8) 19))) goto LA284;
			{
				NIM_BOOL LOC288;
				LOC288 = 0;
				LOC288 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC288)) goto LA289;
				LOC288 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA289: ;
				if (!LOC288) goto LA290;
				result = ((NU8) 3);
			}
			goto LA286;
			LA290: ;
			{
				result = typerel_407436(c, (*f).Sons->data[0], (*a).Sons->data[0], NIM_TRUE);
				{
					if (!(result <= ((NU8) 1))) goto LA295;
					result = ((NU8) 0);
				}
				LA295: ;
			}
			LA286: ;
		}
		LA284: ;
	}
	break;
	case ((NU8) 21):
	case ((NU8) 22):
	{
		{
			ttype226852* LOC317;
			ttype226852* LOC318;
			if (!((*a).Kind == (*f).Kind)) goto LA300;
			{
				NI LOC304;
				NI LOC305;
				LOC304 = 0;
				LOC304 = len_231005(a);
				LOC305 = 0;
				LOC305 = len_231005(f);
				if (!(LOC304 < LOC305)) goto LA306;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA306: ;
			{
				NI i_410397;
				NI HEX3Atmp_412162;
				NI LOC309;
				NI res_412165;
				i_410397 = 0;
				HEX3Atmp_412162 = 0;
				LOC309 = 0;
				LOC309 = len_231005(f);
				HEX3Atmp_412162 = (NI32)(LOC309 - 2);
				res_412165 = 0;
				{
					while (1) {
						if (!(res_412165 <= HEX3Atmp_412162)) goto LA311;
						i_410397 = res_412165;
						{
							NU8 LOC314;
							LOC314 = 0;
							LOC314 = typerel_407436(c, (*f).Sons->data[i_410397], (*a).Sons->data[i_410397], NIM_TRUE);
							if (!(LOC314 == ((NU8) 0))) goto LA315;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA315: ;
						res_412165 += 1;
					} LA311: ;
				}
			}
			LOC317 = 0;
			LOC317 = lastson_227267(f);
			LOC318 = 0;
			LOC318 = lastson_227267(a);
			result = typerel_407436(c, LOC317, LOC318, NIM_TRUE);
			{
				if (!(result <= ((NU8) 1))) goto LA321;
				result = ((NU8) 0);
			}
			goto LA319;
			LA321: ;
			{
				NIM_BOOL LOC324;
				LOC324 = 0;
				LOC324 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC324)) goto LA325;
				LOC324 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA325: ;
				if (!LOC324) goto LA326;
				result = ((NU8) 1);
			}
			goto LA319;
			LA326: ;
			LA319: ;
		}
		goto LA298;
		LA300: ;
		{
			if (!((*a).Kind == ((NU8) 5))) goto LA329;
			result = allowsnil_408537(f);
		}
		goto LA298;
		LA329: ;
		{
		}
		LA298: ;
	}
	break;
	case ((NU8) 25):
	{
		result = proctyperel_408681(c, f, a);
		{
			NIM_BOOL LOC335;
			NIM_BOOL LOC336;
			LOC335 = 0;
			LOC336 = 0;
			LOC336 = !((result == ((NU8) 0)));
			if (!(LOC336)) goto LA337;
			LOC336 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
			LA337: ;
			LOC335 = LOC336;
			if (!(LOC335)) goto LA338;
			LOC335 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
			LA338: ;
			if (!LOC335) goto LA339;
			result = ((NU8) 1);
		}
		LA339: ;
	}
	break;
	case ((NU8) 26):
	{
		switch ((*a).Kind) {
		case ((NU8) 26):
		{
			{
				NIM_BOOL LOC345;
				LOC345 = 0;
				LOC345 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC345)) goto LA346;
				LOC345 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA346: ;
				if (!LOC345) goto LA347;
				result = ((NU8) 1);
			}
			goto LA343;
			LA347: ;
			{
				result = ((NU8) 9);
			}
			LA343: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_408537(f);
		}
		break;
		case ((NU8) 25):
		{
			{
				if (!!(((*a).Callconv == ((NU8) 8)))) goto LA354;
				result = ((NU8) 1);
			}
			LA354: ;
		}
		break;
		case ((NU8) 21):
		{
			{
				NI LOC359;
				LOC359 = 0;
				LOC359 = len_231005(a);
				if (!(LOC359 == 1)) goto LA360;
				result = ((NU8) 1);
			}
			LA360: ;
		}
		break;
		case ((NU8) 29):
		{
			result = ((NU8) 1);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 28):
	{
		switch ((*a).Kind) {
		case ((NU8) 28):
		{
			{
				NIM_BOOL LOC368;
				LOC368 = 0;
				LOC368 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC368)) goto LA369;
				LOC368 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA369: ;
				if (!LOC368) goto LA370;
				result = ((NU8) 1);
			}
			goto LA366;
			LA370: ;
			{
				result = ((NU8) 9);
			}
			LA366: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_408537(f);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 29):
	{
		switch ((*a).Kind) {
		case ((NU8) 29):
		{
			{
				NIM_BOOL LOC379;
				LOC379 = 0;
				LOC379 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC379)) goto LA380;
				LOC379 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA380: ;
				if (!LOC379) goto LA381;
				result = ((NU8) 1);
			}
			goto LA377;
			LA381: ;
			{
				result = ((NU8) 9);
			}
			LA377: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_408537(f);
		}
		break;
		case ((NU8) 28):
		{
			result = ((NU8) 1);
		}
		break;
		case ((NU8) 21):
		{
			{
				NIM_BOOL LOC389;
				NI LOC390;
				LOC389 = 0;
				LOC390 = 0;
				LOC390 = len_231005(a);
				LOC389 = (LOC390 == 1);
				if (!(LOC389)) goto LA391;
				LOC389 = ((*(*a).Sons->data[0]).Kind == ((NU8) 2));
				LA391: ;
				if (!LOC389) goto LA392;
				result = ((NU8) 1);
			}
			LA392: ;
		}
		break;
		case ((NU8) 16):
		{
			{
				NIM_BOOL LOC397;
				NIM_BOOL LOC398;
				NI64 LOC399;
				ttype226852* LOC401;
				LOC397 = 0;
				LOC398 = 0;
				LOC399 = 0;
				LOC399 = firstord_264004((*a).Sons->data[0]);
				LOC398 = (LOC399 == IL64(0));
				if (!(LOC398)) goto LA400;
				LOC401 = 0;
				LOC401 = skiptypes_231245((*a).Sons->data[0], 1048576);
				LOC398 = ((*LOC401).Kind >= ((NU8) 31) && (*LOC401).Kind <= ((NU8) 35));
				LA400: ;
				LOC397 = LOC398;
				if (!(LOC397)) goto LA402;
				LOC397 = ((*(*a).Sons->data[1]).Kind == ((NU8) 2));
				LA402: ;
				if (!LOC397) goto LA403;
				result = ((NU8) 1);
			}
			LA403: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 3):
	{
		{
			if (!((*a).Kind == ((NU8) 3))) goto LA409;
			result = ((NU8) 9);
		}
		LA409: ;
	}
	break;
	case ((NU8) 11):
	{
		ttype226852* roota;
		ttype226852* rootf;
		roota = skipgenericalias_270619(a);
		rootf = skipgenericalias_270619(f);
		{
			NIM_BOOL LOC414;
			ttype226852* LOC416;
			ttype226852* LOC417;
			LOC414 = 0;
			LOC414 = ((*a).Kind == ((NU8) 11));
			if (!(LOC414)) goto LA415;
			LOC416 = 0;
			LOC416 = base_264038(roota);
			LOC417 = 0;
			LOC417 = base_264038(rootf);
			LOC414 = (LOC416 == LOC417);
			LA415: ;
			if (!LOC414) goto LA418;
			{
				NI i_410652;
				NI HEX3Atmp_412168;
				NI LOC421;
				NI res_412171;
				i_410652 = 0;
				HEX3Atmp_412168 = 0;
				LOC421 = 0;
				LOC421 = sonslen_227255(rootf);
				HEX3Atmp_412168 = (NI32)(LOC421 - 2);
				res_412171 = 1;
				{
					while (1) {
						ttype226852* ff;
						ttype226852* aa;
						if (!(res_412171 <= HEX3Atmp_412168)) goto LA423;
						i_410652 = res_412171;
						ff = (*rootf).Sons->data[i_410652];
						aa = (*roota).Sons->data[i_410652];
						result = typerel_407436(c, ff, aa, NIM_TRUE);
						{
							if (!(result == ((NU8) 0))) goto LA426;
							goto BeforeRet;
						}
						LA426: ;
						{
							NIM_BOOL LOC430;
							LOC430 = 0;
							LOC430 = ((*ff).Kind == ((NU8) 20));
							if (!(LOC430)) goto LA431;
							LOC430 = !((result == ((NU8) 9)));
							LA431: ;
							if (!LOC430) goto LA432;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA432: ;
						res_412171 += 1;
					} LA423: ;
				}
			}
			result = ((NU8) 7);
		}
		goto LA412;
		LA418: ;
		{
			ttype226852* LOC435;
			LOC435 = 0;
			LOC435 = lastson_227267(f);
			result = typerel_407436(c, LOC435, a, NIM_TRUE);
		}
		LA412: ;
	}
	break;
	case ((NU8) 10):
	{
		ttype226852* prev_410683;
		tidobj201015* LOC437;
		TNimObject* LOC438;
		LOC437 = 0;
		LOC437 = &f->Sup;
		LOC438 = 0;
		LOC438 = idtableget_236182((*c).Bindings, LOC437);
		prev_410683 = ((ttype226852*) (LOC438));
		{
			ttype226852* ff;
			if (!(prev_410683 == NIM_NIL)) goto LA441;
			{
				NIM_BOOL LOC445;
				LOC445 = 0;
				LOC445 = ((*a).Kind == ((NU8) 11));
				if (!(LOC445)) goto LA446;
				LOC445 = ((*a).Sons->data[0] == f);
				LA446: ;
				if (!LOC445) goto LA447;
				{
					ttype226852* bound_410727;
					ttype226852* LOC453;
					if (!dobind) goto LA451;
					LOC453 = 0;
					LOC453 = skiptypes_231245(aorig, 1048576);
					bound_410727 = skipintlit_283531(LOC453);
					{
						if (!dobind) goto LA456;
						put_406283((&(*c).Bindings), f, bound_410727);
					}
					LA456: ;
				}
				LA451: ;
				result = ((NU8) 7);
				goto BeforeRet;
			}
			LA447: ;
			ff = lastson_227267(f);
			{
				if (!!((ff == NIM_NIL))) goto LA460;
				result = typerel_407436(c, ff, a, NIM_TRUE);
			}
			LA460: ;
		}
		goto LA439;
		LA441: ;
		{
			result = typerel_407436(c, prev_410683, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA439: ;
	}
	break;
	case ((NU8) 9):
	{
		ttype226852* x_410821;
		x_410821 = skipgenericalias_270619(a);
		{
			NIM_BOOL LOC466;
			LOC466 = 0;
			LOC466 = ((*x_410821).Kind == ((NU8) 9));
			if (LOC466) goto LA467;
			LOC466 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 10)));
			LA467: ;
			if (!LOC466) goto LA468;
		}
		goto LA464;
		LA468: ;
		{
			NIM_BOOL LOC471;
			NIM_BOOL LOC472;
			NI LOC475;
			NI LOC476;
			LOC471 = 0;
			LOC472 = 0;
			LOC472 = ((*x_410821).Kind == ((NU8) 11));
			if (!(LOC472)) goto LA473;
			LOC472 = ((*f).Sons->data[0] == (*x_410821).Sons->data[0]);
			LA473: ;
			LOC471 = LOC472;
			if (!(LOC471)) goto LA474;
			LOC475 = 0;
			LOC475 = sonslen_227255(x_410821);
			LOC476 = 0;
			LOC476 = sonslen_227255(f);
			LOC471 = ((NI32)(LOC475 - 1) == LOC476);
			LA474: ;
			if (!LOC471) goto LA477;
			{
				NI i_410877;
				NI HEX3Atmp_412174;
				NI LOC480;
				NI res_412177;
				i_410877 = 0;
				HEX3Atmp_412174 = 0;
				LOC480 = 0;
				LOC480 = sonslen_227255(f);
				HEX3Atmp_412174 = (NI32)(LOC480 - 1);
				res_412177 = 1;
				{
					while (1) {
						if (!(res_412177 <= HEX3Atmp_412174)) goto LA482;
						i_410877 = res_412177;
						{
							if (!((*(*x_410821).Sons->data[i_410877]).Kind == ((NU8) 12))) goto LA485;
							internalerror_199006(((NimStringDesc*) &TMP2684));
						}
						goto LA483;
						LA485: ;
						{
							NU8 LOC488;
							LOC488 = 0;
							LOC488 = typerel_407436(c, (*f).Sons->data[i_410877], (*x_410821).Sons->data[i_410877], NIM_TRUE);
							if (!(LOC488 <= ((NU8) 3))) goto LA489;
							goto BeforeRet;
						}
						goto LA483;
						LA489: ;
						LA483: ;
						res_412177 += 1;
					} LA482: ;
				}
			}
			result = ((NU8) 7);
		}
		goto LA464;
		LA477: ;
		{
			result = typerel_407436(c, (*f).Sons->data[0], x_410821, NIM_TRUE);
			{
				if (!!((result == ((NU8) 0)))) goto LA494;
				{
					NI i_410917;
					NI HEX3Atmp_412180;
					NI LOC497;
					NI res_412183;
					i_410917 = 0;
					HEX3Atmp_412180 = 0;
					LOC497 = 0;
					LOC497 = sonslen_227255(f);
					HEX3Atmp_412180 = (NI32)(LOC497 - 1);
					res_412183 = 1;
					{
						while (1) {
							ttype226852* x;
							tidobj201015* LOC500;
							TNimObject* LOC501;
							if (!(res_412183 <= HEX3Atmp_412180)) goto LA499;
							i_410917 = res_412183;
							LOC500 = 0;
							LOC500 = &(*(*f).Sons->data[0]).Sons->data[(NI32)(i_410917 - 1)]->Sup;
							LOC501 = 0;
							LOC501 = idtableget_236182((*c).Bindings, LOC500);
							x = ((ttype226852*) (LOC501));
							{
								NIM_BOOL LOC504;
								LOC504 = 0;
								LOC504 = (x == NIM_NIL);
								if (LOC504) goto LA505;
								LOC504 = ((*x).Kind == ((NU8) 9) || (*x).Kind == ((NU8) 12));
								LA505: ;
								if (!LOC504) goto LA506;
								internalerror_199006(((NimStringDesc*) &TMP2684));
							}
							LA506: ;
							put_406283((&(*c).Bindings), (*f).Sons->data[i_410917], x);
							res_412183 += 1;
						} LA499: ;
					}
				}
			}
			LA494: ;
		}
		LA464: ;
	}
	break;
	case ((NU8) 55):
	{
		ttype226852* prev_410952;
		tidobj201015* LOC509;
		TNimObject* LOC510;
		LOC509 = 0;
		LOC509 = &f->Sup;
		LOC510 = 0;
		LOC510 = idtableget_236182((*c).Bindings, LOC509);
		prev_410952 = ((ttype226852*) (LOC510));
		{
			if (!(prev_410952 == NIM_NIL)) goto LA513;
			{
				ttype226852* branch_410982;
				ttypeseq226848* HEX3Atmp_412186;
				NI i_412189;
				NI l_412191;
				branch_410982 = 0;
				HEX3Atmp_412186 = 0;
				HEX3Atmp_412186 = (*f).Sons;
				i_412189 = 0;
				l_412191 = HEX3Atmp_412186->Sup.len;
				{
					while (1) {
						if (!(i_412189 < l_412191)) goto LA517;
						branch_410982 = HEX3Atmp_412186->data[i_412189];
						{
							NU8 LOC520;
							LOC520 = 0;
							LOC520 = typerel_407436(c, branch_410982, aorig, NIM_TRUE);
							if (!(LOC520 < ((NU8) 3))) goto LA521;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA521: ;
						i_412189 += 1;
					} LA517: ;
				}
			}
			{
				ttype226852* bound_410994;
				ttype226852* LOC527;
				if (!dobind) goto LA525;
				LOC527 = 0;
				LOC527 = skiptypes_231245(aorig, 1048576);
				bound_410994 = skipintlit_283531(LOC527);
				{
					if (!dobind) goto LA530;
					put_406283((&(*c).Bindings), f, bound_410994);
				}
				LA530: ;
			}
			LA525: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA511;
		LA513: ;
		{
			result = typerel_407436(c, prev_410952, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA511: ;
	}
	break;
	case ((NU8) 56):
	{
		ttype226852* prev_411204;
		tidobj201015* LOC534;
		TNimObject* LOC535;
		LOC534 = 0;
		LOC534 = &f->Sup;
		LOC535 = 0;
		LOC535 = idtableget_236182((*c).Bindings, LOC534);
		prev_411204 = ((ttype226852*) (LOC535));
		{
			if (!(prev_411204 == NIM_NIL)) goto LA538;
			{
				ttype226852* branch_411234;
				ttypeseq226848* HEX3Atmp_412193;
				NI i_412196;
				NI l_412198;
				branch_411234 = 0;
				HEX3Atmp_412193 = 0;
				HEX3Atmp_412193 = (*f).Sons;
				i_412196 = 0;
				l_412198 = HEX3Atmp_412193->Sup.len;
				{
					while (1) {
						if (!(i_412196 < l_412198)) goto LA542;
						branch_411234 = HEX3Atmp_412193->data[i_412196];
						{
							NU8 LOC545;
							LOC545 = 0;
							LOC545 = typerel_407436(c, branch_411234, aorig, NIM_TRUE);
							if (!(((NU8) 3) <= LOC545)) goto LA546;
							{
								ttype226852* bound_411245;
								ttype226852* LOC552;
								if (!dobind) goto LA550;
								LOC552 = 0;
								LOC552 = skiptypes_231245(aorig, 1048576);
								bound_411245 = skipintlit_283531(LOC552);
								{
									if (!dobind) goto LA555;
									put_406283((&(*c).Bindings), f, bound_411245);
								}
								LA555: ;
							}
							LA550: ;
							result = ((NU8) 7);
							goto BeforeRet;
						}
						LA546: ;
						i_412196 += 1;
					} LA542: ;
				}
			}
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA536;
		LA538: ;
		{
			result = typerel_407436(c, prev_411204, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA536: ;
	}
	break;
	case ((NU8) 57):
	{
		ttype226852* prev_411404;
		tidobj201015* LOC559;
		TNimObject* LOC560;
		LOC559 = 0;
		LOC559 = &f->Sup;
		LOC560 = 0;
		LOC560 = idtableget_236182((*c).Bindings, LOC559);
		prev_411404 = ((ttype226852*) (LOC560));
		{
			if (!(prev_411404 == NIM_NIL)) goto LA563;
			{
				ttype226852* branch_411434;
				ttypeseq226848* HEX3Atmp_412200;
				NI i_412203;
				NI l_412205;
				branch_411434 = 0;
				HEX3Atmp_412200 = 0;
				HEX3Atmp_412200 = (*f).Sons;
				i_412203 = 0;
				l_412205 = HEX3Atmp_412200->Sup.len;
				{
					while (1) {
						if (!(i_412203 < l_412205)) goto LA567;
						branch_411434 = HEX3Atmp_412200->data[i_412203];
						{
							NU8 LOC570;
							LOC570 = 0;
							LOC570 = typerel_407436(c, branch_411434, aorig, NIM_TRUE);
							if (!!((LOC570 == ((NU8) 0)))) goto LA571;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA571: ;
						i_412203 += 1;
					} LA567: ;
				}
			}
			{
				ttype226852* bound_411445;
				ttype226852* LOC577;
				if (!dobind) goto LA575;
				LOC577 = 0;
				LOC577 = skiptypes_231245(aorig, 1048576);
				bound_411445 = skipintlit_283531(LOC577);
				{
					if (!dobind) goto LA580;
					put_406283((&(*c).Bindings), f, bound_411445);
				}
				LA580: ;
			}
			LA575: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA561;
		LA563: ;
		{
			result = typerel_407436(c, prev_411404, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA561: ;
	}
	break;
	case ((NU8) 58):
	{
		ttype226852* prev_411604;
		tidobj201015* LOC584;
		TNimObject* LOC585;
		LOC584 = 0;
		LOC584 = &f->Sup;
		LOC585 = 0;
		LOC585 = idtableget_236182((*c).Bindings, LOC584);
		prev_411604 = ((ttype226852*) (LOC585));
		{
			ttype226852* concrete;
			if (!(prev_411604 == NIM_NIL)) goto LA588;
			concrete = concretetype_407446((&(*c)), a);
			{
				NIM_BOOL LOC592;
				LOC592 = 0;
				LOC592 = !((concrete == NIM_NIL));
				if (!(LOC592)) goto LA593;
				LOC592 = dobind;
				LA593: ;
				if (!LOC592) goto LA594;
				put_406283((&(*c).Bindings), f, concrete);
			}
			LA594: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA586;
		LA588: ;
		{
			result = typerel_407436(c, prev_411604, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA586: ;
	}
	break;
	case ((NU8) 51):
	{
		ttype226852* prev_411642;
		tidobj201015* LOC598;
		TNimObject* LOC599;
		LOC598 = 0;
		LOC598 = &f->Sup;
		LOC599 = 0;
		LOC599 = idtableget_236182((*c).Bindings, LOC598);
		prev_411642 = ((ttype226852*) (LOC599));
		{
			NU8 targetkind;
			if (!(prev_411642 == NIM_NIL)) goto LA602;
			targetkind = (*(*f).Sons->data[0]).Kind;
			{
				NIM_BOOL LOC606;
				ttype226852* LOC607;
				NIM_BOOL LOC609;
				LOC606 = 0;
				LOC607 = 0;
				LOC607 = skiptypes_231245(a, 1050624);
				LOC606 = (targetkind == (*LOC607).Kind);
				if (LOC606) goto LA608;
				LOC609 = 0;
				LOC609 = (targetkind == ((NU8) 25) || targetkind == ((NU8) 26));
				if (!(LOC609)) goto LA610;
				LOC609 = ((*a).Kind == ((NU8) 5));
				LA610: ;
				LOC606 = LOC609;
				LA608: ;
				if (!LOC606) goto LA611;
				put_406283((&(*c).Bindings), f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA604;
			LA611: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA604: ;
		}
		goto LA600;
		LA602: ;
		{
			result = typerel_407436(c, prev_411642, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA600: ;
	}
	break;
	case ((NU8) 52):
	case ((NU8) 53):
	{
		ttype226852* prev_411696;
		tidobj201015* LOC616;
		TNimObject* LOC617;
		LOC616 = 0;
		LOC616 = &f->Sup;
		LOC617 = 0;
		LOC617 = idtableget_236182((*c).Bindings, LOC616);
		prev_411696 = ((ttype226852*) (LOC617));
		{
			if (!(prev_411696 == NIM_NIL)) goto LA620;
			result = matchusertypeclass_409050((*c).C, c, f, aorig);
			{
				if (!(result == ((NU8) 7))) goto LA624;
				put_406283((&(*c).Bindings), f, a);
			}
			LA624: ;
		}
		goto LA618;
		LA620: ;
		{
			result = typerel_407436(c, prev_411696, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA618: ;
	}
	break;
	case ((NU8) 54):
	{
		ttype226852* prev_411725;
		tidobj201015* LOC628;
		TNimObject* LOC629;
		LOC628 = 0;
		LOC628 = &f->Sup;
		LOC629 = 0;
		LOC629 = idtableget_236182((*c).Bindings, LOC628);
		prev_411725 = ((ttype226852*) (LOC629));
		{
			if (!(prev_411725 == NIM_NIL)) goto LA632;
			{
				NU8 LOC636;
				LOC636 = 0;
				LOC636 = typerel_407436(c, (*f).Sons->data[1], a, NIM_TRUE);
				if (!!((LOC636 == ((NU8) 0)))) goto LA637;
				put_406283((&(*c).Bindings), f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA634;
			LA637: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA634: ;
		}
		goto LA630;
		LA632: ;
		{
			result = typerel_407436(c, prev_411725, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA630: ;
	}
	break;
	case ((NU8) 12):
	{
		ttype226852* x;
		tidobj201015* LOC642;
		TNimObject* LOC643;
		LOC642 = 0;
		LOC642 = &f->Sup;
		LOC643 = 0;
		LOC643 = idtableget_236182((*c).Bindings, LOC642);
		x = ((ttype226852*) (LOC643));
		{
			if (!(x == NIM_NIL)) goto LA646;
			{
				NIM_BOOL LOC650;
				NIM_BOOL LOC651;
				LOC650 = 0;
				LOC651 = 0;
				LOC651 = ((*(*c).Callee).Kind == ((NU8) 10));
				if (!(LOC651)) goto LA652;
				LOC651 = ((*f).Kind == ((NU8) 12));
				LA652: ;
				LOC650 = LOC651;
				if (!(LOC650)) goto LA653;
				LOC650 = !((*c).Typedescmatched);
				LA653: ;
				if (!LOC650) goto LA654;
				{
					if (!(((*a).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA658;
					result = ((NU8) 7);
				}
				goto LA656;
				LA658: ;
				{
					if (!((*a).Kind == ((NU8) 8))) goto LA661;
					{
						NI LOC665;
						LOC665 = 0;
						LOC665 = sonslen_227255(f);
						if (!(LOC665 == 0)) goto LA666;
						result = ((NU8) 7);
					}
					goto LA663;
					LA666: ;
					{
						ttype226852* LOC677;
						ttype226852* LOC678;
						{
							NIM_BOOL LOC671;
							NIM_BOOL LOC672;
							NimStringDesc* LOC676;
							LOC671 = 0;
							LOC672 = 0;
							LOC672 = HEX3DHEX3D_274497((*a).Sons, NIM_NIL);
							LOC671 = !(LOC672);
							if (!(LOC671)) goto LA673;
							LOC671 = (0 < (*a).Sons->Sup.len);
							LA673: ;
							if (!!(LOC671)) goto LA674;
							LOC676 = 0;
							LOC676 = HEX24_199126(TMP2691);
							internalerror_199006(LOC676);
						}
						LA674: ;
						(*c).Typedescmatched = NIM_TRUE;
						LOC677 = 0;
						LOC677 = base_264038(f);
						LOC678 = 0;
						LOC678 = base_264038(a);
						result = typerel_407436(c, LOC677, LOC678, NIM_TRUE);
					}
					LA663: ;
				}
				goto LA656;
				LA661: ;
				{
					result = ((NU8) 0);
				}
				LA656: ;
			}
			goto LA648;
			LA654: ;
			{
				{
					NIM_BOOL LOC683;
					NI LOC684;
					ttype226852* LOC688;
					LOC683 = 0;
					LOC684 = 0;
					LOC684 = sonslen_227255(f);
					LOC683 = (0 < LOC684);
					if (!(LOC683)) goto LA685;
					LOC683 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 0)));
					LA685: ;
					if (!LOC683) goto LA686;
					LOC688 = 0;
					LOC688 = lastson_227267(f);
					result = typerel_407436(c, LOC688, a, NIM_TRUE);
					{
						NIM_BOOL LOC691;
						ttype226852* concrete;
						LOC691 = 0;
						LOC691 = dobind;
						if (!(LOC691)) goto LA692;
						LOC691 = !(((129 &(1<<((result)&15)))!=0));
						LA692: ;
						if (!LOC691) goto LA693;
						concrete = concretetype_407446((&(*c)), a);
						{
							if (!(concrete == NIM_NIL)) goto LA697;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA697: ;
						put_406283((&(*c).Bindings), f, concrete);
					}
					LA693: ;
				}
				goto LA681;
				LA686: ;
				{
					result = ((NU8) 7);
				}
				LA681: ;
			}
			LA648: ;
			{
				ttype226852* concrete;
				if (!(result == ((NU8) 7))) goto LA702;
				concrete = a;
				{
					if (!(((*a).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA706;
					(*(*a).Sym).Kind = ((NU8) 7);
					(*a).Flags &= ~(((NI32)1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
				}
				goto LA704;
				LA706: ;
				{
					concrete = concretetype_407446((&(*c)), a);
					{
						if (!(concrete == NIM_NIL)) goto LA711;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA711: ;
				}
				LA704: ;
				{
					if (!dobind) goto LA715;
					put_406283((&(*c).Bindings), f, concrete);
				}
				LA715: ;
			}
			LA702: ;
		}
		goto LA644;
		LA646: ;
		{
			if (!((*a).Kind == ((NU8) 3))) goto LA718;
			result = ((NU8) 7);
		}
		goto LA644;
		LA718: ;
		{
			if (!((*x).Kind == ((NU8) 12))) goto LA721;
			result = ((NU8) 7);
		}
		goto LA644;
		LA721: ;
		{
			result = typerel_407436(c, x, a, NIM_TRUE);
		}
		LA644: ;
	}
	break;
	case ((NU8) 59):
	{
		{
			ttype226852* LOC729;
			if (!((*aorig).Kind == ((NU8) 59))) goto LA727;
			LOC729 = 0;
			LOC729 = lastson_227267(f);
			result = typerel_407436(c, LOC729, a, NIM_TRUE);
			{
				if (!!((result == ((NU8) 0)))) goto LA732;
				put_406283((&(*c).Bindings), f, aorig);
			}
			LA732: ;
		}
		goto LA725;
		LA727: ;
		{
			result = ((NU8) 0);
		}
		LA725: ;
	}
	break;
	case ((NU8) 8):
	{
		ttype226852* prev;
		tidobj201015* LOC736;
		TNimObject* LOC737;
		LOC736 = 0;
		LOC736 = &f->Sup;
		LOC737 = 0;
		LOC737 = idtableget_236182((*c).Bindings, LOC736);
		prev = ((ttype226852*) (LOC737));
		{
			if (!(prev == NIM_NIL)) goto LA740;
			{
				if (!!(((*a).Kind == ((NU8) 8)))) goto LA744;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA744: ;
			{
				ttype226852* LOC748;
				LOC748 = 0;
				LOC748 = base_264038(f);
				if (!((*LOC748).Kind == ((NU8) 0))) goto LA749;
				result = ((NU8) 7);
			}
			goto LA746;
			LA749: ;
			{
				ttype226852* LOC752;
				ttype226852* LOC753;
				LOC752 = 0;
				LOC752 = base_264038(f);
				LOC753 = 0;
				LOC753 = base_264038(a);
				result = typerel_407436(c, LOC752, LOC753, NIM_TRUE);
			}
			LA746: ;
			{
				if (!!((result == ((NU8) 0)))) goto LA756;
				put_406283((&(*c).Bindings), f, a);
			}
			LA756: ;
		}
		goto LA738;
		LA740: ;
		{
			{
				ttype226852* LOC763;
				if (!(((*f).Flags &(1<<((((NU8) 9))&31)))!=0)) goto LA761;
				LOC763 = 0;
				LOC763 = base_264038(prev);
				result = typerel_407436(c, LOC763, a, NIM_TRUE);
			}
			goto LA759;
			LA761: ;
			{
				ttype226852* LOC767;
				ttype226852* LOC768;
				if (!((*a).Kind == ((NU8) 8))) goto LA765;
				LOC767 = 0;
				LOC767 = base_264038(prev);
				LOC768 = 0;
				LOC768 = base_264038(a);
				result = typerel_407436(c, LOC767, LOC768, NIM_TRUE);
			}
			goto LA759;
			LA765: ;
			{
				result = ((NU8) 0);
			}
			LA759: ;
		}
		LA738: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			NIM_BOOL LOC773;
			NIM_BOOL LOC775;
			ttype226852* LOC779;
			ttype226852* LOC780;
			LOC773 = 0;
			LOC773 = ((*a).Kind == ((NU8) 49));
			if (LOC773) goto LA774;
			LOC775 = 0;
			LOC775 = ((*a).Kind == ((NU8) 25));
			if (!(LOC775)) goto LA776;
			LOC775 = (((*a).Flags &(1<<((((NU8) 14))&31)))!=0);
			LA776: ;
			LOC773 = LOC775;
			LA774: ;
			if (!LOC773) goto LA777;
			LOC779 = 0;
			LOC779 = base_264038(f);
			LOC780 = 0;
			LOC780 = base_264038(a);
			result = typerel_407436(c, LOC779, LOC780, NIM_TRUE);
		}
		goto LA771;
		LA777: ;
		{
			result = ((NU8) 0);
		}
		LA771: ;
	}
	break;
	case ((NU8) 7):
	{
		result = ((NU8) 7);
	}
	break;
	case ((NU8) 50):
	{
		result = ((NU8) 9);
	}
	break;
	case ((NU8) 60):
	{
		tnode226816* instantiated;
		tnode226816* reevaluted;
		instantiated = replacetypesinbody_321489((*c).C, (*c).Bindings, (*f).N);
		reevaluted = (*(*c).C).Semexpr((*c).C, instantiated, 0);
		switch ((*(*reevaluted).Typ).Kind) {
		case ((NU8) 8):
		{
			ttype226852* LOC786;
			LOC786 = 0;
			LOC786 = base_264038((*reevaluted).Typ);
			result = typerel_407436(c, a, LOC786, NIM_TRUE);
		}
		break;
		case ((NU8) 59):
		{
			ttype226852* LOC788;
			LOC788 = 0;
			LOC788 = base_264038((*reevaluted).Typ);
			result = typerel_407436(c, a, LOC788, NIM_TRUE);
			{
				NIM_BOOL LOC791;
				LOC791 = 0;
				LOC791 = !((result == ((NU8) 0)));
				if (!(LOC791)) goto LA792;
				LOC791 = !(((*(*reevaluted).Typ).N == NIM_NIL));
				LA792: ;
				if (!LOC791) goto LA793;
				{
					NIM_BOOL LOC797;
					LOC797 = 0;
					LOC797 = exprstructuralequivalent_262184((*aorig).N, (*(*reevaluted).Typ).N);
					if (!!(LOC797)) goto LA798;
					result = ((NU8) 0);
				}
				LA798: ;
			}
			LA793: ;
		}
		break;
		default:
		{
			localerror_198955((*(*f).N).Info, ((NU16) 63), ((NimStringDesc*) &TMP2692));
			result = ((NU8) 0);
		}
		break;
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC806;
			if (!NIM_TRUE) goto LA804;
			LOC806 = 0;
			LOC806 = HEX24_199126(TMP2693);
			internalerror_199006(LOC806);
		}
		LA804: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isinlineiterator_412610)(ttype226852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC3;
	ttype226852* LOC5;
	result = 0;
	LOC1 = 0;
	LOC1 = ((*t).Kind == ((NU8) 49));
	if (LOC1) goto LA2;
	LOC3 = 0;
	LOC3 = ((*t).Kind == ((NU8) 51));
	if (!(LOC3)) goto LA4;
	LOC5 = 0;
	LOC5 = base_264038(t);
	LOC3 = ((*LOC5).Kind == ((NU8) 49));
	LA4: ;
	LOC1 = LOC3;
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(ttype226852*, getinstantiatedtype_412309)(tcontext291021* c, tnode226816* arg, tcandidate406209* m, ttype226852* f) {
	ttype226852* result;
	tidobj201015* LOC1;
	TNimObject* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = &f->Sup;
	LOC2 = 0;
	LOC2 = idtableget_236182((*m).Bindings, LOC1);
	result = ((ttype226852*) (LOC2));
	{
		if (!(result == NIM_NIL)) goto LA5;
		result = generatetypeinstance_321503(c, (*m).Bindings, (*arg).Info, f);
	}
	LA5: ;
	{
		if (!(result == NIM_NIL)) goto LA9;
		internalerror_198987((*arg).Info, ((NimStringDesc*) &TMP2694));
		result = errortype_292319(c);
	}
	LA9: ;
	return result;
}

N_NIMCALL(tnode226816*, implicitconv_412356)(NU8 kind, ttype226852* f, tnode226816* arg, tcandidate406209* m, tcontext291021* c) {
	tnode226816* result;
	result = 0;
	result = newnodei_227138(kind, (*arg).Info);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = containsgenerictype_273929(f);
		if (!LOC3) goto LA4;
		{
			if (!!((*m).Proxymatch)) goto LA8;
			asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_412309(c, arg, m, f));
		}
		goto LA6;
		LA8: ;
		{
			asgnRefNoCycle((void**) (&(*result).Typ), errortype_292319(c));
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*result).Typ), f);
	}
	LA1: ;
	{
		if (!((*result).Typ == NIM_NIL)) goto LA14;
		internalerror_198987((*arg).Info, ((NimStringDesc*) &TMP2695));
	}
	LA14: ;
	addson_227287(result, emptynode_227738);
	addson_227287(result, arg);
	return result;
}

N_NIMCALL(NIM_BOOL, istracked_419164)(tlineinfo196539 current, NI tokenlen) {
	NIM_BOOL result;
	result = 0;
	{
		NI i_419181;
		NI HEX3Atmp_419184;
		NI res_419187;
		i_419181 = 0;
		HEX3Atmp_419184 = 0;
		HEX3Atmp_419184 = (checkpoints_198151->Sup.len-1);
		res_419187 = 0;
		{
			while (1) {
				if (!(res_419187 <= HEX3Atmp_419184)) goto LA3;
				i_419181 = res_419187;
				{
					if (!(current.Fileindex == checkpoints_198151->data[i_419181].Fileindex)) goto LA6;
					{
						NI16 col;
						if (!(current.Line == checkpoints_198151->data[i_419181].Line)) goto LA10;
						col = checkpoints_198151->data[i_419181].Col;
						{
							NIM_BOOL LOC14;
							LOC14 = 0;
							LOC14 = (current.Col <= col);
							if (!(LOC14)) goto LA15;
							LOC14 = (((NI) (col)) <= (NI32)((NI32)(((NI) (current.Col)) + tokenlen) - 1));
							LA15: ;
							if (!LOC14) goto LA16;
							result = NIM_TRUE;
							goto BeforeRet;
						}
						LA16: ;
					}
					LA10: ;
				}
				LA6: ;
				res_419187 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, findusages_419417)(tlineinfo196539 info, tsym226846* s) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (usagesym_419415 == NIM_NIL);
		if (!(LOC3)) goto LA4;
		LOC3 = istracked_419164(info, (*(*s).Name).S->Sup.len);
		LA4: ;
		if (!LOC3) goto LA5;
		asgnRefNoCycle((void**) (&usagesym_419415), s);
		LOC7 = 0;
		LOC7 = symtostr_415804(s, NIM_FALSE, ((NimStringDesc*) &TMP2698));
		suggestwriteln_197457(LOC7);
	}
	goto LA1;
	LA5: ;
	{
		if (!(s == usagesym_419415)) goto LA9;
		{
			NIM_BOOL LOC13;
			NimStringDesc* LOC16;
			LOC13 = 0;
			LOC13 = HEX3DHEX3D_198579(lastlineinfo_419416, info);
			if (!!(LOC13)) goto LA14;
			LOC16 = 0;
			LOC16 = symtostr_415620(s, NIM_FALSE, ((NimStringDesc*) &TMP2698), info);
			suggestwriteln_197457(LOC16);
		}
		LA14: ;
		lastlineinfo_419416 = info;
	}
	goto LA1;
	LA9: ;
	LA1: ;
}

N_NIMCALL(void, finddefinition_419457)(tlineinfo196539 info, tsym226846* s) {
	{
		if (!s == 0) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		NimStringDesc* LOC10;
		LOC7 = 0;
		LOC7 = istracked_419164(info, (*(*s).Name).S->Sup.len);
		if (!LOC7) goto LA8;
		LOC10 = 0;
		LOC10 = symtostr_415804(s, NIM_FALSE, ((NimStringDesc*) &TMP2699));
		suggestwriteln_197457(LOC10);
		suggestquit_197846();
	}
	LA8: ;
	BeforeRet: ;
}

N_NIMCALL(void, ensureseq_419618)(TY419481** x_419626) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_419632((*x_419626), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_419626)), (TY419481*) newSeq((&NTI419481), 0));
	}
	LA4: ;
}

N_NIMCALL(void, ensureidx_419962)(TY419481** x_419968, NI y_419971) {
	{
		if (!((*x_419968)->Sup.len <= y_419971)) goto LA3;
		(*x_419968) = (TY419481*) setLengthSeq(&((*x_419968))->Sup, sizeof(tlinemap419480), (NI32)(y_419971 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, ensureseq_420006)(TY419485** x_420014) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_419758((*x_420014), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_420014)), (TY419485*) newSeq((&NTI419485), 0));
	}
	LA4: ;
}

N_NIMCALL(void, addtosourcemap_419598)(tsym226846* sym, tlineinfo196539 info) {
	tentry419478 LOC1;
	ensureidx_419534((&gsourcemaps_419508), ((NI) (info.Fileindex)));
	ensureseq_419618((&gsourcemaps_419508->data[info.Fileindex].Lines));
	ensureidx_419962((&gsourcemaps_419508->data[info.Fileindex].Lines), ((NI) (info.Line)));
	ensureseq_420006((&gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries));
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	memset((void*)(&LOC1), 0, sizeof(LOC1));
	LOC1.Pos = ((NI) (info.Col));
	LOC1.Sym = sym;
	gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries = (TY419485*) incrSeq(&(gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries)->Sup, sizeof(tentry419478));
	gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Pos = LOC1.Pos;
	asgnRefNoCycle((void**) (&gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_419508->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Sym), LOC1.Sym);
}

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(void, markused_406251)(tlineinfo196539 info, tsym226846* s) {
	(*s).Flags |= ((NI32)1)<<((((NU8) 0))%(sizeof(NI32)*8));
	{
		if (!!(((1572864 & (*s).Flags) == 0))) goto LA3;
		{
			if (!(((*s).Flags &(1<<((((NU8) 19))&31)))!=0)) goto LA7;
			message_198976(info, ((NU16) 234), (*(*s).Name).S);
		}
		LA7: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 20))&31)))!=0)) goto LA11;
			localerror_198955(info, ((NU16) 221), (*(*s).Name).S);
		}
		LA11: ;
	}
	LA3: ;
	suggestsym_421882(info, s);
}

N_NIMCALL(tnode226816*, userconvmatch_412387)(tcontext291021* c, tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg) {
	tnode226816* result;
	result = 0;
	result = NIM_NIL;
	{
		NI i_412419;
		NI HEX3Atmp_412477;
		NI res_412480;
		i_412419 = 0;
		HEX3Atmp_412477 = 0;
		HEX3Atmp_412477 = (NI32)((*c).Converters->Sup.len - 1);
		res_412480 = 0;
		{
			while (1) {
				if (!(res_412480 <= HEX3Atmp_412477)) goto LA3;
				i_412419 = res_412480;
				{
					ttype226852* src;
					ttype226852* dest;
					NU8 srca;
					NIM_BOOL destisgeneric;
					NU8 fdest;
					src = (*(*(*c).Converters->data[i_412419]).Typ).Sons->data[1];
					dest = (*(*(*c).Converters->data[i_412419]).Typ).Sons->data[0];
					srca = typerel_407436(m, src, a, NIM_TRUE);
					{
						if (!!(((640 &(1<<((srca)&15)))!=0))) goto LA7;
						goto LA4;
					}
					LA7: ;
					destisgeneric = containsgenerictype_273929(dest);
					{
						if (!destisgeneric) goto LA11;
						dest = generatetypeinstance_321503(c, (*m).Bindings, (*arg).Info, dest);
					}
					LA11: ;
					fdest = typerel_407436(m, f, dest, NIM_TRUE);
					{
						tnode226816* s;
						tnode226816* LOC17;
						NIM_BOOL LOC18;
						if (!((640 &(1<<((fdest)&15)))!=0)) goto LA15;
						markused_406251((*arg).Info, (*c).Converters->data[i_412419]);
						s = newsymnode_227132((*c).Converters->data[i_412419]);
						asgnRefNoCycle((void**) (&(*s).Typ), (*(*c).Converters->data[i_412419]).Typ);
						(*s).Info = (*arg).Info;
						result = newnodeit_227145(((NU8) 32), (*arg).Info, dest);
						addson_227287(result, s);
						LOC17 = 0;
						LOC17 = copytree_227329(arg);
						addson_227287(result, LOC17);
						(*m).Convmatches += 1;
						LOC18 = 0;
						LOC18 = (srca == ((NU8) 7));
						if (LOC18) goto LA19;
						LOC18 = destisgeneric;
						LA19: ;
						(*m).Genericconverter = LOC18;
						goto BeforeRet;
					}
					LA15: ;
				} LA4: ;
				res_412480 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, localconvmatch_412500)(tcontext291021* c, tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg) {
	tnode226816* result;
	tnode226816* call;
	tnode226816* LOC11;
	tnode226816* LOC12;
	result = 0;
	{
		if (!(*arg).Typ == 0) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (f == (*arg).Typ);
		if (!(LOC7)) goto LA8;
		LOC7 = ((*arg).Kind == ((NU8) 58));
		LA8: ;
		if (!LOC7) goto LA9;
		result = arg;
		goto BeforeRet;
	}
	LA9: ;
	call = newnodei_227138(((NU8) 27), (*arg).Info);
	LOC11 = 0;
	LOC11 = copytree_227329((*f).N);
	add_227498(call, LOC11);
	LOC12 = 0;
	LOC12 = copytree_227329(arg);
	add_227498(call, LOC12);
	result = (*c).Semoverloadedcall(c, call, call, 520192);
	{
		NU8 r;
		if (!!((result == NIM_NIL))) goto LA15;
		r = typerel_407436(m, (*f).Sons->data[0], (*result).Typ, NIM_TRUE);
		{
			if (!(r < ((NU8) 7))) goto LA19;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA19: ;
		{
			if (!((*result).Kind == ((NU8) 27))) goto LA23;
			(*result).Kind = ((NU8) 32);
		}
		LA23: ;
		(*m).Convmatches += 1;
		{
			ttype226852* LOC29;
			if (!(r == ((NU8) 7))) goto LA27;
			LOC29 = 0;
			LOC29 = base_264038(f);
			asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_412309(c, arg, (&(*m)), LOC29));
		}
		LA27: ;
		(*m).Basetypematch = NIM_TRUE;
	}
	LA15: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, paramtypesmatchaux_412647)(tcandidate406209* m, ttype226852* f, ttype226852* argtype_412652, tnode226816* argsemantized, tnode226816* argorig) {
	tnode226816* result;
	ttype226852* fmaybestatic;
	tnode226816* arg;
	ttype226852* argtype;
	tcontext291021* c;
	ttype226852* a;
	NU8 r;
	result = 0;
	fmaybestatic = skiptypes_231245(f, 8192);
	arg = argsemantized;
	argtype = argtype_412652;
	c = (*m).C;
	{
		if (!(((*fmaybestatic).Flags &(1<<((((NU8) 22))&31)))!=0)) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = ((*argtype).Kind == ((NU8) 12));
			if (!(LOC7)) goto LA8;
			LOC7 = (((*argtype).Flags &(1<<((((NU8) 25))&31)))!=0);
			LA8: ;
			if (!LOC7) goto LA9;
			assigntype_227210(argtype, f);
			result = argsemantized;
			goto BeforeRet;
		}
		LA9: ;
		{
			if (!((*argtype).Kind == ((NU8) 59))) goto LA13;
			{
				if (!((*(*m).Callee).Kind == ((NU8) 10))) goto LA17;
				result = newnodei_227138(((NU8) 4), (*argorig).Info);
				asgnRefNoCycle((void**) (&(*result).Typ), maketypefromexpr_291812(c, arg));
				goto BeforeRet;
			}
			LA17: ;
		}
		goto LA11;
		LA13: ;
		{
			tnode226816* evaluated;
			evaluated = (*c).Semtryconstexpr(c, arg);
			{
				TY412748 LOC24;
				if (!!((evaluated == NIM_NIL))) goto LA22;
				asgnRefNoCycle((void**) (&(*arg).Typ), newtypes_291214(((NU8) 59), c));
				if ((*(*arg).Typ).Sons) nimGCunrefNoCycle((*(*arg).Typ).Sons);
				(*(*arg).Typ).Sons = (ttypeseq226848*) newSeqRC1((&NTI226848), 1);
				memset((void*)LOC24, 0, sizeof(LOC24));
				LOC24[0] = (*evaluated).Typ;
				asgnRefNoCycle((void**) (&(*(*arg).Typ).Sons->data[0]), LOC24[0]);
				asgnRefNoCycle((void**) (&(*(*arg).Typ).N), evaluated);
				argtype = (*arg).Typ;
			}
			LA22: ;
		}
		LA11: ;
	}
	LA3: ;
	{
		if (!(0 < (*c).Intypeclass)) goto LA27;
		a = skiptypes_231245(argtype, IL64(2305843009213694208));
	}
	goto LA25;
	LA27: ;
	{
		a = argtype;
	}
	LA25: ;
	r = typerel_407436(m, f, a, NIM_TRUE);
	{
		NIM_BOOL LOC32;
		NIM_BOOL LOC33;
		LOC32 = 0;
		LOC33 = 0;
		LOC33 = !((r == ((NU8) 0)));
		if (!(LOC33)) goto LA34;
		LOC33 = !(((*m).Calleesym == NIM_NIL));
		LA34: ;
		LOC32 = LOC33;
		if (!(LOC32)) goto LA35;
		LOC32 = ((393216 &(1<<(((*(*m).Calleesym).Kind)&31)))!=0);
		LA35: ;
		if (!LOC32) goto LA36;
		switch (r) {
		case ((NU8) 1):
		case ((NU8) 2):
		{
			(*m).Convmatches += 1;
		}
		break;
		case ((NU8) 3):
		case ((NU8) 4):
		{
			(*m).Subtypematches += 1;
		}
		break;
		case ((NU8) 7):
		case ((NU8) 5):
		{
			(*m).Genericmatches += 1;
		}
		break;
		case ((NU8) 6):
		{
			(*m).Genericmatches += 1;
			(*m).Convmatches += 1;
		}
		break;
		case ((NU8) 8):
		{
			(*m).Intconvmatches += 256;
		}
		break;
		case ((NU8) 9):
		{
			(*m).Exactmatches += 1;
		}
		break;
		case ((NU8) 0):
		{
		}
		break;
		}
		{
			if (!((*f).Kind == ((NU8) 7))) goto LA47;
			result = arg;
			goto BeforeRet;
		}
		goto LA45;
		LA47: ;
		{
			if (!((*f).Kind == ((NU8) 8))) goto LA50;
			result = arg;
			goto BeforeRet;
		}
		goto LA45;
		LA50: ;
		{
			if (!((*f).Kind == ((NU8) 59))) goto LA53;
			result = (*(*arg).Typ).N;
			goto BeforeRet;
		}
		goto LA45;
		LA53: ;
		{
			result = argorig;
			goto BeforeRet;
		}
		LA45: ;
	}
	LA36: ;
	{
		NIM_BOOL LOC58;
		ttype226852* inlined;
		TY412748 LOC62;
		LOC58 = 0;
		LOC58 = !((r == ((NU8) 0)));
		if (!(LOC58)) goto LA59;
		LOC58 = isinlineiterator_412610(f);
		LA59: ;
		if (!LOC58) goto LA60;
		inlined = newtypes_291214(((NU8) 59), c);
		if ((*inlined).Sons) nimGCunrefNoCycle((*inlined).Sons);
		(*inlined).Sons = (ttypeseq226848*) newSeqRC1((&NTI226848), 1);
		memset((void*)LOC62, 0, sizeof(LOC62));
		LOC62[0] = argtype;
		asgnRefNoCycle((void**) (&(*inlined).Sons->data[0]), LOC62[0]);
		asgnRefNoCycle((void**) (&(*inlined).N), argsemantized);
		put_406283((&(*m).Bindings), f, inlined);
		result = argsemantized;
		goto BeforeRet;
	}
	LA60: ;
	switch (r) {
	case ((NU8) 1):
	{
		tnode226816* LOC64;
		(*m).Convmatches += 1;
		LOC64 = 0;
		LOC64 = copytree_227329(arg);
		result = implicitconv_412356(((NU8) 58), f, LOC64, (&(*m)), c);
	}
	break;
	case ((NU8) 2):
	{
		tnode226816* LOC66;
		(*m).Intconvmatches += 1;
		LOC66 = 0;
		LOC66 = copytree_227329(arg);
		result = implicitconv_412356(((NU8) 58), f, LOC66, (&(*m)), c);
	}
	break;
	case ((NU8) 3):
	{
		tnode226816* LOC68;
		(*m).Subtypematches += 1;
		LOC68 = 0;
		LOC68 = copytree_227329(arg);
		result = implicitconv_412356(((NU8) 59), f, LOC68, (&(*m)), c);
	}
	break;
	case ((NU8) 4):
	{
		tnode226816* LOC70;
		(*m).Subtypematches += 1;
		LOC70 = 0;
		LOC70 = copytree_227329(arg);
		result = implicitconv_412356(((NU8) 58), f, LOC70, (&(*m)), c);
	}
	break;
	case ((NU8) 5):
	case ((NU8) 6):
	{
		(*m).Genericmatches += 1;
		{
			if (!((*arg).Kind >= ((NU8) 51) && (*arg).Kind <= ((NU8) 52) || (*arg).Kind == ((NU8) 79) || (*arg).Kind == ((NU8) 84))) goto LA74;
			result = (*c).Seminferredlambda.ClEnv? (*c).Seminferredlambda.ClPrc(c, (*m).Bindings, arg, (*c).Seminferredlambda.ClEnv):((TMP2696)((*c).Seminferredlambda.ClPrc))(c, (*m).Bindings, arg);
		}
		goto LA72;
		LA74: ;
		{
			tsym226846* inferred;
			inferred = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info, (*c).Semgenerateinstance.ClEnv):((TMP2697)((*c).Semgenerateinstance.ClPrc))(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info);
			result = newsymnode_228755(inferred, (*arg).Info);
		}
		LA72: ;
		{
			if (!(r == ((NU8) 6))) goto LA79;
			(*m).Convmatches += 1;
			result = implicitconv_412356(((NU8) 58), f, result, (&(*m)), c);
		}
		LA79: ;
	}
	break;
	case ((NU8) 7):
	{
		(*m).Genericmatches += 1;
		result = copytree_227329(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_412309(c, arg, (&(*m)), f));
		{
			ttype226852* LOC84;
			tnode226816* LOC87;
			LOC84 = 0;
			LOC84 = skiptypes_231245((*result).Typ, IL64(211106240964608));
			if (!((*LOC84).Kind == ((NU8) 18))) goto LA85;
			LOC87 = 0;
			LOC87 = copytree_227329(arg);
			result = implicitconv_412356(((NU8) 58), f, LOC87, (&(*m)), c);
		}
		LA85: ;
	}
	break;
	case ((NU8) 8):
	{
		tnode226816* LOC89;
		(*m).Intconvmatches += 256;
		LOC89 = 0;
		LOC89 = copytree_227329(arg);
		result = implicitconv_412356(((NU8) 58), f, LOC89, (&(*m)), c);
	}
	break;
	case ((NU8) 9):
	{
		(*m).Exactmatches += 1;
		result = copytree_227329(arg);
		{
			ttype226852* LOC93;
			tnode226816* LOC96;
			LOC93 = 0;
			LOC93 = skiptypes_231245(f, IL64(211106240964608));
			if (!((*LOC93).Kind == ((NU8) 18))) goto LA94;
			LOC96 = 0;
			LOC96 = copytree_227329(arg);
			result = implicitconv_412356(((NU8) 58), f, LOC96, (&(*m)), c);
		}
		LA94: ;
	}
	break;
	case ((NU8) 0):
	{
		{
			if (!((*a).Kind == ((NU8) 50))) goto LA100;
			(*m).Genericmatches += 1;
			(*m).Proxymatch = NIM_TRUE;
			result = copytree_227329(arg);
			goto BeforeRet;
		}
		LA100: ;
		result = userconvmatch_412387(c, m, f, a, arg);
		{
			NIM_BOOL LOC104;
			LOC104 = 0;
			LOC104 = (result == NIM_NIL);
			if (!(LOC104)) goto LA105;
			LOC104 = ((*f).Kind == ((NU8) 48));
			LA105: ;
			if (!LOC104) goto LA106;
			{
				if (!!(((*f).N == NIM_NIL))) goto LA110;
				result = localconvmatch_412500(c, m, f, a, arg);
			}
			goto LA108;
			LA110: ;
			{
				ttype226852* LOC113;
				LOC113 = 0;
				LOC113 = base_264038(f);
				r = typerel_407436(m, LOC113, a, NIM_TRUE);
				{
					if (!(((NU8) 7) <= r)) goto LA116;
					(*m).Convmatches += 1;
					result = copytree_227329(arg);
					{
						ttype226852* LOC122;
						if (!(r == ((NU8) 7))) goto LA120;
						LOC122 = 0;
						LOC122 = base_264038(f);
						asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_412309(c, arg, (&(*m)), LOC122));
					}
					LA120: ;
					(*m).Basetypematch = NIM_TRUE;
				}
				goto LA114;
				LA116: ;
				{
					ttype226852* LOC124;
					LOC124 = 0;
					LOC124 = base_264038(f);
					result = userconvmatch_412387(c, m, LOC124, a, arg);
				}
				LA114: ;
			}
			LA108: ;
		}
		LA106: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, copycandidate_406649)(tcandidate406209* a, tcandidate406209* b) {
	unsureAsgnRef((void**) (&(*a).C), (*b).C);
	(*a).Exactmatches = (*b).Exactmatches;
	(*a).Subtypematches = (*b).Subtypematches;
	(*a).Convmatches = (*b).Convmatches;
	(*a).Intconvmatches = (*b).Intconvmatches;
	(*a).Genericmatches = (*b).Genericmatches;
	(*a).State = (*b).State;
	unsureAsgnRef((void**) (&(*a).Callee), (*b).Callee);
	unsureAsgnRef((void**) (&(*a).Calleesym), (*b).Calleesym);
	unsureAsgnRef((void**) (&(*a).Call), copytree_227329((*b).Call));
	(*a).Basetypematch = (*b).Basetypematch;
	copyidtable_227241((&(*a).Bindings), (*b).Bindings);
}

N_NIMCALL(NI, sumgeneric_406661)(ttype226852* t_406663) {
	NI result;
	ttype226852* t;
	result = 0;
	t = t_406663;
	{
		while (1) {
			switch ((*t).Kind) {
			case ((NU8) 11):
			case ((NU8) 16):
			case ((NU8) 22):
			case ((NU8) 21):
			case ((NU8) 13):
			case ((NU8) 4):
			case ((NU8) 27):
			case ((NU8) 48):
			case ((NU8) 19):
			case ((NU8) 20):
			case ((NU8) 24):
			case ((NU8) 10):
			{
				t = lastson_227267(t);
				result += 1;
			}
			break;
			case ((NU8) 23):
			{
				t = (*t).Sons->data[0];
			}
			break;
			case ((NU8) 9):
			case ((NU8) 18):
			{
				result = ((NI) (((*t).Kind == ((NU8) 9))));
				{
					NI i_406716;
					NI HEX3Atmp_406731;
					NI LOC7;
					NI res_406734;
					i_406716 = 0;
					HEX3Atmp_406731 = 0;
					LOC7 = 0;
					LOC7 = len_231005(t);
					HEX3Atmp_406731 = (LOC7 - 1);
					res_406734 = 0;
					{
						while (1) {
							NI LOC10;
							if (!(res_406734 <= HEX3Atmp_406731)) goto LA9;
							i_406716 = res_406734;
							LOC10 = 0;
							LOC10 = sumgeneric_406661((*t).Sons->data[i_406716]);
							result += LOC10;
							res_406734 += 1;
						} LA9: ;
					}
				}
				goto LA1;
			}
			break;
			case ((NU8) 25):
			{
				result = 1;
				goto BeforeRet;
			}
			break;
			case ((NU8) 12):
			case ((NU8) 6):
			case ((NU8) 59):
			case ((NU8) 7):
			case ((NU8) 8):
			{
				goto LA1;
			}
			break;
			default:
			{
				result = 0;
				goto BeforeRet;
			}
			break;
			}
		}
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, complexdisambiguation_406757)(ttype226852* a, ttype226852* b) {
	NI result;
	NI x;
	NI y;
	result = 0;
	x = 0;
	y = 0;
	{
		NI i_406785;
		NI HEX3Atmp_407004;
		NI LOC2;
		NI res_407007;
		i_406785 = 0;
		HEX3Atmp_407004 = 0;
		LOC2 = 0;
		LOC2 = len_231005(a);
		HEX3Atmp_407004 = (LOC2 - 1);
		res_407007 = 1;
		{
			while (1) {
				NI LOC5;
				if (!(res_407007 <= HEX3Atmp_407004)) goto LA4;
				i_406785 = res_407007;
				LOC5 = 0;
				LOC5 = sumgeneric_406661((*a).Sons->data[i_406785]);
				x += LOC5;
				res_407007 += 1;
			} LA4: ;
		}
	}
	{
		NI i_406819;
		NI HEX3Atmp_407010;
		NI LOC7;
		NI res_407013;
		i_406819 = 0;
		HEX3Atmp_407010 = 0;
		LOC7 = 0;
		LOC7 = len_231005(b);
		HEX3Atmp_407010 = (LOC7 - 1);
		res_407013 = 1;
		{
			while (1) {
				NI LOC10;
				if (!(res_407013 <= HEX3Atmp_407010)) goto LA9;
				i_406819 = res_407013;
				LOC10 = 0;
				LOC10 = sumgeneric_406661((*b).Sons->data[i_406819]);
				y += LOC10;
				res_407013 += 1;
			} LA9: ;
		}
	}
	result = (NI32)(x - y);
	return result;
}

N_NIMCALL(NI, cmpcandidates_407039)(tcandidate406209* a, tcandidate406209* b) {
	NI result;
	result = 0;
	result = (NI32)((*a).Exactmatches - (*b).Exactmatches);
	{
		if (!!((result == 0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	result = (NI32)((*a).Genericmatches - (*b).Genericmatches);
	{
		if (!!((result == 0))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	result = (NI32)((*a).Subtypematches - (*b).Subtypematches);
	{
		if (!!((result == 0))) goto LA11;
		goto BeforeRet;
	}
	LA11: ;
	result = (NI32)((*a).Intconvmatches - (*b).Intconvmatches);
	{
		if (!!((result == 0))) goto LA15;
		goto BeforeRet;
	}
	LA15: ;
	result = (NI32)((*a).Convmatches - (*b).Convmatches);
	{
		if (!!((result == 0))) goto LA19;
		goto BeforeRet;
	}
	LA19: ;
	result = (NI32)((*a).Calleescope - (*b).Calleescope);
	{
		if (!!((result == 0))) goto LA23;
		goto BeforeRet;
	}
	LA23: ;
	result = (NI32)((*b).Inheritancepenalty - (*a).Inheritancepenalty);
	{
		if (!!((result == 0))) goto LA27;
		goto BeforeRet;
	}
	LA27: ;
	result = complexdisambiguation_406757((*a).Callee, (*b).Callee);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode226816*, paramtypesmatch_413263)(tcandidate406209* m, ttype226852* f, ttype226852* a, tnode226816* arg, tnode226816* argorig) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (arg == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = !(((*arg).Kind == ((NU8) 56) || (*arg).Kind == ((NU8) 57)));
		LA4: ;
		if (!LOC3) goto LA5;
		result = paramtypesmatchaux_412647(m, f, a, arg, argorig);
	}
	goto LA1;
	LA5: ;
	{
		tcontext291021* c;
		tcandidate406209 x;
		tcandidate406209 y;
		tcandidate406209 z;
		NI best;
		c = (*m).C;
		memset((void*)(&x), 0, sizeof(x));
		memset((void*)(&y), 0, sizeof(y));
		memset((void*)(&z), 0, sizeof(z));
		initcandidate_406270(c, (&x), (*m).Callee);
		initcandidate_406270(c, (&y), (*m).Callee);
		initcandidate_406270(c, (&z), (*m).Callee);
		x.Calleesym = (*m).Calleesym;
		y.Calleesym = (*m).Calleesym;
		z.Calleesym = (*m).Calleesym;
		best = -1;
		{
			NI i_413322;
			NI HEX3Atmp_413633;
			NI LOC9;
			NI res_413636;
			i_413322 = 0;
			HEX3Atmp_413633 = 0;
			LOC9 = 0;
			LOC9 = sonslen_227249(arg);
			HEX3Atmp_413633 = (NI32)(LOC9 - 1);
			res_413636 = 0;
			{
				while (1) {
					if (!(res_413636 <= HEX3Atmp_413633)) goto LA11;
					i_413322 = res_413636;
					{
						NU8 r;
						if (!((126976 &(1<<(((*(*(*arg).kindU.S6.Sons->data[i_413322]).kindU.S4.Sym).Kind)&31)))!=0)) goto LA14;
						copycandidate_406649((&z), (&(*m)));
						r = typerel_407436((&z), f, (*(*arg).kindU.S6.Sons->data[i_413322]).Typ, NIM_TRUE);
						{
							if (!!((r == ((NU8) 0)))) goto LA18;
							switch (x.State) {
							case ((NU8) 0):
							case ((NU8) 2):
							{
								genericAssign((void*)(&x), (void*)(&z), (&NTI406209));
								best = i_413322;
								x.State = ((NU8) 1);
							}
							break;
							case ((NU8) 1):
							{
								NI cmp;
								cmp = cmpcandidates_407039((&x), (&z));
								{
									if (!(cmp < 0)) goto LA24;
									best = i_413322;
									genericAssign((void*)(&x), (void*)(&z), (&NTI406209));
								}
								goto LA22;
								LA24: ;
								{
									if (!(cmp == 0)) goto LA27;
									genericAssign((void*)(&y), (void*)(&z), (&NTI406209));
								}
								goto LA22;
								LA27: ;
								LA22: ;
							}
							break;
							}
						}
						LA18: ;
					}
					LA14: ;
					res_413636 += 1;
				} LA11: ;
			}
		}
		{
			if (!(x.State == ((NU8) 0))) goto LA31;
			result = NIM_NIL;
		}
		goto LA29;
		LA31: ;
		{
			NIM_BOOL LOC34;
			NI LOC36;
			LOC34 = 0;
			LOC34 = (y.State == ((NU8) 1));
			if (!(LOC34)) goto LA35;
			LOC36 = 0;
			LOC36 = cmpcandidates_407039((&x), (&y));
			LOC34 = (LOC36 == 0);
			LA35: ;
			if (!LOC34) goto LA37;
			{
				if (!!((x.State == ((NU8) 1)))) goto LA41;
				internalerror_198987((*arg).Info, ((NimStringDesc*) &TMP2706));
			}
			LA41: ;
			result = NIM_NIL;
		}
		goto LA29;
		LA37: ;
		{
			markused_406251((*arg).Info, (*(*arg).kindU.S6.Sons->data[best]).kindU.S4.Sym);
			result = paramtypesmatchaux_412647(m, f, (*(*arg).kindU.S6.Sons->data[best]).Typ, (*arg).kindU.S6.Sons->data[best], argorig);
		}
		LA29: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, argtypematches_415484)(tcontext291021* c, ttype226852* f, ttype226852* a) {
	NIM_BOOL result;
	tcandidate406209 m;
	tnode226816* res;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406270(c, (&m), f);
	res = paramtypesmatch_413263((&m), f, a, emptynode_227738, NIM_NIL);
	result = !((res == NIM_NIL));
	return result;
}

static N_INLINE(NIM_BOOL, typefits_418158)(tcontext291021* c, tsym226846* s, ttype226852* firstarg) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NI LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = !(((*s).Typ == NIM_NIL));
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = sonslen_227255((*s).Typ);
		LOC4 = (1 < LOC6);
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA7;
		LOC3 = !(((*(*s).Typ).Sons->data[1] == NIM_NIL));
		LA7: ;
		if (!LOC3) goto LA8;
		result = argtypematches_415484(c, (*(*s).Typ).Sons->data[1], firstarg);
	}
	LA8: ;
	return result;
}

N_NIMCALL(void, suggestoperations_418202)(tcontext291021* c, tnode226816* n, ttype226852* typ, NI* outputs) {
	NIM_BOOL islocal_418402;
	islocal_418402 = NIM_TRUE;
	{
		tscope226840* scope_418404;
		tscope226840* HEX3Atmp_418546;
		tscope226840* current_418549;
		scope_418404 = 0;
		HEX3Atmp_418546 = 0;
		HEX3Atmp_418546 = (*c).Currentscope;
		current_418549 = HEX3Atmp_418546;
		{
			while (1) {
				tsymseq226818* entries_418406;
				tsymseq226818* result_418426;
				TY416638 LOC11;
				if (!!((current_418549 == NIM_NIL))) goto LA3;
				scope_418404 = current_418549;
				{
					if (!(scope_418404 == (*c).Toplevelscope)) goto LA6;
					islocal_418402 = NIM_FALSE;
				}
				LA6: ;
				result_418426 = (tsymseq226818*) newSeq((&NTI226818), 0);
				{
					tsym226846* x_418428;
					tstrtable226820 HEX3Atmp_418534;
					ttabiter236119 it_418537;
					tsym226846* s_418539;
					x_418428 = 0;
					memset((void*)(&HEX3Atmp_418534), 0, sizeof(HEX3Atmp_418534));
					HEX3Atmp_418534.Counter = (*scope_418404).Symbols.Counter;
					HEX3Atmp_418534.Data = (*scope_418404).Symbols.Data;
					memset((void*)(&it_418537), 0, sizeof(it_418537));
					s_418539 = inittabiter_236124((&it_418537), HEX3Atmp_418534);
					{
						while (1) {
							if (!!((s_418539 == NIM_NIL))) goto LA10;
							x_418428 = s_418539;
							result_418426 = (tsymseq226818*) incrSeq(&(result_418426)->Sup, sizeof(tsym226846*));
							asgnRefNoCycle((void**) (&result_418426->data[result_418426->Sup.len-1]), x_418428);
							s_418539 = nextiter_236132((&it_418537), HEX3Atmp_418534);
						} LA10: ;
					}
				}
				genericSeqAssign((&entries_418406), result_418426, (&NTI226818));
				memset((void*)(&LOC11), 0, sizeof(LOC11));
				LOC11.ClPrc = ((TMP2638) (HEX3Aanonymous_418470)); LOC11.ClEnv = NIM_NIL;
				sort_416619(entries_418406->data, entries_418406->Sup.len, LOC11, ((NU8) 1));
				{
					tsym226846* item_418408;
					NI i_418543;
					NI l_418545;
					item_418408 = 0;
					i_418543 = 0;
					l_418545 = entries_418406->Sup.len;
					{
						while (1) {
							tsym226846* it;
							if (!(i_418543 < l_418545)) goto LA14;
							item_418408 = entries_418406->data[i_418543];
							it = item_418408;
							{
								NIM_BOOL LOC17;
								NimStringDesc* LOC21;
								LOC17 = 0;
								LOC17 = filtersym_415813(it);
								if (!(LOC17)) goto LA18;
								LOC17 = typefits_418158(c, it, typ);
								LA18: ;
								if (!LOC17) goto LA19;
								LOC21 = 0;
								LOC21 = symtostr_415804(it, islocal_418402, ((NimStringDesc*) &TMP2635));
								suggestwriteln_197457(LOC21);
								(*outputs) += 1;
							}
							LA19: ;
							i_418543 += 1;
						} LA14: ;
					}
				}
				current_418549 = (*current_418549).Parent;
			} LA3: ;
		}
	}
}

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[(NI32)(LOC1 - 1)];
	return result;
}

N_NIMCALL(void, suggestobject_416304)(tcontext291021* c, tnode226816* n, NI* outputs) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_416322;
			NI HEX3Atmp_416395;
			NI LOC3;
			NI res_416398;
			i_416322 = 0;
			HEX3Atmp_416395 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227249(n);
			HEX3Atmp_416395 = (NI32)(LOC3 - 1);
			res_416398 = 0;
			{
				while (1) {
					if (!(res_416398 <= HEX3Atmp_416395)) goto LA5;
					i_416322 = res_416398;
					suggestobject_416304(c, (*n).kindU.S6.Sons->data[i_416322], outputs);
					res_416398 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		NI l;
		l = sonslen_227249(n);
		{
			if (!(0 < l)) goto LA9;
			suggestobject_416304(c, (*n).kindU.S6.Sons->data[0], outputs);
			{
				NI i_416365;
				NI HEX3Atmp_416401;
				NI res_416404;
				i_416365 = 0;
				HEX3Atmp_416401 = 0;
				HEX3Atmp_416401 = (NI32)(l - 1);
				res_416404 = 1;
				{
					while (1) {
						tnode226816* LOC14;
						if (!(res_416404 <= HEX3Atmp_416401)) goto LA13;
						i_416365 = res_416404;
						LOC14 = 0;
						LOC14 = lastson_227261((*n).kindU.S6.Sons->data[i_416365]);
						suggestobject_416304(c, LOC14, outputs);
						res_416404 += 1;
					} LA13: ;
				}
			}
		}
		LA9: ;
	}
	break;
	case ((NU8) 3):
	{
		suggestfield_416031(c, (*n).kindU.S4.Sym, outputs);
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(void, suggestfieldaccess_418669)(tcontext291021* c, tnode226816* n, NI* outputs) {
	ttype226852* typ;
	typ = (*n).Typ;
	{
		if (!(typ == NIM_NIL)) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = ((*n).Kind == ((NU8) 3));
			if (!(LOC7)) goto LA8;
			LOC7 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 6));
			LA8: ;
			if (!LOC7) goto LA9;
			{
				if (!((*n).kindU.S4.Sym == (*c).Module)) goto LA13;
				{
					tsym226846* it_418755;
					tstrtable226820 HEX3Atmp_418924;
					ttabiter236119 it_418927;
					tsym226846* s_418929;
					it_418755 = 0;
					memset((void*)(&HEX3Atmp_418924), 0, sizeof(HEX3Atmp_418924));
					HEX3Atmp_418924.Counter = (*(*c).Toplevelscope).Symbols.Counter;
					HEX3Atmp_418924.Data = (*(*c).Toplevelscope).Symbols.Data;
					memset((void*)(&it_418927), 0, sizeof(it_418927));
					s_418929 = inittabiter_236124((&it_418927), HEX3Atmp_418924);
					{
						while (1) {
							if (!!((s_418929 == NIM_NIL))) goto LA17;
							it_418755 = s_418929;
							{
								NIM_BOOL LOC20;
								NimStringDesc* LOC23;
								LOC20 = 0;
								LOC20 = filtersym_415813(it_418755);
								if (!LOC20) goto LA21;
								LOC23 = 0;
								LOC23 = symtostr_415804(it_418755, NIM_FALSE, ((NimStringDesc*) &TMP2635));
								suggestwriteln_197457(LOC23);
								(*outputs) += 1;
							}
							LA21: ;
							s_418929 = nextiter_236132((&it_418927), HEX3Atmp_418924);
						} LA17: ;
					}
				}
			}
			goto LA11;
			LA13: ;
			{
				{
					tsym226846* it_418796;
					tstrtable226820 HEX3Atmp_418931;
					ttabiter236119 it_418934;
					tsym226846* s_418936;
					it_418796 = 0;
					memset((void*)(&HEX3Atmp_418931), 0, sizeof(HEX3Atmp_418931));
					HEX3Atmp_418931.Counter = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Counter;
					HEX3Atmp_418931.Data = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Data;
					memset((void*)(&it_418934), 0, sizeof(it_418934));
					s_418936 = inittabiter_236124((&it_418934), HEX3Atmp_418931);
					{
						while (1) {
							if (!!((s_418936 == NIM_NIL))) goto LA27;
							it_418796 = s_418936;
							{
								NIM_BOOL LOC30;
								NimStringDesc* LOC33;
								LOC30 = 0;
								LOC30 = filtersym_415813(it_418796);
								if (!LOC30) goto LA31;
								LOC33 = 0;
								LOC33 = symtostr_415804(it_418796, NIM_FALSE, ((NimStringDesc*) &TMP2635));
								suggestwriteln_197457(LOC33);
								(*outputs) += 1;
							}
							LA31: ;
							s_418936 = nextiter_236132((&it_418934), HEX3Atmp_418931);
						} LA27: ;
					}
				}
			}
			LA11: ;
		}
		goto LA5;
		LA9: ;
		{
			suggesteverything_418583(c, n, outputs);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC36;
		NIM_BOOL LOC37;
		ttype226852* t;
		LOC36 = 0;
		LOC37 = 0;
		LOC37 = ((*typ).Kind == ((NU8) 14));
		if (!(LOC37)) goto LA38;
		LOC37 = ((*n).Kind == ((NU8) 3));
		LA38: ;
		LOC36 = LOC37;
		if (!(LOC36)) goto LA39;
		LOC36 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 7));
		LA39: ;
		if (!LOC36) goto LA40;
		t = typ;
		{
			while (1) {
				if (!!((t == NIM_NIL))) goto LA43;
				suggestsymlist_416216(c, (*t).N, outputs);
				t = (*t).Sons->data[0];
			} LA43: ;
		}
		suggestoperations_418202(c, n, typ, outputs);
	}
	goto LA1;
	LA40: ;
	{
		typ = skiptypes_231245(typ, 14682112);
		{
			ttype226852* t;
			if (!((*typ).Kind == ((NU8) 17))) goto LA47;
			t = typ;
			{
				while (1) {
					suggestobject_416304(c, (*t).N, outputs);
					{
						if (!((*t).Sons->data[0] == NIM_NIL)) goto LA53;
						goto LA49;
					}
					LA53: ;
					t = skiptypes_231245((*t).Sons->data[0], 2048);
				}
			} LA49: ;
			suggestoperations_418202(c, n, typ, outputs);
		}
		goto LA45;
		LA47: ;
		{
			NIM_BOOL LOC56;
			LOC56 = 0;
			LOC56 = ((*typ).Kind == ((NU8) 18));
			if (!(LOC56)) goto LA57;
			LOC56 = !(((*typ).N == NIM_NIL));
			LA57: ;
			if (!LOC56) goto LA58;
			suggestsymlist_416216(c, (*typ).N, outputs);
			suggestoperations_418202(c, n, typ, outputs);
		}
		goto LA45;
		LA58: ;
		{
			suggestoperations_418202(c, n, typ, outputs);
		}
		LA45: ;
	}
	LA1: ;
}

N_NIMCALL(tnode226816*, findclosestcall_419067)(tnode226816* n) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		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));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = incheckpoint_198411((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		{
			NI i_419114;
			NI HEX3Atmp_419147;
			NI LOC10;
			NI res_419150;
			i_419114 = 0;
			HEX3Atmp_419147 = 0;
			LOC10 = 0;
			LOC10 = safelen_227424(n);
			HEX3Atmp_419147 = (LOC10 - 1);
			res_419150 = 0;
			{
				while (1) {
					if (!(res_419150 <= HEX3Atmp_419147)) goto LA12;
					i_419114 = res_419150;
					result = findclosestcall_419067((*n).kindU.S6.Sons->data[i_419114]);
					{
						if (!!((result == NIM_NIL))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_419150 += 1;
				} LA12: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, HEX3Aanonymous_416608)(tsym226846* a, tsym226846* b) {
	NI result;
	result = 0;
	result = cmp_4517((*(*a).Name).S, (*(*b).Name).S);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, namefits_416427)(tcontext291021* c, tsym226846* s, tnode226816* n) {
	NIM_BOOL result;
	tnode226816* op;
	tident201021* opr;
	result = 0;
	op = (*n).kindU.S6.Sons->data[0];
	{
		if (!((*op).Kind == ((NU8) 57) || (*op).Kind == ((NU8) 56))) goto LA3;
		op = (*op).kindU.S6.Sons->data[0];
	}
	LA3: ;
	opr = 0;
	switch ((*op).Kind) {
	case ((NU8) 3):
	{
		opr = (*(*op).kindU.S4.Sym).Name;
	}
	break;
	case ((NU8) 2):
	{
		opr = (*op).kindU.S5.Ident;
	}
	break;
	default:
	{
		result = NIM_FALSE;
		goto BeforeRet;
	}
	break;
	}
	result = ((*opr).Sup.Id == (*(*s).Name).Sup.Id);
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, initcandidate_406295)(tcontext291021* ctx, tcandidate406209* c, tsym226846* callee, tnode226816* binding, NI calleescope) {
	initcandidateaux_406258(ctx, c, (*callee).Typ);
	unsureAsgnRef((void**) (&(*c).Calleesym), callee);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((520192 &(1<<(((*callee).Kind)&31)))!=0);
		if (!(LOC3)) goto LA4;
		LOC3 = (calleescope == -1);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			tsym226846* LOC9;
			tsym226846* rootsym;
			LOC9 = 0;
			LOC9 = originatingmodule_233754(callee);
			if (!(LOC9 == (*ctx).Module)) goto LA10;
			{
				if (!!((((*callee).Flags &(1<<((((NU8) 2))&31)))!=0))) goto LA14;
				rootsym = callee;
			}
			goto LA12;
			LA14: ;
			{
				rootsym = (*callee).Owner;
			}
			LA12: ;
			(*c).Calleescope = (*(*rootsym).kindU.S2.Scope).Depthlevel;
		}
		goto LA7;
		LA10: ;
		{
			(*c).Calleescope = 1;
		}
		LA7: ;
	}
	goto LA1;
	LA5: ;
	{
		(*c).Calleescope = calleescope;
	}
	LA1: ;
	initidtable_227167((&(*c).Bindings));
	genericSeqAssign((&(*c).Errors), NIM_NIL, (&NTI226818));
	{
		NIM_BOOL LOC21;
		tnode226816* typeparams;
		LOC21 = 0;
		LOC21 = !((binding == NIM_NIL));
		if (!(LOC21)) goto LA22;
		LOC21 = ((520192 &(1<<(((*callee).Kind)&31)))!=0);
		LA22: ;
		if (!LOC21) goto LA23;
		typeparams = HEX5BHEX5D_227698((*callee).Ast, 2);
		{
			NI i_406405;
			NI HEX3Atmp_406603;
			NI LOC26;
			NI LOC27;
			NI res_406606;
			i_406405 = 0;
			HEX3Atmp_406603 = 0;
			LOC26 = 0;
			LOC26 = sonslen_227249(typeparams);
			LOC27 = 0;
			LOC27 = sonslen_227249(binding);
			HEX3Atmp_406603 = ((LOC26 <= (NI32)(LOC27 - 1)) ? LOC26 : (NI32)(LOC27 - 1));
			res_406606 = 1;
			{
				while (1) {
					ttype226852* formaltypeparam;
					ttype226852* bound;
					tnode226816* LOC30;
					if (!(res_406606 <= HEX3Atmp_406603)) goto LA29;
					i_406405 = res_406606;
					formaltypeparam = (*(*typeparams).kindU.S6.Sons->data[(NI32)(i_406405 - 1)]).Typ;
					LOC30 = 0;
					LOC30 = HEX5BHEX5D_227698(binding, i_406405);
					bound = (*LOC30).Typ;
					{
						NIM_BOOL LOC33;
						LOC33 = 0;
						LOC33 = !((bound == NIM_NIL));
						if (!(LOC33)) goto LA34;
						LOC33 = !(((*formaltypeparam).Kind == ((NU8) 8)));
						LA34: ;
						if (!LOC33) goto LA35;
						bound = skiptypes_231245(bound, 256);
					}
					LA35: ;
					put_406283((&(*c).Bindings), formaltypeparam, bound);
					res_406606 += 1;
				} LA29: ;
			}
		}
	}
	LA23: ;
}

N_NIMCALL(void, preparenamedparam_413785)(tnode226816* a) {
	{
		tlineinfo196539 info;
		tident201021* LOC5;
		if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA3;
		info = (*(*a).kindU.S6.Sons->data[0]).Info;
		LOC5 = 0;
		LOC5 = considerquotedident_296010((*a).kindU.S6.Sons->data[0]);
		asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newidentnode_227125(LOC5, info));
	}
	LA3: ;
}

N_NIMCALL(tnode226816*, prepareoperand_413708)(tcontext291021* c, ttype226852* formal, tnode226816* a) {
	tnode226816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = ((*formal).Kind == ((NU8) 6));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = len_231005(formal);
		LOC3 = !((LOC5 == 1));
		LA4: ;
		if (!LOC3) goto LA6;
		result = a;
	}
	goto LA1;
	LA6: ;
	{
		NU16 flags;
		if (!(*a).Typ == 0) goto LA9;
		{
			if (!((*formal).Kind == ((NU8) 49))) goto LA13;
			flags = 18;
		}
		goto LA11;
		LA13: ;
		{
			if (!((*formal).Kind == ((NU8) 7))) goto LA16;
			flags = 24;
		}
		goto LA11;
		LA16: ;
		{
			flags = 16;
		}
		LA11: ;
		result = (*c).Semoperand(c, a, flags);
	}
	goto LA1;
	LA9: ;
	{
		result = a;
	}
	LA1: ;
	return result;
}

N_NIMCALL(ttype226852*, arrayconstr_413860)(tcontext291021* c, tnode226816* n) {
	ttype226852* result;
	ttype226852* LOC1;
	ttype226852* LOC2;
	ttype226852* LOC3;
	result = 0;
	result = newtypes_291214(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_283030(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_292351(c, IL64(0), IL64(0), (*n).Info, LOC1);
	rawaddson_231562(result, LOC2);
	LOC3 = 0;
	LOC3 = skiptypes_231245((*n).Typ, 8423424);
	addsonskipintlit_283572(result, LOC3);
	return result;
}

N_NIMCALL(void, setson_413653)(tnode226816* father, NI at, tnode226816* son) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_227249(father);
		if (!(LOC3 <= at)) goto LA4;
		(*father).kindU.S6.Sons = (tnodeseq226810*) setLengthSeq(&((*father).kindU.S6.Sons)->Sup, sizeof(tnode226816*), (NI32)(at + 1));
	}
	LA4: ;
	asgnRefNoCycle((void**) (&(*father).kindU.S6.Sons->data[at]), son);
}

N_NIMCALL(tnode226816*, prepareoperand_413762)(tcontext291021* c, tnode226816* a) {
	tnode226816* result;
	result = 0;
	{
		if (!(*a).Typ == 0) goto LA3;
		result = (*c).Semoperand(c, a, 16);
	}
	goto LA1;
	LA3: ;
	{
		result = a;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, incrindextype_413883)(ttype226852* t) {
	(*(*(*(*t).Sons->data[0]).N).kindU.S6.Sons->data[1]).kindU.S1.Intval += 1;
}

N_NIMCALL(void, matchesaux_414047)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m, intset223056* marker) {
	NI f;
	NI a;
	NI formallen;
	tnode226816* LOC6;
	tnode226816* container;
	tsym226846* formal;
	{
		if (!!(((*(*m).Callee).Kind == ((NU8) 10)))) goto LA3;
		f = 1;
	}
	goto LA1;
	LA3: ;
	{
		f = 0;
	}
	LA1: ;
	a = 1;
	(*m).State = ((NU8) 1);
	unsureAsgnRef((void**) (&(*m).Call), newnodei_227138((*n).Kind, (*n).Info));
	asgnRefNoCycle((void**) (&(*(*m).Call).Typ), base_264038((*m).Callee));
	formallen = len_227364((*(*m).Callee).N);
	LOC6 = 0;
	LOC6 = copytree_227329((*n).kindU.S6.Sons->data[0]);
	addson_227287((*m).Call, LOC6);
	container = NIM_NIL;
	formal = NIM_NIL;
	{
		while (1) {
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_227364(n);
			if (!(a < LOC9)) goto LA8;
			{
				tnode226816* arg;
				if (!((*(*n).kindU.S6.Sons->data[a]).Kind == ((NU8) 33))) goto LA12;
				preparenamedparam_413785((*n).kindU.S6.Sons->data[a]);
				{
					if (!!(((*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA16;
					localerror_198955((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 159), ((NimStringDesc*) &TMP2692));
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA16: ;
				formal = getsymfromlist_236228((*(*m).Callee).N, (*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[0]).kindU.S5.Ident, 1);
				{
					if (!(formal == NIM_NIL)) goto LA20;
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA20: ;
				{
					NIM_BOOL LOC24;
					LOC24 = 0;
					LOC24 = containsorincl_223916(marker, (*formal).Position);
					if (!LOC24) goto LA25;
					localerror_198955((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 143), (*(*formal).Name).S);
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA25: ;
				(*m).Basetypematch = NIM_FALSE;
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]), prepareoperand_413708(c, (*formal).Typ, (*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]));
				asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[a]).Typ), (*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]).Typ);
				arg = paramtypesmatch_413263(m, (*formal).Typ, (*(*n).kindU.S6.Sons->data[a]).Typ, (*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1], (*(*norig).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]);
				{
					if (!(arg == NIM_NIL)) goto LA29;
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA29: ;
				{
					if (!!((*formal).Constraint == 0)) goto LA33;
					{
						NIM_BOOL LOC37;
						LOC37 = 0;
						LOC37 = matchnodekinds_323381((*formal).Constraint, (*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]);
						if (!LOC37) goto LA38;
						(*m).Genericmatches += 100;
					}
					goto LA35;
					LA38: ;
					{
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA35: ;
				}
				LA33: ;
				{
					ttype226852* LOC45;
					if (!(*m).Basetypematch) goto LA43;
					LOC45 = 0;
					LOC45 = arrayconstr_413860(c, arg);
					container = newnodeit_227145(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC45);
					addson_227287(container, arg);
					setson_413653((*m).Call, (NI32)((*formal).Position + 1), container);
					{
						if (!!((f == (NI32)(formallen - 1)))) goto LA48;
						container = NIM_NIL;
					}
					LA48: ;
				}
				goto LA41;
				LA43: ;
				{
					setson_413653((*m).Call, (NI32)((*formal).Position + 1), arg);
				}
				LA41: ;
			}
			goto LA10;
			LA12: ;
			{
				{
					if (!(formallen <= f)) goto LA54;
					{
						if (!(((*(*m).Callee).Flags &(1<<((((NU8) 0))&31)))!=0)) goto LA58;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[a]), prepareoperand_413762(c, (*n).kindU.S6.Sons->data[a]));
						{
							ttype226852* LOC62;
							ttype226852* LOC65;
							tnode226816* LOC66;
							tnode226816* LOC67;
							LOC62 = 0;
							LOC62 = skiptypes_231245((*(*n).kindU.S6.Sons->data[a]).Typ, IL64(211106240964608));
							if (!((*LOC62).Kind == ((NU8) 28))) goto LA63;
							LOC65 = 0;
							LOC65 = getsystype_283030(((NU8) 29));
							LOC66 = 0;
							LOC66 = copytree_227329((*n).kindU.S6.Sons->data[a]);
							LOC67 = 0;
							LOC67 = implicitconv_412356(((NU8) 58), LOC65, LOC66, (&(*m)), c);
							addson_227287((*m).Call, LOC67);
						}
						goto LA60;
						LA63: ;
						{
							tnode226816* LOC69;
							LOC69 = 0;
							LOC69 = copytree_227329((*n).kindU.S6.Sons->data[a]);
							addson_227287((*m).Call, LOC69);
						}
						LA60: ;
					}
					goto LA56;
					LA58: ;
					{
						tnode226816* arg;
						if (!!((formal == NIM_NIL))) goto LA71;
						(*m).Basetypematch = NIM_FALSE;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[a]), prepareoperand_413708(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
						arg = paramtypesmatch_413263(m, (*formal).Typ, (*(*n).kindU.S6.Sons->data[a]).Typ, (*n).kindU.S6.Sons->data[a], (*norig).kindU.S6.Sons->data[a]);
						{
							NIM_BOOL LOC75;
							NIM_BOOL LOC76;
							LOC75 = 0;
							LOC76 = 0;
							LOC76 = !((arg == NIM_NIL));
							if (!(LOC76)) goto LA77;
							LOC76 = (*m).Basetypematch;
							LA77: ;
							LOC75 = LOC76;
							if (!(LOC75)) goto LA78;
							LOC75 = !((container == NIM_NIL));
							LA78: ;
							if (!LOC75) goto LA79;
							addson_227287(container, arg);
							incrindextype_413883((*container).Typ);
						}
						goto LA73;
						LA79: ;
						{
							(*m).State = ((NU8) 2);
							goto BeforeRet;
						}
						LA73: ;
					}
					goto LA56;
					LA71: ;
					{
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA56: ;
				}
				goto LA52;
				LA54: ;
				{
					tnode226816* arg;
					{
						if (!!(((*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).Kind == ((NU8) 3)))) goto LA86;
						internalerror_198987((*(*n).kindU.S6.Sons->data[a]).Info, ((NimStringDesc*) &TMP2709));
						goto BeforeRet;
					}
					LA86: ;
					formal = (*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).kindU.S4.Sym;
					{
						NIM_BOOL LOC90;
						LOC90 = 0;
						LOC90 = containsorincl_223916(marker, (*formal).Position);
						if (!LOC90) goto LA91;
						localerror_198955((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 143), (*(*formal).Name).S);
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA91: ;
					(*m).Basetypematch = NIM_FALSE;
					asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[a]), prepareoperand_413708(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
					arg = paramtypesmatch_413263(m, (*formal).Typ, (*(*n).kindU.S6.Sons->data[a]).Typ, (*n).kindU.S6.Sons->data[a], (*norig).kindU.S6.Sons->data[a]);
					{
						if (!(arg == NIM_NIL)) goto LA95;
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA95: ;
					{
						ttype226852* LOC101;
						tnode226816* LOC102;
						if (!(*m).Basetypematch) goto LA99;
						LOC101 = 0;
						LOC101 = arrayconstr_413860(c, arg);
						container = newnodeit_227145(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC101);
						addson_227287(container, arg);
						LOC102 = 0;
						LOC102 = implicitconv_412356(((NU8) 58), (*formal).Typ, container, (&(*m)), c);
						setson_413653((*m).Call, (NI32)((*formal).Position + 1), LOC102);
						{
							if (!!((f == (NI32)(formallen - 1)))) goto LA105;
							container = NIM_NIL;
						}
						LA105: ;
					}
					goto LA97;
					LA99: ;
					{
						setson_413653((*m).Call, (NI32)((*formal).Position + 1), arg);
					}
					LA97: ;
				}
				LA52: ;
				{
					if (!!((*formal).Constraint == 0)) goto LA110;
					{
						NIM_BOOL LOC114;
						LOC114 = 0;
						LOC114 = matchnodekinds_323381((*formal).Constraint, (*n).kindU.S6.Sons->data[a]);
						if (!LOC114) goto LA115;
						(*m).Genericmatches += 100;
					}
					goto LA112;
					LA115: ;
					{
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA112: ;
				}
				LA110: ;
			}
			LA10: ;
			a += 1;
			f += 1;
		} LA8: ;
	}
	BeforeRet: ;
}

N_NIMCALL(void, partialmatch_415367)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m) {
	intset223056 marker;
	memset((void*)(&marker), 0, sizeof(marker));
	chckNil((void*)(&marker));
	memset((void*)(&marker), 0, sizeof(marker));
	initintset_223950((&marker));
	matchesaux_414047(c, n, norig, m, (&marker));
}

N_NIMCALL(NIM_BOOL, argsfit_416509)(tcontext291021* c, tsym226846* candidate, tnode226816* n, tnode226816* norig) {
	NIM_BOOL result;
	result = 0;
	switch ((*candidate).Kind) {
	case ((NU8) 12):
	case ((NU8) 13):
	case ((NU8) 14):
	case ((NU8) 15):
	case ((NU8) 16):
	case ((NU8) 6):
	case ((NU8) 18):
	case ((NU8) 17):
	{
		tcandidate406209 m;
		memset((void*)(&m), 0, sizeof(m));
		initcandidate_406295(c, (&m), candidate, NIM_NIL, -1);
		partialmatch_415367(c, n, norig, (&m));
		result = !((m.State == ((NU8) 2)));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, suggestcall_416532)(tcontext291021* c, tnode226816* n_416535, tnode226816* norig, NI* outputs) {
	NIM_BOOL islocal_416540;
	islocal_416540 = NIM_TRUE;
	{
		tscope226840* scope_416542;
		tscope226840* HEX3Atmp_418121;
		tscope226840* current_418124;
		scope_416542 = 0;
		HEX3Atmp_418121 = 0;
		HEX3Atmp_418121 = (*c).Currentscope;
		current_418124 = HEX3Atmp_418121;
		{
			while (1) {
				tsymseq226818* entries_416544;
				tsymseq226818* result_416564;
				TY416638 LOC11;
				if (!!((current_418124 == NIM_NIL))) goto LA3;
				scope_416542 = current_418124;
				{
					if (!(scope_416542 == (*c).Toplevelscope)) goto LA6;
					islocal_416540 = NIM_FALSE;
				}
				LA6: ;
				result_416564 = (tsymseq226818*) newSeq((&NTI226818), 0);
				{
					tsym226846* x_416566;
					tstrtable226820 HEX3Atmp_418109;
					ttabiter236119 it_418112;
					tsym226846* s_418114;
					x_416566 = 0;
					memset((void*)(&HEX3Atmp_418109), 0, sizeof(HEX3Atmp_418109));
					HEX3Atmp_418109.Counter = (*scope_416542).Symbols.Counter;
					HEX3Atmp_418109.Data = (*scope_416542).Symbols.Data;
					memset((void*)(&it_418112), 0, sizeof(it_418112));
					s_418114 = inittabiter_236124((&it_418112), HEX3Atmp_418109);
					{
						while (1) {
							if (!!((s_418114 == NIM_NIL))) goto LA10;
							x_416566 = s_418114;
							result_416564 = (tsymseq226818*) incrSeq(&(result_416564)->Sup, sizeof(tsym226846*));
							asgnRefNoCycle((void**) (&result_416564->data[result_416564->Sup.len-1]), x_416566);
							s_418114 = nextiter_236132((&it_418112), HEX3Atmp_418109);
						} LA10: ;
					}
				}
				genericSeqAssign((&entries_416544), result_416564, (&NTI226818));
				memset((void*)(&LOC11), 0, sizeof(LOC11));
				LOC11.ClPrc = ((TMP2707) (HEX3Aanonymous_416608)); LOC11.ClEnv = NIM_NIL;
				sort_416619(entries_416544->data, entries_416544->Sup.len, LOC11, ((NU8) 1));
				{
					tsym226846* item_416546;
					NI i_418118;
					NI l_418120;
					item_416546 = 0;
					i_418118 = 0;
					l_418120 = entries_416544->Sup.len;
					{
						while (1) {
							tsym226846* it;
							if (!(i_418118 < l_418120)) goto LA14;
							item_416546 = entries_416544->data[i_418118];
							it = item_416546;
							{
								NIM_BOOL LOC17;
								NIM_BOOL LOC18;
								NimStringDesc* LOC23;
								LOC17 = 0;
								LOC18 = 0;
								LOC18 = filtersym_415813(it);
								if (!(LOC18)) goto LA19;
								LOC18 = namefits_416427(c, it, n_416535);
								LA19: ;
								LOC17 = LOC18;
								if (!(LOC17)) goto LA20;
								LOC17 = argsfit_416509(c, it, n_416535, norig);
								LA20: ;
								if (!LOC17) goto LA21;
								LOC23 = 0;
								LOC23 = symtostr_415804(it, islocal_416540, ((NimStringDesc*) &TMP2710));
								suggestwriteln_197457(LOC23);
								(*outputs) += 1;
							}
							LA21: ;
							i_418118 += 1;
						} LA14: ;
					}
				}
				current_418124 = (*current_418124).Parent;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, suggestexpr_422008)(tcontext291021* c, tnode226816* node) {
	NU8 cp;
	NI outputs;
	cp = incheckpoint_198411((*node).Info);
	{
		if (!(cp == ((NU8) 0))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	outputs = 0;
	{
		if (!(0 < (*c).Incompilescontext)) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	(*c).Incompilescontext += 1;
	{
		tnode226816* n;
		if (!((gglobaloptions_170118 &(1<<((((NU8) 23))&31)))!=0)) goto LA11;
		n = findclosestdot_418972(node);
		{
			if (!(n == NIM_NIL)) goto LA15;
			n = node;
		}
		goto LA13;
		LA15: ;
		{
			cp = ((NU8) 2);
		}
		LA13: ;
		{
			NIM_BOOL LOC20;
			tnode226816* obj;
			LOC20 = 0;
			LOC20 = ((*n).Kind == ((NU8) 45));
			if (!(LOC20)) goto LA21;
			LOC20 = (cp == ((NU8) 2));
			LA21: ;
			if (!LOC20) goto LA22;
			obj = safesemexpr_419308(c, (*n).kindU.S6.Sons->data[0]);
			suggestfieldaccess_418669(c, obj, (&outputs));
		}
		goto LA18;
		LA22: ;
		{
			suggesteverything_418583(c, n, (&outputs));
		}
		LA18: ;
	}
	LA11: ;
	{
		tnode226816* n;
		if (!((gglobaloptions_170118 &(1<<((((NU8) 24))&31)))!=0)) goto LA27;
		n = findclosestcall_419067(node);
		{
			if (!(n == NIM_NIL)) goto LA31;
			n = node;
		}
		goto LA29;
		LA31: ;
		{
			cp = ((NU8) 2);
		}
		LA29: ;
		{
			tnode226816* a;
			tnode226816* x_422161;
			if (!((*n).Kind == ((NU8) 27) || (*n).Kind == ((NU8) 29) || (*n).Kind == ((NU8) 30) || (*n).Kind == ((NU8) 31) || (*n).Kind == ((NU8) 26) || (*n).Kind == ((NU8) 28))) goto LA36;
			a = copynode_227323(n);
			x_422161 = safesemexpr_419308(c, (*n).kindU.S6.Sons->data[0]);
			{
				NIM_BOOL LOC40;
				LOC40 = 0;
				LOC40 = ((*x_422161).Kind == ((NU8) 1));
				if (LOC40) goto LA41;
				LOC40 = ((*x_422161).Typ == NIM_NIL);
				LA41: ;
				if (!LOC40) goto LA42;
				x_422161 = (*n).kindU.S6.Sons->data[0];
			}
			LA42: ;
			addson_227287(a, x_422161);
			{
				NI i_422212;
				NI HEX3Atmp_422282;
				NI LOC45;
				NI res_422285;
				i_422212 = 0;
				HEX3Atmp_422282 = 0;
				LOC45 = 0;
				LOC45 = sonslen_227249(n);
				HEX3Atmp_422282 = (NI32)(LOC45 - 1);
				res_422285 = 1;
				{
					while (1) {
						tnode226816* x;
						if (!(res_422285 <= HEX3Atmp_422282)) goto LA47;
						i_422212 = res_422285;
						x = safesemexpr_419308(c, (*n).kindU.S6.Sons->data[i_422212]);
						{
							NIM_BOOL LOC50;
							LOC50 = 0;
							LOC50 = ((*x).Kind == ((NU8) 1));
							if (LOC50) goto LA51;
							LOC50 = ((*x).Typ == NIM_NIL);
							LA51: ;
							if (!LOC50) goto LA52;
							goto LA44;
						}
						LA52: ;
						addson_227287(a, x);
						res_422285 += 1;
					} LA47: ;
				}
			} LA44: ;
			suggestcall_416532(c, a, n, (&outputs));
		}
		LA36: ;
	}
	LA27: ;
	(*c).Incompilescontext -= 1;
	{
		NIM_BOOL LOC56;
		LOC56 = 0;
		LOC56 = (0 < outputs);
		if (!(LOC56)) goto LA57;
		LOC56 = !(((gglobaloptions_170118 &(1<<((((NU8) 26))&31)))!=0));
		LA57: ;
		if (!LOC56) goto LA58;
		suggestquit_197846();
	}
	LA58: ;
	BeforeRet: ;
}

N_NIMCALL(void, newcandidate_406637)(tcontext291021* ctx, ttype226852* callee, tcandidate406209* Result) {
	initcandidate_406270(ctx, Result, callee);
}

N_NIMCALL(ttype226852*, arrayconstr_413872)(tcontext291021* c, tlineinfo196539 info) {
	ttype226852* result;
	ttype226852* LOC1;
	ttype226852* LOC2;
	ttype226852* LOC3;
	result = 0;
	result = newtypes_291214(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_283030(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_292351(c, IL64(0), IL64(-1), info, LOC1);
	rawaddson_231562(result, LOC2);
	LOC3 = 0;
	LOC3 = newtypes_291214(((NU8) 3), c);
	rawaddson_231562(result, LOC3);
	return result;
}

N_NIMCALL(void, matches_415382)(tcontext291021* c, tnode226816* n, tnode226816* norig, tcandidate406209* m) {
	intset223056 marker;
	NI f;
	memset((void*)(&marker), 0, sizeof(marker));
	chckNil((void*)(&marker));
	memset((void*)(&marker), 0, sizeof(marker));
	initintset_223950((&marker));
	matchesaux_414047(c, n, norig, m, (&marker));
	{
		if (!((*m).State == ((NU8) 2))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	f = 1;
	{
		while (1) {
			NI LOC7;
			tsym226846* formal;
			LOC7 = 0;
			LOC7 = sonslen_227249((*(*m).Callee).N);
			if (!(f < LOC7)) goto LA6;
			formal = (*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).kindU.S4.Sym;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = containsorincl_223916((&marker), (*formal).Position);
				if (!!(LOC10)) goto LA11;
				{
					if (!((*formal).Ast == NIM_NIL)) goto LA15;
					{
						tnode226816* container;
						ttype226852* LOC21;
						tnode226816* LOC22;
						if (!((*(*formal).Typ).Kind == ((NU8) 48))) goto LA19;
						LOC21 = 0;
						LOC21 = arrayconstr_413872(c, (*n).Info);
						container = newnodeit_227145(((NU8) 41), (*n).Info, LOC21);
						LOC22 = 0;
						LOC22 = implicitconv_412356(((NU8) 58), (*formal).Typ, container, (&(*m)), c);
						addson_227287((*m).Call, LOC22);
					}
					goto LA17;
					LA19: ;
					{
						(*m).State = ((NU8) 2);
						goto LA5;
					}
					LA17: ;
				}
				goto LA13;
				LA15: ;
				{
					tnode226816* LOC25;
					LOC25 = 0;
					LOC25 = copytree_227329((*formal).Ast);
					setson_413653((*m).Call, (NI32)((*formal).Position + 1), LOC25);
				}
				LA13: ;
			}
			LA11: ;
			f += 1;
		} LA6: ;
	} LA5: ;
	BeforeRet: ;
}

N_NIMCALL(NimStringDesc*, argtypetostring_407139)(tnode226816* arg, NU8 prefer) {
	NimStringDesc* result;
	result = 0;
	{
		tnode226816* LOC5;
		if (!((*arg).Kind == ((NU8) 56) || (*arg).Kind == ((NU8) 57))) goto LA3;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_227698(arg, 0);
		result = typetostring_264031((*LOC5).Typ, prefer);
		{
			NI i_407178;
			NI HEX3Atmp_407180;
			NI LOC7;
			NI res_407183;
			i_407178 = 0;
			HEX3Atmp_407180 = 0;
			LOC7 = 0;
			LOC7 = len_227364(arg);
			HEX3Atmp_407180 = (LOC7 - 1);
			res_407183 = 1;
			{
				while (1) {
					tnode226816* LOC10;
					NimStringDesc* LOC11;
					if (!(res_407183 <= HEX3Atmp_407180)) goto LA9;
					i_407178 = res_407183;
					result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP2905));
					LOC10 = 0;
					LOC10 = HEX5BHEX5D_227698(arg, i_407178);
					LOC11 = 0;
					LOC11 = typetostring_264031((*LOC10).Typ, prefer);
					result = resizeString(result, LOC11->Sup.len + 0);
appendString(result, LOC11);
					res_407183 += 1;
				} LA9: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		result = typetostring_264031((*arg).Typ, prefer);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, describeargs_407200)(tcontext291021* c, tnode226816* n, NI startidx, NU8 prefer) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2692));
	{
		NI i_407219;
		NI HEX3Atmp_407416;
		NI LOC2;
		NI res_407419;
		i_407219 = 0;
		HEX3Atmp_407416 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_407416 = (NI32)(LOC2 - 1);
		res_407419 = startidx;
		{
			while (1) {
				tnode226816* arg;
				NimStringDesc* LOC23;
				if (!(res_407419 <= HEX3Atmp_407416)) goto LA4;
				i_407219 = res_407419;
				arg = (*n).kindU.S6.Sons->data[i_407219];
				{
					NimStringDesc* LOC9;
					if (!((*(*n).kindU.S6.Sons->data[i_407219]).Kind == ((NU8) 33))) goto LA7;
					LOC9 = 0;
					LOC9 = rendertree_251058((*(*n).kindU.S6.Sons->data[i_407219]).kindU.S6.Sons->data[0], 0);
					result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2904));
					{
						if (!(*arg).Typ == 0) goto LA12;
						arg = (*c).Semoperand(c, (*(*n).kindU.S6.Sons->data[i_407219]).kindU.S6.Sons->data[1], 0);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_407219]).Typ), (*arg).Typ);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_407219]).kindU.S6.Sons->data[1]), arg);
					}
					LA12: ;
				}
				goto LA5;
				LA7: ;
				{
					{
						if (!(*arg).Typ == 0) goto LA17;
						arg = (*c).Semoperand(c, (*n).kindU.S6.Sons->data[i_407219], 0);
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_407219]), arg);
					}
					LA17: ;
				}
				LA5: ;
				{
					if (!((*(*arg).Typ).Kind == ((NU8) 50))) goto LA21;
					goto BeforeRet;
				}
				LA21: ;
				LOC23 = 0;
				LOC23 = argtypetostring_407139(arg, prefer);
				result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
				{
					NI LOC26;
					LOC26 = 0;
					LOC26 = sonslen_227249(n);
					if (!!((i_407219 == (NI32)(LOC26 - 1)))) goto LA27;
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2906));
				}
				LA27: ;
				res_407419 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, suggeststmt_422299)(tcontext291021* c, tnode226816* n) {
	suggestexpr_422008(c, n);
}

N_NIMCALL(tnode226816*, usesym_422001)(tsym226846* sym) {
	tnode226816* result;
	result = 0;
	result = newsymnode_227132(sym);
	markused_406251((*result).Info, sym);
	return result;
}

N_NIMCALL(void, semfinishoperands_415292)(tcontext291021* c, tnode226816* n) {
	{
		NI i_415317;
		NI HEX3Atmp_415347;
		NI LOC2;
		NI res_415350;
		i_415317 = 0;
		HEX3Atmp_415347 = 0;
		LOC2 = 0;
		LOC2 = len_227364(n);
		HEX3Atmp_415347 = (LOC2 - 1);
		res_415350 = 1;
		{
			while (1) {
				if (!(res_415350 <= HEX3Atmp_415347)) goto LA4;
				i_415317 = res_415350;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_415317]), prepareoperand_413762(c, (*n).kindU.S6.Sons->data[i_415317]));
				res_415350 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(NU8, cmptypes_412293)(tcontext291021* c, ttype226852* f, ttype226852* a) {
	NU8 result;
	tcandidate406209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406270(c, (&m), f);
	result = typerel_407436((&m), f, a, NIM_TRUE);
	return result;
}

N_NIMCALL(tsym226846*, instdeepcopy_415518)(tcontext291021* c, tsym226846* dc, ttype226852* t, tlineinfo196539 info) {
	tsym226846* result;
	tcandidate406209 m;
	ttype226852* f;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_406270(c, (&m), (*dc).Typ);
	f = (*(*dc).Typ).Sons->data[1];
	{
		if (!((*f).Kind == ((NU8) 22) || (*f).Kind == ((NU8) 21))) goto LA3;
		f = lastson_227267(f);
	}
	LA3: ;
	{
		NU8 LOC7;
		LOC7 = 0;
		LOC7 = typerel_407436((&m), f, t, NIM_TRUE);
		if (!(LOC7 == ((NU8) 0))) goto LA8;
		localerror_198955(info, ((NU16) 4), ((NimStringDesc*) &TMP3341));
	}
	goto LA5;
	LA8: ;
	{
		result = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, dc, m.Bindings, info, (*c).Semgenerateinstance.ClEnv):((TMP3342)((*c).Semgenerateinstance.ClPrc))(c, dc, m.Bindings, info);
	}
	LA5: ;
	return result;
}

N_NIMCALL(NI, HEX3Aanonymous_420101)(tentry419478 a, tentry419478 b) {
	NI result;
	result = 0;
	result = cmp_420107(a.Pos, b.Pos);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, deffromline_420076)(TY419485** entries, NI32 col) {
	TY420144 LOC6;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_419758((*entries), NIM_NIL);
		if (!LOC3) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	memset((void*)(&LOC6), 0, sizeof(LOC6));
	LOC6.ClPrc = ((TMP4853) (HEX3Aanonymous_420101)); LOC6.ClEnv = NIM_NIL;
	sort_420125((*entries)->data, (*entries)->Sup.len, LOC6, ((NU8) 1));
	{
		tentry419478 e_421811;
		TY419485* HEX3Atmp_421813;
		NI i_421816;
		NI l_421818;
		memset((void*)(&e_421811), 0, sizeof(e_421811));
		HEX3Atmp_421813 = 0;
		unsureAsgnRef((void**) (&HEX3Atmp_421813), (*entries));
		i_421816 = 0;
		l_421818 = HEX3Atmp_421813->Sup.len;
		{
			while (1) {
				if (!(i_421816 < l_421818)) goto LA9;
				e_421811.Pos = HEX3Atmp_421813->data[i_421816].Pos;
				e_421811.Sym = HEX3Atmp_421813->data[i_421816].Sym;
				{
					NimStringDesc* LOC14;
					if (!(((NI) (col)) <= e_421811.Pos)) goto LA12;
					LOC14 = 0;
					LOC14 = symtostr_415804(e_421811.Sym, NIM_FALSE, ((NimStringDesc*) &TMP2699));
					suggestwriteln_197457(LOC14);
					goto BeforeRet;
				}
				LA12: ;
				i_421816 += 1;
			} LA9: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(void, deffromsourcemap_421834)(tlineinfo196539 i) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = (((NI) (i.Fileindex)) < gsourcemaps_419508->Sup.len);
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = HEX3DHEX3D_419632(gsourcemaps_419508->data[i.Fileindex].Lines, NIM_NIL);
		LOC4 = !(LOC6);
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA7;
		LOC3 = (((NI) (i.Line)) < gsourcemaps_419508->data[i.Fileindex].Lines->Sup.len);
		LA7: ;
		if (!!(LOC3)) goto LA8;
		goto BeforeRet;
	}
	LA8: ;
	deffromline_420076((&gsourcemaps_419508->data[i.Fileindex].Lines->data[i.Line].Entries), ((NI32) (i.Col)));
	BeforeRet: ;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_sigmatchInit)(void) {
	if (gsourcemaps_419508) nimGCunrefNoCycle(gsourcemaps_419508);
	gsourcemaps_419508 = (TY419487*) newSeqRC1((&NTI419487), 0);
}

NIM_EXTERNC N_NOINLINE(void, HEX00_sigmatchDatInit)(void) {
static TNimNode* TMP935[2];
static TNimNode* TMP2702[19];
static TNimNode* TMP2703[3];
NI TMP2705;
static char* NIM_CONST TMP2704[3] = {
"csEmpty", 
"csMatch", 
"csNoMatch"};
static TNimNode TMP883[29];
NTI419476.size = sizeof(tsourcemap419476);
NTI419476.kind = 18;
NTI419476.base = 0;
NTI419476.flags = 2;
NTI419480.size = sizeof(tlinemap419480);
NTI419480.kind = 18;
NTI419480.base = 0;
NTI419480.flags = 2;
NTI419478.size = sizeof(tentry419478);
NTI419478.kind = 18;
NTI419478.base = 0;
NTI419478.flags = 2;
TMP935[0] = &TMP883[3];
TMP883[3].kind = 1;
TMP883[3].offset = offsetof(tentry419478, Pos);
TMP883[3].typ = (&NTI108);
TMP883[3].name = "pos";
TMP935[1] = &TMP883[4];
TMP883[4].kind = 1;
TMP883[4].offset = offsetof(tentry419478, Sym);
TMP883[4].typ = (&NTI226814);
TMP883[4].name = "sym";
TMP883[2].len = 2; TMP883[2].kind = 2; TMP883[2].sons = &TMP935[0];
NTI419478.node = &TMP883[2];
NTI419485.size = sizeof(TY419485*);
NTI419485.kind = 24;
NTI419485.base = (&NTI419478);
NTI419485.flags = 2;
NTI419485.marker = TMP936;
TMP883[1].kind = 1;
TMP883[1].offset = offsetof(tlinemap419480, Entries);
TMP883[1].typ = (&NTI419485);
TMP883[1].name = "entries";
NTI419480.node = &TMP883[1];
NTI419481.size = sizeof(TY419481*);
NTI419481.kind = 24;
NTI419481.base = (&NTI419480);
NTI419481.flags = 2;
NTI419481.marker = TMP937;
TMP883[0].kind = 1;
TMP883[0].offset = offsetof(tsourcemap419476, Lines);
TMP883[0].typ = (&NTI419481);
TMP883[0].name = "lines";
NTI419476.node = &TMP883[0];
NTI419487.size = sizeof(TY419487*);
NTI419487.kind = 24;
NTI419487.base = (&NTI419476);
NTI419487.flags = 2;
NTI419487.marker = TMP938;
NTI406209.size = sizeof(tcandidate406209);
NTI406209.kind = 18;
NTI406209.base = 0;
TMP2702[0] = &TMP883[6];
TMP883[6].kind = 1;
TMP883[6].offset = offsetof(tcandidate406209, C);
TMP883[6].typ = (&NTI291019);
TMP883[6].name = "c";
TMP2702[1] = &TMP883[7];
TMP883[7].kind = 1;
TMP883[7].offset = offsetof(tcandidate406209, Exactmatches);
TMP883[7].typ = (&NTI108);
TMP883[7].name = "exactMatches";
TMP2702[2] = &TMP883[8];
TMP883[8].kind = 1;
TMP883[8].offset = offsetof(tcandidate406209, Genericmatches);
TMP883[8].typ = (&NTI108);
TMP883[8].name = "genericMatches";
TMP2702[3] = &TMP883[9];
TMP883[9].kind = 1;
TMP883[9].offset = offsetof(tcandidate406209, Subtypematches);
TMP883[9].typ = (&NTI108);
TMP883[9].name = "subtypeMatches";
TMP2702[4] = &TMP883[10];
TMP883[10].kind = 1;
TMP883[10].offset = offsetof(tcandidate406209, Intconvmatches);
TMP883[10].typ = (&NTI108);
TMP883[10].name = "intConvMatches";
TMP2702[5] = &TMP883[11];
TMP883[11].kind = 1;
TMP883[11].offset = offsetof(tcandidate406209, Convmatches);
TMP883[11].typ = (&NTI108);
TMP883[11].name = "convMatches";
TMP2702[6] = &TMP883[12];
NTI406205.size = sizeof(NU8);
NTI406205.kind = 14;
NTI406205.base = 0;
NTI406205.flags = 3;
for (TMP2705 = 0; TMP2705 < 3; TMP2705++) {
TMP883[TMP2705+13].kind = 1;
TMP883[TMP2705+13].offset = TMP2705;
TMP883[TMP2705+13].name = TMP2704[TMP2705];
TMP2703[TMP2705] = &TMP883[TMP2705+13];
}
TMP883[16].len = 3; TMP883[16].kind = 2; TMP883[16].sons = &TMP2703[0];
NTI406205.node = &TMP883[16];
TMP883[12].kind = 1;
TMP883[12].offset = offsetof(tcandidate406209, State);
TMP883[12].typ = (&NTI406205);
TMP883[12].name = "state";
TMP2702[7] = &TMP883[17];
TMP883[17].kind = 1;
TMP883[17].offset = offsetof(tcandidate406209, Callee);
TMP883[17].typ = (&NTI226812);
TMP883[17].name = "callee";
TMP2702[8] = &TMP883[18];
TMP883[18].kind = 1;
TMP883[18].offset = offsetof(tcandidate406209, Calleesym);
TMP883[18].typ = (&NTI226814);
TMP883[18].name = "calleeSym";
TMP2702[9] = &TMP883[19];
TMP883[19].kind = 1;
TMP883[19].offset = offsetof(tcandidate406209, Calleescope);
TMP883[19].typ = (&NTI108);
TMP883[19].name = "calleeScope";
TMP2702[10] = &TMP883[20];
TMP883[20].kind = 1;
TMP883[20].offset = offsetof(tcandidate406209, Call);
TMP883[20].typ = (&NTI226808);
TMP883[20].name = "call";
TMP2702[11] = &TMP883[21];
TMP883[21].kind = 1;
TMP883[21].offset = offsetof(tcandidate406209, Bindings);
TMP883[21].typ = (&NTI226864);
TMP883[21].name = "bindings";
TMP2702[12] = &TMP883[22];
TMP883[22].kind = 1;
TMP883[22].offset = offsetof(tcandidate406209, Basetypematch);
TMP883[22].typ = (&NTI138);
TMP883[22].name = "baseTypeMatch";
TMP2702[13] = &TMP883[23];
TMP883[23].kind = 1;
TMP883[23].offset = offsetof(tcandidate406209, Proxymatch);
TMP883[23].typ = (&NTI138);
TMP883[23].name = "proxyMatch";
TMP2702[14] = &TMP883[24];
TMP883[24].kind = 1;
TMP883[24].offset = offsetof(tcandidate406209, Genericconverter);
TMP883[24].typ = (&NTI138);
TMP883[24].name = "genericConverter";
TMP2702[15] = &TMP883[25];
TMP883[25].kind = 1;
TMP883[25].offset = offsetof(tcandidate406209, Coercedistincts);
TMP883[25].typ = (&NTI138);
TMP883[25].name = "coerceDistincts";
TMP2702[16] = &TMP883[26];
TMP883[26].kind = 1;
TMP883[26].offset = offsetof(tcandidate406209, Typedescmatched);
TMP883[26].typ = (&NTI138);
TMP883[26].name = "typedescMatched";
TMP2702[17] = &TMP883[27];
TMP883[27].kind = 1;
TMP883[27].offset = offsetof(tcandidate406209, Inheritancepenalty);
TMP883[27].typ = (&NTI108);
TMP883[27].name = "inheritancePenalty";
TMP2702[18] = &TMP883[28];
TMP883[28].kind = 1;
TMP883[28].offset = offsetof(tcandidate406209, Errors);
TMP883[28].typ = (&NTI226818);
TMP883[28].name = "errors";
TMP883[5].len = 19; TMP883[5].kind = 2; TMP883[5].sons = &TMP2702[0];
NTI406209.node = &TMP883[5];
}

