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

#include <string.h>
typedef struct Tsymseq191815 Tsymseq191815;
typedef struct Tsym191843 Tsym191843;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tcell46347 Tcell46347;
typedef struct Tcellseq46363 Tcellseq46363;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellset46359 Tcellset46359;
typedef struct Tpagedesc46355 Tpagedesc46355;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Ttype191849 Ttype191849;
typedef struct Tcontext245023 Tcontext245023;
typedef struct Tpasscontext242005 Tpasscontext242005;
typedef struct TNimObject TNimObject;
typedef struct Tscope191837 Tscope191837;
typedef struct Tproccon245011 Tproccon245011;
typedef struct Intset188056 Intset188056;
typedef struct Ttrunk188052 Ttrunk188052;
typedef struct Ttrunkseq188054 Ttrunkseq188054;
typedef struct Tlinkedlist130028 Tlinkedlist130028;
typedef struct Tlistentry130022 Tlistentry130022;
typedef struct Tidtable191861 Tidtable191861;
typedef struct Tidpairseq191859 Tidpairseq191859;
typedef struct Tnode191813 Tnode191813;
typedef struct Tlineinfo164338 Tlineinfo164338;
typedef struct Tstrtable191817 Tstrtable191817;
typedef struct Tctx244048 Tctx244048;
typedef struct TY245141 TY245141;
typedef struct TY523942 TY523942;
typedef struct TY523945 TY523945;
typedef struct Tinstantiationpair245013 Tinstantiationpair245013;
typedef struct Tinstantiation191833 Tinstantiation191833;
typedef struct Toptionentry245005 Toptionentry245005;
typedef struct Tlib191831 Tlib191831;
typedef struct Tidobj168015 Tidobj168015;
typedef struct Ttypeseq191845 Ttypeseq191845;
typedef struct Tloc191827 Tloc191827;
typedef struct Ropeobj162009 Ropeobj162009;
typedef struct NimStringDesc NimStringDesc;
typedef struct TY86345 TY86345;
typedef struct Tident168021 Tident168021;
typedef struct Tnodeseq191807 Tnodeseq191807;
typedef struct TY191944 TY191944;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
typedef struct Tidpair191857 Tidpair191857;
typedef struct TY244253 TY244253;
typedef struct TY165036 TY165036;
typedef struct PprocHEX3Aobjecttype244232 PprocHEX3Aobjecttype244232;
typedef struct TY244272 TY244272;
typedef struct TY191933 TY191933;
typedef struct TY244233 TY244233;
typedef struct TY244239 TY244239;
typedef struct TY244273 TY244273;
typedef struct Vmargs244042 Vmargs244042;
typedef struct Tblock244030 Tblock244030;
typedef struct TY244213 TY244213;
struct  TGenericSeq  {
NI len;
NI reserved;
};
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Tcell46347  {
NI refcount;
TNimType* typ;
};
struct  Tcellseq46363  {
NI len;
NI cap;
Tcell46347** d;
};
struct  Tcellset46359  {
NI counter;
NI max;
Tpagedesc46355* head;
Tpagedesc46355** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46363 zct;
Tcellseq46363 decstack;
Tcellset46359 cycleroots;
Tcellseq46363 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tpasscontext242005  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Intset188056  {
NI counter;
NI max;
Ttrunk188052* head;
Ttrunkseq188054* data;
};
struct  Tlinkedlist130028  {
Tlistentry130022* head;
Tlistentry130022* tail;
NI counter;
};
struct  Tidtable191861  {
NI counter;
Tidpairseq191859* data;
};
typedef N_NIMCALL_PTR(Tnode191813*, TY245072) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245077) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245085) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245093) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245098) (Tcontext245023* c, Tnode191813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode191813*, TY245106) (Tcontext245023* c, Tnode191813* n);
typedef N_NIMCALL_PTR(Tnode191813*, TY245111) (Tcontext245023* c, Tnode191813* n, Tnode191813* norig, NU32 filter);
typedef N_NIMCALL_PTR(Ttype191849*, TY245118) (Tcontext245023* c, Tnode191813* n, Ttype191849* prev);
typedef struct {
N_NIMCALL_PTR(Tnode191813*, ClPrc) (Tcontext245023* c, Tidtable191861 pt, Tnode191813* n, void* ClEnv);
void* ClEnv;
} TY245124;
struct  Tlineinfo164338  {
NI16 line;
NI16 col;
NI32 fileindex;
};
typedef struct {
N_NIMCALL_PTR(Tsym191843*, ClPrc) (Tcontext245023* c, Tsym191843* fn, Tidtable191861 pt, Tlineinfo164338 info, void* ClEnv);
void* ClEnv;
} TY245130;
struct  Tstrtable191817  {
NI counter;
Tsymseq191815* data;
};
typedef N_NIMCALL_PTR(Tsym191843*, TY245146) (Tcontext245023* c, Tsym191843* dc, Ttype191849* t, Tlineinfo164338 info, NU8 op);
struct  Tcontext245023  {
  Tpasscontext242005 Sup;
Tsym191843* module;
Tscope191837* currentscope;
Tscope191837* importtable;
Tscope191837* toplevelscope;
Tproccon245011* p;
Tsymseq191815* friendmodules;
NI instcounter;
Intset188056 ambiguoussymbols;
NI intypeclass;
NI ingenericcontext;
NI inunrolledcontext;
NI incompilescontext;
NI ingenericinst;
Tsymseq191815* converters;
Tsymseq191815* patterns;
Tlinkedlist130028 optionstack;
Tidtable191861 symmapping;
Tlinkedlist130028 libs;
TY245072 semconstexpr;
TY245077 semexpr;
TY245085 semtryexpr;
TY245093 semtryconstexpr;
TY245098 semoperand;
TY245106 semconstboolexpr;
TY245111 semoverloadedcall;
TY245118 semtypenode;
TY245124 seminferredlambda;
TY245130 semgenerateinstance;
Intset188056 includedfiles;
Tstrtable191817 userpragmas;
Tctx244048* evalcontext;
Intset188056 unknownidents;
TY245141* generics;
NI lastgenericidx;
NI hloloopdetector;
NI inparallelstmt;
TY245146 insttypeboundop;
};
struct  Tproccon245011  {
Tsym191843* owner;
Tsym191843* resultsym;
NI nestedloopcounter;
NI nestedblockcounter;
NI intrystmt;
Tproccon245011* next;
NIM_BOOL wasforwarded;
Tnode191813* bracketexpr;
};
struct TY523942 {
void* Field0;
TY523945* Field1;
};
struct  Tinstantiationpair245013  {
Tsym191843* genericsym;
Tinstantiation191833* inst;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Toptionentry245005  {
  Tlistentry130022 Sup;
NU32 options;
NU8 defaultcc;
Tlib191831* dynlib;
NU64 notes;
Tnode191813* otherpragmas;
};
typedef Tsym191843* TY245432[1];
struct  Tidobj168015  {
  TNimObject Sup;
NI id;
};
struct  Tloc191827  {
NU8 k;
NU8 s;
NU16 flags;
Ttype191849* t;
Ropeobj162009* r;
Ropeobj162009* heaproot;
};
struct  Ttype191849  {
  Tidobj168015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq191845* sons;
Tnode191813* n;
Tsym191843* owner;
Tsym191843* sym;
Tsym191843* destructor;
Tsym191843* deepcopy;
Tsym191843* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc191827 loc;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct TY86345 {
NimStringDesc* Field0;
NI Field1;
};
struct  Tnode191813  {
Ttype191849* typ;
Tlineinfo164338 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym191843* sym;
} S4;
struct {Tident168021* ident;
} S5;
struct {Tnodeseq191807* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef Tnode191813* TY209680[1];
typedef Ttype191849* TY350187[1];
typedef Ttype191849* TY245864[2];
typedef Tnode191813* TY246103[2];
struct  Tlib191831  {
  Tlistentry130022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj162009* name;
Tnode191813* path;
};
struct  Tsym191843  {
  Tidobj168015 Sup;
NU8 kind;
union{
struct {Ttypeseq191845* typeinstcache;
Tscope191837* typscope;
} S1;
struct {TY191944* procinstcache;
Tsym191843* gcunsafetyreason;
} S2;
struct {TY191944* usedgenerics;
Tstrtable191817 tab;
} S3;
struct {Tsym191843* guard;
} S4;
} kindU;
NU16 magic;
Ttype191849* typ;
Tident168021* name;
Tlineinfo164338 info;
Tsym191843* owner;
NU32 flags;
Tnode191813* ast;
NU32 options;
NI position;
NI offset;
Tloc191827 loc;
Tlib191831* annex;
Tnode191813* constraint;
};
typedef NI TY27420[16];
struct  Tpagedesc46355  {
Tpagedesc46355* next;
NI key;
TY27420 bits;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
typedef Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope191837  {
NI depthlevel;
Tstrtable191817 symbols;
Tnodeseq191807* usingsyms;
Tscope191837* parent;
};
struct  Ttrunk188052  {
Ttrunk188052* next;
NI key;
TY27420 bits;
};
struct  Tidpair191857  {
Tidobj168015* key;
TNimObject* val;
};
struct  Tctx244048  {
  Tpasscontext242005 Sup;
TY244253* code;
TY165036* debug;
Tnode191813* globals;
Tnode191813* constants;
Ttypeseq191845* types;
Tnode191813* currentexceptiona;
Tnode191813* currentexceptionb;
NI exceptioninstr;
PprocHEX3Aobjecttype244232* prc;
Tsym191843* module;
Tnode191813* callsite;
NU8 mode;
NU8 features;
NIM_BOOL traceactive;
NI loopiterations;
Tlineinfo164338 comesfromheuristic;
TY244272* callbacks;
NimStringDesc* errorflag;
};
struct TY523945 {
char dummy;
};
struct  Tinstantiation191833  {
Tsym191843* sym;
Ttypeseq191845* concretetypes;
TY191933* usedby;
};
struct  Ropeobj162009  {
  TNimObject Sup;
Ropeobj162009* left;
Ropeobj162009* right;
NI length;
NimStringDesc* data;
};
struct  Tident168021  {
  Tidobj168015 Sup;
NimStringDesc* s;
Tident168021* next;
NI h;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct TY244239 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY244239 TY244236[256];
struct  PprocHEX3Aobjecttype244232  {
TY244233* blocks;
Tsym191843* sym;
TY244236 slots;
NI maxslots;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Vmargs244042* args, void* ClEnv);
void* ClEnv;
} Vmcallback244044;
struct TY244273 {
NimStringDesc* Field0;
Vmcallback244044 Field1;
};
struct  Tblock244030  {
Tsym191843* label;
TY244213* fixups;
};
struct  Vmargs244042  {
NI ra;
NI rb;
NI rc;
void* slots;
Tnode191813* currentexception;
};
struct Tsymseq191815 {
  TGenericSeq Sup;
  Tsym191843* data[SEQ_DECL_SIZE];
};
struct TY245141 {
  TGenericSeq Sup;
  Tinstantiationpair245013 data[SEQ_DECL_SIZE];
};
struct Ttypeseq191845 {
  TGenericSeq Sup;
  Ttype191849* data[SEQ_DECL_SIZE];
};
struct Tnodeseq191807 {
  TGenericSeq Sup;
  Tnode191813* data[SEQ_DECL_SIZE];
};
struct Ttrunkseq188054 {
  TGenericSeq Sup;
  Ttrunk188052* data[SEQ_DECL_SIZE];
};
struct Tidpairseq191859 {
  TGenericSeq Sup;
  Tidpair191857 data[SEQ_DECL_SIZE];
};
struct TY191944 {
  TGenericSeq Sup;
  Tinstantiation191833* data[SEQ_DECL_SIZE];
};
struct TY244253 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY165036 {
  TGenericSeq Sup;
  Tlineinfo164338 data[SEQ_DECL_SIZE];
};
struct TY244272 {
  TGenericSeq Sup;
  TY244273 data[SEQ_DECL_SIZE];
};
struct TY191933 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY244233 {
  TGenericSeq Sup;
  Tblock244030 data[SEQ_DECL_SIZE];
};
struct TY244213 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Tcell46347*, usrtocell_49846)(void* usr);
static N_INLINE(void, rtladdzct_51404)(Tcell46347* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46363* s, Tcell46347* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(Ttype191849*, newtype_194140)(NU8 kind, Tsym191843* owner);
N_NIMCALL(Tsym191843*, getcurrowner_245256)(void);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP1931)(void* p, NI op);
N_NIMCALL(void, TMP1956)(void* p, NI op);
N_NIMCALL(void, TMP1957)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, initintset_188927)(Intset188056* Result);
N_NIMCALL(void, initlinkedlist_130043)(Tlinkedlist130028* list);
N_NIMCALL(void, append_130053)(Tlinkedlist130028* list, Tlistentry130022* entry);
N_NIMCALL(Toptionentry245005*, newoptionentry_245194)(void);
N_NIMCALL(void, TMP1962)(void* p, NI op);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_52222)(Tcell46347* c);
static N_INLINE(NIM_BOOL, canbecycleroot_49867)(Tcell46347* c);
static N_INLINE(void, rtladdcycleroot_50623)(Tcell46347* c);
N_NOINLINE(void, incl_47065)(Tcellset46359* s, Tcell46347* cell);
static N_INLINE(void, decref_51804)(Tcell46347* c);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, initstrtable_195007)(Tstrtable191817* x);
N_NIMCALL(Ttype191849*, newtypes_245219)(NU8 kind, Tcontext245023* c);
N_NIMCALL(void, addsonskipintlit_239729)(Ttype191849* father, Ttype191849* son);
N_NIMCALL(void, internalerror_166218)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_166306)(TY86345 x);
N_NIMCALL(void, globalerror_166134)(Tlineinfo164338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_213058)(Tnode191813* n, NU8 renderflags);
N_NIMCALL(NI, sonslen_194403)(Tnode191813* n);
N_NIMCALL(void, illformedast_246229)(Tnode191813* n);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_81204, TNimType* mt);
N_NIMCALL(Tnode191813*, newnodei_193351)(NU8 kind, Tlineinfo164338 info);
N_NIMCALL(void, addson_193819)(Tnode191813* father, Tnode191813* son);
N_NIMCALL(Tnode191813*, newinttypenode_192620)(NU8 kind, NI64 intval, Ttype191849* typ);
N_NIMCALL(Ttype191849*, newtypewithsons_245807)(Tcontext245023* c, NU8 kind, Ttypeseq191845* sons);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, propagatetoowner_195274)(Ttype191849* owner, Ttype191849* elem);
N_NIMCALL(Ttype191849*, getsystype_239030)(NU8 kind);
N_NIMCALL(Tnode191813*, newnode_193607)(NU8 kind, Tlineinfo164338 info, Tnodeseq191807* sons, Ttype191849* typ);
N_NIMCALL(Tnode191813*, makestaticexpr_245820)(Tcontext245023* c, Tnode191813* n);
N_NIMCALL(Tnode191813*, nminusone_246061)(Tnode191813* n);
N_NIMCALL(Tnode191813*, newsymnode_193325)(Tsym191843* sym);
N_NIMCALL(Tsym191843*, getsysmagic_239155)(NimStringDesc* name, NU16 m);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, localerror_166155)(Tlineinfo164338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(Ttype191849*, errortype_246150)(Tcontext245023* c);
N_NIMCALL(Ttype191849*, maketypedesc_245682)(Tcontext245023* c, Ttype191849* typ);
N_NIMCALL(Tsym191843*, linkto_192884)(Tsym191843* s, Ttype191849* t);
N_NIMCALL(Tsym191843*, newsym_192656)(NU8 symkind, Tident168021* name, Tsym191843* owner, Tlineinfo164338 info);
N_NIMCALL(Tnode191813*, newsymnode_193338)(Tsym191843* sym, Tlineinfo164338 info);
N_NIMCALL(void, inclsym_245500)(Tsymseq191815** sq, Tsym191843* s);
STRING_LITERAL(TMP2638, "semdata.nim", 11);
NIM_CONST TY86345 TMP2637 = {((NimStringDesc*) &TMP2638),
((NI) 224)}
;
NIM_CONST TY86345 TMP2651 = {((NimStringDesc*) &TMP2638),
((NI) 220)}
;
STRING_LITERAL(TMP2996, "<", 1);
STRING_LITERAL(TMP3155, "popOwner", 8);
NIM_CONST TY86345 TMP3199 = {((NimStringDesc*) &TMP2638),
((NI) 213)}
;
Tsymseq191815* gowners_245289;
extern TNimType NTI191815; /* TSymSeq */
extern Tgcheap48216 gch_48244;
extern TNimType NTI242005; /* TPassContext */
TNimType NTI245023; /* TContext */
extern TNimType NTI191811; /* PSym */
extern TNimType NTI191839; /* PScope */
TNimType NTI245011; /* TProcCon */
extern TNimType NTI108; /* int */
extern TNimType NTI138; /* bool */
extern TNimType NTI191805; /* PNode */
TNimType NTI245009; /* PProcCon */
extern TNimType NTI188056; /* IntSet */
extern TNimType NTI130028; /* TLinkedList */
extern TNimType NTI191861; /* TIdTable */
TNimType NTI245072; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI245077; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI245085; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI245093; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI245098; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI245106; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI245111; /* proc (c: PContext, n: PNode, nOrig: PNode, filter: TSymKinds): PNode */
TNimType NTI245118; /* proc (c: PContext, n: PNode, prev: PType): PType */
TNimType NTI245124; /* (pointer, ref tuple[]) */
extern TNimType NTI153; /* pointer */
extern TNimType NTI523944; /* ref tuple[] */
TNimType NTI245130; /* (pointer, ref tuple[]) */
extern TNimType NTI191817; /* TStrTable */
extern TNimType NTI244046; /* PCtx */
TNimType NTI245013; /* TInstantiationPair */
extern TNimType NTI191835; /* PInstantiation */
TNimType NTI245141; /* seq[TInstantiationPair] */
TNimType NTI245146; /* proc (c: PContext, dc: PSym, t: PType, info: TLineInfo, op: TTypeAttachedOp): PSym */
TNimType NTI245021; /* PContext */
extern TNimType NTI130022; /* TListEntry */
TNimType NTI245005; /* TOptionEntry */
extern TNimType NTI155016; /* TOptions */
extern TNimType NTI191005; /* TCallingConvention */
extern TNimType NTI191841; /* PLib */
extern TNimType NTI164334; /* TNoteKinds */
TNimType NTI245007; /* POptionEntry */
extern NU32 goptions_155126;
extern NU64 gnotes_165014;
extern TNimType NTI191845; /* TTypeSeq */
extern TNimType NTI191807; /* TNodeSeq */
extern TNimType NTI191831; /* TLib */
extern Tident168021* idanon_168495;

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

static N_INLINE(void, rtladdzct_51404)(Tcell46347* c) {
	addzct_49817((&gch_48244.zct), c);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Tcell46347* c;
	c = usrtocell_49846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	LA3: ;
}

N_NIMCALL(Tsym191843*, getcurrowner_245256)(void) {
	Tsym191843* result;
	result = 0;
	result = gowners_245289->data[(gowners_245289 ? (gowners_245289->Sup.len-1) : -1)];
	return result;
}

N_NIMCALL(Ttype191849*, newtypes_245219)(NU8 kind, Tcontext245023* c) {
	Ttype191849* result;
	Tsym191843* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_245256();
	result = newtype_194140(kind, LOC1);
	return result;
}
N_NIMCALL(void, TMP1931)(void* p, NI op) {
	Tproccon245011* a;
	a = (Tproccon245011*)p;
	nimGCvisit((void*)(*a).owner, op);
	nimGCvisit((void*)(*a).resultsym, op);
	nimGCvisit((void*)(*a).next, op);
	nimGCvisit((void*)(*a).bracketexpr, op);
}
N_NIMCALL(void, TMP1956)(void* p, NI op) {
	TY245141* a;
	NI LOC1;
	a = (TY245141*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].genericsym, op);
	nimGCvisit((void*)a->data[LOC1].inst, op);
	}
}
N_NIMCALL(void, TMP1957)(void* p, NI op) {
	Tcontext245023* a;
	a = (Tcontext245023*)p;
	nimGCvisit((void*)(*a).module, op);
	nimGCvisit((void*)(*a).currentscope, op);
	nimGCvisit((void*)(*a).importtable, op);
	nimGCvisit((void*)(*a).toplevelscope, op);
	nimGCvisit((void*)(*a).p, op);
	nimGCvisit((void*)(*a).friendmodules, op);
	nimGCvisit((void*)(*a).ambiguoussymbols.head, op);
	nimGCvisit((void*)(*a).ambiguoussymbols.data, op);
	nimGCvisit((void*)(*a).converters, op);
	nimGCvisit((void*)(*a).patterns, op);
	nimGCvisit((void*)(*a).optionstack.head, op);
	nimGCvisit((void*)(*a).optionstack.tail, op);
	nimGCvisit((void*)(*a).symmapping.data, op);
	nimGCvisit((void*)(*a).libs.head, op);
	nimGCvisit((void*)(*a).libs.tail, op);
	nimGCvisit((void*)(*a).seminferredlambda.ClEnv, op);
	nimGCvisit((void*)(*a).semgenerateinstance.ClEnv, op);
	nimGCvisit((void*)(*a).includedfiles.head, op);
	nimGCvisit((void*)(*a).includedfiles.data, op);
	nimGCvisit((void*)(*a).userpragmas.data, op);
	nimGCvisit((void*)(*a).evalcontext, op);
	nimGCvisit((void*)(*a).unknownidents.head, op);
	nimGCvisit((void*)(*a).unknownidents.data, op);
	nimGCvisit((void*)(*a).generics, op);
}
N_NIMCALL(void, TMP1962)(void* p, NI op) {
	Toptionentry245005* a;
	a = (Toptionentry245005*)p;
	nimGCvisit((void*)(*a).Sup.prev, op);
	nimGCvisit((void*)(*a).Sup.next, op);
	nimGCvisit((void*)(*a).dynlib, op);
	nimGCvisit((void*)(*a).otherpragmas, op);
}

static N_INLINE(NIM_BOOL, canbecycleroot_49867)(Tcell46347* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_50623)(Tcell46347* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_47065((&gch_48244.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_52222)(Tcell46347* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_49867(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_50623(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_51804)(Tcell46347* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_49867(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_50623(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Tcell46347* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_49846(src);
		incref_52222(LOC5);
	}
	LA3: ;
	{
		Tcell46347* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_49846((*dest));
		decref_51804(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Toptionentry245005*, newoptionentry_245194)(void) {
	Toptionentry245005* result;
	result = 0;
	result = (Toptionentry245005*) newObj((&NTI245007), sizeof(Toptionentry245005));
	(*result).Sup.Sup.m_type = (&NTI245005);
	(*result).options = goptions_155126;
	(*result).defaultcc = ((NU8) 0);
	asgnRef((void**) (&(*result).dynlib), NIM_NIL);
	(*result).notes = gnotes_165014;
	return result;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Tcell46347* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_49846(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46347* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_49846((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_51404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(Tcontext245023*, newcontext_245182)(Tsym191843* module) {
	Tcontext245023* result;
	Toptionentry245005* LOC1;
	Tlistentry130022* LOC2;
	TY245432 LOC3;
	result = 0;
	result = (Tcontext245023*) newObj((&NTI245021), sizeof(Tcontext245023));
	(*result).Sup.Sup.m_type = (&NTI245023);
	initintset_188927((&(*result).ambiguoussymbols));
	initlinkedlist_130043((&(*result).optionstack));
	initlinkedlist_130043((&(*result).libs));
	LOC1 = 0;
	LOC1 = newoptionentry_245194();
	LOC2 = 0;
	LOC2 = &LOC1->Sup;
	append_130053((&(*result).optionstack), LOC2);
	asgnRefNoCycle((void**) (&(*result).module), module);
	if ((*result).friendmodules) nimGCunrefNoCycle((*result).friendmodules);
	(*result).friendmodules = (Tsymseq191815*) newSeqRC1((&NTI191815), 1);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = module;
	asgnRefNoCycle((void**) (&(*result).friendmodules->data[0]), LOC3[0]);
	if ((*result).converters) nimGCunrefNoCycle((*result).converters);
	(*result).converters = (Tsymseq191815*) newSeqRC1((&NTI191815), 0);
	if ((*result).patterns) nimGCunrefNoCycle((*result).patterns);
	(*result).patterns = (Tsymseq191815*) newSeqRC1((&NTI191815), 0);
	initintset_188927((&(*result).includedfiles));
	initstrtable_195007((&(*result).userpragmas));
	if ((*result).generics) nimGCunrefNoCycle((*result).generics);
	(*result).generics = (TY245141*) newSeqRC1((&NTI245141), 0);
	initintset_188927((&(*result).unknownidents));
	return result;
}

N_NIMCALL(Ttype191849*, maketypefromexpr_245727)(Tcontext245023* c, Tnode191813* n) {
	Ttype191849* result;
	result = 0;
	result = newtypes_245219(((NU8) 60), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	return result;
}

N_NIMCALL(Ttype191849*, errortype_246150)(Tcontext245023* c) {
	Ttype191849* result;
	result = 0;
	result = newtypes_245219(((NU8) 50), c);
	return result;
}

N_NIMCALL(Ttype191849*, maketypedesc_245682)(Tcontext245023* c, Ttype191849* typ) {
	Ttype191849* result;
	result = 0;
	result = newtypes_245219(((NU8) 8), c);
	{
		NimStringDesc* LOC5;
		if (!(typ == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_166306(TMP2637);
		internalerror_166218(LOC5);
	}
	LA3: ;
	addsonskipintlit_239729(result, typ);
	return result;
}

N_NIMCALL(void, illformedast_246229)(Tnode191813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_213058(n, 4);
	globalerror_166134((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(void, checksonslen_246249)(Tnode191813* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_194403(n);
		if (!!((LOC3 == length))) goto LA4;
		illformedast_246229(n);
	}
	LA4: ;
}

N_NIMCALL(Ttype191849*, newtypewithsons_245807)(Tcontext245023* c, NU8 kind, Ttypeseq191845* sons) {
	Ttype191849* result;
	Tsym191843* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_245256();
	result = newtype_194140(kind, LOC1);
	genericSeqAssign((&(*result).sons), sons, (&NTI191845));
	return result;
}

N_NIMCALL(Ttype191849*, makevartype_245643)(Tcontext245023* c, Ttype191849* basetype) {
	Ttype191849* result;
	result = 0;
	{
		if (!((*basetype).kind == ((NU8) 23))) goto LA3;
		result = basetype;
	}
	goto LA1;
	LA3: ;
	{
		result = newtypes_245219(((NU8) 23), c);
		{
			NimStringDesc* LOC10;
			if (!(basetype == NIM_NIL)) goto LA8;
			LOC10 = 0;
			LOC10 = HEX24_166306(TMP2651);
			internalerror_166218(LOC10);
		}
		LA8: ;
		addsonskipintlit_239729(result, basetype);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Ttype191849*, makerangetype_246182)(Tcontext245023* c, NI64 first, NI64 last, Tlineinfo164338 info, Ttype191849* inttype) {
	Ttype191849* result;
	Tnode191813* n;
	Tnode191813* LOC1;
	Tnode191813* LOC2;
	result = 0;
	n = newnodei_193351(((NU8) 44), info);
	LOC1 = 0;
	LOC1 = newinttypenode_192620(((NU8) 6), first, inttype);
	addson_193819(n, LOC1);
	LOC2 = 0;
	LOC2 = newinttypenode_192620(((NU8) 6), last, inttype);
	addson_193819(n, LOC2);
	result = newtypes_245219(((NU8) 20), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	addsonskipintlit_239729(result, inttype);
	return result;
}

N_NIMCALL(Tnode191813*, makestaticexpr_245820)(Tcontext245023* c, Tnode191813* n) {
	Tnode191813* result;
	TY209680 LOC1;
	Ttypeseq191845* LOC2;
	TY350187 LOC3;
	result = 0;
	result = newnodei_193351(((NU8) 62), (*n).info);
	if ((*result).kindU.S6.sons) nimGCunrefNoCycle((*result).kindU.S6.sons);
	(*result).kindU.S6.sons = (Tnodeseq191807*) newSeqRC1((&NTI191807), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = n;
	asgnRefNoCycle((void**) (&(*result).kindU.S6.sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Ttypeseq191845*) newSeq((&NTI191845), 1);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = (*n).typ;
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&(*result).typ), newtypewithsons_245807(c, ((NU8) 59), LOC2));
	return result;
}

N_NIMCALL(Ttype191849*, makeandtype_245858)(Tcontext245023* c, Ttype191849* t1, Ttype191849* t2) {
	Ttype191849* result;
	TY245864 LOC1;
	result = 0;
	result = newtypes_245219(((NU8) 55), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq191845*) newSeqRC1((&NTI191845), 2);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = t1;
	LOC1[1] = t2;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	asgnRefNoCycle((void**) (&(*result).sons->data[1]), LOC1[1]);
	propagatetoowner_195274(result, t1);
	propagatetoowner_195274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(Ttype191849*, makeortype_245930)(Tcontext245023* c, Ttype191849* t1, Ttype191849* t2) {
	Ttype191849* result;
	TY245864 LOC1;
	result = 0;
	result = newtypes_245219(((NU8) 56), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq191845*) newSeqRC1((&NTI191845), 2);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = t1;
	LOC1[1] = t2;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	asgnRefNoCycle((void**) (&(*result).sons->data[1]), LOC1[1]);
	propagatetoowner_195274(result, t1);
	propagatetoowner_195274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(Ttype191849*, makenottype_246002)(Tcontext245023* c, Ttype191849* t1) {
	Ttype191849* result;
	TY350187 LOC1;
	result = 0;
	result = newtypes_245219(((NU8) 57), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq191845*) newSeqRC1((&NTI191845), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = t1;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	propagatetoowner_195274(result, t1);
	(*result).flags = ((*result).flags | ((*t1).flags & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(void, checkminsonslen_246259)(Tnode191813* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_194403(n);
		if (!(LOC3 < length)) goto LA4;
		illformedast_246229(n);
	}
	LA4: ;
}

N_NIMCALL(Tnode191813*, nminusone_246061)(Tnode191813* n) {
	Tnode191813* result;
	Tnodeseq191807* LOC1;
	TY246103 LOC2;
	Tsym191843* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tnodeseq191807*) newSeq((&NTI191807), 2);
	memset((void*)LOC2, 0, sizeof(LOC2));
	LOC3 = 0;
	LOC3 = getsysmagic_239155(((NimStringDesc*) &TMP2996), ((NU16) 22));
	LOC2[0] = newsymnode_193325(LOC3);
	LOC2[1] = n;
	asgnRefNoCycle((void**) (&LOC1->data[0]), LOC2[0]);
	asgnRefNoCycle((void**) (&LOC1->data[1]), LOC2[1]);
	result = newnode_193607(((NU8) 27), (*n).info, LOC1, NIM_NIL);
	return result;
}

N_NIMCALL(Ttype191849*, makerangewithstaticexpr_246084)(Tcontext245023* c, Tnode191813* n) {
	Ttype191849* result;
	Ttype191849* inttype;
	TY350187 LOC1;
	Tnodeseq191807* LOC2;
	TY246103 LOC3;
	Tnode191813* LOC4;
	result = 0;
	inttype = getsystype_239030(((NU8) 31));
	result = newtypes_245219(((NU8) 20), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq191845*) newSeqRC1((&NTI191845), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = inttype;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Tnodeseq191807*) newSeq((&NTI191807), 2);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = newinttypenode_192620(((NU8) 6), IL64(0), inttype);
	LOC4 = 0;
	LOC4 = nminusone_246061(n);
	LOC3[1] = makestaticexpr_245820(c, LOC4);
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&LOC2->data[1]), LOC3[1]);
	asgnRefNoCycle((void**) (&(*result).n), newnode_193607(((NU8) 44), (*n).info, LOC2, NIM_NIL));
	return result;
}

N_NIMCALL(void, pushowner_245261)(Tsym191843* owner) {
	gowners_245289 = (Tsymseq191815*) incrSeq(&(gowners_245289)->Sup, sizeof(Tsym191843*));
	asgnRefNoCycle((void**) (&gowners_245289->data[gowners_245289->Sup.len-1]), owner);
}

N_NIMCALL(void, makeinstpair_245157)(Tsym191843* s, Tinstantiation191833* inst, Tinstantiationpair245013* Result) {
	unsureAsgnRef((void**) (&(*Result).genericsym), s);
	unsureAsgnRef((void**) (&(*Result).inst), inst);
}

N_NIMCALL(Tlib191831*, newlib_245199)(NU8 kind) {
	Tlib191831* result;
	result = 0;
	result = (Tlib191831*) newObj((&NTI191841), sizeof(Tlib191831));
	(*result).Sup.Sup.m_type = (&NTI191831);
	(*result).kind = kind;
	return result;
}

N_NIMCALL(void, addtolib_245205)(Tlib191831* lib, Tsym191843* sym) {
	asgnRef((void**) (&(*sym).annex), lib);
}

N_NIMCALL(void, illformedastlocal_246239)(Tnode191813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_213058(n, 4);
	localerror_166155((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(Toptionentry245005*, lastoptionentry_245188)(Tcontext245023* c) {
	Toptionentry245005* result;
	result = 0;
	result = ((Toptionentry245005*) ((*c).optionstack.tail));
	return result;
}

N_NIMCALL(void, popowner_245267)(void) {
	NI length;
	length = (gowners_245289 ? gowners_245289->Sup.len : 0);
	{
		if (!(((NI) 0) < length)) goto LA3;
		gowners_245289 = (Tsymseq191815*) setLengthSeq(&(gowners_245289)->Sup, sizeof(Tsym191843*), ((NI) ((NI)(length - ((NI) 1)))));
	}
	goto LA1;
	LA3: ;
	{
		internalerror_166218(((NimStringDesc*) &TMP3155));
	}
	LA1: ;
}

N_NIMCALL(Ttype191849*, makeptrtype_245212)(Tcontext245023* c, Ttype191849* basetype) {
	Ttype191849* result;
	result = 0;
	result = newtypes_245219(((NU8) 21), c);
	{
		NimStringDesc* LOC5;
		if (!(basetype == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_166306(TMP3199);
		internalerror_166218(LOC5);
	}
	LA3: ;
	addsonskipintlit_239729(result, basetype);
	return result;
}

N_NIMCALL(Tnode191813*, errornode_246160)(Tcontext245023* c, Tnode191813* n) {
	Tnode191813* result;
	result = 0;
	result = newnodei_193351(((NU8) 1), (*n).info);
	asgnRefNoCycle((void**) (&(*result).typ), errortype_246150(c));
	return result;
}

N_NIMCALL(Tnode191813*, maketypesymnode_245712)(Tcontext245023* c, Ttype191849* typ, Tlineinfo164338 info) {
	Tnode191813* result;
	Ttype191849* typedesc;
	Tsym191843* sym;
	Tsym191843* LOC1;
	Tsym191843* LOC2;
{	result = 0;
	typedesc = maketypedesc_245682(c, typ);
	LOC1 = 0;
	LOC1 = getcurrowner_245256();
	LOC2 = 0;
	LOC2 = newsym_192656(((NU8) 7), idanon_168495, LOC1, info);
	sym = linkto_192884(LOC2, typedesc);
	result = newsymnode_193338(sym, info);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, inclsym_245500)(Tsymseq191815** sq, Tsym191843* s) {
	NI L;
{	L = ((*sq) ? (*sq)->Sup.len : 0);
	{
		NI i_245526;
		NI HEX3Atmp_245540;
		NI res_245543;
		i_245526 = 0;
		HEX3Atmp_245540 = 0;
		HEX3Atmp_245540 = (NI)(L - ((NI) 1));
		res_245543 = ((NI) 0);
		{
			while (1) {
				if (!(res_245543 <= HEX3Atmp_245540)) goto LA3;
				i_245526 = res_245543;
				{
					if (!((*(*sq)->data[i_245526]).Sup.id == (*s).Sup.id)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				res_245543 += ((NI) 1);
			} LA3: ;
		}
	}
	(*sq) = (Tsymseq191815*) setLengthSeq(&((*sq))->Sup, sizeof(Tsym191843*), ((NI) ((NI)(L + ((NI) 1)))));
	asgnRefNoCycle((void**) (&(*sq)->data[L]), s);
	}BeforeRet: ;
}

N_NIMCALL(void, addconverter_245562)(Tcontext245023* c, Tsym191843* conv) {
	inclsym_245500((&(*c).converters), conv);
}

N_NIMCALL(void, addpattern_245573)(Tcontext245023* c, Tsym191843* p) {
	inclsym_245500((&(*c).patterns), p);
}
NIM_EXTERNC N_NOINLINE(void, nimsrc_semdataInit)(void) {
	if (gowners_245289) nimGCunrefNoCycle(gowners_245289);
	gowners_245289 = (Tsymseq191815*) newSeqRC1((&NTI191815), 0);
}

NIM_EXTERNC N_NOINLINE(void, nimsrc_semdataDatInit)(void) {
static TNimNode* TMP1929[37];
static TNimNode* TMP1930[8];
static TNimNode* TMP1932[2];
static TNimNode* TMP1933[2];
static TNimNode* TMP1955[2];
static TNimNode* TMP1958[5];
static TNimNode TMP850[62];
NTI245023.size = sizeof(Tcontext245023);
NTI245023.kind = 17;
NTI245023.base = (&NTI242005);
TMP1929[0] = &TMP850[1];
TMP850[1].kind = 1;
TMP850[1].offset = offsetof(Tcontext245023, module);
TMP850[1].typ = (&NTI191811);
TMP850[1].name = "module";
TMP1929[1] = &TMP850[2];
TMP850[2].kind = 1;
TMP850[2].offset = offsetof(Tcontext245023, currentscope);
TMP850[2].typ = (&NTI191839);
TMP850[2].name = "currentScope";
TMP1929[2] = &TMP850[3];
TMP850[3].kind = 1;
TMP850[3].offset = offsetof(Tcontext245023, importtable);
TMP850[3].typ = (&NTI191839);
TMP850[3].name = "importTable";
TMP1929[3] = &TMP850[4];
TMP850[4].kind = 1;
TMP850[4].offset = offsetof(Tcontext245023, toplevelscope);
TMP850[4].typ = (&NTI191839);
TMP850[4].name = "topLevelScope";
TMP1929[4] = &TMP850[5];
NTI245011.size = sizeof(Tproccon245011);
NTI245011.kind = 18;
NTI245011.base = 0;
TMP1930[0] = &TMP850[7];
TMP850[7].kind = 1;
TMP850[7].offset = offsetof(Tproccon245011, owner);
TMP850[7].typ = (&NTI191811);
TMP850[7].name = "owner";
TMP1930[1] = &TMP850[8];
TMP850[8].kind = 1;
TMP850[8].offset = offsetof(Tproccon245011, resultsym);
TMP850[8].typ = (&NTI191811);
TMP850[8].name = "resultSym";
TMP1930[2] = &TMP850[9];
TMP850[9].kind = 1;
TMP850[9].offset = offsetof(Tproccon245011, nestedloopcounter);
TMP850[9].typ = (&NTI108);
TMP850[9].name = "nestedLoopCounter";
TMP1930[3] = &TMP850[10];
TMP850[10].kind = 1;
TMP850[10].offset = offsetof(Tproccon245011, nestedblockcounter);
TMP850[10].typ = (&NTI108);
TMP850[10].name = "nestedBlockCounter";
TMP1930[4] = &TMP850[11];
TMP850[11].kind = 1;
TMP850[11].offset = offsetof(Tproccon245011, intrystmt);
TMP850[11].typ = (&NTI108);
TMP850[11].name = "inTryStmt";
TMP1930[5] = &TMP850[12];
TMP850[12].kind = 1;
TMP850[12].offset = offsetof(Tproccon245011, next);
TMP850[12].typ = (&NTI245009);
TMP850[12].name = "next";
TMP1930[6] = &TMP850[13];
TMP850[13].kind = 1;
TMP850[13].offset = offsetof(Tproccon245011, wasforwarded);
TMP850[13].typ = (&NTI138);
TMP850[13].name = "wasForwarded";
TMP1930[7] = &TMP850[14];
TMP850[14].kind = 1;
TMP850[14].offset = offsetof(Tproccon245011, bracketexpr);
TMP850[14].typ = (&NTI191805);
TMP850[14].name = "bracketExpr";
TMP850[6].len = 8; TMP850[6].kind = 2; TMP850[6].sons = &TMP1930[0];
NTI245011.node = &TMP850[6];
NTI245009.size = sizeof(Tproccon245011*);
NTI245009.kind = 22;
NTI245009.base = (&NTI245011);
NTI245009.marker = TMP1931;
TMP850[5].kind = 1;
TMP850[5].offset = offsetof(Tcontext245023, p);
TMP850[5].typ = (&NTI245009);
TMP850[5].name = "p";
TMP1929[5] = &TMP850[15];
TMP850[15].kind = 1;
TMP850[15].offset = offsetof(Tcontext245023, friendmodules);
TMP850[15].typ = (&NTI191815);
TMP850[15].name = "friendModules";
TMP1929[6] = &TMP850[16];
TMP850[16].kind = 1;
TMP850[16].offset = offsetof(Tcontext245023, instcounter);
TMP850[16].typ = (&NTI108);
TMP850[16].name = "instCounter";
TMP1929[7] = &TMP850[17];
TMP850[17].kind = 1;
TMP850[17].offset = offsetof(Tcontext245023, ambiguoussymbols);
TMP850[17].typ = (&NTI188056);
TMP850[17].name = "ambiguousSymbols";
TMP1929[8] = &TMP850[18];
TMP850[18].kind = 1;
TMP850[18].offset = offsetof(Tcontext245023, intypeclass);
TMP850[18].typ = (&NTI108);
TMP850[18].name = "inTypeClass";
TMP1929[9] = &TMP850[19];
TMP850[19].kind = 1;
TMP850[19].offset = offsetof(Tcontext245023, ingenericcontext);
TMP850[19].typ = (&NTI108);
TMP850[19].name = "inGenericContext";
TMP1929[10] = &TMP850[20];
TMP850[20].kind = 1;
TMP850[20].offset = offsetof(Tcontext245023, inunrolledcontext);
TMP850[20].typ = (&NTI108);
TMP850[20].name = "inUnrolledContext";
TMP1929[11] = &TMP850[21];
TMP850[21].kind = 1;
TMP850[21].offset = offsetof(Tcontext245023, incompilescontext);
TMP850[21].typ = (&NTI108);
TMP850[21].name = "inCompilesContext";
TMP1929[12] = &TMP850[22];
TMP850[22].kind = 1;
TMP850[22].offset = offsetof(Tcontext245023, ingenericinst);
TMP850[22].typ = (&NTI108);
TMP850[22].name = "inGenericInst";
TMP1929[13] = &TMP850[23];
TMP850[23].kind = 1;
TMP850[23].offset = offsetof(Tcontext245023, converters);
TMP850[23].typ = (&NTI191815);
TMP850[23].name = "converters";
TMP1929[14] = &TMP850[24];
TMP850[24].kind = 1;
TMP850[24].offset = offsetof(Tcontext245023, patterns);
TMP850[24].typ = (&NTI191815);
TMP850[24].name = "patterns";
TMP1929[15] = &TMP850[25];
TMP850[25].kind = 1;
TMP850[25].offset = offsetof(Tcontext245023, optionstack);
TMP850[25].typ = (&NTI130028);
TMP850[25].name = "optionStack";
TMP1929[16] = &TMP850[26];
TMP850[26].kind = 1;
TMP850[26].offset = offsetof(Tcontext245023, symmapping);
TMP850[26].typ = (&NTI191861);
TMP850[26].name = "symMapping";
TMP1929[17] = &TMP850[27];
TMP850[27].kind = 1;
TMP850[27].offset = offsetof(Tcontext245023, libs);
TMP850[27].typ = (&NTI130028);
TMP850[27].name = "libs";
TMP1929[18] = &TMP850[28];
NTI245072.size = sizeof(TY245072);
NTI245072.kind = 25;
NTI245072.base = 0;
NTI245072.flags = 3;
TMP850[28].kind = 1;
TMP850[28].offset = offsetof(Tcontext245023, semconstexpr);
TMP850[28].typ = (&NTI245072);
TMP850[28].name = "semConstExpr";
TMP1929[19] = &TMP850[29];
NTI245077.size = sizeof(TY245077);
NTI245077.kind = 25;
NTI245077.base = 0;
NTI245077.flags = 3;
TMP850[29].kind = 1;
TMP850[29].offset = offsetof(Tcontext245023, semexpr);
TMP850[29].typ = (&NTI245077);
TMP850[29].name = "semExpr";
TMP1929[20] = &TMP850[30];
NTI245085.size = sizeof(TY245085);
NTI245085.kind = 25;
NTI245085.base = 0;
NTI245085.flags = 3;
TMP850[30].kind = 1;
TMP850[30].offset = offsetof(Tcontext245023, semtryexpr);
TMP850[30].typ = (&NTI245085);
TMP850[30].name = "semTryExpr";
TMP1929[21] = &TMP850[31];
NTI245093.size = sizeof(TY245093);
NTI245093.kind = 25;
NTI245093.base = 0;
NTI245093.flags = 3;
TMP850[31].kind = 1;
TMP850[31].offset = offsetof(Tcontext245023, semtryconstexpr);
TMP850[31].typ = (&NTI245093);
TMP850[31].name = "semTryConstExpr";
TMP1929[22] = &TMP850[32];
NTI245098.size = sizeof(TY245098);
NTI245098.kind = 25;
NTI245098.base = 0;
NTI245098.flags = 3;
TMP850[32].kind = 1;
TMP850[32].offset = offsetof(Tcontext245023, semoperand);
TMP850[32].typ = (&NTI245098);
TMP850[32].name = "semOperand";
TMP1929[23] = &TMP850[33];
NTI245106.size = sizeof(TY245106);
NTI245106.kind = 25;
NTI245106.base = 0;
NTI245106.flags = 3;
TMP850[33].kind = 1;
TMP850[33].offset = offsetof(Tcontext245023, semconstboolexpr);
TMP850[33].typ = (&NTI245106);
TMP850[33].name = "semConstBoolExpr";
TMP1929[24] = &TMP850[34];
NTI245111.size = sizeof(TY245111);
NTI245111.kind = 25;
NTI245111.base = 0;
NTI245111.flags = 3;
TMP850[34].kind = 1;
TMP850[34].offset = offsetof(Tcontext245023, semoverloadedcall);
TMP850[34].typ = (&NTI245111);
TMP850[34].name = "semOverloadedCall";
TMP1929[25] = &TMP850[35];
NTI245118.size = sizeof(TY245118);
NTI245118.kind = 25;
NTI245118.base = 0;
NTI245118.flags = 3;
TMP850[35].kind = 1;
TMP850[35].offset = offsetof(Tcontext245023, semtypenode);
TMP850[35].typ = (&NTI245118);
TMP850[35].name = "semTypeNode";
TMP1929[26] = &TMP850[36];
NTI245124.size = sizeof(TY523942);
NTI245124.kind = 18;
NTI245124.base = 0;
NTI245124.flags = 2;
TMP1932[0] = &TMP850[38];
TMP850[38].kind = 1;
TMP850[38].offset = offsetof(TY523942, Field0);
TMP850[38].typ = (&NTI153);
TMP850[38].name = "Field0";
TMP1932[1] = &TMP850[39];
TMP850[39].kind = 1;
TMP850[39].offset = offsetof(TY523942, Field1);
TMP850[39].typ = (&NTI523944);
TMP850[39].name = "Field1";
TMP850[37].len = 2; TMP850[37].kind = 2; TMP850[37].sons = &TMP1932[0];
NTI245124.node = &TMP850[37];
TMP850[36].kind = 1;
TMP850[36].offset = offsetof(Tcontext245023, seminferredlambda);
TMP850[36].typ = (&NTI245124);
TMP850[36].name = "semInferredLambda";
TMP1929[27] = &TMP850[40];
NTI245130.size = sizeof(TY523942);
NTI245130.kind = 18;
NTI245130.base = 0;
NTI245130.flags = 2;
TMP1933[0] = &TMP850[42];
TMP850[42].kind = 1;
TMP850[42].offset = offsetof(TY523942, Field0);
TMP850[42].typ = (&NTI153);
TMP850[42].name = "Field0";
TMP1933[1] = &TMP850[43];
TMP850[43].kind = 1;
TMP850[43].offset = offsetof(TY523942, Field1);
TMP850[43].typ = (&NTI523944);
TMP850[43].name = "Field1";
TMP850[41].len = 2; TMP850[41].kind = 2; TMP850[41].sons = &TMP1933[0];
NTI245130.node = &TMP850[41];
TMP850[40].kind = 1;
TMP850[40].offset = offsetof(Tcontext245023, semgenerateinstance);
TMP850[40].typ = (&NTI245130);
TMP850[40].name = "semGenerateInstance";
TMP1929[28] = &TMP850[44];
TMP850[44].kind = 1;
TMP850[44].offset = offsetof(Tcontext245023, includedfiles);
TMP850[44].typ = (&NTI188056);
TMP850[44].name = "includedFiles";
TMP1929[29] = &TMP850[45];
TMP850[45].kind = 1;
TMP850[45].offset = offsetof(Tcontext245023, userpragmas);
TMP850[45].typ = (&NTI191817);
TMP850[45].name = "userPragmas";
TMP1929[30] = &TMP850[46];
TMP850[46].kind = 1;
TMP850[46].offset = offsetof(Tcontext245023, evalcontext);
TMP850[46].typ = (&NTI244046);
TMP850[46].name = "evalContext";
TMP1929[31] = &TMP850[47];
TMP850[47].kind = 1;
TMP850[47].offset = offsetof(Tcontext245023, unknownidents);
TMP850[47].typ = (&NTI188056);
TMP850[47].name = "unknownIdents";
TMP1929[32] = &TMP850[48];
NTI245013.size = sizeof(Tinstantiationpair245013);
NTI245013.kind = 18;
NTI245013.base = 0;
NTI245013.flags = 2;
TMP1955[0] = &TMP850[50];
TMP850[50].kind = 1;
TMP850[50].offset = offsetof(Tinstantiationpair245013, genericsym);
TMP850[50].typ = (&NTI191811);
TMP850[50].name = "genericSym";
TMP1955[1] = &TMP850[51];
TMP850[51].kind = 1;
TMP850[51].offset = offsetof(Tinstantiationpair245013, inst);
TMP850[51].typ = (&NTI191835);
TMP850[51].name = "inst";
TMP850[49].len = 2; TMP850[49].kind = 2; TMP850[49].sons = &TMP1955[0];
NTI245013.node = &TMP850[49];
NTI245141.size = sizeof(TY245141*);
NTI245141.kind = 24;
NTI245141.base = (&NTI245013);
NTI245141.flags = 2;
NTI245141.marker = TMP1956;
TMP850[48].kind = 1;
TMP850[48].offset = offsetof(Tcontext245023, generics);
TMP850[48].typ = (&NTI245141);
TMP850[48].name = "generics";
TMP1929[33] = &TMP850[52];
TMP850[52].kind = 1;
TMP850[52].offset = offsetof(Tcontext245023, lastgenericidx);
TMP850[52].typ = (&NTI108);
TMP850[52].name = "lastGenericIdx";
TMP1929[34] = &TMP850[53];
TMP850[53].kind = 1;
TMP850[53].offset = offsetof(Tcontext245023, hloloopdetector);
TMP850[53].typ = (&NTI108);
TMP850[53].name = "hloLoopDetector";
TMP1929[35] = &TMP850[54];
TMP850[54].kind = 1;
TMP850[54].offset = offsetof(Tcontext245023, inparallelstmt);
TMP850[54].typ = (&NTI108);
TMP850[54].name = "inParallelStmt";
TMP1929[36] = &TMP850[55];
NTI245146.size = sizeof(TY245146);
NTI245146.kind = 25;
NTI245146.base = 0;
NTI245146.flags = 3;
TMP850[55].kind = 1;
TMP850[55].offset = offsetof(Tcontext245023, insttypeboundop);
TMP850[55].typ = (&NTI245146);
TMP850[55].name = "instTypeBoundOp";
TMP850[0].len = 37; TMP850[0].kind = 2; TMP850[0].sons = &TMP1929[0];
NTI245023.node = &TMP850[0];
NTI245021.size = sizeof(Tcontext245023*);
NTI245021.kind = 22;
NTI245021.base = (&NTI245023);
NTI245021.marker = TMP1957;
NTI245005.size = sizeof(Toptionentry245005);
NTI245005.kind = 17;
NTI245005.base = (&NTI130022);
TMP1958[0] = &TMP850[57];
TMP850[57].kind = 1;
TMP850[57].offset = offsetof(Toptionentry245005, options);
TMP850[57].typ = (&NTI155016);
TMP850[57].name = "options";
TMP1958[1] = &TMP850[58];
TMP850[58].kind = 1;
TMP850[58].offset = offsetof(Toptionentry245005, defaultcc);
TMP850[58].typ = (&NTI191005);
TMP850[58].name = "defaultCC";
TMP1958[2] = &TMP850[59];
TMP850[59].kind = 1;
TMP850[59].offset = offsetof(Toptionentry245005, dynlib);
TMP850[59].typ = (&NTI191841);
TMP850[59].name = "dynlib";
TMP1958[3] = &TMP850[60];
TMP850[60].kind = 1;
TMP850[60].offset = offsetof(Toptionentry245005, notes);
TMP850[60].typ = (&NTI164334);
TMP850[60].name = "notes";
TMP1958[4] = &TMP850[61];
TMP850[61].kind = 1;
TMP850[61].offset = offsetof(Toptionentry245005, otherpragmas);
TMP850[61].typ = (&NTI191805);
TMP850[61].name = "otherPragmas";
TMP850[56].len = 5; TMP850[56].kind = 2; TMP850[56].sons = &TMP1958[0];
NTI245005.node = &TMP850[56];
NTI245007.size = sizeof(Toptionentry245005*);
NTI245007.kind = 22;
NTI245007.base = (&NTI245005);
NTI245007.marker = TMP1962;
}

