/* Generated by Nim Compiler v0.12.0 */
/*   (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 Tiitable231274 Tiitable231274;
typedef struct Tiipairseq231272 Tiipairseq231272;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tiipair231270 Tiipair231270;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym223841 Tsym223841;
typedef struct Ttabiter231119 Ttabiter231119;
typedef struct Tstrtable223813 Tstrtable223813;
typedef struct Tsymseq223811 Tsymseq223811;
typedef struct Tident196021 Tident196021;
typedef struct Tidobj196015 Tidobj196015;
typedef struct TNimObject TNimObject;
typedef struct NimStringDesc NimStringDesc;
typedef struct Ttypeseq223843 Ttypeseq223843;
typedef struct Tscope223835 Tscope223835;
typedef struct TY223944 TY223944;
typedef struct Ttype223847 Ttype223847;
typedef struct Tlineinfo188352 Tlineinfo188352;
typedef struct Tnode223809 Tnode223809;
typedef struct Tloc223823 Tloc223823;
typedef struct Ropeobj174009 Ropeobj174009;
typedef struct Tlib223827 Tlib223827;
typedef struct Tidtable223859 Tidtable223859;
typedef struct Tidpairseq223857 Tidpairseq223857;
typedef struct Tidpair223855 Tidpair223855;
typedef struct Cell48947 Cell48947;
typedef struct Cellset48959 Cellset48959;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct Memregion30891 Memregion30891;
typedef struct Smallchunk30843 Smallchunk30843;
typedef struct Llchunk30885 Llchunk30885;
typedef struct Bigchunk30845 Bigchunk30845;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30889 Avlnode30889;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Tnodeseq223803 Tnodeseq223803;
typedef struct Tidentiter231141 Tidentiter231141;
typedef struct Intset220056 Intset220056;
typedef struct Tidnodetable223865 Tidnodetable223865;
typedef struct Tidnodepairseq223863 Tidnodepairseq223863;
typedef struct Tidnodepair223861 Tidnodepair223861;
typedef struct Tinstantiation223831 Tinstantiation223831;
typedef struct Tlistentry139022 Tlistentry139022;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Trunk220052 Trunk220052;
typedef struct Trunkseq220054 Trunkseq220054;
typedef struct TY223932 TY223932;
struct  Tiitable231274  {
NI counter;
Tiipairseq231272* data;
};
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  Tiipair231270  {
NI key;
NI val;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  Tstrtable223813  {
NI counter;
Tsymseq223811* data;
};
struct  Ttabiter231119  {
NI h;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tidobj196015  {
  TNimObject Sup;
NI id;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tident196021  {
  Tidobj196015 Sup;
NimStringDesc* s;
Tident196021* next;
NI h;
};
struct  Tlineinfo188352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc223823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype223847* t;
Ropeobj174009* r;
Ropeobj174009* heaproot;
};
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  Tidtable223859  {
NI counter;
Tidpairseq223857* data;
};
struct  Tidpair223855  {
Tidobj196015* key;
TNimObject* val;
};
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 Smallchunk30843* TY30906[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30891  {
NI minlargeobj;
NI maxlargeobj;
TY30906 freesmallchunks;
Llchunk30885* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30845* freechunkslist;
Intset30817 chunkstarts;
Avlnode30889* root;
Avlnode30889* deleted;
Avlnode30889* last;
Avlnode30889* 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;
Memregion30891 region;
Gcstat51014 stat;
};
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;
};
struct  Tidentiter231141  {
NI h;
Tident196021* name;
};
struct  Tidnodetable223865  {
NI counter;
Tidnodepairseq223863* data;
};
struct  Tidnodepair223861  {
Tidobj196015* key;
Tnode223809* val;
};
struct  Tscope223835  {
NI depthlevel;
Tstrtable223813 symbols;
Tnodeseq223803* usingsyms;
Tscope223835* parent;
};
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  Ropeobj174009  {
  TNimObject Sup;
Ropeobj174009* left;
Ropeobj174009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry139022  {
  TNimObject Sup;
Tlistentry139022* prev;
Tlistentry139022* next;
};
struct  Tlib223827  {
  Tlistentry139022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj174009* name;
Tnode223809* path;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30822[8];
struct  Pagedesc48955  {
Pagedesc48955* next;
NI key;
TY30822 bits;
};
struct  Basechunk30841  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30843  {
  Basechunk30841 Sup;
Smallchunk30843* next;
Smallchunk30843* prev;
Freecell30833* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30885  {
NI size;
NI acc;
Llchunk30885* next;
};
struct  Bigchunk30845  {
  Basechunk30841 Sup;
Bigchunk30845* next;
Bigchunk30845* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30822 bits;
};
typedef Avlnode30889* TY30896[2];
struct  Avlnode30889  {
TY30896 link;
NI key;
NI upperbound;
NI level;
};
struct  Intset220056  {
NI counter;
NI max;
Trunk220052* head;
Trunkseq220054* data;
};
struct  Tinstantiation223831  {
Tsym223841* sym;
Ttypeseq223843* concretetypes;
TY223932* usedby;
NI compilesid;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Trunk220052  {
Trunk220052* next;
NI key;
TY30822 bits;
};
struct Tiipairseq231272 {
  TGenericSeq Sup;
  Tiipair231270 data[SEQ_DECL_SIZE];
};
struct Tidpairseq223857 {
  TGenericSeq Sup;
  Tidpair223855 data[SEQ_DECL_SIZE];
};
struct Tsymseq223811 {
  TGenericSeq Sup;
  Tsym223841* data[SEQ_DECL_SIZE];
};
struct Tidnodepairseq223863 {
  TGenericSeq Sup;
  Tidnodepair223861 data[SEQ_DECL_SIZE];
};
struct Ttypeseq223843 {
  TGenericSeq Sup;
  Ttype223847* data[SEQ_DECL_SIZE];
};
struct TY223944 {
  TGenericSeq Sup;
  Tinstantiation223831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq223803 {
  TGenericSeq Sup;
  Tnode223809* data[SEQ_DECL_SIZE];
};
struct Trunkseq220054 {
  TGenericSeq Sup;
  Trunk220052* data[SEQ_DECL_SIZE];
};
struct TY223932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, TMP904)(void* p, NI op);
N_NIMCALL(Tsym223841*, nextiter_231132)(Ttabiter231119* ti, Tstrtable223813 tab);
static N_INLINE(NI, nexttry_231256)(NI h, NI maxhash);
N_NIMCALL(NI, iitablerawget_238017)(Tiitable231274 t, NI key);
N_NIMCALL(NI, idtablerawget_236306)(Tidtable223859 t, NI key);
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(Cell48947*, usrtocell_52646)(void* usr);
static N_INLINE(void, decref_54604)(Cell48947* c);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
N_NIMCALL(NIM_BOOL, mustrehash_231249)(NI length, NI counter);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, idtablerawinsert_236439)(Tidpairseq223857** data, Tidobj196015* key, TNimObject* val);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, strtableenlarge_235428)(Tstrtable223813* t);
N_NIMCALL(void, strtablerawinsert_234573)(Tsymseq223811** data, Tsym223841* n);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, iitablerawinsert_238049)(Tiipairseq231272** data, NI key, NI val);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, reallysameident_235540)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NI, sonslen_226387)(Tnode223809* n);
N_NIMCALL(void, internalerror_194172)(Tlineinfo188352 info, NimStringDesc* errmsg);
static N_INLINE(NI, cmpStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(Tsym223841*, lookupinrecord_231236)(Tnode223809* n, Tident196021* field);
N_NIMCALL(Tnode223809*, lastson_226406)(Tnode223809* n);
N_NIMCALL(NIM_BOOL, levalue_231374)(Tnode223809* a, Tnode223809* b);
N_NIMCALL(Tsym223841*, nextidentiter_231156)(Tidentiter231141* ti, Tstrtable223813 tab);
N_NIMCALL(Tsym223841*, nextidentexcluding_236104)(Tidentiter231141* ti, Tstrtable223813 tab, Intset220056* excluding);
N_NIMCALL(NIM_BOOL, contains_220829)(Intset220056* s, NI key);
N_NIMCALL(NI, idnodetablerawget_237296)(Tidnodetable223865 t, Tidobj196015* key);
N_NIMCALL(void, idnodetablerawinsert_237360)(Tidnodepairseq223863** data, Tidobj196015* key, Tnode223809* val);
N_NIMCALL(void, symtabreplaceraw_235032)(Tsymseq223811** data, Tsym223841* prevsym, Tsym223841* newsym);
STRING_LITERAL(TMP2786, "getSymFromList", 14);
STRING_LITERAL(TMP3084, "lookupInRecord", 14);
STRING_LITERAL(TMP3085, "lookupInRecord(record case branch)", 34);
STRING_LITERAL(TMP3086, "lookupInRecord()", 16);
TNimType NTI231274; /* TIITable */
extern TNimType NTI108; /* int */
TNimType NTI231270; /* TIIPair */
TNimType NTI231272; /* TIIPairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI223857; /* TIdPairSeq */
extern TNimType NTI223811; /* TSymSeq */
extern TNimType NTI223863; /* TIdNodePairSeq */
N_NIMCALL(void, TMP904)(void* p, NI op) {
	Tiipairseq231272* a;
	NI LOC1;
	a = (Tiipairseq231272*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(Tsym223841*, nextiter_231132)(Ttabiter231119* ti, Tstrtable223813 tab) {
	Tsym223841* result;
	result = 0;
	result = NIM_NIL;
	{
		while (1) {
			if (!((*ti).h <= (tab.data ? (tab.data->Sup.len-1) : -1))) goto LA2;
			result = tab.data->data[(*ti).h];
			(*ti).h += ((NI) 1);
			{
				if (!!((result == NIM_NIL))) goto LA5;
				goto LA1;
			}
			LA5: ;
		} LA2: ;
	} LA1: ;
	return result;
}

N_NIMCALL(Tsym223841*, inittabiter_231124)(Ttabiter231119* ti, Tstrtable223813 tab) {
	Tsym223841* result;
	result = 0;
	(*ti).h = ((NI) 0);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextiter_231132(ti, tab);
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, nexttry_231256)(NI h, NI maxhash) {
	NI result;
	result = 0;
	result = (NI)((NI)((NI)(((NI) 5) * h) + ((NI) 1)) & maxhash);
	return result;
}

N_NIMCALL(Tsym223841*, strtableget_231111)(Tstrtable223813 t, Tident196021* name) {
	Tsym223841* result;
	NI h;
	result = 0;
	h = (NI)((*name).h & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			result = t.data->data[h];
			{
				if (!(result == NIM_NIL)) goto LA5;
				goto LA1;
			}
			LA5: ;
			{
				if (!((*(*result).name).Sup.id == (*name).Sup.id)) goto LA9;
				goto LA1;
			}
			LA9: ;
			h = nexttry_231256(h, (t.data ? (t.data->Sup.len-1) : -1));
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NI, iitablerawget_238017)(Tiitable231274 t, NI key) {
	NI result;
	NI h;
{	result = 0;
	h = 0;
	h = (NI)(key & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			if (!!((t.data->data[h].key == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA2;
			{
				if (!(t.data->data[h].key == key)) goto LA5;
				result = h;
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_231256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, iitableget_231289)(Tiitable231274 t, NI key) {
	NI result;
	NI index;
	result = 0;
	index = iitablerawget_238017(t, key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		result = t.data->data[index].val;
	}
	goto LA1;
	LA3: ;
	{
		result = ((NI) (IL64(-9223372036854775807) - IL64(1)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI, idtablerawget_236306)(Tidtable223859 t, NI key) {
	NI result;
	NI h;
{	result = 0;
	h = 0;
	h = (NI)(key & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			if (!!((t.data->data[h].key == NIM_NIL))) goto LA2;
			{
				if (!((*t.data->data[h].key).id == key)) goto LA5;
				result = h;
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_231256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(TNimObject*, idtableget_231189)(Tidtable223859 t, NI key) {
	TNimObject* result;
	NI index;
	result = 0;
	index = idtablerawget_236306(t, key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		result = t.data->data[index].val;
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_NIL;
	}
	LA1: ;
	return result;
}

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)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_52667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_53423(c);
	}
	LA4: ;
}

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

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

static N_INLINE(void, decref_54604)(Cell48947* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((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(NIM_BOOL, mustrehash_231249)(NI length, NI counter) {
	NIM_BOOL result;
	NIM_BOOL LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = ((NI)(length * ((NI) 2)) < (NI)(counter * ((NI) 3)));
	if (LOC1) goto LA2;
	LOC1 = ((NI)(length - counter) < ((NI) 4));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, idtablerawinsert_236439)(Tidpairseq223857** data, Tidobj196015* key, TNimObject* val) {
	NI h;
	h = 0;
	h = (NI)((*key).id & ((*data) ? ((*data)->Sup.len-1) : -1));
	{
		while (1) {
			if (!!(((*data)->data[h].key == NIM_NIL))) goto LA2;
			h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	asgnRef((void**) (&(*data)->data[h].key), key);
	asgnRef((void**) (&(*data)->data[h].val), val);
}

N_NIMCALL(void, idtableput_231196)(Tidtable223859* t, Tidobj196015* key, TNimObject* val) {
	NI index;
	Tidpairseq223857* n;
	index = 0;
	n = 0;
	index = idtablerawget_236306((*t), (*key).id);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRef((void**) (&(*t).data->data[index].val), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tidpairseq223857* LOC18;
			LOC8 = 0;
			LOC8 = mustrehash_231249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = (Tidpairseq223857*) newSeq((&NTI223857), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_237039;
				NI HEX3Atmp_237224;
				NI res_237227;
				i_237039 = 0;
				HEX3Atmp_237224 = 0;
				HEX3Atmp_237224 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_237227 = ((NI) 0);
				{
					while (1) {
						if (!(res_237227 <= HEX3Atmp_237224)) goto LA13;
						i_237039 = res_237227;
						{
							if (!!(((*t).data->data[i_237039].key == NIM_NIL))) goto LA16;
							idtablerawinsert_236439((&n), (*t).data->data[i_237039].key, (*t).data->data[i_237039].val);
						}
						LA16: ;
						res_237227 += ((NI) 1);
					} LA13: ;
				}
			}
			LOC18 = 0;
			LOC18 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC18;
		}
		LA9: ;
		idtablerawinsert_236439((&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

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 (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_54204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(void, strtablerawinsert_234573)(Tsymseq223811** data, Tsym223841* n) {
	NI h;
{	h = (NI)((*(*n).name).h & ((*data) ? ((*data)->Sup.len-1) : -1));
	{
		if (!!((((*n).flags &(1<<((((NU8) 25))&31)))!=0))) goto LA3;
		{
			while (1) {
				if (!!(((*data)->data[h] == NIM_NIL))) goto LA6;
				{
					if (!((*data)->data[h] == n)) goto LA9;
					goto BeforeRet;
				}
				LA9: ;
				h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
			} LA6: ;
		}
		asgnRefNoCycle((void**) (&(*data)->data[h]), n);
	}
	goto LA1;
	LA3: ;
	{
		NI favpos;
		favpos = ((NI) -1);
		{
			while (1) {
				if (!!(((*data)->data[h] == NIM_NIL))) goto LA13;
				{
					if (!((*data)->data[h] == n)) goto LA16;
					goto BeforeRet;
				}
				LA16: ;
				{
					NIM_BOOL LOC20;
					LOC20 = 0;
					LOC20 = (favpos < ((NI) 0));
					if (!(LOC20)) goto LA21;
					LOC20 = ((*(*(*data)->data[h]).name).Sup.id == (*(*n).name).Sup.id);
					LA21: ;
					if (!LOC20) goto LA22;
					favpos = h;
				}
				LA22: ;
				h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
			} LA13: ;
		}
		asgnRefNoCycle((void**) (&(*data)->data[h]), n);
		{
			Tsym223841* LOC28;
			if (!(((NI) 0) <= favpos)) goto LA26;
			LOC28 = 0;
			LOC28 = (*data)->data[h];
			asgnRefNoCycle((void**) (&(*data)->data[h]), (*data)->data[favpos]);
			asgnRefNoCycle((void**) (&(*data)->data[favpos]), LOC28);
		}
		LA26: ;
	}
	LA1: ;
	}BeforeRet: ;
}

N_NIMCALL(void, strtableenlarge_235428)(Tstrtable223813* t) {
	Tsymseq223811* n;
	Tsymseq223811* LOC8;
	n = 0;
	n = (Tsymseq223811*) newSeq((&NTI223811), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	{
		NI i_235463;
		NI HEX3Atmp_235489;
		NI res_235492;
		i_235463 = 0;
		HEX3Atmp_235489 = 0;
		HEX3Atmp_235489 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
		res_235492 = ((NI) 0);
		{
			while (1) {
				if (!(res_235492 <= HEX3Atmp_235489)) goto LA3;
				i_235463 = res_235492;
				{
					if (!!(((*t).data->data[i_235463] == NIM_NIL))) goto LA6;
					strtablerawinsert_234573((&n), (*t).data->data[i_235463]);
				}
				LA6: ;
				res_235492 += ((NI) 1);
			} LA3: ;
		}
	}
	LOC8 = 0;
	LOC8 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC8;
}

N_NIMCALL(void, strtableadd_231103)(Tstrtable223813* t, Tsym223841* n) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = mustrehash_231249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
		if (!LOC3) goto LA4;
		strtableenlarge_235428(t);
	}
	LA4: ;
	strtablerawinsert_234573((&(*t).data), n);
	(*t).counter += ((NI) 1);
}

N_NIMCALL(void, initiitable_231282)(Tiitable231274* x) {
	(*x).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*x).data), (Tiipairseq231272*) newSeq((&NTI231272), ((NI) 8)));
	{
		NI i_237994;
		NI res_237998;
		i_237994 = 0;
		res_237998 = ((NI) 0);
		{
			while (1) {
				if (!(res_237998 <= ((NI) 7))) goto LA3;
				i_237994 = res_237998;
				(*x).data->data[i_237994].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
				res_237998 += ((NI) 1);
			} LA3: ;
		}
	}
}

N_NIMCALL(void, iitablerawinsert_238049)(Tiipairseq231272** data, NI key, NI val) {
	NI h;
	h = 0;
	h = (NI)(key & ((*data) ? ((*data)->Sup.len-1) : -1));
	{
		while (1) {
			if (!!(((*data)->data[h].key == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA2;
			h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	(*data)->data[h].key = key;
	(*data)->data[h].val = val;
}

N_NIMCALL(void, iitableput_231296)(Tiitable231274* t, NI key, NI val) {
	NI index;
	index = iitablerawget_238017((*t), key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		(*t).data->data[index].val = val;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tiipairseq231272* n;
			Tiipairseq231272* LOC21;
			LOC8 = 0;
			LOC8 = mustrehash_231249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = 0;
			n = (Tiipairseq231272*) newSeq((&NTI231272), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_238640;
				NI HEX3Atmp_238677;
				NI res_238680;
				i_238640 = 0;
				HEX3Atmp_238677 = 0;
				HEX3Atmp_238677 = (n ? (n->Sup.len-1) : -1);
				res_238680 = ((NI) 0);
				{
					while (1) {
						if (!(res_238680 <= HEX3Atmp_238677)) goto LA13;
						i_238640 = res_238680;
						n->data[i_238640].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
						res_238680 += ((NI) 1);
					} LA13: ;
				}
			}
			{
				NI i_238653;
				NI HEX3Atmp_238685;
				NI res_238688;
				i_238653 = 0;
				HEX3Atmp_238685 = 0;
				HEX3Atmp_238685 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_238688 = ((NI) 0);
				{
					while (1) {
						if (!(res_238688 <= HEX3Atmp_238685)) goto LA16;
						i_238653 = res_238688;
						{
							if (!!(((*t).data->data[i_238653].key == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA19;
							iitablerawinsert_238049((&n), (*t).data->data[i_238653].key, (*t).data->data[i_238653].val);
						}
						LA19: ;
						res_238688 += ((NI) 1);
					} LA16: ;
				}
			}
			LOC21 = 0;
			LOC21 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC21;
		}
		LA9: ;
		iitablerawinsert_238049((&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(Tsym223841*, getmodule_231243)(Tsym223841* s) {
	Tsym223841* result;
	result = 0;
	result = s;
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = !((result == NIM_NIL));
			if (!(LOC3)) goto LA4;
			LOC3 = !(((*result).kind == ((NU8) 6)));
			LA4: ;
			if (!LOC3) goto LA2;
			result = (*result).owner;
		} LA2: ;
	}
	return result;
}

N_NIMCALL(TNimObject*, idtableget_231182)(Tidtable223859 t, Tidobj196015* key) {
	TNimObject* result;
	NI index;
	result = 0;
	index = idtablerawget_236306(t, (*key).id);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		result = t.data->data[index].val;
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_NIL;
	}
	LA1: ;
	return result;
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
{	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (*a).Sup.len);
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, samevalue_231324)(Tnode223809* a, Tnode223809* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	switch ((*a).kind) {
	case ((NU8) 5) ... ((NU8) 15):
	{
		{
			if (!((*b).kind >= ((NU8) 5) && (*b).kind <= ((NU8) 15))) goto LA4;
			result = ((*a).kindU.S1.intval == (*b).kindU.S1.intval);
		}
		LA4: ;
	}
	break;
	case ((NU8) 16) ... ((NU8) 18):
	{
		{
			if (!((*b).kind >= ((NU8) 16) && (*b).kind <= ((NU8) 18))) goto LA9;
			result = ((*a).kindU.S2.floatval == (*b).kindU.S2.floatval);
		}
		LA9: ;
	}
	break;
	case ((NU8) 20) ... ((NU8) 22):
	{
		{
			if (!((*b).kind >= ((NU8) 20) && (*b).kind <= ((NU8) 22))) goto LA14;
			result = eqStrings((*a).kindU.S3.strval, (*b).kindU.S3.strval);
		}
		LA14: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

static N_INLINE(NIM_BOOL, reallysameident_235540)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(NIM_BOOL, strtableincl_235607)(Tstrtable223813* t, Tsym223841* n) {
	NIM_BOOL result;
	NI h;
	NI replaceslot;
{	result = 0;
	h = (NI)((*(*n).name).h & ((*t).data ? ((*t).data->Sup.len-1) : -1));
	replaceslot = ((NI) -1);
	{
		while (1) {
			Tsym223841* it;
			it = (*t).data->data[h];
			{
				if (!(it == NIM_NIL)) goto LA5;
				goto LA1;
			}
			LA5: ;
			{
				NIM_BOOL LOC9;
				LOC9 = 0;
				LOC9 = ((*(*it).name).Sup.id == (*(*n).name).Sup.id);
				if (!(LOC9)) goto LA10;
				LOC9 = reallysameident_235540((*(*it).name).s, (*(*n).name).s);
				LA10: ;
				if (!LOC9) goto LA11;
				{
					if (!(it == n)) goto LA15;
					result = NIM_FALSE;
					goto BeforeRet;
				}
				LA15: ;
				replaceslot = h;
			}
			LA11: ;
			h = nexttry_231256(h, ((*t).data ? ((*t).data->Sup.len-1) : -1));
		}
	} LA1: ;
	{
		if (!(((NI) 0) <= replaceslot)) goto LA19;
		asgnRefNoCycle((void**) (&(*t).data->data[replaceslot]), n);
		result = NIM_TRUE;
		goto BeforeRet;
	}
	goto LA17;
	LA19: ;
	{
		NIM_BOOL LOC22;
		LOC22 = 0;
		LOC22 = mustrehash_231249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
		if (!LOC22) goto LA23;
		strtableenlarge_235428(t);
		strtablerawinsert_234573((&(*t).data), n);
	}
	goto LA17;
	LA23: ;
	{
		asgnRefNoCycle((void**) (&(*t).data->data[h]), n);
	}
	LA17: ;
	(*t).counter += ((NI) 1);
	result = NIM_FALSE;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym223841*, getsymfromlist_231228)(Tnode223809* list, Tident196021* ident, NI start) {
	Tsym223841* result;
{	result = 0;
	{
		NI i_231854;
		NI HEX3Atmp_231869;
		NI LOC2;
		NI res_231872;
		i_231854 = 0;
		HEX3Atmp_231869 = 0;
		LOC2 = 0;
		LOC2 = sonslen_226387(list);
		HEX3Atmp_231869 = (NI)(LOC2 - ((NI) 1));
		res_231872 = start;
		{
			while (1) {
				if (!(res_231872 <= HEX3Atmp_231869)) goto LA4;
				i_231854 = res_231872;
				{
					if (!((*(*list).kindU.S6.sons->data[i_231854]).kind == ((NU8) 3))) goto LA7;
					result = (*(*list).kindU.S6.sons->data[i_231854]).kindU.S4.sym;
					{
						if (!((*(*result).name).Sup.id == (*ident).Sup.id)) goto LA11;
						goto BeforeRet;
					}
					LA11: ;
				}
				goto LA5;
				LA7: ;
				{
					internalerror_194172((*list).info, ((NimStringDesc*) &TMP2786));
				}
				LA5: ;
				res_231872 += ((NI) 1);
			} LA4: ;
		}
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, cmpStrings)(NimStringDesc* a, NimStringDesc* b) {
	NI result;
	int LOC13;
{	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = ((NI) 0);
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(a == NIM_NIL)) goto LA7;
		result = ((NI) -1);
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!(b == NIM_NIL)) goto LA11;
		result = ((NI) 1);
		goto BeforeRet;
	}
	LA11: ;
	LOC13 = 0;
	LOC13 = strcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)));
	result = ((NI) (LOC13));
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, levalue_231374)(Tnode223809* a, Tnode223809* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	switch ((*a).kind) {
	case ((NU8) 5) ... ((NU8) 14):
	{
		{
			if (!((*b).kind >= ((NU8) 5) && (*b).kind <= ((NU8) 14))) goto LA4;
			result = ((*a).kindU.S1.intval <= (*b).kindU.S1.intval);
		}
		LA4: ;
	}
	break;
	case ((NU8) 16) ... ((NU8) 18):
	{
		{
			if (!((*b).kind >= ((NU8) 16) && (*b).kind <= ((NU8) 18))) goto LA9;
			result = ((*a).kindU.S2.floatval <= (*b).kindU.S2.floatval);
		}
		LA9: ;
	}
	break;
	case ((NU8) 20) ... ((NU8) 22):
	{
		{
			if (!((*b).kind >= ((NU8) 20) && (*b).kind <= ((NU8) 22))) goto LA14;
			result = (cmpStrings((*a).kindU.S3.strval, (*b).kindU.S3.strval) <= 0);
		}
		LA14: ;
	}
	break;
	default:
	{
	}
	break;
	}
	return result;
}

N_NIMCALL(Tsym223841*, lookupinrecord_231236)(Tnode223809* n, Tident196021* field) {
	Tsym223841* result;
{	result = 0;
	result = NIM_NIL;
	switch ((*n).kind) {
	case ((NU8) 138):
	{
		{
			NI i_231472;
			NI HEX3Atmp_231540;
			NI LOC3;
			NI res_231543;
			i_231472 = 0;
			HEX3Atmp_231540 = 0;
			LOC3 = 0;
			LOC3 = sonslen_226387(n);
			HEX3Atmp_231540 = (NI)(LOC3 - ((NI) 1));
			res_231543 = ((NI) 0);
			{
				while (1) {
					if (!(res_231543 <= HEX3Atmp_231540)) goto LA5;
					i_231472 = res_231543;
					result = lookupinrecord_231236((*n).kindU.S6.sons->data[i_231472], field);
					{
						if (!!((result == NIM_NIL))) goto LA8;
						goto BeforeRet;
					}
					LA8: ;
					res_231543 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 139):
	{
		{
			if (!!(((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 3)))) goto LA13;
			internalerror_194172((*n).info, ((NimStringDesc*) &TMP3084));
		}
		LA13: ;
		result = lookupinrecord_231236((*n).kindU.S6.sons->data[((NI) 0)], field);
		{
			if (!!((result == NIM_NIL))) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
		{
			NI i_231521;
			NI HEX3Atmp_231548;
			NI LOC20;
			NI res_231551;
			i_231521 = 0;
			HEX3Atmp_231548 = 0;
			LOC20 = 0;
			LOC20 = sonslen_226387(n);
			HEX3Atmp_231548 = (NI)(LOC20 - ((NI) 1));
			res_231551 = ((NI) 1);
			{
				while (1) {
					if (!(res_231551 <= HEX3Atmp_231548)) goto LA22;
					i_231521 = res_231551;
					switch ((*(*n).kindU.S6.sons->data[i_231521]).kind) {
					case ((NU8) 85):
					case ((NU8) 88):
					{
						Tnode223809* LOC24;
						LOC24 = 0;
						LOC24 = lastson_226406((*n).kindU.S6.sons->data[i_231521]);
						result = lookupinrecord_231236(LOC24, field);
						{
							if (!!((result == NIM_NIL))) goto LA27;
							goto BeforeRet;
						}
						LA27: ;
					}
					break;
					default:
					{
						internalerror_194172((*n).info, ((NimStringDesc*) &TMP3085));
					}
					break;
					}
					res_231551 += ((NI) 1);
				} LA22: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		{
			if (!((*(*(*n).kindU.S4.sym).name).Sup.id == (*field).Sup.id)) goto LA33;
			result = (*n).kindU.S4.sym;
		}
		LA33: ;
	}
	break;
	default:
	{
		internalerror_194172((*n).info, ((NimStringDesc*) &TMP3086));
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, weaklevalue_231424)(Tnode223809* a, Tnode223809* b) {
	NU8 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(((*a).kind >= ((NU8) 5) && (*a).kind <= ((NU8) 22)));
		if (LOC3) goto LA4;
		LOC3 = !(((*b).kind >= ((NU8) 5) && (*b).kind <= ((NU8) 22)));
		LA4: ;
		if (!LOC3) goto LA5;
		result = ((NU8) 0);
	}
	goto LA1;
	LA5: ;
	{
		{
			NIM_BOOL LOC10;
			LOC10 = 0;
			LOC10 = levalue_231374(a, b);
			if (!LOC10) goto LA11;
			result = ((NU8) 2);
		}
		goto LA8;
		LA11: ;
		{
			result = ((NU8) 1);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym223841*, nextidentiter_231156)(Tidentiter231141* ti, Tstrtable223813 tab) {
	Tsym223841* result;
	NI h;
	NI start;
	result = 0;
	h = (NI)((*ti).h & (tab.data ? (tab.data->Sup.len-1) : -1));
	start = h;
	result = tab.data->data[h];
	{
		while (1) {
			if (!!((result == NIM_NIL))) goto LA2;
			{
				if (!((*(*result).name).Sup.id == (*(*ti).name).Sup.id)) goto LA5;
				goto LA1;
			}
			LA5: ;
			h = nexttry_231256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
			{
				if (!(h == start)) goto LA9;
				result = NIM_NIL;
				goto LA1;
			}
			LA9: ;
			result = tab.data->data[h];
		} LA2: ;
	} LA1: ;
	(*ti).h = nexttry_231256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
	return result;
}

N_NIMCALL(Tsym223841*, initidentiter_231147)(Tidentiter231141* ti, Tstrtable223813 tab, Tident196021* s) {
	Tsym223841* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentiter_231156(ti, tab);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym223841*, nextidentexcluding_236104)(Tidentiter231141* ti, Tstrtable223813 tab, Intset220056* excluding) {
	Tsym223841* result;
	NI h;
	NI start;
	result = 0;
	h = (NI)((*ti).h & (tab.data ? (tab.data->Sup.len-1) : -1));
	start = h;
	result = tab.data->data[h];
	{
		while (1) {
			if (!!((result == NIM_NIL))) goto LA2;
			{
				NIM_BOOL LOC5;
				NIM_BOOL LOC7;
				LOC5 = 0;
				LOC5 = ((*(*result).name).Sup.id == (*(*ti).name).Sup.id);
				if (!(LOC5)) goto LA6;
				LOC7 = 0;
				LOC7 = contains_220829(excluding, (*result).Sup.id);
				LOC5 = !(LOC7);
				LA6: ;
				if (!LOC5) goto LA8;
				goto LA1;
			}
			LA8: ;
			h = nexttry_231256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
			{
				if (!(h == start)) goto LA12;
				result = NIM_NIL;
				goto LA1;
			}
			LA12: ;
			result = tab.data->data[h];
		} LA2: ;
	} LA1: ;
	(*ti).h = nexttry_231256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
	{
		NIM_BOOL LOC16;
		LOC16 = 0;
		LOC16 = !((result == NIM_NIL));
		if (!(LOC16)) goto LA17;
		LOC16 = contains_220829(excluding, (*result).Sup.id);
		LA17: ;
		if (!LOC16) goto LA18;
		result = NIM_NIL;
	}
	LA18: ;
	return result;
}

N_NIMCALL(Tsym223841*, firstidentexcluding_236154)(Tidentiter231141* ti, Tstrtable223813 tab, Tident196021* s, Intset220056* excluding) {
	Tsym223841* result;
	result = 0;
	(*ti).h = (*s).h;
	unsureAsgnRef((void**) (&(*ti).name), s);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextidentexcluding_236104(ti, tab, excluding);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI, idnodetablerawget_237296)(Tidnodetable223865 t, Tidobj196015* key) {
	NI result;
	NI h;
{	result = 0;
	h = 0;
	h = (NI)((*key).id & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			if (!!((t.data->data[h].key == NIM_NIL))) goto LA2;
			{
				if (!((*t.data->data[h].key).id == (*key).id)) goto LA5;
				result = h;
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_231256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode223809*, idnodetableget_231212)(Tidnodetable223865 t, Tidobj196015* key) {
	Tnode223809* result;
	NI index;
	result = 0;
	index = 0;
	index = idnodetablerawget_237296(t, key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		result = t.data->data[index].val;
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_NIL;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, idnodetablerawinsert_237360)(Tidnodepairseq223863** data, Tidobj196015* key, Tnode223809* val) {
	NI h;
	h = 0;
	h = (NI)((*key).id & ((*data) ? ((*data)->Sup.len-1) : -1));
	{
		while (1) {
			if (!!(((*data)->data[h].key == NIM_NIL))) goto LA2;
			h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	asgnRef((void**) (&(*data)->data[h].key), key);
	asgnRefNoCycle((void**) (&(*data)->data[h].val), val);
}

N_NIMCALL(void, idnodetableput_231219)(Tidnodetable223865* t, Tidobj196015* key, Tnode223809* val) {
	NI index;
	index = idnodetablerawget_237296((*t), key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRefNoCycle((void**) (&(*t).data->data[index].val), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tidnodepairseq223863* n;
			Tidnodepairseq223863* LOC18;
			LOC8 = 0;
			LOC8 = mustrehash_231249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = 0;
			n = (Tidnodepairseq223863*) newSeq((&NTI223863), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_237840;
				NI HEX3Atmp_237876;
				NI res_237879;
				i_237840 = 0;
				HEX3Atmp_237876 = 0;
				HEX3Atmp_237876 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_237879 = ((NI) 0);
				{
					while (1) {
						if (!(res_237879 <= HEX3Atmp_237876)) goto LA13;
						i_237840 = res_237879;
						{
							if (!!(((*t).data->data[i_237840].key == NIM_NIL))) goto LA16;
							idnodetablerawinsert_237360((&n), (*t).data->data[i_237840].key, (*t).data->data[i_237840].val);
						}
						LA16: ;
						res_237879 += ((NI) 1);
					} LA13: ;
				}
			}
			LOC18 = 0;
			LOC18 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC18;
		}
		LA9: ;
		idnodetablerawinsert_237360((&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(Tnode223809*, skipconvandclosure_231305)(Tnode223809* n) {
	Tnode223809* result;
	result = 0;
	result = n;
	{
		while (1) {
			switch ((*result).kind) {
			case ((NU8) 67):
			case ((NU8) 66):
			case ((NU8) 70):
			case ((NU8) 68):
			case ((NU8) 69):
			case ((NU8) 155):
			{
				result = (*result).kindU.S6.sons->data[((NI) 0)];
			}
			break;
			case ((NU8) 58):
			case ((NU8) 59):
			case ((NU8) 60):
			{
				result = (*result).kindU.S6.sons->data[((NI) 1)];
			}
			break;
			default:
			{
				goto LA1;
			}
			break;
			}
		}
	} LA1: ;
	return result;
}

N_NIMCALL(void, symtabreplaceraw_235032)(Tsymseq223811** data, Tsym223841* prevsym, Tsym223841* newsym) {
	NI h;
{	h = (NI)((*(*prevsym).name).h & ((*data) ? ((*data)->Sup.len-1) : -1));
	{
		while (1) {
			if (!!(((*data)->data[h] == NIM_NIL))) goto LA2;
			{
				if (!((*data)->data[h] == prevsym)) goto LA5;
				asgnRefNoCycle((void**) (&(*data)->data[h]), newsym);
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_231256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	}BeforeRet: ;
}

N_NIMCALL(void, symtabreplace_235415)(Tstrtable223813* t, Tsym223841* prevsym, Tsym223841* newsym) {
	symtabreplaceraw_235032((&(*t).data), prevsym, newsym);
}

N_NIMCALL(NIM_BOOL, idtablehasobjectaskey_231205)(Tidtable223859 t, Tidobj196015* key) {
	NIM_BOOL result;
	NI index;
	result = 0;
	index = idtablerawget_236306(t, (*key).id);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		result = (t.data->data[index].key == key);
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, compiler_astalgoInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, compiler_astalgoDatInit000)(void) {
static TNimNode* TMP902[2];
static TNimNode* TMP903[2];
static TNimNode TMP872[6];
NTI231274.size = sizeof(Tiitable231274);
NTI231274.kind = 18;
NTI231274.base = 0;
NTI231274.flags = 2;
TMP902[0] = &TMP872[1];
TMP872[1].kind = 1;
TMP872[1].offset = offsetof(Tiitable231274, counter);
TMP872[1].typ = (&NTI108);
TMP872[1].name = "counter";
TMP902[1] = &TMP872[2];
NTI231270.size = sizeof(Tiipair231270);
NTI231270.kind = 18;
NTI231270.base = 0;
NTI231270.flags = 3;
TMP903[0] = &TMP872[4];
TMP872[4].kind = 1;
TMP872[4].offset = offsetof(Tiipair231270, key);
TMP872[4].typ = (&NTI108);
TMP872[4].name = "key";
TMP903[1] = &TMP872[5];
TMP872[5].kind = 1;
TMP872[5].offset = offsetof(Tiipair231270, val);
TMP872[5].typ = (&NTI108);
TMP872[5].name = "val";
TMP872[3].len = 2; TMP872[3].kind = 2; TMP872[3].sons = &TMP903[0];
NTI231270.node = &TMP872[3];
NTI231272.size = sizeof(Tiipairseq231272*);
NTI231272.kind = 24;
NTI231272.base = (&NTI231270);
NTI231272.flags = 2;
NTI231272.marker = TMP904;
TMP872[2].kind = 1;
TMP872[2].offset = offsetof(Tiitable231274, data);
TMP872[2].typ = (&NTI231272);
TMP872[2].name = "data";
TMP872[0].len = 2; TMP872[0].kind = 2; TMP872[0].sons = &TMP902[0];
NTI231274.node = &TMP872[0];
}

