/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/sigmatch.o compiler/nimcache/sigmatch.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <setjmp.h>

#include <string.h>
typedef struct tsym188833 tsym188833;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct TY360558 TY360558;
typedef struct tsourcemap360547 tsourcemap360547;
typedef struct TY360552 TY360552;
typedef struct tlinemap360551 tlinemap360551;
typedef struct TY360556 TY360556;
typedef struct tentry360549 tentry360549;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tcell41090 tcell41090;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcstat43014 tgcstat43014;
typedef struct tcontext250019 tcontext250019;
typedef struct tnode188803 tnode188803;
typedef struct ttype188837 ttype188837;
typedef struct NimStringDesc NimStringDesc;
typedef struct tident167019 tident167019;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tpasscontext246003 tpasscontext246003;
typedef struct TNimObject TNimObject;
typedef struct tscope188827 tscope188827;
typedef struct tproccon250009 tproccon250009;
typedef struct tintset185047 tintset185047;
typedef struct ttrunk185043 ttrunk185043;
typedef struct ttrunkseq185045 ttrunkseq185045;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tlinkedlist118023 tlinkedlist118023;
typedef struct tlistentry118017 tlistentry118017;
typedef struct tidtable188849 tidtable188849;
typedef struct tidpairseq188847 tidpairseq188847;
typedef struct tidpair188845 tidpair188845;
typedef struct tidobj167013 tidobj167013;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tctx249037 tctx249037;
typedef struct TY250131 TY250131;
typedef struct tinstantiationpair250011 tinstantiationpair250011;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct E_Base E_Base;
typedef struct TSafePoint TSafePoint;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct TY188933 TY188933;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tlib188821 tlib188821;
typedef struct ttabiter197090 ttabiter197090;
typedef struct TY163619 TY163619;
typedef struct tfileinfo163525 tfileinfo163525;
typedef struct TY163540 TY163540;
typedef struct tdocumentor341005 tdocumentor341005;
typedef struct tcandidate345205 tcandidate345205;
typedef struct TY110805 TY110805;
typedef struct TY79484 TY79484;
typedef struct TY164208 TY164208;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef struct TY249229 TY249229;
typedef struct pprocHEX3Aobjecttype249216 pprocHEX3Aobjecttype249216;
typedef struct TY188922 TY188922;
typedef struct trstgenerator309012 trstgenerator309012;
typedef struct tstringtable121810 tstringtable121810;
typedef struct TY309028 TY309028;
typedef struct ttocentry309008 ttocentry309008;
typedef struct trstnode297009 trstnode297009;
typedef struct TY249217 TY249217;
typedef struct tblock249023 tblock249023;
typedef struct TY249198 TY249198;
typedef struct TY249223 TY249223;
typedef struct tkeyvaluepairseq121808 tkeyvaluepairseq121808;
typedef struct tkeyvaluepair121806 tkeyvaluepair121806;
typedef struct trstnodeseq297007 trstnodeseq297007;
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tentry360549  {
NI Pos;
tsym188833* Sym;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  tlinemap360551  {
TY360556* Entries;
};
struct  tsourcemap360547  {
TY360552* Lines;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  tpasscontext246003  {
  TNimObject Sup;
NIM_BOOL Fromcache;
};
struct  tintset185047  {
NI Counter;
NI Max;
ttrunk185043* Head;
ttrunkseq185045* Data;
};
struct  tlinkedlist118023  {
tlistentry118017* Head;
tlistentry118017* Tail;
NI Counter;
};
struct  tidpair188845  {
tidobj167013* Key;
TNimObject* Val;
};
struct  tidtable188849  {
NI Counter;
tidpairseq188847* Data;
};
typedef N_NIMCALL_PTR(tnode188803*, TY250061) (tcontext250019* c, tnode188803* n);
typedef N_NIMCALL_PTR(tnode188803*, TY250066) (tcontext250019* c, tnode188803* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode188803*, TY250074) (tcontext250019* c, tnode188803* n, NU16 flags, NIM_BOOL buffererrors);
typedef N_NIMCALL_PTR(tnode188803*, TY250083) (tcontext250019* c, tnode188803* n);
typedef N_NIMCALL_PTR(tnode188803*, TY250088) (tcontext250019* c, tnode188803* n, NU16 flags);
typedef N_NIMCALL_PTR(tnode188803*, TY250096) (tcontext250019* c, tnode188803* n);
typedef N_NIMCALL_PTR(tnode188803*, TY250101) (tcontext250019* c, tnode188803* n, tnode188803* norig, NU32 filter);
typedef N_NIMCALL_PTR(ttype188837*, TY250108) (tcontext250019* c, tnode188803* n, ttype188837* prev);
typedef struct {
N_NIMCALL_PTR(tnode188803*, ClPrc) (tcontext250019* c, tidtable188849 pt, tnode188803* n, void* ClEnv);
void* ClEnv;
} TY250114;
typedef struct {
N_NIMCALL_PTR(tsym188833*, ClPrc) (tcontext250019* c, tsym188833* fn, tidtable188849 pt, tlineinfo163527 info, void* ClEnv);
void* ClEnv;
} TY250120;
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tinstantiationpair250011  {
tsym188833* Genericsym;
tinstantiation188823* Inst;
};
struct  tcontext250019  {
  tpasscontext246003 Sup;
tsym188833* Module;
tscope188827* Currentscope;
tscope188827* Importtable;
tscope188827* Toplevelscope;
tproccon250009* P;
tsym188833* Friendmodule;
NI Instcounter;
tintset185047 Ambiguoussymbols;
NI Intypeclass;
NI Ingenericcontext;
NI Inunrolledcontext;
NI Incompilescontext;
NI Ingenericinst;
tsymseq188805* Converters;
tsymseq188805* Patterns;
tlinkedlist118023 Optionstack;
tidtable188849 Symmapping;
tlinkedlist118023 Libs;
TY250061 Semconstexpr;
TY250066 Semexpr;
TY250074 Semtryexpr;
TY250083 Semtryconstexpr;
TY250088 Semoperand;
TY250096 Semconstboolexpr;
TY250101 Semoverloadedcall;
TY250108 Semtypenode;
TY250114 Seminferredlambda;
TY250120 Semgenerateinstance;
tintset185047 Includedfiles;
tstrtable188807 Userpragmas;
tctx249037* Evalcontext;
tintset185047 Unknownidents;
TY250131* Generics;
NI Lastgenericidx;
NI Hloloopdetector;
};
struct  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (E_Base* e, void* ClEnv);
void* ClEnv;
} TY11626;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY11626 raiseAction;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  ttabiter197090  {
NI H;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  tfileinfo163525  {
NimStringDesc* Fullpath;
NimStringDesc* Projpath;
NimStringDesc* Shortname;
trope145007* Quotedname;
TY163540* Lines;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tsym188833* x_357795, tsym188833* y_357797, void* ClEnv);
void* ClEnv;
} TY357801;
typedef N_CLOSURE_PTR(NI, TMP2495) (tsym188833* x_359678, tsym188833* y_359680, void* ClEnv);
struct  tcandidate345205  {
tcontext250019* C;
NI Exactmatches;
NI Genericmatches;
NI Subtypematches;
NI Intconvmatches;
NI Convmatches;
NU8 State;
ttype188837* Callee;
tsym188833* Calleesym;
NI Calleescope;
tnode188803* Call;
tidtable188849 Bindings;
NIM_BOOL Basetypematch;
NIM_BOOL Proxymatch;
NIM_BOOL Genericconverter;
NIM_BOOL Coercedistincts;
NIM_BOOL Typedescmatched;
NI Inheritancepenalty;
TY110805* Errors;
};
typedef ttype188837* TY350968[1];
struct TY79484 {
NimStringDesc* Field0;
NI Field1;
};
typedef N_CLOSURE_PTR(tnode188803*, TMP2554) (tcontext250019* c, tidtable188849 pt, tnode188803* n);
typedef N_CLOSURE_PTR(tsym188833*, TMP2555) (tcontext250019* c, tsym188833* fn, tidtable188849 pt, tlineinfo163527 info);
typedef N_CLOSURE_PTR(NI, TMP2565) (tsym188833* x_357778, tsym188833* y_357780, void* ClEnv);
typedef struct {
N_NIMCALL_PTR(NI, ClPrc) (tentry360549 x_361162, tentry360549 y_361164, void* ClEnv);
void* ClEnv;
} TY361168;
typedef N_CLOSURE_PTR(NI, TMP4528) (tentry360549 x_361145, tentry360549 y_361147, void* ClEnv);
typedef NI TY22618[16];
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 Bits;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tproccon250009  {
tsym188833* Owner;
tsym188833* Resultsym;
NI Nestedloopcounter;
NI Nestedblockcounter;
NI Intrystmt;
tproccon250009* Next;
};
struct  ttrunk185043  {
ttrunk185043* Next;
NI Key;
TY22618 Bits;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tctx249037  {
  tpasscontext246003 Sup;
TY249229* Code;
TY164208* Debug;
tnode188803* Globals;
tnode188803* Constants;
ttypeseq188835* Types;
tnode188803* Currentexceptiona;
tnode188803* Currentexceptionb;
NI Exceptioninstr;
pprocHEX3Aobjecttype249216* Prc;
tsym188833* Module;
tnode188803* Callsite;
NU8 Mode;
NU8 Features;
NIM_BOOL Traceactive;
NI Loopiterations;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
struct  ttocentry309008  {
trstnode297009* N;
NimStringDesc* Refname;
NimStringDesc* Header;
};
typedef N_NIMCALL_PTR(NimStringDesc*, tfindfilehandler298018) (NimStringDesc* filename);
typedef N_NIMCALL_PTR(void, tmsghandler298016) (NimStringDesc* filename, NI line, NI col, NU8 msgkind, NimStringDesc* arg);
typedef NimStringDesc* TY309036[5];
struct  trstgenerator309012  {
  TNimObject Sup;
NU8 Target;
tstringtable121810* Config;
NI Splitafter;
TY309028* Tocpart;
NIM_BOOL Hastoc;
NimStringDesc* Theindex;
NU8 Options;
tfindfilehandler298018 Findfile;
tmsghandler298016 Msghandler;
NimStringDesc* Filename;
TY309036 Meta;
NimStringDesc* Currentsection;
};
typedef trope145007* tsections341003[25];
struct  tdocumentor341005  {
  trstgenerator309012 Sup;
trope145007* Moddesc;
NI Id;
tsections341003 Toc;
tsections341003 Section;
NimStringDesc* Indexvalfilename;
tstringtable121810* Seensymbols;
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
struct  tblock249023  {
tsym188833* Label;
TY249198* Fixups;
};
struct TY249223 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY249223 TY249220[256];
struct  pprocHEX3Aobjecttype249216  {
TY249217* Blocks;
tsym188833* Sym;
TY249220 Slots;
NI Maxslots;
};
struct tkeyvaluepair121806 {
NimStringDesc* Field0;
NimStringDesc* Field1;
};
struct  tstringtable121810  {
  TNimObject Sup;
NI Counter;
tkeyvaluepairseq121808* Data;
NU8 Mode;
};
struct  trstnode297009  {
NU8 Kind;
NimStringDesc* Text;
NI Level;
trstnodeseq297007* Sons;
};
struct TY360556 {
  TGenericSeq Sup;
  tentry360549 data[SEQ_DECL_SIZE];
};
struct TY360552 {
  TGenericSeq Sup;
  tlinemap360551 data[SEQ_DECL_SIZE];
};
struct TY360558 {
  TGenericSeq Sup;
  tsourcemap360547 data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct ttrunkseq185045 {
  TGenericSeq Sup;
  ttrunk185043* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
struct tidpairseq188847 {
  TGenericSeq Sup;
  tidpair188845 data[SEQ_DECL_SIZE];
};
struct TY250131 {
  TGenericSeq Sup;
  tinstantiationpair250011 data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct TY163540 {
  TGenericSeq Sup;
  trope145007* data[SEQ_DECL_SIZE];
};
struct TY163619 {
  TGenericSeq Sup;
  tfileinfo163525 data[SEQ_DECL_SIZE];
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY164208 {
  TGenericSeq Sup;
  tlineinfo163527 data[SEQ_DECL_SIZE];
};
struct TY249229 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY309028 {
  TGenericSeq Sup;
  ttocentry309008 data[SEQ_DECL_SIZE];
};
struct TY249198 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
struct TY249217 {
  TGenericSeq Sup;
  tblock249023 data[SEQ_DECL_SIZE];
};
struct tkeyvaluepairseq121808 {
  TGenericSeq Sup;
  tkeyvaluepair121806 data[SEQ_DECL_SIZE];
};
struct trstnodeseq297007 {
  TGenericSeq Sup;
  trstnode297009* data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP908)(void* p, NI op);
N_NIMCALL(void, TMP909)(void* p, NI op);
N_NIMCALL(void, TMP910)(void* p, NI op);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, ensureidx_360603)(TY360558** x_360609, NI y_360612);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NU8, incheckpoint_165094)(tlineinfo163527 current);
N_NIMCALL(tnode188803*, findclosestdot_360098)(tnode188803* n);
static N_INLINE(NI, safelen_189320)(tnode188803* n);
N_NIMCALL(tnode188803*, safesemexpr_360386)(tcontext250019* c, tnode188803* 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(E_Base*, getCurrentException)(void);
static N_INLINE(void, popCurrentException)(void);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_46827)(tcell41090* c);
static N_INLINE(NIM_BOOL, canbecycleroot_44462)(tcell41090* c);
static N_INLINE(void, rtladdcycleroot_45235)(tcell41090* c);
N_NOINLINE(void, incl_41855)(tcellset41102* s, tcell41090* cell);
static N_INLINE(void, decref_46402)(tcell41090* c);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, suggestfieldaccess_359821)(tcontext250019* c, tnode188803* n, NI* outputs);
N_NIMCALL(tsym188833*, inittabiter_197093)(ttabiter197090* ti, tstrtable188807 tab);
static N_INLINE(NIM_BOOL, filtersym_357209)(tsym188833* s);
N_NIMCALL(void, suggestwriteln_164242)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, symtostr_357202)(tsym188833* s, NIM_BOOL islocal, NimStringDesc* section);
N_NIMCALL(NimStringDesc*, symtostr_357011)(tsym188833* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo163527 li);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_75880, TNimType* typ);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, origmodulename_357006)(tsym188833* m);
N_NIMCALL(NimStringDesc*, typetostring_223020)(ttype188837* typ, NU8 prefer);
N_NIMCALL(NimStringDesc*, tofullpath_164788)(NI32 fileidx);
static N_INLINE(NI, tolinenumber_164812)(tlineinfo163527 info);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(NI, tocolumn_164818)(tlineinfo163527 info);
N_NIMCALL(NimStringDesc*, nsuEscape)(NimStringDesc* s, NimStringDesc* prefix, NimStringDesc* suffix);
N_NIMCALL(NimStringDesc*, extractdoccomment_341643)(tsym188833* s, tdocumentor341005* d);
N_NIMCALL(tsym188833*, nextiter_197099)(ttabiter197090* ti, tstrtable188807 tab);
N_NIMCALL(void, suggesteverything_359753)(tcontext250019* c, tnode188803* n, NI* outputs);
N_NIMCALL(void, suggestsymlist_357416)(tcontext250019* c, tnode188803* list, NI* outputs);
static N_INLINE(NI, sonslen_189181)(tnode188803* n);
N_NIMCALL(void, suggestfield_357256)(tcontext250019* c, tsym188833* s, NI* outputs);
static N_INLINE(NIM_BOOL, fieldvisible_357236)(tcontext250019* c, tsym188833* f);
N_NIMCALL(tsym188833*, getmodule_197183)(tsym188833* s);
N_NIMCALL(void, suggestoperations_359479)(tcontext250019* c, tnode188803* n, ttype188837* 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_74604, TNimType* mt);
N_NIMCALL(void, sort_357782)(tsym188833** a_357790, NI a_357790Len0, TY357801 cmp_357800, NU8 order_357803);
N_NIMCALL(NI, HEX3Aanonymous_359670)(tsym188833* a, tsym188833* b);
N_NIMCALL(NI, cmp_3490)(NimStringDesc* x, NimStringDesc* y);
static N_INLINE(NIM_BOOL, typefits_359437)(tcontext250019* c, tsym188833* s, ttype188837* firstarg);
static N_INLINE(NI, sonslen_189185)(ttype188837* n);
N_NIMCALL(NIM_BOOL, argtypematches_353662)(tcontext250019* c, ttype188837* f, ttype188837* a);
N_NIMCALL(void, initcandidate_345257)(tcontext250019* ctx, tcandidate345205* c, ttype188837* callee);
static N_INLINE(void, initcandidateaux_345249)(tcontext250019* ctx, tcandidate345205* c, ttype188837* callee);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, initidtable_189120)(tidtable188849* x);
N_NIMCALL(tnode188803*, paramtypesmatch_351560)(tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg, tnode188803* argorig);
N_NIMCALL(tnode188803*, paramtypesmatchaux_350867)(tcandidate345205* m, ttype188837* f, ttype188837* argtype_350872, tnode188803* argsemantized, tnode188803* argorig);
N_NIMCALL(ttype188837*, skiptypes_192793)(ttype188837* t, NU64 kinds);
N_NIMCALL(void, assigntype_189152)(ttype188837* dest, ttype188837* src);
N_NIMCALL(tnode188803*, newnodei_189099)(NU8 kind, tlineinfo163527 info);
N_NIMCALL(ttype188837*, maketypefromexpr_250668)(tcontext250019* c, tnode188803* n);
N_NIMCALL(ttype188837*, newtypes_250180)(NU8 kind, tcontext250019* c);
N_NIMCALL(NU8, typerel_346174)(tcandidate345205* c, ttype188837* f, ttype188837* aorig, NIM_BOOL dobind);
static N_INLINE(void, put_345266)(tidtable188849* t, ttype188837* key, ttype188837* val);
N_NIMCALL(void, idtableput_197147)(tidtable188849* t, tidobj167013* key, TNimObject* val);
N_NIMCALL(ttype188837*, maybeskipdistinct_347885)(ttype188837* t, tsym188833* callee);
N_NIMCALL(NIM_BOOL, shouldskipdistinct_347821)(tnode188803* rules, tident167019* callident);
static N_INLINE(NI, len_189264)(tnode188803* n);
N_NIMCALL(tident167019*, consideracc_252006)(tnode188803* n);
N_NIMCALL(ttype188837*, base_223029)(ttype188837* t);
static N_INLINE(ttype188837*, lastson_189193)(ttype188837* n);
static N_INLINE(NIM_BOOL, sameenumtypes_229167)(ttype188837* a, ttype188837* b);
N_NOINLINE(NU8, typerangerel_347621)(ttype188837* f, ttype188837* a);
N_NIMCALL(NI64, firstord_223002)(ttype188837* t);
N_NIMCALL(NI64, lastord_223006)(ttype188837* t);
N_NIMCALL(NIM_BOOL, isconvertibletorange_346389)(ttype188837* f, ttype188837* a);
N_NIMCALL(NU8, handlerange_346216)(ttype188837* f, ttype188837* a, NU8 min, NU8 max);
static N_INLINE(NIM_BOOL, isintlit_223316)(ttype188837* t);
static N_INLINE(tnode188803*, HEX5BHEX5D_189694)(tnode188803* n, NI i);
N_NIMCALL(NU8, handlefloatrange_346452)(ttype188837* f, ttype188837* a);
static N_INLINE(NIM_BOOL, isfloatlit_223357)(ttype188837* t);
N_NIMCALL(TNimObject*, idtableget_197137)(tidtable188849 t, tidobj167013* key);
N_NIMCALL(ttype188837*, newtypewithsons_250675)(tcontext250019* c, NU8 kind, ttypeseq188835* sons);
N_NIMCALL(ttype188837*, getsystype_242024)(NU8 kind);
N_NIMCALL(tnode188803*, newintnode_189069)(NU8 kind, NI64 intval);
N_NIMCALL(NI64, lengthord_223010)(ttype188837* t);
static N_INLINE(NU8, allowsnil_347094)(ttype188837* f);
N_NIMCALL(NIM_BOOL, isordinaltype_223071)(ttype188837* t);
N_NIMCALL(void, internalerror_165606)(NimStringDesc* errmsg);
N_NIMCALL(NU8, recordrel_346871)(tcandidate345205* c, ttype188837* f, ttype188837* a);
N_NIMCALL(NIM_BOOL, sametype_228116)(ttype188837* a, ttype188837* b, NU8 flags);
N_NIMCALL(NU8, minrel_346855)(NU8 a, NU8 b);
N_NIMCALL(void, internalerror_165591)(tlineinfo163527 info, NimStringDesc* errmsg);
N_NIMCALL(NIM_BOOL, sameobjecttypes_229091)(ttype188837* a, ttype188837* b);
N_NIMCALL(NI, isobjectsubtype_346507)(ttype188837* a, ttype188837* f);
static N_INLINE(NIM_BOOL, samedistincttypes_229160)(ttype188837* a, ttype188837* b);
N_NIMCALL(NI, len_192569)(ttype188837* n);
N_NIMCALL(NU8, proctyperel_347234)(tcandidate345205* c, ttype188837* f, ttype188837* a);
N_NIMCALL(NU8, procparamtyperel_347147)(tcandidate345205* c, ttype188837* f_347151, ttype188837* a);
N_NIMCALL(NIM_BOOL, ismetatype_189732)(ttype188837* t);
N_NIMCALL(ttype188837*, generatetypeinstance_275735)(tcontext250019* p, tidtable188849 pt, tlineinfo163527 info, ttype188837* t);
static N_INLINE(NIM_BOOL, inconsistentvartypes_347113)(ttype188837* f, ttype188837* a);
N_NIMCALL(NIM_BOOL, compatibleeffects_232867)(ttype188837* formal, ttype188837* actual);
N_NIMCALL(ttype188837*, skipgenericalias_229506)(ttype188837* t);
static N_INLINE(ttype188837*, skipintlit_242424)(ttype188837* t);
N_NIMCALL(ttype188837*, concretetype_346182)(tcandidate345205* c, ttype188837* t);
N_NIMCALL(ttype188837*, newtype_189060)(NU8 kind, tsym188833* owner);
N_NIMCALL(void, addsonskipintlit_242461)(ttype188837* father, ttype188837* son);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NU8, matchusertypeclass_347632)(tcontext250019* c, tcandidate345205* m, ttype188837* ff, ttype188837* a);
N_NIMCALL(tscope188827*, openscope_252167)(tcontext250019* c);
N_NIMCALL(tsym188833*, newsym_189053)(NU8 symkind, tident167019* name, tsym188833* owner, tlineinfo163527 info);
N_NIMCALL(ttype188837*, maketypedesc_250627)(tcontext250019* c, ttype188837* typ);
N_NIMCALL(void, adddecl_252550)(tcontext250019* c, tsym188833* sym);
N_NIMCALL(ttype188837*, makevartype_250175)(tcontext250019* c, ttype188837* basetype);
N_NIMCALL(NimStringDesc*, HEX24_165714)(TY79484 x_165718);
N_NIMCALL(tnode188803*, copytree_189237)(tnode188803* src);
N_NIMCALL(void, clearbufferedmsgs_164238)(void);
N_NIMCALL(void, closescope_252179)(tcontext250019* c);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_233264)(ttypeseq188835* x_233270, ttypeseq188835* y_233275);
N_NIMCALL(tnode188803*, replacetypesinbody_275725)(tcontext250019* p, tidtable188849 pt, tnode188803* n);
N_NIMCALL(NIM_BOOL, exprstructuralequivalent_221150)(tnode188803* a, tnode188803* b);
N_NIMCALL(void, localerror_165571)(tlineinfo163527 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NIM_BOOL, isinlineiterator_350834)(ttype188837* t);
N_NIMCALL(tnode188803*, implicitconv_350621)(NU8 kind, ttype188837* f, tnode188803* arg, tcandidate345205* m, tcontext250019* c);
N_NIMCALL(NIM_BOOL, containsgenerictype_232717)(ttype188837* t);
N_NIMCALL(ttype188837*, getinstantiatedtype_350578)(tcontext250019* c, tnode188803* arg, tcandidate345205* m, ttype188837* f);
N_NIMCALL(ttype188837*, errortype_251136)(tcontext250019* c);
N_NIMCALL(void, addson_189207)(tnode188803* father, tnode188803* son);
N_NIMCALL(tnode188803*, newsymnode_190723)(tsym188833* sym, tlineinfo163527 info);
N_NIMCALL(tnode188803*, userconvmatch_350648)(tcontext250019* c, tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg);
N_NIMCALL(void, markused_345244)(tnode188803* n, tsym188833* s);
N_NIMCALL(void, message_165584)(tlineinfo163527 info, NU16 msg, NimStringDesc* arg);
static N_INLINE(void, suggestsym_362857)(tnode188803* n, tsym188833* s);
N_NIMCALL(void, findusages_360481)(tnode188803* node, tsym188833* s);
N_NIMCALL(NIM_BOOL, istracked_360266)(tlineinfo163527 current, NI tokenlen);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_165246)(tlineinfo163527 a, tlineinfo163527 b);
N_NIMCALL(void, finddefinition_360519)(tnode188803* node, tsym188833* s);
N_NIMCALL(void, suggestquit_164626)(void);
N_NIMCALL(void, addtosourcemap_360663)(tsym188833* sym, tlineinfo163527 info);
N_NIMCALL(void, ensureseq_360683)(TY360552** x_360691);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360697)(TY360552* x_360703, TY360552* y_360708);
N_NIMCALL(void, ensureidx_360993)(TY360552** x_360999, NI y_361002);
N_NIMCALL(void, ensureseq_361035)(TY360556** x_361043);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360821)(TY360556* x_360827, TY360556* y_360832);
N_NIMCALL(void, checkuse_355729)(tnode188803* n, tsym188833* s);
N_NIMCALL(tnode188803*, newsymnode_189095)(tsym188833* sym);
N_NIMCALL(tnode188803*, newnodeit_189104)(NU8 kind, tlineinfo163527 info, ttype188837* typ);
N_NIMCALL(tnode188803*, localconvmatch_350749)(tcontext250019* c, tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg);
N_NIMCALL(void, add_189390)(tnode188803* father, tnode188803* son);
N_NIMCALL(void, copycandidate_345627)(tcandidate345205* a, tcandidate345205* b);
N_NIMCALL(void, copyidtable_189175)(tidtable188849* dest, tidtable188849 src);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NI, cmpcandidates_345815)(tcandidate345205* a, tcandidate345205* b);
N_NIMCALL(NI, complexdisambiguation_345715)(ttype188837* a, ttype188837* b);
N_NIMCALL(NI, sumgeneric_345635)(ttype188837* t_345637);
N_NIMCALL(void, suggestobject_357492)(tcontext250019* c, tnode188803* n, NI* outputs);
static N_INLINE(tnode188803*, lastson_189189)(tnode188803* n);
N_NIMCALL(tnode188803*, findclosestcall_360181)(tnode188803* n);
N_NIMCALL(tnode188803*, copynode_189233)(tnode188803* src);
N_NIMCALL(void, suggestcall_357694)(tcontext250019* c, tnode188803* n_357697, tnode188803* norig, NI* outputs);
N_NIMCALL(NI, HEX3Aanonymous_357770)(tsym188833* a, tsym188833* b);
N_NIMCALL(NIM_BOOL, namefits_357593)(tcontext250019* c, tsym188833* s, tnode188803* n);
N_NIMCALL(NIM_BOOL, argsfit_357673)(tcontext250019* c, tsym188833* candidate, tnode188803* n, tnode188803* norig);
N_NIMCALL(void, initcandidate_345274)(tcontext250019* ctx, tcandidate345205* c, tsym188833* callee, tnode188803* binding, NI calleescope);
N_NIMCALL(tsym188833*, originatingmodule_195024)(tsym188833* s);
N_NIMCALL(void, partialmatch_353555)(tcontext250019* c, tnode188803* n, tnode188803* norig, tcandidate345205* m);
N_NIMCALL(void, initintset_185918)(tintset185047* Result);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, matchesaux_352247)(tcontext250019* c, tnode188803* n, tnode188803* norig, tcandidate345205* m, tintset185047* marker);
N_NIMCALL(void, preparenamedparam_351921)(tnode188803* a);
N_NIMCALL(tnode188803*, newidentnode_189090)(tident167019* ident, tlineinfo163527 info);
N_NIMCALL(tsym188833*, getsymfromlist_197172)(tnode188803* list, tident167019* ident, NI start);
N_NIMCALL(NIM_BOOL, containsorincl_185888)(tintset185047* s, NI key);
N_NIMCALL(tnode188803*, prepareoperand_351852)(tcontext250019* c, ttype188837* formal, tnode188803* a);
N_NIMCALL(NIM_BOOL, matchnodekinds_277312)(tnode188803* p, tnode188803* n);
N_NIMCALL(ttype188837*, arrayconstr_351992)(tcontext250019* c, tnode188803* n);
N_NIMCALL(void, rawaddson_193092)(ttype188837* father, ttype188837* son);
N_NIMCALL(ttype188837*, makerangetype_251156)(tcontext250019* c, NI64 first, NI64 last, tlineinfo163527 info, ttype188837* inttype);
N_NIMCALL(void, setson_351800)(tnode188803* father, NI at, tnode188803* son);
N_NIMCALL(tnode188803*, prepareoperand_351902)(tcontext250019* c, tnode188803* a);
N_NIMCALL(void, incrindextype_352007)(ttype188837* t);
N_NIMCALL(ttype188837*, arrayconstr_352000)(tcontext250019* c, tlineinfo163527 info);
N_NIMCALL(NimStringDesc*, rendertree_211051)(tnode188803* n, NU8 renderflags);
N_NIMCALL(NimStringDesc*, argtypetostring_345907)(tnode188803* arg);
N_NIMCALL(void, suggestexpr_362986)(tcontext250019* c, tnode188803* node);
N_NIMCALL(void, deffromline_361101)(TY360556** entries, NI32 col);
N_NIMCALL(void, sort_361149)(tentry360549* a_361157, NI a_361157Len0, TY361168 cmp_361167, NU8 order_361170);
N_NIMCALL(NI, HEX3Aanonymous_361126)(tentry360549 a, tentry360549 b);
N_NIMCALL(NI, cmp_361132)(NI x_361136, NI y_361138);
STRING_LITERAL(TMP2491, "\"", 1);
STRING_LITERAL(TMP2492, "sug", 3);
STRING_LITERAL(TMP2522, "forward type in typeRel()", 25);
STRING_LITERAL(TMP2527, "recordRel", 9);
STRING_LITERAL(TMP2542, "wrong instantiated type!", 24);
STRING_LITERAL(TMP2543, "cannot resolve type: ", 21);
STRING_LITERAL(TMP2547, "compiler/sigmatch.nim", 21);
NIM_CONST TY79484 TMP2546 = {((NimStringDesc*) &TMP2547),
477}
;
NIM_CONST TY79484 TMP2549 = {((NimStringDesc*) &TMP2547),
925}
;
STRING_LITERAL(TMP2550, "", 0);
NIM_CONST TY79484 TMP2551 = {((NimStringDesc*) &TMP2547),
1014}
;
STRING_LITERAL(TMP2552, "getInstantiatedType", 19);
STRING_LITERAL(TMP2553, "implicitConv", 12);
STRING_LITERAL(TMP2556, "use", 3);
STRING_LITERAL(TMP2557, "def", 3);
STRING_LITERAL(TMP2564, "x.state is not csMatch", 22);
STRING_LITERAL(TMP2567, "matches", 7);
STRING_LITERAL(TMP2568, "con", 3);
STRING_LITERAL(TMP2693, ": ", 2);
STRING_LITERAL(TMP2694, " | ", 3);
STRING_LITERAL(TMP2695, ", ", 2);
tsym188833* usagesym_360479;
tlineinfo163527 lastlineinfo_360480;
TY360558* gsourcemaps_360579;
TNimType NTI360547; /* TSourceMap */
TNimType NTI360551; /* TLineMap */
TNimType NTI360549; /* TEntry */
extern TNimType NTI106; /* int */
extern TNimType NTI188801; /* PSym */
TNimType NTI360556; /* seq[TEntry] */
TNimType NTI360552; /* seq[TLineMap] */
TNimType NTI360558; /* seq[TSourceMap] */
extern tgcheap43016 gch_43044;
extern NU32 gglobaloptions_137111;
extern TSafePoint* exchandler_13039;
extern TNimType NTI163533; /* ERecoverableError */
extern E_Base* currexception_13041;
extern tnode188803* emptynode_189727;
extern TNimType NTI188441; /* TSymKind */
extern NI32 gdirtybufferidx_137127;
extern TY163619* fileinfos_163640;
extern NI32 gdirtyoriginalidx_137128;
extern TNimType NTI188805; /* TSymSeq */
extern TNimType NTI188835; /* TTypeSeq */
extern TY110805* bufferedmsgs_164232;
extern TNimType NTI110805; /* seq[string] */
extern TY164208* checkpoints_164868;
extern NIM_BOOL isserving_137126;
extern NU8 gcmd_137113;
TNimType NTI345205; /* TCandidate */
extern TNimType NTI250017; /* PContext */
TNimType NTI345203; /* TCandidateState */
extern TNimType NTI188799; /* PType */
extern TNimType NTI188795; /* PNode */
extern TNimType NTI188849; /* TIdTable */
extern TNimType NTI134; /* bool */
N_NIMCALL(void, TMP908)(void* p, NI op) {
	TY360556* a;
	NI LOC1;
	a = (TY360556*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Sym, op);
	}
}
N_NIMCALL(void, TMP909)(void* p, NI op) {
	TY360552* a;
	NI LOC1;
	a = (TY360552*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Entries, op);
	}
}
N_NIMCALL(void, TMP910)(void* p, NI op) {
	TY360558* a;
	NI LOC1;
	a = (TY360558*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Lines, op);
	}
}

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

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

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

N_NIMCALL(void, ensureidx_360603)(TY360558** x_360609, NI y_360612) {
	{
		if (!((*x_360609)->Sup.len <= y_360612)) goto LA3;
		(*x_360609) = (TY360558*) setLengthSeq(&((*x_360609))->Sup, sizeof(tsourcemap360547), (NI32)(y_360612 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, resetsourcemap_360598)(NI32 fileidx) {
	ensureidx_360603(&gsourcemaps_360579, ((NI) (fileidx)));
	if (gsourcemaps_360579->data[fileidx].Lines) nimGCunrefNoCycle(gsourcemaps_360579->data[fileidx].Lines);
	gsourcemaps_360579->data[fileidx].Lines = (TY360552*) newSeqRC1((&NTI360552), 0);
}

static N_INLINE(NI, safelen_189320)(tnode188803* 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(tnode188803*, findclosestdot_360098)(tnode188803* n) {
	tnode188803* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NU8 LOC5;
		LOC3 = 0;
		LOC3 = ((*n).Kind == ((NU8) 45));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = incheckpoint_165094((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		NI i_360141;
		NI HEX3Atmp_360173;
		NI LOC9;
		NI res_360175;
		i_360141 = 0;
		HEX3Atmp_360173 = 0;
		LOC9 = 0;
		LOC9 = safelen_189320(n);
		HEX3Atmp_360173 = LOC9 - 1;
		res_360175 = 0;
		while (1) {
			if (!(res_360175 <= HEX3Atmp_360173)) goto LA10;
			i_360141 = res_360175;
			result = findclosestdot_360098((*n).kindU.S6.Sons->data[i_360141]);
			{
				if (!!((result == NIM_NIL))) goto LA13;
				goto BeforeRet;
			}
			LA13: ;
			res_360175 += 1;
		} LA10: ;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

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

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

static N_INLINE(E_Base*, getCurrentException)(void) {
	E_Base* result;
	result = 0;
	result = currexception_13041;
	return result;
}

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

static N_INLINE(void, rtladdcycleroot_45235)(tcell41090* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_41855(&gch_43044.Cycleroots, c);
	}
	LA3: ;
}

static N_INLINE(void, incref_46827)(tcell41090* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_44462(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_45235(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_46402)(tcell41090* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_44462(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_45235(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell41090* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_44443(src);
		incref_46827(LOC5);
	}
	LA3: ;
	{
		tcell41090* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_44443((*dest));
		decref_46402(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

N_NIMCALL(tnode188803*, safesemexpr_360386)(tcontext250019* c, tnode188803* n) {
	tnode188803* result;
	TSafePoint TMP1859;
	result = 0;
	pushSafePoint(&TMP1859);
	TMP1859.status = setjmp(TMP1859.context);
	if (TMP1859.status == 0) {
		result = (*c).Semexpr(c, n, 0);
		popSafePoint();
	}
	else {
		popSafePoint();
		if (isObj(getCurrentException()->Sup.m_type, (&NTI163533))) {
			TMP1859.status = 0;
			result = emptynode_189727;
			popCurrentException();
		}
	}
	if (TMP1859.status != 0) reraiseException();
	return result;
}

static N_INLINE(NIM_BOOL, filtersym_357209)(tsym188833* 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_357006)(tsym188833* m) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((*m).Position == ((NI) (gdirtybufferidx_137127)))) goto LA3;
		result = copyString(fileinfos_163640->data[gdirtyoriginalidx_137128].Shortname);
	}
	goto LA1;
	LA3: ;
	{
		result = copyString((*(*m).Name).S);
	}
	LA1: ;
	return result;
}

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

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

N_NIMCALL(NimStringDesc*, symtostr_357011)(tsym188833* s, NIM_BOOL islocal, NimStringDesc* section, tlineinfo163527 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, (&NTI188441))->Sup.len + 0);
appendString(result, reprEnum((*s).Kind, (&NTI188441)));
	result = addChar(result, 9);
	{
		NIM_BOOL LOC3;
		tsym188833* 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;
			tsym188833* 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_357006(ow2);
			result = resizeString(result, LOC13->Sup.len + 0);
appendString(result, LOC13);
			result = addChar(result, 46);
		}
		LA11: ;
		LOC14 = 0;
		LOC14 = origmodulename_357006(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_223020((*s).Typ, ((NU8) 0));
		result = resizeString(result, LOC19->Sup.len + 0);
appendString(result, LOC19);
	}
	LA17: ;
	result = addChar(result, 9);
	LOC20 = 0;
	LOC20 = tofullpath_164788(li.Fileindex);
	result = resizeString(result, LOC20->Sup.len + 0);
appendString(result, LOC20);
	result = addChar(result, 9);
	LOC21 = 0;
	LOC21 = tolinenumber_164812(li);
	LOC22 = 0;
	LOC22 = nimIntToStr(LOC21);
	result = resizeString(result, LOC22->Sup.len + 0);
appendString(result, LOC22);
	result = addChar(result, 9);
	LOC23 = 0;
	LOC23 = tocolumn_164818(li);
	LOC24 = 0;
	LOC24 = nimIntToStr(LOC23);
	result = resizeString(result, LOC24->Sup.len + 0);
appendString(result, LOC24);
	result = addChar(result, 9);
	LOC25 = 0;
	LOC25 = extractdoccomment_341643(s, NIM_NIL);
	LOC26 = 0;
	LOC26 = nsuEscape(LOC25, ((NimStringDesc*) &TMP2491), ((NimStringDesc*) &TMP2491));
	result = resizeString(result, LOC26->Sup.len + 0);
appendString(result, LOC26);
	return result;
}

N_NIMCALL(NimStringDesc*, symtostr_357202)(tsym188833* s, NIM_BOOL islocal, NimStringDesc* section) {
	NimStringDesc* result;
	result = 0;
	result = symtostr_357011(s, islocal, section, (*s).Info);
	return result;
}

N_NIMCALL(void, suggesteverything_359753)(tcontext250019* c, tnode188803* n, NI* outputs) {
	NIM_BOOL islocal;
	tscope188827* scope_359760;
	tscope188827* HEX3Atmp_359815;
	tscope188827* current_359817;
	islocal = NIM_TRUE;
	scope_359760 = 0;
	HEX3Atmp_359815 = 0;
	HEX3Atmp_359815 = (*c).Currentscope;
	current_359817 = HEX3Atmp_359815;
	while (1) {
		tsym188833* it_359777;
		tstrtable188807 HEX3Atmp_359810;
		ttabiter197090 it_359812;
		tsym188833* s_359814;
		if (!!((current_359817 == NIM_NIL))) goto LA1;
		scope_359760 = current_359817;
		{
			if (!(scope_359760 == (*c).Toplevelscope)) goto LA4;
			islocal = NIM_FALSE;
		}
		LA4: ;
		it_359777 = 0;
		memset((void*)&HEX3Atmp_359810, 0, sizeof(HEX3Atmp_359810));
		HEX3Atmp_359810.Counter = (*scope_359760).Symbols.Counter;
		HEX3Atmp_359810.Data = (*scope_359760).Symbols.Data;
		memset((void*)&it_359812, 0, sizeof(it_359812));
		s_359814 = inittabiter_197093(&it_359812, HEX3Atmp_359810);
		while (1) {
			if (!!((s_359814 == NIM_NIL))) goto LA6;
			it_359777 = s_359814;
			{
				NIM_BOOL LOC9;
				NimStringDesc* LOC12;
				LOC9 = 0;
				LOC9 = filtersym_357209(it_359777);
				if (!LOC9) goto LA10;
				LOC12 = 0;
				LOC12 = symtostr_357202(it_359777, islocal, ((NimStringDesc*) &TMP2492));
				suggestwriteln_164242(LOC12);
				(*outputs) += 1;
			}
			LA10: ;
			s_359814 = nextiter_197099(&it_359812, HEX3Atmp_359810);
		} LA6: ;
		{
			if (!(scope_359760 == (*c).Toplevelscope)) goto LA15;
			goto LA1;
		}
		LA15: ;
		current_359817 = (*current_359817).Parent;
	} LA1: ;
}

static N_INLINE(NI, sonslen_189181)(tnode188803* 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_357236)(tcontext250019* c, tsym188833* f) {
	NIM_BOOL result;
	NI fmoduleid;
	tsym188833* LOC1;
	NIM_BOOL LOC2;
	NIM_BOOL LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = getmodule_197183(f);
	fmoduleid = (*LOC1).Sup.Id;
	LOC2 = 0;
	LOC3 = 0;
	LOC3 = (((*f).Flags &(1<<((((NU8) 1))&31)))!=0);
	if (LOC3) goto LA4;
	LOC3 = (fmoduleid == (*(*c).Module).Sup.Id);
	LA4: ;
	LOC2 = LOC3;
	if (LOC2) goto LA5;
	LOC2 = (fmoduleid == (*(*c).Friendmodule).Sup.Id);
	LA5: ;
	result = LOC2;
	return result;
}

N_NIMCALL(void, suggestfield_357256)(tcontext250019* c, tsym188833* s, NI* outputs) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = filtersym_357209(s);
		if (!(LOC3)) goto LA4;
		LOC3 = fieldvisible_357236(c, s);
		LA4: ;
		if (!LOC3) goto LA5;
		LOC7 = 0;
		LOC7 = symtostr_357202(s, NIM_TRUE, ((NimStringDesc*) &TMP2492));
		suggestwriteln_164242(LOC7);
		(*outputs) += 1;
	}
	LA5: ;
}

N_NIMCALL(void, suggestsymlist_357416)(tcontext250019* c, tnode188803* list, NI* outputs) {
	NI i_357434;
	NI HEX3Atmp_357486;
	NI LOC1;
	NI res_357488;
	i_357434 = 0;
	HEX3Atmp_357486 = 0;
	LOC1 = 0;
	LOC1 = sonslen_189181(list);
	HEX3Atmp_357486 = (NI32)(LOC1 - 1);
	res_357488 = 0;
	while (1) {
		if (!(res_357488 <= HEX3Atmp_357486)) goto LA2;
		i_357434 = res_357488;
		{
			if (!((*(*list).kindU.S6.Sons->data[i_357434]).Kind == ((NU8) 3))) goto LA5;
			suggestfield_357256(c, (*(*list).kindU.S6.Sons->data[i_357434]).kindU.S4.Sym, outputs);
		}
		LA5: ;
		res_357488 += 1;
	} LA2: ;
}

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

N_NIMCALL(NI, HEX3Aanonymous_359670)(tsym188833* a, tsym188833* b) {
	NI result;
	result = 0;
	result = cmp_3490((*(*a).Name).S, (*(*b).Name).S);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, sonslen_189185)(ttype188837* 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_345249)(tcontext250019* ctx, tcandidate345205* c, ttype188837* 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_345257)(tcontext250019* ctx, tcandidate345205* c, ttype188837* callee) {
	initcandidateaux_345249(ctx, c, callee);
	unsureAsgnRef((void**) &(*c).Calleesym, NIM_NIL);
	initidtable_189120(&(*c).Bindings);
}

static N_INLINE(void, put_345266)(tidtable188849* t, ttype188837* key, ttype188837* val) {
	idtableput_197147(t, &key->Sup, &val->Sup.Sup);
}

static N_INLINE(NI, len_189264)(tnode188803* 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_347821)(tnode188803* rules, tident167019* callident) {
	NIM_BOOL result;
	result = 0;
	{
		tnode188803* r_347835;
		NI i_347870;
		NI HEX3Atmp_347872;
		NI LOC5;
		NI res_347874;
		if (!((*rules).Kind == ((NU8) 129))) goto LA3;
		r_347835 = 0;
		i_347870 = 0;
		HEX3Atmp_347872 = 0;
		LOC5 = 0;
		LOC5 = len_189264(rules);
		HEX3Atmp_347872 = LOC5 - 1;
		res_347874 = 0;
		while (1) {
			if (!(res_347874 <= HEX3Atmp_347872)) goto LA6;
			i_347870 = res_347874;
			r_347835 = (*rules).kindU.S6.Sons->data[i_347870];
			{
				tident167019* LOC9;
				LOC9 = 0;
				LOC9 = consideracc_252006(r_347835);
				if (!(LOC9 == callident)) goto LA10;
				result = NIM_TRUE;
				goto BeforeRet;
			}
			LA10: ;
			res_347874 += 1;
		} LA6: ;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	goto LA1;
	LA3: ;
	{
		tnode188803* r_347852;
		NI i_347876;
		NI HEX3Atmp_347878;
		NI LOC13;
		NI res_347880;
		r_347852 = 0;
		i_347876 = 0;
		HEX3Atmp_347878 = 0;
		LOC13 = 0;
		LOC13 = len_189264(rules);
		HEX3Atmp_347878 = LOC13 - 1;
		res_347880 = 0;
		while (1) {
			if (!(res_347880 <= HEX3Atmp_347878)) goto LA14;
			i_347876 = res_347880;
			r_347852 = (*rules).kindU.S6.Sons->data[i_347876];
			{
				tident167019* LOC17;
				LOC17 = 0;
				LOC17 = consideracc_252006(r_347852);
				if (!(LOC17 == callident)) goto LA18;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA18: ;
			res_347880 += 1;
		} LA14: ;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(ttype188837*, maybeskipdistinct_347885)(ttype188837* t, tsym188833* callee) {
	ttype188837* 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_347821((*t).N, (*callee).Name);
		LA8: ;
		if (!LOC3) goto LA9;
		result = base_223029(t);
	}
	goto LA1;
	LA9: ;
	{
		result = t;
	}
	LA1: ;
	return result;
}

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

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

N_NOINLINE(NU8, typerangerel_347621)(ttype188837* f, ttype188837* a) {
	NU8 result;
	NI64 a0;
	NI64 a1;
	NI64 f0;
	NI64 f1;
	result = 0;
	a0 = firstord_223002(a);
	a1 = lastord_223006(a);
	f0 = firstord_223002(f);
	f1 = lastord_223006(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_346389)(ttype188837* f, ttype188837* 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_223316)(ttype188837* 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(tnode188803*, HEX5BHEX5D_189694)(tnode188803* n, NI i) {
	tnode188803* result;
	result = 0;
	result = (*n).kindU.S6.Sons->data[i];
	return result;
}

N_NIMCALL(NU8, handlerange_346216)(ttype188837* f, ttype188837* a, NU8 min, NU8 max) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype188837* ab;
		NU8 k;
		ab = skiptypes_192793(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_223316(ab);
			LA16: ;
			LOC12 = LOC13;
			if (!(LOC12)) goto LA17;
			LOC18 = 0;
			LOC18 = firstord_223002(f);
			LOC12 = (LOC18 <= (*(*ab).N).kindU.S1.Intval);
			LA17: ;
			LOC11 = LOC12;
			if (!(LOC11)) goto LA19;
			LOC20 = 0;
			LOC20 = lastord_223006(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;
			tnode188803* LOC40;
			tnode188803* 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_223002(f);
			LOC40 = 0;
			LOC40 = HEX5BHEX5D_189694((*a).N, 0);
			LOC35 = (LOC39 <= (*LOC40).kindU.S1.Intval);
			LA38: ;
			LOC34 = LOC35;
			if (!(LOC34)) goto LA41;
			LOC42 = 0;
			LOC42 = HEX5BHEX5D_189694((*a).N, 1);
			LOC43 = 0;
			LOC43 = lastord_223006(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_223357)(ttype188837* 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_346452)(ttype188837* f, ttype188837* a) {
	NU8 result;
	result = 0;
	{
		if (!((*a).Kind == (*f).Kind)) goto LA3;
		result = ((NU8) 9);
	}
	goto LA1;
	LA3: ;
	{
		ttype188837* ab;
		NU8 k;
		ab = skiptypes_192793(a, 1048576);
		k = (*ab).Kind;
		{
			if (!(k == (*f).Kind)) goto LA8;
			result = ((NU8) 4);
		}
		goto LA6;
		LA8: ;
		{
			NIM_BOOL LOC11;
			LOC11 = 0;
			LOC11 = isfloatlit_223357(ab);
			if (!LOC11) goto LA12;
			result = ((NU8) 8);
		}
		goto LA6;
		LA12: ;
		{
			NIM_BOOL LOC15;
			LOC15 = 0;
			LOC15 = isintlit_223316(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_347094)(ttype188837* 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_346855)(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_346871)(tcandidate345205* c, ttype188837* f, ttype188837* a) {
	NU8 result;
	result = 0;
	result = ((NU8) 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = sametype_228116(f, a, 0);
		if (!LOC3) goto LA4;
		result = ((NU8) 9);
	}
	goto LA1;
	LA4: ;
	{
		NI LOC7;
		NI LOC8;
		NI firstfield;
		NI i_346900;
		NI HEX3Atmp_347082;
		NI LOC16;
		NI res_347084;
		LOC7 = 0;
		LOC7 = sonslen_189185(a);
		LOC8 = 0;
		LOC8 = sonslen_189185(f);
		if (!(LOC7 == LOC8)) goto LA9;
		result = ((NU8) 9);
		{
			if (!((*f).Kind == ((NU8) 18))) goto LA13;
			firstfield = 0;
		}
		goto LA11;
		LA13: ;
		{
			firstfield = 1;
		}
		LA11: ;
		i_346900 = 0;
		HEX3Atmp_347082 = 0;
		LOC16 = 0;
		LOC16 = sonslen_189185(f);
		HEX3Atmp_347082 = (NI32)(LOC16 - 1);
		res_347084 = firstfield;
		while (1) {
			NU8 m;
			if (!(res_347084 <= HEX3Atmp_347082)) goto LA17;
			i_346900 = res_347084;
			m = typerel_346174(c, (*f).Sons->data[i_346900], (*a).Sons->data[i_346900], NIM_TRUE);
			{
				if (!(m < ((NU8) 3))) goto LA20;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA20: ;
			result = minrel_346855(result, m);
			res_347084 += 1;
		} LA17: ;
		{
			NIM_BOOL LOC24;
			NI i_346958;
			NI HEX3Atmp_347086;
			NI LOC28;
			NI res_347088;
			LOC24 = 0;
			LOC24 = !(((*f).N == NIM_NIL));
			if (!(LOC24)) goto LA25;
			LOC24 = !(((*a).N == NIM_NIL));
			LA25: ;
			if (!LOC24) goto LA26;
			i_346958 = 0;
			HEX3Atmp_347086 = 0;
			LOC28 = 0;
			LOC28 = sonslen_189181((*f).N);
			HEX3Atmp_347086 = (NI32)(LOC28 - 1);
			res_347088 = 0;
			while (1) {
				if (!(res_347088 <= HEX3Atmp_347086)) goto LA29;
				i_346958 = res_347088;
				{
					if (!!(((*(*(*f).N).kindU.S6.Sons->data[i_346958]).Kind == ((NU8) 3)))) goto LA32;
					internalerror_165591((*(*f).N).Info, ((NimStringDesc*) &TMP2527));
				}
				goto LA30;
				LA32: ;
				{
					if (!!(((*(*(*a).N).kindU.S6.Sons->data[i_346958]).Kind == ((NU8) 3)))) goto LA35;
					internalerror_165591((*(*a).N).Info, ((NimStringDesc*) &TMP2527));
				}
				goto LA30;
				LA35: ;
				{
					tsym188833* x;
					tsym188833* y;
					x = (*(*(*f).N).kindU.S6.Sons->data[i_346958]).kindU.S4.Sym;
					y = (*(*(*a).N).kindU.S6.Sons->data[i_346958]).kindU.S4.Sym;
					{
						NIM_BOOL LOC40;
						NU8 LOC42;
						LOC40 = 0;
						LOC40 = ((*f).Kind == ((NU8) 17));
						if (!(LOC40)) goto LA41;
						LOC42 = 0;
						LOC42 = typerel_346174(c, (*x).Typ, (*y).Typ, NIM_TRUE);
						LOC40 = (LOC42 < ((NU8) 3));
						LA41: ;
						if (!LOC40) goto LA43;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA43: ;
					{
						if (!!(((*(*x).Name).Sup.Id == (*(*y).Name).Sup.Id))) goto LA47;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA47: ;
				}
				LA30: ;
				res_347088 += 1;
			} LA29: ;
		}
		LA26: ;
	}
	goto LA1;
	LA9: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, isobjectsubtype_346507)(ttype188837* a, ttype188837* f) {
	NI result;
	ttype188837* t;
	NI depth;
	result = 0;
	t = a;
	depth = 0;
	while (1) {
		NIM_BOOL LOC2;
		NIM_BOOL LOC4;
		LOC2 = 0;
		LOC2 = !((t == NIM_NIL));
		if (!(LOC2)) goto LA3;
		LOC4 = 0;
		LOC4 = sameobjecttypes_229091(f, t);
		LOC2 = !(LOC4);
		LA3: ;
		if (!LOC2) goto LA1;
		t = (*t).Sons->data[0];
		{
			if (!(t == NIM_NIL)) goto LA7;
			goto LA1;
		}
		LA7: ;
		t = skiptypes_192793(t, 2048);
		depth += 1;
	} LA1: ;
	{
		if (!!((t == NIM_NIL))) goto LA11;
		result = depth;
	}
	LA11: ;
	return result;
}

static N_INLINE(NIM_BOOL, samedistincttypes_229160)(ttype188837* a, ttype188837* b) {
	NIM_BOOL result;
	result = 0;
	result = sameobjecttypes_229091(a, b);
	return result;
}

static N_INLINE(NIM_BOOL, inconsistentvartypes_347113)(ttype188837* f, ttype188837* 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_347147)(tcandidate345205* c, ttype188837* f_347151, ttype188837* a) {
	NU8 result;
	ttype188837* f;
	result = 0;
	f = f_347151;
	{
		NIM_BOOL LOC3;
		NU8 reverserel;
		LOC3 = 0;
		LOC3 = ismetatype_189732(a);
		if (!LOC3) goto LA4;
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = ismetatype_189732(f);
			if (!LOC8) goto LA9;
			f = generatetypeinstance_275735((*c).C, (*c).Bindings, (*(*c).Call).Info, f);
			{
				NIM_BOOL LOC13;
				LOC13 = 0;
				LOC13 = (f == NIM_NIL);
				if (LOC13) goto LA14;
				LOC13 = ismetatype_189732(f);
				LA14: ;
				if (!LOC13) goto LA15;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA15: ;
		}
		LA9: ;
		reverserel = typerel_346174(c, a, f, NIM_TRUE);
		{
			if (!(reverserel == ((NU8) 7))) goto LA19;
			result = ((NU8) 5);
			(*c).Genericmatches += 1;
		}
		LA19: ;
	}
	goto LA1;
	LA4: ;
	{
		result = typerel_346174(c, f, a, NIM_TRUE);
	}
	LA1: ;
	{
		NIM_BOOL LOC24;
		LOC24 = 0;
		LOC24 = (result <= ((NU8) 3));
		if (LOC24) goto LA25;
		LOC24 = inconsistentvartypes_347113(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_347234)(tcandidate345205* c, ttype188837* f, ttype188837* a) {
	NU8 result;
	result = 0;
	switch ((*a).Kind) {
	case ((NU8) 25):
	{
		NI i_347269;
		NI HEX3Atmp_347614;
		NI LOC8;
		NI res_347616;
		{
			NI LOC4;
			NI LOC5;
			LOC4 = 0;
			LOC4 = sonslen_189185(f);
			LOC5 = 0;
			LOC5 = sonslen_189185(a);
			if (!!((LOC4 == LOC5))) goto LA6;
			goto BeforeRet;
		}
		LA6: ;
		result = ((NU8) 9);
		i_347269 = 0;
		HEX3Atmp_347614 = 0;
		LOC8 = 0;
		LOC8 = sonslen_189185(f);
		HEX3Atmp_347614 = LOC8 - 1;
		res_347616 = 1;
		while (1) {
			NU8 LOC10;
			if (!(res_347616 <= HEX3Atmp_347614)) goto LA9;
			i_347269 = res_347616;
			LOC10 = 0;
			LOC10 = procparamtyperel_347147(c, (*f).Sons->data[i_347269], (*a).Sons->data[i_347269]);
			result = minrel_346855(result, LOC10);
			{
				if (!(result == ((NU8) 0))) goto LA13;
				goto BeforeRet;
			}
			LA13: ;
			res_347616 += 1;
		} LA9: ;
		{
			if (!!(((*f).Sons->data[0] == NIM_NIL))) goto LA17;
			{
				NU8 LOC23;
				if (!!(((*a).Sons->data[0] == NIM_NIL))) goto LA21;
				LOC23 = 0;
				LOC23 = procparamtyperel_347147(c, (*f).Sons->data[0], (*a).Sons->data[0]);
				result = minrel_346855(result, LOC23);
				{
					if (!(result == ((NU8) 0))) goto LA26;
					goto BeforeRet;
				}
				LA26: ;
			}
			goto LA19;
			LA21: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA19: ;
		}
		goto LA15;
		LA17: ;
		{
			if (!!(((*a).Sons->data[0] == NIM_NIL))) goto LA30;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA15;
		LA30: ;
		LA15: ;
		{
			NIM_BOOL LOC34;
			LOC34 = 0;
			LOC34 = (((*f).Flags &(1<<((((NU8) 1))&31)))!=0);
			if (!(LOC34)) goto LA35;
			LOC34 = !((((*a).Flags &(1<<((((NU8) 1))&31)))!=0));
			LA35: ;
			if (!LOC34) goto LA36;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA32;
		LA36: ;
		{
			NIM_BOOL LOC39;
			LOC39 = 0;
			LOC39 = (((*f).Flags &(1<<((((NU8) 7))&31)))!=0);
			if (!(LOC39)) goto LA40;
			LOC39 = (((*a).Flags & 130) == 0);
			LA40: ;
			if (!LOC39) goto LA41;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA32;
		LA41: ;
		{
			if (!!((((*f).Flags & 16384) == ((*a).Flags & 16384)))) goto LA44;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA32;
		LA44: ;
		{
			if (!!(((*f).Callconv == (*a).Callconv))) goto LA47;
			{
				NIM_BOOL LOC51;
				LOC51 = 0;
				LOC51 = ((*f).Callconv == ((NU8) 8));
				if (!(LOC51)) goto LA52;
				LOC51 = ((*a).Callconv == ((NU8) 0));
				LA52: ;
				if (!LOC51) goto LA53;
				{
					if (!!((result == ((NU8) 5)))) goto LA57;
					result = ((NU8) 1);
				}
				goto LA55;
				LA57: ;
				{
					result = ((NU8) 6);
				}
				LA55: ;
			}
			goto LA49;
			LA53: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA49: ;
		}
		goto LA32;
		LA47: ;
		LA32: ;
		{
			NIM_BOOL LOC63;
			LOC63 = 0;
			LOC63 = compatibleeffects_232867(f, a);
			if (!!(LOC63)) goto LA64;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		LA64: ;
	}
	break;
	case ((NU8) 5):
	{
		result = allowsnil_347094(f);
	}
	break;
	case ((NU8) 49):
	{
		{
			ttype188837* LOC72;
			ttype188837* LOC73;
			if (!(((*f).Flags &(1<<((((NU8) 14))&31)))!=0)) goto LA70;
			LOC72 = 0;
			LOC72 = base_223029(f);
			LOC73 = 0;
			LOC73 = base_223029(a);
			result = typerel_346174(c, LOC72, LOC73, NIM_TRUE);
		}
		LA70: ;
	}
	break;
	default:
	{
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(ttype188837*, concretetype_346182)(tcandidate345205* c, ttype188837* t) {
	ttype188837* result;
	result = 0;
	switch ((*t).Kind) {
	case ((NU8) 4):
	{
		result = newtype_189060(((NU8) 16), (*t).Owner);
		addsonskipintlit_242461(result, (*t).Sons->data[0]);
		addsonskipintlit_242461(result, (*t).Sons->data[1]);
	}
	break;
	case ((NU8) 5):
	{
		result = NIM_NIL;
	}
	break;
	case ((NU8) 12):
	case ((NU8) 58):
	{
		result = t;
		while (1) {
			TNimObject* LOC5;
			LOC5 = 0;
			LOC5 = idtableget_197137((*c).Bindings, &t->Sup);
			result = ((ttype188837*) (LOC5));
			{
				if (!(result == NIM_NIL)) goto LA8;
				goto LA4;
			}
			LA8: ;
			{
				if (!!(((*result).Kind == ((NU8) 12)))) goto LA12;
				goto LA4;
			}
			LA12: ;
		} LA4: ;
	}
	break;
	case ((NU8) 9):
	{
		NimStringDesc* LOC15;
		NimStringDesc* LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = typetostring_223020(t, ((NU8) 0));
		LOC15 = rawNewString(LOC16->Sup.len + 21);
appendString(LOC15, ((NimStringDesc*) &TMP2543));
appendString(LOC15, LOC16);
		internalerror_165606(LOC15);
		result = t;
	}
	break;
	default:
	{
		result = t;
	}
	break;
	}
	return result;
}

N_NIMCALL(NU8, matchusertypeclass_347632)(tcontext250019* c, tcandidate345205* m, ttype188837* ff, ttype188837* a) {
	NU8 result;
	ttype188837* body;
	tscope188827* LOC1;
	TSafePoint TMP2544;
	result = 0;
	body = skiptypes_192793(ff, IL64(9007199254740992));
	LOC1 = 0;
	LOC1 = openscope_252167(c);
	(*c).Intypeclass += 1;
	pushSafePoint(&TMP2544);
	TMP2544.status = setjmp(TMP2544.context);
	if (TMP2544.status == 0) {
		tnode188803* volatile param_347692;
		tnode188803* volatile HEX3Atmp_347803;
		NI volatile i_347805;
		NI volatile HEX3Atmp_347807;
		NI LOC10;
		NI volatile res_347809;
		tnode188803* volatile checkedbody;
		tnode188803* LOC27;
		tnode188803* LOC28;
		{
			NI volatile i_347688;
			NI volatile HEX3Atmp_347797;
			NI LOC7;
			NI volatile res_347799;
			if (!((*ff).Kind == ((NU8) 53))) goto LA5;
			i_347688 = 0;
			HEX3Atmp_347797 = 0;
			LOC7 = 0;
			LOC7 = len_192569(ff);
			HEX3Atmp_347797 = (NI32)(LOC7 - 1) - 1;
			res_347799 = 1;
			while (1) {
				tident167019* volatile typeparamname;
				ttype188837* LOC9;
				ttype188837* volatile typ;
				tsym188833* volatile param;
				if (!(res_347799 <= HEX3Atmp_347797)) goto LA8;
				i_347688 = res_347799;
				LOC9 = 0;
				LOC9 = base_223029(ff);
				typeparamname = (*(*(*LOC9).Sons->data[(NI32)(i_347688 - 1)]).Sym).Name;
				typ = (*ff).Sons->data[i_347688];
				param = newsym_189053(((NU8) 7), typeparamname, (*body).Sym, (*(*body).Sym).Info);
				asgnRefNoCycle((void**) &(*param).Typ, maketypedesc_250627(c, typ));
				adddecl_252550(c, param);
				res_347799 += 1;
			} LA8: ;
		}
		LA5: ;
		param_347692 = 0;
		HEX3Atmp_347803 = 0;
		HEX3Atmp_347803 = HEX5BHEX5D_189694((*body).N, 0);
		i_347805 = 0;
		HEX3Atmp_347807 = 0;
		LOC10 = 0;
		LOC10 = len_189264(HEX3Atmp_347803);
		HEX3Atmp_347807 = LOC10 - 1;
		res_347809 = 0;
		while (1) {
			tnode188803* volatile dummyname;
			ttype188837* volatile dummytype;
			tsym188833* volatile dummyparam;
			if (!(res_347809 <= HEX3Atmp_347807)) goto LA11;
			i_347805 = res_347809;
			param_347692 = (*HEX3Atmp_347803).kindU.S6.Sons->data[i_347805];
			dummyname = 0;
			dummytype = 0;
			{
				if (!((*param_347692).Kind == ((NU8) 141))) goto LA14;
				dummyname = HEX5BHEX5D_189694(param_347692, 0);
				{
					if (!!(((*a).Kind == ((NU8) 23)))) goto LA18;
					dummytype = makevartype_250175(c, a);
				}
				goto LA16;
				LA18: ;
				{
					dummytype = a;
				}
				LA16: ;
			}
			goto LA12;
			LA14: ;
			{
				dummyname = param_347692;
				dummytype = a;
			}
			LA12: ;
			{
				NimStringDesc* LOC26;
				if (!!(((*dummyname).Kind == ((NU8) 2)))) goto LA24;
				LOC26 = 0;
				LOC26 = HEX24_165714(TMP2546);
				internalerror_165606(LOC26);
			}
			LA24: ;
			dummyparam = newsym_189053(((NU8) 7), (*dummyname).kindU.S5.Ident, (*body).Sym, (*(*body).Sym).Info);
			asgnRefNoCycle((void**) &(*dummyparam).Typ, dummytype);
			adddecl_252550(c, dummyparam);
			res_347809 += 1;
		} LA11: ;
		LOC27 = 0;
		LOC27 = HEX5BHEX5D_189694((*body).N, 3);
		LOC28 = 0;
		LOC28 = copytree_189237(LOC27);
		checkedbody = (*c).Semtryexpr(c, LOC28, 0, NIM_FALSE);
		genericSeqAssign(&(*m).Errors, bufferedmsgs_164232, (&NTI110805));
		clearbufferedmsgs_164238();
		{
			if (!(checkedbody == NIM_NIL)) goto LA31;
			result = ((NU8) 0);
			popSafePoint();
			(*c).Intypeclass -= 1;
			closescope_252179(c);
			goto BeforeRet;
		}
		LA31: ;
		{
			tnode188803* volatile stmt_347780;
			NI volatile i_347811;
			NI volatile HEX3Atmp_347813;
			NI LOC37;
			NI volatile res_347815;
			if (!((*checkedbody).Kind == ((NU8) 114))) goto LA35;
			stmt_347780 = 0;
			i_347811 = 0;
			HEX3Atmp_347813 = 0;
			LOC37 = 0;
			LOC37 = len_189264(checkedbody);
			HEX3Atmp_347813 = LOC37 - 1;
			res_347815 = 0;
			while (1) {
				if (!(res_347815 <= HEX3Atmp_347813)) goto LA38;
				i_347811 = res_347815;
				stmt_347780 = (*checkedbody).kindU.S6.Sons->data[i_347811];
				switch ((*stmt_347780).Kind) {
				case ((NU8) 108):
				{
				}
				break;
				case ((NU8) 98):
				{
				}
				break;
				case ((NU8) 102):
				{
				}
				break;
				default:
				{
				}
				break;
				}
				res_347815 += 1;
			} LA38: ;
		}
		LA35: ;
		result = ((NU8) 7);
		popSafePoint();
		(*c).Intypeclass -= 1;
		closescope_252179(c);
		goto BeforeRet;
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		(*c).Intypeclass -= 1;
		closescope_252179(c);
	}
	if (TMP2544.status != 0) reraiseException();
	BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, typerel_346174)(tcandidate345205* c, ttype188837* f, ttype188837* aorig, NIM_BOOL dobind) {
	NU8 result;
	ttype188837* a;
	ttype188837* LOC5;
	result = 0;
	result = ((NU8) 0);
	{
		if (!((*f).Kind == ((NU8) 6))) goto LA3;
		put_345266(&(*c).Bindings, f, aorig);
		result = ((NU8) 7);
		goto BeforeRet;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = skiptypes_192793(aorig, IL64(576460752311812096));
	a = maybeskipdistinct_347885(LOC5, (*c).Calleesym);
	{
		NIM_BOOL LOC8;
		ttype188837* LOC10;
		ttype188837* LOC13;
		LOC8 = 0;
		LOC8 = ((*a).Kind == ((NU8) 11));
		if (!(LOC8)) goto LA9;
		LOC10 = 0;
		LOC10 = skiptypes_192793(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_189193(a);
		result = typerel_346174(c, f, LOC13, NIM_TRUE);
		goto BeforeRet;
	}
	LA11: ;
	switch ((*a).Kind) {
	case ((NU8) 56):
	{
		ttype188837* branch_348271;
		ttypeseq188835* HEX3Atmp_350514;
		NI i_350516;
		NI l_350518;
		branch_348271 = 0;
		HEX3Atmp_350514 = 0;
		HEX3Atmp_350514 = (*a).Sons;
		i_350516 = 0;
		l_350518 = HEX3Atmp_350514->Sup.len;
		while (1) {
			if (!(i_350516 < l_350518)) goto LA15;
			branch_348271 = HEX3Atmp_350514->data[i_350516];
			{
				NU8 LOC18;
				LOC18 = 0;
				LOC18 = typerel_346174(c, f, branch_348271, NIM_FALSE);
				if (!(LOC18 == ((NU8) 0))) goto LA19;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA19: ;
			i_350516 += 1;
		} LA15: ;
		result = ((NU8) 7);
		goto BeforeRet;
	}
	break;
	case ((NU8) 55):
	{
		ttype188837* branch_348293;
		ttypeseq188835* HEX3Atmp_350519;
		NI i_350521;
		NI l_350523;
		branch_348293 = 0;
		HEX3Atmp_350519 = 0;
		HEX3Atmp_350519 = (*a).Sons;
		i_350521 = 0;
		l_350523 = HEX3Atmp_350519->Sup.len;
		while (1) {
			if (!(i_350521 < l_350523)) goto LA22;
			branch_348293 = HEX3Atmp_350519->data[i_350521];
			{
				NU8 LOC25;
				LOC25 = 0;
				LOC25 = typerel_346174(c, f, branch_348293, NIM_FALSE);
				if (!!((LOC25 == ((NU8) 0)))) goto LA26;
				result = ((NU8) 7);
				goto BeforeRet;
			}
			LA26: ;
			i_350521 += 1;
		} LA22: ;
		result = ((NU8) 0);
		goto BeforeRet;
	}
	break;
	case ((NU8) 57):
	{
		switch ((*f).Kind) {
		case ((NU8) 57):
		{
			ttype188837* LOC30;
			ttype188837* LOC31;
			LOC30 = 0;
			LOC30 = lastson_189193(a);
			LOC31 = 0;
			LOC31 = lastson_189193(f);
			result = typerel_346174(c, LOC30, LOC31, NIM_TRUE);
			goto BeforeRet;
		}
		break;
		default:
		{
			{
				if (!((*f).Kind == ((NU8) 58))) goto LA35;
				result = ((NU8) 7);
			}
			goto LA33;
			LA35: ;
			{
				result = ((NU8) 0);
			}
			LA33: ;
			goto BeforeRet;
		}
		break;
		}
	}
	break;
	case ((NU8) 58):
	{
		{
			if (!((*f).Kind == ((NU8) 58))) goto LA41;
			result = ((NU8) 7);
		}
		goto LA39;
		LA41: ;
		{
			result = ((NU8) 0);
		}
		LA39: ;
		goto BeforeRet;
	}
	break;
	default:
	{
	}
	break;
	}
	switch ((*f).Kind) {
	case ((NU8) 14):
	{
		{
			NIM_BOOL LOC48;
			LOC48 = 0;
			LOC48 = ((*a).Kind == (*f).Kind);
			if (!(LOC48)) goto LA49;
			LOC48 = sameenumtypes_229167(f, a);
			LA49: ;
			if (!LOC48) goto LA50;
			result = ((NU8) 9);
		}
		goto LA46;
		LA50: ;
		{
			ttype188837* LOC53;
			NIM_BOOL LOC54;
			LOC53 = 0;
			LOC53 = skiptypes_192793(a, 1048576);
			LOC54 = 0;
			LOC54 = sameenumtypes_229167(f, LOC53);
			if (!LOC54) goto LA55;
			result = ((NU8) 3);
		}
		goto LA46;
		LA55: ;
		LA46: ;
	}
	break;
	case ((NU8) 1):
	case ((NU8) 2):
	{
		{
			if (!((*a).Kind == (*f).Kind)) goto LA60;
			result = ((NU8) 9);
		}
		goto LA58;
		LA60: ;
		{
			ttype188837* LOC63;
			LOC63 = 0;
			LOC63 = skiptypes_192793(a, 1048576);
			if (!((*LOC63).Kind == (*f).Kind)) goto LA64;
			result = ((NU8) 3);
		}
		goto LA58;
		LA64: ;
		LA58: ;
	}
	break;
	case ((NU8) 20):
	{
		{
			ttype188837* LOC71;
			ttype188837* LOC72;
			if (!((*a).Kind == (*f).Kind)) goto LA69;
			LOC71 = 0;
			LOC71 = base_223029(f);
			LOC72 = 0;
			LOC72 = base_223029(a);
			result = typerel_346174(c, LOC71, LOC72, NIM_TRUE);
			{
				if (!!(((129 &(1<<((result)&15)))!=0))) goto LA75;
				result = typerangerel_347621(f, a);
			}
			LA75: ;
		}
		goto LA67;
		LA69: ;
		{
			{
				ttype188837* LOC80;
				LOC80 = 0;
				LOC80 = skiptypes_192793(f, 1048576);
				if (!((*LOC80).Kind == (*a).Kind)) goto LA81;
				result = ((NU8) 2);
			}
			goto LA78;
			LA81: ;
			{
				ttype188837* LOC84;
				NIM_BOOL LOC85;
				LOC84 = 0;
				LOC84 = skiptypes_192793(f, 1048576);
				LOC85 = 0;
				LOC85 = isconvertibletorange_346389(LOC84, a);
				if (!LOC85) goto LA86;
				result = ((NU8) 1);
			}
			goto LA78;
			LA86: ;
			LA78: ;
		}
		LA67: ;
	}
	break;
	case ((NU8) 31):
	{
		result = handlerange_346216(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 32):
	{
		result = handlerange_346216(f, a, ((NU8) 32), ((NU8) 32));
	}
	break;
	case ((NU8) 33):
	{
		result = handlerange_346216(f, a, ((NU8) 32), ((NU8) 33));
	}
	break;
	case ((NU8) 34):
	{
		result = handlerange_346216(f, a, ((NU8) 32), ((NU8) 34));
	}
	break;
	case ((NU8) 35):
	{
		result = handlerange_346216(f, a, ((NU8) 31), ((NU8) 35));
	}
	break;
	case ((NU8) 40):
	{
		result = handlerange_346216(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 41):
	{
		result = handlerange_346216(f, a, ((NU8) 41), ((NU8) 41));
	}
	break;
	case ((NU8) 42):
	{
		result = handlerange_346216(f, a, ((NU8) 41), ((NU8) 42));
	}
	break;
	case ((NU8) 43):
	{
		result = handlerange_346216(f, a, ((NU8) 41), ((NU8) 43));
	}
	break;
	case ((NU8) 44):
	{
		result = handlerange_346216(f, a, ((NU8) 40), ((NU8) 44));
	}
	break;
	case ((NU8) 36):
	{
		result = handlefloatrange_346452(f, a);
	}
	break;
	case ((NU8) 37):
	{
		result = handlefloatrange_346452(f, a);
	}
	break;
	case ((NU8) 38):
	{
		result = handlefloatrange_346452(f, a);
	}
	break;
	case ((NU8) 39):
	{
		result = handlefloatrange_346452(f, a);
	}
	break;
	case ((NU8) 23):
	{
		{
			ttype188837* LOC107;
			ttype188837* LOC108;
			if (!((*aorig).Kind == ((NU8) 23))) goto LA105;
			LOC107 = 0;
			LOC107 = base_223029(f);
			LOC108 = 0;
			LOC108 = base_223029(aorig);
			result = typerel_346174(c, LOC107, LOC108, NIM_TRUE);
		}
		goto LA103;
		LA105: ;
		{
			ttype188837* LOC110;
			LOC110 = 0;
			LOC110 = base_223029(f);
			result = typerel_346174(c, LOC110, aorig, NIM_TRUE);
		}
		LA103: ;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		switch ((*a).Kind) {
		case ((NU8) 16):
		case ((NU8) 4):
		{
			ttype188837* frange;
			frange = (*f).Sons->data[0];
			{
				ttype188837* prev;
				TNimObject* LOC117;
				if (!((*frange).Kind == ((NU8) 12))) goto LA115;
				LOC117 = 0;
				LOC117 = idtableget_197137((*c).Bindings, &frange->Sup);
				prev = ((ttype188837*) (LOC117));
				{
					if (!(prev == NIM_NIL)) goto LA120;
					put_345266(&(*c).Bindings, frange, (*a).Sons->data[0]);
					frange = a;
				}
				goto LA118;
				LA120: ;
				{
					frange = prev;
				}
				LA118: ;
			}
			LA115: ;
			result = typerel_346174(c, (*f).Sons->data[1], (*a).Sons->data[1], NIM_TRUE);
			{
				if (!(result < ((NU8) 7))) goto LA125;
				result = ((NU8) 0);
			}
			goto LA123;
			LA125: ;
			{
				NIM_BOOL LOC128;
				tnode188803* LOC130;
				ttype188837* rangestatict;
				tnode188803* LOC133;
				tnode188803* LOC134;
				tnode188803* LOC135;
				ttype188837* replacementt;
				ttypeseq188835* LOC136;
				TY350968 LOC137;
				NI64 inputupperbound;
				tnode188803* LOC138;
				LOC128 = 0;
				LOC128 = (((*frange).Flags &(1<<((((NU8) 9))&31)))!=0);
				if (!(LOC128)) goto LA129;
				LOC130 = 0;
				LOC130 = HEX5BHEX5D_189694((*frange).N, 1);
				LOC128 = ((*LOC130).Kind == ((NU8) 62));
				LA129: ;
				if (!LOC128) goto LA131;
				LOC133 = 0;
				LOC133 = HEX5BHEX5D_189694((*frange).N, 1);
				LOC134 = 0;
				LOC134 = HEX5BHEX5D_189694(LOC133, 0);
				LOC135 = 0;
				LOC135 = HEX5BHEX5D_189694(LOC134, 1);
				rangestatict = (*LOC135).Typ;
				LOC136 = 0;
				LOC136 = (ttypeseq188835*) newSeq((&NTI188835), 1);
				memset((void*)LOC137, 0, sizeof(LOC137));
				LOC137[0] = getsystype_242024(((NU8) 31));
				asgnRefNoCycle((void**) &LOC136->data[0], LOC137[0]);
				replacementt = newtypewithsons_250675((*c).C, ((NU8) 59), LOC136);
				LOC138 = 0;
				LOC138 = HEX5BHEX5D_189694((*(*a).Sons->data[0]).N, 1);
				inputupperbound = (*LOC138).kindU.S1.Intval;
				asgnRefNoCycle((void**) &(*replacementt).N, newintnode_189069(((NU8) 6), (NI64)(inputupperbound + 1)));
				put_345266(&(*c).Bindings, rangestatict, replacementt);
				result = ((NU8) 7);
			}
			goto LA123;
			LA131: ;
			{
				NI64 LOC140;
				NI64 LOC141;
				LOC140 = 0;
				LOC140 = lengthord_223010(frange);
				LOC141 = 0;
				LOC141 = lengthord_223010(a);
				if (!!((LOC140 == LOC141))) goto LA142;
				result = ((NU8) 0);
			}
			goto LA123;
			LA142: ;
			LA123: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 27):
	case ((NU8) 48):
	{
		{
			NIM_BOOL LOC148;
			LOC148 = 0;
			LOC148 = ((*f).Kind == ((NU8) 48));
			if (!(LOC148)) goto LA149;
			LOC148 = ((*(*f).Sons->data[0]).Kind == ((NU8) 6));
			LA149: ;
			if (!LOC148) goto LA150;
			goto BeforeRet;
		}
		LA150: ;
		switch ((*a).Kind) {
		case ((NU8) 27):
		case ((NU8) 48):
		{
			ttype188837* LOC153;
			ttype188837* LOC154;
			LOC153 = 0;
			LOC153 = base_223029(f);
			LOC154 = 0;
			LOC154 = base_223029(a);
			result = typerel_346174(c, LOC153, LOC154, NIM_TRUE);
			{
				if (!(result < ((NU8) 7))) goto LA157;
				result = ((NU8) 0);
			}
			LA157: ;
		}
		break;
		case ((NU8) 4):
		{
			{
				NIM_BOOL LOC162;
				LOC162 = 0;
				LOC162 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC162)) goto LA163;
				LOC162 = ((*(*a).Sons->data[1]).Kind == ((NU8) 3));
				LA163: ;
				if (!LOC162) goto LA164;
				result = ((NU8) 3);
			}
			goto LA160;
			LA164: ;
			{
				ttype188837* LOC167;
				NU8 LOC168;
				LOC167 = 0;
				LOC167 = base_223029(f);
				LOC168 = 0;
				LOC168 = typerel_346174(c, LOC167, (*a).Sons->data[1], NIM_TRUE);
				if (!(((NU8) 7) <= LOC168)) goto LA169;
				result = ((NU8) 3);
			}
			goto LA160;
			LA169: ;
			LA160: ;
		}
		break;
		case ((NU8) 16):
		{
			{
				NIM_BOOL LOC174;
				LOC174 = 0;
				LOC174 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC174)) goto LA175;
				LOC174 = ((*(*a).Sons->data[1]).Kind == ((NU8) 3));
				LA175: ;
				if (!LOC174) goto LA176;
				result = ((NU8) 3);
			}
			goto LA172;
			LA176: ;
			{
				ttype188837* LOC179;
				NU8 LOC180;
				LOC179 = 0;
				LOC179 = base_223029(f);
				LOC180 = 0;
				LOC180 = typerel_346174(c, LOC179, (*a).Sons->data[1], NIM_TRUE);
				if (!(((NU8) 7) <= LOC180)) goto LA181;
				result = ((NU8) 1);
			}
			goto LA172;
			LA181: ;
			LA172: ;
		}
		break;
		case ((NU8) 24):
		{
			{
				NIM_BOOL LOC186;
				LOC186 = 0;
				LOC186 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC186)) goto LA187;
				LOC186 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA187: ;
				if (!LOC186) goto LA188;
				result = ((NU8) 1);
			}
			goto LA184;
			LA188: ;
			{
				ttype188837* LOC191;
				NU8 LOC192;
				LOC191 = 0;
				LOC191 = base_223029(f);
				LOC192 = 0;
				LOC192 = typerel_346174(c, LOC191, (*a).Sons->data[0], NIM_TRUE);
				if (!(((NU8) 7) <= LOC192)) goto LA193;
				result = ((NU8) 1);
			}
			goto LA184;
			LA193: ;
			LA184: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 24):
	{
		switch ((*a).Kind) {
		case ((NU8) 24):
		{
			{
				NIM_BOOL LOC200;
				LOC200 = 0;
				LOC200 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC200)) goto LA201;
				LOC200 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA201: ;
				if (!LOC200) goto LA202;
				result = ((NU8) 3);
			}
			goto LA198;
			LA202: ;
			{
				result = typerel_346174(c, (*f).Sons->data[0], (*a).Sons->data[0], NIM_TRUE);
				{
					if (!(result < ((NU8) 7))) goto LA207;
					result = ((NU8) 0);
				}
				goto LA205;
				LA207: ;
				{
					NIM_BOOL LOC210;
					LOC210 = 0;
					LOC210 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
					if (!(LOC210)) goto LA211;
					LOC210 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
					LA211: ;
					if (!LOC210) goto LA212;
					result = ((NU8) 1);
				}
				goto LA205;
				LA212: ;
				LA205: ;
			}
			LA198: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_347094(f);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 15):
	{
		{
			NIM_BOOL LOC219;
			ttype188837* x;
			LOC219 = 0;
			LOC219 = isordinaltype_223071(a);
			if (!LOC219) goto LA220;
			{
				if (!((*a).Kind == ((NU8) 15))) goto LA224;
				x = (*a).Sons->data[0];
			}
			goto LA222;
			LA224: ;
			{
				x = a;
			}
			LA222: ;
			{
				if (!((*(*f).Sons->data[0]).Kind == ((NU8) 0))) goto LA229;
				result = ((NU8) 7);
			}
			goto LA227;
			LA229: ;
			{
				result = typerel_346174(c, (*f).Sons->data[0], x, NIM_TRUE);
				{
					if (!(result < ((NU8) 7))) goto LA234;
					result = ((NU8) 0);
				}
				LA234: ;
			}
			LA227: ;
		}
		goto LA217;
		LA220: ;
		{
			if (!((*a).Kind == ((NU8) 12))) goto LA237;
			result = ((NU8) 7);
		}
		goto LA217;
		LA237: ;
		LA217: ;
	}
	break;
	case ((NU8) 30):
	{
		internalerror_165606(((NimStringDesc*) &TMP2522));
	}
	break;
	case ((NU8) 5):
	{
		{
			if (!((*a).Kind == (*f).Kind)) goto LA243;
			result = ((NU8) 9);
		}
		LA243: ;
	}
	break;
	case ((NU8) 18):
	{
		{
			if (!((*a).Kind == ((NU8) 18))) goto LA248;
			result = recordrel_346871(c, f, a);
		}
		LA248: ;
	}
	break;
	case ((NU8) 17):
	{
		{
			if (!((*a).Kind == ((NU8) 17))) goto LA253;
			{
				NIM_BOOL LOC257;
				LOC257 = 0;
				LOC257 = sameobjecttypes_229091(f, a);
				if (!LOC257) goto LA258;
				result = ((NU8) 9);
			}
			goto LA255;
			LA258: ;
			{
				NI depth;
				depth = isobjectsubtype_346507(a, f);
				{
					if (!(0 < depth)) goto LA263;
					(*c).Inheritancepenalty += depth;
					result = ((NU8) 3);
				}
				LA263: ;
			}
			LA255: ;
		}
		LA253: ;
	}
	break;
	case ((NU8) 13):
	{
		{
			NIM_BOOL LOC268;
			LOC268 = 0;
			LOC268 = ((*a).Kind == ((NU8) 13));
			if (!(LOC268)) goto LA269;
			LOC268 = samedistincttypes_229160(f, a);
			LA269: ;
			if (!LOC268) goto LA270;
			result = ((NU8) 9);
		}
		goto LA266;
		LA270: ;
		{
			ttype188837* LOC275;
			if (!(*c).Coercedistincts) goto LA273;
			LOC275 = 0;
			LOC275 = base_223029(f);
			result = typerel_346174(c, LOC275, a, NIM_TRUE);
		}
		goto LA266;
		LA273: ;
		LA266: ;
	}
	break;
	case ((NU8) 19):
	{
		{
			if (!((*a).Kind == ((NU8) 19))) goto LA279;
			{
				NIM_BOOL LOC283;
				LOC283 = 0;
				LOC283 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 12)));
				if (!(LOC283)) goto LA284;
				LOC283 = ((*(*a).Sons->data[0]).Kind == ((NU8) 3));
				LA284: ;
				if (!LOC283) goto LA285;
				result = ((NU8) 3);
			}
			goto LA281;
			LA285: ;
			{
				result = typerel_346174(c, (*f).Sons->data[0], (*a).Sons->data[0], NIM_TRUE);
				{
					if (!(result <= ((NU8) 1))) goto LA290;
					result = ((NU8) 0);
				}
				LA290: ;
			}
			LA281: ;
		}
		LA279: ;
	}
	break;
	case ((NU8) 21):
	case ((NU8) 22):
	{
		{
			NI i_348801;
			NI HEX3Atmp_350524;
			NI LOC303;
			NI res_350526;
			ttype188837* LOC310;
			ttype188837* LOC311;
			if (!((*a).Kind == (*f).Kind)) goto LA295;
			{
				NI LOC299;
				NI LOC300;
				LOC299 = 0;
				LOC299 = len_192569(a);
				LOC300 = 0;
				LOC300 = len_192569(f);
				if (!(LOC299 < LOC300)) goto LA301;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA301: ;
			i_348801 = 0;
			HEX3Atmp_350524 = 0;
			LOC303 = 0;
			LOC303 = len_192569(f);
			HEX3Atmp_350524 = (NI32)(LOC303 - 2);
			res_350526 = 0;
			while (1) {
				if (!(res_350526 <= HEX3Atmp_350524)) goto LA304;
				i_348801 = res_350526;
				{
					NU8 LOC307;
					LOC307 = 0;
					LOC307 = typerel_346174(c, (*f).Sons->data[i_348801], (*a).Sons->data[i_348801], NIM_TRUE);
					if (!(LOC307 == ((NU8) 0))) goto LA308;
					result = ((NU8) 0);
					goto BeforeRet;
				}
				LA308: ;
				res_350526 += 1;
			} LA304: ;
			LOC310 = 0;
			LOC310 = lastson_189193(f);
			LOC311 = 0;
			LOC311 = lastson_189193(a);
			result = typerel_346174(c, LOC310, LOC311, NIM_TRUE);
			{
				if (!(result <= ((NU8) 1))) goto LA314;
				result = ((NU8) 0);
			}
			goto LA312;
			LA314: ;
			{
				NIM_BOOL LOC317;
				LOC317 = 0;
				LOC317 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC317)) goto LA318;
				LOC317 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA318: ;
				if (!LOC317) goto LA319;
				result = ((NU8) 1);
			}
			goto LA312;
			LA319: ;
			LA312: ;
		}
		goto LA293;
		LA295: ;
		{
			if (!((*a).Kind == ((NU8) 5))) goto LA322;
			result = allowsnil_347094(f);
		}
		goto LA293;
		LA322: ;
		{
		}
		LA293: ;
	}
	break;
	case ((NU8) 25):
	{
		result = proctyperel_347234(c, f, a);
		{
			NIM_BOOL LOC328;
			NIM_BOOL LOC329;
			LOC328 = 0;
			LOC329 = 0;
			LOC329 = !((result == ((NU8) 0)));
			if (!(LOC329)) goto LA330;
			LOC329 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
			LA330: ;
			LOC328 = LOC329;
			if (!(LOC328)) goto LA331;
			LOC328 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
			LA331: ;
			if (!LOC328) goto LA332;
			result = ((NU8) 1);
		}
		LA332: ;
	}
	break;
	case ((NU8) 26):
	{
		switch ((*a).Kind) {
		case ((NU8) 26):
		{
			{
				NIM_BOOL LOC338;
				LOC338 = 0;
				LOC338 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC338)) goto LA339;
				LOC338 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA339: ;
				if (!LOC338) goto LA340;
				result = ((NU8) 1);
			}
			goto LA336;
			LA340: ;
			{
				result = ((NU8) 9);
			}
			LA336: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_347094(f);
		}
		break;
		case ((NU8) 25):
		{
			{
				if (!!(((*a).Callconv == ((NU8) 8)))) goto LA347;
				result = ((NU8) 1);
			}
			LA347: ;
		}
		break;
		case ((NU8) 21):
		{
			{
				NI LOC352;
				LOC352 = 0;
				LOC352 = len_192569(a);
				if (!(LOC352 == 1)) goto LA353;
				result = ((NU8) 1);
			}
			LA353: ;
		}
		break;
		case ((NU8) 29):
		{
			result = ((NU8) 1);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 28):
	{
		switch ((*a).Kind) {
		case ((NU8) 28):
		{
			{
				NIM_BOOL LOC361;
				LOC361 = 0;
				LOC361 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC361)) goto LA362;
				LOC361 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA362: ;
				if (!LOC361) goto LA363;
				result = ((NU8) 1);
			}
			goto LA359;
			LA363: ;
			{
				result = ((NU8) 9);
			}
			LA359: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_347094(f);
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 29):
	{
		switch ((*a).Kind) {
		case ((NU8) 29):
		{
			{
				NIM_BOOL LOC372;
				LOC372 = 0;
				LOC372 = (((*f).Flags &(1<<((((NU8) 16))&31)))!=0);
				if (!(LOC372)) goto LA373;
				LOC372 = !((((*a).Flags &(1<<((((NU8) 16))&31)))!=0));
				LA373: ;
				if (!LOC372) goto LA374;
				result = ((NU8) 1);
			}
			goto LA370;
			LA374: ;
			{
				result = ((NU8) 9);
			}
			LA370: ;
		}
		break;
		case ((NU8) 5):
		{
			result = allowsnil_347094(f);
		}
		break;
		case ((NU8) 28):
		{
			result = ((NU8) 1);
		}
		break;
		case ((NU8) 21):
		{
			{
				NIM_BOOL LOC382;
				NI LOC383;
				LOC382 = 0;
				LOC383 = 0;
				LOC383 = len_192569(a);
				LOC382 = (LOC383 == 1);
				if (!(LOC382)) goto LA384;
				LOC382 = ((*(*a).Sons->data[0]).Kind == ((NU8) 2));
				LA384: ;
				if (!LOC382) goto LA385;
				result = ((NU8) 1);
			}
			LA385: ;
		}
		break;
		case ((NU8) 16):
		{
			{
				NIM_BOOL LOC390;
				NIM_BOOL LOC391;
				NI64 LOC392;
				ttype188837* LOC394;
				LOC390 = 0;
				LOC391 = 0;
				LOC392 = 0;
				LOC392 = firstord_223002((*a).Sons->data[0]);
				LOC391 = (LOC392 == 0);
				if (!(LOC391)) goto LA393;
				LOC394 = 0;
				LOC394 = skiptypes_192793((*a).Sons->data[0], 1048576);
				LOC391 = ((*LOC394).Kind >= ((NU8) 31) && (*LOC394).Kind <= ((NU8) 35));
				LA393: ;
				LOC390 = LOC391;
				if (!(LOC390)) goto LA395;
				LOC390 = ((*(*a).Sons->data[1]).Kind == ((NU8) 2));
				LA395: ;
				if (!LOC390) goto LA396;
				result = ((NU8) 1);
			}
			LA396: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	break;
	case ((NU8) 3):
	{
		{
			if (!((*a).Kind == ((NU8) 3))) goto LA402;
			result = ((NU8) 9);
		}
		LA402: ;
	}
	break;
	case ((NU8) 11):
	{
		ttype188837* roota;
		ttype188837* rootf;
		roota = skipgenericalias_229506(a);
		rootf = skipgenericalias_229506(f);
		{
			NIM_BOOL LOC407;
			ttype188837* LOC409;
			ttype188837* LOC410;
			NI i_349056;
			NI HEX3Atmp_350528;
			NI LOC413;
			NI res_350530;
			LOC407 = 0;
			LOC407 = ((*a).Kind == ((NU8) 11));
			if (!(LOC407)) goto LA408;
			LOC409 = 0;
			LOC409 = base_223029(roota);
			LOC410 = 0;
			LOC410 = base_223029(rootf);
			LOC407 = (LOC409 == LOC410);
			LA408: ;
			if (!LOC407) goto LA411;
			i_349056 = 0;
			HEX3Atmp_350528 = 0;
			LOC413 = 0;
			LOC413 = sonslen_189185(rootf);
			HEX3Atmp_350528 = (NI32)(LOC413 - 2);
			res_350530 = 1;
			while (1) {
				ttype188837* ff;
				ttype188837* aa;
				if (!(res_350530 <= HEX3Atmp_350528)) goto LA414;
				i_349056 = res_350530;
				ff = (*rootf).Sons->data[i_349056];
				aa = (*roota).Sons->data[i_349056];
				result = typerel_346174(c, ff, aa, NIM_TRUE);
				{
					if (!(result == ((NU8) 0))) goto LA417;
					goto BeforeRet;
				}
				LA417: ;
				{
					NIM_BOOL LOC421;
					LOC421 = 0;
					LOC421 = ((*ff).Kind == ((NU8) 20));
					if (!(LOC421)) goto LA422;
					LOC421 = !((result == ((NU8) 9)));
					LA422: ;
					if (!LOC421) goto LA423;
					result = ((NU8) 0);
					goto BeforeRet;
				}
				LA423: ;
				res_350530 += 1;
			} LA414: ;
			result = ((NU8) 7);
		}
		goto LA405;
		LA411: ;
		{
			ttype188837* LOC426;
			LOC426 = 0;
			LOC426 = lastson_189193(f);
			result = typerel_346174(c, LOC426, a, NIM_TRUE);
		}
		LA405: ;
	}
	break;
	case ((NU8) 10):
	{
		ttype188837* prev_349087;
		TNimObject* LOC428;
		LOC428 = 0;
		LOC428 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_349087 = ((ttype188837*) (LOC428));
		{
			ttype188837* ff;
			if (!(prev_349087 == NIM_NIL)) goto LA431;
			{
				NIM_BOOL LOC435;
				LOC435 = 0;
				LOC435 = ((*a).Kind == ((NU8) 11));
				if (!(LOC435)) goto LA436;
				LOC435 = ((*a).Sons->data[0] == f);
				LA436: ;
				if (!LOC435) goto LA437;
				{
					ttype188837* bound_349131;
					ttype188837* LOC443;
					if (!dobind) goto LA441;
					LOC443 = 0;
					LOC443 = skiptypes_192793(aorig, 1048576);
					bound_349131 = skipintlit_242424(LOC443);
					{
						if (!dobind) goto LA446;
						put_345266(&(*c).Bindings, f, bound_349131);
					}
					LA446: ;
				}
				LA441: ;
				result = ((NU8) 7);
				goto BeforeRet;
			}
			LA437: ;
			ff = lastson_189193(f);
			{
				if (!!((ff == NIM_NIL))) goto LA450;
				result = typerel_346174(c, ff, a, NIM_TRUE);
			}
			LA450: ;
		}
		goto LA429;
		LA431: ;
		{
			result = typerel_346174(c, prev_349087, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA429: ;
	}
	break;
	case ((NU8) 9):
	{
		ttype188837* x_349221;
		x_349221 = skipgenericalias_229506(a);
		{
			NIM_BOOL LOC456;
			LOC456 = 0;
			LOC456 = ((*x_349221).Kind == ((NU8) 9));
			if (LOC456) goto LA457;
			LOC456 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 10)));
			LA457: ;
			if (!LOC456) goto LA458;
		}
		goto LA454;
		LA458: ;
		{
			NIM_BOOL LOC461;
			NIM_BOOL LOC462;
			NI LOC465;
			NI LOC466;
			NI i_349277;
			NI HEX3Atmp_350532;
			NI LOC469;
			NI res_350534;
			LOC461 = 0;
			LOC462 = 0;
			LOC462 = ((*x_349221).Kind == ((NU8) 11));
			if (!(LOC462)) goto LA463;
			LOC462 = ((*f).Sons->data[0] == (*x_349221).Sons->data[0]);
			LA463: ;
			LOC461 = LOC462;
			if (!(LOC461)) goto LA464;
			LOC465 = 0;
			LOC465 = sonslen_189185(x_349221);
			LOC466 = 0;
			LOC466 = sonslen_189185(f);
			LOC461 = ((NI32)(LOC465 - 1) == LOC466);
			LA464: ;
			if (!LOC461) goto LA467;
			i_349277 = 0;
			HEX3Atmp_350532 = 0;
			LOC469 = 0;
			LOC469 = sonslen_189185(f);
			HEX3Atmp_350532 = (NI32)(LOC469 - 1);
			res_350534 = 1;
			while (1) {
				if (!(res_350534 <= HEX3Atmp_350532)) goto LA470;
				i_349277 = res_350534;
				{
					if (!((*(*x_349221).Sons->data[i_349277]).Kind == ((NU8) 12))) goto LA473;
					internalerror_165606(((NimStringDesc*) &TMP2542));
				}
				goto LA471;
				LA473: ;
				{
					NU8 LOC476;
					LOC476 = 0;
					LOC476 = typerel_346174(c, (*f).Sons->data[i_349277], (*x_349221).Sons->data[i_349277], NIM_TRUE);
					if (!(LOC476 <= ((NU8) 3))) goto LA477;
					goto BeforeRet;
				}
				goto LA471;
				LA477: ;
				LA471: ;
				res_350534 += 1;
			} LA470: ;
			result = ((NU8) 7);
		}
		goto LA454;
		LA467: ;
		{
			result = typerel_346174(c, (*f).Sons->data[0], x_349221, NIM_TRUE);
			{
				NI i_349317;
				NI HEX3Atmp_350536;
				NI LOC484;
				NI res_350538;
				if (!!((result == ((NU8) 0)))) goto LA482;
				i_349317 = 0;
				HEX3Atmp_350536 = 0;
				LOC484 = 0;
				LOC484 = sonslen_189185(f);
				HEX3Atmp_350536 = (NI32)(LOC484 - 1);
				res_350538 = 1;
				while (1) {
					ttype188837* x;
					TNimObject* LOC486;
					if (!(res_350538 <= HEX3Atmp_350536)) goto LA485;
					i_349317 = res_350538;
					LOC486 = 0;
					LOC486 = idtableget_197137((*c).Bindings, &(*(*f).Sons->data[0]).Sons->data[(NI32)(i_349317 - 1)]->Sup);
					x = ((ttype188837*) (LOC486));
					{
						NIM_BOOL LOC489;
						LOC489 = 0;
						LOC489 = (x == NIM_NIL);
						if (LOC489) goto LA490;
						LOC489 = ((*x).Kind == ((NU8) 9) || (*x).Kind == ((NU8) 12));
						LA490: ;
						if (!LOC489) goto LA491;
						internalerror_165606(((NimStringDesc*) &TMP2542));
					}
					LA491: ;
					put_345266(&(*c).Bindings, (*f).Sons->data[i_349317], x);
					res_350538 += 1;
				} LA485: ;
			}
			LA482: ;
		}
		LA454: ;
	}
	break;
	case ((NU8) 55):
	{
		ttype188837* prev_349352;
		TNimObject* LOC494;
		LOC494 = 0;
		LOC494 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_349352 = ((ttype188837*) (LOC494));
		{
			ttype188837* branch_349382;
			ttypeseq188835* HEX3Atmp_350540;
			NI i_350542;
			NI l_350544;
			if (!(prev_349352 == NIM_NIL)) goto LA497;
			branch_349382 = 0;
			HEX3Atmp_350540 = 0;
			HEX3Atmp_350540 = (*f).Sons;
			i_350542 = 0;
			l_350544 = HEX3Atmp_350540->Sup.len;
			while (1) {
				if (!(i_350542 < l_350544)) goto LA499;
				branch_349382 = HEX3Atmp_350540->data[i_350542];
				{
					NU8 LOC502;
					LOC502 = 0;
					LOC502 = typerel_346174(c, branch_349382, aorig, NIM_TRUE);
					if (!(LOC502 < ((NU8) 3))) goto LA503;
					result = ((NU8) 0);
					goto BeforeRet;
				}
				LA503: ;
				i_350542 += 1;
			} LA499: ;
			{
				ttype188837* bound_349394;
				ttype188837* LOC509;
				if (!dobind) goto LA507;
				LOC509 = 0;
				LOC509 = skiptypes_192793(aorig, 1048576);
				bound_349394 = skipintlit_242424(LOC509);
				{
					if (!dobind) goto LA512;
					put_345266(&(*c).Bindings, f, bound_349394);
				}
				LA512: ;
			}
			LA507: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA495;
		LA497: ;
		{
			result = typerel_346174(c, prev_349352, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA495: ;
	}
	break;
	case ((NU8) 56):
	{
		ttype188837* prev_349604;
		TNimObject* LOC516;
		LOC516 = 0;
		LOC516 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_349604 = ((ttype188837*) (LOC516));
		{
			ttype188837* branch_349634;
			ttypeseq188835* HEX3Atmp_350545;
			NI i_350547;
			NI l_350549;
			if (!(prev_349604 == NIM_NIL)) goto LA519;
			branch_349634 = 0;
			HEX3Atmp_350545 = 0;
			HEX3Atmp_350545 = (*f).Sons;
			i_350547 = 0;
			l_350549 = HEX3Atmp_350545->Sup.len;
			while (1) {
				if (!(i_350547 < l_350549)) goto LA521;
				branch_349634 = HEX3Atmp_350545->data[i_350547];
				{
					NU8 LOC524;
					LOC524 = 0;
					LOC524 = typerel_346174(c, branch_349634, aorig, NIM_TRUE);
					if (!(((NU8) 3) <= LOC524)) goto LA525;
					{
						ttype188837* bound_349645;
						ttype188837* LOC531;
						if (!dobind) goto LA529;
						LOC531 = 0;
						LOC531 = skiptypes_192793(aorig, 1048576);
						bound_349645 = skipintlit_242424(LOC531);
						{
							if (!dobind) goto LA534;
							put_345266(&(*c).Bindings, f, bound_349645);
						}
						LA534: ;
					}
					LA529: ;
					result = ((NU8) 7);
					goto BeforeRet;
				}
				LA525: ;
				i_350547 += 1;
			} LA521: ;
			result = ((NU8) 0);
			goto BeforeRet;
		}
		goto LA517;
		LA519: ;
		{
			result = typerel_346174(c, prev_349604, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA517: ;
	}
	break;
	case ((NU8) 57):
	{
		ttype188837* prev_349804;
		TNimObject* LOC538;
		LOC538 = 0;
		LOC538 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_349804 = ((ttype188837*) (LOC538));
		{
			ttype188837* branch_349834;
			ttypeseq188835* HEX3Atmp_350550;
			NI i_350552;
			NI l_350554;
			if (!(prev_349804 == NIM_NIL)) goto LA541;
			branch_349834 = 0;
			HEX3Atmp_350550 = 0;
			HEX3Atmp_350550 = (*f).Sons;
			i_350552 = 0;
			l_350554 = HEX3Atmp_350550->Sup.len;
			while (1) {
				if (!(i_350552 < l_350554)) goto LA543;
				branch_349834 = HEX3Atmp_350550->data[i_350552];
				{
					NU8 LOC546;
					LOC546 = 0;
					LOC546 = typerel_346174(c, branch_349834, aorig, NIM_TRUE);
					if (!!((LOC546 == ((NU8) 0)))) goto LA547;
					result = ((NU8) 0);
					goto BeforeRet;
				}
				LA547: ;
				i_350552 += 1;
			} LA543: ;
			{
				ttype188837* bound_349845;
				ttype188837* LOC553;
				if (!dobind) goto LA551;
				LOC553 = 0;
				LOC553 = skiptypes_192793(aorig, 1048576);
				bound_349845 = skipintlit_242424(LOC553);
				{
					if (!dobind) goto LA556;
					put_345266(&(*c).Bindings, f, bound_349845);
				}
				LA556: ;
			}
			LA551: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA539;
		LA541: ;
		{
			result = typerel_346174(c, prev_349804, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA539: ;
	}
	break;
	case ((NU8) 58):
	{
		ttype188837* prev_350004;
		TNimObject* LOC560;
		LOC560 = 0;
		LOC560 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_350004 = ((ttype188837*) (LOC560));
		{
			ttype188837* concrete;
			if (!(prev_350004 == NIM_NIL)) goto LA563;
			concrete = concretetype_346182(&(*c), a);
			{
				NIM_BOOL LOC567;
				LOC567 = 0;
				LOC567 = !((concrete == NIM_NIL));
				if (!(LOC567)) goto LA568;
				LOC567 = dobind;
				LA568: ;
				if (!LOC567) goto LA569;
				put_345266(&(*c).Bindings, f, concrete);
			}
			LA569: ;
			result = ((NU8) 7);
			goto BeforeRet;
		}
		goto LA561;
		LA563: ;
		{
			result = typerel_346174(c, prev_350004, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA561: ;
	}
	break;
	case ((NU8) 51):
	{
		ttype188837* prev_350042;
		TNimObject* LOC573;
		LOC573 = 0;
		LOC573 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_350042 = ((ttype188837*) (LOC573));
		{
			NU8 targetkind;
			if (!(prev_350042 == NIM_NIL)) goto LA576;
			targetkind = (*(*f).Sons->data[0]).Kind;
			{
				NIM_BOOL LOC580;
				ttype188837* LOC581;
				NIM_BOOL LOC583;
				LOC580 = 0;
				LOC581 = 0;
				LOC581 = skiptypes_192793(a, 1050624);
				LOC580 = (targetkind == (*LOC581).Kind);
				if (LOC580) goto LA582;
				LOC583 = 0;
				LOC583 = (targetkind == ((NU8) 25) || targetkind == ((NU8) 26));
				if (!(LOC583)) goto LA584;
				LOC583 = ((*a).Kind == ((NU8) 5));
				LA584: ;
				LOC580 = LOC583;
				LA582: ;
				if (!LOC580) goto LA585;
				put_345266(&(*c).Bindings, f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA578;
			LA585: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA578: ;
		}
		goto LA574;
		LA576: ;
		{
			result = typerel_346174(c, prev_350042, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA574: ;
	}
	break;
	case ((NU8) 52):
	case ((NU8) 53):
	{
		ttype188837* prev_350096;
		TNimObject* LOC590;
		LOC590 = 0;
		LOC590 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_350096 = ((ttype188837*) (LOC590));
		{
			if (!(prev_350096 == NIM_NIL)) goto LA593;
			result = matchusertypeclass_347632((*c).C, c, f, aorig);
			{
				if (!(result == ((NU8) 7))) goto LA597;
				put_345266(&(*c).Bindings, f, a);
			}
			LA597: ;
		}
		goto LA591;
		LA593: ;
		{
			result = typerel_346174(c, prev_350096, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA591: ;
	}
	break;
	case ((NU8) 54):
	{
		ttype188837* prev_350125;
		TNimObject* LOC601;
		LOC601 = 0;
		LOC601 = idtableget_197137((*c).Bindings, &f->Sup);
		prev_350125 = ((ttype188837*) (LOC601));
		{
			if (!(prev_350125 == NIM_NIL)) goto LA604;
			{
				NU8 LOC608;
				LOC608 = 0;
				LOC608 = typerel_346174(c, (*f).Sons->data[1], a, NIM_TRUE);
				if (!!((LOC608 == ((NU8) 0)))) goto LA609;
				put_345266(&(*c).Bindings, f, a);
				result = ((NU8) 7);
				goto BeforeRet;
			}
			goto LA606;
			LA609: ;
			{
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA606: ;
		}
		goto LA602;
		LA604: ;
		{
			result = typerel_346174(c, prev_350125, a, NIM_TRUE);
			goto BeforeRet;
		}
		LA602: ;
	}
	break;
	case ((NU8) 12):
	{
		ttype188837* x;
		TNimObject* LOC614;
		LOC614 = 0;
		LOC614 = idtableget_197137((*c).Bindings, &f->Sup);
		x = ((ttype188837*) (LOC614));
		{
			if (!(x == NIM_NIL)) goto LA617;
			{
				NIM_BOOL LOC621;
				NIM_BOOL LOC622;
				LOC621 = 0;
				LOC622 = 0;
				LOC622 = ((*(*c).Callee).Kind == ((NU8) 10));
				if (!(LOC622)) goto LA623;
				LOC622 = ((*f).Kind == ((NU8) 12));
				LA623: ;
				LOC621 = LOC622;
				if (!(LOC621)) goto LA624;
				LOC621 = !((*c).Typedescmatched);
				LA624: ;
				if (!LOC621) goto LA625;
				{
					if (!(((*a).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA629;
					result = ((NU8) 7);
				}
				goto LA627;
				LA629: ;
				{
					if (!((*a).Kind == ((NU8) 8))) goto LA632;
					{
						NI LOC636;
						LOC636 = 0;
						LOC636 = sonslen_189185(f);
						if (!(LOC636 == 0)) goto LA637;
						result = ((NU8) 7);
					}
					goto LA634;
					LA637: ;
					{
						ttype188837* LOC648;
						ttype188837* LOC649;
						{
							NIM_BOOL LOC642;
							NIM_BOOL LOC643;
							NimStringDesc* LOC647;
							LOC642 = 0;
							LOC643 = 0;
							LOC643 = HEX3DHEX3D_233264((*a).Sons, NIM_NIL);
							LOC642 = !(LOC643);
							if (!(LOC642)) goto LA644;
							LOC642 = (0 < (*a).Sons->Sup.len);
							LA644: ;
							if (!!(LOC642)) goto LA645;
							LOC647 = 0;
							LOC647 = HEX24_165714(TMP2549);
							internalerror_165606(LOC647);
						}
						LA645: ;
						(*c).Typedescmatched = NIM_TRUE;
						LOC648 = 0;
						LOC648 = base_223029(f);
						LOC649 = 0;
						LOC649 = base_223029(a);
						result = typerel_346174(c, LOC648, LOC649, NIM_TRUE);
					}
					LA634: ;
				}
				goto LA627;
				LA632: ;
				{
					result = ((NU8) 0);
				}
				LA627: ;
			}
			goto LA619;
			LA625: ;
			{
				{
					NIM_BOOL LOC654;
					NI LOC655;
					ttype188837* LOC659;
					LOC654 = 0;
					LOC655 = 0;
					LOC655 = sonslen_189185(f);
					LOC654 = (0 < LOC655);
					if (!(LOC654)) goto LA656;
					LOC654 = !(((*(*f).Sons->data[0]).Kind == ((NU8) 0)));
					LA656: ;
					if (!LOC654) goto LA657;
					LOC659 = 0;
					LOC659 = lastson_189193(f);
					result = typerel_346174(c, LOC659, a, NIM_TRUE);
				}
				goto LA652;
				LA657: ;
				{
					result = ((NU8) 7);
				}
				LA652: ;
			}
			LA619: ;
			{
				ttype188837* concrete;
				if (!(result == ((NU8) 7))) goto LA663;
				concrete = a;
				{
					if (!(((*a).Flags &(1<<((((NU8) 25))&31)))!=0)) goto LA667;
					(*(*a).Sym).Kind = ((NU8) 7);
					(*a).Flags &= ~((NI32)(1) << ((((NU8) 25)) % (sizeof(NI32)*8)));
				}
				goto LA665;
				LA667: ;
				{
					concrete = concretetype_346182(&(*c), a);
					{
						if (!(concrete == NIM_NIL)) goto LA672;
						result = ((NU8) 0);
						goto BeforeRet;
					}
					LA672: ;
				}
				LA665: ;
				{
					if (!dobind) goto LA676;
					put_345266(&(*c).Bindings, f, concrete);
				}
				LA676: ;
			}
			LA663: ;
		}
		goto LA615;
		LA617: ;
		{
			if (!((*a).Kind == ((NU8) 3))) goto LA679;
			result = ((NU8) 7);
		}
		goto LA615;
		LA679: ;
		{
			if (!((*x).Kind == ((NU8) 12))) goto LA682;
			result = ((NU8) 7);
		}
		goto LA615;
		LA682: ;
		{
			result = typerel_346174(c, x, a, NIM_TRUE);
		}
		LA615: ;
	}
	break;
	case ((NU8) 59):
	{
		{
			ttype188837* LOC690;
			if (!((*aorig).Kind == ((NU8) 59))) goto LA688;
			LOC690 = 0;
			LOC690 = lastson_189193(f);
			result = typerel_346174(c, LOC690, a, NIM_TRUE);
			{
				if (!!((result == ((NU8) 0)))) goto LA693;
				put_345266(&(*c).Bindings, f, aorig);
			}
			LA693: ;
		}
		goto LA686;
		LA688: ;
		{
			result = ((NU8) 0);
		}
		LA686: ;
	}
	break;
	case ((NU8) 8):
	{
		ttype188837* prev;
		TNimObject* LOC697;
		LOC697 = 0;
		LOC697 = idtableget_197137((*c).Bindings, &f->Sup);
		prev = ((ttype188837*) (LOC697));
		{
			if (!(prev == NIM_NIL)) goto LA700;
			{
				if (!!(((*a).Kind == ((NU8) 8)))) goto LA704;
				result = ((NU8) 0);
				goto BeforeRet;
			}
			LA704: ;
			{
				ttype188837* LOC708;
				LOC708 = 0;
				LOC708 = base_223029(f);
				if (!((*LOC708).Kind == ((NU8) 0))) goto LA709;
				result = ((NU8) 7);
			}
			goto LA706;
			LA709: ;
			{
				ttype188837* LOC712;
				ttype188837* LOC713;
				LOC712 = 0;
				LOC712 = base_223029(f);
				LOC713 = 0;
				LOC713 = base_223029(a);
				result = typerel_346174(c, LOC712, LOC713, NIM_TRUE);
			}
			LA706: ;
			{
				if (!!((result == ((NU8) 0)))) goto LA716;
				put_345266(&(*c).Bindings, f, a);
			}
			LA716: ;
		}
		goto LA698;
		LA700: ;
		{
			{
				ttype188837* LOC723;
				if (!(((*f).Flags &(1<<((((NU8) 9))&31)))!=0)) goto LA721;
				LOC723 = 0;
				LOC723 = base_223029(prev);
				result = typerel_346174(c, LOC723, a, NIM_TRUE);
			}
			goto LA719;
			LA721: ;
			{
				ttype188837* LOC727;
				ttype188837* LOC728;
				if (!((*a).Kind == ((NU8) 8))) goto LA725;
				LOC727 = 0;
				LOC727 = base_223029(prev);
				LOC728 = 0;
				LOC728 = base_223029(a);
				result = typerel_346174(c, LOC727, LOC728, NIM_TRUE);
			}
			goto LA719;
			LA725: ;
			{
				result = ((NU8) 0);
			}
			LA719: ;
		}
		LA698: ;
	}
	break;
	case ((NU8) 49):
	{
		{
			NIM_BOOL LOC733;
			NIM_BOOL LOC735;
			ttype188837* LOC739;
			ttype188837* LOC740;
			LOC733 = 0;
			LOC733 = ((*a).Kind == ((NU8) 49));
			if (LOC733) goto LA734;
			LOC735 = 0;
			LOC735 = ((*a).Kind == ((NU8) 25));
			if (!(LOC735)) goto LA736;
			LOC735 = (((*a).Flags &(1<<((((NU8) 14))&31)))!=0);
			LA736: ;
			LOC733 = LOC735;
			LA734: ;
			if (!LOC733) goto LA737;
			LOC739 = 0;
			LOC739 = base_223029(f);
			LOC740 = 0;
			LOC740 = base_223029(a);
			result = typerel_346174(c, LOC739, LOC740, NIM_TRUE);
		}
		goto LA731;
		LA737: ;
		{
			result = ((NU8) 0);
		}
		LA731: ;
	}
	break;
	case ((NU8) 7):
	{
		result = ((NU8) 7);
	}
	break;
	case ((NU8) 50):
	{
		result = ((NU8) 9);
	}
	break;
	case ((NU8) 60):
	{
		tnode188803* instantiated;
		tnode188803* reevaluted;
		instantiated = replacetypesinbody_275725((*c).C, (*c).Bindings, (*f).N);
		reevaluted = (*(*c).C).Semexpr((*c).C, instantiated, 0);
		switch ((*(*reevaluted).Typ).Kind) {
		case ((NU8) 8):
		{
			ttype188837* LOC746;
			LOC746 = 0;
			LOC746 = base_223029((*reevaluted).Typ);
			result = typerel_346174(c, a, LOC746, NIM_TRUE);
		}
		break;
		case ((NU8) 59):
		{
			ttype188837* LOC748;
			LOC748 = 0;
			LOC748 = base_223029((*reevaluted).Typ);
			result = typerel_346174(c, a, LOC748, NIM_TRUE);
			{
				NIM_BOOL LOC751;
				LOC751 = 0;
				LOC751 = !((result == ((NU8) 0)));
				if (!(LOC751)) goto LA752;
				LOC751 = !(((*(*reevaluted).Typ).N == NIM_NIL));
				LA752: ;
				if (!LOC751) goto LA753;
				{
					NIM_BOOL LOC757;
					LOC757 = 0;
					LOC757 = exprstructuralequivalent_221150((*aorig).N, (*(*reevaluted).Typ).N);
					if (!!(LOC757)) goto LA758;
					result = ((NU8) 0);
				}
				LA758: ;
			}
			LA753: ;
		}
		break;
		default:
		{
			localerror_165571((*(*f).N).Info, ((NU16) 63), ((NimStringDesc*) &TMP2550));
			result = ((NU8) 0);
		}
		break;
		}
	}
	break;
	default:
	{
		{
			NimStringDesc* LOC766;
			if (!NIM_TRUE) goto LA764;
			LOC766 = 0;
			LOC766 = HEX24_165714(TMP2551);
			internalerror_165606(LOC766);
		}
		LA764: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(ttype188837*, getinstantiatedtype_350578)(tcontext250019* c, tnode188803* arg, tcandidate345205* m, ttype188837* f) {
	ttype188837* result;
	TNimObject* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = idtableget_197137((*m).Bindings, &f->Sup);
	result = ((ttype188837*) (LOC1));
	{
		if (!(result == NIM_NIL)) goto LA4;
		result = generatetypeinstance_275735(c, (*m).Bindings, (*arg).Info, f);
	}
	LA4: ;
	{
		if (!(result == NIM_NIL)) goto LA8;
		internalerror_165591((*arg).Info, ((NimStringDesc*) &TMP2552));
		result = errortype_251136(c);
	}
	LA8: ;
	return result;
}

N_NIMCALL(tnode188803*, implicitconv_350621)(NU8 kind, ttype188837* f, tnode188803* arg, tcandidate345205* m, tcontext250019* c) {
	tnode188803* result;
	result = 0;
	result = newnodei_189099(kind, (*arg).Info);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = containsgenerictype_232717(f);
		if (!LOC3) goto LA4;
		{
			if (!!((*m).Proxymatch)) goto LA8;
			asgnRefNoCycle((void**) &(*result).Typ, getinstantiatedtype_350578(c, arg, m, f));
		}
		goto LA6;
		LA8: ;
		{
			asgnRefNoCycle((void**) &(*result).Typ, errortype_251136(c));
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		asgnRefNoCycle((void**) &(*result).Typ, f);
	}
	LA1: ;
	{
		if (!((*result).Typ == NIM_NIL)) goto LA14;
		internalerror_165591((*arg).Info, ((NimStringDesc*) &TMP2553));
	}
	LA14: ;
	addson_189207(result, emptynode_189727);
	addson_189207(result, arg);
	return result;
}

N_NIMCALL(NIM_BOOL, istracked_360266)(tlineinfo163527 current, NI tokenlen) {
	NIM_BOOL result;
	NI i_360283;
	NI HEX3Atmp_360285;
	NI res_360287;
	result = 0;
	i_360283 = 0;
	HEX3Atmp_360285 = 0;
	HEX3Atmp_360285 = (checkpoints_164868->Sup.len-1);
	res_360287 = 0;
	while (1) {
		if (!(res_360287 <= HEX3Atmp_360285)) goto LA1;
		i_360283 = res_360287;
		{
			if (!(current.Fileindex == checkpoints_164868->data[i_360283].Fileindex)) goto LA4;
			{
				NI16 col;
				if (!(current.Line == checkpoints_164868->data[i_360283].Line)) goto LA8;
				col = checkpoints_164868->data[i_360283].Col;
				{
					NIM_BOOL LOC12;
					LOC12 = 0;
					LOC12 = (current.Col <= col);
					if (!(LOC12)) goto LA13;
					LOC12 = (((NI) (col)) <= (NI32)((NI32)(((NI) (current.Col)) + tokenlen) - 1));
					LA13: ;
					if (!LOC12) goto LA14;
					result = NIM_TRUE;
					goto BeforeRet;
				}
				LA14: ;
			}
			LA8: ;
		}
		LA4: ;
		res_360287 += 1;
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, findusages_360481)(tnode188803* node, tsym188833* s) {
	{
		NIM_BOOL LOC3;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = (usagesym_360479 == NIM_NIL);
		if (!(LOC3)) goto LA4;
		LOC3 = istracked_360266((*node).Info, (*(*s).Name).S->Sup.len);
		LA4: ;
		if (!LOC3) goto LA5;
		asgnRefNoCycle((void**) &usagesym_360479, s);
		LOC7 = 0;
		LOC7 = symtostr_357202(s, NIM_FALSE, ((NimStringDesc*) &TMP2556));
		suggestwriteln_164242(LOC7);
	}
	goto LA1;
	LA5: ;
	{
		if (!(s == usagesym_360479)) goto LA9;
		{
			NIM_BOOL LOC13;
			NimStringDesc* LOC16;
			LOC13 = 0;
			LOC13 = HEX3DHEX3D_165246(lastlineinfo_360480, (*node).Info);
			if (!!(LOC13)) goto LA14;
			LOC16 = 0;
			LOC16 = symtostr_357011(s, NIM_FALSE, ((NimStringDesc*) &TMP2556), (*node).Info);
			suggestwriteln_164242(LOC16);
		}
		LA14: ;
		lastlineinfo_360480 = (*node).Info;
	}
	goto LA1;
	LA9: ;
	LA1: ;
}

N_NIMCALL(void, finddefinition_360519)(tnode188803* node, tsym188833* s) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = node == 0;
		if (LOC3) goto LA4;
		LOC3 = s == 0;
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	{
		NIM_BOOL LOC9;
		NimStringDesc* LOC12;
		LOC9 = 0;
		LOC9 = istracked_360266((*node).Info, (*(*s).Name).S->Sup.len);
		if (!LOC9) goto LA10;
		LOC12 = 0;
		LOC12 = symtostr_357202(s, NIM_FALSE, ((NimStringDesc*) &TMP2557));
		suggestwriteln_164242(LOC12);
		suggestquit_164626();
	}
	LA10: ;
	BeforeRet: ;
}

N_NIMCALL(void, ensureseq_360683)(TY360552** x_360691) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_360697((*x_360691), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_360691), (TY360552*) newSeq((&NTI360552), 0));
	}
	LA4: ;
}

N_NIMCALL(void, ensureidx_360993)(TY360552** x_360999, NI y_361002) {
	{
		if (!((*x_360999)->Sup.len <= y_361002)) goto LA3;
		(*x_360999) = (TY360552*) setLengthSeq(&((*x_360999))->Sup, sizeof(tlinemap360551), (NI32)(y_361002 + 1));
	}
	LA3: ;
}

N_NIMCALL(void, ensureseq_361035)(TY360556** x_361043) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_360821((*x_361043), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_361043), (TY360556*) newSeq((&NTI360556), 0));
	}
	LA4: ;
}

N_NIMCALL(void, addtosourcemap_360663)(tsym188833* sym, tlineinfo163527 info) {
	tentry360549 LOC1;
	ensureidx_360603(&gsourcemaps_360579, ((NI) (info.Fileindex)));
	ensureseq_360683(&gsourcemaps_360579->data[info.Fileindex].Lines);
	ensureidx_360993(&gsourcemaps_360579->data[info.Fileindex].Lines, ((NI) (info.Line)));
	ensureseq_361035(&gsourcemaps_360579->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_360579->data[info.Fileindex].Lines->data[info.Line].Entries = (TY360556*) incrSeq(&(gsourcemaps_360579->data[info.Fileindex].Lines->data[info.Line].Entries)->Sup, sizeof(tentry360549));
	gsourcemaps_360579->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_360579->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Pos = LOC1.Pos;
	asgnRefNoCycle((void**) &gsourcemaps_360579->data[info.Fileindex].Lines->data[info.Line].Entries->data[gsourcemaps_360579->data[info.Fileindex].Lines->data[info.Line].Entries->Sup.len-1].Sym, LOC1.Sym);
}

static N_INLINE(void, suggestsym_362857)(tnode188803* n, tsym188833* s) {
	{
		if (!((gglobaloptions_137111 &(1<<((((NU8) 26))&31)))!=0)) goto LA3;
		findusages_360481(n, s);
	}
	LA3: ;
	{
		if (!((gglobaloptions_137111 &(1<<((((NU8) 25))&31)))!=0)) goto LA7;
		finddefinition_360519(n, s);
	}
	LA7: ;
	{
		if (!isserving_137126) goto LA11;
		addtosourcemap_360663(s, (*n).Info);
	}
	LA11: ;
}

N_NIMCALL(void, markused_345244)(tnode188803* n, tsym188833* 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_165584((*n).Info, ((NU16) 234), (*(*s).Name).S);
		}
		LA7: ;
		{
			if (!(((*s).Flags &(1<<((((NU8) 20))&31)))!=0)) goto LA11;
			localerror_165571((*n).Info, ((NU16) 221), (*(*s).Name).S);
		}
		LA11: ;
	}
	LA3: ;
	suggestsym_362857(n, s);
	{
		if (!(gcmd_137113 == ((NU8) 7))) goto LA15;
		checkuse_355729(n, s);
	}
	LA15: ;
}

N_NIMCALL(tnode188803*, userconvmatch_350648)(tcontext250019* c, tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg) {
	tnode188803* result;
	NI i_350680;
	NI HEX3Atmp_350741;
	NI res_350743;
	result = 0;
	result = NIM_NIL;
	i_350680 = 0;
	HEX3Atmp_350741 = 0;
	HEX3Atmp_350741 = (NI32)((*c).Converters->Sup.len - 1);
	res_350743 = 0;
	while (1) {
		if (!(res_350743 <= HEX3Atmp_350741)) goto LA1;
		i_350680 = res_350743;
		{
			ttype188837* src;
			ttype188837* dest;
			NU8 srca;
			NIM_BOOL destisgeneric;
			NU8 fdest;
			src = (*(*(*c).Converters->data[i_350680]).Typ).Sons->data[1];
			dest = (*(*(*c).Converters->data[i_350680]).Typ).Sons->data[0];
			srca = typerel_346174(m, src, a, NIM_TRUE);
			{
				if (!!(((640 &(1<<((srca)&15)))!=0))) goto LA5;
				goto LA2;
			}
			LA5: ;
			destisgeneric = containsgenerictype_232717(dest);
			{
				if (!destisgeneric) goto LA9;
				dest = generatetypeinstance_275735(c, (*m).Bindings, (*arg).Info, dest);
			}
			LA9: ;
			fdest = typerel_346174(m, f, dest, NIM_TRUE);
			{
				tnode188803* s;
				tnode188803* LOC15;
				NIM_BOOL LOC16;
				if (!((640 &(1<<((fdest)&15)))!=0)) goto LA13;
				markused_345244(arg, (*c).Converters->data[i_350680]);
				s = newsymnode_189095((*c).Converters->data[i_350680]);
				asgnRefNoCycle((void**) &(*s).Typ, (*(*c).Converters->data[i_350680]).Typ);
				(*s).Info = (*arg).Info;
				result = newnodeit_189104(((NU8) 32), (*arg).Info, dest);
				addson_189207(result, s);
				LOC15 = 0;
				LOC15 = copytree_189237(arg);
				addson_189207(result, LOC15);
				(*m).Convmatches += 1;
				LOC16 = 0;
				LOC16 = (srca == ((NU8) 7));
				if (LOC16) goto LA17;
				LOC16 = destisgeneric;
				LA17: ;
				(*m).Genericconverter = LOC16;
				goto BeforeRet;
			}
			LA13: ;
		} LA2: ;
		res_350743 += 1;
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, localconvmatch_350749)(tcontext250019* c, tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg) {
	tnode188803* result;
	tnode188803* call;
	tnode188803* LOC5;
	tnode188803* LOC6;
	result = 0;
	{
		if (!(*arg).Typ == 0) goto LA3;
		result = NIM_NIL;
		goto BeforeRet;
	}
	LA3: ;
	call = newnodei_189099(((NU8) 27), (*arg).Info);
	LOC5 = 0;
	LOC5 = copytree_189237((*f).N);
	add_189390(call, LOC5);
	LOC6 = 0;
	LOC6 = copytree_189237(arg);
	add_189390(call, LOC6);
	result = (*c).Semoverloadedcall(c, call, call, 520192);
	{
		NU8 r;
		if (!!((result == NIM_NIL))) goto LA9;
		r = typerel_346174(m, (*f).Sons->data[0], (*result).Typ, NIM_TRUE);
		{
			if (!(r < ((NU8) 7))) goto LA13;
			result = NIM_NIL;
			goto BeforeRet;
		}
		LA13: ;
		{
			if (!((*result).Kind == ((NU8) 27))) goto LA17;
			(*result).Kind = ((NU8) 32);
		}
		LA17: ;
		(*m).Convmatches += 1;
		{
			ttype188837* LOC23;
			if (!(r == ((NU8) 7))) goto LA21;
			LOC23 = 0;
			LOC23 = base_223029(f);
			asgnRefNoCycle((void**) &(*result).Typ, getinstantiatedtype_350578(c, arg, &(*m), LOC23));
		}
		LA21: ;
		(*m).Basetypematch = NIM_TRUE;
	}
	LA9: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tnode188803*, paramtypesmatchaux_350867)(tcandidate345205* m, ttype188837* f, ttype188837* argtype_350872, tnode188803* argsemantized, tnode188803* argorig) {
	tnode188803* result;
	ttype188837* fmaybestatic;
	tnode188803* arg;
	ttype188837* argtype;
	tcontext250019* c;
	ttype188837* a;
	NU8 r;
	result = 0;
	fmaybestatic = skiptypes_192793(f, 8192);
	arg = argsemantized;
	argtype = argtype_350872;
	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_189152(argtype, f);
			result = argsemantized;
			goto BeforeRet;
		}
		LA9: ;
		{
			if (!((*argtype).Kind == ((NU8) 59))) goto LA13;
			{
				if (!((*(*m).Callee).Kind == ((NU8) 10))) goto LA17;
				result = newnodei_189099(((NU8) 4), (*argorig).Info);
				asgnRefNoCycle((void**) &(*result).Typ, maketypefromexpr_250668(c, arg));
				goto BeforeRet;
			}
			LA17: ;
		}
		goto LA11;
		LA13: ;
		{
			tnode188803* evaluated;
			evaluated = (*c).Semtryconstexpr(c, arg);
			{
				TY350968 LOC24;
				if (!!((evaluated == NIM_NIL))) goto LA22;
				asgnRefNoCycle((void**) &(*arg).Typ, newtypes_250180(((NU8) 59), c));
				if ((*(*arg).Typ).Sons) nimGCunrefNoCycle((*(*arg).Typ).Sons);
				(*(*arg).Typ).Sons = (ttypeseq188835*) newSeqRC1((&NTI188835), 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_192793(argtype, IL64(2305843009213694208));
	}
	goto LA25;
	LA27: ;
	{
		a = argtype;
	}
	LA25: ;
	r = typerel_346174(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;
		}
		{
			NIM_BOOL LOC47;
			LOC47 = 0;
			LOC47 = ((*f).Kind == ((NU8) 7));
			if (!(LOC47)) goto LA48;
			LOC47 = ((*argorig).Kind == ((NU8) 52));
			LA48: ;
			if (!LOC47) goto LA49;
			result = HEX5BHEX5D_189694(argorig, 6);
			goto BeforeRet;
		}
		goto LA45;
		LA49: ;
		{
			if (!((*f).Kind == ((NU8) 8))) goto LA52;
			result = arg;
			goto BeforeRet;
		}
		goto LA45;
		LA52: ;
		{
			if (!((*f).Kind == ((NU8) 59))) goto LA55;
			result = (*(*arg).Typ).N;
			goto BeforeRet;
		}
		goto LA45;
		LA55: ;
		{
			result = argorig;
			goto BeforeRet;
		}
		LA45: ;
	}
	LA36: ;
	{
		NIM_BOOL LOC60;
		ttype188837* inlined;
		TY350968 LOC64;
		LOC60 = 0;
		LOC60 = !((r == ((NU8) 0)));
		if (!(LOC60)) goto LA61;
		LOC60 = isinlineiterator_350834(f);
		LA61: ;
		if (!LOC60) goto LA62;
		inlined = newtypes_250180(((NU8) 59), c);
		if ((*inlined).Sons) nimGCunrefNoCycle((*inlined).Sons);
		(*inlined).Sons = (ttypeseq188835*) newSeqRC1((&NTI188835), 1);
		memset((void*)LOC64, 0, sizeof(LOC64));
		LOC64[0] = argtype;
		asgnRefNoCycle((void**) &(*inlined).Sons->data[0], LOC64[0]);
		asgnRefNoCycle((void**) &(*inlined).N, argsemantized);
		put_345266(&(*m).Bindings, f, inlined);
		result = argsemantized;
		goto BeforeRet;
	}
	LA62: ;
	switch (r) {
	case ((NU8) 1):
	{
		tnode188803* LOC66;
		(*m).Convmatches += 1;
		LOC66 = 0;
		LOC66 = copytree_189237(arg);
		result = implicitconv_350621(((NU8) 58), f, LOC66, &(*m), c);
	}
	break;
	case ((NU8) 2):
	{
		tnode188803* LOC68;
		(*m).Intconvmatches += 1;
		LOC68 = 0;
		LOC68 = copytree_189237(arg);
		result = implicitconv_350621(((NU8) 58), f, LOC68, &(*m), c);
	}
	break;
	case ((NU8) 3):
	{
		tnode188803* LOC70;
		(*m).Subtypematches += 1;
		LOC70 = 0;
		LOC70 = copytree_189237(arg);
		result = implicitconv_350621(((NU8) 59), f, LOC70, &(*m), c);
	}
	break;
	case ((NU8) 4):
	{
		tnode188803* LOC72;
		(*m).Subtypematches += 1;
		LOC72 = 0;
		LOC72 = copytree_189237(arg);
		result = implicitconv_350621(((NU8) 58), f, LOC72, &(*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 LA76;
			result = (*c).Seminferredlambda.ClEnv? (*c).Seminferredlambda.ClPrc(c, (*m).Bindings, arg, (*c).Seminferredlambda.ClEnv):((TMP2554)((*c).Seminferredlambda.ClPrc))(c, (*m).Bindings, arg);
		}
		goto LA74;
		LA76: ;
		{
			tsym188833* inferred;
			inferred = (*c).Semgenerateinstance.ClEnv? (*c).Semgenerateinstance.ClPrc(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info, (*c).Semgenerateinstance.ClEnv):((TMP2555)((*c).Semgenerateinstance.ClPrc))(c, (*arg).kindU.S4.Sym, (*m).Bindings, (*arg).Info);
			result = newsymnode_190723(inferred, (*arg).Info);
		}
		LA74: ;
		{
			if (!(r == ((NU8) 6))) goto LA81;
			(*m).Convmatches += 1;
			result = implicitconv_350621(((NU8) 58), f, result, &(*m), c);
		}
		LA81: ;
	}
	break;
	case ((NU8) 7):
	{
		(*m).Genericmatches += 1;
		result = copytree_189237(arg);
		asgnRefNoCycle((void**) &(*result).Typ, getinstantiatedtype_350578(c, arg, &(*m), f));
		{
			ttype188837* LOC86;
			tnode188803* LOC89;
			LOC86 = 0;
			LOC86 = skiptypes_192793((*result).Typ, IL64(211106240964608));
			if (!((*LOC86).Kind == ((NU8) 18))) goto LA87;
			LOC89 = 0;
			LOC89 = copytree_189237(arg);
			result = implicitconv_350621(((NU8) 58), f, LOC89, &(*m), c);
		}
		LA87: ;
	}
	break;
	case ((NU8) 8):
	{
		tnode188803* LOC91;
		(*m).Intconvmatches += 256;
		LOC91 = 0;
		LOC91 = copytree_189237(arg);
		result = implicitconv_350621(((NU8) 58), f, LOC91, &(*m), c);
	}
	break;
	case ((NU8) 9):
	{
		(*m).Exactmatches += 1;
		result = copytree_189237(arg);
		{
			ttype188837* LOC95;
			tnode188803* LOC98;
			LOC95 = 0;
			LOC95 = skiptypes_192793(f, IL64(211106240964608));
			if (!((*LOC95).Kind == ((NU8) 18))) goto LA96;
			LOC98 = 0;
			LOC98 = copytree_189237(arg);
			result = implicitconv_350621(((NU8) 58), f, LOC98, &(*m), c);
		}
		LA96: ;
	}
	break;
	case ((NU8) 0):
	{
		{
			if (!((*a).Kind == ((NU8) 50))) goto LA102;
			(*m).Genericmatches += 1;
			(*m).Proxymatch = NIM_TRUE;
			result = copytree_189237(arg);
			goto BeforeRet;
		}
		LA102: ;
		result = userconvmatch_350648(c, m, f, a, arg);
		{
			NIM_BOOL LOC106;
			LOC106 = 0;
			LOC106 = (result == NIM_NIL);
			if (!(LOC106)) goto LA107;
			LOC106 = ((*f).Kind == ((NU8) 48));
			LA107: ;
			if (!LOC106) goto LA108;
			{
				if (!!(((*f).N == NIM_NIL))) goto LA112;
				result = localconvmatch_350749(c, m, f, a, arg);
			}
			goto LA110;
			LA112: ;
			{
				ttype188837* LOC115;
				LOC115 = 0;
				LOC115 = base_223029(f);
				r = typerel_346174(m, LOC115, a, NIM_TRUE);
				{
					if (!(((NU8) 7) <= r)) goto LA118;
					(*m).Convmatches += 1;
					result = copytree_189237(arg);
					{
						ttype188837* LOC124;
						if (!(r == ((NU8) 7))) goto LA122;
						LOC124 = 0;
						LOC124 = base_223029(f);
						asgnRefNoCycle((void**) &(*result).Typ, getinstantiatedtype_350578(c, arg, &(*m), LOC124));
					}
					LA122: ;
					(*m).Basetypematch = NIM_TRUE;
				}
				goto LA116;
				LA118: ;
				{
					ttype188837* LOC126;
					LOC126 = 0;
					LOC126 = base_223029(f);
					result = userconvmatch_350648(c, m, LOC126, a, arg);
				}
				LA116: ;
			}
			LA110: ;
		}
		LA108: ;
	}
	break;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, copycandidate_345627)(tcandidate345205* a, tcandidate345205* 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_189237((*b).Call));
	(*a).Basetypematch = (*b).Basetypematch;
	copyidtable_189175(&(*a).Bindings, (*b).Bindings);
}

N_NIMCALL(NI, sumgeneric_345635)(ttype188837* t_345637) {
	NI result;
	ttype188837* t;
	result = 0;
	t = t_345637;
	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_189193(t);
			result += 1;
		}
		break;
		case ((NU8) 23):
		{
			t = (*t).Sons->data[0];
		}
		break;
		case ((NU8) 9):
		case ((NU8) 18):
		{
			NI i_345694;
			NI HEX3Atmp_345707;
			NI LOC5;
			NI res_345709;
			result = ((NI) (((*t).Kind == ((NU8) 9))));
			i_345694 = 0;
			HEX3Atmp_345707 = 0;
			LOC5 = 0;
			LOC5 = len_192569(t);
			HEX3Atmp_345707 = LOC5 - 1;
			res_345709 = 0;
			while (1) {
				NI LOC7;
				if (!(res_345709 <= HEX3Atmp_345707)) goto LA6;
				i_345694 = res_345709;
				LOC7 = 0;
				LOC7 = sumgeneric_345635((*t).Sons->data[i_345694]);
				result += LOC7;
				res_345709 += 1;
			} LA6: ;
			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_345715)(ttype188837* a, ttype188837* b) {
	NI result;
	NI x;
	NI y;
	NI i_345743;
	NI HEX3Atmp_345803;
	NI LOC1;
	NI res_345805;
	NI i_345777;
	NI HEX3Atmp_345807;
	NI LOC4;
	NI res_345809;
	result = 0;
	x = 0;
	y = 0;
	i_345743 = 0;
	HEX3Atmp_345803 = 0;
	LOC1 = 0;
	LOC1 = len_192569(a);
	HEX3Atmp_345803 = LOC1 - 1;
	res_345805 = 1;
	while (1) {
		NI LOC3;
		if (!(res_345805 <= HEX3Atmp_345803)) goto LA2;
		i_345743 = res_345805;
		LOC3 = 0;
		LOC3 = sumgeneric_345635((*a).Sons->data[i_345743]);
		x += LOC3;
		res_345805 += 1;
	} LA2: ;
	i_345777 = 0;
	HEX3Atmp_345807 = 0;
	LOC4 = 0;
	LOC4 = len_192569(b);
	HEX3Atmp_345807 = LOC4 - 1;
	res_345809 = 1;
	while (1) {
		NI LOC6;
		if (!(res_345809 <= HEX3Atmp_345807)) goto LA5;
		i_345777 = res_345809;
		LOC6 = 0;
		LOC6 = sumgeneric_345635((*b).Sons->data[i_345777]);
		y += LOC6;
		res_345809 += 1;
	} LA5: ;
	result = (NI32)(x - y);
	return result;
}

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

N_NIMCALL(tnode188803*, paramtypesmatch_351560)(tcandidate345205* m, ttype188837* f, ttype188837* a, tnode188803* arg, tnode188803* argorig) {
	tnode188803* 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_350867(m, f, a, arg, argorig);
	}
	goto LA1;
	LA5: ;
	{
		tcontext250019* c;
		tcandidate345205 x;
		tcandidate345205 y;
		tcandidate345205 z;
		NI best;
		NI i_351619;
		NI HEX3Atmp_351793;
		NI LOC8;
		NI res_351795;
		c = (*m).C;
		memset((void*)&x, 0, sizeof(x));
		memset((void*)&y, 0, sizeof(y));
		memset((void*)&z, 0, sizeof(z));
		initcandidate_345257(c, &x, (*m).Callee);
		initcandidate_345257(c, &y, (*m).Callee);
		initcandidate_345257(c, &z, (*m).Callee);
		x.Calleesym = (*m).Calleesym;
		y.Calleesym = (*m).Calleesym;
		z.Calleesym = (*m).Calleesym;
		best = -1;
		i_351619 = 0;
		HEX3Atmp_351793 = 0;
		LOC8 = 0;
		LOC8 = sonslen_189181(arg);
		HEX3Atmp_351793 = (NI32)(LOC8 - 1);
		res_351795 = 0;
		while (1) {
			if (!(res_351795 <= HEX3Atmp_351793)) goto LA9;
			i_351619 = res_351795;
			{
				NU8 r;
				if (!((126976 &(1<<(((*(*(*arg).kindU.S6.Sons->data[i_351619]).kindU.S4.Sym).Kind)&31)))!=0)) goto LA12;
				copycandidate_345627(&z, &(*m));
				r = typerel_346174(&z, f, (*(*arg).kindU.S6.Sons->data[i_351619]).Typ, NIM_TRUE);
				{
					if (!!((r == ((NU8) 0)))) goto LA16;
					switch (x.State) {
					case ((NU8) 0):
					case ((NU8) 2):
					{
						genericAssign((void*)&x, (void*)&z, (&NTI345205));
						best = i_351619;
						x.State = ((NU8) 1);
					}
					break;
					case ((NU8) 1):
					{
						NI cmp;
						cmp = cmpcandidates_345815(&x, &z);
						{
							if (!(cmp < 0)) goto LA22;
							best = i_351619;
							genericAssign((void*)&x, (void*)&z, (&NTI345205));
						}
						goto LA20;
						LA22: ;
						{
							if (!(cmp == 0)) goto LA25;
							genericAssign((void*)&y, (void*)&z, (&NTI345205));
						}
						goto LA20;
						LA25: ;
						LA20: ;
					}
					break;
					}
				}
				LA16: ;
			}
			LA12: ;
			res_351795 += 1;
		} LA9: ;
		{
			if (!(x.State == ((NU8) 0))) goto LA29;
			result = NIM_NIL;
		}
		goto LA27;
		LA29: ;
		{
			NIM_BOOL LOC32;
			NI LOC34;
			LOC32 = 0;
			LOC32 = (y.State == ((NU8) 1));
			if (!(LOC32)) goto LA33;
			LOC34 = 0;
			LOC34 = cmpcandidates_345815(&x, &y);
			LOC32 = (LOC34 == 0);
			LA33: ;
			if (!LOC32) goto LA35;
			{
				if (!!((x.State == ((NU8) 1)))) goto LA39;
				internalerror_165591((*arg).Info, ((NimStringDesc*) &TMP2564));
			}
			LA39: ;
			result = NIM_NIL;
		}
		goto LA27;
		LA35: ;
		{
			markused_345244(arg, (*(*arg).kindU.S6.Sons->data[best]).kindU.S4.Sym);
			result = paramtypesmatchaux_350867(m, f, (*(*arg).kindU.S6.Sons->data[best]).Typ, (*arg).kindU.S6.Sons->data[best], argorig);
		}
		LA27: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NIM_BOOL, argtypematches_353662)(tcontext250019* c, ttype188837* f, ttype188837* a) {
	NIM_BOOL result;
	tcandidate345205 m;
	tnode188803* res;
	result = 0;
	memset((void*)&m, 0, sizeof(m));
	initcandidate_345257(c, &m, f);
	res = paramtypesmatch_351560(&m, f, a, emptynode_189727, NIM_NIL);
	result = !((res == NIM_NIL));
	return result;
}

static N_INLINE(NIM_BOOL, typefits_359437)(tcontext250019* c, tsym188833* s, ttype188837* 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_189185((*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_353662(c, (*(*s).Typ).Sons->data[1], firstarg);
	}
	LA8: ;
	return result;
}

N_NIMCALL(void, suggestoperations_359479)(tcontext250019* c, tnode188803* n, ttype188837* typ, NI* outputs) {
	NIM_BOOL islocal_359602;
	tscope188827* scope_359604;
	tscope188827* HEX3Atmp_359746;
	tscope188827* current_359748;
	islocal_359602 = NIM_TRUE;
	scope_359604 = 0;
	HEX3Atmp_359746 = 0;
	HEX3Atmp_359746 = (*c).Currentscope;
	current_359748 = HEX3Atmp_359746;
	while (1) {
		tsymseq188805* entries_359606;
		tsymseq188805* result_359626;
		tsym188833* x_359628;
		tstrtable188807 HEX3Atmp_359737;
		ttabiter197090 it_359739;
		tsym188833* s_359741;
		TY357801 LOC7;
		tsym188833* item_359608;
		NI i_359743;
		NI l_359745;
		if (!!((current_359748 == NIM_NIL))) goto LA1;
		scope_359604 = current_359748;
		{
			if (!(scope_359604 == (*c).Toplevelscope)) goto LA4;
			islocal_359602 = NIM_FALSE;
		}
		LA4: ;
		result_359626 = (tsymseq188805*) newSeq((&NTI188805), 0);
		x_359628 = 0;
		memset((void*)&HEX3Atmp_359737, 0, sizeof(HEX3Atmp_359737));
		HEX3Atmp_359737.Counter = (*scope_359604).Symbols.Counter;
		HEX3Atmp_359737.Data = (*scope_359604).Symbols.Data;
		memset((void*)&it_359739, 0, sizeof(it_359739));
		s_359741 = inittabiter_197093(&it_359739, HEX3Atmp_359737);
		while (1) {
			if (!!((s_359741 == NIM_NIL))) goto LA6;
			x_359628 = s_359741;
			result_359626 = (tsymseq188805*) incrSeq(&(result_359626)->Sup, sizeof(tsym188833*));
			asgnRefNoCycle((void**) &result_359626->data[result_359626->Sup.len-1], x_359628);
			s_359741 = nextiter_197099(&it_359739, HEX3Atmp_359737);
		} LA6: ;
		genericSeqAssign(&entries_359606, result_359626, (&NTI188805));
		memset((void*)&LOC7, 0, sizeof(LOC7));
		LOC7.ClPrc = ((TMP2495) (HEX3Aanonymous_359670)); LOC7.ClEnv = NIM_NIL;
		sort_357782(entries_359606->data, entries_359606->Sup.len, LOC7, ((NU8) 1));
		item_359608 = 0;
		i_359743 = 0;
		l_359745 = entries_359606->Sup.len;
		while (1) {
			tsym188833* it;
			if (!(i_359743 < l_359745)) goto LA8;
			item_359608 = entries_359606->data[i_359743];
			it = item_359608;
			{
				NIM_BOOL LOC11;
				NimStringDesc* LOC15;
				LOC11 = 0;
				LOC11 = filtersym_357209(it);
				if (!(LOC11)) goto LA12;
				LOC11 = typefits_359437(c, it, typ);
				LA12: ;
				if (!LOC11) goto LA13;
				LOC15 = 0;
				LOC15 = symtostr_357202(it, islocal_359602, ((NimStringDesc*) &TMP2492));
				suggestwriteln_164242(LOC15);
				(*outputs) += 1;
			}
			LA13: ;
			i_359743 += 1;
		} LA8: ;
		current_359748 = (*current_359748).Parent;
	} LA1: ;
}

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

N_NIMCALL(void, suggestobject_357492)(tcontext250019* c, tnode188803* n, NI* outputs) {
	switch ((*n).Kind) {
	case ((NU8) 136):
	{
		NI i_357510;
		NI HEX3Atmp_357582;
		NI LOC2;
		NI res_357584;
		i_357510 = 0;
		HEX3Atmp_357582 = 0;
		LOC2 = 0;
		LOC2 = sonslen_189181(n);
		HEX3Atmp_357582 = (NI32)(LOC2 - 1);
		res_357584 = 0;
		while (1) {
			if (!(res_357584 <= HEX3Atmp_357582)) goto LA3;
			i_357510 = res_357584;
			suggestobject_357492(c, (*n).kindU.S6.Sons->data[i_357510], outputs);
			res_357584 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 137):
	{
		NI l;
		l = sonslen_189181(n);
		{
			NI i_357553;
			NI HEX3Atmp_357586;
			NI res_357588;
			if (!(0 < l)) goto LA7;
			suggestobject_357492(c, (*n).kindU.S6.Sons->data[0], outputs);
			i_357553 = 0;
			HEX3Atmp_357586 = 0;
			HEX3Atmp_357586 = (NI32)(l - 1);
			res_357588 = 1;
			while (1) {
				tnode188803* LOC10;
				if (!(res_357588 <= HEX3Atmp_357586)) goto LA9;
				i_357553 = res_357588;
				LOC10 = 0;
				LOC10 = lastson_189189((*n).kindU.S6.Sons->data[i_357553]);
				suggestobject_357492(c, LOC10, outputs);
				res_357588 += 1;
			} LA9: ;
		}
		LA7: ;
	}
	break;
	case ((NU8) 3):
	{
		suggestfield_357256(c, (*n).kindU.S4.Sym, outputs);
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(void, suggestfieldaccess_359821)(tcontext250019* c, tnode188803* n, NI* outputs) {
	ttype188837* 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;
			{
				tsym188833* it_359907;
				tstrtable188807 HEX3Atmp_360083;
				ttabiter197090 it_360085;
				tsym188833* s_360087;
				if (!((*n).kindU.S4.Sym == (*c).Module)) goto LA13;
				it_359907 = 0;
				memset((void*)&HEX3Atmp_360083, 0, sizeof(HEX3Atmp_360083));
				HEX3Atmp_360083.Counter = (*(*c).Toplevelscope).Symbols.Counter;
				HEX3Atmp_360083.Data = (*(*c).Toplevelscope).Symbols.Data;
				memset((void*)&it_360085, 0, sizeof(it_360085));
				s_360087 = inittabiter_197093(&it_360085, HEX3Atmp_360083);
				while (1) {
					if (!!((s_360087 == NIM_NIL))) goto LA15;
					it_359907 = s_360087;
					{
						NIM_BOOL LOC18;
						NimStringDesc* LOC21;
						LOC18 = 0;
						LOC18 = filtersym_357209(it_359907);
						if (!LOC18) goto LA19;
						LOC21 = 0;
						LOC21 = symtostr_357202(it_359907, NIM_FALSE, ((NimStringDesc*) &TMP2492));
						suggestwriteln_164242(LOC21);
						(*outputs) += 1;
					}
					LA19: ;
					s_360087 = nextiter_197099(&it_360085, HEX3Atmp_360083);
				} LA15: ;
			}
			goto LA11;
			LA13: ;
			{
				tsym188833* it_359952;
				tstrtable188807 HEX3Atmp_360088;
				ttabiter197090 it_360090;
				tsym188833* s_360092;
				it_359952 = 0;
				memset((void*)&HEX3Atmp_360088, 0, sizeof(HEX3Atmp_360088));
				HEX3Atmp_360088.Counter = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Counter;
				HEX3Atmp_360088.Data = (*(*n).kindU.S4.Sym).kindU.S3.Tab.Data;
				memset((void*)&it_360090, 0, sizeof(it_360090));
				s_360092 = inittabiter_197093(&it_360090, HEX3Atmp_360088);
				while (1) {
					if (!!((s_360092 == NIM_NIL))) goto LA23;
					it_359952 = s_360092;
					{
						NIM_BOOL LOC26;
						NimStringDesc* LOC29;
						LOC26 = 0;
						LOC26 = filtersym_357209(it_359952);
						if (!LOC26) goto LA27;
						LOC29 = 0;
						LOC29 = symtostr_357202(it_359952, NIM_FALSE, ((NimStringDesc*) &TMP2492));
						suggestwriteln_164242(LOC29);
						(*outputs) += 1;
					}
					LA27: ;
					s_360092 = nextiter_197099(&it_360090, HEX3Atmp_360088);
				} LA23: ;
			}
			LA11: ;
		}
		goto LA5;
		LA9: ;
		{
			suggesteverything_359753(c, n, outputs);
		}
		LA5: ;
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC32;
		NIM_BOOL LOC33;
		ttype188837* t;
		LOC32 = 0;
		LOC33 = 0;
		LOC33 = ((*typ).Kind == ((NU8) 14));
		if (!(LOC33)) goto LA34;
		LOC33 = ((*n).Kind == ((NU8) 3));
		LA34: ;
		LOC32 = LOC33;
		if (!(LOC32)) goto LA35;
		LOC32 = ((*(*n).kindU.S4.Sym).Kind == ((NU8) 7));
		LA35: ;
		if (!LOC32) goto LA36;
		t = typ;
		while (1) {
			if (!!((t == NIM_NIL))) goto LA38;
			suggestsymlist_357416(c, (*t).N, outputs);
			t = (*t).Sons->data[0];
		} LA38: ;
		suggestoperations_359479(c, n, typ, outputs);
	}
	goto LA1;
	LA36: ;
	{
		typ = skiptypes_192793(typ, 14682112);
		{
			ttype188837* t;
			if (!((*typ).Kind == ((NU8) 17))) goto LA42;
			t = typ;
			while (1) {
				suggestobject_357492(c, (*t).N, outputs);
				{
					if (!((*t).Sons->data[0] == NIM_NIL)) goto LA47;
					goto LA44;
				}
				LA47: ;
				t = skiptypes_192793((*t).Sons->data[0], 2048);
			} LA44: ;
			suggestoperations_359479(c, n, typ, outputs);
		}
		goto LA40;
		LA42: ;
		{
			NIM_BOOL LOC50;
			LOC50 = 0;
			LOC50 = ((*typ).Kind == ((NU8) 18));
			if (!(LOC50)) goto LA51;
			LOC50 = !(((*typ).N == NIM_NIL));
			LA51: ;
			if (!LOC50) goto LA52;
			suggestsymlist_357416(c, (*typ).N, outputs);
			suggestoperations_359479(c, n, typ, outputs);
		}
		goto LA40;
		LA52: ;
		{
			suggestoperations_359479(c, n, typ, outputs);
		}
		LA40: ;
	}
	LA1: ;
}

N_NIMCALL(tnode188803*, findclosestcall_360181)(tnode188803* n) {
	tnode188803* 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_165094((*n).Info);
		LOC3 = (LOC5 == ((NU8) 2));
		LA4: ;
		if (!LOC3) goto LA6;
		result = n;
	}
	goto LA1;
	LA6: ;
	{
		NI i_360228;
		NI HEX3Atmp_360260;
		NI LOC9;
		NI res_360262;
		i_360228 = 0;
		HEX3Atmp_360260 = 0;
		LOC9 = 0;
		LOC9 = safelen_189320(n);
		HEX3Atmp_360260 = LOC9 - 1;
		res_360262 = 0;
		while (1) {
			if (!(res_360262 <= HEX3Atmp_360260)) goto LA10;
			i_360228 = res_360262;
			result = findclosestcall_360181((*n).kindU.S6.Sons->data[i_360228]);
			{
				if (!!((result == NIM_NIL))) goto LA13;
				goto BeforeRet;
			}
			LA13: ;
			res_360262 += 1;
		} LA10: ;
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, HEX3Aanonymous_357770)(tsym188833* a, tsym188833* b) {
	NI result;
	result = 0;
	result = cmp_3490((*(*a).Name).S, (*(*b).Name).S);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, namefits_357593)(tcontext250019* c, tsym188833* s, tnode188803* n) {
	NIM_BOOL result;
	tnode188803* op;
	tident167019* 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_345274)(tcontext250019* ctx, tcandidate345205* c, tsym188833* callee, tnode188803* binding, NI calleescope) {
	initcandidateaux_345249(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;
		{
			tsym188833* LOC9;
			tsym188833* rootsym;
			LOC9 = 0;
			LOC9 = originatingmodule_195024(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_189120(&(*c).Bindings);
	genericSeqAssign(&(*c).Errors, NIM_NIL, (&NTI110805));
	{
		NIM_BOOL LOC21;
		tnode188803* typeparams;
		NI i_345384;
		NI HEX3Atmp_345602;
		NI LOC25;
		NI LOC26;
		NI res_345604;
		LOC21 = 0;
		LOC21 = !((binding == NIM_NIL));
		if (!(LOC21)) goto LA22;
		LOC21 = ((520192 &(1<<(((*callee).Kind)&31)))!=0);
		LA22: ;
		if (!LOC21) goto LA23;
		typeparams = HEX5BHEX5D_189694((*callee).Ast, 2);
		i_345384 = 0;
		HEX3Atmp_345602 = 0;
		LOC25 = 0;
		LOC25 = sonslen_189181(typeparams);
		LOC26 = 0;
		LOC26 = sonslen_189181(binding);
		HEX3Atmp_345602 = ((LOC25 <= (NI32)(LOC26 - 1)) ? LOC25 : (NI32)(LOC26 - 1));
		res_345604 = 1;
		while (1) {
			ttype188837* formaltypeparam;
			ttype188837* bound;
			tnode188803* LOC28;
			if (!(res_345604 <= HEX3Atmp_345602)) goto LA27;
			i_345384 = res_345604;
			formaltypeparam = (*(*typeparams).kindU.S6.Sons->data[(NI32)(i_345384 - 1)]).Typ;
			LOC28 = 0;
			LOC28 = HEX5BHEX5D_189694(binding, i_345384);
			bound = (*LOC28).Typ;
			{
				NIM_BOOL LOC31;
				LOC31 = 0;
				LOC31 = !((bound == NIM_NIL));
				if (!(LOC31)) goto LA32;
				LOC31 = !(((*formaltypeparam).Kind == ((NU8) 8)));
				LA32: ;
				if (!LOC31) goto LA33;
				bound = skiptypes_192793(bound, 256);
			}
			LA33: ;
			put_345266(&(*c).Bindings, formaltypeparam, bound);
			res_345604 += 1;
		} LA27: ;
	}
	LA23: ;
}

N_NIMCALL(void, preparenamedparam_351921)(tnode188803* a) {
	{
		tlineinfo163527 info;
		tident167019* LOC5;
		if (!!(((*(*a).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA3;
		info = (*(*a).kindU.S6.Sons->data[0]).Info;
		LOC5 = 0;
		LOC5 = consideracc_252006((*a).kindU.S6.Sons->data[0]);
		asgnRefNoCycle((void**) &(*a).kindU.S6.Sons->data[0], newidentnode_189090(LOC5, info));
	}
	LA3: ;
}

N_NIMCALL(tnode188803*, prepareoperand_351852)(tcontext250019* c, ttype188837* formal, tnode188803* a) {
	tnode188803* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		NI LOC5;
		LOC3 = 0;
		LOC3 = ((*formal).Kind == ((NU8) 6));
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = len_192569(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(ttype188837*, arrayconstr_351992)(tcontext250019* c, tnode188803* n) {
	ttype188837* result;
	ttype188837* LOC1;
	ttype188837* LOC2;
	ttype188837* LOC3;
	result = 0;
	result = newtypes_250180(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_242024(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_251156(c, 0, 0, (*n).Info, LOC1);
	rawaddson_193092(result, LOC2);
	LOC3 = 0;
	LOC3 = skiptypes_192793((*n).Typ, 8423424);
	addsonskipintlit_242461(result, LOC3);
	return result;
}

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

N_NIMCALL(tnode188803*, prepareoperand_351902)(tcontext250019* c, tnode188803* a) {
	tnode188803* 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_352007)(ttype188837* t) {
	(*(*(*(*t).Sons->data[0]).N).kindU.S6.Sons->data[1]).kindU.S1.Intval += 1;
}

N_NIMCALL(void, matchesaux_352247)(tcontext250019* c, tnode188803* n, tnode188803* norig, tcandidate345205* m, tintset185047* marker) {
	NI f;
	NI a;
	NI formallen;
	tnode188803* LOC6;
	tnode188803* container;
	tsym188833* 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_189099((*n).Kind, (*n).Info));
	asgnRefNoCycle((void**) &(*(*m).Call).Typ, base_223029((*m).Callee));
	formallen = len_189264((*(*m).Callee).N);
	LOC6 = 0;
	LOC6 = copytree_189237((*n).kindU.S6.Sons->data[0]);
	addson_189207((*m).Call, LOC6);
	container = NIM_NIL;
	formal = NIM_NIL;
	while (1) {
		NI LOC8;
		LOC8 = 0;
		LOC8 = len_189264(n);
		if (!(a < LOC8)) goto LA7;
		{
			tnode188803* arg;
			if (!((*(*n).kindU.S6.Sons->data[a]).Kind == ((NU8) 33))) goto LA11;
			preparenamedparam_351921((*n).kindU.S6.Sons->data[a]);
			{
				if (!!(((*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[0]).Kind == ((NU8) 2)))) goto LA15;
				localerror_165571((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 159), ((NimStringDesc*) &TMP2550));
				(*m).State = ((NU8) 2);
				goto BeforeRet;
			}
			LA15: ;
			formal = getsymfromlist_197172((*(*m).Callee).N, (*(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[0]).kindU.S5.Ident, 1);
			{
				if (!(formal == NIM_NIL)) goto LA19;
				(*m).State = ((NU8) 2);
				goto BeforeRet;
			}
			LA19: ;
			{
				NIM_BOOL LOC23;
				LOC23 = 0;
				LOC23 = containsorincl_185888(marker, (*formal).Position);
				if (!LOC23) goto LA24;
				localerror_165571((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 143), (*(*formal).Name).S);
				(*m).State = ((NU8) 2);
				goto BeforeRet;
			}
			LA24: ;
			(*m).Basetypematch = NIM_FALSE;
			asgnRefNoCycle((void**) &(*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1], prepareoperand_351852(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_351560(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 LA28;
				(*m).State = ((NU8) 2);
				goto BeforeRet;
			}
			LA28: ;
			{
				if (!!((*formal).Constraint == 0)) goto LA32;
				{
					NIM_BOOL LOC36;
					LOC36 = 0;
					LOC36 = matchnodekinds_277312((*formal).Constraint, (*(*n).kindU.S6.Sons->data[a]).kindU.S6.Sons->data[1]);
					if (!LOC36) goto LA37;
					(*m).Genericmatches += 100;
				}
				goto LA34;
				LA37: ;
				{
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA34: ;
			}
			LA32: ;
			{
				ttype188837* LOC44;
				if (!(*m).Basetypematch) goto LA42;
				LOC44 = 0;
				LOC44 = arrayconstr_351992(c, arg);
				container = newnodeit_189104(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC44);
				addson_189207(container, arg);
				setson_351800((*m).Call, (NI32)((*formal).Position + 1), container);
				{
					if (!!((f == (NI32)(formallen - 1)))) goto LA47;
					container = NIM_NIL;
				}
				LA47: ;
			}
			goto LA40;
			LA42: ;
			{
				setson_351800((*m).Call, (NI32)((*formal).Position + 1), arg);
			}
			LA40: ;
		}
		goto LA9;
		LA11: ;
		{
			{
				if (!(formallen <= f)) goto LA53;
				{
					if (!(((*(*m).Callee).Flags &(1<<((((NU8) 0))&31)))!=0)) goto LA57;
					asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[a], prepareoperand_351902(c, (*n).kindU.S6.Sons->data[a]));
					{
						ttype188837* LOC61;
						ttype188837* LOC64;
						tnode188803* LOC65;
						tnode188803* LOC66;
						LOC61 = 0;
						LOC61 = skiptypes_192793((*(*n).kindU.S6.Sons->data[a]).Typ, IL64(211106240964608));
						if (!((*LOC61).Kind == ((NU8) 28))) goto LA62;
						LOC64 = 0;
						LOC64 = getsystype_242024(((NU8) 29));
						LOC65 = 0;
						LOC65 = copytree_189237((*n).kindU.S6.Sons->data[a]);
						LOC66 = 0;
						LOC66 = implicitconv_350621(((NU8) 58), LOC64, LOC65, &(*m), c);
						addson_189207((*m).Call, LOC66);
					}
					goto LA59;
					LA62: ;
					{
						tnode188803* LOC68;
						LOC68 = 0;
						LOC68 = copytree_189237((*n).kindU.S6.Sons->data[a]);
						addson_189207((*m).Call, LOC68);
					}
					LA59: ;
				}
				goto LA55;
				LA57: ;
				{
					tnode188803* arg;
					if (!!((formal == NIM_NIL))) goto LA70;
					(*m).Basetypematch = NIM_FALSE;
					asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[a], prepareoperand_351852(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
					arg = paramtypesmatch_351560(m, (*formal).Typ, (*(*n).kindU.S6.Sons->data[a]).Typ, (*n).kindU.S6.Sons->data[a], (*norig).kindU.S6.Sons->data[a]);
					{
						NIM_BOOL LOC74;
						NIM_BOOL LOC75;
						LOC74 = 0;
						LOC75 = 0;
						LOC75 = !((arg == NIM_NIL));
						if (!(LOC75)) goto LA76;
						LOC75 = (*m).Basetypematch;
						LA76: ;
						LOC74 = LOC75;
						if (!(LOC74)) goto LA77;
						LOC74 = !((container == NIM_NIL));
						LA77: ;
						if (!LOC74) goto LA78;
						addson_189207(container, arg);
						incrindextype_352007((*container).Typ);
					}
					goto LA72;
					LA78: ;
					{
						(*m).State = ((NU8) 2);
						goto BeforeRet;
					}
					LA72: ;
				}
				goto LA55;
				LA70: ;
				{
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA55: ;
			}
			goto LA51;
			LA53: ;
			{
				tnode188803* arg;
				{
					if (!!(((*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).Kind == ((NU8) 3)))) goto LA85;
					internalerror_165591((*(*n).kindU.S6.Sons->data[a]).Info, ((NimStringDesc*) &TMP2567));
					goto BeforeRet;
				}
				LA85: ;
				formal = (*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).kindU.S4.Sym;
				{
					NIM_BOOL LOC89;
					LOC89 = 0;
					LOC89 = containsorincl_185888(marker, (*formal).Position);
					if (!LOC89) goto LA90;
					localerror_165571((*(*n).kindU.S6.Sons->data[a]).Info, ((NU16) 143), (*(*formal).Name).S);
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA90: ;
				(*m).Basetypematch = NIM_FALSE;
				asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[a], prepareoperand_351852(c, (*formal).Typ, (*n).kindU.S6.Sons->data[a]));
				arg = paramtypesmatch_351560(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 LA94;
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA94: ;
				{
					ttype188837* LOC100;
					tnode188803* LOC101;
					if (!(*m).Basetypematch) goto LA98;
					LOC100 = 0;
					LOC100 = arrayconstr_351992(c, arg);
					container = newnodeit_189104(((NU8) 41), (*(*n).kindU.S6.Sons->data[a]).Info, LOC100);
					addson_189207(container, arg);
					LOC101 = 0;
					LOC101 = implicitconv_350621(((NU8) 58), (*formal).Typ, container, &(*m), c);
					setson_351800((*m).Call, (NI32)((*formal).Position + 1), LOC101);
					{
						if (!!((f == (NI32)(formallen - 1)))) goto LA104;
						container = NIM_NIL;
					}
					LA104: ;
				}
				goto LA96;
				LA98: ;
				{
					setson_351800((*m).Call, (NI32)((*formal).Position + 1), arg);
				}
				LA96: ;
			}
			LA51: ;
			{
				if (!!((*formal).Constraint == 0)) goto LA109;
				{
					NIM_BOOL LOC113;
					LOC113 = 0;
					LOC113 = matchnodekinds_277312((*formal).Constraint, (*n).kindU.S6.Sons->data[a]);
					if (!LOC113) goto LA114;
					(*m).Genericmatches += 100;
				}
				goto LA111;
				LA114: ;
				{
					(*m).State = ((NU8) 2);
					goto BeforeRet;
				}
				LA111: ;
			}
			LA109: ;
		}
		LA9: ;
		a += 1;
		f += 1;
	} LA7: ;
	BeforeRet: ;
}

N_NIMCALL(void, partialmatch_353555)(tcontext250019* c, tnode188803* n, tnode188803* norig, tcandidate345205* m) {
	tintset185047 marker;
	chckNil((void*)&marker);
	memset((void*)&marker, 0, sizeof(marker));
	initintset_185918(&marker);
	matchesaux_352247(c, n, norig, m, &marker);
}

N_NIMCALL(NIM_BOOL, argsfit_357673)(tcontext250019* c, tsym188833* candidate, tnode188803* n, tnode188803* 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):
	{
		tcandidate345205 m;
		memset((void*)&m, 0, sizeof(m));
		initcandidate_345274(c, &m, candidate, NIM_NIL, -1);
		partialmatch_353555(c, n, norig, &m);
		result = !((m.State == ((NU8) 2)));
	}
	break;
	default:
	{
		result = NIM_FALSE;
	}
	break;
	}
	return result;
}

N_NIMCALL(void, suggestcall_357694)(tcontext250019* c, tnode188803* n_357697, tnode188803* norig, NI* outputs) {
	NIM_BOOL islocal_357702;
	tscope188827* scope_357704;
	tscope188827* HEX3Atmp_359430;
	tscope188827* current_359432;
	islocal_357702 = NIM_TRUE;
	scope_357704 = 0;
	HEX3Atmp_359430 = 0;
	HEX3Atmp_359430 = (*c).Currentscope;
	current_359432 = HEX3Atmp_359430;
	while (1) {
		tsymseq188805* entries_357706;
		tsymseq188805* result_357726;
		tsym188833* x_357728;
		tstrtable188807 HEX3Atmp_359421;
		ttabiter197090 it_359423;
		tsym188833* s_359425;
		TY357801 LOC7;
		tsym188833* item_357708;
		NI i_359427;
		NI l_359429;
		if (!!((current_359432 == NIM_NIL))) goto LA1;
		scope_357704 = current_359432;
		{
			if (!(scope_357704 == (*c).Toplevelscope)) goto LA4;
			islocal_357702 = NIM_FALSE;
		}
		LA4: ;
		result_357726 = (tsymseq188805*) newSeq((&NTI188805), 0);
		x_357728 = 0;
		memset((void*)&HEX3Atmp_359421, 0, sizeof(HEX3Atmp_359421));
		HEX3Atmp_359421.Counter = (*scope_357704).Symbols.Counter;
		HEX3Atmp_359421.Data = (*scope_357704).Symbols.Data;
		memset((void*)&it_359423, 0, sizeof(it_359423));
		s_359425 = inittabiter_197093(&it_359423, HEX3Atmp_359421);
		while (1) {
			if (!!((s_359425 == NIM_NIL))) goto LA6;
			x_357728 = s_359425;
			result_357726 = (tsymseq188805*) incrSeq(&(result_357726)->Sup, sizeof(tsym188833*));
			asgnRefNoCycle((void**) &result_357726->data[result_357726->Sup.len-1], x_357728);
			s_359425 = nextiter_197099(&it_359423, HEX3Atmp_359421);
		} LA6: ;
		genericSeqAssign(&entries_357706, result_357726, (&NTI188805));
		memset((void*)&LOC7, 0, sizeof(LOC7));
		LOC7.ClPrc = ((TMP2565) (HEX3Aanonymous_357770)); LOC7.ClEnv = NIM_NIL;
		sort_357782(entries_357706->data, entries_357706->Sup.len, LOC7, ((NU8) 1));
		item_357708 = 0;
		i_359427 = 0;
		l_359429 = entries_357706->Sup.len;
		while (1) {
			tsym188833* it;
			if (!(i_359427 < l_359429)) goto LA8;
			item_357708 = entries_357706->data[i_359427];
			it = item_357708;
			{
				NIM_BOOL LOC11;
				NIM_BOOL LOC12;
				NimStringDesc* LOC17;
				LOC11 = 0;
				LOC12 = 0;
				LOC12 = filtersym_357209(it);
				if (!(LOC12)) goto LA13;
				LOC12 = namefits_357593(c, it, n_357697);
				LA13: ;
				LOC11 = LOC12;
				if (!(LOC11)) goto LA14;
				LOC11 = argsfit_357673(c, it, n_357697, norig);
				LA14: ;
				if (!LOC11) goto LA15;
				LOC17 = 0;
				LOC17 = symtostr_357202(it, islocal_357702, ((NimStringDesc*) &TMP2568));
				suggestwriteln_164242(LOC17);
				(*outputs) += 1;
			}
			LA15: ;
			i_359427 += 1;
		} LA8: ;
		current_359432 = (*current_359432).Parent;
	} LA1: ;
}

N_NIMCALL(void, suggestexpr_362986)(tcontext250019* c, tnode188803* node) {
	NU8 cp;
	NI outputs;
	cp = incheckpoint_165094((*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;
	{
		tnode188803* n;
		if (!((gglobaloptions_137111 &(1<<((((NU8) 23))&31)))!=0)) goto LA11;
		n = findclosestdot_360098(node);
		{
			if (!(n == NIM_NIL)) goto LA15;
			n = node;
		}
		goto LA13;
		LA15: ;
		{
			cp = ((NU8) 2);
		}
		LA13: ;
		{
			NIM_BOOL LOC20;
			tnode188803* obj;
			LOC20 = 0;
			LOC20 = ((*n).Kind == ((NU8) 45));
			if (!(LOC20)) goto LA21;
			LOC20 = (cp == ((NU8) 2));
			LA21: ;
			if (!LOC20) goto LA22;
			obj = safesemexpr_360386(c, (*n).kindU.S6.Sons->data[0]);
			suggestfieldaccess_359821(c, obj, &outputs);
		}
		goto LA18;
		LA22: ;
		{
			suggesteverything_359753(c, n, &outputs);
		}
		LA18: ;
	}
	LA11: ;
	{
		tnode188803* n;
		if (!((gglobaloptions_137111 &(1<<((((NU8) 24))&31)))!=0)) goto LA27;
		n = findclosestcall_360181(node);
		{
			if (!(n == NIM_NIL)) goto LA31;
			n = node;
		}
		goto LA29;
		LA31: ;
		{
			cp = ((NU8) 2);
		}
		LA29: ;
		{
			tnode188803* a;
			tnode188803* x_363143;
			NI i_363194;
			NI HEX3Atmp_363267;
			NI LOC44;
			NI res_363269;
			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_189233(n);
			x_363143 = safesemexpr_360386(c, (*n).kindU.S6.Sons->data[0]);
			{
				NIM_BOOL LOC40;
				LOC40 = 0;
				LOC40 = ((*x_363143).Kind == ((NU8) 1));
				if (LOC40) goto LA41;
				LOC40 = ((*x_363143).Typ == NIM_NIL);
				LA41: ;
				if (!LOC40) goto LA42;
				x_363143 = (*n).kindU.S6.Sons->data[0];
			}
			LA42: ;
			addson_189207(a, x_363143);
			i_363194 = 0;
			HEX3Atmp_363267 = 0;
			LOC44 = 0;
			LOC44 = sonslen_189181(n);
			HEX3Atmp_363267 = (NI32)(LOC44 - 1);
			res_363269 = 1;
			while (1) {
				tnode188803* x;
				if (!(res_363269 <= HEX3Atmp_363267)) goto LA45;
				i_363194 = res_363269;
				x = safesemexpr_360386(c, (*n).kindU.S6.Sons->data[i_363194]);
				{
					NIM_BOOL LOC48;
					LOC48 = 0;
					LOC48 = ((*x).Kind == ((NU8) 1));
					if (LOC48) goto LA49;
					LOC48 = ((*x).Typ == NIM_NIL);
					LA49: ;
					if (!LOC48) goto LA50;
					goto LA45;
				}
				LA50: ;
				addson_189207(a, x);
				res_363269 += 1;
			} LA45: ;
			suggestcall_357694(c, a, n, &outputs);
		}
		LA36: ;
	}
	LA27: ;
	(*c).Incompilescontext -= 1;
	{
		NIM_BOOL LOC54;
		LOC54 = 0;
		LOC54 = (0 < outputs);
		if (!(LOC54)) goto LA55;
		LOC54 = !(((gglobaloptions_137111 &(1<<((((NU8) 26))&31)))!=0));
		LA55: ;
		if (!LOC54) goto LA56;
		suggestquit_164626();
	}
	LA56: ;
	BeforeRet: ;
}

N_NIMCALL(void, newcandidate_345619)(tcontext250019* ctx, ttype188837* callee, tcandidate345205* Result) {
	initcandidate_345257(ctx, Result, callee);
}

N_NIMCALL(ttype188837*, arrayconstr_352000)(tcontext250019* c, tlineinfo163527 info) {
	ttype188837* result;
	ttype188837* LOC1;
	ttype188837* LOC2;
	ttype188837* LOC3;
	result = 0;
	result = newtypes_250180(((NU8) 4), c);
	LOC1 = 0;
	LOC1 = getsystype_242024(((NU8) 31));
	LOC2 = 0;
	LOC2 = makerangetype_251156(c, 0, -1, info, LOC1);
	rawaddson_193092(result, LOC2);
	LOC3 = 0;
	LOC3 = newtypes_250180(((NU8) 3), c);
	rawaddson_193092(result, LOC3);
	return result;
}

N_NIMCALL(void, matches_353566)(tcontext250019* c, tnode188803* n, tnode188803* norig, tcandidate345205* m) {
	tintset185047 marker;
	NI f;
	chckNil((void*)&marker);
	memset((void*)&marker, 0, sizeof(marker));
	initintset_185918(&marker);
	matchesaux_352247(c, n, norig, m, &marker);
	{
		if (!((*m).State == ((NU8) 2))) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	f = 1;
	while (1) {
		NI LOC6;
		tsym188833* formal;
		LOC6 = 0;
		LOC6 = sonslen_189181((*(*m).Callee).N);
		if (!(f < LOC6)) goto LA5;
		formal = (*(*(*(*m).Callee).N).kindU.S6.Sons->data[f]).kindU.S4.Sym;
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = containsorincl_185888(&marker, (*formal).Position);
			if (!!(LOC9)) goto LA10;
			{
				if (!((*formal).Ast == NIM_NIL)) goto LA14;
				{
					tnode188803* container;
					ttype188837* LOC20;
					tnode188803* LOC21;
					if (!((*(*formal).Typ).Kind == ((NU8) 48))) goto LA18;
					LOC20 = 0;
					LOC20 = arrayconstr_352000(c, (*n).Info);
					container = newnodeit_189104(((NU8) 41), (*n).Info, LOC20);
					LOC21 = 0;
					LOC21 = implicitconv_350621(((NU8) 58), (*formal).Typ, container, &(*m), c);
					addson_189207((*m).Call, LOC21);
				}
				goto LA16;
				LA18: ;
				{
					(*m).State = ((NU8) 2);
					goto LA5;
				}
				LA16: ;
			}
			goto LA12;
			LA14: ;
			{
				tnode188803* LOC24;
				LOC24 = 0;
				LOC24 = copytree_189237((*formal).Ast);
				setson_351800((*m).Call, (NI32)((*formal).Position + 1), LOC24);
			}
			LA12: ;
		}
		LA10: ;
		f += 1;
	} LA5: ;
	BeforeRet: ;
}

N_NIMCALL(NimStringDesc*, argtypetostring_345907)(tnode188803* arg) {
	NimStringDesc* result;
	result = 0;
	{
		tnode188803* LOC5;
		NI i_345945;
		NI HEX3Atmp_345946;
		NI LOC6;
		NI res_345948;
		if (!((*arg).Kind == ((NU8) 56) || (*arg).Kind == ((NU8) 57))) goto LA3;
		LOC5 = 0;
		LOC5 = HEX5BHEX5D_189694(arg, 0);
		result = typetostring_223020((*LOC5).Typ, ((NU8) 0));
		i_345945 = 0;
		HEX3Atmp_345946 = 0;
		LOC6 = 0;
		LOC6 = len_189264(arg);
		HEX3Atmp_345946 = LOC6 - 1;
		res_345948 = 1;
		while (1) {
			tnode188803* LOC8;
			NimStringDesc* LOC9;
			if (!(res_345948 <= HEX3Atmp_345946)) goto LA7;
			i_345945 = res_345948;
			result = resizeString(result, 3);
appendString(result, ((NimStringDesc*) &TMP2694));
			LOC8 = 0;
			LOC8 = HEX5BHEX5D_189694(arg, i_345945);
			LOC9 = 0;
			LOC9 = typetostring_223020((*LOC8).Typ, ((NU8) 0));
			result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
			res_345948 += 1;
		} LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		result = typetostring_223020((*arg).Typ, ((NU8) 0));
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, describeargs_345953)(tcontext250019* c, tnode188803* n, NI startidx) {
	NimStringDesc* result;
	NI i_345971;
	NI HEX3Atmp_346167;
	NI LOC1;
	NI res_346169;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2550));
	i_345971 = 0;
	HEX3Atmp_346167 = 0;
	LOC1 = 0;
	LOC1 = len_189264(n);
	HEX3Atmp_346167 = (NI32)(LOC1 - 1);
	res_346169 = startidx;
	while (1) {
		tnode188803* arg;
		NimStringDesc* LOC21;
		if (!(res_346169 <= HEX3Atmp_346167)) goto LA2;
		i_345971 = res_346169;
		arg = (*n).kindU.S6.Sons->data[i_345971];
		{
			NimStringDesc* LOC7;
			if (!((*(*n).kindU.S6.Sons->data[i_345971]).Kind == ((NU8) 33))) goto LA5;
			LOC7 = 0;
			LOC7 = rendertree_211051((*(*n).kindU.S6.Sons->data[i_345971]).kindU.S6.Sons->data[0], 0);
			result = resizeString(result, LOC7->Sup.len + 0);
appendString(result, LOC7);
			result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2693));
			{
				if (!(*arg).Typ == 0) goto LA10;
				arg = (*c).Semoperand(c, (*(*n).kindU.S6.Sons->data[i_345971]).kindU.S6.Sons->data[1], 0);
				asgnRefNoCycle((void**) &(*(*n).kindU.S6.Sons->data[i_345971]).Typ, (*arg).Typ);
				asgnRefNoCycle((void**) &(*(*n).kindU.S6.Sons->data[i_345971]).kindU.S6.Sons->data[1], arg);
			}
			LA10: ;
		}
		goto LA3;
		LA5: ;
		{
			{
				if (!(*arg).Typ == 0) goto LA15;
				arg = (*c).Semoperand(c, (*n).kindU.S6.Sons->data[i_345971], 0);
				asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[i_345971], arg);
			}
			LA15: ;
		}
		LA3: ;
		{
			if (!((*(*arg).Typ).Kind == ((NU8) 50))) goto LA19;
			goto BeforeRet;
		}
		LA19: ;
		LOC21 = 0;
		LOC21 = argtypetostring_345907(arg);
		result = resizeString(result, LOC21->Sup.len + 0);
appendString(result, LOC21);
		{
			NI LOC24;
			LOC24 = 0;
			LOC24 = sonslen_189181(n);
			if (!!((i_345971 == (NI32)(LOC24 - 1)))) goto LA25;
			result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP2695));
		}
		LA25: ;
		res_346169 += 1;
	} LA2: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, suggeststmt_363273)(tcontext250019* c, tnode188803* n) {
	suggestexpr_362986(c, n);
}

N_NIMCALL(tnode188803*, usesym_362981)(tsym188833* sym) {
	tnode188803* result;
	result = 0;
	result = newsymnode_189095(sym);
	markused_345244(result, sym);
	return result;
}

N_NIMCALL(void, semfinishoperands_353494)(tcontext250019* c, tnode188803* n) {
	NI i_353519;
	NI HEX3Atmp_353548;
	NI LOC1;
	NI res_353550;
	i_353519 = 0;
	HEX3Atmp_353548 = 0;
	LOC1 = 0;
	LOC1 = len_189264(n);
	HEX3Atmp_353548 = LOC1 - 1;
	res_353550 = 1;
	while (1) {
		if (!(res_353550 <= HEX3Atmp_353548)) goto LA2;
		i_353519 = res_353550;
		asgnRefNoCycle((void**) &(*n).kindU.S6.Sons->data[i_353519], prepareoperand_351902(c, (*n).kindU.S6.Sons->data[i_353519]));
		res_353550 += 1;
	} LA2: ;
}

N_NIMCALL(NU8, cmptypes_350566)(tcontext250019* c, ttype188837* f, ttype188837* a) {
	NU8 result;
	tcandidate345205 m;
	result = 0;
	memset((void*)&m, 0, sizeof(m));
	initcandidate_345257(c, &m, f);
	result = typerel_346174(&m, f, a, NIM_TRUE);
	return result;
}

N_NIMCALL(NI, HEX3Aanonymous_361126)(tentry360549 a, tentry360549 b) {
	NI result;
	result = 0;
	result = cmp_361132(a.Pos, b.Pos);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, deffromline_361101)(TY360556** entries, NI32 col) {
	TY361168 LOC6;
	tentry360549 e_362803;
	TY360556* HEX3Atmp_362804;
	NI i_362806;
	NI l_362808;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_360821((*entries), NIM_NIL);
		if (!LOC3) goto LA4;
		goto BeforeRet;
	}
	LA4: ;
	memset((void*)&LOC6, 0, sizeof(LOC6));
	LOC6.ClPrc = ((TMP4528) (HEX3Aanonymous_361126)); LOC6.ClEnv = NIM_NIL;
	sort_361149((*entries)->data, (*entries)->Sup.len, LOC6, ((NU8) 1));
	memset((void*)&e_362803, 0, sizeof(e_362803));
	HEX3Atmp_362804 = 0;
	unsureAsgnRef((void**) &HEX3Atmp_362804, (*entries));
	i_362806 = 0;
	l_362808 = HEX3Atmp_362804->Sup.len;
	while (1) {
		if (!(i_362806 < l_362808)) goto LA7;
		e_362803.Pos = HEX3Atmp_362804->data[i_362806].Pos;
		e_362803.Sym = HEX3Atmp_362804->data[i_362806].Sym;
		{
			NimStringDesc* LOC12;
			if (!(((NI) (col)) <= e_362803.Pos)) goto LA10;
			LOC12 = 0;
			LOC12 = symtostr_357202(e_362803.Sym, NIM_FALSE, ((NimStringDesc*) &TMP2557));
			suggestwriteln_164242(LOC12);
			goto BeforeRet;
		}
		LA10: ;
		i_362806 += 1;
	} LA7: ;
	BeforeRet: ;
}

N_NIMCALL(void, deffromsourcemap_362811)(tlineinfo163527 i) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC6;
		LOC3 = 0;
		LOC4 = 0;
		LOC4 = (((NI) (i.Fileindex)) < gsourcemaps_360579->Sup.len);
		if (!(LOC4)) goto LA5;
		LOC6 = 0;
		LOC6 = HEX3DHEX3D_360697(gsourcemaps_360579->data[i.Fileindex].Lines, NIM_NIL);
		LOC4 = !(LOC6);
		LA5: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA7;
		LOC3 = (((NI) (i.Line)) < gsourcemaps_360579->data[i.Fileindex].Lines->Sup.len);
		LA7: ;
		if (!!(LOC3)) goto LA8;
		goto BeforeRet;
	}
	LA8: ;
	deffromline_361101(&gsourcemaps_360579->data[i.Fileindex].Lines->data[i.Line].Entries, ((NI32) (i.Col)));
	BeforeRet: ;
}
N_NOINLINE(void, sigmatchInit)(void) {
	if (gsourcemaps_360579) nimGCunrefNoCycle(gsourcemaps_360579);
	gsourcemaps_360579 = (TY360558*) newSeqRC1((&NTI360558), 0);
}

N_NOINLINE(void, sigmatchDatInit)(void) {
static TNimNode* TMP907[2];
static TNimNode* TMP2560[19];
static TNimNode* TMP2561[3];
NI TMP2563;
static char* NIM_CONST TMP2562[3] = {
"csEmpty", 
"csMatch", 
"csNoMatch"};
static TNimNode TMP856[29];
NTI360547.size = sizeof(tsourcemap360547);
NTI360547.kind = 18;
NTI360547.base = 0;
NTI360547.flags = 2;
NTI360551.size = sizeof(tlinemap360551);
NTI360551.kind = 18;
NTI360551.base = 0;
NTI360551.flags = 2;
NTI360549.size = sizeof(tentry360549);
NTI360549.kind = 18;
NTI360549.base = 0;
NTI360549.flags = 2;
TMP907[0] = &TMP856[3];
TMP856[3].kind = 1;
TMP856[3].offset = offsetof(tentry360549, Pos);
TMP856[3].typ = (&NTI106);
TMP856[3].name = "pos";
TMP907[1] = &TMP856[4];
TMP856[4].kind = 1;
TMP856[4].offset = offsetof(tentry360549, Sym);
TMP856[4].typ = (&NTI188801);
TMP856[4].name = "sym";
TMP856[2].len = 2; TMP856[2].kind = 2; TMP856[2].sons = &TMP907[0];
NTI360549.node = &TMP856[2];
NTI360556.size = sizeof(TY360556*);
NTI360556.kind = 24;
NTI360556.base = (&NTI360549);
NTI360556.flags = 2;
NTI360556.marker = TMP908;
TMP856[1].kind = 1;
TMP856[1].offset = offsetof(tlinemap360551, Entries);
TMP856[1].typ = (&NTI360556);
TMP856[1].name = "entries";
NTI360551.node = &TMP856[1];
NTI360552.size = sizeof(TY360552*);
NTI360552.kind = 24;
NTI360552.base = (&NTI360551);
NTI360552.flags = 2;
NTI360552.marker = TMP909;
TMP856[0].kind = 1;
TMP856[0].offset = offsetof(tsourcemap360547, Lines);
TMP856[0].typ = (&NTI360552);
TMP856[0].name = "lines";
NTI360547.node = &TMP856[0];
NTI360558.size = sizeof(TY360558*);
NTI360558.kind = 24;
NTI360558.base = (&NTI360547);
NTI360558.flags = 2;
NTI360558.marker = TMP910;
NTI345205.size = sizeof(tcandidate345205);
NTI345205.kind = 18;
NTI345205.base = 0;
TMP2560[0] = &TMP856[6];
TMP856[6].kind = 1;
TMP856[6].offset = offsetof(tcandidate345205, C);
TMP856[6].typ = (&NTI250017);
TMP856[6].name = "c";
TMP2560[1] = &TMP856[7];
TMP856[7].kind = 1;
TMP856[7].offset = offsetof(tcandidate345205, Exactmatches);
TMP856[7].typ = (&NTI106);
TMP856[7].name = "exactMatches";
TMP2560[2] = &TMP856[8];
TMP856[8].kind = 1;
TMP856[8].offset = offsetof(tcandidate345205, Genericmatches);
TMP856[8].typ = (&NTI106);
TMP856[8].name = "genericMatches";
TMP2560[3] = &TMP856[9];
TMP856[9].kind = 1;
TMP856[9].offset = offsetof(tcandidate345205, Subtypematches);
TMP856[9].typ = (&NTI106);
TMP856[9].name = "subtypeMatches";
TMP2560[4] = &TMP856[10];
TMP856[10].kind = 1;
TMP856[10].offset = offsetof(tcandidate345205, Intconvmatches);
TMP856[10].typ = (&NTI106);
TMP856[10].name = "intConvMatches";
TMP2560[5] = &TMP856[11];
TMP856[11].kind = 1;
TMP856[11].offset = offsetof(tcandidate345205, Convmatches);
TMP856[11].typ = (&NTI106);
TMP856[11].name = "convMatches";
TMP2560[6] = &TMP856[12];
NTI345203.size = sizeof(NU8);
NTI345203.kind = 14;
NTI345203.base = 0;
NTI345203.flags = 3;
for (TMP2563 = 0; TMP2563 < 3; TMP2563++) {
TMP856[TMP2563+13].kind = 1;
TMP856[TMP2563+13].offset = TMP2563;
TMP856[TMP2563+13].name = TMP2562[TMP2563];
TMP2561[TMP2563] = &TMP856[TMP2563+13];
}
TMP856[16].len = 3; TMP856[16].kind = 2; TMP856[16].sons = &TMP2561[0];
NTI345203.node = &TMP856[16];
TMP856[12].kind = 1;
TMP856[12].offset = offsetof(tcandidate345205, State);
TMP856[12].typ = (&NTI345203);
TMP856[12].name = "state";
TMP2560[7] = &TMP856[17];
TMP856[17].kind = 1;
TMP856[17].offset = offsetof(tcandidate345205, Callee);
TMP856[17].typ = (&NTI188799);
TMP856[17].name = "callee";
TMP2560[8] = &TMP856[18];
TMP856[18].kind = 1;
TMP856[18].offset = offsetof(tcandidate345205, Calleesym);
TMP856[18].typ = (&NTI188801);
TMP856[18].name = "calleeSym";
TMP2560[9] = &TMP856[19];
TMP856[19].kind = 1;
TMP856[19].offset = offsetof(tcandidate345205, Calleescope);
TMP856[19].typ = (&NTI106);
TMP856[19].name = "calleeScope";
TMP2560[10] = &TMP856[20];
TMP856[20].kind = 1;
TMP856[20].offset = offsetof(tcandidate345205, Call);
TMP856[20].typ = (&NTI188795);
TMP856[20].name = "call";
TMP2560[11] = &TMP856[21];
TMP856[21].kind = 1;
TMP856[21].offset = offsetof(tcandidate345205, Bindings);
TMP856[21].typ = (&NTI188849);
TMP856[21].name = "bindings";
TMP2560[12] = &TMP856[22];
TMP856[22].kind = 1;
TMP856[22].offset = offsetof(tcandidate345205, Basetypematch);
TMP856[22].typ = (&NTI134);
TMP856[22].name = "baseTypeMatch";
TMP2560[13] = &TMP856[23];
TMP856[23].kind = 1;
TMP856[23].offset = offsetof(tcandidate345205, Proxymatch);
TMP856[23].typ = (&NTI134);
TMP856[23].name = "proxyMatch";
TMP2560[14] = &TMP856[24];
TMP856[24].kind = 1;
TMP856[24].offset = offsetof(tcandidate345205, Genericconverter);
TMP856[24].typ = (&NTI134);
TMP856[24].name = "genericConverter";
TMP2560[15] = &TMP856[25];
TMP856[25].kind = 1;
TMP856[25].offset = offsetof(tcandidate345205, Coercedistincts);
TMP856[25].typ = (&NTI134);
TMP856[25].name = "coerceDistincts";
TMP2560[16] = &TMP856[26];
TMP856[26].kind = 1;
TMP856[26].offset = offsetof(tcandidate345205, Typedescmatched);
TMP856[26].typ = (&NTI134);
TMP856[26].name = "typedescMatched";
TMP2560[17] = &TMP856[27];
TMP856[27].kind = 1;
TMP856[27].offset = offsetof(tcandidate345205, Inheritancepenalty);
TMP856[27].typ = (&NTI106);
TMP856[27].name = "inheritancePenalty";
TMP2560[18] = &TMP856[28];
TMP856[28].kind = 1;
TMP856[28].offset = offsetof(tcandidate345205, Errors);
TMP856[28].typ = (&NTI110805);
TMP856[28].name = "errors";
TMP856[5].len = 19; TMP856[5].kind = 2; TMP856[5].sons = &TMP2560[0];
NTI345205.node = &TMP856[5];
}

