/* Generated by Nim Compiler v0.12.0 */
/*   (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 Tsymseq223811 Tsymseq223811;
typedef struct Tsym223841 Tsym223841;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Cell48947 Cell48947;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48959 Cellset48959;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct Memregion30890 Memregion30890;
typedef struct Smallchunk30842 Smallchunk30842;
typedef struct Llchunk30884 Llchunk30884;
typedef struct Bigchunk30844 Bigchunk30844;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30888 Avlnode30888;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Ttype223847 Ttype223847;
typedef struct Tcontext278023 Tcontext278023;
typedef struct Tpasscontext275005 Tpasscontext275005;
typedef struct TNimObject TNimObject;
typedef struct Tscope223835 Tscope223835;
typedef struct Tproccon278011 Tproccon278011;
typedef struct Intset220056 Intset220056;
typedef struct Trunk220052 Trunk220052;
typedef struct Trunkseq220054 Trunkseq220054;
typedef struct Tlinkedlist139028 Tlinkedlist139028;
typedef struct Tlistentry139022 Tlistentry139022;
typedef struct Tidtable223859 Tidtable223859;
typedef struct Tidpairseq223857 Tidpairseq223857;
typedef struct Tnode223809 Tnode223809;
typedef struct Tlineinfo188352 Tlineinfo188352;
typedef struct Tstrtable223813 Tstrtable223813;
typedef struct Tctx277048 Tctx277048;
typedef struct TY278143 TY278143;
typedef struct TY574951 TY574951;
typedef struct TY574954 TY574954;
typedef struct Tinstantiationpair278013 Tinstantiationpair278013;
typedef struct Tinstantiation223831 Tinstantiation223831;
typedef struct Toptionentry278005 Toptionentry278005;
typedef struct Tlib223827 Tlib223827;
typedef struct Tidobj196015 Tidobj196015;
typedef struct Ttypeseq223843 Ttypeseq223843;
typedef struct Tloc223823 Tloc223823;
typedef struct Ropeobj174009 Ropeobj174009;
typedef struct NimStringDesc NimStringDesc;
typedef struct TY90959 TY90959;
typedef struct Tident196021 Tident196021;
typedef struct Tnodeseq223803 Tnodeseq223803;
typedef struct TY223944 TY223944;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tidpair223855 Tidpair223855;
typedef struct TY277254 TY277254;
typedef struct TY189420 TY189420;
typedef struct PprocHEX3Aobjecttype277233 PprocHEX3Aobjecttype277233;
typedef struct TY277273 TY277273;
typedef struct TY223932 TY223932;
typedef struct TY277234 TY277234;
typedef struct TY277239 TY277239;
typedef struct TY277274 TY277274;
typedef struct Vmargs277042 Vmargs277042;
typedef struct Tblock277030 Tblock277030;
typedef struct TY277214 TY277214;
struct  TGenericSeq  {
NI len;
NI reserved;
};
typedef N_NIMCALL_PTR(void, TY3889) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3894) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3889 marker;
TY3894 deepcopy;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  Cell48947  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48963  {
NI len;
NI cap;
Cell48947** d;
};
struct  Cellset48959  {
NI counter;
NI max;
Pagedesc48955* head;
Pagedesc48955** data;
};
typedef Smallchunk30842* TY30905[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30890  {
NI minlargeobj;
NI maxlargeobj;
TY30905 freesmallchunks;
Llchunk30884* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30844* freechunkslist;
Intset30817 chunkstarts;
Avlnode30888* root;
Avlnode30888* deleted;
Avlnode30888* last;
Avlnode30888* freeavlnodes;
};
struct  Gcstat51014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51018  {
Gcstack51016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 tempstack;
NI recgclock;
Memregion30890 region;
Gcstat51014 stat;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tpasscontext275005  {
  TNimObject Sup;
NIM_BOOL fromcache;
};
struct  Intset220056  {
NI counter;
NI max;
Trunk220052* head;
Trunkseq220054* data;
};
struct  Tlinkedlist139028  {
Tlistentry139022* head;
Tlistentry139022* tail;
NI counter;
};
struct  Tidtable223859  {
NI counter;
Tidpairseq223857* data;
};
typedef N_NIMCALL_PTR(Tnode223809*, TY278074) (Tcontext278023* c, Tnode223809* n);
typedef N_NIMCALL_PTR(Tnode223809*, TY278079) (Tcontext278023* c, Tnode223809* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode223809*, TY278087) (Tcontext278023* c, Tnode223809* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode223809*, TY278095) (Tcontext278023* c, Tnode223809* n);
typedef N_NIMCALL_PTR(Tnode223809*, TY278100) (Tcontext278023* c, Tnode223809* n, NU16 flags);
typedef N_NIMCALL_PTR(Tnode223809*, TY278108) (Tcontext278023* c, Tnode223809* n);
typedef N_NIMCALL_PTR(Tnode223809*, TY278113) (Tcontext278023* c, Tnode223809* n, Tnode223809* norig, NU32 filter);
typedef N_NIMCALL_PTR(Ttype223847*, TY278120) (Tcontext278023* c, Tnode223809* n, Ttype223847* prev);
typedef struct {
N_NIMCALL_PTR(Tnode223809*, ClPrc) (Tcontext278023* c, Tidtable223859 pt, Tnode223809* n, void* ClEnv);
void* ClEnv;
} TY278126;
typedef struct {
N_NIMCALL_PTR(Tsym223841*, ClPrc) (Tcontext278023* c, Tsym223841* fn, Tidtable223859 pt, Tlineinfo188352 info, void* ClEnv);
void* ClEnv;
} TY278132;
struct  Tstrtable223813  {
NI counter;
Tsymseq223811* data;
};
typedef N_NIMCALL_PTR(Tsym223841*, TY278148) (Tcontext278023* c, Tsym223841* dc, Ttype223847* t, Tlineinfo188352 info, NU8 op);
struct  Tcontext278023  {
  Tpasscontext275005 Sup;
Tsym223841* module;
Tscope223835* currentscope;
Tscope223835* importtable;
Tscope223835* toplevelscope;
Tproccon278011* p;
Tsymseq223811* friendmodules;
NI instcounter;
Intset220056 ambiguoussymbols;
NI intypeclass;
NI ingenericcontext;
NI inunrolledcontext;
NI compilescontextid;
NI compilescontextidgenerator;
NI ingenericinst;
Tsymseq223811* converters;
Tsymseq223811* patterns;
Tlinkedlist139028 optionstack;
Tidtable223859 symmapping;
Tlinkedlist139028 libs;
TY278074 semconstexpr;
TY278079 semexpr;
TY278087 semtryexpr;
TY278095 semtryconstexpr;
TY278100 semoperand;
TY278108 semconstboolexpr;
TY278113 semoverloadedcall;
TY278120 semtypenode;
TY278126 seminferredlambda;
TY278132 semgenerateinstance;
Intset220056 includedfiles;
Tstrtable223813 userpragmas;
Tctx277048* evalcontext;
Intset220056 unknownidents;
TY278143* generics;
NI lastgenericidx;
NI hloloopdetector;
NI inparallelstmt;
TY278148 insttypeboundop;
};
struct  Tproccon278011  {
Tsym223841* owner;
Tsym223841* resultsym;
NI nestedloopcounter;
NI nestedblockcounter;
NI intrystmt;
Tproccon278011* next;
NIM_BOOL wasforwarded;
Tnode223809* bracketexpr;
};
struct TY574951 {
void* Field0;
TY574954* Field1;
};
struct  Tinstantiationpair278013  {
Tsym223841* genericsym;
Tinstantiation223831* inst;
};
struct  Tlistentry139022  {
  TNimObject Sup;
Tlistentry139022* prev;
Tlistentry139022* next;
};
struct  Toptionentry278005  {
  Tlistentry139022 Sup;
NU32 options;
NU8 defaultcc;
Tlib223827* dynlib;
NU64 notes;
Tnode223809* otherpragmas;
};
typedef Tsym223841* TY278434[1];
struct  Tidobj196015  {
  TNimObject Sup;
NI id;
};
struct  Tloc223823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype223847* t;
Ropeobj174009* r;
Ropeobj174009* heaproot;
};
struct  Ttype223847  {
  Tidobj196015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq223843* sons;
Tnode223809* n;
Tsym223841* owner;
Tsym223841* sym;
Tsym223841* destructor;
Tsym223841* deepcopy;
Tsym223841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc223823 loc;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct TY90959 {
NimStringDesc* Field0;
NI Field1;
};
struct  Tlineinfo188352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tnode223809  {
Ttype223847* typ;
Tlineinfo188352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym223841* sym;
} S4;
struct {Tident196021* ident;
} S5;
struct {Tnodeseq223803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
typedef Tnode223809* TY241880[1];
typedef Ttype223847* TY391275[1];
typedef Ttype223847* TY278864[2];
typedef Tnode223809* TY279106[2];
struct  Tlib223827  {
  Tlistentry139022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj174009* name;
Tnode223809* path;
};
struct  Tsym223841  {
  Tidobj196015 Sup;
NU8 kind;
union{
struct {Ttypeseq223843* typeinstcache;
Tscope223835* typscope;
} S1;
struct {TY223944* procinstcache;
Tsym223841* gcunsafetyreason;
} S2;
struct {TY223944* usedgenerics;
Tstrtable223813 tab;
} S3;
struct {Tsym223841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype223847* typ;
Tident196021* name;
Tlineinfo188352 info;
Tsym223841* owner;
NU32 flags;
Tnode223809* ast;
NU32 options;
NI position;
NI offset;
Tloc223823 loc;
Tlib223827* annex;
Tnode223809* constraint;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30821 bits;
};
struct  Basechunk30840  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30842  {
  Basechunk30840 Sup;
Smallchunk30842* next;
Smallchunk30842* prev;
Freecell30832* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30884  {
NI size;
NI acc;
Llchunk30884* next;
};
struct  Bigchunk30844  {
  Basechunk30840 Sup;
Bigchunk30844* next;
Bigchunk30844* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30821 bits;
};
typedef Avlnode30888* TY30895[2];
struct  Avlnode30888  {
TY30895 link;
NI key;
NI upperbound;
NI level;
};
struct  Tscope223835  {
NI depthlevel;
Tstrtable223813 symbols;
Tnodeseq223803* usingsyms;
Tscope223835* parent;
};
struct  Trunk220052  {
Trunk220052* next;
NI key;
TY30821 bits;
};
struct  Tidpair223855  {
Tidobj196015* key;
TNimObject* val;
};
struct  Tctx277048  {
  Tpasscontext275005 Sup;
TY277254* code;
TY189420* debug;
Tnode223809* globals;
Tnode223809* constants;
Ttypeseq223843* types;
Tnode223809* currentexceptiona;
Tnode223809* currentexceptionb;
NI exceptioninstr;
PprocHEX3Aobjecttype277233* prc;
Tsym223841* module;
Tnode223809* callsite;
NU8 mode;
NU8 features;
NIM_BOOL traceactive;
NI loopiterations;
Tlineinfo188352 comesfromheuristic;
TY277273* callbacks;
NimStringDesc* errorflag;
};
struct TY574954 {
char dummy;
};
struct  Tinstantiation223831  {
Tsym223841* sym;
Ttypeseq223843* concretetypes;
TY223932* usedby;
NI compilesid;
};
struct  Ropeobj174009  {
  TNimObject Sup;
Ropeobj174009* left;
Ropeobj174009* right;
NI length;
NimStringDesc* data;
};
struct  Tident196021  {
  Tidobj196015 Sup;
NimStringDesc* s;
Tident196021* next;
NI h;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct TY277239 {
NIM_BOOL Field0;
NU8 Field1;
};
typedef TY277239 TY277242[256];
struct  PprocHEX3Aobjecttype277233  {
TY277234* blocks;
Tsym223841* sym;
TY277242 slots;
NI maxslots;
};
typedef struct {
N_NIMCALL_PTR(void, ClPrc) (Vmargs277042* args, void* ClEnv);
void* ClEnv;
} Vmcallback277044;
struct TY277274 {
NimStringDesc* Field0;
Vmcallback277044 Field1;
};
struct  Tblock277030  {
Tsym223841* label;
TY277214* fixups;
};
struct  Vmargs277042  {
NI ra;
NI rb;
NI rc;
void* slots;
Tnode223809* currentexception;
};
struct Tsymseq223811 {
  TGenericSeq Sup;
  Tsym223841* data[SEQ_DECL_SIZE];
};
struct TY278143 {
  TGenericSeq Sup;
  Tinstantiationpair278013 data[SEQ_DECL_SIZE];
};
struct Ttypeseq223843 {
  TGenericSeq Sup;
  Ttype223847* data[SEQ_DECL_SIZE];
};
struct Tnodeseq223803 {
  TGenericSeq Sup;
  Tnode223809* data[SEQ_DECL_SIZE];
};
struct Trunkseq220054 {
  TGenericSeq Sup;
  Trunk220052* data[SEQ_DECL_SIZE];
};
struct Tidpairseq223857 {
  TGenericSeq Sup;
  Tidpair223855 data[SEQ_DECL_SIZE];
};
struct TY223944 {
  TGenericSeq Sup;
  Tinstantiation223831* data[SEQ_DECL_SIZE];
};
struct TY277254 {
  TGenericSeq Sup;
  NU32 data[SEQ_DECL_SIZE];
};
struct TY189420 {
  TGenericSeq Sup;
  Tlineinfo188352 data[SEQ_DECL_SIZE];
};
struct TY277273 {
  TGenericSeq Sup;
  TY277274 data[SEQ_DECL_SIZE];
};
struct TY223932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct TY277234 {
  TGenericSeq Sup;
  Tblock277030 data[SEQ_DECL_SIZE];
};
struct TY277214 {
  TGenericSeq Sup;
  NI data[SEQ_DECL_SIZE];
};
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(Cell48947*, usrtocell_52646)(void* usr);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(Ttype223847*, newtype_226140)(NU8 kind, Tsym223841* owner);
N_NIMCALL(Tsym223841*, getcurrowner_278258)(void);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP2028)(void* p, NI op);
N_NIMCALL(void, TMP2053)(void* p, NI op);
N_NIMCALL(void, TMP2054)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void, initintset_220927)(Intset220056* Result);
N_NIMCALL(void, initlinkedlist_139043)(Tlinkedlist139028* list);
N_NIMCALL(void, append_139053)(Tlinkedlist139028* list, Tlistentry139022* entry);
N_NIMCALL(Toptionentry278005*, newoptionentry_278196)(void);
N_NIMCALL(void, TMP2059)(void* p, NI op);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_55022)(Cell48947* c);
static N_INLINE(NIM_BOOL, canbecycleroot_52667)(Cell48947* c);
static N_INLINE(void, rtladdcycleroot_53423)(Cell48947* c);
N_NOINLINE(void, incl_49665)(Cellset48959* s, Cell48947* cell);
static N_INLINE(void, decref_54604)(Cell48947* c);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, initstrtable_227007)(Tstrtable223813* x);
N_NIMCALL(Ttype223847*, newtypes_278221)(NU8 kind, Tcontext278023* c);
N_NIMCALL(void, addsonskipintlit_272729)(Ttype223847* father, Ttype223847* son);
N_NIMCALL(void, internalerror_194191)(NimStringDesc* errmsg);
N_NIMCALL(NimStringDesc*, HEX24_194279)(TY90959 x);
N_NIMCALL(void, globalerror_194107)(Tlineinfo188352 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(NimStringDesc*, rendertree_245059)(Tnode223809* n, NU8 renderflags);
N_NIMCALL(NI, sonslen_226387)(Tnode223809* n);
N_NIMCALL(void, illformedast_279240)(Tnode223809* n);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_85804, TNimType* mt);
N_NIMCALL(Tnode223809*, newnodei_225351)(NU8 kind, Tlineinfo188352 info);
N_NIMCALL(void, addson_225819)(Tnode223809* father, Tnode223809* son);
N_NIMCALL(Tnode223809*, newinttypenode_224620)(NU8 kind, NI64 intval, Ttype223847* typ);
N_NIMCALL(Ttype223847*, newtypewithsons_278807)(Tcontext278023* c, NU8 kind, Ttypeseq223843* sons);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, propagatetoowner_227274)(Ttype223847* owner, Ttype223847* elem);
N_NIMCALL(Ttype223847*, getsystype_272190)(NU8 kind);
N_NIMCALL(Tnode223809*, newnode_225607)(NU8 kind, Tlineinfo188352 info, Tnodeseq223803* sons, Ttype223847* typ);
N_NIMCALL(Tnode223809*, makestaticexpr_278820)(Tcontext278023* c, Tnode223809* n);
N_NIMCALL(Tnode223809*, nminusone_279064)(Tnode223809* n);
N_NIMCALL(Tnode223809*, newsymnode_225325)(Tsym223841* sym);
N_NIMCALL(Tsym223841*, getsysmagic_272121)(NimStringDesc* name, NU8 m);
N_NIMCALL(TGenericSeq*, incrSeqV2)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, localerror_194128)(Tlineinfo188352 info, NU16 msg, NimStringDesc* arg);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(Ttype223847*, errortype_279161)(Tcontext278023* c);
N_NIMCALL(Ttype223847*, maketypedesc_278684)(Tcontext278023* c, Ttype223847* typ);
N_NIMCALL(Tsym223841*, linkto_224884)(Tsym223841* s, Ttype223847* t);
N_NIMCALL(Tsym223841*, newsym_224656)(NU8 symkind, Tident196021* name, Tsym223841* owner, Tlineinfo188352 info);
N_NIMCALL(Tnode223809*, newsymnode_225338)(Tsym223841* sym, Tlineinfo188352 info);
N_NIMCALL(void, inclsym_278502)(Tsymseq223811** sq, Tsym223841* s);
STRING_LITERAL(TMP2747, "compiler/semdata.nim", 20);
NIM_CONST TY90959 TMP2746 = {((NimStringDesc*) &TMP2747),
((NI) 226)}
;
NIM_CONST TY90959 TMP2761 = {((NimStringDesc*) &TMP2747),
((NI) 222)}
;
STRING_LITERAL(TMP3121, "<", 1);
STRING_LITERAL(TMP3294, "popOwner", 8);
NIM_CONST TY90959 TMP3337 = {((NimStringDesc*) &TMP2747),
((NI) 215)}
;
Tsymseq223811* gowners_278291;
extern TNimType NTI223811; /* TSymSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI275005; /* TPassContext */
TNimType NTI278023; /* TContext */
extern TNimType NTI223807; /* PSym */
extern TNimType NTI223837; /* PScope */
TNimType NTI278011; /* TProcCon */
extern TNimType NTI108; /* int */
extern TNimType NTI138; /* bool */
extern TNimType NTI223801; /* PNode */
TNimType NTI278009; /* PProcCon */
extern TNimType NTI220056; /* IntSet */
extern TNimType NTI139028; /* TLinkedList */
extern TNimType NTI223859; /* TIdTable */
TNimType NTI278074; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI278079; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI278087; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI278095; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI278100; /* proc (c: PContext, n: PNode, flags: TExprFlags): PNode */
TNimType NTI278108; /* proc (c: PContext, n: PNode): PNode */
TNimType NTI278113; /* proc (c: PContext, n: PNode, nOrig: PNode, filter: TSymKinds): PNode */
TNimType NTI278120; /* proc (c: PContext, n: PNode, prev: PType): PType */
TNimType NTI278126; /* (pointer, ref tuple[]) */
extern TNimType NTI153; /* pointer */
extern TNimType NTI574953; /* ref tuple[] */
TNimType NTI278132; /* (pointer, ref tuple[]) */
extern TNimType NTI223813; /* TStrTable */
extern TNimType NTI277046; /* PCtx */
TNimType NTI278013; /* TInstantiationPair */
extern TNimType NTI223833; /* PInstantiation */
TNimType NTI278143; /* seq[TInstantiationPair] */
TNimType NTI278148; /* proc (c: PContext, dc: PSym, t: PType, info: TLineInfo, op: TTypeAttachedOp): PSym */
TNimType NTI278021; /* PContext */
extern TNimType NTI139022; /* TListEntry */
TNimType NTI278005; /* TOptionEntry */
extern TNimType NTI165017; /* TOptions */
extern TNimType NTI223005; /* TCallingConvention */
extern TNimType NTI223839; /* PLib */
extern TNimType NTI188348; /* TNoteKinds */
TNimType NTI278007; /* POptionEntry */
extern NU32 goptions_165130;
extern NU64 gnotes_189398;
extern TNimType NTI223843; /* TTypeSeq */
extern TNimType NTI223803; /* TNodeSeq */
extern TNimType NTI223827; /* TLib */
extern Tident196021* idanon_196495;

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

static N_INLINE(void, rtladdzct_54204)(Cell48947* c) {
	addzct_52617((&gch_51059.zct), c);
}

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

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

N_NIMCALL(Ttype223847*, newtypes_278221)(NU8 kind, Tcontext278023* c) {
	Ttype223847* result;
	Tsym223841* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_278258();
	result = newtype_226140(kind, LOC1);
	return result;
}
N_NIMCALL(void, TMP2028)(void* p, NI op) {
	Tproccon278011* a;
	a = (Tproccon278011*)p;
	nimGCvisit((void*)(*a).owner, op);
	nimGCvisit((void*)(*a).resultsym, op);
	nimGCvisit((void*)(*a).next, op);
	nimGCvisit((void*)(*a).bracketexpr, op);
}
N_NIMCALL(void, TMP2053)(void* p, NI op) {
	TY278143* a;
	NI LOC1;
	a = (TY278143*)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, TMP2054)(void* p, NI op) {
	Tcontext278023* a;
	a = (Tcontext278023*)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, TMP2059)(void* p, NI op) {
	Toptionentry278005* a;
	a = (Toptionentry278005*)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_52667)(Cell48947* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

static N_INLINE(void, rtladdcycleroot_53423)(Cell48947* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_49665((&gch_51059.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, incref_55022)(Cell48947* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_52667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_53423(c);
	}
	LA4: ;
}

static N_INLINE(void, decref_54604)(Cell48947* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_54204(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_52667(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_53423(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Cell48947* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_52646(src);
		incref_55022(LOC5);
	}
	LA3: ;
	{
		Cell48947* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_52646((*dest));
		decref_54604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

N_NIMCALL(Toptionentry278005*, newoptionentry_278196)(void) {
	Toptionentry278005* result;
	result = 0;
	result = (Toptionentry278005*) newObj((&NTI278007), sizeof(Toptionentry278005));
	(*result).Sup.Sup.m_type = (&NTI278005);
	(*result).options = goptions_165130;
	(*result).defaultcc = ((NU8) 0);
	asgnRef((void**) (&(*result).dynlib), NIM_NIL);
	(*result).notes = gnotes_189398;
	return result;
}

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

N_NIMCALL(Tcontext278023*, newcontext_278184)(Tsym223841* module) {
	Tcontext278023* result;
	Toptionentry278005* LOC1;
	Tlistentry139022* LOC2;
	TY278434 LOC3;
	result = 0;
	result = (Tcontext278023*) newObj((&NTI278021), sizeof(Tcontext278023));
	(*result).Sup.Sup.m_type = (&NTI278023);
	initintset_220927((&(*result).ambiguoussymbols));
	initlinkedlist_139043((&(*result).optionstack));
	initlinkedlist_139043((&(*result).libs));
	LOC1 = 0;
	LOC1 = newoptionentry_278196();
	LOC2 = 0;
	LOC2 = &LOC1->Sup;
	append_139053((&(*result).optionstack), LOC2);
	asgnRefNoCycle((void**) (&(*result).module), module);
	if ((*result).friendmodules) nimGCunrefNoCycle((*result).friendmodules);
	(*result).friendmodules = (Tsymseq223811*) newSeqRC1((&NTI223811), 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 = (Tsymseq223811*) newSeqRC1((&NTI223811), 0);
	if ((*result).patterns) nimGCunrefNoCycle((*result).patterns);
	(*result).patterns = (Tsymseq223811*) newSeqRC1((&NTI223811), 0);
	initintset_220927((&(*result).includedfiles));
	initstrtable_227007((&(*result).userpragmas));
	if ((*result).generics) nimGCunrefNoCycle((*result).generics);
	(*result).generics = (TY278143*) newSeqRC1((&NTI278143), 0);
	initintset_220927((&(*result).unknownidents));
	return result;
}

N_NIMCALL(Ttype223847*, maketypefromexpr_278729)(Tcontext278023* c, Tnode223809* n) {
	Ttype223847* result;
	result = 0;
	result = newtypes_278221(((NU8) 60), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	return result;
}

N_NIMCALL(Ttype223847*, errortype_279161)(Tcontext278023* c) {
	Ttype223847* result;
	result = 0;
	result = newtypes_278221(((NU8) 50), c);
	return result;
}

N_NIMCALL(Ttype223847*, maketypedesc_278684)(Tcontext278023* c, Ttype223847* typ) {
	Ttype223847* result;
	result = 0;
	result = newtypes_278221(((NU8) 8), c);
	{
		NimStringDesc* LOC5;
		if (!(typ == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_194279(TMP2746);
		internalerror_194191(LOC5);
	}
	LA3: ;
	addsonskipintlit_272729(result, typ);
	return result;
}

N_NIMCALL(void, illformedast_279240)(Tnode223809* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_245059(n, 4);
	globalerror_194107((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(void, checksonslen_279260)(Tnode223809* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226387(n);
		if (!!((LOC3 == length))) goto LA4;
		illformedast_279240(n);
	}
	LA4: ;
}

N_NIMCALL(Ttype223847*, newtypewithsons_278807)(Tcontext278023* c, NU8 kind, Ttypeseq223843* sons) {
	Ttype223847* result;
	Tsym223841* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = getcurrowner_278258();
	result = newtype_226140(kind, LOC1);
	genericSeqAssign((&(*result).sons), sons, (&NTI223843));
	return result;
}

N_NIMCALL(Ttype223847*, makevartype_278645)(Tcontext278023* c, Ttype223847* basetype) {
	Ttype223847* result;
	result = 0;
	{
		if (!((*basetype).kind == ((NU8) 23))) goto LA3;
		result = basetype;
	}
	goto LA1;
	LA3: ;
	{
		result = newtypes_278221(((NU8) 23), c);
		{
			NimStringDesc* LOC10;
			if (!(basetype == NIM_NIL)) goto LA8;
			LOC10 = 0;
			LOC10 = HEX24_194279(TMP2761);
			internalerror_194191(LOC10);
		}
		LA8: ;
		addsonskipintlit_272729(result, basetype);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Ttype223847*, makerangetype_279193)(Tcontext278023* c, NI64 first, NI64 last, Tlineinfo188352 info, Ttype223847* inttype) {
	Ttype223847* result;
	Tnode223809* n;
	Tnode223809* LOC1;
	Tnode223809* LOC2;
	result = 0;
	n = newnodei_225351(((NU8) 44), info);
	LOC1 = 0;
	LOC1 = newinttypenode_224620(((NU8) 6), first, inttype);
	addson_225819(n, LOC1);
	LOC2 = 0;
	LOC2 = newinttypenode_224620(((NU8) 6), last, inttype);
	addson_225819(n, LOC2);
	result = newtypes_278221(((NU8) 20), c);
	asgnRefNoCycle((void**) (&(*result).n), n);
	addsonskipintlit_272729(result, inttype);
	return result;
}

N_NIMCALL(Tnode223809*, makestaticexpr_278820)(Tcontext278023* c, Tnode223809* n) {
	Tnode223809* result;
	TY241880 LOC1;
	Ttypeseq223843* LOC2;
	TY391275 LOC3;
	result = 0;
	result = newnodei_225351(((NU8) 62), (*n).info);
	if ((*result).kindU.S6.sons) nimGCunrefNoCycle((*result).kindU.S6.sons);
	(*result).kindU.S6.sons = (Tnodeseq223803*) newSeqRC1((&NTI223803), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = n;
	asgnRefNoCycle((void**) (&(*result).kindU.S6.sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Ttypeseq223843*) newSeq((&NTI223843), 1);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = (*n).typ;
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&(*result).typ), newtypewithsons_278807(c, ((NU8) 59), LOC2));
	return result;
}

N_NIMCALL(Ttype223847*, makeandtype_278858)(Tcontext278023* c, Ttype223847* t1, Ttype223847* t2) {
	Ttype223847* result;
	TY278864 LOC1;
	result = 0;
	result = newtypes_278221(((NU8) 55), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq223843*) newSeqRC1((&NTI223843), 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_227274(result, t1);
	propagatetoowner_227274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NU32)1)<<((((NU8) 19))%(sizeof(NU32)*8));
	return result;
}

N_NIMCALL(Ttype223847*, makeortype_278931)(Tcontext278023* c, Ttype223847* t1, Ttype223847* t2) {
	Ttype223847* result;
	TY278864 LOC1;
	result = 0;
	result = newtypes_278221(((NU8) 56), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq223843*) newSeqRC1((&NTI223843), 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_227274(result, t1);
	propagatetoowner_227274(result, t2);
	(*result).flags = ((*result).flags | (((*t1).flags | (*t2).flags) & 4194304));
	(*result).flags |= ((NU32)1)<<((((NU8) 19))%(sizeof(NU32)*8));
	return result;
}

N_NIMCALL(Ttype223847*, makenottype_279004)(Tcontext278023* c, Ttype223847* t1) {
	Ttype223847* result;
	TY391275 LOC1;
	result = 0;
	result = newtypes_278221(((NU8) 57), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq223843*) newSeqRC1((&NTI223843), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = t1;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	propagatetoowner_227274(result, t1);
	(*result).flags = ((*result).flags | ((*t1).flags & 4194304));
	(*result).flags |= ((NU32)1)<<((((NU8) 19))%(sizeof(NU32)*8));
	return result;
}

N_NIMCALL(void, checkminsonslen_279270)(Tnode223809* n, NI length) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = sonslen_226387(n);
		if (!(LOC3 < length)) goto LA4;
		illformedast_279240(n);
	}
	LA4: ;
}

N_NIMCALL(Tnode223809*, nminusone_279064)(Tnode223809* n) {
	Tnode223809* result;
	Tnodeseq223803* LOC1;
	TY279106 LOC2;
	Tsym223841* LOC3;
	result = 0;
	LOC1 = 0;
	LOC1 = (Tnodeseq223803*) newSeq((&NTI223803), 2);
	memset((void*)LOC2, 0, sizeof(LOC2));
	LOC3 = 0;
	LOC3 = getsysmagic_272121(((NimStringDesc*) &TMP3121), ((NU8) 25));
	LOC2[0] = newsymnode_225325(LOC3);
	LOC2[1] = n;
	asgnRefNoCycle((void**) (&LOC1->data[0]), LOC2[0]);
	asgnRefNoCycle((void**) (&LOC1->data[1]), LOC2[1]);
	result = newnode_225607(((NU8) 27), (*n).info, LOC1, NIM_NIL);
	return result;
}

N_NIMCALL(Ttype223847*, makerangewithstaticexpr_279087)(Tcontext278023* c, Tnode223809* n) {
	Ttype223847* result;
	Ttype223847* inttype;
	TY391275 LOC1;
	Tnodeseq223803* LOC2;
	TY279106 LOC3;
	Tnode223809* LOC4;
	result = 0;
	inttype = getsystype_272190(((NU8) 31));
	result = newtypes_278221(((NU8) 20), c);
	if ((*result).sons) nimGCunrefNoCycle((*result).sons);
	(*result).sons = (Ttypeseq223843*) newSeqRC1((&NTI223843), 1);
	memset((void*)LOC1, 0, sizeof(LOC1));
	LOC1[0] = inttype;
	asgnRefNoCycle((void**) (&(*result).sons->data[0]), LOC1[0]);
	LOC2 = 0;
	LOC2 = (Tnodeseq223803*) newSeq((&NTI223803), 2);
	memset((void*)LOC3, 0, sizeof(LOC3));
	LOC3[0] = newinttypenode_224620(((NU8) 6), IL64(0), inttype);
	LOC4 = 0;
	LOC4 = nminusone_279064(n);
	LOC3[1] = makestaticexpr_278820(c, LOC4);
	asgnRefNoCycle((void**) (&LOC2->data[0]), LOC3[0]);
	asgnRefNoCycle((void**) (&LOC2->data[1]), LOC3[1]);
	asgnRefNoCycle((void**) (&(*result).n), newnode_225607(((NU8) 44), (*n).info, LOC2, NIM_NIL));
	return result;
}

N_NIMCALL(void, pushowner_278263)(Tsym223841* owner) {
	gowners_278291 = (Tsymseq223811*) incrSeqV2(&(gowners_278291)->Sup, sizeof(Tsym223841*));
	asgnRefNoCycle((void**) (&gowners_278291->data[gowners_278291->Sup.len]), owner);
	++gowners_278291->Sup.len;
}

N_NIMCALL(void, makeinstpair_278159)(Tsym223841* s, Tinstantiation223831* inst, Tinstantiationpair278013* Result) {
	unsureAsgnRef((void**) (&(*Result).genericsym), s);
	unsureAsgnRef((void**) (&(*Result).inst), inst);
}

N_NIMCALL(Tlib223827*, newlib_278201)(NU8 kind) {
	Tlib223827* result;
	result = 0;
	result = (Tlib223827*) newObj((&NTI223839), sizeof(Tlib223827));
	(*result).Sup.Sup.m_type = (&NTI223827);
	(*result).kind = kind;
	return result;
}

N_NIMCALL(void, addtolib_278207)(Tlib223827* lib, Tsym223841* sym) {
	asgnRef((void**) (&(*sym).annex), lib);
}

N_NIMCALL(void, illformedastlocal_279250)(Tnode223809* n) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = rendertree_245059(n, 4);
	localerror_194128((*n).info, ((NU16) 1), LOC1);
}

N_NIMCALL(Toptionentry278005*, lastoptionentry_278190)(Tcontext278023* c) {
	Toptionentry278005* result;
	result = 0;
	result = ((Toptionentry278005*) ((*c).optionstack.tail));
	return result;
}

N_NIMCALL(void, popowner_278269)(void) {
	NI length;
	length = (gowners_278291 ? gowners_278291->Sup.len : 0);
	{
		if (!(((NI) 0) < length)) goto LA3;
		gowners_278291 = (Tsymseq223811*) setLengthSeq(&(gowners_278291)->Sup, sizeof(Tsym223841*), ((NI) ((NI)(length - ((NI) 1)))));
	}
	goto LA1;
	LA3: ;
	{
		internalerror_194191(((NimStringDesc*) &TMP3294));
	}
	LA1: ;
}

N_NIMCALL(Ttype223847*, makeptrtype_278214)(Tcontext278023* c, Ttype223847* basetype) {
	Ttype223847* result;
	result = 0;
	result = newtypes_278221(((NU8) 21), c);
	{
		NimStringDesc* LOC5;
		if (!(basetype == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = HEX24_194279(TMP3337);
		internalerror_194191(LOC5);
	}
	LA3: ;
	addsonskipintlit_272729(result, basetype);
	return result;
}

N_NIMCALL(Tnode223809*, errornode_279171)(Tcontext278023* c, Tnode223809* n) {
	Tnode223809* result;
	result = 0;
	result = newnodei_225351(((NU8) 1), (*n).info);
	asgnRefNoCycle((void**) (&(*result).typ), errortype_279161(c));
	return result;
}

N_NIMCALL(Tnode223809*, maketypesymnode_278714)(Tcontext278023* c, Ttype223847* typ, Tlineinfo188352 info) {
	Tnode223809* result;
	Ttype223847* typedesc;
	Tsym223841* sym;
	Tsym223841* LOC1;
	Tsym223841* LOC2;
{	result = 0;
	typedesc = maketypedesc_278684(c, typ);
	LOC1 = 0;
	LOC1 = getcurrowner_278258();
	LOC2 = 0;
	LOC2 = newsym_224656(((NU8) 7), idanon_196495, LOC1, info);
	sym = linkto_224884(LOC2, typedesc);
	result = newsymnode_225338(sym, info);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, inclsym_278502)(Tsymseq223811** sq, Tsym223841* s) {
	NI L;
{	L = ((*sq) ? (*sq)->Sup.len : 0);
	{
		NI i_278528;
		NI HEX3Atmp_278542;
		NI res_278545;
		i_278528 = 0;
		HEX3Atmp_278542 = 0;
		HEX3Atmp_278542 = (NI)(L - ((NI) 1));
		res_278545 = ((NI) 0);
		{
			while (1) {
				if (!(res_278545 <= HEX3Atmp_278542)) goto LA3;
				i_278528 = res_278545;
				{
					if (!((*(*sq)->data[i_278528]).Sup.id == (*s).Sup.id)) goto LA6;
					goto BeforeRet;
				}
				LA6: ;
				res_278545 += ((NI) 1);
			} LA3: ;
		}
	}
	(*sq) = (Tsymseq223811*) setLengthSeq(&((*sq))->Sup, sizeof(Tsym223841*), ((NI) ((NI)(L + ((NI) 1)))));
	asgnRefNoCycle((void**) (&(*sq)->data[L]), s);
	}BeforeRet: ;
}

N_NIMCALL(void, addconverter_278564)(Tcontext278023* c, Tsym223841* conv) {
	inclsym_278502((&(*c).converters), conv);
}

N_NIMCALL(void, addpattern_278575)(Tcontext278023* c, Tsym223841* p) {
	inclsym_278502((&(*c).patterns), p);
}
NIM_EXTERNC N_NOINLINE(void, compiler_semdataInit000)(void) {
	if (gowners_278291) nimGCunrefNoCycle(gowners_278291);
	gowners_278291 = (Tsymseq223811*) newSeqRC1((&NTI223811), 0);
}

NIM_EXTERNC N_NOINLINE(void, compiler_semdataDatInit000)(void) {
static TNimNode* TMP2026[38];
static TNimNode* TMP2027[8];
static TNimNode* TMP2029[2];
static TNimNode* TMP2030[2];
static TNimNode* TMP2052[2];
static TNimNode* TMP2055[5];
static TNimNode TMP929[63];
NTI278023.size = sizeof(Tcontext278023);
NTI278023.kind = 17;
NTI278023.base = (&NTI275005);
TMP2026[0] = &TMP929[1];
TMP929[1].kind = 1;
TMP929[1].offset = offsetof(Tcontext278023, module);
TMP929[1].typ = (&NTI223807);
TMP929[1].name = "module";
TMP2026[1] = &TMP929[2];
TMP929[2].kind = 1;
TMP929[2].offset = offsetof(Tcontext278023, currentscope);
TMP929[2].typ = (&NTI223837);
TMP929[2].name = "currentScope";
TMP2026[2] = &TMP929[3];
TMP929[3].kind = 1;
TMP929[3].offset = offsetof(Tcontext278023, importtable);
TMP929[3].typ = (&NTI223837);
TMP929[3].name = "importTable";
TMP2026[3] = &TMP929[4];
TMP929[4].kind = 1;
TMP929[4].offset = offsetof(Tcontext278023, toplevelscope);
TMP929[4].typ = (&NTI223837);
TMP929[4].name = "topLevelScope";
TMP2026[4] = &TMP929[5];
NTI278011.size = sizeof(Tproccon278011);
NTI278011.kind = 18;
NTI278011.base = 0;
TMP2027[0] = &TMP929[7];
TMP929[7].kind = 1;
TMP929[7].offset = offsetof(Tproccon278011, owner);
TMP929[7].typ = (&NTI223807);
TMP929[7].name = "owner";
TMP2027[1] = &TMP929[8];
TMP929[8].kind = 1;
TMP929[8].offset = offsetof(Tproccon278011, resultsym);
TMP929[8].typ = (&NTI223807);
TMP929[8].name = "resultSym";
TMP2027[2] = &TMP929[9];
TMP929[9].kind = 1;
TMP929[9].offset = offsetof(Tproccon278011, nestedloopcounter);
TMP929[9].typ = (&NTI108);
TMP929[9].name = "nestedLoopCounter";
TMP2027[3] = &TMP929[10];
TMP929[10].kind = 1;
TMP929[10].offset = offsetof(Tproccon278011, nestedblockcounter);
TMP929[10].typ = (&NTI108);
TMP929[10].name = "nestedBlockCounter";
TMP2027[4] = &TMP929[11];
TMP929[11].kind = 1;
TMP929[11].offset = offsetof(Tproccon278011, intrystmt);
TMP929[11].typ = (&NTI108);
TMP929[11].name = "inTryStmt";
TMP2027[5] = &TMP929[12];
TMP929[12].kind = 1;
TMP929[12].offset = offsetof(Tproccon278011, next);
TMP929[12].typ = (&NTI278009);
TMP929[12].name = "next";
TMP2027[6] = &TMP929[13];
TMP929[13].kind = 1;
TMP929[13].offset = offsetof(Tproccon278011, wasforwarded);
TMP929[13].typ = (&NTI138);
TMP929[13].name = "wasForwarded";
TMP2027[7] = &TMP929[14];
TMP929[14].kind = 1;
TMP929[14].offset = offsetof(Tproccon278011, bracketexpr);
TMP929[14].typ = (&NTI223801);
TMP929[14].name = "bracketExpr";
TMP929[6].len = 8; TMP929[6].kind = 2; TMP929[6].sons = &TMP2027[0];
NTI278011.node = &TMP929[6];
NTI278009.size = sizeof(Tproccon278011*);
NTI278009.kind = 22;
NTI278009.base = (&NTI278011);
NTI278009.marker = TMP2028;
TMP929[5].kind = 1;
TMP929[5].offset = offsetof(Tcontext278023, p);
TMP929[5].typ = (&NTI278009);
TMP929[5].name = "p";
TMP2026[5] = &TMP929[15];
TMP929[15].kind = 1;
TMP929[15].offset = offsetof(Tcontext278023, friendmodules);
TMP929[15].typ = (&NTI223811);
TMP929[15].name = "friendModules";
TMP2026[6] = &TMP929[16];
TMP929[16].kind = 1;
TMP929[16].offset = offsetof(Tcontext278023, instcounter);
TMP929[16].typ = (&NTI108);
TMP929[16].name = "instCounter";
TMP2026[7] = &TMP929[17];
TMP929[17].kind = 1;
TMP929[17].offset = offsetof(Tcontext278023, ambiguoussymbols);
TMP929[17].typ = (&NTI220056);
TMP929[17].name = "ambiguousSymbols";
TMP2026[8] = &TMP929[18];
TMP929[18].kind = 1;
TMP929[18].offset = offsetof(Tcontext278023, intypeclass);
TMP929[18].typ = (&NTI108);
TMP929[18].name = "inTypeClass";
TMP2026[9] = &TMP929[19];
TMP929[19].kind = 1;
TMP929[19].offset = offsetof(Tcontext278023, ingenericcontext);
TMP929[19].typ = (&NTI108);
TMP929[19].name = "inGenericContext";
TMP2026[10] = &TMP929[20];
TMP929[20].kind = 1;
TMP929[20].offset = offsetof(Tcontext278023, inunrolledcontext);
TMP929[20].typ = (&NTI108);
TMP929[20].name = "inUnrolledContext";
TMP2026[11] = &TMP929[21];
TMP929[21].kind = 1;
TMP929[21].offset = offsetof(Tcontext278023, compilescontextid);
TMP929[21].typ = (&NTI108);
TMP929[21].name = "compilesContextId";
TMP2026[12] = &TMP929[22];
TMP929[22].kind = 1;
TMP929[22].offset = offsetof(Tcontext278023, compilescontextidgenerator);
TMP929[22].typ = (&NTI108);
TMP929[22].name = "compilesContextIdGenerator";
TMP2026[13] = &TMP929[23];
TMP929[23].kind = 1;
TMP929[23].offset = offsetof(Tcontext278023, ingenericinst);
TMP929[23].typ = (&NTI108);
TMP929[23].name = "inGenericInst";
TMP2026[14] = &TMP929[24];
TMP929[24].kind = 1;
TMP929[24].offset = offsetof(Tcontext278023, converters);
TMP929[24].typ = (&NTI223811);
TMP929[24].name = "converters";
TMP2026[15] = &TMP929[25];
TMP929[25].kind = 1;
TMP929[25].offset = offsetof(Tcontext278023, patterns);
TMP929[25].typ = (&NTI223811);
TMP929[25].name = "patterns";
TMP2026[16] = &TMP929[26];
TMP929[26].kind = 1;
TMP929[26].offset = offsetof(Tcontext278023, optionstack);
TMP929[26].typ = (&NTI139028);
TMP929[26].name = "optionStack";
TMP2026[17] = &TMP929[27];
TMP929[27].kind = 1;
TMP929[27].offset = offsetof(Tcontext278023, symmapping);
TMP929[27].typ = (&NTI223859);
TMP929[27].name = "symMapping";
TMP2026[18] = &TMP929[28];
TMP929[28].kind = 1;
TMP929[28].offset = offsetof(Tcontext278023, libs);
TMP929[28].typ = (&NTI139028);
TMP929[28].name = "libs";
TMP2026[19] = &TMP929[29];
NTI278074.size = sizeof(TY278074);
NTI278074.kind = 25;
NTI278074.base = 0;
NTI278074.flags = 3;
TMP929[29].kind = 1;
TMP929[29].offset = offsetof(Tcontext278023, semconstexpr);
TMP929[29].typ = (&NTI278074);
TMP929[29].name = "semConstExpr";
TMP2026[20] = &TMP929[30];
NTI278079.size = sizeof(TY278079);
NTI278079.kind = 25;
NTI278079.base = 0;
NTI278079.flags = 3;
TMP929[30].kind = 1;
TMP929[30].offset = offsetof(Tcontext278023, semexpr);
TMP929[30].typ = (&NTI278079);
TMP929[30].name = "semExpr";
TMP2026[21] = &TMP929[31];
NTI278087.size = sizeof(TY278087);
NTI278087.kind = 25;
NTI278087.base = 0;
NTI278087.flags = 3;
TMP929[31].kind = 1;
TMP929[31].offset = offsetof(Tcontext278023, semtryexpr);
TMP929[31].typ = (&NTI278087);
TMP929[31].name = "semTryExpr";
TMP2026[22] = &TMP929[32];
NTI278095.size = sizeof(TY278095);
NTI278095.kind = 25;
NTI278095.base = 0;
NTI278095.flags = 3;
TMP929[32].kind = 1;
TMP929[32].offset = offsetof(Tcontext278023, semtryconstexpr);
TMP929[32].typ = (&NTI278095);
TMP929[32].name = "semTryConstExpr";
TMP2026[23] = &TMP929[33];
NTI278100.size = sizeof(TY278100);
NTI278100.kind = 25;
NTI278100.base = 0;
NTI278100.flags = 3;
TMP929[33].kind = 1;
TMP929[33].offset = offsetof(Tcontext278023, semoperand);
TMP929[33].typ = (&NTI278100);
TMP929[33].name = "semOperand";
TMP2026[24] = &TMP929[34];
NTI278108.size = sizeof(TY278108);
NTI278108.kind = 25;
NTI278108.base = 0;
NTI278108.flags = 3;
TMP929[34].kind = 1;
TMP929[34].offset = offsetof(Tcontext278023, semconstboolexpr);
TMP929[34].typ = (&NTI278108);
TMP929[34].name = "semConstBoolExpr";
TMP2026[25] = &TMP929[35];
NTI278113.size = sizeof(TY278113);
NTI278113.kind = 25;
NTI278113.base = 0;
NTI278113.flags = 3;
TMP929[35].kind = 1;
TMP929[35].offset = offsetof(Tcontext278023, semoverloadedcall);
TMP929[35].typ = (&NTI278113);
TMP929[35].name = "semOverloadedCall";
TMP2026[26] = &TMP929[36];
NTI278120.size = sizeof(TY278120);
NTI278120.kind = 25;
NTI278120.base = 0;
NTI278120.flags = 3;
TMP929[36].kind = 1;
TMP929[36].offset = offsetof(Tcontext278023, semtypenode);
TMP929[36].typ = (&NTI278120);
TMP929[36].name = "semTypeNode";
TMP2026[27] = &TMP929[37];
NTI278126.size = sizeof(TY574951);
NTI278126.kind = 18;
NTI278126.base = 0;
NTI278126.flags = 2;
TMP2029[0] = &TMP929[39];
TMP929[39].kind = 1;
TMP929[39].offset = offsetof(TY574951, Field0);
TMP929[39].typ = (&NTI153);
TMP929[39].name = "Field0";
TMP2029[1] = &TMP929[40];
TMP929[40].kind = 1;
TMP929[40].offset = offsetof(TY574951, Field1);
TMP929[40].typ = (&NTI574953);
TMP929[40].name = "Field1";
TMP929[38].len = 2; TMP929[38].kind = 2; TMP929[38].sons = &TMP2029[0];
NTI278126.node = &TMP929[38];
TMP929[37].kind = 1;
TMP929[37].offset = offsetof(Tcontext278023, seminferredlambda);
TMP929[37].typ = (&NTI278126);
TMP929[37].name = "semInferredLambda";
TMP2026[28] = &TMP929[41];
NTI278132.size = sizeof(TY574951);
NTI278132.kind = 18;
NTI278132.base = 0;
NTI278132.flags = 2;
TMP2030[0] = &TMP929[43];
TMP929[43].kind = 1;
TMP929[43].offset = offsetof(TY574951, Field0);
TMP929[43].typ = (&NTI153);
TMP929[43].name = "Field0";
TMP2030[1] = &TMP929[44];
TMP929[44].kind = 1;
TMP929[44].offset = offsetof(TY574951, Field1);
TMP929[44].typ = (&NTI574953);
TMP929[44].name = "Field1";
TMP929[42].len = 2; TMP929[42].kind = 2; TMP929[42].sons = &TMP2030[0];
NTI278132.node = &TMP929[42];
TMP929[41].kind = 1;
TMP929[41].offset = offsetof(Tcontext278023, semgenerateinstance);
TMP929[41].typ = (&NTI278132);
TMP929[41].name = "semGenerateInstance";
TMP2026[29] = &TMP929[45];
TMP929[45].kind = 1;
TMP929[45].offset = offsetof(Tcontext278023, includedfiles);
TMP929[45].typ = (&NTI220056);
TMP929[45].name = "includedFiles";
TMP2026[30] = &TMP929[46];
TMP929[46].kind = 1;
TMP929[46].offset = offsetof(Tcontext278023, userpragmas);
TMP929[46].typ = (&NTI223813);
TMP929[46].name = "userPragmas";
TMP2026[31] = &TMP929[47];
TMP929[47].kind = 1;
TMP929[47].offset = offsetof(Tcontext278023, evalcontext);
TMP929[47].typ = (&NTI277046);
TMP929[47].name = "evalContext";
TMP2026[32] = &TMP929[48];
TMP929[48].kind = 1;
TMP929[48].offset = offsetof(Tcontext278023, unknownidents);
TMP929[48].typ = (&NTI220056);
TMP929[48].name = "unknownIdents";
TMP2026[33] = &TMP929[49];
NTI278013.size = sizeof(Tinstantiationpair278013);
NTI278013.kind = 18;
NTI278013.base = 0;
NTI278013.flags = 2;
TMP2052[0] = &TMP929[51];
TMP929[51].kind = 1;
TMP929[51].offset = offsetof(Tinstantiationpair278013, genericsym);
TMP929[51].typ = (&NTI223807);
TMP929[51].name = "genericSym";
TMP2052[1] = &TMP929[52];
TMP929[52].kind = 1;
TMP929[52].offset = offsetof(Tinstantiationpair278013, inst);
TMP929[52].typ = (&NTI223833);
TMP929[52].name = "inst";
TMP929[50].len = 2; TMP929[50].kind = 2; TMP929[50].sons = &TMP2052[0];
NTI278013.node = &TMP929[50];
NTI278143.size = sizeof(TY278143*);
NTI278143.kind = 24;
NTI278143.base = (&NTI278013);
NTI278143.flags = 2;
NTI278143.marker = TMP2053;
TMP929[49].kind = 1;
TMP929[49].offset = offsetof(Tcontext278023, generics);
TMP929[49].typ = (&NTI278143);
TMP929[49].name = "generics";
TMP2026[34] = &TMP929[53];
TMP929[53].kind = 1;
TMP929[53].offset = offsetof(Tcontext278023, lastgenericidx);
TMP929[53].typ = (&NTI108);
TMP929[53].name = "lastGenericIdx";
TMP2026[35] = &TMP929[54];
TMP929[54].kind = 1;
TMP929[54].offset = offsetof(Tcontext278023, hloloopdetector);
TMP929[54].typ = (&NTI108);
TMP929[54].name = "hloLoopDetector";
TMP2026[36] = &TMP929[55];
TMP929[55].kind = 1;
TMP929[55].offset = offsetof(Tcontext278023, inparallelstmt);
TMP929[55].typ = (&NTI108);
TMP929[55].name = "inParallelStmt";
TMP2026[37] = &TMP929[56];
NTI278148.size = sizeof(TY278148);
NTI278148.kind = 25;
NTI278148.base = 0;
NTI278148.flags = 3;
TMP929[56].kind = 1;
TMP929[56].offset = offsetof(Tcontext278023, insttypeboundop);
TMP929[56].typ = (&NTI278148);
TMP929[56].name = "instTypeBoundOp";
TMP929[0].len = 38; TMP929[0].kind = 2; TMP929[0].sons = &TMP2026[0];
NTI278023.node = &TMP929[0];
NTI278021.size = sizeof(Tcontext278023*);
NTI278021.kind = 22;
NTI278021.base = (&NTI278023);
NTI278021.marker = TMP2054;
NTI278005.size = sizeof(Toptionentry278005);
NTI278005.kind = 17;
NTI278005.base = (&NTI139022);
TMP2055[0] = &TMP929[58];
TMP929[58].kind = 1;
TMP929[58].offset = offsetof(Toptionentry278005, options);
TMP929[58].typ = (&NTI165017);
TMP929[58].name = "options";
TMP2055[1] = &TMP929[59];
TMP929[59].kind = 1;
TMP929[59].offset = offsetof(Toptionentry278005, defaultcc);
TMP929[59].typ = (&NTI223005);
TMP929[59].name = "defaultCC";
TMP2055[2] = &TMP929[60];
TMP929[60].kind = 1;
TMP929[60].offset = offsetof(Toptionentry278005, dynlib);
TMP929[60].typ = (&NTI223839);
TMP929[60].name = "dynlib";
TMP2055[3] = &TMP929[61];
TMP929[61].kind = 1;
TMP929[61].offset = offsetof(Toptionentry278005, notes);
TMP929[61].typ = (&NTI188348);
TMP929[61].name = "notes";
TMP2055[4] = &TMP929[62];
TMP929[62].kind = 1;
TMP929[62].offset = offsetof(Toptionentry278005, otherpragmas);
TMP929[62].typ = (&NTI223801);
TMP929[62].name = "otherPragmas";
TMP929[57].len = 5; TMP929[57].kind = 2; TMP929[57].sons = &TMP2055[0];
NTI278005.node = &TMP929[57];
NTI278007.size = sizeof(Toptionentry278005*);
NTI278007.kind = 22;
NTI278007.base = (&NTI278005);
NTI278007.marker = TMP2059;
}

