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

#include <string.h>
typedef struct Tsymseq190815 Tsymseq190815;
typedef struct Tsym190843 Tsym190843;
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 Ttype190849 Ttype190849;
typedef struct Tcontext244023 Tcontext244023;
typedef struct Tpasscontext241005 Tpasscontext241005;
typedef struct TNimObject TNimObject;
typedef struct Tscope190837 Tscope190837;
typedef struct Tproccon244011 Tproccon244011;
typedef struct Intset187056 Intset187056;
typedef struct Ttrunk187052 Ttrunk187052;
typedef struct Ttrunkseq187054 Ttrunkseq187054;
typedef struct Tlinkedlist130028 Tlinkedlist130028;
typedef struct Tlistentry130022 Tlistentry130022;
typedef struct Tidtable190861 Tidtable190861;
typedef struct Tidpairseq190859 Tidpairseq190859;
typedef struct Tnode190813 Tnode190813;
typedef struct Tlineinfo163338 Tlineinfo163338;
typedef struct Tstrtable190817 Tstrtable190817;
typedef struct Tctx243048 Tctx243048;
typedef struct TY244141 TY244141;
typedef struct TY522942 TY522942;
typedef struct TY522945 TY522945;
typedef struct Tinstantiationpair244013 Tinstantiationpair244013;
typedef struct Tinstantiation190833 Tinstantiation190833;
typedef struct Toptionentry244005 Toptionentry244005;
typedef struct Tlib190831 Tlib190831;
typedef struct Tidobj167015 Tidobj167015;
typedef struct Ttypeseq190845 Ttypeseq190845;
typedef struct Tloc190827 Tloc190827;
typedef struct Ropeobj161009 Ropeobj161009;
typedef struct NimStringDesc NimStringDesc;
typedef struct TY86345 TY86345;
typedef struct Tident167021 Tident167021;
typedef struct Tnodeseq190807 Tnodeseq190807;
typedef struct TY190944 TY190944;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
typedef struct Tidpair190857 Tidpair190857;
typedef struct TY243253 TY243253;
typedef struct TY164033 TY164033;
typedef struct PprocHEX3Aobjecttype243232 PprocHEX3Aobjecttype243232;
typedef struct TY243272 TY243272;
typedef struct TY190933 TY190933;
typedef struct TY243233 TY243233;
typedef struct TY243239 TY243239;
typedef struct TY243273 TY243273;
typedef struct Vmargs243042 Vmargs243042;
typedef struct Tblock243030 Tblock243030;
typedef struct TY243213 TY243213;
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  Tpasscontext241005  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Intset187056  {
NI counter;
NI max;
Ttrunk187052* head;
Ttrunkseq187054* data;
};
struct  Tlinkedlist130028  {
Tlistentry130022* head;
Tlistentry130022* tail;
NI counter;
};
struct  Tidtable190861  {
NI counter;
Tidpairseq190859* data;
};
typedef N_NIMCALL_PTR(Tnode190813*, TY244072) (Tcontext244023* c, Tnode190813* n);
typedef N_NIMCALL_PTR(Tnode190813*, TY244077) (Tcontext244023* c, Tnode190813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode190813*, TY244085) (Tcontext244023* c, Tnode190813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode190813*, TY244093) (Tcontext244023* c, Tnode190813* n);
typedef N_NIMCALL_PTR(Tnode190813*, TY244098) (Tcontext244023* c, Tnode190813* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode190813*, TY244106) (Tcontext244023* c, Tnode190813* n);
typedef N_NIMCALL_PTR(Tnode190813*, TY244111) (Tcontext244023* c, Tnode190813* n, Tnode190813* norig, NU32 filter);
typedef N_NIMCALL_PTR(Ttype190849*, TY244118) (Tcontext244023* c, Tnode190813* n, Ttype190849* prev);
typedef struct {
N_NIMCALL_PTR(Tnode190813*, ClPrc) (Tcontext244023* c, Tidtable190861 pt, Tnode190813* n, void* ClEnv);
void* ClEnv;
} TY244124;
struct  Tlineinfo163338  {
NI16 line;
NI16 col;
NI32 fileindex;
};
typedef struct {
N_NIMCALL_PTR(Tsym190843*, ClPrc) (Tcontext244023* c, Tsym190843* fn, Tidtable190861 pt, Tlineinfo163338 info, void* ClEnv);
void* ClEnv;
} TY244130;
struct  Tstrtable190817  {
NI counter;
Tsymseq190815* data;
};
typedef N_NIMCALL_PTR(Tsym190843*, TY244146) (Tcontext244023* c, Tsym190843* dc, Ttype190849* t, Tlineinfo163338 info, NU8 op);
struct  Tcontext244023  {
  Tpasscontext241005 Sup;
Tsym190843* module;
Tscope190837* currentscope;
Tscope190837* importtable;
Tscope190837* toplevelscope;
Tproccon244011* p;
Tsymseq190815* friendmodules;
NI instcounter;
Intset187056 ambiguoussymbols;
NI intypeclass;
NI ingenericcontext;
NI inunrolledcontext;
NI incompilescontext;
NI ingenericinst;
Tsymseq190815* converters;
Tsymseq190815* patterns;
Tlinkedlist130028 optionstack;
Tidtable190861 symmapping;
Tlinkedlist130028 libs;
TY244072 semconstexpr;
TY244077 semexpr;
TY244085 semtryexpr;
TY244093 semtryconstexpr;
TY244098 semoperand;
TY244106 semconstboolexpr;
TY244111 semoverloadedcall;
TY244118 semtypenode;
TY244124 seminferredlambda;
TY244130 semgenerateinstance;
Intset187056 includedfiles;
Tstrtable190817 userpragmas;
Tctx243048* evalcontext;
Intset187056 unknownidents;
TY244141* generics;
NI lastgenericidx;
NI hloloopdetector;
NI inparallelstmt;
TY244146 insttypeboundop;
};
struct  Tproccon244011  {
Tsym190843* owner;
Tsym190843* resultsym;
NI nestedloopcounter;
NI nestedblockcounter;
NI intrystmt;
Tproccon244011* next;
NIM_BOOL wasforwarded;
Tnode190813* bracketexpr;
};
struct TY522942 {
void* Field0;
TY522945* Field1;
};
struct  Tinstantiationpair244013  {
Tsym190843* genericsym;
Tinstantiation190833* inst;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Toptionentry244005  {
  Tlistentry130022 Sup;
NU32 options;
NU8 defaultcc;
Tlib190831* dynlib;
NU64 notes;
Tnode190813* otherpragmas;
};
typedef Tsym190843* TY244431[1];
struct  Tidobj167015  {
  TNimObject Sup;
NI id;
};
struct  Tloc190827  {
NU8 k;
NU8 s;
NU16 flags;
Ttype190849* t;
Ropeobj161009* r;
Ropeobj161009* heaproot;
};
struct  Ttype190849  {
  Tidobj167015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq190845* sons;
Tnode190813* n;
Tsym190843* owner;
Tsym190843* sym;
Tsym190843* destructor;
Tsym190843* deepcopy;
Tsym190843* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc190827 loc;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct TY86345 {
NimStringDesc* Field0;
NI Field1;
};
struct  Tnode190813  {
Ttype190849* typ;
Tlineinfo163338 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym190843* sym;
} S4;
struct {Tident167021* ident;
} S5;
struct {Tnodeseq190807* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef Tnode190813* TY208680[1];
typedef Ttype190849* TY349187[1];
typedef Ttype190849* TY244864[2];
typedef Tnode190813* TY245103[2];
struct  Tlib190831  {
  Tlistentry130022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj161009* name;
Tnode190813* path;
};
struct  Tsym190843  {
  Tidobj167015 Sup;
NU8 kind;
union{
struct {Ttypeseq190845* typeinstcache;
Tscope190837* typscope;
} S1;
struct {TY190944* procinstcache;
Tsym190843* gcunsafetyreason;
} S2;
struct {TY190944* usedgenerics;
Tstrtable190817 tab;
} S3;
struct {Tsym190843* guard;
} S4;
} kindU;
NU16 magic;
Ttype190849* typ;
Tident167021* name;
Tlineinfo163338 info;
Tsym190843* owner;
NU32 flags;
Tnode190813* ast;
NU32 options;
NI position;
NI offset;
Tloc190827 loc;
Tlib190831* annex;
Tnode190813* constraint;
};
typedef NI TY27420[8];
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  Tscope190837  {
NI depthlevel;
Tstrtable190817 symbols;
Tnodeseq190807* usingsyms;
Tscope190837* parent;
};
struct  Ttrunk187052  {
Ttrunk187052* next;
NI key;
TY27420 bits;
};
struct  Tidpair190857  {
Tidobj167015* key;
TNimObject* val;
};
struct  Tctx243048  {
  Tpasscontext241005 Sup;
TY243253* code;
TY164033* debug;
Tnode190813* globals;
Tnode190813* constants;
Ttypeseq190845* types;
Tnode190813* currentexceptiona;
Tnode190813* currentexceptionb;
NI exceptioninstr;
PprocHEX3Aobjecttype243232* prc;
Tsym190843* module;
Tnode190813* callsite;
NU8 mode;
NU8 features;
NIM_BOOL traceactive;
NI loopiterations;
Tlineinfo163338 comesfromheuristic;
TY243272* callbacks;
NimStringDesc* errorflag;
};
struct TY522945 {
char dummy;
};
struct  Tinstantiation190833  {
Tsym190843* sym;
Ttypeseq190845* concretetypes;
TY190933* usedby;
};
struct  Ropeobj161009  {
  TNimObject Sup;
Ropeobj161009* left;
Ropeobj161009* right;
NI length;
NimStringDesc* data;
};
struct  Tident167021  {
  Tidobj167015 Sup;
NimStringDesc* s;
Tident167021* next;
NI h;
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
struct TY243239 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY243239 TY243236[256];
struct  PprocHEX3Aobjecttype243232  {
TY243233* blocks;
Tsym190843* sym;
TY243236 slots;
NI maxslots;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Vmargs243042* args, void* ClEnv);
void* ClEnv;
} Vmcallback243044;
struct TY243273 {
NimStringDesc* Field0;
Vmcallback243044 Field1;
};
struct  Tblock243030  {
Tsym190843* label;
TY243213* fixups;
};
struct  Vmargs243042  {
NI ra;
NI rb;
NI rc;
void* slots;
Tnode190813* currentexception;
};
struct Tsymseq190815 {
  TGenericSeq Sup;
  Tsym190843* data[SEQ_DECL_SIZE];
};
struct TY244141 {
  TGenericSeq Sup;
  Tinstantiationpair244013 data[SEQ_DECL_SIZE];
};
struct Ttypeseq190845 {
  TGenericSeq Sup;
  Ttype190849* data[SEQ_DECL_SIZE];
};
struct Tnodeseq190807 {
  TGenericSeq Sup;
  Tnode190813* data[SEQ_DECL_SIZE];
};
struct Ttrunkseq187054 {
  TGenericSeq Sup;
  Ttrunk187052* data[SEQ_DECL_SIZE];
};
struct Tidpairseq190859 {
  TGenericSeq Sup;
  Tidpair190857 data[SEQ_DECL_SIZE];
};
struct TY190944 {
  TGenericSeq Sup;
  Tinstantiation190833* data[SEQ_DECL_SIZE];
};
struct TY243253 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY164033 {
  TGenericSeq Sup;
  Tlineinfo163338 data[SEQ_DECL_SIZE];
};
struct TY243272 {
  TGenericSeq Sup;
  TY243273 data[SEQ_DECL_SIZE];
};
struct TY190933 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY243233 {
  TGenericSeq Sup;
  Tblock243030 data[SEQ_DECL_SIZE];
};
struct TY243213 {
  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(Ttype190849*, newtype_193140)(NU8 kind, Tsym190843* owner);
N_NIMCALL(Tsym190843*, getcurrowner_244255)(void);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP1929)(void* p, NI op);
N_NIMCALL(void, TMP1954)(void* p, NI op);
N_NIMCALL(void, TMP1955)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, initintset_187927)(Intset187056* Result);
N_NIMCALL(void, initlinkedlist_130043)(Tlinkedlist130028* list);
N_NIMCALL(void, append_130053)(Tlinkedlist130028* list, Tlistentry130022* entry);
N_NIMCALL(Toptionentry244005*, newoptionentry_244193)(void);
N_NIMCALL(void, TMP1960)(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_194007)(Tstrtable190817* x);
N_NIMCALL(Ttype190849*, newtypes_244218)(NU8 kind, Tcontext244023* c);
N_NIMCALL(void, addsonskipintlit_238731)(Ttype190849* father, Ttype190849* son);
N_NIMCALL(void, internalerror_165218)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_165306)(TY86345 x);
N_NIMCALL(void, globalerror_165134)(Tlineinfo163338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_212058)(Tnode190813* n, NU8 renderflags);
N_NIMCALL(NI, sonslen_193403)(Tnode190813* n);
N_NIMCALL(void, illformedast_245229)(Tnode190813* n);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_81204, TNimType* mt);
N_NIMCALL(Tnode190813*, newnodei_192351)(NU8 kind, Tlineinfo163338 info);
N_NIMCALL(void, addson_192819)(Tnode190813* father, Tnode190813* son);
N_NIMCALL(Tnode190813*, newinttypenode_191619)(NU8 kind, NI64 intval, Ttype190849* typ);
N_NIMCALL(Ttype190849*, newtypewithsons_244807)(Tcontext244023* c, NU8 kind, Ttypeseq190845* sons);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, propagatetoowner_194274)(Ttype190849* owner, Ttype190849* elem);
N_NIMCALL(Ttype190849*, getsystype_238030)(NU8 kind);
N_NIMCALL(Tnode190813*, newnode_192607)(NU8 kind, Tlineinfo163338 info, Tnodeseq190807* sons, Ttype190849* typ);
N_NIMCALL(Tnode190813*, makestaticexpr_244820)(Tcontext244023* c, Tnode190813* n);
N_NIMCALL(Tnode190813*, nminusone_245061)(Tnode190813* n);
N_NIMCALL(Tnode190813*, newsymnode_192325)(Tsym190843* sym);
N_NIMCALL(Tsym190843*, getsysmagic_238155)(NimStringDesc* name, NU16 m);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, localerror_165155)(Tlineinfo163338 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(Ttype190849*, errortype_245150)(Tcontext244023* c);
N_NIMCALL(Ttype190849*, maketypedesc_244681)(Tcontext244023* c, Ttype190849* typ);
N_NIMCALL(Tsym190843*, linkto_191884)(Tsym190843* s, Ttype190849* t);
N_NIMCALL(Tsym190843*, newsym_191655)(NU8 symkind, Tident167021* name, Tsym190843* owner, Tlineinfo163338 info);
N_NIMCALL(Tnode190813*, newsymnode_192338)(Tsym190843* sym, Tlineinfo163338 info);
N_NIMCALL(void, inclsym_244499)(Tsymseq190815** sq, Tsym190843* s);
STRING_LITERAL(TMP2636, "semdata.nim", 11);
NIM_CONST TY86345 TMP2635 = {((NimStringDesc*) &TMP2636),
((NI) 224)}
;
NIM_CONST TY86345 TMP2649 = {((NimStringDesc*) &TMP2636),
((NI) 220)}
;
STRING_LITERAL(TMP2994, "<", 1);
STRING_LITERAL(TMP3153, "popOwner", 8);
NIM_CONST TY86345 TMP3197 = {((NimStringDesc*) &TMP2636),
((NI) 213)}
;
Tsymseq190815* gowners_244288;
extern TNimType NTI190815; /* TSymSeq */
extern Tgcheap48216 gch_48244;
extern TNimType NTI241005; /* TPassContext */
TNimType NTI244023; /* TContext */
extern TNimType NTI190811; /* PSym */
extern TNimType NTI190839; /* PScope */
TNimType NTI244011; /* TProcCon */
extern TNimType NTI108; /* int */
extern TNimType NTI138; /* bool */
extern TNimType NTI190805; /* PNode */
TNimType NTI244009; /* PProcCon */
extern TNimType NTI187056; /* IntSet */
extern TNimType NTI130028; /* TLinkedList */
extern TNimType NTI190861; /* TIdTable */
TNimType NTI244072; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI244077; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI244085; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI244093; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI244098; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI244106; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI244111; /* proc (c: PContext, n: PNode, nOrig: PNode, filter: TSymKinds): PNode */
TNimType NTI244118; /* proc (c: PContext, n: PNode, prev: PType): PType */
TNimType NTI244124; /* (pointer, ref tuple[]) */
extern TNimType NTI153; /* pointer */
extern TNimType NTI522944; /* ref tuple[] */
TNimType NTI244130; /* (pointer, ref tuple[]) */
extern TNimType NTI190817; /* TStrTable */
extern TNimType NTI243046; /* PCtx */
TNimType NTI244013; /* TInstantiationPair */
extern TNimType NTI190835; /* PInstantiation */
TNimType NTI244141; /* seq[TInstantiationPair] */
TNimType NTI244146; /* proc (c: PContext, dc: PSym, t: PType, info: TLineInfo, op: TTypeAttachedOp): PSym */
TNimType NTI244021; /* PContext */
extern TNimType NTI130022; /* TListEntry */
TNimType NTI244005; /* TOptionEntry */
extern TNimType NTI154016; /* TOptions */
extern TNimType NTI190005; /* TCallingConvention */
extern TNimType NTI190841; /* PLib */
extern TNimType NTI163334; /* TNoteKinds */
TNimType NTI244007; /* POptionEntry */
extern NU32 goptions_154126;
extern NU64 gnotes_164011;
extern TNimType NTI190845; /* TTypeSeq */
extern TNimType NTI190807; /* TNodeSeq */
extern TNimType NTI190831; /* TLib */
extern Tident167021* idanon_167495;

static N_INLINE(Tcell46347*, usrtocell_49846)(void* usr) {
	Tcell46347* result;
	result = 0;
	result = ((Tcell46347*) ((NI)((NU64)(((NI) (usr))) - (NU64)(((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 (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	LA3: ;
}

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

N_NIMCALL(Ttype190849*, newtypes_244218)(NU8 kind, Tcontext244023* c) {
	Ttype190849* result;
	Tsym190843* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_244255();
	result = newtype_193140(kind, LOC1);
	return result;
}
N_NIMCALL(void, TMP1929)(void* p, NI op) {
	Tproccon244011* a;
	a = (Tproccon244011*)p;
	nimGCvisit((void*)(*a).owner, op);
	nimGCvisit((void*)(*a).resultsym, op);
	nimGCvisit((void*)(*a).next, op);
	nimGCvisit((void*)(*a).bracketexpr, op);
}
N_NIMCALL(void, TMP1954)(void* p, NI op) {
	TY244141* a;
	NI LOC1;
	a = (TY244141*)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, TMP1955)(void* p, NI op) {
	Tcontext244023* a;
	a = (Tcontext244023*)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, TMP1960)(void* p, NI op) {
	Toptionentry244005* a;
	a = (Toptionentry244005*)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)((NU64)((*c).refcount) + (NU64)(((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 (!((NU64)((*c).refcount) < (NU64)(((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(Toptionentry244005*, newoptionentry_244193)(void) {
	Toptionentry244005* result;
	result = 0;
	result = (Toptionentry244005*) newObj((&NTI244007), sizeof(Toptionentry244005));
	(*result).Sup.Sup.m_type = (&NTI244005);
	(*result).options = goptions_154126;
	(*result).defaultcc = ((NU8) 0);
	asgnRef((void**) (&(*result).dynlib), NIM_NIL);
	(*result).notes = gnotes_164011;
	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 (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_51404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(Tcontext244023*, newcontext_244181)(Tsym190843* module) {
	Tcontext244023* result;
	Toptionentry244005* LOC1;
	Tlistentry130022* LOC2;
	TY244431 LOC3;
	result = 0;
	result = (Tcontext244023*) newObj((&NTI244021), sizeof(Tcontext244023));
	(*result).Sup.Sup.m_type = (&NTI244023);
	initintset_187927((&(*result).ambiguoussymbols));
	initlinkedlist_130043((&(*result).optionstack));
	initlinkedlist_130043((&(*result).libs));
	LOC1 = 0;
	LOC1 = newoptionentry_244193();
	LOC2 = 0;
	LOC2 = &LOC1->Sup;
	append_130053((&(*result).optionstack), LOC2);
	asgnRefNoCycle((void**) (&(*result).module), module);
	if ((*result).friendmodules) nimGCunrefNoCycle((*result).friendmodules);
	(*result).friendmodules = (Tsymseq190815*) newSeqRC1((&NTI190815), 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 = (Tsymseq190815*) newSeqRC1((&NTI190815), 0);
	if ((*result).patterns) nimGCunrefNoCycle((*result).patterns);
	(*result).patterns = (Tsymseq190815*) newSeqRC1((&NTI190815), 0);
	initintset_187927((&(*result).includedfiles));
	initstrtable_194007((&(*result).userpragmas));
	if ((*result).generics) nimGCunrefNoCycle((*result).generics);
	(*result).generics = (TY244141*) newSeqRC1((&NTI244141), 0);
	initintset_187927((&(*result).unknownidents));
	return result;
}

N_NIMCALL(Ttype190849*, maketypefromexpr_244726)(Tcontext244023* c, Tnode190813* n) {
	Ttype190849* result;
	result = 0;
	result = newtypes_244218(((NU8) 60), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	return result;
}

N_NIMCALL(Ttype190849*, errortype_245150)(Tcontext244023* c) {
	Ttype190849* result;
	result = 0;
	result = newtypes_244218(((NU8) 50), c);
	return result;
}

N_NIMCALL(Ttype190849*, maketypedesc_244681)(Tcontext244023* c, Ttype190849* typ) {
	Ttype190849* result;
	result = 0;
	result = newtypes_244218(((NU8) 8), c);
	{
		NimStringDesc* LOC5;
		if (!(typ == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_165306(TMP2635);
		internalerror_165218(LOC5);
	}
	LA3: ;
	addsonskipintlit_238731(result, typ);
	return result;
}

N_NIMCALL(void, illformedast_245229)(Tnode190813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_212058(n, 4);
	globalerror_165134((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(void, checksonslen_245249)(Tnode190813* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_193403(n);
		if (!!((LOC3 == length))) goto LA4;
		illformedast_245229(n);
	}
	LA4: ;
}

N_NIMCALL(Ttype190849*, newtypewithsons_244807)(Tcontext244023* c, NU8 kind, Ttypeseq190845* sons) {
	Ttype190849* result;
	Tsym190843* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_244255();
	result = newtype_193140(kind, LOC1);
	genericSeqAssign((&(*result).sons), sons, (&NTI190845));
	return result;
}

N_NIMCALL(Ttype190849*, makevartype_244642)(Tcontext244023* c, Ttype190849* basetype) {
	Ttype190849* result;
	result = 0;
	{
		if (!((*basetype).kind == ((NU8) 23))) goto LA3;
		result = basetype;
	}
	goto LA1;
	LA3: ;
	{
		result = newtypes_244218(((NU8) 23), c);
		{
			NimStringDesc* LOC10;
			if (!(basetype == NIM_NIL)) goto LA8;
			LOC10 = 0;
			LOC10 = HEX24_165306(TMP2649);
			internalerror_165218(LOC10);
		}
		LA8: ;
		addsonskipintlit_238731(result, basetype);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Ttype190849*, makerangetype_245182)(Tcontext244023* c, NI64 first, NI64 last, Tlineinfo163338 info, Ttype190849* inttype) {
	Ttype190849* result;
	Tnode190813* n;
	Tnode190813* LOC1;
	Tnode190813* LOC2;
	result = 0;
	n = newnodei_192351(((NU8) 44), info);
	LOC1 = 0;
	LOC1 = newinttypenode_191619(((NU8) 6), first, inttype);
	addson_192819(n, LOC1);
	LOC2 = 0;
	LOC2 = newinttypenode_191619(((NU8) 6), last, inttype);
	addson_192819(n, LOC2);
	result = newtypes_244218(((NU8) 20), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	addsonskipintlit_238731(result, inttype);
	return result;
}

N_NIMCALL(Tnode190813*, makestaticexpr_244820)(Tcontext244023* c, Tnode190813* n) {
	Tnode190813* result;
	TY208680 LOC1;
	Ttypeseq190845* LOC2;
	TY349187 LOC3;
	result = 0;
	result = newnodei_192351(((NU8) 62), (*n).info);
	if ((*result).kindU.S6.sons) nimGCunrefNoCycle((*result).kindU.S6.sons);
	(*result).kindU.S6.sons = (Tnodeseq190807*) newSeqRC1((&NTI190807), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = n;
	asgnRefNoCycle((void**) (&(*result).kindU.S6.sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Ttypeseq190845*) newSeq((&NTI190845), 1);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = (*n).typ;
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&(*result).typ), newtypewithsons_244807(c, ((NU8) 59), LOC2));
	return result;
}

N_NIMCALL(Ttype190849*, makeandtype_244858)(Tcontext244023* c, Ttype190849* t1, Ttype190849* t2) {
	Ttype190849* result;
	TY244864 LOC1;
	result = 0;
	result = newtypes_244218(((NU8) 55), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq190845*) newSeqRC1((&NTI190845), 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_194274(result, t1);
	propagatetoowner_194274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(Ttype190849*, makeortype_244930)(Tcontext244023* c, Ttype190849* t1, Ttype190849* t2) {
	Ttype190849* result;
	TY244864 LOC1;
	result = 0;
	result = newtypes_244218(((NU8) 56), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq190845*) newSeqRC1((&NTI190845), 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_194274(result, t1);
	propagatetoowner_194274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(Ttype190849*, makenottype_245002)(Tcontext244023* c, Ttype190849* t1) {
	Ttype190849* result;
	TY349187 LOC1;
	result = 0;
	result = newtypes_244218(((NU8) 57), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq190845*) newSeqRC1((&NTI190845), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = t1;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	propagatetoowner_194274(result, t1);
	(*result).flags = ((*result).flags | ((*t1).flags & 4194304));
	(*result).flags |= ((NI32)1)<<((((NU8) 19))%(sizeof(NI32)*8));
	return result;
}

N_NIMCALL(void, checkminsonslen_245259)(Tnode190813* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_193403(n);
		if (!(LOC3 < length)) goto LA4;
		illformedast_245229(n);
	}
	LA4: ;
}

N_NIMCALL(Tnode190813*, nminusone_245061)(Tnode190813* n) {
	Tnode190813* result;
	Tnodeseq190807* LOC1;
	TY245103 LOC2;
	Tsym190843* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tnodeseq190807*) newSeq((&NTI190807), 2);
	memset((void*)LOC2, 0, sizeof(LOC2));
	LOC3 = 0;
	LOC3 = getsysmagic_238155(((NimStringDesc*) &TMP2994), ((NU16) 22));
	LOC2[0] = newsymnode_192325(LOC3);
	LOC2[1] = n;
	asgnRefNoCycle((void**) (&LOC1->data[0]), LOC2[0]);
	asgnRefNoCycle((void**) (&LOC1->data[1]), LOC2[1]);
	result = newnode_192607(((NU8) 27), (*n).info, LOC1, NIM_NIL);
	return result;
}

N_NIMCALL(Ttype190849*, makerangewithstaticexpr_245084)(Tcontext244023* c, Tnode190813* n) {
	Ttype190849* result;
	Ttype190849* inttype;
	TY349187 LOC1;
	Tnodeseq190807* LOC2;
	TY245103 LOC3;
	Tnode190813* LOC4;
	result = 0;
	inttype = getsystype_238030(((NU8) 31));
	result = newtypes_244218(((NU8) 20), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq190845*) newSeqRC1((&NTI190845), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = inttype;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Tnodeseq190807*) newSeq((&NTI190807), 2);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = newinttypenode_191619(((NU8) 6), IL64(0), inttype);
	LOC4 = 0;
	LOC4 = nminusone_245061(n);
	LOC3[1] = makestaticexpr_244820(c, LOC4);
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&LOC2->data[1]), LOC3[1]);
	asgnRefNoCycle((void**) (&(*result).n), newnode_192607(((NU8) 44), (*n).info, LOC2, NIM_NIL));
	return result;
}

N_NIMCALL(void, pushowner_244260)(Tsym190843* owner) {
	gowners_244288 = (Tsymseq190815*) incrSeq(&(gowners_244288)->Sup, sizeof(Tsym190843*));
	asgnRefNoCycle((void**) (&gowners_244288->data[gowners_244288->Sup.len-1]), owner);
}

N_NIMCALL(void, makeinstpair_244157)(Tsym190843* s, Tinstantiation190833* inst, Tinstantiationpair244013* Result) {
	unsureAsgnRef((void**) (&(*Result).genericsym), s);
	unsureAsgnRef((void**) (&(*Result).inst), inst);
}

N_NIMCALL(Tlib190831*, newlib_244198)(NU8 kind) {
	Tlib190831* result;
	result = 0;
	result = (Tlib190831*) newObj((&NTI190841), sizeof(Tlib190831));
	(*result).Sup.Sup.m_type = (&NTI190831);
	(*result).kind = kind;
	return result;
}

N_NIMCALL(void, addtolib_244204)(Tlib190831* lib, Tsym190843* sym) {
	asgnRef((void**) (&(*sym).annex), lib);
}

N_NIMCALL(void, illformedastlocal_245239)(Tnode190813* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_212058(n, 4);
	localerror_165155((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(Toptionentry244005*, lastoptionentry_244187)(Tcontext244023* c) {
	Toptionentry244005* result;
	result = 0;
	result = ((Toptionentry244005*) ((*c).optionstack.tail));
	return result;
}

N_NIMCALL(void, popowner_244266)(void) {
	NI length;
	length = (gowners_244288 ? gowners_244288->Sup.len : 0);
	{
		if (!(((NI) 0) < length)) goto LA3;
		gowners_244288 = (Tsymseq190815*) setLengthSeq(&(gowners_244288)->Sup, sizeof(Tsym190843*), ((NI) ((NI)(length - ((NI) 1)))));
	}
	goto LA1;
	LA3: ;
	{
		internalerror_165218(((NimStringDesc*) &TMP3153));
	}
	LA1: ;
}

N_NIMCALL(Ttype190849*, makeptrtype_244211)(Tcontext244023* c, Ttype190849* basetype) {
	Ttype190849* result;
	result = 0;
	result = newtypes_244218(((NU8) 21), c);
	{
		NimStringDesc* LOC5;
		if (!(basetype == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_165306(TMP3197);
		internalerror_165218(LOC5);
	}
	LA3: ;
	addsonskipintlit_238731(result, basetype);
	return result;
}

N_NIMCALL(Tnode190813*, errornode_245160)(Tcontext244023* c, Tnode190813* n) {
	Tnode190813* result;
	result = 0;
	result = newnodei_192351(((NU8) 1), (*n).info);
	asgnRefNoCycle((void**) (&(*result).typ), errortype_245150(c));
	return result;
}

N_NIMCALL(Tnode190813*, maketypesymnode_244711)(Tcontext244023* c, Ttype190849* typ, Tlineinfo163338 info) {
	Tnode190813* result;
	Ttype190849* typedesc;
	Tsym190843* sym;
	Tsym190843* LOC1;
	Tsym190843* LOC2;
{	result = 0;
	typedesc = maketypedesc_244681(c, typ);
	LOC1 = 0;
	LOC1 = getcurrowner_244255();
	LOC2 = 0;
	LOC2 = newsym_191655(((NU8) 7), idanon_167495, LOC1, info);
	sym = linkto_191884(LOC2, typedesc);
	result = newsymnode_192338(sym, info);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, inclsym_244499)(Tsymseq190815** sq, Tsym190843* s) {
	NI L;
{	L = ((*sq) ? (*sq)->Sup.len : 0);
	{
		NI i_244525;
		NI HEX3Atmp_244539;
		NI res_244542;
		i_244525 = 0;
		HEX3Atmp_244539 = 0;
		HEX3Atmp_244539 = (NI)(L - ((NI) 1));
		res_244542 = ((NI) 0);
		{
			while (1) {
				if (!(res_244542 <= HEX3Atmp_244539)) goto LA3;
				i_244525 = res_244542;
				{
					if (!((*(*sq)->data[i_244525]).Sup.id == (*s).Sup.id)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				res_244542 += ((NI) 1);
			} LA3: ;
		}
	}
	(*sq) = (Tsymseq190815*) setLengthSeq(&((*sq))->Sup, sizeof(Tsym190843*), ((NI) ((NI)(L + ((NI) 1)))));
	asgnRefNoCycle((void**) (&(*sq)->data[L]), s);
	}BeforeRet: ;
}

N_NIMCALL(void, addconverter_244561)(Tcontext244023* c, Tsym190843* conv) {
	inclsym_244499((&(*c).converters), conv);
}

N_NIMCALL(void, addpattern_244572)(Tcontext244023* c, Tsym190843* p) {
	inclsym_244499((&(*c).patterns), p);
}
NIM_EXTERNC N_NOINLINE(void, nimsrc_semdataInit)(void) {
	if (gowners_244288) nimGCunrefNoCycle(gowners_244288);
	gowners_244288 = (Tsymseq190815*) newSeqRC1((&NTI190815), 0);
}

NIM_EXTERNC N_NOINLINE(void, nimsrc_semdataDatInit)(void) {
static TNimNode* TMP1927[37];
static TNimNode* TMP1928[8];
static TNimNode* TMP1930[2];
static TNimNode* TMP1931[2];
static TNimNode* TMP1953[2];
static TNimNode* TMP1956[5];
static TNimNode TMP848[62];
NTI244023.size = sizeof(Tcontext244023);
NTI244023.kind = 17;
NTI244023.base = (&NTI241005);
TMP1927[0] = &TMP848[1];
TMP848[1].kind = 1;
TMP848[1].offset = offsetof(Tcontext244023, module);
TMP848[1].typ = (&NTI190811);
TMP848[1].name = "module";
TMP1927[1] = &TMP848[2];
TMP848[2].kind = 1;
TMP848[2].offset = offsetof(Tcontext244023, currentscope);
TMP848[2].typ = (&NTI190839);
TMP848[2].name = "currentScope";
TMP1927[2] = &TMP848[3];
TMP848[3].kind = 1;
TMP848[3].offset = offsetof(Tcontext244023, importtable);
TMP848[3].typ = (&NTI190839);
TMP848[3].name = "importTable";
TMP1927[3] = &TMP848[4];
TMP848[4].kind = 1;
TMP848[4].offset = offsetof(Tcontext244023, toplevelscope);
TMP848[4].typ = (&NTI190839);
TMP848[4].name = "topLevelScope";
TMP1927[4] = &TMP848[5];
NTI244011.size = sizeof(Tproccon244011);
NTI244011.kind = 18;
NTI244011.base = 0;
TMP1928[0] = &TMP848[7];
TMP848[7].kind = 1;
TMP848[7].offset = offsetof(Tproccon244011, owner);
TMP848[7].typ = (&NTI190811);
TMP848[7].name = "owner";
TMP1928[1] = &TMP848[8];
TMP848[8].kind = 1;
TMP848[8].offset = offsetof(Tproccon244011, resultsym);
TMP848[8].typ = (&NTI190811);
TMP848[8].name = "resultSym";
TMP1928[2] = &TMP848[9];
TMP848[9].kind = 1;
TMP848[9].offset = offsetof(Tproccon244011, nestedloopcounter);
TMP848[9].typ = (&NTI108);
TMP848[9].name = "nestedLoopCounter";
TMP1928[3] = &TMP848[10];
TMP848[10].kind = 1;
TMP848[10].offset = offsetof(Tproccon244011, nestedblockcounter);
TMP848[10].typ = (&NTI108);
TMP848[10].name = "nestedBlockCounter";
TMP1928[4] = &TMP848[11];
TMP848[11].kind = 1;
TMP848[11].offset = offsetof(Tproccon244011, intrystmt);
TMP848[11].typ = (&NTI108);
TMP848[11].name = "inTryStmt";
TMP1928[5] = &TMP848[12];
TMP848[12].kind = 1;
TMP848[12].offset = offsetof(Tproccon244011, next);
TMP848[12].typ = (&NTI244009);
TMP848[12].name = "next";
TMP1928[6] = &TMP848[13];
TMP848[13].kind = 1;
TMP848[13].offset = offsetof(Tproccon244011, wasforwarded);
TMP848[13].typ = (&NTI138);
TMP848[13].name = "wasForwarded";
TMP1928[7] = &TMP848[14];
TMP848[14].kind = 1;
TMP848[14].offset = offsetof(Tproccon244011, bracketexpr);
TMP848[14].typ = (&NTI190805);
TMP848[14].name = "bracketExpr";
TMP848[6].len = 8; TMP848[6].kind = 2; TMP848[6].sons = &TMP1928[0];
NTI244011.node = &TMP848[6];
NTI244009.size = sizeof(Tproccon244011*);
NTI244009.kind = 22;
NTI244009.base = (&NTI244011);
NTI244009.marker = TMP1929;
TMP848[5].kind = 1;
TMP848[5].offset = offsetof(Tcontext244023, p);
TMP848[5].typ = (&NTI244009);
TMP848[5].name = "p";
TMP1927[5] = &TMP848[15];
TMP848[15].kind = 1;
TMP848[15].offset = offsetof(Tcontext244023, friendmodules);
TMP848[15].typ = (&NTI190815);
TMP848[15].name = "friendModules";
TMP1927[6] = &TMP848[16];
TMP848[16].kind = 1;
TMP848[16].offset = offsetof(Tcontext244023, instcounter);
TMP848[16].typ = (&NTI108);
TMP848[16].name = "instCounter";
TMP1927[7] = &TMP848[17];
TMP848[17].kind = 1;
TMP848[17].offset = offsetof(Tcontext244023, ambiguoussymbols);
TMP848[17].typ = (&NTI187056);
TMP848[17].name = "ambiguousSymbols";
TMP1927[8] = &TMP848[18];
TMP848[18].kind = 1;
TMP848[18].offset = offsetof(Tcontext244023, intypeclass);
TMP848[18].typ = (&NTI108);
TMP848[18].name = "inTypeClass";
TMP1927[9] = &TMP848[19];
TMP848[19].kind = 1;
TMP848[19].offset = offsetof(Tcontext244023, ingenericcontext);
TMP848[19].typ = (&NTI108);
TMP848[19].name = "inGenericContext";
TMP1927[10] = &TMP848[20];
TMP848[20].kind = 1;
TMP848[20].offset = offsetof(Tcontext244023, inunrolledcontext);
TMP848[20].typ = (&NTI108);
TMP848[20].name = "inUnrolledContext";
TMP1927[11] = &TMP848[21];
TMP848[21].kind = 1;
TMP848[21].offset = offsetof(Tcontext244023, incompilescontext);
TMP848[21].typ = (&NTI108);
TMP848[21].name = "inCompilesContext";
TMP1927[12] = &TMP848[22];
TMP848[22].kind = 1;
TMP848[22].offset = offsetof(Tcontext244023, ingenericinst);
TMP848[22].typ = (&NTI108);
TMP848[22].name = "inGenericInst";
TMP1927[13] = &TMP848[23];
TMP848[23].kind = 1;
TMP848[23].offset = offsetof(Tcontext244023, converters);
TMP848[23].typ = (&NTI190815);
TMP848[23].name = "converters";
TMP1927[14] = &TMP848[24];
TMP848[24].kind = 1;
TMP848[24].offset = offsetof(Tcontext244023, patterns);
TMP848[24].typ = (&NTI190815);
TMP848[24].name = "patterns";
TMP1927[15] = &TMP848[25];
TMP848[25].kind = 1;
TMP848[25].offset = offsetof(Tcontext244023, optionstack);
TMP848[25].typ = (&NTI130028);
TMP848[25].name = "optionStack";
TMP1927[16] = &TMP848[26];
TMP848[26].kind = 1;
TMP848[26].offset = offsetof(Tcontext244023, symmapping);
TMP848[26].typ = (&NTI190861);
TMP848[26].name = "symMapping";
TMP1927[17] = &TMP848[27];
TMP848[27].kind = 1;
TMP848[27].offset = offsetof(Tcontext244023, libs);
TMP848[27].typ = (&NTI130028);
TMP848[27].name = "libs";
TMP1927[18] = &TMP848[28];
NTI244072.size = sizeof(TY244072);
NTI244072.kind = 25;
NTI244072.base = 0;
NTI244072.flags = 3;
TMP848[28].kind = 1;
TMP848[28].offset = offsetof(Tcontext244023, semconstexpr);
TMP848[28].typ = (&NTI244072);
TMP848[28].name = "semConstExpr";
TMP1927[19] = &TMP848[29];
NTI244077.size = sizeof(TY244077);
NTI244077.kind = 25;
NTI244077.base = 0;
NTI244077.flags = 3;
TMP848[29].kind = 1;
TMP848[29].offset = offsetof(Tcontext244023, semexpr);
TMP848[29].typ = (&NTI244077);
TMP848[29].name = "semExpr";
TMP1927[20] = &TMP848[30];
NTI244085.size = sizeof(TY244085);
NTI244085.kind = 25;
NTI244085.base = 0;
NTI244085.flags = 3;
TMP848[30].kind = 1;
TMP848[30].offset = offsetof(Tcontext244023, semtryexpr);
TMP848[30].typ = (&NTI244085);
TMP848[30].name = "semTryExpr";
TMP1927[21] = &TMP848[31];
NTI244093.size = sizeof(TY244093);
NTI244093.kind = 25;
NTI244093.base = 0;
NTI244093.flags = 3;
TMP848[31].kind = 1;
TMP848[31].offset = offsetof(Tcontext244023, semtryconstexpr);
TMP848[31].typ = (&NTI244093);
TMP848[31].name = "semTryConstExpr";
TMP1927[22] = &TMP848[32];
NTI244098.size = sizeof(TY244098);
NTI244098.kind = 25;
NTI244098.base = 0;
NTI244098.flags = 3;
TMP848[32].kind = 1;
TMP848[32].offset = offsetof(Tcontext244023, semoperand);
TMP848[32].typ = (&NTI244098);
TMP848[32].name = "semOperand";
TMP1927[23] = &TMP848[33];
NTI244106.size = sizeof(TY244106);
NTI244106.kind = 25;
NTI244106.base = 0;
NTI244106.flags = 3;
TMP848[33].kind = 1;
TMP848[33].offset = offsetof(Tcontext244023, semconstboolexpr);
TMP848[33].typ = (&NTI244106);
TMP848[33].name = "semConstBoolExpr";
TMP1927[24] = &TMP848[34];
NTI244111.size = sizeof(TY244111);
NTI244111.kind = 25;
NTI244111.base = 0;
NTI244111.flags = 3;
TMP848[34].kind = 1;
TMP848[34].offset = offsetof(Tcontext244023, semoverloadedcall);
TMP848[34].typ = (&NTI244111);
TMP848[34].name = "semOverloadedCall";
TMP1927[25] = &TMP848[35];
NTI244118.size = sizeof(TY244118);
NTI244118.kind = 25;
NTI244118.base = 0;
NTI244118.flags = 3;
TMP848[35].kind = 1;
TMP848[35].offset = offsetof(Tcontext244023, semtypenode);
TMP848[35].typ = (&NTI244118);
TMP848[35].name = "semTypeNode";
TMP1927[26] = &TMP848[36];
NTI244124.size = sizeof(TY522942);
NTI244124.kind = 18;
NTI244124.base = 0;
NTI244124.flags = 2;
TMP1930[0] = &TMP848[38];
TMP848[38].kind = 1;
TMP848[38].offset = offsetof(TY522942, Field0);
TMP848[38].typ = (&NTI153);
TMP848[38].name = "Field0";
TMP1930[1] = &TMP848[39];
TMP848[39].kind = 1;
TMP848[39].offset = offsetof(TY522942, Field1);
TMP848[39].typ = (&NTI522944);
TMP848[39].name = "Field1";
TMP848[37].len = 2; TMP848[37].kind = 2; TMP848[37].sons = &TMP1930[0];
NTI244124.node = &TMP848[37];
TMP848[36].kind = 1;
TMP848[36].offset = offsetof(Tcontext244023, seminferredlambda);
TMP848[36].typ = (&NTI244124);
TMP848[36].name = "semInferredLambda";
TMP1927[27] = &TMP848[40];
NTI244130.size = sizeof(TY522942);
NTI244130.kind = 18;
NTI244130.base = 0;
NTI244130.flags = 2;
TMP1931[0] = &TMP848[42];
TMP848[42].kind = 1;
TMP848[42].offset = offsetof(TY522942, Field0);
TMP848[42].typ = (&NTI153);
TMP848[42].name = "Field0";
TMP1931[1] = &TMP848[43];
TMP848[43].kind = 1;
TMP848[43].offset = offsetof(TY522942, Field1);
TMP848[43].typ = (&NTI522944);
TMP848[43].name = "Field1";
TMP848[41].len = 2; TMP848[41].kind = 2; TMP848[41].sons = &TMP1931[0];
NTI244130.node = &TMP848[41];
TMP848[40].kind = 1;
TMP848[40].offset = offsetof(Tcontext244023, semgenerateinstance);
TMP848[40].typ = (&NTI244130);
TMP848[40].name = "semGenerateInstance";
TMP1927[28] = &TMP848[44];
TMP848[44].kind = 1;
TMP848[44].offset = offsetof(Tcontext244023, includedfiles);
TMP848[44].typ = (&NTI187056);
TMP848[44].name = "includedFiles";
TMP1927[29] = &TMP848[45];
TMP848[45].kind = 1;
TMP848[45].offset = offsetof(Tcontext244023, userpragmas);
TMP848[45].typ = (&NTI190817);
TMP848[45].name = "userPragmas";
TMP1927[30] = &TMP848[46];
TMP848[46].kind = 1;
TMP848[46].offset = offsetof(Tcontext244023, evalcontext);
TMP848[46].typ = (&NTI243046);
TMP848[46].name = "evalContext";
TMP1927[31] = &TMP848[47];
TMP848[47].kind = 1;
TMP848[47].offset = offsetof(Tcontext244023, unknownidents);
TMP848[47].typ = (&NTI187056);
TMP848[47].name = "unknownIdents";
TMP1927[32] = &TMP848[48];
NTI244013.size = sizeof(Tinstantiationpair244013);
NTI244013.kind = 18;
NTI244013.base = 0;
NTI244013.flags = 2;
TMP1953[0] = &TMP848[50];
TMP848[50].kind = 1;
TMP848[50].offset = offsetof(Tinstantiationpair244013, genericsym);
TMP848[50].typ = (&NTI190811);
TMP848[50].name = "genericSym";
TMP1953[1] = &TMP848[51];
TMP848[51].kind = 1;
TMP848[51].offset = offsetof(Tinstantiationpair244013, inst);
TMP848[51].typ = (&NTI190835);
TMP848[51].name = "inst";
TMP848[49].len = 2; TMP848[49].kind = 2; TMP848[49].sons = &TMP1953[0];
NTI244013.node = &TMP848[49];
NTI244141.size = sizeof(TY244141*);
NTI244141.kind = 24;
NTI244141.base = (&NTI244013);
NTI244141.flags = 2;
NTI244141.marker = TMP1954;
TMP848[48].kind = 1;
TMP848[48].offset = offsetof(Tcontext244023, generics);
TMP848[48].typ = (&NTI244141);
TMP848[48].name = "generics";
TMP1927[33] = &TMP848[52];
TMP848[52].kind = 1;
TMP848[52].offset = offsetof(Tcontext244023, lastgenericidx);
TMP848[52].typ = (&NTI108);
TMP848[52].name = "lastGenericIdx";
TMP1927[34] = &TMP848[53];
TMP848[53].kind = 1;
TMP848[53].offset = offsetof(Tcontext244023, hloloopdetector);
TMP848[53].typ = (&NTI108);
TMP848[53].name = "hloLoopDetector";
TMP1927[35] = &TMP848[54];
TMP848[54].kind = 1;
TMP848[54].offset = offsetof(Tcontext244023, inparallelstmt);
TMP848[54].typ = (&NTI108);
TMP848[54].name = "inParallelStmt";
TMP1927[36] = &TMP848[55];
NTI244146.size = sizeof(TY244146);
NTI244146.kind = 25;
NTI244146.base = 0;
NTI244146.flags = 3;
TMP848[55].kind = 1;
TMP848[55].offset = offsetof(Tcontext244023, insttypeboundop);
TMP848[55].typ = (&NTI244146);
TMP848[55].name = "instTypeBoundOp";
TMP848[0].len = 37; TMP848[0].kind = 2; TMP848[0].sons = &TMP1927[0];
NTI244023.node = &TMP848[0];
NTI244021.size = sizeof(Tcontext244023*);
NTI244021.kind = 22;
NTI244021.base = (&NTI244023);
NTI244021.marker = TMP1955;
NTI244005.size = sizeof(Toptionentry244005);
NTI244005.kind = 17;
NTI244005.base = (&NTI130022);
TMP1956[0] = &TMP848[57];
TMP848[57].kind = 1;
TMP848[57].offset = offsetof(Toptionentry244005, options);
TMP848[57].typ = (&NTI154016);
TMP848[57].name = "options";
TMP1956[1] = &TMP848[58];
TMP848[58].kind = 1;
TMP848[58].offset = offsetof(Toptionentry244005, defaultcc);
TMP848[58].typ = (&NTI190005);
TMP848[58].name = "defaultCC";
TMP1956[2] = &TMP848[59];
TMP848[59].kind = 1;
TMP848[59].offset = offsetof(Toptionentry244005, dynlib);
TMP848[59].typ = (&NTI190841);
TMP848[59].name = "dynlib";
TMP1956[3] = &TMP848[60];
TMP848[60].kind = 1;
TMP848[60].offset = offsetof(Toptionentry244005, notes);
TMP848[60].typ = (&NTI163334);
TMP848[60].name = "notes";
TMP1956[4] = &TMP848[61];
TMP848[61].kind = 1;
TMP848[61].offset = offsetof(Toptionentry244005, otherpragmas);
TMP848[61].typ = (&NTI190805);
TMP848[61].name = "otherPragmas";
TMP848[56].len = 5; TMP848[56].kind = 2; TMP848[56].sons = &TMP1956[0];
NTI244005.node = &TMP848[56];
NTI244007.size = sizeof(Toptionentry244005*);
NTI244007.kind = 22;
NTI244007.base = (&NTI244005);
NTI244007.marker = TMP1960;
}

