/* 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 tsym225846 tsym225846;
typedef struct tlineinfo195539 tlineinfo195539;
typedef struct TY418487 TY418487;
typedef struct tsourcemap418476 tsourcemap418476;
typedef struct TY418481 TY418481;
typedef struct tlinemap418480 tlinemap418480;
typedef struct TY418485 TY418485;
typedef struct tentry418478 tentry418478;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tcell44935 tcell44935;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcstat47014 tgcstat47014;
typedef struct tcontext290021 tcontext290021;
typedef struct tnode225816 tnode225816;
typedef struct ttype225852 ttype225852;
typedef struct NimStringDesc NimStringDesc;
typedef struct tident200021 tident200021;
typedef struct tnodeseq225810 tnodeseq225810;
typedef struct tpasscontext286005 tpasscontext286005;
typedef struct TNimObject TNimObject;
typedef struct tscope225840 tscope225840;
typedef struct tproccon290011 tproccon290011;
typedef struct tsymseq225818 tsymseq225818;
typedef struct intset222056 intset222056;
typedef struct ttrunk222052 ttrunk222052;
typedef struct ttrunkseq222054 ttrunkseq222054;
typedef struct tlinkedlist127028 tlinkedlist127028;
typedef struct tlistentry127022 tlistentry127022;
typedef struct tidtable225864 tidtable225864;
typedef struct tidpairseq225862 tidpairseq225862;
typedef struct tidpair225860 tidpair225860;
typedef struct tidobj200015 tidobj200015;
typedef struct tstrtable225820 tstrtable225820;
typedef struct tctx289048 tctx289048;
typedef struct TY290133 TY290133;
typedef struct tinstantiationpair290013 tinstantiationpair290013;
typedef struct tinstantiation225836 tinstantiation225836;
typedef struct Exception Exception;
typedef struct TSafePoint TSafePoint;
typedef struct ttypeseq225848 ttypeseq225848;
typedef struct TY225947 TY225947;
typedef struct tloc225830 tloc225830;
typedef struct trope177009 trope177009;
typedef struct tlib225834 tlib225834;
typedef struct ttabiter235119 ttabiter235119;
typedef struct TY195621 TY195621;
typedef struct tfileinfo195537 tfileinfo195537;
typedef struct TY195552 TY195552;
typedef struct tdocumentor400007 tdocumentor400007;
typedef struct tcandidate405209 tcandidate405209;
typedef struct TY84745 TY84745;
typedef struct TY196414 TY196414;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
typedef struct TY289250 TY289250;
typedef struct pprocHEX3Aobjecttype289230 pprocHEX3Aobjecttype289230;
typedef struct TY289269 TY289269;
typedef struct TY289270 TY289270;
typedef struct vmargs289042 vmargs289042;
typedef struct TY225936 TY225936;
typedef struct trstgenerator358016 trstgenerator358016;
typedef struct stringtableobj131012 stringtableobj131012;
typedef struct TY358034 TY358034;
typedef struct ttocentry358012 ttocentry358012;
typedef struct trstnode342011 trstnode342011;
typedef struct table358052 table358052;
typedef struct keyvaluepairseq358055 keyvaluepairseq358055;
typedef struct keyvaluepair358058 keyvaluepair358058;
typedef struct TY289231 TY289231;
typedef struct tblock289030 tblock289030;
typedef struct TY289211 TY289211;
typedef struct TY289237 TY289237;
typedef struct keyvaluepairseq131010 keyvaluepairseq131010;
typedef struct keyvaluepair131008 keyvaluepair131008;
typedef struct trstnodeseq342009 trstnodeseq342009;
struct  tlineinfo195539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tentry418478  {
NI Pos;
tsym225846* Sym;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tlinemap418480  {
TY418485* Entries;
};
struct  tsourcemap418476  {
TY418481* 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  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode225816  {
ttype225852* Typ;
tlineinfo195539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym225846* Sym;
} S4;
struct {tident200021* Ident;
} S5;
struct {tnodeseq225810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tpasscontext286005  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  intset222056  {
NI Counter;
NI Max;
ttrunk222052* Head;
ttrunkseq222054* Data;
};
struct  tlinkedlist127028  {
tlistentry127022* Head;
tlistentry127022* Tail;
NI Counter;
};
struct  tidpair225860  {
tidobj200015* Key;
TNimObject* Val;
};
struct  tidtable225864  {
NI Counter;
tidpairseq225862* Data;
};
typedef N_NIMCALL_PTR(tnode225816*, TY290064) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290069) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290077) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290085) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290090) (tcontext290021* c, tnode225816* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode225816*, TY290098) (tcontext290021* c, tnode225816* n);
typedef N_NIMCALL_PTR(tnode225816*, TY290103) (tcontext290021* c, tnode225816* n, tnode225816* norig, NU32 filter);
typedef N_NIMCALL_PTR(ttype225852*, TY290110) (tcontext290021* c, tnode225816* n, ttype225852* prev);
typedef struct {
N_NIMCALL_PTR(tnode225816*, ClPrc) (tcontext290021* c, tidtable225864 pt, tnode225816* n, void* ClEnv);
void* ClEnv;
} TY290116;
typedef struct {
N_NIMCALL_PTR(tsym225846*, ClPrc) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info, void* ClEnv);
void* ClEnv;
} TY290122;
struct  tstrtable225820  {
NI Counter;
tsymseq225818* Data;
};
struct  tinstantiationpair290013  {
tsym225846* Genericsym;
tinstantiation225836* Inst;
};
typedef N_NIMCALL_PTR(tsym225846*, TY290138) (tcontext290021* c, tsym225846* dc, ttype225852* t, tlineinfo195539 info);
struct  tcontext290021  {
  tpasscontext286005 Sup;
tsym225846* Module;
tscope225840* Currentscope;
tscope225840* Importtable;
tscope225840* Toplevelscope;
tproccon290011* P;
tsymseq225818* Friendmodules;
NI Instcounter;
intset222056 Ambiguoussymbols;
NI Intypeclass;
NI Ingenericcontext;
NI Inunrolledcontext;
NI Incompilescontext;
NI Ingenericinst;
tsymseq225818* Converters;
tsymseq225818* Patterns;
tlinkedlist127028 Optionstack;
tidtable225864 Symmapping;
tlinkedlist127028 Libs;
TY290064 Semconstexpr;
TY290069 Semexpr;
TY290077 Semtryexpr;
TY290085 Semtryconstexpr;
TY290090 Semoperand;
TY290098 Semconstboolexpr;
TY290103 Semoverloadedcall;
TY290110 Semtypenode;
TY290116 Seminferredlambda;
TY290122 Semgenerateinstance;
intset222056 Includedfiles;
tstrtable225820 Userpragmas;
tctx289048* Evalcontext;
intset222056 Unknownidents;
TY290133* Generics;
NI Lastgenericidx;
NI Hloloopdetector;
NI Inparallelstmt;
TY290138 Instdeepcopy;
};
struct  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  tidobj200015  {
  TNimObject Sup;
NI Id;
};
struct  tloc225830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype225852* T;
trope177009* R;
trope177009* Heaproot;
};
struct  tsym225846  {
  tidobj200015 Sup;
NU8 Kind;
union {
struct {ttypeseq225848* Typeinstcache;
tscope225840* Typscope;
} S1;
struct {TY225947* Procinstcache;
tscope225840* Scope;
} S2;
struct {TY225947* Usedgenerics;
tstrtable225820 Tab;
} S3;
struct {tsym225846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype225852* Typ;
tident200021* Name;
tlineinfo195539 Info;
tsym225846* Owner;
NU32 Flags;
tnode225816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc225830 Loc;
tlib225834* Annex;
tnode225816* Constraint;
};
struct  tscope225840  {
NI Depthlevel;
tstrtable225820 Symbols;
tnodeseq225810* Usingsyms;
tscope225840* Parent;
};
struct  ttabiter235119  {
NI H;
};
struct  tident200021  {
  tidobj200015 Sup;
NimStringDesc* S;
tident200021* Next;
NI H;
};
struct  tfileinfo195537  {
NimStringDesc* Fullpath;
NimStringDesc* Projpath;
NimStringDesc* Shortname;
trope177009* Quotedname;
TY195552* Lines;
};
struct  ttype225852  {
  tidobj200015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq225848* Sons;
tnode225816* N;
tsym225846* Owner;
tsym225846* Sym;
tsym225846* Destructor;
tsym225846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc225830 Loc;
};
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tsym225846* x_415632, tsym225846* y_415634, void* ClEnv);
void* ClEnv;
} TY415638;
typedef N_CLOSURE_PTR(NI, TMP2635) (tsym225846* x_417477, tsym225846* y_417479, void* ClEnv);
struct  tcandidate405209  {
tcontext290021* C;
NI Exactmatches;
NI Genericmatches;
NI Subtypematches;
NI Intconvmatches;
NI Convmatches;
NU8 State;
ttype225852* Callee;
tsym225846* Calleesym;
NI Calleescope;
tnode225816* Call;
tidtable225864 Bindings;
NIM_BOOL Basetypematch;
NIM_BOOL Proxymatch;
NIM_BOOL Genericconverter;
NIM_BOOL Coercedistincts;
NIM_BOOL Typedescmatched;
NI Inheritancepenalty;
tsymseq225818* Errors;
};
typedef ttype225852* TY411748[1];
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
typedef N_CLOSURE_PTR(tnode225816*, TMP2693) (tcontext290021* c, tidtable225864 pt, tnode225816* n);
typedef N_CLOSURE_PTR(tsym225846*, TMP2694) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info);
typedef N_CLOSURE_PTR(NI, TMP2704) (tsym225846* x_415615, tsym225846* y_415617, void* ClEnv);
typedef N_CLOSURE_PTR(tsym225846*, TMP3344) (tcontext290021* c, tsym225846* fn, tidtable225864 pt, tlineinfo195539 info);
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tentry418478 x_419138, tentry418478 y_419140, void* ClEnv);
void* ClEnv;
} TY419144;
typedef N_CLOSURE_PTR(NI, TMP4855) (tentry418478 x_419121, tentry418478 y_419123, void* ClEnv);
typedef NI TY26420[16];
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tproccon290011  {
tsym225846* Owner;
tsym225846* Resultsym;
NI Nestedloopcounter;
NI Nestedblockcounter;
NI Intrystmt;
tproccon290011* Next;
};
struct  ttrunk222052  {
ttrunk222052* Next;
NI Key;
TY26420 Bits;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  vmargs289042  {
NI Ra;
NI Rb;
NI Rc;
void* Slots;
tnode225816* Currentexception;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (vmargs289042* args, void* ClEnv);
void* ClEnv;
} vmcallback289044;
struct TY289270 {
NimStringDesc* Field0;
vmcallback289044 Field1;
};
struct  tctx289048  {
  tpasscontext286005 Sup;
TY289250* Code;
TY196414* Debug;
tnode225816* Globals;
tnode225816* Constants;
ttypeseq225848* Types;
tnode225816* Currentexceptiona;
tnode225816* Currentexceptionb;
NI Exceptioninstr;
pprocHEX3Aobjecttype289230* Prc;
tsym225846* Module;
tnode225816* Callsite;
NU8 Mode;
NU8 Features;
NIM_BOOL Traceactive;
NI Loopiterations;
tlineinfo195539 Comesfromheuristic;
TY289269* Callbacks;
NimStringDesc* Errorflag;
};
struct  tinstantiation225836  {
tsym225846* Sym;
ttypeseq225848* Concretetypes;
TY225936* Usedby;
};
struct  trope177009  {
  TNimObject Sup;
trope177009* Left;
trope177009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlib225834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope177009* Name;
tnode225816* Path;
};
struct  ttocentry358012  {
trstnode342011* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler343023) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler343021) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY358042[5];
struct keyvaluepair358058 {
NU8 Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  table358052  {
keyvaluepairseq358055* Data;
NI Counter;
};
struct  trstgenerator358016  {
  TNimObject Sup;
NU8 Target;
stringtableobj131012* Config;
NI Splitafter;
TY358034* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler343023 Findfile;
tmsghandler343021 Msghandler;
NimStringDesc* Filename;
TY358042 Meta;
NimStringDesc* Currentsection;
table358052 Seenindexterms;
};
typedef trope177009* tsections400005[26];
struct  tdocumentor400007  {
  trstgenerator358016 Sup;
trope177009* Moddesc;
NI Id;
tsections400005 Toc;
tsections400005 Section;
NimStringDesc* Indexvalfilename;
stringtableobj131012* Seensymbols;
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
struct  tblock289030  {
tsym225846* Label;
TY289211* Fixups;
};
struct TY289237 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY289237 TY289234[256];
struct  pprocHEX3Aobjecttype289230  {
TY289231* Blocks;
tsym225846* Sym;
TY289234 Slots;
NI Maxslots;
};
struct keyvaluepair131008 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  stringtableobj131012  {
  TNimObject Sup;
NI Counter;
keyvaluepairseq131010* Data;
NU8 Mode;
};
struct  trstnode342011  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq342009* Sons;
};
struct TY418485 {
  TGenericSeq Sup;
  tentry418478 data[SEQ_DECL_SIZE];
};
struct TY418481 {
  TGenericSeq Sup;
  tlinemap418480 data[SEQ_DECL_SIZE];
};
struct TY418487 {
  TGenericSeq Sup;
  tsourcemap418476 data[SEQ_DECL_SIZE];
};
struct tnodeseq225810 {
  TGenericSeq Sup;
  tnode225816* data[SEQ_DECL_SIZE];
};
struct tsymseq225818 {
  TGenericSeq Sup;
  tsym225846* data[SEQ_DECL_SIZE];
};
struct ttrunkseq222054 {
  TGenericSeq Sup;
  ttrunk222052* data[SEQ_DECL_SIZE];
};
struct tidpairseq225862 {
  TGenericSeq Sup;
  tidpair225860 data[SEQ_DECL_SIZE];
};
struct TY290133 {
  TGenericSeq Sup;
  tinstantiationpair290013 data[SEQ_DECL_SIZE];
};
struct ttypeseq225848 {
  TGenericSeq Sup;
  ttype225852* data[SEQ_DECL_SIZE];
};
struct TY225947 {
  TGenericSeq Sup;
  tinstantiation225836* data[SEQ_DECL_SIZE];
};
struct TY195552 {
  TGenericSeq Sup;
  trope177009* data[SEQ_DECL_SIZE];
};
struct TY195621 {
  TGenericSeq Sup;
  tfileinfo195537 data[SEQ_DECL_SIZE];
};
struct TY196414 {
  TGenericSeq Sup;
  tlineinfo195539 data[SEQ_DECL_SIZE];
};
struct TY289250 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY289269 {
  TGenericSeq Sup;
  TY289270 data[SEQ_DECL_SIZE];
};
struct TY225936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY358034 {
  TGenericSeq Sup;
  ttocentry358012 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq358055 {
  TGenericSeq Sup;
  keyvaluepair358058 data[SEQ_DECL_SIZE];
};
struct TY289211 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY289231 {
  TGenericSeq Sup;
  tblock289030 data[SEQ_DECL_SIZE];
};
struct keyvaluepairseq131010 {
  TGenericSeq Sup;
  keyvaluepair131008 data[SEQ_DECL_SIZE];
};
struct trstnodeseq342009 {
  TGenericSeq Sup;
  trstnode342011* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP923)(void* p, NI op);
N_NIMCALL(void, TMP924)(void* p, NI op);
N_NIMCALL(void, TMP925)(void* p, NI op);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, ensureidx_418534)(TY418487** x_418540, NI y_418543);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NU8, incheckpoint_197411)(tlineinfo195539 current);
N_NIMCALL(tnode225816*, findclosestdot_417972)(tnode225816* n);
static N_INLINE(NI, safelen_226424)(tnode225816* n);
N_NIMCALL(tnode225816*, safesemexpr_418308)(tcontext290021* c, tnode225816* 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_51025)(tcell44935* c);
static N_INLINE(NIM_BOOL, canbecycleroot_48667)(tcell44935* c);
static N_INLINE(void, rtladdcycleroot_49429)(tcell44935* c);
N_NOINLINE(void, incl_45671)(tcellset44947* s, tcell44935* cell);
static N_INLINE(void, decref_50604)(tcell44935* c);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, suggestfieldaccess_417669)(tcontext290021* c, tnode225816* n, NI* outputs);
N_NIMCALL(tsym225846*, inittabiter_235124)(ttabiter235119* ti, tstrtable225820 tab);
static N_INLINE(NIM_BOOL, filtersym_414813)(tsym225846* s);
N_NIMCALL(void, suggestwriteln_196457)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, symtostr_414804)(tsym225846* s, NIM_BOOL islocal, NimStringDesc* section);
N_NIMCALL(NimStringDesc*, symtostr_414620)(tsym225846* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo195539 li);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_80907, TNimType* typ);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, origmodulename_414613)(tsym225846* m);
N_NIMCALL(NimStringDesc*, typetostring_263031)(ttype225852* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, tofullpath_197037)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_197073)(tlineinfo195539 info);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(NI, tocolumn_197083)(tlineinfo195539 info);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, extractdoccomment_400721)(tsym225846* s, tdocumentor400007* d);
N_NIMCALL(tsym225846*, nextiter_235132)(ttabiter235119* ti, tstrtable225820 tab);
N_NIMCALL(void, suggesteverything_417583)(tcontext290021* c, tnode225816* n, NI* outputs);
N_NIMCALL(void, suggestsymlist_415216)(tcontext290021* c, tnode225816* list, NI* outputs);
static N_INLINE(NI, sonslen_226249)(tnode225816* n);
N_NIMCALL(void, suggestfield_415031)(tcontext290021* c, tsym225846* s, NI* outputs);
static N_INLINE(NIM_BOOL, fieldvisible_414842)(tcontext290021* c, tsym225846* f);
N_NIMCALL(tsym225846*, getmodule_235243)(tsym225846* s);
N_NIMCALL(void, suggestoperations_417202)(tcontext290021* c, tnode225816* n, ttype225852* 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_79604, TNimType* mt);
N_NIMCALL(void, sort_415619)(tsym225846** a_415627, NI a_415627Len0, TY415638 cmp_415637, NU8 order_415640);
N_NIMCALL(NI, HEX3Aanonymous_417470)(tsym225846* a, tsym225846* b);
N_NIMCALL(NI, cmp_4517)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(NIM_BOOL, typefits_417158)(tcontext290021* c, tsym225846* s, ttype225852* firstarg);
static N_INLINE(NI, sonslen_226255)(ttype225852* n);
N_NIMCALL(NIM_BOOL, argtypematches_414484)(tcontext290021* c, ttype225852* f, ttype225852* a);
N_NIMCALL(void, initcandidate_405270)(tcontext290021* ctx, tcandidate405209* c, ttype225852* callee);
static N_INLINE(void, initcandidateaux_405258)(tcontext290021* ctx, tcandidate405209* c, ttype225852* callee);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, initidtable_226167)(tidtable225864* x);
N_NIMCALL(tnode225816*, paramtypesmatch_412263)(tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg, tnode225816* argorig);
N_NIMCALL(tnode225816*, paramtypesmatchaux_411647)(tcandidate405209* m, ttype225852* f, ttype225852* argtype_411652, tnode225816* argsemantized, tnode225816* argorig);
N_NIMCALL(ttype225852*, skiptypes_230245)(ttype225852* t, NU64 kinds);
N_NIMCALL(void, assigntype_226210)(ttype225852* dest, ttype225852* src);
N_NIMCALL(tnode225816*, newnodei_226138)(NU8 kind, tlineinfo195539 info);
N_NIMCALL(ttype225852*, maketypefromexpr_290812)(tcontext290021* c, tnode225816* n);
N_NIMCALL(ttype225852*, newtypes_290214)(NU8 kind, tcontext290021* c);
N_NIMCALL(NU8, typerel_406436)(tcandidate405209* c, ttype225852* f, ttype225852* aorig, NIM_BOOL dobind);
static N_INLINE(void, put_405283)(tidtable225864* t, ttype225852* key, ttype225852* val);
N_NIMCALL(void, idtableput_235196)(tidtable225864* t, tidobj200015* key, TNimObject* val);
N_NIMCALL(ttype225852*, maybeskipdistinct_408369)(ttype225852* t, tsym225846* callee);
N_NIMCALL(NIM_BOOL, shouldskipdistinct_408273)(tnode225816* rules, tident200021* callident);
static N_INLINE(NI, len_226364)(tnode225816* n);
N_NIMCALL(tident200021*, considerquotedident_295010)(tnode225816* n);
N_NIMCALL(ttype225852*, base_263038)(ttype225852* t);
static N_INLINE(ttype225852*, lastson_226267)(ttype225852* n);
static N_INLINE(NIM_BOOL, sameenumtypes_269230)(ttype225852* a, ttype225852* b);
N_NOINLINE(NU8, typerangerel_408035)(ttype225852* f, ttype225852* a);
N_NIMCALL(NI64, firstord_263004)(ttype225852* t);
N_NIMCALL(NI64, lastord_263010)(ttype225852* t);
N_NIMCALL(NIM_BOOL, isconvertibletorange_406676)(ttype225852* f, ttype225852* a);
N_NIMCALL(NU8, handlerange_406499)(ttype225852* f, ttype225852* a, NU8 min, NU8 max);
static N_INLINE(NIM_BOOL, isintlit_263386)(ttype225852* t);
static N_INLINE(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i);
N_NIMCALL(NU8, handlefloatrange_406743)(ttype225852* f, ttype225852* a);
static N_INLINE(NIM_BOOL, isfloatlit_263431)(ttype225852* t);
N_NIMCALL(TNimObject*, idtableget_235182)(tidtable225864 t, tidobj200015* key);
N_NIMCALL(ttype225852*, newtypewithsons_290823)(tcontext290021* c, NU8 kind, ttypeseq225848* sons);
N_NIMCALL(ttype225852*, getsystype_282030)(NU8 kind);
N_NIMCALL(tnode225816*, newintnode_226096)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lengthord_263016)(ttype225852* t);
static N_INLINE(NU8, allowsnil_407537)(ttype225852* f);
N_NIMCALL(NIM_BOOL, isordinaltype_263092)(ttype225852* t);
N_NIMCALL(void, internalerror_198006)(NimStringDesc* errmsg);
N_NIMCALL(NU8, recordrel_407281)(tcandidate405209* c, ttype225852* f, ttype225852* a);
N_NIMCALL(NIM_BOOL, sametype_268351)(ttype225852* a, ttype225852* b, NU8 flags);
N_NIMCALL(NU8, minrel_407261)(NU8 a, NU8 b);
N_NIMCALL(void, internalerror_197987)(tlineinfo195539 info, NimStringDesc* errmsg);
N_NIMCALL(NIM_BOOL, sameobjecttypes_269146)(ttype225852* a, ttype225852* b);
N_NIMCALL(NI, isobjectsubtype_406802)(ttype225852* a, ttype225852* f);
static N_INLINE(NIM_BOOL, samedistincttypes_269219)(ttype225852* a, ttype225852* b);
N_NIMCALL(NI, len_230005)(ttype225852* n);
N_NIMCALL(NU8, proctyperel_407681)(tcandidate405209* c, ttype225852* f, ttype225852* a);
N_NIMCALL(NU8, procparamtyperel_407598)(tcandidate405209* c, ttype225852* f_407602, ttype225852* a);
N_NIMCALL(NIM_BOOL, ismetatype_226752)(ttype225852* t);
N_NIMCALL(ttype225852*, generatetypeinstance_320503)(tcontext290021* p, tidtable225864 pt, tlineinfo195539 info, ttype225852* t);
static N_INLINE(NIM_BOOL, inconsistentvartypes_407560)(ttype225852* f, ttype225852* a);
N_NIMCALL(NIM_BOOL, compatibleeffects_273131)(ttype225852* formal, ttype225852* actual);
N_NIMCALL(ttype225852*, skipgenericalias_269619)(ttype225852* t);
static N_INLINE(ttype225852*, skipintlit_282531)(ttype225852* t);
N_NIMCALL(ttype225852*, concretetype_406446)(tcandidate405209* c, ttype225852* t);
N_NIMCALL(ttype225852*, newtype_226083)(NU8 kind, tsym225846* owner);
N_NIMCALL(void, addsonskipintlit_282572)(ttype225852* father, ttype225852* son);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NU8, matchusertypeclass_408050)(tcontext290021* c, tcandidate405209* m, ttype225852* ff, ttype225852* a);
N_NIMCALL(tscope225840*, openscope_295191)(tcontext290021* c);
N_NIMCALL(tsym225846*, newsym_226074)(NU8 symkind, tident200021* name, tsym225846* owner, tlineinfo195539 info);
N_NIMCALL(ttype225852*, maketypedesc_290763)(tcontext290021* c, ttype225852* typ);
N_NIMCALL(void, adddecl_295694)(tcontext290021* c, tsym225846* sym);
N_NIMCALL(ttype225852*, makevartype_290207)(tcontext290021* c, ttype225852* basetype);
N_NIMCALL(NimStringDesc*, HEX24_198126)(TY84745 x_198130);
N_NIMCALL(tnode225816*, copytree_226329)(tnode225816* src);
N_NIMCALL(void, clearbufferedmsgs_196449)(void);
N_NIMCALL(void, closescope_295211)(tcontext290021* c);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_273497)(ttypeseq225848* x_273503, ttypeseq225848* y_273508);
N_NIMCALL(tnode225816*, replacetypesinbody_320489)(tcontext290021* p, tidtable225864 pt, tnode225816* n);
N_NIMCALL(NIM_BOOL, exprstructuralequivalent_261184)(tnode225816* a, tnode225816* b);
N_NIMCALL(void, localerror_197955)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NIM_BOOL, isinlineiterator_411610)(ttype225852* t);
N_NIMCALL(tnode225816*, implicitconv_411356)(NU8 kind, ttype225852* f, tnode225816* arg, tcandidate405209* m, tcontext290021* c);
N_NIMCALL(NIM_BOOL, containsgenerictype_272929)(ttype225852* t);
N_NIMCALL(ttype225852*, getinstantiatedtype_411309)(tcontext290021* c, tnode225816* arg, tcandidate405209* m, ttype225852* f);
N_NIMCALL(ttype225852*, errortype_291319)(tcontext290021* c);
N_NIMCALL(void, addson_226287)(tnode225816* father, tnode225816* son);
N_NIMCALL(tnode225816*, newsymnode_227755)(tsym225846* sym, tlineinfo195539 info);
N_NIMCALL(tnode225816*, userconvmatch_411387)(tcontext290021* c, tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg);
N_NIMCALL(void, markused_405251)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, message_197976)(tlineinfo195539 info, NU16 msg, NimStringDesc* arg);
static N_INLINE(void, suggestsym_420882)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, findusages_418417)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(NIM_BOOL, istracked_418164)(tlineinfo195539 current, NI tokenlen);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_197579)(tlineinfo195539 a, tlineinfo195539 b);
N_NIMCALL(void, finddefinition_418457)(tlineinfo195539 info, tsym225846* s);
N_NIMCALL(void, suggestquit_196846)(void);
N_NIMCALL(void, addtosourcemap_418598)(tsym225846* sym, tlineinfo195539 info);
N_NIMCALL(void, ensureseq_418618)(TY418481** x_418626);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418632)(TY418481* x_418638, TY418481* y_418643);
N_NIMCALL(void, ensureidx_418962)(TY418481** x_418968, NI y_418971);
N_NIMCALL(void, ensureseq_419006)(TY418485** x_419014);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418758)(TY418485* x_418764, TY418485* y_418769);
N_NIMCALL(tnode225816*, newsymnode_226132)(tsym225846* sym);
N_NIMCALL(tnode225816*, newnodeit_226145)(NU8 kind, tlineinfo195539 info, ttype225852* typ);
N_NIMCALL(tnode225816*, localconvmatch_411500)(tcontext290021* c, tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg);
N_NIMCALL(void, add_226498)(tnode225816* father, tnode225816* son);
N_NIMCALL(void, copycandidate_405649)(tcandidate405209* a, tcandidate405209* b);
N_NIMCALL(void, copyidtable_226241)(tidtable225864* dest, tidtable225864 src);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NI, cmpcandidates_406039)(tcandidate405209* a, tcandidate405209* b);
N_NIMCALL(NI, complexdisambiguation_405757)(ttype225852* a, ttype225852* b);
N_NIMCALL(NI, sumgeneric_405661)(ttype225852* t_405663);
N_NIMCALL(void, suggestobject_415304)(tcontext290021* c, tnode225816* n, NI* outputs);
static N_INLINE(tnode225816*, lastson_226261)(tnode225816* n);
N_NIMCALL(tnode225816*, findclosestcall_418067)(tnode225816* n);
N_NIMCALL(tnode225816*, copynode_226323)(tnode225816* src);
N_NIMCALL(void, suggestcall_415532)(tcontext290021* c, tnode225816* n_415535, tnode225816* norig, NI* outputs);
N_NIMCALL(NI, HEX3Aanonymous_415608)(tsym225846* a, tsym225846* b);
N_NIMCALL(NIM_BOOL, namefits_415427)(tcontext290021* c, tsym225846* s, tnode225816* n);
N_NIMCALL(NIM_BOOL, argsfit_415509)(tcontext290021* c, tsym225846* candidate, tnode225816* n, tnode225816* norig);
N_NIMCALL(void, initcandidate_405295)(tcontext290021* ctx, tcandidate405209* c, tsym225846* callee, tnode225816* binding, NI calleescope);
N_NIMCALL(tsym225846*, originatingmodule_232754)(tsym225846* s);
N_NIMCALL(void, partialmatch_414367)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m);
N_NIMCALL(void, initintset_222950)(intset222056* Result);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, matchesaux_413047)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m, intset222056* marker);
N_NIMCALL(void, preparenamedparam_412785)(tnode225816* a);
N_NIMCALL(tnode225816*, newidentnode_226125)(tident200021* ident, tlineinfo195539 info);
N_NIMCALL(tsym225846*, getsymfromlist_235228)(tnode225816* list, tident200021* ident, NI start);
N_NIMCALL(NIM_BOOL, containsorincl_222916)(intset222056* s, NI key);
N_NIMCALL(tnode225816*, prepareoperand_412708)(tcontext290021* c, ttype225852* formal, tnode225816* a);
N_NIMCALL(NIM_BOOL, matchnodekinds_322381)(tnode225816* p, tnode225816* n);
N_NIMCALL(ttype225852*, arrayconstr_412860)(tcontext290021* c, tnode225816* n);
N_NIMCALL(void, rawaddson_230562)(ttype225852* father, ttype225852* son);
N_NIMCALL(ttype225852*, makerangetype_291351)(tcontext290021* c, NI64 first, NI64 last, tlineinfo195539 info, ttype225852* inttype);
N_NIMCALL(void, setson_412653)(tnode225816* father, NI at, tnode225816* son);
N_NIMCALL(tnode225816*, prepareoperand_412762)(tcontext290021* c, tnode225816* a);
N_NIMCALL(void, incrindextype_412883)(ttype225852* t);
N_NIMCALL(ttype225852*, arrayconstr_412872)(tcontext290021* c, tlineinfo195539 info);
N_NIMCALL(NimStringDesc*, rendertree_250058)(tnode225816* n, NU8 renderflags);
N_NIMCALL(NimStringDesc*, argtypetostring_406139)(tnode225816* arg, NU8 prefer);
N_NIMCALL(void, suggestexpr_421008)(tcontext290021* c, tnode225816* node);
N_NIMCALL(void, deffromline_419076)(TY418485** entries, NI32 col);
N_NIMCALL(void, sort_419125)(tentry418478* a_419133, NI a_419133Len0, TY419144 cmp_419143, NU8 order_419146);
N_NIMCALL(NI, HEX3Aanonymous_419101)(tentry418478 a, tentry418478 b);
N_NIMCALL(NI, cmp_419107)(NI x_419111, NI y_419113);
STRING_LITERAL(TMP2631, "\"", 1);
STRING_LITERAL(TMP2632, "sug", 3);
STRING_LITERAL(TMP2662, "forward type in typeRel()", 25);
STRING_LITERAL(TMP2666, "recordRel", 9);
STRING_LITERAL(TMP2681, "wrong instantiated type!", 24);
STRING_LITERAL(TMP2682, "cannot resolve type: ", 21);
STRING_LITERAL(TMP2686, "compiler/sigmatch.nim", 21);
NIM_CONST TY84745 TMP2685 = {((NimStringDesc*) &TMP2686),
483}
;
NIM_CONST TY84745 TMP2688 = {((NimStringDesc*) &TMP2686),
931}
;
STRING_LITERAL(TMP2689, "", 0);
NIM_CONST TY84745 TMP2690 = {((NimStringDesc*) &TMP2686),
1024}
;
STRING_LITERAL(TMP2691, "getInstantiatedType", 19);
STRING_LITERAL(TMP2692, "implicitConv", 12);
STRING_LITERAL(TMP2695, "use", 3);
STRING_LITERAL(TMP2696, "def", 3);
STRING_LITERAL(TMP2703, "x.state is not csMatch", 22);
STRING_LITERAL(TMP2706, "matches", 7);
STRING_LITERAL(TMP2707, "con", 3);
STRING_LITERAL(TMP2906, ": ", 2);
STRING_LITERAL(TMP2907, " | ", 3);
STRING_LITERAL(TMP2908, ", ", 2);
STRING_LITERAL(TMP3343, "cannot instantiate \'deepCopy\'", 29);
tsym225846* usagesym_418415;
tlineinfo195539 lastlineinfo_418416;
TY418487* gsourcemaps_418508;
TNimType NTI418476; /* TSourceMap */
TNimType NTI418480; /* TLineMap */
TNimType NTI418478; /* TEntry */
extern TNimType NTI108; /* int */
extern TNimType NTI225814; /* PSym */
TNimType NTI418485; /* seq[TEntry] */
TNimType NTI418481; /* seq[TLineMap] */
TNimType NTI418487; /* seq[TSourceMap] */
extern tgcheap47016 gch_47044;
extern NU32 gglobaloptions_169118;
extern TSafePoint* exchandler_16243;
extern TNimType NTI195545; /* ERecoverableError */
extern Exception* currexception_16245;
extern tnode225816* emptynode_226738;
extern TNimType NTI225445; /* TSymKind */
extern NI32 gdirtybufferidx_169134;
extern TY195621* fileinfos_195642;
extern NI32 gdirtyoriginalidx_169135;
extern TNimType NTI225818; /* TSymSeq */
extern TNimType NTI225848; /* TTypeSeq */
extern TY196414* checkpoints_197151;
extern NIM_BOOL isserving_169133;
TNimType NTI405209; /* TCandidate */
extern TNimType NTI290019; /* PContext */
TNimType NTI405205; /* TCandidateState */
extern TNimType NTI225812; /* PType */
extern TNimType NTI225808; /* PNode */
extern TNimType NTI225864; /* TIdTable */
extern TNimType NTI138; /* bool */
N_NIMCALL(void, TMP923)(void* p, NI op) {
	TY418485* a;
	NI LOC1;
	a = (TY418485*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Sym, op);
	}
}
N_NIMCALL(void, TMP924)(void* p, NI op) {
	TY418481* a;
	NI LOC1;
	a = (TY418481*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Entries, op);
	}
}
N_NIMCALL(void, TMP925)(void* p, NI op) {
	TY418487* a;
	NI LOC1;
	a = (TY418487*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Lines, op);
	}
}

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

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

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

N_NIMCALL(void, ensureidx_418534)(TY418487** x_418540, NI y_418543) {
	{
		if (!((*x_418540)->Sup.len <= y_418543)) goto LA3;
		(*x_418540) = (TY418487*) setLengthSeq(&((*x_418540))->Sup, sizeof(tsourcemap418476), (NI32)(y_418543 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, resetsourcemap_418529)(NI32 fileidx) {
	ensureidx_418534((&gsourcemaps_418508), ((NI) (fileidx)));
	if (gsourcemaps_418508->data[fileidx].Lines) nimGCunrefNoCycle(gsourcemaps_418508->data[fileidx].Lines);
	gsourcemaps_418508->data[fileidx].Lines = (TY418481*) newSeqRC1((&NTI418481), 0);
}

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

N_NIMCALL(tnode225816*, findclosestdot_417972)(tnode225816* n) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 45));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = incheckpoint_197411((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		{
			NI i_418015;
			NI HEX3Atmp_418048;
			NI LOC10;
			NI res_418051;
			i_418015 = 0;
			HEX3Atmp_418048 = 0;
			LOC10 = 0;
			LOC10 = safelen_226424(n);
			HEX3Atmp_418048 = (LOC10 - 1);
			res_418051 = 0;
			{
				while (1) {
					if (!(res_418051 <= HEX3Atmp_418048)) goto LA12;
					i_418015 = res_418051;
					result = findclosestdot_417972((*n).kindU.S6.Sons->data[i_418015]);
					{
						if (!!((result == NIM_NIL))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_418051 += 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_48667)(tcell44935* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).Typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

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

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

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

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

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

N_NIMCALL(tnode225816*, safesemexpr_418308)(tcontext290021* c, tnode225816* n) {
	tnode225816* volatile result;
	TSafePoint TMP1979;
	result = 0;
	pushSafePoint(&TMP1979);
	TMP1979.status = _setjmp(TMP1979.context);
	if (TMP1979.status == 0) {
		result = (*c).Semexpr(c, n, 0);
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI195545))) {
			TMP1979.status = 0;
			result = emptynode_226738;
			popCurrentException();
		}
	}
	if (TMP1979.status != 0) reraiseException();
	return result;
}

static N_INLINE(NIM_BOOL, filtersym_414813)(tsym225846* 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_414613)(tsym225846* m) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*m).Position == ((NI) (gdirtybufferidx_169134)))) goto LA3;
		result = copyString(fileinfos_195642->data[gdirtyoriginalidx_169135].Shortname);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString((*(*m).Name).S);
	}
	LA1: ;
	return result;
}

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

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

N_NIMCALL(NimStringDesc*, symtostr_414620)(tsym225846* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo195539 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, (&NTI225445))->Sup.len + 0);
appendString(result, reprEnum((*s).Kind, (&NTI225445)));
	result = addChar(result, 9);
	{
		NIM_BOOL LOC3;
		tsym225846* 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;
			tsym225846* 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_414613(ow2);
			result = resizeString(result, LOC13->Sup.len + 0);
appendString(result, LOC13);
			result = addChar(result, 46);
		}
		LA11: ;
		LOC14 = 0;
		LOC14 = origmodulename_414613(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_263031((*s).Typ, ((NU8) 0));
		result = resizeString(result, LOC19->Sup.len + 0);
appendString(result, LOC19);
	}
	LA17: ;
	result = addChar(result, 9);
	LOC20 = 0;
	LOC20 = tofullpath_197037(li.Fileindex);
	result = resizeString(result, LOC20->Sup.len + 0);
appendString(result, LOC20);
	result = addChar(result, 9);
	LOC21 = 0;
	LOC21 = tolinenumber_197073(li);
	LOC22 = 0;
	LOC22 = nimIntToStr(LOC21);
	result = resizeString(result, LOC22->Sup.len + 0);
appendString(result, LOC22);
	result = addChar(result, 9);
	LOC23 = 0;
	LOC23 = tocolumn_197083(li);
	LOC24 = 0;
	LOC24 = nimIntToStr(LOC23);
	result = resizeString(result, LOC24->Sup.len + 0);
appendString(result, LOC24);
	result = addChar(result, 9);
	LOC25 = 0;
	LOC25 = extractdoccomment_400721(s, NIM_NIL);
	LOC26 = 0;
	LOC26 = nsuEscape(LOC25, ((NimStringDesc*) &TMP2631), ((NimStringDesc*) &TMP2631));
	result = resizeString(result, LOC26->Sup.len + 0);
appendString(result, LOC26);
	return result;
}

N_NIMCALL(NimStringDesc*, symtostr_414804)(tsym225846* s, NIM_BOOL islocal, NimStringDesc* section) {
	NimStringDesc* result;
	result = 0;
	result = symtostr_414620(s, islocal, section, (*s).Info);
	return result;
}

N_NIMCALL(void, suggesteverything_417583)(tcontext290021* c, tnode225816* n, NI* outputs) {
	NIM_BOOL islocal;
	islocal = NIM_TRUE;
	{
		tscope225840* scope_417590;
		tscope225840* HEX3Atmp_417644;
		tscope225840* current_417647;
		scope_417590 = 0;
		HEX3Atmp_417644 = 0;
		HEX3Atmp_417644 = (*c).Currentscope;
		current_417647 = HEX3Atmp_417644;
		{
			while (1) {
				if (!!((current_417647 == NIM_NIL))) goto LA3;
				scope_417590 = current_417647;
				{
					if (!(scope_417590 == (*c).Toplevelscope)) goto LA6;
					islocal = NIM_FALSE;
				}
				LA6: ;
				{
					tsym225846* it_417607;
					tstrtable225820 HEX3Atmp_417638;
					ttabiter235119 it_417641;
					tsym225846* s_417643;
					it_417607 = 0;
					memset((void*)(&HEX3Atmp_417638), 0, sizeof(HEX3Atmp_417638));
					HEX3Atmp_417638.Counter = (*scope_417590).Symbols.Counter;
					HEX3Atmp_417638.Data = (*scope_417590).Symbols.Data;
					memset((void*)(&it_417641), 0, sizeof(it_417641));
					s_417643 = inittabiter_235124((&it_417641), HEX3Atmp_417638);
					{
						while (1) {
							if (!!((s_417643 == NIM_NIL))) goto LA10;
							it_417607 = s_417643;
							{
								NIM_BOOL LOC13;
								NimStringDesc* LOC16;
								LOC13 = 0;
								LOC13 = filtersym_414813(it_417607);
								if (!LOC13) goto LA14;
								LOC16 = 0;
								LOC16 = symtostr_414804(it_417607, islocal, ((NimStringDesc*) &TMP2632));
								suggestwriteln_196457(LOC16);
								(*outputs) += 1;
							}
							LA14: ;
							s_417643 = nextiter_235132((&it_417641), HEX3Atmp_417638);
						} LA10: ;
					}
				}
				{
					if (!(scope_417590 == (*c).Toplevelscope)) goto LA19;
					goto LA1;
				}
				LA19: ;
				current_417647 = (*current_417647).Parent;
			} LA3: ;
		}
	} LA1: ;
}

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

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

N_NIMCALL(void, suggestfield_415031)(tcontext290021* c, tsym225846* s, NI* outputs) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = filtersym_414813(s);
		if (!(LOC3)) goto LA4;
		LOC3 = fieldvisible_414842(c, s);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = symtostr_414804(s, NIM_TRUE, ((NimStringDesc*) &TMP2632));
		suggestwriteln_196457(LOC7);
		(*outputs) += 1;
	}
	LA5: ;
}

N_NIMCALL(void, suggestsymlist_415216)(tcontext290021* c, tnode225816* list, NI* outputs) {
	{
		NI i_415234;
		NI HEX3Atmp_415287;
		NI LOC2;
		NI res_415290;
		i_415234 = 0;
		HEX3Atmp_415287 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226249(list);
		HEX3Atmp_415287 = (NI32)(LOC2 - 1);
		res_415290 = 0;
		{
			while (1) {
				if (!(res_415290 <= HEX3Atmp_415287)) goto LA4;
				i_415234 = res_415290;
				{
					if (!((*(*list).kindU.S6.Sons->data[i_415234]).Kind == ((NU8) 3))) goto LA7;
					suggestfield_415031(c, (*(*list).kindU.S6.Sons->data[i_415234]).kindU.S4.Sym, outputs);
				}
				LA7: ;
				res_415290 += 1;
			} LA4: ;
		}
	}
}

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

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

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

static N_INLINE(void, initcandidateaux_405258)(tcontext290021* ctx, tcandidate405209* c, ttype225852* 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_405270)(tcontext290021* ctx, tcandidate405209* c, ttype225852* callee) {
	initcandidateaux_405258(ctx, c, callee);
	unsureAsgnRef((void**) (&(*c).Calleesym), NIM_NIL);
	initidtable_226167((&(*c).Bindings));
}

static N_INLINE(void, put_405283)(tidtable225864* t, ttype225852* key, ttype225852* val) {
	tidobj200015* LOC1;
	TNimObject* LOC2;
	LOC1 = 0;
	LOC1 = &key->Sup;
	LOC2 = 0;
	LOC2 = &val->Sup.Sup;
	idtableput_235196(t, LOC1, LOC2);
}

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

N_NIMCALL(NIM_BOOL, shouldskipdistinct_408273)(tnode225816* rules, tident200021* callident) {
	NIM_BOOL result;
	result = 0;
	{
		if (!((*rules).Kind == ((NU8) 130))) goto LA3;
		{
			tnode225816* r_408287;
			r_408287 = 0;
			{
				NI i_408325;
				NI HEX3Atmp_408327;
				NI LOC7;
				NI res_408329;
				i_408325 = 0;
				HEX3Atmp_408327 = 0;
				LOC7 = 0;
				LOC7 = len_226364(rules);
				HEX3Atmp_408327 = (LOC7 - 1);
				res_408329 = 0;
				{
					while (1) {
						if (!(res_408329 <= HEX3Atmp_408327)) goto LA9;
						i_408325 = res_408329;
						r_408287 = (*rules).kindU.S6.Sons->data[i_408325];
						{
							tident200021* LOC12;
							LOC12 = 0;
							LOC12 = considerquotedident_295010(r_408287);
							if (!(LOC12 == callident)) goto LA13;
							result = NIM_TRUE;
							goto BeforeRet;
						}
						LA13: ;
						res_408329 += 1;
					} LA9: ;
				}
			}
		}
		result = NIM_FALSE;
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		{
			tnode225816* r_408304;
			r_408304 = 0;
			{
				NI i_408334;
				NI HEX3Atmp_408336;
				NI LOC18;
				NI res_408338;
				i_408334 = 0;
				HEX3Atmp_408336 = 0;
				LOC18 = 0;
				LOC18 = len_226364(rules);
				HEX3Atmp_408336 = (LOC18 - 1);
				res_408338 = 0;
				{
					while (1) {
						if (!(res_408338 <= HEX3Atmp_408336)) goto LA20;
						i_408334 = res_408338;
						r_408304 = (*rules).kindU.S6.Sons->data[i_408334];
						{
							tident200021* LOC23;
							LOC23 = 0;
							LOC23 = considerquotedident_295010(r_408304);
							if (!(LOC23 == callident)) goto LA24;
							result = NIM_FALSE;
							goto BeforeRet;
						}
						LA24: ;
						res_408338 += 1;
					} LA20: ;
				}
			}
		}
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype225852*, maybeskipdistinct_408369)(ttype225852* t, tsym225846* callee) {
	ttype225852* 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_408273((*t).N, (*callee).Name);
		LA8: ;
		if (!LOC3) goto LA9;
		result = base_263038(t);
	}
	goto LA1;
	LA9: ;
	{
		result = t;
	}
	LA1: ;
	return result;
}

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

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

N_NOINLINE(NU8, typerangerel_408035)(ttype225852* f, ttype225852* a) {
	NU8 result;
	NI64 a0;
	NI64 a1;
	NI64 f0;
	NI64 f1;
	result = 0;
	a0 = firstord_263004(a);
	a1 = lastord_263010(a);
	f0 = firstord_263004(f);
	f1 = lastord_263010(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_406676)(ttype225852* f, ttype225852* 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_263386)(ttype225852* 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(tnode225816*, HEX5BHEX5D_226698)(tnode225816* n, NI i) {
	tnode225816* result;
	result = 0;
	result = (*n).kindU.S6.Sons->data[i];
	return result;
}

N_NIMCALL(NU8, handlerange_406499)(ttype225852* f, ttype225852* a, NU8 min, NU8 max) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype225852* ab;
		NU8 k;
		ab = skiptypes_230245(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_263386(ab);
			LA16: ;
			LOC12 = LOC13;
			if (!(LOC12)) goto LA17;
			LOC18 = 0;
			LOC18 = firstord_263004(f);
			LOC12 = (LOC18 <= (*(*ab).N).kindU.S1.Intval);
			LA17: ;
			LOC11 = LOC12;
			if (!(LOC11)) goto LA19;
			LOC20 = 0;
			LOC20 = lastord_263010(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;
			tnode225816* LOC40;
			tnode225816* 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_263004(f);
			LOC40 = 0;
			LOC40 = HEX5BHEX5D_226698((*a).N, 0);
			LOC35 = (LOC39 <= (*LOC40).kindU.S1.Intval);
			LA38: ;
			LOC34 = LOC35;
			if (!(LOC34)) goto LA41;
			LOC42 = 0;
			LOC42 = HEX5BHEX5D_226698((*a).N, 1);
			LOC43 = 0;
			LOC43 = lastord_263010(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_263431)(ttype225852* 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_406743)(ttype225852* f, ttype225852* a) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype225852* ab;
		NU8 k;
		ab = skiptypes_230245(a, 1048576);
		k = (*ab).Kind;
		{
			if (!(k == (*f).Kind)) goto LA8;
			result = ((NU8) 4);
		}
		goto LA6;
		LA8: ;
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = isfloatlit_263431(ab);
			if (!LOC11) goto LA12;
			result = ((NU8) 8);
		}
		goto LA6;
		LA12: ;
		{
			NIM_BOOL LOC15;
			LOC15 = 0;
			LOC15 = isintlit_263386(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_407537)(ttype225852* 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_407261)(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_407281)(tcandidate405209* c, ttype225852* f, ttype225852* a) {
	NU8 result;
	result = 0;
	result = ((NU8) 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametype_268351(f, a, 0);
		if (!LOC3) goto LA4;
		result = ((NU8) 9);
	}
	goto LA1;
	LA4: ;
	{
		NI LOC7;
		NI LOC8;
		NI firstfield;
		LOC7 = 0;
		LOC7 = sonslen_226255(a);
		LOC8 = 0;
		LOC8 = sonslen_226255(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_407310;
			NI HEX3Atmp_407502;
			NI LOC17;
			NI res_407505;
			i_407310 = 0;
			HEX3Atmp_407502 = 0;
			LOC17 = 0;
			LOC17 = sonslen_226255(f);
			HEX3Atmp_407502 = (NI32)(LOC17 - 1);
			res_407505 = firstfield;
			{
				while (1) {
					NU8 m;
					if (!(res_407505 <= HEX3Atmp_407502)) goto LA19;
					i_407310 = res_407505;
					m = typerel_406436(c, (*f).Sons->data[i_407310], (*a).Sons->data[i_407310], NIM_TRUE);
					{
						if (!(m < ((NU8) 3))) goto LA22;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA22: ;
					result = minrel_407261(result, m);
					res_407505 += 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_407368;
				NI HEX3Atmp_407508;
				NI LOC31;
				NI res_407511;
				i_407368 = 0;
				HEX3Atmp_407508 = 0;
				LOC31 = 0;
				LOC31 = sonslen_226249((*f).N);
				HEX3Atmp_407508 = (NI32)(LOC31 - 1);
				res_407511 = 0;
				{
					while (1) {
						if (!(res_407511 <= HEX3Atmp_407508)) goto LA33;
						i_407368 = res_407511;
						{
							if (!!(((*(*(*f).N).kindU.S6.Sons->data[i_407368]).Kind == ((NU8) 3)))) goto LA36;
							internalerror_197987((*(*f).N).Info, ((NimStringDesc*) &TMP2666));
						}
						goto LA34;
						LA36: ;
						{
							if (!!(((*(*(*a).N).kindU.S6.Sons->data[i_407368]).Kind == ((NU8) 3)))) goto LA39;
							internalerror_197987((*(*a).N).Info, ((NimStringDesc*) &TMP2666));
						}
						goto LA34;
						LA39: ;
						{
							tsym225846* x;
							tsym225846* y;
							x = (*(*(*f).N).kindU.S6.Sons->data[i_407368]).kindU.S4.Sym;
							y = (*(*(*a).N).kindU.S6.Sons->data[i_407368]).kindU.S4.Sym;
							{
								NIM_BOOL LOC44;
								NU8 LOC46;
								LOC44 = 0;
								LOC44 = ((*f).Kind == ((NU8) 17));
								if (!(LOC44)) goto LA45;
								LOC46 = 0;
								LOC46 = typerel_406436(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_407511 += 1;
					} LA33: ;
				}
			}
		}
		LA28: ;
	}
	goto LA1;
	LA9: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, isobjectsubtype_406802)(ttype225852* a, ttype225852* f) {
	NI result;
	ttype225852* 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_269146(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_230245(t, 2048);
			depth += 1;
		} LA2: ;
	} LA1: ;
	{
		if (!!((t == NIM_NIL))) goto LA12;
		result = depth;
	}
	LA12: ;
	return result;
}

static N_INLINE(NIM_BOOL, samedistincttypes_269219)(ttype225852* a, ttype225852* b) {
	NIM_BOOL result;
	result = 0;
	result = sameobjecttypes_269146(a, b);
	return result;
}

static N_INLINE(NIM_BOOL, inconsistentvartypes_407560)(ttype225852* f, ttype225852* 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_407598)(tcandidate405209* c, ttype225852* f_407602, ttype225852* a) {
	NU8 result;
	ttype225852* f;
	result = 0;
	f = f_407602;
	{
		NIM_BOOL LOC3;
		NU8 reverserel;
		LOC3 = 0;
		LOC3 = ismetatype_226752(a);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = ismetatype_226752(f);
			if (!LOC8) goto LA9;
			f = generatetypeinstance_320503((*c).C, (*c).Bindings, (*(*c).Call).Info, f);
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = (f == NIM_NIL);
				if (LOC13) goto LA14;
				LOC13 = ismetatype_226752(f);
				LA14: ;
				if (!LOC13) goto LA15;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA15: ;
		}
		LA9: ;
		reverserel = typerel_406436(c, a, f, NIM_TRUE);
		{
			if (!(reverserel == ((NU8) 7))) goto LA19;
			result = ((NU8) 5);
			(*c).Genericmatches += 1;
		}
		LA19: ;
	}
	goto LA1;
	LA4: ;
	{
		result = typerel_406436(c, f, a, NIM_TRUE);
	}
	LA1: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = (result <= ((NU8) 3));
		if (LOC24) goto LA25;
		LOC24 = inconsistentvartypes_407560(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_407681)(tcandidate405209* c, ttype225852* f, ttype225852* a) {
	NU8 result;
	result = 0;
	switch ((*a).Kind) {
	case ((NU8) 25):
	{
		{
			NI LOC4;
			NI LOC5;
			LOC4 = 0;
			LOC4 = sonslen_226255(f);
			LOC5 = 0;
			LOC5 = sonslen_226255(a);
			if (!!((LOC4 == LOC5))) goto LA6;
			goto BeforeRet;
		}
		LA6: ;
		result = ((NU8) 9);
		{
			NI i_407716;
			NI HEX3Atmp_408015;
			NI LOC9;
			NI res_408018;
			i_407716 = 0;
			HEX3Atmp_408015 = 0;
			LOC9 = 0;
			LOC9 = sonslen_226255(f);
			HEX3Atmp_408015 = (LOC9 - 1);
			res_408018 = 1;
			{
				while (1) {
					NU8 LOC12;
					if (!(res_408018 <= HEX3Atmp_408015)) goto LA11;
					i_407716 = res_408018;
					LOC12 = 0;
					LOC12 = procparamtyperel_407598(c, (*f).Sons->data[i_407716], (*a).Sons->data[i_407716]);
					result = minrel_407261(result, LOC12);
					{
						if (!(result == ((NU8) 0))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_408018 += 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_407598(c, (*f).Sons->data[0], (*a).Sons->data[0]);
				result = minrel_407261(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_273131(f, a);
			if (!!(LOC65)) goto LA66;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		LA66: ;
	}
	break;
	case ((NU8) 5):
	{
		result = allowsnil_407537(f);
	}
	break;
	case ((NU8) 49):
	{
		{
			ttype225852* LOC74;
			ttype225852* LOC75;
			if (!(((*f).Flags &(1<<((((NU8) 14))&31)))!=0)) goto LA72;
			LOC74 = 0;
			LOC74 = base_263038(f);
			LOC75 = 0;
			LOC75 = base_263038(a);
			result = typerel_406436(c, LOC74, LOC75, NIM_TRUE);
		}
		LA72: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(ttype225852*, concretetype_406446)(tcandidate405209* c, ttype225852* t) {
	ttype225852* result;
	result = 0;
	switch ((*t).Kind) {
	case ((NU8) 4):
	{
		result = newtype_226083(((NU8) 16), (*t).Owner);
		addsonskipintlit_282572(result, (*t).Sons->data[0]);
		addsonskipintlit_282572(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) {
				tidobj200015* LOC12;
				TNimObject* LOC13;
				LOC12 = 0;
				LOC12 = &t->Sup;
				LOC13 = 0;
				LOC13 = idtableget_235182((*c).Bindings, LOC12);
				result = ((ttype225852*) (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_263031(t, ((NU8) 0));
		LOC23 = rawNewString(LOC24->Sup.len + 21);
appendString(LOC23, ((NimStringDesc*) &TMP2682));
appendString(LOC23, LOC24);
		internalerror_198006(LOC23);
		result = t;
	}
	break;
	default:
	{
		result = t;
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, matchusertypeclass_408050)(tcontext290021* c, tcandidate405209* m, ttype225852* ff, ttype225852* a) {
	NU8 volatile result;
	ttype225852* body;
	tscope225840* LOC1;
	TSafePoint TMP2683;
	result = 0;
	body = skiptypes_230245(ff, IL64(9007199254740992));
	LOC1 = 0;
	LOC1 = openscope_295191(c);
	(*c).Intypeclass += 1;
	pushSafePoint(&TMP2683);
	TMP2683.status = _setjmp(TMP2683.context);
	if (TMP2683.status == 0) {
		tnode225816* checkedbody;
		tnode225816* LOC32;
		tnode225816* LOC33;
		{
			if (!((*ff).Kind == ((NU8) 53))) goto LA5;
			{
				NI i_408102;
				NI HEX3Atmp_408208;
				NI LOC8;
				NI res_408211;
				i_408102 = 0;
				HEX3Atmp_408208 = 0;
				LOC8 = 0;
				LOC8 = len_230005(ff);
				HEX3Atmp_408208 = ((NI32)(LOC8 - 1) - 1);
				res_408211 = 1;
				{
					while (1) {
						tident200021* typeparamname;
						ttype225852* LOC11;
						ttype225852* typ;
						tsym225846* param;
						if (!(res_408211 <= HEX3Atmp_408208)) goto LA10;
						i_408102 = res_408211;
						LOC11 = 0;
						LOC11 = base_263038(ff);
						typeparamname = (*(*(*LOC11).Sons->data[(NI32)(i_408102 - 1)]).Sym).Name;
						typ = (*ff).Sons->data[i_408102];
						param = newsym_226074(((NU8) 7), typeparamname, (*body).Sym, (*(*body).Sym).Info);
						asgnRefNoCycle((void**) (&(*param).Typ), maketypedesc_290763(c, typ));
						adddecl_295694(c, param);
						res_408211 += 1;
					} LA10: ;
				}
			}
		}
		LA5: ;
		{
			tnode225816* param_408106;
			tnode225816* HEX3Atmp_408216;
			param_408106 = 0;
			HEX3Atmp_408216 = 0;
			HEX3Atmp_408216 = HEX5BHEX5D_226698((*body).N, 0);
			{
				NI i_408220;
				NI HEX3Atmp_408222;
				NI LOC14;
				NI res_408224;
				i_408220 = 0;
				HEX3Atmp_408222 = 0;
				LOC14 = 0;
				LOC14 = len_226364(HEX3Atmp_408216);
				HEX3Atmp_408222 = (LOC14 - 1);
				res_408224 = 0;
				{
					while (1) {
						tnode225816* volatile dummyname;
						ttype225852* volatile dummytype;
						tsym225846* dummyparam;
						if (!(res_408224 <= HEX3Atmp_408222)) goto LA16;
						i_408220 = res_408224;
						param_408106 = (*HEX3Atmp_408216).kindU.S6.Sons->data[i_408220];
						dummyname = 0;
						dummytype = 0;
						{
							if (!((*param_408106).Kind == ((NU8) 142))) goto LA19;
							dummyname = HEX5BHEX5D_226698(param_408106, 0);
							{
								if (!!(((*a).Kind == ((NU8) 23)))) goto LA23;
								dummytype = makevartype_290207(c, a);
							}
							goto LA21;
							LA23: ;
							{
								dummytype = a;
							}
							LA21: ;
						}
						goto LA17;
						LA19: ;
						{
							dummyname = param_408106;
							dummytype = a;
						}
						LA17: ;
						{
							NimStringDesc* LOC31;
							if (!!(((*dummyname).Kind == ((NU8) 2)))) goto LA29;
							LOC31 = 0;
							LOC31 = HEX24_198126(TMP2685);
							internalerror_198006(LOC31);
						}
						LA29: ;
						dummyparam = newsym_226074(((NU8) 7), (*dummyname).kindU.S5.Ident, (*body).Sym, (*(*body).Sym).Info);
						asgnRefNoCycle((void**) (&(*dummyparam).Typ), dummytype);
						adddecl_295694(c, dummyparam);
						res_408224 += 1;
					} LA16: ;
				}
			}
		}
		LOC32 = 0;
		LOC32 = HEX5BHEX5D_226698((*body).N, 3);
		LOC33 = 0;
		LOC33 = copytree_226329(LOC32);
		checkedbody = (*c).Semtryexpr(c, LOC33, 0);
		clearbufferedmsgs_196449();
		{
			if (!(checkedbody == NIM_NIL)) goto LA36;
			result = ((NU8) 0);
			popSafePoint();
			(*c).Intypeclass -= 1;
			closescope_295211(c);
			goto BeforeRet;
		}
		LA36: ;
		{
			if (!((*checkedbody).Kind == ((NU8) 115))) goto LA40;
			{
				tnode225816* stmt_408194;
				stmt_408194 = 0;
				{
					NI i_408229;
					NI HEX3Atmp_408231;
					NI LOC44;
					NI res_408233;
					i_408229 = 0;
					HEX3Atmp_408231 = 0;
					LOC44 = 0;
					LOC44 = len_226364(checkedbody);
					HEX3Atmp_408231 = (LOC44 - 1);
					res_408233 = 0;
					{
						while (1) {
							if (!(res_408233 <= HEX3Atmp_408231)) goto LA46;
							i_408229 = res_408233;
							stmt_408194 = (*checkedbody).kindU.S6.Sons->data[i_408229];
							switch ((*stmt_408194).Kind) {
							case ((NU8) 109):
							{
							}
							break;
							case ((NU8) 98):
							{
							}
							break;
							case ((NU8) 102):
							{
							}
							break;
							default:
							{
							}
							break;
							}
							res_408233 += 1;
						} LA46: ;
					}
				}
			}
		}
		LA40: ;
		result = ((NU8) 7);
		popSafePoint();
		(*c).Intypeclass -= 1;
		closescope_295211(c);
		goto BeforeRet;
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		(*c).Intypeclass -= 1;
		closescope_295211(c);
	}
	if (TMP2683.status != 0) reraiseException();
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, typerel_406436)(tcandidate405209* c, ttype225852* f, ttype225852* aorig, NIM_BOOL dobind) {
	NU8 result;
	ttype225852* a;
	ttype225852* LOC5;
	result = 0;
	result = ((NU8) 0);
	{
		if (!((*f).Kind == ((NU8) 6))) goto LA3;
		put_405283((&(*c).Bindings), f, aorig);
		result = ((NU8) 7);
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = skiptypes_230245(aorig, IL64(576460752311812096));
	a = maybeskipdistinct_408369(LOC5, (*c).Calleesym);
	{
		NIM_BOOL LOC8;
		ttype225852* LOC10;
		ttype225852* LOC13;
		LOC8 = 0;
		LOC8 = ((*a).Kind == ((NU8) 11));
		if (!(LOC8)) goto LA9;
		LOC10 = 0;
		LOC10 = skiptypes_230245(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_226267(a);
		result = typerel_406436(c, f, LOC13, NIM_TRUE);
		goto BeforeRet;
	}
	LA11: ;
	switch ((*a).Kind) {
	case ((NU8) 56):
	{
		{
			ttype225852* branch_408871;
			ttypeseq225848* HEX3Atmp_411148;
			NI i_411151;
			NI l_411153;
			branch_408871 = 0;
			HEX3Atmp_411148 = 0;
			HEX3Atmp_411148 = (*a).Sons;
			i_411151 = 0;
			l_411153 = HEX3Atmp_411148->Sup.len;
			{
				while (1) {
					if (!(i_411151 < l_411153)) goto LA17;
					branch_408871 = HEX3Atmp_411148->data[i_411151];
					{
						NU8 LOC20;
						LOC20 = 0;
						LOC20 = typerel_406436(c, f, branch_408871, NIM_FALSE);
						if (!(LOC20 == ((NU8) 0))) goto LA21;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA21: ;
					i_411151 += 1;
				} LA17: ;
			}
		}
		result = ((NU8) 7);
		goto BeforeRet;
	}
	break;
	case ((NU8) 55):
	{
		{
			ttype225852* branch_408893;
			ttypeseq225848* HEX3Atmp_411155;
			NI i_411158;
			NI l_411160;
			branch_408893 = 0;
			HEX3Atmp_411155 = 0;
			HEX3Atmp_411155 = (*a).Sons;
			i_411158 = 0;
			l_411160 = HEX3Atmp_411155->Sup.len;
			{
				while (1) {
					if (!(i_411158 < l_411160)) goto LA26;
					branch_408893 = HEX3Atmp_411155->data[i_411158];
					{
						NU8 LOC29;
						LOC29 = 0;
						LOC29 = typerel_406436(c, f, branch_408893, NIM_FALSE);
						if (!!((LOC29 == ((NU8) 0)))) goto LA30;
						result = ((NU8) 7);
						goto BeforeRet;
					}
					LA30: ;
					i_411158 += 1;
				} LA26: ;
			}
		}
		result = ((NU8) 0);
		goto BeforeRet;
	}
	break;
	case ((NU8) 57):
	{
		switch ((*f).Kind) {
		case ((NU8) 57):
		{
			ttype225852* LOC34;
			ttype225852* LOC35;
			LOC34 = 0;
			LOC34 = lastson_226267(a);
			LOC35 = 0;
			LOC35 = lastson_226267(f);
			result = typerel_406436(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_269230(f, a);
			LA53: ;
			if (!LOC52) goto LA54;
			result = ((NU8) 9);
		}
		goto LA50;
		LA54: ;
		{
			ttype225852* LOC57;
			NIM_BOOL LOC58;
			LOC57 = 0;
			LOC57 = skiptypes_230245(a, 1048576);
			LOC58 = 0;
			LOC58 = sameenumtypes_269230(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: ;
		{
			ttype225852* LOC67;
			LOC67 = 0;
			LOC67 = skiptypes_230245(a, 1048576);
			if (!((*LOC67).Kind == (*f).Kind)) goto LA68;
			result = ((NU8) 3);
		}
		goto LA62;
		LA68: ;
		LA62: ;
	}
	break;
	case ((NU8) 20):
	{
		{
			ttype225852* LOC75;
			ttype225852* LOC76;
			if (!((*a).Kind == (*f).Kind)) goto LA73;
			LOC75 = 0;
			LOC75 = base_263038(f);
			LOC76 = 0;
			LOC76 = base_263038(a);
			result = typerel_406436(c, LOC75, LOC76, NIM_TRUE);
			{
				if (!!(((129 &(1<<((result)&15)))!=0))) goto LA79;
				result = typerangerel_408035(f, a);
			}
			LA79: ;
		}
		goto LA71;
		LA73: ;
		{
			{
				ttype225852* LOC84;
				LOC84 = 0;
				LOC84 = skiptypes_230245(f, 1048576);
				if (!((*LOC84).Kind == (*a).Kind)) goto LA85;
				result = ((NU8) 2);
			}
			goto LA82;
			LA85: ;
			{
				ttype225852* LOC88;
				NIM_BOOL LOC89;
				LOC88 = 0;
				LOC88 = skiptypes_230245(f, 1048576);
				LOC89 = 0;
				LOC89 = isconvertibletorange_406676(LOC88, a);
				if (!LOC89) goto LA90;
				result = ((NU8) 1);
			}
			goto LA82;
			LA90: ;
			LA82: ;
		}
		LA71: ;
	}
	break;
	case ((NU8) 31):
	{
		result = handlerange_406499(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 32):
	{
		result = handlerange_406499(f, a, ((NU8) 32), ((NU8) 32));
	}
	break;
	case ((NU8) 33):
	{
		result = handlerange_406499(f, a, ((NU8) 32), ((NU8) 33));
	}
	break;
	case ((NU8) 34):
	{
		result = handlerange_406499(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 35):
	{
		result = handlerange_406499(f, a, ((NU8) 31), ((NU8) 35));
	}
	break;
	case ((NU8) 40):
	{
		result = handlerange_406499(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 41):
	{
		result = handlerange_406499(f, a, ((NU8) 41), ((NU8) 41));
	}
	break;
	case ((NU8) 42):
	{
		result = handlerange_406499(f, a, ((NU8) 41), ((NU8) 42));
	}
	break;
	case ((NU8) 43):
	{
		result = handlerange_406499(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 44):
	{
		result = handlerange_406499(f, a, ((NU8) 40), ((NU8) 44));
	}
	break;
	case ((NU8) 36):
	{
		result = handlefloatrange_406743(f, a);
	}
	break;
	case ((NU8) 37):
	{
		result = handlefloatrange_406743(f, a);
	}
	break;
	case ((NU8) 38):
	{
		result = handlefloatrange_406743(f, a);
	}
	break;
	case ((NU8) 39):
	{
		result = handlefloatrange_406743(f, a);
	}
	break;
	case ((NU8) 23):
	{
		{
			ttype225852* LOC111;
			ttype225852* LOC112;
			if (!((*aorig).Kind == ((NU8) 23))) goto LA109;
			LOC111 = 0;
			LOC111 = base_263038(f);
			LOC112 = 0;
			LOC112 = base_263038(aorig);
			result = typerel_406436(c, LOC111, LOC112, NIM_TRUE);
		}
		goto LA107;
		LA109: ;
		{
			ttype225852* LOC114;
			LOC114 = 0;
			LOC114 = base_263038(f);
			result = typerel_406436(c, LOC114, aorig, NIM_TRUE);
		}
		LA107: ;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		switch ((*a).Kind) {
		case ((NU8) 16):
		case ((NU8) 4):
		{
			ttype225852* frange;
			frange = (*f).Sons->data[0];
			{
				ttype225852* prev;
				tidobj200015* LOC121;
				TNimObject* LOC122;
				if (!((*frange).Kind == ((NU8) 12))) goto LA119;
				LOC121 = 0;
				LOC121 = &frange->Sup;
				LOC122 = 0;
				LOC122 = idtableget_235182((*c).Bindings, LOC121);
				prev = ((ttype225852*) (LOC122));
				{
					if (!(prev == NIM_NIL)) goto LA125;
					put_405283((&(*c).Bindings), frange, (*a).Sons->data[0]);
					frange = a;
				}
				goto LA123;
				LA125: ;
				{
					frange = prev;
				}
				LA123: ;
			}
			LA119: ;
			result = typerel_406436(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;
				tnode225816* LOC135;
				ttype225852* rangestatict;
				tnode225816* LOC138;
				tnode225816* LOC139;
				tnode225816* LOC140;
				ttype225852* replacementt;
				ttypeseq225848* LOC141;
				TY411748 LOC142;
				NI64 inputupperbound;
				tnode225816* LOC143;
				LOC133 = 0;
				LOC133 = (((*frange).Flags &(1<<((((NU8) 9))&31)))!=0);
				if (!(LOC133)) goto LA134;
				LOC135 = 0;
				LOC135 = HEX5BHEX5D_226698((*frange).N, 1);
				LOC133 = ((*LOC135).Kind == ((NU8) 62));
				LA134: ;
				if (!LOC133) goto LA136;
				LOC138 = 0;
				LOC138 = HEX5BHEX5D_226698((*frange).N, 1);
				LOC139 = 0;
				LOC139 = HEX5BHEX5D_226698(LOC138, 0);
				LOC140 = 0;
				LOC140 = HEX5BHEX5D_226698(LOC139, 1);
				rangestatict = (*LOC140).Typ;
				LOC141 = 0;
				LOC141 = (ttypeseq225848*) newSeq((&NTI225848), 1);
				memset((void*)LOC142, 0, sizeof(LOC142));
				LOC142[0] = getsystype_282030(((NU8) 31));
				asgnRefNoCycle((void**) (&LOC141->data[0]), LOC142[0]);
				replacementt = newtypewithsons_290823((*c).C, ((NU8) 59), LOC141);
				LOC143 = 0;
				LOC143 = HEX5BHEX5D_226698((*(*a).Sons->data[0]).N, 1);
				inputupperbound = (*LOC143).kindU.S1.Intval;
				asgnRefNoCycle((void**) (&(*replacementt).N), newintnode_226096(((NU8) 6), (NI64)(inputupperbound + IL64(1))));
				put_405283((&(*c).Bindings), rangestatict, replacementt);
				result = ((NU8) 7);
			}
			goto LA128;
			LA136: ;
			{
				NI64 LOC145;
				NI64 LOC146;
				LOC145 = 0;
				LOC145 = lengthord_263016(frange);
				LOC146 = 0;
				LOC146 = lengthord_263016(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):
		{
			ttype225852* LOC158;
			ttype225852* LOC159;
			LOC158 = 0;
			LOC158 = base_263038(f);
			LOC159 = 0;
			LOC159 = base_263038(a);
			result = typerel_406436(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: ;
			{
				ttype225852* LOC172;
				NU8 LOC173;
				LOC172 = 0;
				LOC172 = base_263038(f);
				LOC173 = 0;
				LOC173 = typerel_406436(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: ;
			{
				ttype225852* LOC184;
				NU8 LOC185;
				LOC184 = 0;
				LOC184 = base_263038(f);
				LOC185 = 0;
				LOC185 = typerel_406436(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: ;
			{
				ttype225852* LOC196;
				NU8 LOC197;
				LOC196 = 0;
				LOC196 = base_263038(f);
				LOC197 = 0;
				LOC197 = typerel_406436(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_406436(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_407537(f);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 15):
	{
		{
			NIM_BOOL LOC224;
			ttype225852* x;
			LOC224 = 0;
			LOC224 = isordinaltype_263092(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_406436(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_198006(((NimStringDesc*) &TMP2662));
	}
	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_407281(c, f, a);
		}
		LA253: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			if (!((*a).Kind == ((NU8) 17))) goto LA258;
			{
				NIM_BOOL LOC262;
				LOC262 = 0;
				LOC262 = sameobjecttypes_269146(f, a);
				if (!LOC262) goto LA263;
				result = ((NU8) 9);
			}
			goto LA260;
			LA263: ;
			{
				NI depth;
				depth = isobjectsubtype_406802(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_269219(f, a);
			LA274: ;
			if (!LOC273) goto LA275;
			result = ((NU8) 9);
		}
		goto LA271;
		LA275: ;
		{
			ttype225852* LOC280;
			if (!(*c).Coercedistincts) goto LA278;
			LOC280 = 0;
			LOC280 = base_263038(f);
			result = typerel_406436(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_406436(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):
	{
		{
			ttype225852* LOC317;
			ttype225852* LOC318;
			if (!((*a).Kind == (*f).Kind)) goto LA300;
			{
				NI LOC304;
				NI LOC305;
				LOC304 = 0;
				LOC304 = len_230005(a);
				LOC305 = 0;
				LOC305 = len_230005(f);
				if (!(LOC304 < LOC305)) goto LA306;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA306: ;
			{
				NI i_409397;
				NI HEX3Atmp_411162;
				NI LOC309;
				NI res_411165;
				i_409397 = 0;
				HEX3Atmp_411162 = 0;
				LOC309 = 0;
				LOC309 = len_230005(f);
				HEX3Atmp_411162 = (NI32)(LOC309 - 2);
				res_411165 = 0;
				{
					while (1) {
						if (!(res_411165 <= HEX3Atmp_411162)) goto LA311;
						i_409397 = res_411165;
						{
							NU8 LOC314;
							LOC314 = 0;
							LOC314 = typerel_406436(c, (*f).Sons->data[i_409397], (*a).Sons->data[i_409397], NIM_TRUE);
							if (!(LOC314 == ((NU8) 0))) goto LA315;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA315: ;
						res_411165 += 1;
					} LA311: ;
				}
			}
			LOC317 = 0;
			LOC317 = lastson_226267(f);
			LOC318 = 0;
			LOC318 = lastson_226267(a);
			result = typerel_406436(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_407537(f);
		}
		goto LA298;
		LA329: ;
		{
		}
		LA298: ;
	}
	break;
	case ((NU8) 25):
	{
		result = proctyperel_407681(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_407537(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_230005(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_407537(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_407537(f);
		}
		break;
		case ((NU8) 28):
		{
			result = ((NU8) 1);
		}
		break;
		case ((NU8) 21):
		{
			{
				NIM_BOOL LOC389;
				NI LOC390;
				LOC389 = 0;
				LOC390 = 0;
				LOC390 = len_230005(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;
				ttype225852* LOC401;
				LOC397 = 0;
				LOC398 = 0;
				LOC399 = 0;
				LOC399 = firstord_263004((*a).Sons->data[0]);
				LOC398 = (LOC399 == IL64(0));
				if (!(LOC398)) goto LA400;
				LOC401 = 0;
				LOC401 = skiptypes_230245((*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):
	{
		ttype225852* roota;
		ttype225852* rootf;
		roota = skipgenericalias_269619(a);
		rootf = skipgenericalias_269619(f);
		{
			NIM_BOOL LOC414;
			ttype225852* LOC416;
			ttype225852* LOC417;
			LOC414 = 0;
			LOC414 = ((*a).Kind == ((NU8) 11));
			if (!(LOC414)) goto LA415;
			LOC416 = 0;
			LOC416 = base_263038(roota);
			LOC417 = 0;
			LOC417 = base_263038(rootf);
			LOC414 = (LOC416 == LOC417);
			LA415: ;
			if (!LOC414) goto LA418;
			{
				NI i_409652;
				NI HEX3Atmp_411168;
				NI LOC421;
				NI res_411171;
				i_409652 = 0;
				HEX3Atmp_411168 = 0;
				LOC421 = 0;
				LOC421 = sonslen_226255(rootf);
				HEX3Atmp_411168 = (NI32)(LOC421 - 2);
				res_411171 = 1;
				{
					while (1) {
						ttype225852* ff;
						ttype225852* aa;
						if (!(res_411171 <= HEX3Atmp_411168)) goto LA423;
						i_409652 = res_411171;
						ff = (*rootf).Sons->data[i_409652];
						aa = (*roota).Sons->data[i_409652];
						result = typerel_406436(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_411171 += 1;
					} LA423: ;
				}
			}
			result = ((NU8) 7);
		}
		goto LA412;
		LA418: ;
		{
			ttype225852* LOC435;
			LOC435 = 0;
			LOC435 = lastson_226267(f);
			result = typerel_406436(c, LOC435, a, NIM_TRUE);
		}
		LA412: ;
	}
	break;
	case ((NU8) 10):
	{
		ttype225852* prev_409683;
		tidobj200015* LOC437;
		TNimObject* LOC438;
		LOC437 = 0;
		LOC437 = &f->Sup;
		LOC438 = 0;
		LOC438 = idtableget_235182((*c).Bindings, LOC437);
		prev_409683 = ((ttype225852*) (LOC438));
		{
			ttype225852* ff;
			if (!(prev_409683 == 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;
				{
					ttype225852* bound_409727;
					ttype225852* LOC453;
					if (!dobind) goto LA451;
					LOC453 = 0;
					LOC453 = skiptypes_230245(aorig, 1048576);
					bound_409727 = skipintlit_282531(LOC453);
					{
						if (!dobind) goto LA456;
						put_405283((&(*c).Bindings), f, bound_409727);
					}
					LA456: ;
				}
				LA451: ;
				result = ((NU8) 7);
				goto BeforeRet;
			}
			LA447: ;
			ff = lastson_226267(f);
			{
				if (!!((ff == NIM_NIL))) goto LA460;
				result = typerel_406436(c, ff, a, NIM_TRUE);
			}
			LA460: ;
		}
		goto LA439;
		LA441: ;
		{
			result = typerel_406436(c, prev_409683, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA439: ;
	}
	break;
	case ((NU8) 9):
	{
		ttype225852* x_409821;
		x_409821 = skipgenericalias_269619(a);
		{
			NIM_BOOL LOC466;
			LOC466 = 0;
			LOC466 = ((*x_409821).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_409821).Kind == ((NU8) 11));
			if (!(LOC472)) goto LA473;
			LOC472 = ((*f).Sons->data[0] == (*x_409821).Sons->data[0]);
			LA473: ;
			LOC471 = LOC472;
			if (!(LOC471)) goto LA474;
			LOC475 = 0;
			LOC475 = sonslen_226255(x_409821);
			LOC476 = 0;
			LOC476 = sonslen_226255(f);
			LOC471 = ((NI32)(LOC475 - 1) == LOC476);
			LA474: ;
			if (!LOC471) goto LA477;
			{
				NI i_409877;
				NI HEX3Atmp_411174;
				NI LOC480;
				NI res_411177;
				i_409877 = 0;
				HEX3Atmp_411174 = 0;
				LOC480 = 0;
				LOC480 = sonslen_226255(f);
				HEX3Atmp_411174 = (NI32)(LOC480 - 1);
				res_411177 = 1;
				{
					while (1) {
						if (!(res_411177 <= HEX3Atmp_411174)) goto LA482;
						i_409877 = res_411177;
						{
							if (!((*(*x_409821).Sons->data[i_409877]).Kind == ((NU8) 12))) goto LA485;
							internalerror_198006(((NimStringDesc*) &TMP2681));
						}
						goto LA483;
						LA485: ;
						{
							NU8 LOC488;
							LOC488 = 0;
							LOC488 = typerel_406436(c, (*f).Sons->data[i_409877], (*x_409821).Sons->data[i_409877], NIM_TRUE);
							if (!(LOC488 <= ((NU8) 3))) goto LA489;
							goto BeforeRet;
						}
						goto LA483;
						LA489: ;
						LA483: ;
						res_411177 += 1;
					} LA482: ;
				}
			}
			result = ((NU8) 7);
		}
		goto LA464;
		LA477: ;
		{
			result = typerel_406436(c, (*f).Sons->data[0], x_409821, NIM_TRUE);
			{
				if (!!((result == ((NU8) 0)))) goto LA494;
				{
					NI i_409917;
					NI HEX3Atmp_411180;
					NI LOC497;
					NI res_411183;
					i_409917 = 0;
					HEX3Atmp_411180 = 0;
					LOC497 = 0;
					LOC497 = sonslen_226255(f);
					HEX3Atmp_411180 = (NI32)(LOC497 - 1);
					res_411183 = 1;
					{
						while (1) {
							ttype225852* x;
							tidobj200015* LOC500;
							TNimObject* LOC501;
							if (!(res_411183 <= HEX3Atmp_411180)) goto LA499;
							i_409917 = res_411183;
							LOC500 = 0;
							LOC500 = &(*(*f).Sons->data[0]).Sons->data[(NI32)(i_409917 - 1)]->Sup;
							LOC501 = 0;
							LOC501 = idtableget_235182((*c).Bindings, LOC500);
							x = ((ttype225852*) (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_198006(((NimStringDesc*) &TMP2681));
							}
							LA506: ;
							put_405283((&(*c).Bindings), (*f).Sons->data[i_409917], x);
							res_411183 += 1;
						} LA499: ;
					}
				}
			}
			LA494: ;
		}
		LA464: ;
	}
	break;
	case ((NU8) 55):
	{
		ttype225852* prev_409952;
		tidobj200015* LOC509;
		TNimObject* LOC510;
		LOC509 = 0;
		LOC509 = &f->Sup;
		LOC510 = 0;
		LOC510 = idtableget_235182((*c).Bindings, LOC509);
		prev_409952 = ((ttype225852*) (LOC510));
		{
			if (!(prev_409952 == NIM_NIL)) goto LA513;
			{
				ttype225852* branch_409982;
				ttypeseq225848* HEX3Atmp_411186;
				NI i_411189;
				NI l_411191;
				branch_409982 = 0;
				HEX3Atmp_411186 = 0;
				HEX3Atmp_411186 = (*f).Sons;
				i_411189 = 0;
				l_411191 = HEX3Atmp_411186->Sup.len;
				{
					while (1) {
						if (!(i_411189 < l_411191)) goto LA517;
						branch_409982 = HEX3Atmp_411186->data[i_411189];
						{
							NU8 LOC520;
							LOC520 = 0;
							LOC520 = typerel_406436(c, branch_409982, aorig, NIM_TRUE);
							if (!(LOC520 < ((NU8) 3))) goto LA521;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA521: ;
						i_411189 += 1;
					} LA517: ;
				}
			}
			{
				ttype225852* bound_409994;
				ttype225852* LOC527;
				if (!dobind) goto LA525;
				LOC527 = 0;
				LOC527 = skiptypes_230245(aorig, 1048576);
				bound_409994 = skipintlit_282531(LOC527);
				{
					if (!dobind) goto LA530;
					put_405283((&(*c).Bindings), f, bound_409994);
				}
				LA530: ;
			}
			LA525: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA511;
		LA513: ;
		{
			result = typerel_406436(c, prev_409952, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA511: ;
	}
	break;
	case ((NU8) 56):
	{
		ttype225852* prev_410204;
		tidobj200015* LOC534;
		TNimObject* LOC535;
		LOC534 = 0;
		LOC534 = &f->Sup;
		LOC535 = 0;
		LOC535 = idtableget_235182((*c).Bindings, LOC534);
		prev_410204 = ((ttype225852*) (LOC535));
		{
			if (!(prev_410204 == NIM_NIL)) goto LA538;
			{
				ttype225852* branch_410234;
				ttypeseq225848* HEX3Atmp_411193;
				NI i_411196;
				NI l_411198;
				branch_410234 = 0;
				HEX3Atmp_411193 = 0;
				HEX3Atmp_411193 = (*f).Sons;
				i_411196 = 0;
				l_411198 = HEX3Atmp_411193->Sup.len;
				{
					while (1) {
						if (!(i_411196 < l_411198)) goto LA542;
						branch_410234 = HEX3Atmp_411193->data[i_411196];
						{
							NU8 LOC545;
							LOC545 = 0;
							LOC545 = typerel_406436(c, branch_410234, aorig, NIM_TRUE);
							if (!(((NU8) 3) <= LOC545)) goto LA546;
							{
								ttype225852* bound_410245;
								ttype225852* LOC552;
								if (!dobind) goto LA550;
								LOC552 = 0;
								LOC552 = skiptypes_230245(aorig, 1048576);
								bound_410245 = skipintlit_282531(LOC552);
								{
									if (!dobind) goto LA555;
									put_405283((&(*c).Bindings), f, bound_410245);
								}
								LA555: ;
							}
							LA550: ;
							result = ((NU8) 7);
							goto BeforeRet;
						}
						LA546: ;
						i_411196 += 1;
					} LA542: ;
				}
			}
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA536;
		LA538: ;
		{
			result = typerel_406436(c, prev_410204, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA536: ;
	}
	break;
	case ((NU8) 57):
	{
		ttype225852* prev_410404;
		tidobj200015* LOC559;
		TNimObject* LOC560;
		LOC559 = 0;
		LOC559 = &f->Sup;
		LOC560 = 0;
		LOC560 = idtableget_235182((*c).Bindings, LOC559);
		prev_410404 = ((ttype225852*) (LOC560));
		{
			if (!(prev_410404 == NIM_NIL)) goto LA563;
			{
				ttype225852* branch_410434;
				ttypeseq225848* HEX3Atmp_411200;
				NI i_411203;
				NI l_411205;
				branch_410434 = 0;
				HEX3Atmp_411200 = 0;
				HEX3Atmp_411200 = (*f).Sons;
				i_411203 = 0;
				l_411205 = HEX3Atmp_411200->Sup.len;
				{
					while (1) {
						if (!(i_411203 < l_411205)) goto LA567;
						branch_410434 = HEX3Atmp_411200->data[i_411203];
						{
							NU8 LOC570;
							LOC570 = 0;
							LOC570 = typerel_406436(c, branch_410434, aorig, NIM_TRUE);
							if (!!((LOC570 == ((NU8) 0)))) goto LA571;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA571: ;
						i_411203 += 1;
					} LA567: ;
				}
			}
			{
				ttype225852* bound_410445;
				ttype225852* LOC577;
				if (!dobind) goto LA575;
				LOC577 = 0;
				LOC577 = skiptypes_230245(aorig, 1048576);
				bound_410445 = skipintlit_282531(LOC577);
				{
					if (!dobind) goto LA580;
					put_405283((&(*c).Bindings), f, bound_410445);
				}
				LA580: ;
			}
			LA575: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA561;
		LA563: ;
		{
			result = typerel_406436(c, prev_410404, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA561: ;
	}
	break;
	case ((NU8) 58):
	{
		ttype225852* prev_410604;
		tidobj200015* LOC584;
		TNimObject* LOC585;
		LOC584 = 0;
		LOC584 = &f->Sup;
		LOC585 = 0;
		LOC585 = idtableget_235182((*c).Bindings, LOC584);
		prev_410604 = ((ttype225852*) (LOC585));
		{
			ttype225852* concrete;
			if (!(prev_410604 == NIM_NIL)) goto LA588;
			concrete = concretetype_406446((&(*c)), a);
			{
				NIM_BOOL LOC592;
				LOC592 = 0;
				LOC592 = !((concrete == NIM_NIL));
				if (!(LOC592)) goto LA593;
				LOC592 = dobind;
				LA593: ;
				if (!LOC592) goto LA594;
				put_405283((&(*c).Bindings), f, concrete);
			}
			LA594: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA586;
		LA588: ;
		{
			result = typerel_406436(c, prev_410604, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA586: ;
	}
	break;
	case ((NU8) 51):
	{
		ttype225852* prev_410642;
		tidobj200015* LOC598;
		TNimObject* LOC599;
		LOC598 = 0;
		LOC598 = &f->Sup;
		LOC599 = 0;
		LOC599 = idtableget_235182((*c).Bindings, LOC598);
		prev_410642 = ((ttype225852*) (LOC599));
		{
			NU8 targetkind;
			if (!(prev_410642 == NIM_NIL)) goto LA602;
			targetkind = (*(*f).Sons->data[0]).Kind;
			{
				NIM_BOOL LOC606;
				ttype225852* LOC607;
				NIM_BOOL LOC609;
				LOC606 = 0;
				LOC607 = 0;
				LOC607 = skiptypes_230245(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_405283((&(*c).Bindings), f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA604;
			LA611: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA604: ;
		}
		goto LA600;
		LA602: ;
		{
			result = typerel_406436(c, prev_410642, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA600: ;
	}
	break;
	case ((NU8) 52):
	case ((NU8) 53):
	{
		ttype225852* prev_410696;
		tidobj200015* LOC616;
		TNimObject* LOC617;
		LOC616 = 0;
		LOC616 = &f->Sup;
		LOC617 = 0;
		LOC617 = idtableget_235182((*c).Bindings, LOC616);
		prev_410696 = ((ttype225852*) (LOC617));
		{
			if (!(prev_410696 == NIM_NIL)) goto LA620;
			result = matchusertypeclass_408050((*c).C, c, f, aorig);
			{
				if (!(result == ((NU8) 7))) goto LA624;
				put_405283((&(*c).Bindings), f, a);
			}
			LA624: ;
		}
		goto LA618;
		LA620: ;
		{
			result = typerel_406436(c, prev_410696, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA618: ;
	}
	break;
	case ((NU8) 54):
	{
		ttype225852* prev_410725;
		tidobj200015* LOC628;
		TNimObject* LOC629;
		LOC628 = 0;
		LOC628 = &f->Sup;
		LOC629 = 0;
		LOC629 = idtableget_235182((*c).Bindings, LOC628);
		prev_410725 = ((ttype225852*) (LOC629));
		{
			if (!(prev_410725 == NIM_NIL)) goto LA632;
			{
				NU8 LOC636;
				LOC636 = 0;
				LOC636 = typerel_406436(c, (*f).Sons->data[1], a, NIM_TRUE);
				if (!!((LOC636 == ((NU8) 0)))) goto LA637;
				put_405283((&(*c).Bindings), f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA634;
			LA637: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA634: ;
		}
		goto LA630;
		LA632: ;
		{
			result = typerel_406436(c, prev_410725, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA630: ;
	}
	break;
	case ((NU8) 12):
	{
		ttype225852* x;
		tidobj200015* LOC642;
		TNimObject* LOC643;
		LOC642 = 0;
		LOC642 = &f->Sup;
		LOC643 = 0;
		LOC643 = idtableget_235182((*c).Bindings, LOC642);
		x = ((ttype225852*) (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_226255(f);
						if (!(LOC665 == 0)) goto LA666;
						result = ((NU8) 7);
					}
					goto LA663;
					LA666: ;
					{
						ttype225852* LOC677;
						ttype225852* LOC678;
						{
							NIM_BOOL LOC671;
							NIM_BOOL LOC672;
							NimStringDesc* LOC676;
							LOC671 = 0;
							LOC672 = 0;
							LOC672 = HEX3DHEX3D_273497((*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_198126(TMP2688);
							internalerror_198006(LOC676);
						}
						LA674: ;
						(*c).Typedescmatched = NIM_TRUE;
						LOC677 = 0;
						LOC677 = base_263038(f);
						LOC678 = 0;
						LOC678 = base_263038(a);
						result = typerel_406436(c, LOC677, LOC678, NIM_TRUE);
					}
					LA663: ;
				}
				goto LA656;
				LA661: ;
				{
					result = ((NU8) 0);
				}
				LA656: ;
			}
			goto LA648;
			LA654: ;
			{
				{
					NIM_BOOL LOC683;
					NI LOC684;
					ttype225852* LOC688;
					LOC683 = 0;
					LOC684 = 0;
					LOC684 = sonslen_226255(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_226267(f);
					result = typerel_406436(c, LOC688, a, NIM_TRUE);
					{
						NIM_BOOL LOC691;
						ttype225852* concrete;
						LOC691 = 0;
						LOC691 = dobind;
						if (!(LOC691)) goto LA692;
						LOC691 = !(((129 &(1<<((result)&15)))!=0));
						LA692: ;
						if (!LOC691) goto LA693;
						concrete = concretetype_406446((&(*c)), a);
						{
							if (!(concrete == NIM_NIL)) goto LA697;
							result = ((NU8) 0);
							goto BeforeRet;
						}
						LA697: ;
						put_405283((&(*c).Bindings), f, concrete);
					}
					LA693: ;
				}
				goto LA681;
				LA686: ;
				{
					result = ((NU8) 7);
				}
				LA681: ;
			}
			LA648: ;
			{
				ttype225852* 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_406446((&(*c)), a);
					{
						if (!(concrete == NIM_NIL)) goto LA711;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA711: ;
				}
				LA704: ;
				{
					if (!dobind) goto LA715;
					put_405283((&(*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_406436(c, x, a, NIM_TRUE);
		}
		LA644: ;
	}
	break;
	case ((NU8) 59):
	{
		{
			ttype225852* LOC729;
			if (!((*aorig).Kind == ((NU8) 59))) goto LA727;
			LOC729 = 0;
			LOC729 = lastson_226267(f);
			result = typerel_406436(c, LOC729, a, NIM_TRUE);
			{
				if (!!((result == ((NU8) 0)))) goto LA732;
				put_405283((&(*c).Bindings), f, aorig);
			}
			LA732: ;
		}
		goto LA725;
		LA727: ;
		{
			result = ((NU8) 0);
		}
		LA725: ;
	}
	break;
	case ((NU8) 8):
	{
		ttype225852* prev;
		tidobj200015* LOC736;
		TNimObject* LOC737;
		LOC736 = 0;
		LOC736 = &f->Sup;
		LOC737 = 0;
		LOC737 = idtableget_235182((*c).Bindings, LOC736);
		prev = ((ttype225852*) (LOC737));
		{
			if (!(prev == NIM_NIL)) goto LA740;
			{
				if (!!(((*a).Kind == ((NU8) 8)))) goto LA744;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA744: ;
			{
				ttype225852* LOC748;
				LOC748 = 0;
				LOC748 = base_263038(f);
				if (!((*LOC748).Kind == ((NU8) 0))) goto LA749;
				result = ((NU8) 7);
			}
			goto LA746;
			LA749: ;
			{
				ttype225852* LOC752;
				ttype225852* LOC753;
				LOC752 = 0;
				LOC752 = base_263038(f);
				LOC753 = 0;
				LOC753 = base_263038(a);
				result = typerel_406436(c, LOC752, LOC753, NIM_TRUE);
			}
			LA746: ;
			{
				if (!!((result == ((NU8) 0)))) goto LA756;
				put_405283((&(*c).Bindings), f, a);
			}
			LA756: ;
		}
		goto LA738;
		LA740: ;
		{
			{
				ttype225852* LOC763;
				if (!(((*f).Flags &(1<<((((NU8) 9))&31)))!=0)) goto LA761;
				LOC763 = 0;
				LOC763 = base_263038(prev);
				result = typerel_406436(c, LOC763, a, NIM_TRUE);
			}
			goto LA759;
			LA761: ;
			{
				ttype225852* LOC767;
				ttype225852* LOC768;
				if (!((*a).Kind == ((NU8) 8))) goto LA765;
				LOC767 = 0;
				LOC767 = base_263038(prev);
				LOC768 = 0;
				LOC768 = base_263038(a);
				result = typerel_406436(c, LOC767, LOC768, NIM_TRUE);
			}
			goto LA759;
			LA765: ;
			{
				result = ((NU8) 0);
			}
			LA759: ;
		}
		LA738: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			NIM_BOOL LOC773;
			NIM_BOOL LOC775;
			ttype225852* LOC779;
			ttype225852* 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_263038(f);
			LOC780 = 0;
			LOC780 = base_263038(a);
			result = typerel_406436(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):
	{
		tnode225816* instantiated;
		tnode225816* reevaluted;
		instantiated = replacetypesinbody_320489((*c).C, (*c).Bindings, (*f).N);
		reevaluted = (*(*c).C).Semexpr((*c).C, instantiated, 0);
		switch ((*(*reevaluted).Typ).Kind) {
		case ((NU8) 8):
		{
			ttype225852* LOC786;
			LOC786 = 0;
			LOC786 = base_263038((*reevaluted).Typ);
			result = typerel_406436(c, a, LOC786, NIM_TRUE);
		}
		break;
		case ((NU8) 59):
		{
			ttype225852* LOC788;
			LOC788 = 0;
			LOC788 = base_263038((*reevaluted).Typ);
			result = typerel_406436(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_261184((*aorig).N, (*(*reevaluted).Typ).N);
					if (!!(LOC797)) goto LA798;
					result = ((NU8) 0);
				}
				LA798: ;
			}
			LA793: ;
		}
		break;
		default:
		{
			localerror_197955((*(*f).N).Info, ((NU16) 63), ((NimStringDesc*) &TMP2689));
			result = ((NU8) 0);
		}
		break;
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC806;
			if (!NIM_TRUE) goto LA804;
			LOC806 = 0;
			LOC806 = HEX24_198126(TMP2690);
			internalerror_198006(LOC806);
		}
		LA804: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isinlineiterator_411610)(ttype225852* t) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	NIM_BOOL LOC3;
	ttype225852* 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_263038(t);
	LOC3 = ((*LOC5).Kind == ((NU8) 49));
	LA4: ;
	LOC1 = LOC3;
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(ttype225852*, getinstantiatedtype_411309)(tcontext290021* c, tnode225816* arg, tcandidate405209* m, ttype225852* f) {
	ttype225852* result;
	tidobj200015* LOC1;
	TNimObject* LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = &f->Sup;
	LOC2 = 0;
	LOC2 = idtableget_235182((*m).Bindings, LOC1);
	result = ((ttype225852*) (LOC2));
	{
		if (!(result == NIM_NIL)) goto LA5;
		result = generatetypeinstance_320503(c, (*m).Bindings, (*arg).Info, f);
	}
	LA5: ;
	{
		if (!(result == NIM_NIL)) goto LA9;
		internalerror_197987((*arg).Info, ((NimStringDesc*) &TMP2691));
		result = errortype_291319(c);
	}
	LA9: ;
	return result;
}

N_NIMCALL(tnode225816*, implicitconv_411356)(NU8 kind, ttype225852* f, tnode225816* arg, tcandidate405209* m, tcontext290021* c) {
	tnode225816* result;
	result = 0;
	result = newnodei_226138(kind, (*arg).Info);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = containsgenerictype_272929(f);
		if (!LOC3) goto LA4;
		{
			if (!!((*m).Proxymatch)) goto LA8;
			asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_411309(c, arg, m, f));
		}
		goto LA6;
		LA8: ;
		{
			asgnRefNoCycle((void**) (&(*result).Typ), errortype_291319(c));
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		asgnRefNoCycle((void**) (&(*result).Typ), f);
	}
	LA1: ;
	{
		if (!((*result).Typ == NIM_NIL)) goto LA14;
		internalerror_197987((*arg).Info, ((NimStringDesc*) &TMP2692));
	}
	LA14: ;
	addson_226287(result, emptynode_226738);
	addson_226287(result, arg);
	return result;
}

N_NIMCALL(NIM_BOOL, istracked_418164)(tlineinfo195539 current, NI tokenlen) {
	NIM_BOOL result;
	result = 0;
	{
		NI i_418181;
		NI HEX3Atmp_418184;
		NI res_418187;
		i_418181 = 0;
		HEX3Atmp_418184 = 0;
		HEX3Atmp_418184 = (checkpoints_197151->Sup.len-1);
		res_418187 = 0;
		{
			while (1) {
				if (!(res_418187 <= HEX3Atmp_418184)) goto LA3;
				i_418181 = res_418187;
				{
					if (!(current.Fileindex == checkpoints_197151->data[i_418181].Fileindex)) goto LA6;
					{
						NI16 col;
						if (!(current.Line == checkpoints_197151->data[i_418181].Line)) goto LA10;
						col = checkpoints_197151->data[i_418181].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_418187 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, findusages_418417)(tlineinfo195539 info, tsym225846* s) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (usagesym_418415 == NIM_NIL);
		if (!(LOC3)) goto LA4;
		LOC3 = istracked_418164(info, (*(*s).Name).S->Sup.len);
		LA4: ;
		if (!LOC3) goto LA5;
		asgnRefNoCycle((void**) (&usagesym_418415), s);
		LOC7 = 0;
		LOC7 = symtostr_414804(s, NIM_FALSE, ((NimStringDesc*) &TMP2695));
		suggestwriteln_196457(LOC7);
	}
	goto LA1;
	LA5: ;
	{
		if (!(s == usagesym_418415)) goto LA9;
		{
			NIM_BOOL LOC13;
			NimStringDesc* LOC16;
			LOC13 = 0;
			LOC13 = HEX3DHEX3D_197579(lastlineinfo_418416, info);
			if (!!(LOC13)) goto LA14;
			LOC16 = 0;
			LOC16 = symtostr_414620(s, NIM_FALSE, ((NimStringDesc*) &TMP2695), info);
			suggestwriteln_196457(LOC16);
		}
		LA14: ;
		lastlineinfo_418416 = info;
	}
	goto LA1;
	LA9: ;
	LA1: ;
}

N_NIMCALL(void, finddefinition_418457)(tlineinfo195539 info, tsym225846* s) {
	{
		if (!s == 0) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		NimStringDesc* LOC10;
		LOC7 = 0;
		LOC7 = istracked_418164(info, (*(*s).Name).S->Sup.len);
		if (!LOC7) goto LA8;
		LOC10 = 0;
		LOC10 = symtostr_414804(s, NIM_FALSE, ((NimStringDesc*) &TMP2696));
		suggestwriteln_196457(LOC10);
		suggestquit_196846();
	}
	LA8: ;
	BeforeRet: ;
}

N_NIMCALL(void, ensureseq_418618)(TY418481** x_418626) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_418632((*x_418626), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_418626)), (TY418481*) newSeq((&NTI418481), 0));
	}
	LA4: ;
}

N_NIMCALL(void, ensureidx_418962)(TY418481** x_418968, NI y_418971) {
	{
		if (!((*x_418968)->Sup.len <= y_418971)) goto LA3;
		(*x_418968) = (TY418481*) setLengthSeq(&((*x_418968))->Sup, sizeof(tlinemap418480), (NI32)(y_418971 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, ensureseq_419006)(TY418485** x_419014) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_418758((*x_419014), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_419014)), (TY418485*) newSeq((&NTI418485), 0));
	}
	LA4: ;
}

N_NIMCALL(void, addtosourcemap_418598)(tsym225846* sym, tlineinfo195539 info) {
	tentry418478 LOC1;
	ensureidx_418534((&gsourcemaps_418508), ((NI) (info.Fileindex)));
	ensureseq_418618((&gsourcemaps_418508->data[info.Fileindex].Lines));
	ensureidx_418962((&gsourcemaps_418508->data[info.Fileindex].Lines), ((NI) (info.Line)));
	ensureseq_419006((&gsourcemaps_418508->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_418508->data[info.Fileindex].Lines->data[info.Line].Entries = (TY418485*) incrSeq(&(gsourcemaps_418508->data[info.Fileindex].Lines->data[info.Line].Entries)->Sup, sizeof(tentry418478));
	gsourcemaps_418508->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_418508->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Pos = LOC1.Pos;
	asgnRefNoCycle((void**) (&gsourcemaps_418508->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_418508->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Sym), LOC1.Sym);
}

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

N_NIMCALL(void, markused_405251)(tlineinfo195539 info, tsym225846* 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_197976(info, ((NU16) 234), (*(*s).Name).S);
		}
		LA7: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 20))&31)))!=0)) goto LA11;
			localerror_197955(info, ((NU16) 221), (*(*s).Name).S);
		}
		LA11: ;
	}
	LA3: ;
	suggestsym_420882(info, s);
}

N_NIMCALL(tnode225816*, userconvmatch_411387)(tcontext290021* c, tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg) {
	tnode225816* result;
	result = 0;
	result = NIM_NIL;
	{
		NI i_411419;
		NI HEX3Atmp_411477;
		NI res_411480;
		i_411419 = 0;
		HEX3Atmp_411477 = 0;
		HEX3Atmp_411477 = (NI32)((*c).Converters->Sup.len - 1);
		res_411480 = 0;
		{
			while (1) {
				if (!(res_411480 <= HEX3Atmp_411477)) goto LA3;
				i_411419 = res_411480;
				{
					ttype225852* src;
					ttype225852* dest;
					NU8 srca;
					NIM_BOOL destisgeneric;
					NU8 fdest;
					src = (*(*(*c).Converters->data[i_411419]).Typ).Sons->data[1];
					dest = (*(*(*c).Converters->data[i_411419]).Typ).Sons->data[0];
					srca = typerel_406436(m, src, a, NIM_TRUE);
					{
						if (!!(((640 &(1<<((srca)&15)))!=0))) goto LA7;
						goto LA4;
					}
					LA7: ;
					destisgeneric = containsgenerictype_272929(dest);
					{
						if (!destisgeneric) goto LA11;
						dest = generatetypeinstance_320503(c, (*m).Bindings, (*arg).Info, dest);
					}
					LA11: ;
					fdest = typerel_406436(m, f, dest, NIM_TRUE);
					{
						tnode225816* s;
						tnode225816* LOC17;
						NIM_BOOL LOC18;
						if (!((640 &(1<<((fdest)&15)))!=0)) goto LA15;
						markused_405251((*arg).Info, (*c).Converters->data[i_411419]);
						s = newsymnode_226132((*c).Converters->data[i_411419]);
						asgnRefNoCycle((void**) (&(*s).Typ), (*(*c).Converters->data[i_411419]).Typ);
						(*s).Info = (*arg).Info;
						result = newnodeit_226145(((NU8) 32), (*arg).Info, dest);
						addson_226287(result, s);
						LOC17 = 0;
						LOC17 = copytree_226329(arg);
						addson_226287(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_411480 += 1;
			} LA3: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, localconvmatch_411500)(tcontext290021* c, tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg) {
	tnode225816* result;
	tnode225816* call;
	tnode225816* LOC11;
	tnode225816* 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_226138(((NU8) 27), (*arg).Info);
	LOC11 = 0;
	LOC11 = copytree_226329((*f).N);
	add_226498(call, LOC11);
	LOC12 = 0;
	LOC12 = copytree_226329(arg);
	add_226498(call, LOC12);
	result = (*c).Semoverloadedcall(c, call, call, 520192);
	{
		NU8 r;
		if (!!((result == NIM_NIL))) goto LA15;
		r = typerel_406436(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;
		{
			ttype225852* LOC29;
			if (!(r == ((NU8) 7))) goto LA27;
			LOC29 = 0;
			LOC29 = base_263038(f);
			asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_411309(c, arg, (&(*m)), LOC29));
		}
		LA27: ;
		(*m).Basetypematch = NIM_TRUE;
	}
	LA15: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, paramtypesmatchaux_411647)(tcandidate405209* m, ttype225852* f, ttype225852* argtype_411652, tnode225816* argsemantized, tnode225816* argorig) {
	tnode225816* result;
	ttype225852* fmaybestatic;
	tnode225816* arg;
	ttype225852* argtype;
	tcontext290021* c;
	ttype225852* a;
	NU8 r;
	result = 0;
	fmaybestatic = skiptypes_230245(f, 8192);
	arg = argsemantized;
	argtype = argtype_411652;
	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_226210(argtype, f);
			result = argsemantized;
			goto BeforeRet;
		}
		LA9: ;
		{
			if (!((*argtype).Kind == ((NU8) 59))) goto LA13;
			{
				if (!((*(*m).Callee).Kind == ((NU8) 10))) goto LA17;
				result = newnodei_226138(((NU8) 4), (*argorig).Info);
				asgnRefNoCycle((void**) (&(*result).Typ), maketypefromexpr_290812(c, arg));
				goto BeforeRet;
			}
			LA17: ;
		}
		goto LA11;
		LA13: ;
		{
			tnode225816* evaluated;
			evaluated = (*c).Semtryconstexpr(c, arg);
			{
				TY411748 LOC24;
				if (!!((evaluated == NIM_NIL))) goto LA22;
				asgnRefNoCycle((void**) (&(*arg).Typ), newtypes_290214(((NU8) 59), c));
				if ((*(*arg).Typ).Sons) nimGCunrefNoCycle((*(*arg).Typ).Sons);
				(*(*arg).Typ).Sons = (ttypeseq225848*) newSeqRC1((&NTI225848), 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_230245(argtype, IL64(2305843009213694208));
	}
	goto LA25;
	LA27: ;
	{
		a = argtype;
	}
	LA25: ;
	r = typerel_406436(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;
		ttype225852* inlined;
		TY411748 LOC62;
		LOC58 = 0;
		LOC58 = !((r == ((NU8) 0)));
		if (!(LOC58)) goto LA59;
		LOC58 = isinlineiterator_411610(f);
		LA59: ;
		if (!LOC58) goto LA60;
		inlined = newtypes_290214(((NU8) 59), c);
		if ((*inlined).Sons) nimGCunrefNoCycle((*inlined).Sons);
		(*inlined).Sons = (ttypeseq225848*) newSeqRC1((&NTI225848), 1);
		memset((void*)LOC62, 0, sizeof(LOC62));
		LOC62[0] = argtype;
		asgnRefNoCycle((void**) (&(*inlined).Sons->data[0]), LOC62[0]);
		asgnRefNoCycle((void**) (&(*inlined).N), argsemantized);
		put_405283((&(*m).Bindings), f, inlined);
		result = argsemantized;
		goto BeforeRet;
	}
	LA60: ;
	switch (r) {
	case ((NU8) 1):
	{
		tnode225816* LOC64;
		(*m).Convmatches += 1;
		LOC64 = 0;
		LOC64 = copytree_226329(arg);
		result = implicitconv_411356(((NU8) 58), f, LOC64, (&(*m)), c);
	}
	break;
	case ((NU8) 2):
	{
		tnode225816* LOC66;
		(*m).Intconvmatches += 1;
		LOC66 = 0;
		LOC66 = copytree_226329(arg);
		result = implicitconv_411356(((NU8) 58), f, LOC66, (&(*m)), c);
	}
	break;
	case ((NU8) 3):
	{
		tnode225816* LOC68;
		(*m).Subtypematches += 1;
		LOC68 = 0;
		LOC68 = copytree_226329(arg);
		result = implicitconv_411356(((NU8) 59), f, LOC68, (&(*m)), c);
	}
	break;
	case ((NU8) 4):
	{
		tnode225816* LOC70;
		(*m).Subtypematches += 1;
		LOC70 = 0;
		LOC70 = copytree_226329(arg);
		result = implicitconv_411356(((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):((TMP2693)((*c).Seminferredlambda.ClPrc))(c, (*m).Bindings, arg);
		}
		goto LA72;
		LA74: ;
		{
			tsym225846* inferred;
			inferred = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info, (*c).Semgenerateinstance.ClEnv):((TMP2694)((*c).Semgenerateinstance.ClPrc))(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info);
			result = newsymnode_227755(inferred, (*arg).Info);
		}
		LA72: ;
		{
			if (!(r == ((NU8) 6))) goto LA79;
			(*m).Convmatches += 1;
			result = implicitconv_411356(((NU8) 58), f, result, (&(*m)), c);
		}
		LA79: ;
	}
	break;
	case ((NU8) 7):
	{
		(*m).Genericmatches += 1;
		result = copytree_226329(arg);
		asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_411309(c, arg, (&(*m)), f));
		{
			ttype225852* LOC84;
			tnode225816* LOC87;
			LOC84 = 0;
			LOC84 = skiptypes_230245((*result).Typ, IL64(211106240964608));
			if (!((*LOC84).Kind == ((NU8) 18))) goto LA85;
			LOC87 = 0;
			LOC87 = copytree_226329(arg);
			result = implicitconv_411356(((NU8) 58), f, LOC87, (&(*m)), c);
		}
		LA85: ;
	}
	break;
	case ((NU8) 8):
	{
		tnode225816* LOC89;
		(*m).Intconvmatches += 256;
		LOC89 = 0;
		LOC89 = copytree_226329(arg);
		result = implicitconv_411356(((NU8) 58), f, LOC89, (&(*m)), c);
	}
	break;
	case ((NU8) 9):
	{
		(*m).Exactmatches += 1;
		result = copytree_226329(arg);
		{
			ttype225852* LOC93;
			tnode225816* LOC96;
			LOC93 = 0;
			LOC93 = skiptypes_230245(f, IL64(211106240964608));
			if (!((*LOC93).Kind == ((NU8) 18))) goto LA94;
			LOC96 = 0;
			LOC96 = copytree_226329(arg);
			result = implicitconv_411356(((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_226329(arg);
			goto BeforeRet;
		}
		LA100: ;
		result = userconvmatch_411387(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_411500(c, m, f, a, arg);
			}
			goto LA108;
			LA110: ;
			{
				ttype225852* LOC113;
				LOC113 = 0;
				LOC113 = base_263038(f);
				r = typerel_406436(m, LOC113, a, NIM_TRUE);
				{
					if (!(((NU8) 7) <= r)) goto LA116;
					(*m).Convmatches += 1;
					result = copytree_226329(arg);
					{
						ttype225852* LOC122;
						if (!(r == ((NU8) 7))) goto LA120;
						LOC122 = 0;
						LOC122 = base_263038(f);
						asgnRefNoCycle((void**) (&(*result).Typ), getinstantiatedtype_411309(c, arg, (&(*m)), LOC122));
					}
					LA120: ;
					(*m).Basetypematch = NIM_TRUE;
				}
				goto LA114;
				LA116: ;
				{
					ttype225852* LOC124;
					LOC124 = 0;
					LOC124 = base_263038(f);
					result = userconvmatch_411387(c, m, LOC124, a, arg);
				}
				LA114: ;
			}
			LA108: ;
		}
		LA106: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, copycandidate_405649)(tcandidate405209* a, tcandidate405209* 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_226329((*b).Call));
	(*a).Basetypematch = (*b).Basetypematch;
	copyidtable_226241((&(*a).Bindings), (*b).Bindings);
}

N_NIMCALL(NI, sumgeneric_405661)(ttype225852* t_405663) {
	NI result;
	ttype225852* t;
	result = 0;
	t = t_405663;
	{
		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_226267(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_405716;
					NI HEX3Atmp_405731;
					NI LOC7;
					NI res_405734;
					i_405716 = 0;
					HEX3Atmp_405731 = 0;
					LOC7 = 0;
					LOC7 = len_230005(t);
					HEX3Atmp_405731 = (LOC7 - 1);
					res_405734 = 0;
					{
						while (1) {
							NI LOC10;
							if (!(res_405734 <= HEX3Atmp_405731)) goto LA9;
							i_405716 = res_405734;
							LOC10 = 0;
							LOC10 = sumgeneric_405661((*t).Sons->data[i_405716]);
							result += LOC10;
							res_405734 += 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_405757)(ttype225852* a, ttype225852* b) {
	NI result;
	NI x;
	NI y;
	result = 0;
	x = 0;
	y = 0;
	{
		NI i_405785;
		NI HEX3Atmp_406004;
		NI LOC2;
		NI res_406007;
		i_405785 = 0;
		HEX3Atmp_406004 = 0;
		LOC2 = 0;
		LOC2 = len_230005(a);
		HEX3Atmp_406004 = (LOC2 - 1);
		res_406007 = 1;
		{
			while (1) {
				NI LOC5;
				if (!(res_406007 <= HEX3Atmp_406004)) goto LA4;
				i_405785 = res_406007;
				LOC5 = 0;
				LOC5 = sumgeneric_405661((*a).Sons->data[i_405785]);
				x += LOC5;
				res_406007 += 1;
			} LA4: ;
		}
	}
	{
		NI i_405819;
		NI HEX3Atmp_406010;
		NI LOC7;
		NI res_406013;
		i_405819 = 0;
		HEX3Atmp_406010 = 0;
		LOC7 = 0;
		LOC7 = len_230005(b);
		HEX3Atmp_406010 = (LOC7 - 1);
		res_406013 = 1;
		{
			while (1) {
				NI LOC10;
				if (!(res_406013 <= HEX3Atmp_406010)) goto LA9;
				i_405819 = res_406013;
				LOC10 = 0;
				LOC10 = sumgeneric_405661((*b).Sons->data[i_405819]);
				y += LOC10;
				res_406013 += 1;
			} LA9: ;
		}
	}
	result = (NI32)(x - y);
	return result;
}

N_NIMCALL(NI, cmpcandidates_406039)(tcandidate405209* a, tcandidate405209* 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_405757((*a).Callee, (*b).Callee);
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode225816*, paramtypesmatch_412263)(tcandidate405209* m, ttype225852* f, ttype225852* a, tnode225816* arg, tnode225816* argorig) {
	tnode225816* 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_411647(m, f, a, arg, argorig);
	}
	goto LA1;
	LA5: ;
	{
		tcontext290021* c;
		tcandidate405209 x;
		tcandidate405209 y;
		tcandidate405209 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_405270(c, (&x), (*m).Callee);
		initcandidate_405270(c, (&y), (*m).Callee);
		initcandidate_405270(c, (&z), (*m).Callee);
		x.Calleesym = (*m).Calleesym;
		y.Calleesym = (*m).Calleesym;
		z.Calleesym = (*m).Calleesym;
		best = -1;
		{
			NI i_412322;
			NI HEX3Atmp_412633;
			NI LOC9;
			NI res_412636;
			i_412322 = 0;
			HEX3Atmp_412633 = 0;
			LOC9 = 0;
			LOC9 = sonslen_226249(arg);
			HEX3Atmp_412633 = (NI32)(LOC9 - 1);
			res_412636 = 0;
			{
				while (1) {
					if (!(res_412636 <= HEX3Atmp_412633)) goto LA11;
					i_412322 = res_412636;
					{
						NU8 r;
						if (!((126976 &(1<<(((*(*(*arg).kindU.S6.Sons->data[i_412322]).kindU.S4.Sym).Kind)&31)))!=0)) goto LA14;
						copycandidate_405649((&z), (&(*m)));
						r = typerel_406436((&z), f, (*(*arg).kindU.S6.Sons->data[i_412322]).Typ, NIM_TRUE);
						{
							if (!!((r == ((NU8) 0)))) goto LA18;
							switch (x.State) {
							case ((NU8) 0):
							case ((NU8) 2):
							{
								genericAssign((void*)(&x), (void*)(&z), (&NTI405209));
								best = i_412322;
								x.State = ((NU8) 1);
							}
							break;
							case ((NU8) 1):
							{
								NI cmp;
								cmp = cmpcandidates_406039((&x), (&z));
								{
									if (!(cmp < 0)) goto LA24;
									best = i_412322;
									genericAssign((void*)(&x), (void*)(&z), (&NTI405209));
								}
								goto LA22;
								LA24: ;
								{
									if (!(cmp == 0)) goto LA27;
									genericAssign((void*)(&y), (void*)(&z), (&NTI405209));
								}
								goto LA22;
								LA27: ;
								LA22: ;
							}
							break;
							}
						}
						LA18: ;
					}
					LA14: ;
					res_412636 += 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_406039((&x), (&y));
			LOC34 = (LOC36 == 0);
			LA35: ;
			if (!LOC34) goto LA37;
			{
				if (!!((x.State == ((NU8) 1)))) goto LA41;
				internalerror_197987((*arg).Info, ((NimStringDesc*) &TMP2703));
			}
			LA41: ;
			result = NIM_NIL;
		}
		goto LA29;
		LA37: ;
		{
			markused_405251((*arg).Info, (*(*arg).kindU.S6.Sons->data[best]).kindU.S4.Sym);
			result = paramtypesmatchaux_411647(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_414484)(tcontext290021* c, ttype225852* f, ttype225852* a) {
	NIM_BOOL result;
	tcandidate405209 m;
	tnode225816* res;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405270(c, (&m), f);
	res = paramtypesmatch_412263((&m), f, a, emptynode_226738, NIM_NIL);
	result = !((res == NIM_NIL));
	return result;
}

static N_INLINE(NIM_BOOL, typefits_417158)(tcontext290021* c, tsym225846* s, ttype225852* 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_226255((*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_414484(c, (*(*s).Typ).Sons->data[1], firstarg);
	}
	LA8: ;
	return result;
}

N_NIMCALL(void, suggestoperations_417202)(tcontext290021* c, tnode225816* n, ttype225852* typ, NI* outputs) {
	NIM_BOOL islocal_417402;
	islocal_417402 = NIM_TRUE;
	{
		tscope225840* scope_417404;
		tscope225840* HEX3Atmp_417546;
		tscope225840* current_417549;
		scope_417404 = 0;
		HEX3Atmp_417546 = 0;
		HEX3Atmp_417546 = (*c).Currentscope;
		current_417549 = HEX3Atmp_417546;
		{
			while (1) {
				tsymseq225818* entries_417406;
				tsymseq225818* result_417426;
				TY415638 LOC11;
				if (!!((current_417549 == NIM_NIL))) goto LA3;
				scope_417404 = current_417549;
				{
					if (!(scope_417404 == (*c).Toplevelscope)) goto LA6;
					islocal_417402 = NIM_FALSE;
				}
				LA6: ;
				result_417426 = (tsymseq225818*) newSeq((&NTI225818), 0);
				{
					tsym225846* x_417428;
					tstrtable225820 HEX3Atmp_417534;
					ttabiter235119 it_417537;
					tsym225846* s_417539;
					x_417428 = 0;
					memset((void*)(&HEX3Atmp_417534), 0, sizeof(HEX3Atmp_417534));
					HEX3Atmp_417534.Counter = (*scope_417404).Symbols.Counter;
					HEX3Atmp_417534.Data = (*scope_417404).Symbols.Data;
					memset((void*)(&it_417537), 0, sizeof(it_417537));
					s_417539 = inittabiter_235124((&it_417537), HEX3Atmp_417534);
					{
						while (1) {
							if (!!((s_417539 == NIM_NIL))) goto LA10;
							x_417428 = s_417539;
							result_417426 = (tsymseq225818*) incrSeq(&(result_417426)->Sup, sizeof(tsym225846*));
							asgnRefNoCycle((void**) (&result_417426->data[result_417426->Sup.len-1]), x_417428);
							s_417539 = nextiter_235132((&it_417537), HEX3Atmp_417534);
						} LA10: ;
					}
				}
				genericSeqAssign((&entries_417406), result_417426, (&NTI225818));
				memset((void*)(&LOC11), 0, sizeof(LOC11));
				LOC11.ClPrc = ((TMP2635) (HEX3Aanonymous_417470)); LOC11.ClEnv = NIM_NIL;
				sort_415619(entries_417406->data, entries_417406->Sup.len, LOC11, ((NU8) 1));
				{
					tsym225846* item_417408;
					NI i_417543;
					NI l_417545;
					item_417408 = 0;
					i_417543 = 0;
					l_417545 = entries_417406->Sup.len;
					{
						while (1) {
							tsym225846* it;
							if (!(i_417543 < l_417545)) goto LA14;
							item_417408 = entries_417406->data[i_417543];
							it = item_417408;
							{
								NIM_BOOL LOC17;
								NimStringDesc* LOC21;
								LOC17 = 0;
								LOC17 = filtersym_414813(it);
								if (!(LOC17)) goto LA18;
								LOC17 = typefits_417158(c, it, typ);
								LA18: ;
								if (!LOC17) goto LA19;
								LOC21 = 0;
								LOC21 = symtostr_414804(it, islocal_417402, ((NimStringDesc*) &TMP2632));
								suggestwriteln_196457(LOC21);
								(*outputs) += 1;
							}
							LA19: ;
							i_417543 += 1;
						} LA14: ;
					}
				}
				current_417549 = (*current_417549).Parent;
			} LA3: ;
		}
	}
}

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

N_NIMCALL(void, suggestobject_415304)(tcontext290021* c, tnode225816* n, NI* outputs) {
	switch ((*n).Kind) {
	case ((NU8) 137):
	{
		{
			NI i_415322;
			NI HEX3Atmp_415395;
			NI LOC3;
			NI res_415398;
			i_415322 = 0;
			HEX3Atmp_415395 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226249(n);
			HEX3Atmp_415395 = (NI32)(LOC3 - 1);
			res_415398 = 0;
			{
				while (1) {
					if (!(res_415398 <= HEX3Atmp_415395)) goto LA5;
					i_415322 = res_415398;
					suggestobject_415304(c, (*n).kindU.S6.Sons->data[i_415322], outputs);
					res_415398 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 138):
	{
		NI l;
		l = sonslen_226249(n);
		{
			if (!(0 < l)) goto LA9;
			suggestobject_415304(c, (*n).kindU.S6.Sons->data[0], outputs);
			{
				NI i_415365;
				NI HEX3Atmp_415401;
				NI res_415404;
				i_415365 = 0;
				HEX3Atmp_415401 = 0;
				HEX3Atmp_415401 = (NI32)(l - 1);
				res_415404 = 1;
				{
					while (1) {
						tnode225816* LOC14;
						if (!(res_415404 <= HEX3Atmp_415401)) goto LA13;
						i_415365 = res_415404;
						LOC14 = 0;
						LOC14 = lastson_226261((*n).kindU.S6.Sons->data[i_415365]);
						suggestobject_415304(c, LOC14, outputs);
						res_415404 += 1;
					} LA13: ;
				}
			}
		}
		LA9: ;
	}
	break;
	case ((NU8) 3):
	{
		suggestfield_415031(c, (*n).kindU.S4.Sym, outputs);
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(void, suggestfieldaccess_417669)(tcontext290021* c, tnode225816* n, NI* outputs) {
	ttype225852* 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;
				{
					tsym225846* it_417755;
					tstrtable225820 HEX3Atmp_417924;
					ttabiter235119 it_417927;
					tsym225846* s_417929;
					it_417755 = 0;
					memset((void*)(&HEX3Atmp_417924), 0, sizeof(HEX3Atmp_417924));
					HEX3Atmp_417924.Counter = (*(*c).Toplevelscope).Symbols.Counter;
					HEX3Atmp_417924.Data = (*(*c).Toplevelscope).Symbols.Data;
					memset((void*)(&it_417927), 0, sizeof(it_417927));
					s_417929 = inittabiter_235124((&it_417927), HEX3Atmp_417924);
					{
						while (1) {
							if (!!((s_417929 == NIM_NIL))) goto LA17;
							it_417755 = s_417929;
							{
								NIM_BOOL LOC20;
								NimStringDesc* LOC23;
								LOC20 = 0;
								LOC20 = filtersym_414813(it_417755);
								if (!LOC20) goto LA21;
								LOC23 = 0;
								LOC23 = symtostr_414804(it_417755, NIM_FALSE, ((NimStringDesc*) &TMP2632));
								suggestwriteln_196457(LOC23);
								(*outputs) += 1;
							}
							LA21: ;
							s_417929 = nextiter_235132((&it_417927), HEX3Atmp_417924);
						} LA17: ;
					}
				}
			}
			goto LA11;
			LA13: ;
			{
				{
					tsym225846* it_417796;
					tstrtable225820 HEX3Atmp_417931;
					ttabiter235119 it_417934;
					tsym225846* s_417936;
					it_417796 = 0;
					memset((void*)(&HEX3Atmp_417931), 0, sizeof(HEX3Atmp_417931));
					HEX3Atmp_417931.Counter = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Counter;
					HEX3Atmp_417931.Data = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Data;
					memset((void*)(&it_417934), 0, sizeof(it_417934));
					s_417936 = inittabiter_235124((&it_417934), HEX3Atmp_417931);
					{
						while (1) {
							if (!!((s_417936 == NIM_NIL))) goto LA27;
							it_417796 = s_417936;
							{
								NIM_BOOL LOC30;
								NimStringDesc* LOC33;
								LOC30 = 0;
								LOC30 = filtersym_414813(it_417796);
								if (!LOC30) goto LA31;
								LOC33 = 0;
								LOC33 = symtostr_414804(it_417796, NIM_FALSE, ((NimStringDesc*) &TMP2632));
								suggestwriteln_196457(LOC33);
								(*outputs) += 1;
							}
							LA31: ;
							s_417936 = nextiter_235132((&it_417934), HEX3Atmp_417931);
						} LA27: ;
					}
				}
			}
			LA11: ;
		}
		goto LA5;
		LA9: ;
		{
			suggesteverything_417583(c, n, outputs);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC36;
		NIM_BOOL LOC37;
		ttype225852* 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_415216(c, (*t).N, outputs);
				t = (*t).Sons->data[0];
			} LA43: ;
		}
		suggestoperations_417202(c, n, typ, outputs);
	}
	goto LA1;
	LA40: ;
	{
		typ = skiptypes_230245(typ, 14682112);
		{
			ttype225852* t;
			if (!((*typ).Kind == ((NU8) 17))) goto LA47;
			t = typ;
			{
				while (1) {
					suggestobject_415304(c, (*t).N, outputs);
					{
						if (!((*t).Sons->data[0] == NIM_NIL)) goto LA53;
						goto LA49;
					}
					LA53: ;
					t = skiptypes_230245((*t).Sons->data[0], 2048);
				}
			} LA49: ;
			suggestoperations_417202(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_415216(c, (*typ).N, outputs);
			suggestoperations_417202(c, n, typ, outputs);
		}
		goto LA45;
		LA58: ;
		{
			suggestoperations_417202(c, n, typ, outputs);
		}
		LA45: ;
	}
	LA1: ;
}

N_NIMCALL(tnode225816*, findclosestcall_418067)(tnode225816* n) {
	tnode225816* 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_197411((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		{
			NI i_418114;
			NI HEX3Atmp_418147;
			NI LOC10;
			NI res_418150;
			i_418114 = 0;
			HEX3Atmp_418147 = 0;
			LOC10 = 0;
			LOC10 = safelen_226424(n);
			HEX3Atmp_418147 = (LOC10 - 1);
			res_418150 = 0;
			{
				while (1) {
					if (!(res_418150 <= HEX3Atmp_418147)) goto LA12;
					i_418114 = res_418150;
					result = findclosestcall_418067((*n).kindU.S6.Sons->data[i_418114]);
					{
						if (!!((result == NIM_NIL))) goto LA15;
						goto BeforeRet;
					}
					LA15: ;
					res_418150 += 1;
				} LA12: ;
			}
		}
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(NIM_BOOL, namefits_415427)(tcontext290021* c, tsym225846* s, tnode225816* n) {
	NIM_BOOL result;
	tnode225816* op;
	tident200021* 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_405295)(tcontext290021* ctx, tcandidate405209* c, tsym225846* callee, tnode225816* binding, NI calleescope) {
	initcandidateaux_405258(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;
		{
			tsym225846* LOC9;
			tsym225846* rootsym;
			LOC9 = 0;
			LOC9 = originatingmodule_232754(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_226167((&(*c).Bindings));
	genericSeqAssign((&(*c).Errors), NIM_NIL, (&NTI225818));
	{
		NIM_BOOL LOC21;
		tnode225816* 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_226698((*callee).Ast, 2);
		{
			NI i_405405;
			NI HEX3Atmp_405603;
			NI LOC26;
			NI LOC27;
			NI res_405606;
			i_405405 = 0;
			HEX3Atmp_405603 = 0;
			LOC26 = 0;
			LOC26 = sonslen_226249(typeparams);
			LOC27 = 0;
			LOC27 = sonslen_226249(binding);
			HEX3Atmp_405603 = ((LOC26 <= (NI32)(LOC27 - 1)) ? LOC26 : (NI32)(LOC27 - 1));
			res_405606 = 1;
			{
				while (1) {
					ttype225852* formaltypeparam;
					ttype225852* bound;
					tnode225816* LOC30;
					if (!(res_405606 <= HEX3Atmp_405603)) goto LA29;
					i_405405 = res_405606;
					formaltypeparam = (*(*typeparams).kindU.S6.Sons->data[(NI32)(i_405405 - 1)]).Typ;
					LOC30 = 0;
					LOC30 = HEX5BHEX5D_226698(binding, i_405405);
					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_230245(bound, 256);
					}
					LA35: ;
					put_405283((&(*c).Bindings), formaltypeparam, bound);
					res_405606 += 1;
				} LA29: ;
			}
		}
	}
	LA23: ;
}

N_NIMCALL(void, preparenamedparam_412785)(tnode225816* a) {
	{
		tlineinfo195539 info;
		tident200021* 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_295010((*a).kindU.S6.Sons->data[0]);
		asgnRefNoCycle((void**) (&(*a).kindU.S6.Sons->data[0]), newidentnode_226125(LOC5, info));
	}
	LA3: ;
}

N_NIMCALL(tnode225816*, prepareoperand_412708)(tcontext290021* c, ttype225852* formal, tnode225816* a) {
	tnode225816* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = ((*formal).Kind == ((NU8) 6));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = len_230005(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(ttype225852*, arrayconstr_412860)(tcontext290021* c, tnode225816* n) {
	ttype225852* result;
	ttype225852* LOC1;
	ttype225852* LOC2;
	ttype225852* LOC3;
	result = 0;
	result = newtypes_290214(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_282030(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_291351(c, IL64(0), IL64(0), (*n).Info, LOC1);
	rawaddson_230562(result, LOC2);
	LOC3 = 0;
	LOC3 = skiptypes_230245((*n).Typ, 8423424);
	addsonskipintlit_282572(result, LOC3);
	return result;
}

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

N_NIMCALL(tnode225816*, prepareoperand_412762)(tcontext290021* c, tnode225816* a) {
	tnode225816* 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_412883)(ttype225852* t) {
	(*(*(*(*t).Sons->data[0]).N).kindU.S6.Sons->data[1]).kindU.S1.Intval += 1;
}

N_NIMCALL(void, matchesaux_413047)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m, intset222056* marker) {
	NI f;
	NI a;
	NI formallen;
	tnode225816* LOC6;
	tnode225816* container;
	tsym225846* 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_226138((*n).Kind, (*n).Info));
	asgnRefNoCycle((void**) (&(*(*m).Call).Typ), base_263038((*m).Callee));
	formallen = len_226364((*(*m).Callee).N);
	LOC6 = 0;
	LOC6 = copytree_226329((*n).kindU.S6.Sons->data[0]);
	addson_226287((*m).Call, LOC6);
	container = NIM_NIL;
	formal = NIM_NIL;
	{
		while (1) {
			NI LOC9;
			LOC9 = 0;
			LOC9 = len_226364(n);
			if (!(a < LOC9)) goto LA8;
			{
				tnode225816* arg;
				if (!((*(*n).kindU.S6.Sons->data[a]).Kind == ((NU8) 33))) goto LA12;
				preparenamedparam_412785((*n).kindU.S6.Sons->data[a]);
				{
					if (!!(((*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA16;
					localerror_197955((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 159), ((NimStringDesc*) &TMP2689));
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA16: ;
				formal = getsymfromlist_235228((*(*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_222916(marker, (*formal).Position);
					if (!LOC24) goto LA25;
					localerror_197955((*(*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_412708(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_412263(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_322381((*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: ;
				{
					ttype225852* LOC45;
					if (!(*m).Basetypematch) goto LA43;
					LOC45 = 0;
					LOC45 = arrayconstr_412860(c, arg);
					container = newnodeit_226145(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC45);
					addson_226287(container, arg);
					setson_412653((*m).Call, (NI32)((*formal).Position + 1), container);
					{
						if (!!((f == (NI32)(formallen - 1)))) goto LA48;
						container = NIM_NIL;
					}
					LA48: ;
				}
				goto LA41;
				LA43: ;
				{
					setson_412653((*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_412762(c, (*n).kindU.S6.Sons->data[a]));
						{
							ttype225852* LOC62;
							ttype225852* LOC65;
							tnode225816* LOC66;
							tnode225816* LOC67;
							LOC62 = 0;
							LOC62 = skiptypes_230245((*(*n).kindU.S6.Sons->data[a]).Typ, IL64(211106240964608));
							if (!((*LOC62).Kind == ((NU8) 28))) goto LA63;
							LOC65 = 0;
							LOC65 = getsystype_282030(((NU8) 29));
							LOC66 = 0;
							LOC66 = copytree_226329((*n).kindU.S6.Sons->data[a]);
							LOC67 = 0;
							LOC67 = implicitconv_411356(((NU8) 58), LOC65, LOC66, (&(*m)), c);
							addson_226287((*m).Call, LOC67);
						}
						goto LA60;
						LA63: ;
						{
							tnode225816* LOC69;
							LOC69 = 0;
							LOC69 = copytree_226329((*n).kindU.S6.Sons->data[a]);
							addson_226287((*m).Call, LOC69);
						}
						LA60: ;
					}
					goto LA56;
					LA58: ;
					{
						tnode225816* arg;
						if (!!((formal == NIM_NIL))) goto LA71;
						(*m).Basetypematch = NIM_FALSE;
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[a]), prepareoperand_412708(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
						arg = paramtypesmatch_412263(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_226287(container, arg);
							incrindextype_412883((*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: ;
				{
					tnode225816* arg;
					{
						if (!!(((*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).Kind == ((NU8) 3)))) goto LA86;
						internalerror_197987((*(*n).kindU.S6.Sons->data[a]).Info, ((NimStringDesc*) &TMP2706));
						goto BeforeRet;
					}
					LA86: ;
					formal = (*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).kindU.S4.Sym;
					{
						NIM_BOOL LOC90;
						LOC90 = 0;
						LOC90 = containsorincl_222916(marker, (*formal).Position);
						if (!LOC90) goto LA91;
						localerror_197955((*(*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_412708(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
					arg = paramtypesmatch_412263(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: ;
					{
						ttype225852* LOC101;
						tnode225816* LOC102;
						if (!(*m).Basetypematch) goto LA99;
						LOC101 = 0;
						LOC101 = arrayconstr_412860(c, arg);
						container = newnodeit_226145(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC101);
						addson_226287(container, arg);
						LOC102 = 0;
						LOC102 = implicitconv_411356(((NU8) 58), (*formal).Typ, container, (&(*m)), c);
						setson_412653((*m).Call, (NI32)((*formal).Position + 1), LOC102);
						{
							if (!!((f == (NI32)(formallen - 1)))) goto LA105;
							container = NIM_NIL;
						}
						LA105: ;
					}
					goto LA97;
					LA99: ;
					{
						setson_412653((*m).Call, (NI32)((*formal).Position + 1), arg);
					}
					LA97: ;
				}
				LA52: ;
				{
					if (!!((*formal).Constraint == 0)) goto LA110;
					{
						NIM_BOOL LOC114;
						LOC114 = 0;
						LOC114 = matchnodekinds_322381((*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_414367)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m) {
	intset222056 marker;
	memset((void*)(&marker), 0, sizeof(marker));
	chckNil((void*)(&marker));
	memset((void*)(&marker), 0, sizeof(marker));
	initintset_222950((&marker));
	matchesaux_413047(c, n, norig, m, (&marker));
}

N_NIMCALL(NIM_BOOL, argsfit_415509)(tcontext290021* c, tsym225846* candidate, tnode225816* n, tnode225816* 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):
	{
		tcandidate405209 m;
		memset((void*)(&m), 0, sizeof(m));
		initcandidate_405295(c, (&m), candidate, NIM_NIL, -1);
		partialmatch_414367(c, n, norig, (&m));
		result = !((m.State == ((NU8) 2)));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, suggestcall_415532)(tcontext290021* c, tnode225816* n_415535, tnode225816* norig, NI* outputs) {
	NIM_BOOL islocal_415540;
	islocal_415540 = NIM_TRUE;
	{
		tscope225840* scope_415542;
		tscope225840* HEX3Atmp_417121;
		tscope225840* current_417124;
		scope_415542 = 0;
		HEX3Atmp_417121 = 0;
		HEX3Atmp_417121 = (*c).Currentscope;
		current_417124 = HEX3Atmp_417121;
		{
			while (1) {
				tsymseq225818* entries_415544;
				tsymseq225818* result_415564;
				TY415638 LOC11;
				if (!!((current_417124 == NIM_NIL))) goto LA3;
				scope_415542 = current_417124;
				{
					if (!(scope_415542 == (*c).Toplevelscope)) goto LA6;
					islocal_415540 = NIM_FALSE;
				}
				LA6: ;
				result_415564 = (tsymseq225818*) newSeq((&NTI225818), 0);
				{
					tsym225846* x_415566;
					tstrtable225820 HEX3Atmp_417109;
					ttabiter235119 it_417112;
					tsym225846* s_417114;
					x_415566 = 0;
					memset((void*)(&HEX3Atmp_417109), 0, sizeof(HEX3Atmp_417109));
					HEX3Atmp_417109.Counter = (*scope_415542).Symbols.Counter;
					HEX3Atmp_417109.Data = (*scope_415542).Symbols.Data;
					memset((void*)(&it_417112), 0, sizeof(it_417112));
					s_417114 = inittabiter_235124((&it_417112), HEX3Atmp_417109);
					{
						while (1) {
							if (!!((s_417114 == NIM_NIL))) goto LA10;
							x_415566 = s_417114;
							result_415564 = (tsymseq225818*) incrSeq(&(result_415564)->Sup, sizeof(tsym225846*));
							asgnRefNoCycle((void**) (&result_415564->data[result_415564->Sup.len-1]), x_415566);
							s_417114 = nextiter_235132((&it_417112), HEX3Atmp_417109);
						} LA10: ;
					}
				}
				genericSeqAssign((&entries_415544), result_415564, (&NTI225818));
				memset((void*)(&LOC11), 0, sizeof(LOC11));
				LOC11.ClPrc = ((TMP2704) (HEX3Aanonymous_415608)); LOC11.ClEnv = NIM_NIL;
				sort_415619(entries_415544->data, entries_415544->Sup.len, LOC11, ((NU8) 1));
				{
					tsym225846* item_415546;
					NI i_417118;
					NI l_417120;
					item_415546 = 0;
					i_417118 = 0;
					l_417120 = entries_415544->Sup.len;
					{
						while (1) {
							tsym225846* it;
							if (!(i_417118 < l_417120)) goto LA14;
							item_415546 = entries_415544->data[i_417118];
							it = item_415546;
							{
								NIM_BOOL LOC17;
								NIM_BOOL LOC18;
								NimStringDesc* LOC23;
								LOC17 = 0;
								LOC18 = 0;
								LOC18 = filtersym_414813(it);
								if (!(LOC18)) goto LA19;
								LOC18 = namefits_415427(c, it, n_415535);
								LA19: ;
								LOC17 = LOC18;
								if (!(LOC17)) goto LA20;
								LOC17 = argsfit_415509(c, it, n_415535, norig);
								LA20: ;
								if (!LOC17) goto LA21;
								LOC23 = 0;
								LOC23 = symtostr_414804(it, islocal_415540, ((NimStringDesc*) &TMP2707));
								suggestwriteln_196457(LOC23);
								(*outputs) += 1;
							}
							LA21: ;
							i_417118 += 1;
						} LA14: ;
					}
				}
				current_417124 = (*current_417124).Parent;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, suggestexpr_421008)(tcontext290021* c, tnode225816* node) {
	NU8 cp;
	NI outputs;
	cp = incheckpoint_197411((*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;
	{
		tnode225816* n;
		if (!((gglobaloptions_169118 &(1<<((((NU8) 23))&31)))!=0)) goto LA11;
		n = findclosestdot_417972(node);
		{
			if (!(n == NIM_NIL)) goto LA15;
			n = node;
		}
		goto LA13;
		LA15: ;
		{
			cp = ((NU8) 2);
		}
		LA13: ;
		{
			NIM_BOOL LOC20;
			tnode225816* obj;
			LOC20 = 0;
			LOC20 = ((*n).Kind == ((NU8) 45));
			if (!(LOC20)) goto LA21;
			LOC20 = (cp == ((NU8) 2));
			LA21: ;
			if (!LOC20) goto LA22;
			obj = safesemexpr_418308(c, (*n).kindU.S6.Sons->data[0]);
			suggestfieldaccess_417669(c, obj, (&outputs));
		}
		goto LA18;
		LA22: ;
		{
			suggesteverything_417583(c, n, (&outputs));
		}
		LA18: ;
	}
	LA11: ;
	{
		tnode225816* n;
		if (!((gglobaloptions_169118 &(1<<((((NU8) 24))&31)))!=0)) goto LA27;
		n = findclosestcall_418067(node);
		{
			if (!(n == NIM_NIL)) goto LA31;
			n = node;
		}
		goto LA29;
		LA31: ;
		{
			cp = ((NU8) 2);
		}
		LA29: ;
		{
			tnode225816* a;
			tnode225816* x_421161;
			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_226323(n);
			x_421161 = safesemexpr_418308(c, (*n).kindU.S6.Sons->data[0]);
			{
				NIM_BOOL LOC40;
				LOC40 = 0;
				LOC40 = ((*x_421161).Kind == ((NU8) 1));
				if (LOC40) goto LA41;
				LOC40 = ((*x_421161).Typ == NIM_NIL);
				LA41: ;
				if (!LOC40) goto LA42;
				x_421161 = (*n).kindU.S6.Sons->data[0];
			}
			LA42: ;
			addson_226287(a, x_421161);
			{
				NI i_421212;
				NI HEX3Atmp_421282;
				NI LOC45;
				NI res_421285;
				i_421212 = 0;
				HEX3Atmp_421282 = 0;
				LOC45 = 0;
				LOC45 = sonslen_226249(n);
				HEX3Atmp_421282 = (NI32)(LOC45 - 1);
				res_421285 = 1;
				{
					while (1) {
						tnode225816* x;
						if (!(res_421285 <= HEX3Atmp_421282)) goto LA47;
						i_421212 = res_421285;
						x = safesemexpr_418308(c, (*n).kindU.S6.Sons->data[i_421212]);
						{
							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_226287(a, x);
						res_421285 += 1;
					} LA47: ;
				}
			} LA44: ;
			suggestcall_415532(c, a, n, (&outputs));
		}
		LA36: ;
	}
	LA27: ;
	(*c).Incompilescontext -= 1;
	{
		NIM_BOOL LOC56;
		LOC56 = 0;
		LOC56 = (0 < outputs);
		if (!(LOC56)) goto LA57;
		LOC56 = !(((gglobaloptions_169118 &(1<<((((NU8) 26))&31)))!=0));
		LA57: ;
		if (!LOC56) goto LA58;
		suggestquit_196846();
	}
	LA58: ;
	BeforeRet: ;
}

N_NIMCALL(void, newcandidate_405637)(tcontext290021* ctx, ttype225852* callee, tcandidate405209* Result) {
	initcandidate_405270(ctx, Result, callee);
}

N_NIMCALL(ttype225852*, arrayconstr_412872)(tcontext290021* c, tlineinfo195539 info) {
	ttype225852* result;
	ttype225852* LOC1;
	ttype225852* LOC2;
	ttype225852* LOC3;
	result = 0;
	result = newtypes_290214(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_282030(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_291351(c, IL64(0), IL64(-1), info, LOC1);
	rawaddson_230562(result, LOC2);
	LOC3 = 0;
	LOC3 = newtypes_290214(((NU8) 3), c);
	rawaddson_230562(result, LOC3);
	return result;
}

N_NIMCALL(void, matches_414382)(tcontext290021* c, tnode225816* n, tnode225816* norig, tcandidate405209* m) {
	intset222056 marker;
	NI f;
	memset((void*)(&marker), 0, sizeof(marker));
	chckNil((void*)(&marker));
	memset((void*)(&marker), 0, sizeof(marker));
	initintset_222950((&marker));
	matchesaux_413047(c, n, norig, m, (&marker));
	{
		if (!((*m).State == ((NU8) 2))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	f = 1;
	{
		while (1) {
			NI LOC7;
			tsym225846* formal;
			LOC7 = 0;
			LOC7 = sonslen_226249((*(*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_222916((&marker), (*formal).Position);
				if (!!(LOC10)) goto LA11;
				{
					if (!((*formal).Ast == NIM_NIL)) goto LA15;
					{
						tnode225816* container;
						ttype225852* LOC21;
						tnode225816* LOC22;
						if (!((*(*formal).Typ).Kind == ((NU8) 48))) goto LA19;
						LOC21 = 0;
						LOC21 = arrayconstr_412872(c, (*n).Info);
						container = newnodeit_226145(((NU8) 41), (*n).Info, LOC21);
						LOC22 = 0;
						LOC22 = implicitconv_411356(((NU8) 58), (*formal).Typ, container, (&(*m)), c);
						addson_226287((*m).Call, LOC22);
					}
					goto LA17;
					LA19: ;
					{
						(*m).State = ((NU8) 2);
						goto LA5;
					}
					LA17: ;
				}
				goto LA13;
				LA15: ;
				{
					tnode225816* LOC25;
					LOC25 = 0;
					LOC25 = copytree_226329((*formal).Ast);
					setson_412653((*m).Call, (NI32)((*formal).Position + 1), LOC25);
				}
				LA13: ;
			}
			LA11: ;
			f += 1;
		} LA6: ;
	} LA5: ;
	BeforeRet: ;
}

N_NIMCALL(NimStringDesc*, argtypetostring_406139)(tnode225816* arg, NU8 prefer) {
	NimStringDesc* result;
	result = 0;
	{
		tnode225816* LOC5;
		if (!((*arg).Kind == ((NU8) 56) || (*arg).Kind == ((NU8) 57))) goto LA3;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_226698(arg, 0);
		result = typetostring_263031((*LOC5).Typ, prefer);
		{
			NI i_406178;
			NI HEX3Atmp_406180;
			NI LOC7;
			NI res_406183;
			i_406178 = 0;
			HEX3Atmp_406180 = 0;
			LOC7 = 0;
			LOC7 = len_226364(arg);
			HEX3Atmp_406180 = (LOC7 - 1);
			res_406183 = 1;
			{
				while (1) {
					tnode225816* LOC10;
					NimStringDesc* LOC11;
					if (!(res_406183 <= HEX3Atmp_406180)) goto LA9;
					i_406178 = res_406183;
					result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP2907));
					LOC10 = 0;
					LOC10 = HEX5BHEX5D_226698(arg, i_406178);
					LOC11 = 0;
					LOC11 = typetostring_263031((*LOC10).Typ, prefer);
					result = resizeString(result, LOC11->Sup.len + 0);
appendString(result, LOC11);
					res_406183 += 1;
				} LA9: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		result = typetostring_263031((*arg).Typ, prefer);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, describeargs_406200)(tcontext290021* c, tnode225816* n, NI startidx, NU8 prefer) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2689));
	{
		NI i_406219;
		NI HEX3Atmp_406416;
		NI LOC2;
		NI res_406419;
		i_406219 = 0;
		HEX3Atmp_406416 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_406416 = (NI32)(LOC2 - 1);
		res_406419 = startidx;
		{
			while (1) {
				tnode225816* arg;
				NimStringDesc* LOC23;
				if (!(res_406419 <= HEX3Atmp_406416)) goto LA4;
				i_406219 = res_406419;
				arg = (*n).kindU.S6.Sons->data[i_406219];
				{
					NimStringDesc* LOC9;
					if (!((*(*n).kindU.S6.Sons->data[i_406219]).Kind == ((NU8) 33))) goto LA7;
					LOC9 = 0;
					LOC9 = rendertree_250058((*(*n).kindU.S6.Sons->data[i_406219]).kindU.S6.Sons->data[0], 0);
					result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2906));
					{
						if (!(*arg).Typ == 0) goto LA12;
						arg = (*c).Semoperand(c, (*(*n).kindU.S6.Sons->data[i_406219]).kindU.S6.Sons->data[1], 0);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_406219]).Typ), (*arg).Typ);
						asgnRefNoCycle((void**) (&(*(*n).kindU.S6.Sons->data[i_406219]).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_406219], 0);
						asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_406219]), arg);
					}
					LA17: ;
				}
				LA5: ;
				{
					if (!((*(*arg).Typ).Kind == ((NU8) 50))) goto LA21;
					goto BeforeRet;
				}
				LA21: ;
				LOC23 = 0;
				LOC23 = argtypetostring_406139(arg, prefer);
				result = resizeString(result, LOC23->Sup.len + 0);
appendString(result, LOC23);
				{
					NI LOC26;
					LOC26 = 0;
					LOC26 = sonslen_226249(n);
					if (!!((i_406219 == (NI32)(LOC26 - 1)))) goto LA27;
					result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2908));
				}
				LA27: ;
				res_406419 += 1;
			} LA4: ;
		}
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, suggeststmt_421299)(tcontext290021* c, tnode225816* n) {
	suggestexpr_421008(c, n);
}

N_NIMCALL(tnode225816*, usesym_421001)(tsym225846* sym) {
	tnode225816* result;
	result = 0;
	result = newsymnode_226132(sym);
	markused_405251((*result).Info, sym);
	return result;
}

N_NIMCALL(void, semfinishoperands_414292)(tcontext290021* c, tnode225816* n) {
	{
		NI i_414317;
		NI HEX3Atmp_414347;
		NI LOC2;
		NI res_414350;
		i_414317 = 0;
		HEX3Atmp_414347 = 0;
		LOC2 = 0;
		LOC2 = len_226364(n);
		HEX3Atmp_414347 = (LOC2 - 1);
		res_414350 = 1;
		{
			while (1) {
				if (!(res_414350 <= HEX3Atmp_414347)) goto LA4;
				i_414317 = res_414350;
				asgnRefNoCycle((void**) (&(*n).kindU.S6.Sons->data[i_414317]), prepareoperand_412762(c, (*n).kindU.S6.Sons->data[i_414317]));
				res_414350 += 1;
			} LA4: ;
		}
	}
}

N_NIMCALL(NU8, cmptypes_411293)(tcontext290021* c, ttype225852* f, ttype225852* a) {
	NU8 result;
	tcandidate405209 m;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405270(c, (&m), f);
	result = typerel_406436((&m), f, a, NIM_TRUE);
	return result;
}

N_NIMCALL(tsym225846*, instdeepcopy_414518)(tcontext290021* c, tsym225846* dc, ttype225852* t, tlineinfo195539 info) {
	tsym225846* result;
	tcandidate405209 m;
	ttype225852* f;
	result = 0;
	memset((void*)(&m), 0, sizeof(m));
	initcandidate_405270(c, (&m), (*dc).Typ);
	f = (*(*dc).Typ).Sons->data[1];
	{
		if (!((*f).Kind == ((NU8) 22) || (*f).Kind == ((NU8) 21))) goto LA3;
		f = lastson_226267(f);
	}
	LA3: ;
	{
		NU8 LOC7;
		LOC7 = 0;
		LOC7 = typerel_406436((&m), f, t, NIM_TRUE);
		if (!(LOC7 == ((NU8) 0))) goto LA8;
		localerror_197955(info, ((NU16) 4), ((NimStringDesc*) &TMP3343));
	}
	goto LA5;
	LA8: ;
	{
		result = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, dc, m.Bindings, info, (*c).Semgenerateinstance.ClEnv):((TMP3344)((*c).Semgenerateinstance.ClPrc))(c, dc, m.Bindings, info);
	}
	LA5: ;
	return result;
}

N_NIMCALL(NI, HEX3Aanonymous_419101)(tentry418478 a, tentry418478 b) {
	NI result;
	result = 0;
	result = cmp_419107(a.Pos, b.Pos);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, deffromline_419076)(TY418485** entries, NI32 col) {
	TY419144 LOC6;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_418758((*entries), NIM_NIL);
		if (!LOC3) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	memset((void*)(&LOC6), 0, sizeof(LOC6));
	LOC6.ClPrc = ((TMP4855) (HEX3Aanonymous_419101)); LOC6.ClEnv = NIM_NIL;
	sort_419125((*entries)->data, (*entries)->Sup.len, LOC6, ((NU8) 1));
	{
		tentry418478 e_420811;
		TY418485* HEX3Atmp_420813;
		NI i_420816;
		NI l_420818;
		memset((void*)(&e_420811), 0, sizeof(e_420811));
		HEX3Atmp_420813 = 0;
		unsureAsgnRef((void**) (&HEX3Atmp_420813), (*entries));
		i_420816 = 0;
		l_420818 = HEX3Atmp_420813->Sup.len;
		{
			while (1) {
				if (!(i_420816 < l_420818)) goto LA9;
				e_420811.Pos = HEX3Atmp_420813->data[i_420816].Pos;
				e_420811.Sym = HEX3Atmp_420813->data[i_420816].Sym;
				{
					NimStringDesc* LOC14;
					if (!(((NI) (col)) <= e_420811.Pos)) goto LA12;
					LOC14 = 0;
					LOC14 = symtostr_414804(e_420811.Sym, NIM_FALSE, ((NimStringDesc*) &TMP2696));
					suggestwriteln_196457(LOC14);
					goto BeforeRet;
				}
				LA12: ;
				i_420816 += 1;
			} LA9: ;
		}
	}
	BeforeRet: ;
}

N_NIMCALL(void, deffromsourcemap_420834)(tlineinfo195539 i) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = (((NI) (i.Fileindex)) < gsourcemaps_418508->Sup.len);
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = HEX3DHEX3D_418632(gsourcemaps_418508->data[i.Fileindex].Lines, NIM_NIL);
		LOC4 = !(LOC6);
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA7;
		LOC3 = (((NI) (i.Line)) < gsourcemaps_418508->data[i.Fileindex].Lines->Sup.len);
		LA7: ;
		if (!!(LOC3)) goto LA8;
		goto BeforeRet;
	}
	LA8: ;
	deffromline_419076((&gsourcemaps_418508->data[i.Fileindex].Lines->data[i.Line].Entries), ((NI32) (i.Col)));
	BeforeRet: ;
}
NIM_EXTERNC N_NOINLINE(void, HEX00_sigmatchInit)(void) {
	if (gsourcemaps_418508) nimGCunrefNoCycle(gsourcemaps_418508);
	gsourcemaps_418508 = (TY418487*) newSeqRC1((&NTI418487), 0);
}

NIM_EXTERNC N_NOINLINE(void, HEX00_sigmatchDatInit)(void) {
static TNimNode* TMP922[2];
static TNimNode* TMP2699[19];
static TNimNode* TMP2700[3];
NI TMP2702;
static char* NIM_CONST TMP2701[3] = {
"csEmpty", 
"csMatch", 
"csNoMatch"};
static TNimNode TMP870[29];
NTI418476.size = sizeof(tsourcemap418476);
NTI418476.kind = 18;
NTI418476.base = 0;
NTI418476.flags = 2;
NTI418480.size = sizeof(tlinemap418480);
NTI418480.kind = 18;
NTI418480.base = 0;
NTI418480.flags = 2;
NTI418478.size = sizeof(tentry418478);
NTI418478.kind = 18;
NTI418478.base = 0;
NTI418478.flags = 2;
TMP922[0] = &TMP870[3];
TMP870[3].kind = 1;
TMP870[3].offset = offsetof(tentry418478, Pos);
TMP870[3].typ = (&NTI108);
TMP870[3].name = "pos";
TMP922[1] = &TMP870[4];
TMP870[4].kind = 1;
TMP870[4].offset = offsetof(tentry418478, Sym);
TMP870[4].typ = (&NTI225814);
TMP870[4].name = "sym";
TMP870[2].len = 2; TMP870[2].kind = 2; TMP870[2].sons = &TMP922[0];
NTI418478.node = &TMP870[2];
NTI418485.size = sizeof(TY418485*);
NTI418485.kind = 24;
NTI418485.base = (&NTI418478);
NTI418485.flags = 2;
NTI418485.marker = TMP923;
TMP870[1].kind = 1;
TMP870[1].offset = offsetof(tlinemap418480, Entries);
TMP870[1].typ = (&NTI418485);
TMP870[1].name = "entries";
NTI418480.node = &TMP870[1];
NTI418481.size = sizeof(TY418481*);
NTI418481.kind = 24;
NTI418481.base = (&NTI418480);
NTI418481.flags = 2;
NTI418481.marker = TMP924;
TMP870[0].kind = 1;
TMP870[0].offset = offsetof(tsourcemap418476, Lines);
TMP870[0].typ = (&NTI418481);
TMP870[0].name = "lines";
NTI418476.node = &TMP870[0];
NTI418487.size = sizeof(TY418487*);
NTI418487.kind = 24;
NTI418487.base = (&NTI418476);
NTI418487.flags = 2;
NTI418487.marker = TMP925;
NTI405209.size = sizeof(tcandidate405209);
NTI405209.kind = 18;
NTI405209.base = 0;
TMP2699[0] = &TMP870[6];
TMP870[6].kind = 1;
TMP870[6].offset = offsetof(tcandidate405209, C);
TMP870[6].typ = (&NTI290019);
TMP870[6].name = "c";
TMP2699[1] = &TMP870[7];
TMP870[7].kind = 1;
TMP870[7].offset = offsetof(tcandidate405209, Exactmatches);
TMP870[7].typ = (&NTI108);
TMP870[7].name = "exactMatches";
TMP2699[2] = &TMP870[8];
TMP870[8].kind = 1;
TMP870[8].offset = offsetof(tcandidate405209, Genericmatches);
TMP870[8].typ = (&NTI108);
TMP870[8].name = "genericMatches";
TMP2699[3] = &TMP870[9];
TMP870[9].kind = 1;
TMP870[9].offset = offsetof(tcandidate405209, Subtypematches);
TMP870[9].typ = (&NTI108);
TMP870[9].name = "subtypeMatches";
TMP2699[4] = &TMP870[10];
TMP870[10].kind = 1;
TMP870[10].offset = offsetof(tcandidate405209, Intconvmatches);
TMP870[10].typ = (&NTI108);
TMP870[10].name = "intConvMatches";
TMP2699[5] = &TMP870[11];
TMP870[11].kind = 1;
TMP870[11].offset = offsetof(tcandidate405209, Convmatches);
TMP870[11].typ = (&NTI108);
TMP870[11].name = "convMatches";
TMP2699[6] = &TMP870[12];
NTI405205.size = sizeof(NU8);
NTI405205.kind = 14;
NTI405205.base = 0;
NTI405205.flags = 3;
for (TMP2702 = 0; TMP2702 < 3; TMP2702++) {
TMP870[TMP2702+13].kind = 1;
TMP870[TMP2702+13].offset = TMP2702;
TMP870[TMP2702+13].name = TMP2701[TMP2702];
TMP2700[TMP2702] = &TMP870[TMP2702+13];
}
TMP870[16].len = 3; TMP870[16].kind = 2; TMP870[16].sons = &TMP2700[0];
NTI405205.node = &TMP870[16];
TMP870[12].kind = 1;
TMP870[12].offset = offsetof(tcandidate405209, State);
TMP870[12].typ = (&NTI405205);
TMP870[12].name = "state";
TMP2699[7] = &TMP870[17];
TMP870[17].kind = 1;
TMP870[17].offset = offsetof(tcandidate405209, Callee);
TMP870[17].typ = (&NTI225812);
TMP870[17].name = "callee";
TMP2699[8] = &TMP870[18];
TMP870[18].kind = 1;
TMP870[18].offset = offsetof(tcandidate405209, Calleesym);
TMP870[18].typ = (&NTI225814);
TMP870[18].name = "calleeSym";
TMP2699[9] = &TMP870[19];
TMP870[19].kind = 1;
TMP870[19].offset = offsetof(tcandidate405209, Calleescope);
TMP870[19].typ = (&NTI108);
TMP870[19].name = "calleeScope";
TMP2699[10] = &TMP870[20];
TMP870[20].kind = 1;
TMP870[20].offset = offsetof(tcandidate405209, Call);
TMP870[20].typ = (&NTI225808);
TMP870[20].name = "call";
TMP2699[11] = &TMP870[21];
TMP870[21].kind = 1;
TMP870[21].offset = offsetof(tcandidate405209, Bindings);
TMP870[21].typ = (&NTI225864);
TMP870[21].name = "bindings";
TMP2699[12] = &TMP870[22];
TMP870[22].kind = 1;
TMP870[22].offset = offsetof(tcandidate405209, Basetypematch);
TMP870[22].typ = (&NTI138);
TMP870[22].name = "baseTypeMatch";
TMP2699[13] = &TMP870[23];
TMP870[23].kind = 1;
TMP870[23].offset = offsetof(tcandidate405209, Proxymatch);
TMP870[23].typ = (&NTI138);
TMP870[23].name = "proxyMatch";
TMP2699[14] = &TMP870[24];
TMP870[24].kind = 1;
TMP870[24].offset = offsetof(tcandidate405209, Genericconverter);
TMP870[24].typ = (&NTI138);
TMP870[24].name = "genericConverter";
TMP2699[15] = &TMP870[25];
TMP870[25].kind = 1;
TMP870[25].offset = offsetof(tcandidate405209, Coercedistincts);
TMP870[25].typ = (&NTI138);
TMP870[25].name = "coerceDistincts";
TMP2699[16] = &TMP870[26];
TMP870[26].kind = 1;
TMP870[26].offset = offsetof(tcandidate405209, Typedescmatched);
TMP870[26].typ = (&NTI138);
TMP870[26].name = "typedescMatched";
TMP2699[17] = &TMP870[27];
TMP870[27].kind = 1;
TMP870[27].offset = offsetof(tcandidate405209, Inheritancepenalty);
TMP870[27].typ = (&NTI108);
TMP870[27].name = "inheritancePenalty";
TMP2699[18] = &TMP870[28];
TMP870[28].kind = 1;
TMP870[28].offset = offsetof(tcandidate405209, Errors);
TMP870[28].typ = (&NTI225818);
TMP870[28].name = "errors";
TMP870[5].len = 19; TMP870[5].kind = 2; TMP870[5].sons = &TMP2699[0];
NTI405209.node = &TMP870[5];
}

