/* 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 Tiitable232274 Tiitable232274;
typedef struct Tiipairseq232272 Tiipairseq232272;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tiipair232270 Tiipair232270;
typedef struct TGenericSeq TGenericSeq;
typedef struct Tsym224841 Tsym224841;
typedef struct Ttabiter232119 Ttabiter232119;
typedef struct Tstrtable224813 Tstrtable224813;
typedef struct Tsymseq224811 Tsymseq224811;
typedef struct Tident197021 Tident197021;
typedef struct Tidobj197015 Tidobj197015;
typedef struct TNimObject TNimObject;
typedef struct NimStringDesc NimStringDesc;
typedef struct Ttypeseq224843 Ttypeseq224843;
typedef struct Tscope224835 Tscope224835;
typedef struct TY224944 TY224944;
typedef struct Ttype224847 Ttype224847;
typedef struct Tlineinfo189352 Tlineinfo189352;
typedef struct Tnode224809 Tnode224809;
typedef struct Tloc224823 Tloc224823;
typedef struct Ropeobj175009 Ropeobj175009;
typedef struct Tlib224827 Tlib224827;
typedef struct Tidtable224859 Tidtable224859;
typedef struct Tidpairseq224857 Tidpairseq224857;
typedef struct Tidpair224855 Tidpair224855;
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 Tnodeseq224803 Tnodeseq224803;
typedef struct Tidentiter232141 Tidentiter232141;
typedef struct Intset221056 Intset221056;
typedef struct Tidnodetable224865 Tidnodetable224865;
typedef struct Tidnodepairseq224863 Tidnodepairseq224863;
typedef struct Tidnodepair224861 Tidnodepair224861;
typedef struct Tinstantiation224831 Tinstantiation224831;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Trunk221052 Trunk221052;
typedef struct Trunkseq221054 Trunkseq221054;
typedef struct TY224932 TY224932;
struct  Tiitable232274  {
NI counter;
Tiipairseq232272* 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  Tiipair232270  {
NI key;
NI val;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  Tstrtable224813  {
NI counter;
Tsymseq224811* data;
};
struct  Ttabiter232119  {
NI h;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Tidobj197015  {
  TNimObject Sup;
NI id;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tident197021  {
  Tidobj197015 Sup;
NimStringDesc* s;
Tident197021* next;
NI h;
};
struct  Tlineinfo189352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc224823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype224847* t;
Ropeobj175009* r;
Ropeobj175009* heaproot;
};
struct  Tsym224841  {
  Tidobj197015 Sup;
NU8 kind;
union{
struct {Ttypeseq224843* typeinstcache;
Tscope224835* typscope;
} S1;
struct {TY224944* procinstcache;
Tsym224841* gcunsafetyreason;
} S2;
struct {TY224944* usedgenerics;
Tstrtable224813 tab;
} S3;
struct {Tsym224841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype224847* typ;
Tident197021* name;
Tlineinfo189352 info;
Tsym224841* owner;
NU32 flags;
Tnode224809* ast;
NU32 options;
NI position;
NI offset;
Tloc224823 loc;
Tlib224827* annex;
Tnode224809* constraint;
};
struct  Tidtable224859  {
NI counter;
Tidpairseq224857* data;
};
struct  Tidpair224855  {
Tidobj197015* 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  Tnode224809  {
Ttype224847* typ;
Tlineinfo189352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym224841* sym;
} S4;
struct {Tident197021* ident;
} S5;
struct {Tnodeseq224803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tidentiter232141  {
NI h;
Tident197021* name;
};
struct  Tidnodetable224865  {
NI counter;
Tidnodepairseq224863* data;
};
struct  Tidnodepair224861  {
Tidobj197015* key;
Tnode224809* val;
};
struct  Tscope224835  {
NI depthlevel;
Tstrtable224813 symbols;
Tnodeseq224803* usingsyms;
Tscope224835* parent;
};
struct  Ttype224847  {
  Tidobj197015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq224843* sons;
Tnode224809* n;
Tsym224841* owner;
Tsym224841* sym;
Tsym224841* destructor;
Tsym224841* deepcopy;
Tsym224841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc224823 loc;
};
struct  Ropeobj175009  {
  TNimObject Sup;
Ropeobj175009* left;
Ropeobj175009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry140022  {
  TNimObject Sup;
Tlistentry140022* prev;
Tlistentry140022* next;
};
struct  Tlib224827  {
  Tlistentry140022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj175009* name;
Tnode224809* 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  Intset221056  {
NI counter;
NI max;
Trunk221052* head;
Trunkseq221054* data;
};
struct  Tinstantiation224831  {
Tsym224841* sym;
Ttypeseq224843* concretetypes;
TY224932* usedby;
NI compilesid;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Trunk221052  {
Trunk221052* next;
NI key;
TY30822 bits;
};
struct Tiipairseq232272 {
  TGenericSeq Sup;
  Tiipair232270 data[SEQ_DECL_SIZE];
};
struct Tidpairseq224857 {
  TGenericSeq Sup;
  Tidpair224855 data[SEQ_DECL_SIZE];
};
struct Tsymseq224811 {
  TGenericSeq Sup;
  Tsym224841* data[SEQ_DECL_SIZE];
};
struct Tidnodepairseq224863 {
  TGenericSeq Sup;
  Tidnodepair224861 data[SEQ_DECL_SIZE];
};
struct Ttypeseq224843 {
  TGenericSeq Sup;
  Ttype224847* data[SEQ_DECL_SIZE];
};
struct TY224944 {
  TGenericSeq Sup;
  Tinstantiation224831* data[SEQ_DECL_SIZE];
};
struct Tnodeseq224803 {
  TGenericSeq Sup;
  Tnode224809* data[SEQ_DECL_SIZE];
};
struct Trunkseq221054 {
  TGenericSeq Sup;
  Trunk221052* data[SEQ_DECL_SIZE];
};
struct TY224932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, TMP904)(void* p, NI op);
N_NIMCALL(Tsym224841*, nextiter_232132)(Ttabiter232119* ti, Tstrtable224813 tab);
static N_INLINE(NI, nexttry_232256)(NI h, NI maxhash);
N_NIMCALL(NI, iitablerawget_239017)(Tiitable232274 t, NI key);
N_NIMCALL(NI, idtablerawget_237306)(Tidtable224859 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_232249)(NI length, NI counter);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, idtablerawinsert_237439)(Tidpairseq224857** data, Tidobj197015* key, TNimObject* val);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, strtableenlarge_236428)(Tstrtable224813* t);
N_NIMCALL(void, strtablerawinsert_235573)(Tsymseq224811** data, Tsym224841* n);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, iitablerawinsert_239049)(Tiipairseq232272** data, NI key, NI val);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, reallysameident_236540)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NI, sonslen_227387)(Tnode224809* n);
N_NIMCALL(void, internalerror_195172)(Tlineinfo189352 info, NimStringDesc* errmsg);
static N_INLINE(NI, cmpStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(Tsym224841*, lookupinrecord_232236)(Tnode224809* n, Tident197021* field);
N_NIMCALL(Tnode224809*, lastson_227406)(Tnode224809* n);
N_NIMCALL(NIM_BOOL, levalue_232374)(Tnode224809* a, Tnode224809* b);
N_NIMCALL(Tsym224841*, nextidentiter_232156)(Tidentiter232141* ti, Tstrtable224813 tab);
N_NIMCALL(Tsym224841*, nextidentexcluding_237104)(Tidentiter232141* ti, Tstrtable224813 tab, Intset221056* excluding);
N_NIMCALL(NIM_BOOL, contains_221829)(Intset221056* s, NI key);
N_NIMCALL(NI, idnodetablerawget_238296)(Tidnodetable224865 t, Tidobj197015* key);
N_NIMCALL(void, idnodetablerawinsert_238360)(Tidnodepairseq224863** data, Tidobj197015* key, Tnode224809* val);
N_NIMCALL(void, symtabreplaceraw_236032)(Tsymseq224811** data, Tsym224841* prevsym, Tsym224841* newsym);
STRING_LITERAL(TMP2787, "getSymFromList", 14);
STRING_LITERAL(TMP3083, "lookupInRecord", 14);
STRING_LITERAL(TMP3084, "lookupInRecord(record case branch)", 34);
STRING_LITERAL(TMP3085, "lookupInRecord()", 16);
TNimType NTI232274; /* TIITable */
extern TNimType NTI108; /* int */
TNimType NTI232270; /* TIIPair */
TNimType NTI232272; /* TIIPairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI224857; /* TIdPairSeq */
extern TNimType NTI224811; /* TSymSeq */
extern TNimType NTI224863; /* TIdNodePairSeq */
N_NIMCALL(void, TMP904)(void* p, NI op) {
	Tiipairseq232272* a;
	NI LOC1;
	a = (Tiipairseq232272*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

N_NIMCALL(Tsym224841*, nextiter_232132)(Ttabiter232119* ti, Tstrtable224813 tab) {
	Tsym224841* 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(Tsym224841*, inittabiter_232124)(Ttabiter232119* ti, Tstrtable224813 tab) {
	Tsym224841* result;
	result = 0;
	(*ti).h = ((NI) 0);
	{
		if (!(tab.counter == ((NI) 0))) goto LA3;
		result = NIM_NIL;
	}
	goto LA1;
	LA3: ;
	{
		result = nextiter_232132(ti, tab);
	}
	LA1: ;
	return result;
}

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

N_NIMCALL(Tsym224841*, strtableget_232111)(Tstrtable224813 t, Tident197021* name) {
	Tsym224841* 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_232256(h, (t.data ? (t.data->Sup.len-1) : -1));
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NI, iitablerawget_239017)(Tiitable232274 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_232256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, iitableget_232289)(Tiitable232274 t, NI key) {
	NI result;
	NI index;
	result = 0;
	index = iitablerawget_239017(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_237306)(Tidtable224859 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_232256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(TNimObject*, idtableget_232189)(Tidtable224859 t, NI key) {
	TNimObject* result;
	NI index;
	result = 0;
	index = idtablerawget_237306(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_232249)(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_237439)(Tidpairseq224857** data, Tidobj197015* 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_232256(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_232196)(Tidtable224859* t, Tidobj197015* key, TNimObject* val) {
	NI index;
	Tidpairseq224857* n;
	index = 0;
	n = 0;
	index = idtablerawget_237306((*t), (*key).id);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRef((void**) (&(*t).data->data[index].val), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tidpairseq224857* LOC18;
			LOC8 = 0;
			LOC8 = mustrehash_232249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = (Tidpairseq224857*) newSeq((&NTI224857), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_238039;
				NI HEX3Atmp_238224;
				NI res_238227;
				i_238039 = 0;
				HEX3Atmp_238224 = 0;
				HEX3Atmp_238224 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_238227 = ((NI) 0);
				{
					while (1) {
						if (!(res_238227 <= HEX3Atmp_238224)) goto LA13;
						i_238039 = res_238227;
						{
							if (!!(((*t).data->data[i_238039].key == NIM_NIL))) goto LA16;
							idtablerawinsert_237439((&n), (*t).data->data[i_238039].key, (*t).data->data[i_238039].val);
						}
						LA16: ;
						res_238227 += ((NI) 1);
					} LA13: ;
				}
			}
			LOC18 = 0;
			LOC18 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC18;
		}
		LA9: ;
		idtablerawinsert_237439((&(*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_235573)(Tsymseq224811** data, Tsym224841* 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_232256(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_232256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
			} LA13: ;
		}
		asgnRefNoCycle((void**) (&(*data)->data[h]), n);
		{
			Tsym224841* 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_236428)(Tstrtable224813* t) {
	Tsymseq224811* n;
	Tsymseq224811* LOC8;
	n = 0;
	n = (Tsymseq224811*) newSeq((&NTI224811), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	{
		NI i_236463;
		NI HEX3Atmp_236489;
		NI res_236492;
		i_236463 = 0;
		HEX3Atmp_236489 = 0;
		HEX3Atmp_236489 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
		res_236492 = ((NI) 0);
		{
			while (1) {
				if (!(res_236492 <= HEX3Atmp_236489)) goto LA3;
				i_236463 = res_236492;
				{
					if (!!(((*t).data->data[i_236463] == NIM_NIL))) goto LA6;
					strtablerawinsert_235573((&n), (*t).data->data[i_236463]);
				}
				LA6: ;
				res_236492 += ((NI) 1);
			} LA3: ;
		}
	}
	LOC8 = 0;
	LOC8 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC8;
}

N_NIMCALL(void, strtableadd_232103)(Tstrtable224813* t, Tsym224841* n) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = mustrehash_232249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
		if (!LOC3) goto LA4;
		strtableenlarge_236428(t);
	}
	LA4: ;
	strtablerawinsert_235573((&(*t).data), n);
	(*t).counter += ((NI) 1);
}

N_NIMCALL(void, initiitable_232282)(Tiitable232274* x) {
	(*x).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*x).data), (Tiipairseq232272*) newSeq((&NTI232272), ((NI) 8)));
	{
		NI i_238994;
		NI res_238998;
		i_238994 = 0;
		res_238998 = ((NI) 0);
		{
			while (1) {
				if (!(res_238998 <= ((NI) 7))) goto LA3;
				i_238994 = res_238998;
				(*x).data->data[i_238994].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
				res_238998 += ((NI) 1);
			} LA3: ;
		}
	}
}

N_NIMCALL(void, iitablerawinsert_239049)(Tiipairseq232272** 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_232256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	(*data)->data[h].key = key;
	(*data)->data[h].val = val;
}

N_NIMCALL(void, iitableput_232296)(Tiitable232274* t, NI key, NI val) {
	NI index;
	index = iitablerawget_239017((*t), key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		(*t).data->data[index].val = val;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tiipairseq232272* n;
			Tiipairseq232272* LOC21;
			LOC8 = 0;
			LOC8 = mustrehash_232249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = 0;
			n = (Tiipairseq232272*) newSeq((&NTI232272), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_239640;
				NI HEX3Atmp_239677;
				NI res_239680;
				i_239640 = 0;
				HEX3Atmp_239677 = 0;
				HEX3Atmp_239677 = (n ? (n->Sup.len-1) : -1);
				res_239680 = ((NI) 0);
				{
					while (1) {
						if (!(res_239680 <= HEX3Atmp_239677)) goto LA13;
						i_239640 = res_239680;
						n->data[i_239640].key = ((NI) (IL64(-9223372036854775807) - IL64(1)));
						res_239680 += ((NI) 1);
					} LA13: ;
				}
			}
			{
				NI i_239653;
				NI HEX3Atmp_239685;
				NI res_239688;
				i_239653 = 0;
				HEX3Atmp_239685 = 0;
				HEX3Atmp_239685 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_239688 = ((NI) 0);
				{
					while (1) {
						if (!(res_239688 <= HEX3Atmp_239685)) goto LA16;
						i_239653 = res_239688;
						{
							if (!!(((*t).data->data[i_239653].key == ((NI) (IL64(-9223372036854775807) - IL64(1)))))) goto LA19;
							iitablerawinsert_239049((&n), (*t).data->data[i_239653].key, (*t).data->data[i_239653].val);
						}
						LA19: ;
						res_239688 += ((NI) 1);
					} LA16: ;
				}
			}
			LOC21 = 0;
			LOC21 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC21;
		}
		LA9: ;
		iitablerawinsert_239049((&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(Tsym224841*, getmodule_232243)(Tsym224841* s) {
	Tsym224841* 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_232182)(Tidtable224859 t, Tidobj197015* key) {
	TNimObject* result;
	NI index;
	result = 0;
	index = idtablerawget_237306(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_232324)(Tnode224809* a, Tnode224809* 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_236540)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	result = 0;
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(NIM_BOOL, strtableincl_236607)(Tstrtable224813* t, Tsym224841* 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) {
			Tsym224841* 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_236540((*(*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_232256(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_232249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
		if (!LOC22) goto LA23;
		strtableenlarge_236428(t);
		strtablerawinsert_235573((&(*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(Tsym224841*, getsymfromlist_232228)(Tnode224809* list, Tident197021* ident, NI start) {
	Tsym224841* result;
{	result = 0;
	{
		NI i_232854;
		NI HEX3Atmp_232869;
		NI LOC2;
		NI res_232872;
		i_232854 = 0;
		HEX3Atmp_232869 = 0;
		LOC2 = 0;
		LOC2 = sonslen_227387(list);
		HEX3Atmp_232869 = (NI)(LOC2 - ((NI) 1));
		res_232872 = start;
		{
			while (1) {
				if (!(res_232872 <= HEX3Atmp_232869)) goto LA4;
				i_232854 = res_232872;
				{
					if (!((*(*list).kindU.S6.sons->data[i_232854]).kind == ((NU8) 3))) goto LA7;
					result = (*(*list).kindU.S6.sons->data[i_232854]).kindU.S4.sym;
					{
						if (!((*(*result).name).Sup.id == (*ident).Sup.id)) goto LA11;
						goto BeforeRet;
					}
					LA11: ;
				}
				goto LA5;
				LA7: ;
				{
					internalerror_195172((*list).info, ((NimStringDesc*) &TMP2787));
				}
				LA5: ;
				res_232872 += ((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_232374)(Tnode224809* a, Tnode224809* 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(Tsym224841*, lookupinrecord_232236)(Tnode224809* n, Tident197021* field) {
	Tsym224841* result;
{	result = 0;
	result = NIM_NIL;
	switch ((*n).kind) {
	case ((NU8) 138):
	{
		{
			NI i_232472;
			NI HEX3Atmp_232540;
			NI LOC3;
			NI res_232543;
			i_232472 = 0;
			HEX3Atmp_232540 = 0;
			LOC3 = 0;
			LOC3 = sonslen_227387(n);
			HEX3Atmp_232540 = (NI)(LOC3 - ((NI) 1));
			res_232543 = ((NI) 0);
			{
				while (1) {
					if (!(res_232543 <= HEX3Atmp_232540)) goto LA5;
					i_232472 = res_232543;
					result = lookupinrecord_232236((*n).kindU.S6.sons->data[i_232472], field);
					{
						if (!!((result == NIM_NIL))) goto LA8;
						goto BeforeRet;
					}
					LA8: ;
					res_232543 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 139):
	{
		{
			if (!!(((*(*n).kindU.S6.sons->data[((NI) 0)]).kind == ((NU8) 3)))) goto LA13;
			internalerror_195172((*n).info, ((NimStringDesc*) &TMP3083));
		}
		LA13: ;
		result = lookupinrecord_232236((*n).kindU.S6.sons->data[((NI) 0)], field);
		{
			if (!!((result == NIM_NIL))) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
		{
			NI i_232521;
			NI HEX3Atmp_232548;
			NI LOC20;
			NI res_232551;
			i_232521 = 0;
			HEX3Atmp_232548 = 0;
			LOC20 = 0;
			LOC20 = sonslen_227387(n);
			HEX3Atmp_232548 = (NI)(LOC20 - ((NI) 1));
			res_232551 = ((NI) 1);
			{
				while (1) {
					if (!(res_232551 <= HEX3Atmp_232548)) goto LA22;
					i_232521 = res_232551;
					switch ((*(*n).kindU.S6.sons->data[i_232521]).kind) {
					case ((NU8) 85):
					case ((NU8) 88):
					{
						Tnode224809* LOC24;
						LOC24 = 0;
						LOC24 = lastson_227406((*n).kindU.S6.sons->data[i_232521]);
						result = lookupinrecord_232236(LOC24, field);
						{
							if (!!((result == NIM_NIL))) goto LA27;
							goto BeforeRet;
						}
						LA27: ;
					}
					break;
					default:
					{
						internalerror_195172((*n).info, ((NimStringDesc*) &TMP3084));
					}
					break;
					}
					res_232551 += ((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_195172((*n).info, ((NimStringDesc*) &TMP3085));
	}
	break;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NU8, weaklevalue_232424)(Tnode224809* a, Tnode224809* 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_232374(a, b);
			if (!LOC10) goto LA11;
			result = ((NU8) 2);
		}
		goto LA8;
		LA11: ;
		{
			result = ((NU8) 1);
		}
		LA8: ;
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym224841*, nextidentiter_232156)(Tidentiter232141* ti, Tstrtable224813 tab) {
	Tsym224841* 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_232256(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_232256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
	return result;
}

N_NIMCALL(Tsym224841*, initidentiter_232147)(Tidentiter232141* ti, Tstrtable224813 tab, Tident197021* s) {
	Tsym224841* 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_232156(ti, tab);
	}
	LA1: ;
	return result;
}

N_NIMCALL(Tsym224841*, nextidentexcluding_237104)(Tidentiter232141* ti, Tstrtable224813 tab, Intset221056* excluding) {
	Tsym224841* 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_221829(excluding, (*result).Sup.id);
				LOC5 = !(LOC7);
				LA6: ;
				if (!LOC5) goto LA8;
				goto LA1;
			}
			LA8: ;
			h = nexttry_232256(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_232256(h, (tab.data ? (tab.data->Sup.len-1) : -1));
	{
		NIM_BOOL LOC16;
		LOC16 = 0;
		LOC16 = !((result == NIM_NIL));
		if (!(LOC16)) goto LA17;
		LOC16 = contains_221829(excluding, (*result).Sup.id);
		LA17: ;
		if (!LOC16) goto LA18;
		result = NIM_NIL;
	}
	LA18: ;
	return result;
}

N_NIMCALL(Tsym224841*, firstidentexcluding_237154)(Tidentiter232141* ti, Tstrtable224813 tab, Tident197021* s, Intset221056* excluding) {
	Tsym224841* 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_237104(ti, tab, excluding);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI, idnodetablerawget_238296)(Tidnodetable224865 t, Tidobj197015* 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_232256(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = ((NI) -1);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode224809*, idnodetableget_232212)(Tidnodetable224865 t, Tidobj197015* key) {
	Tnode224809* result;
	NI index;
	result = 0;
	index = 0;
	index = idnodetablerawget_238296(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_238360)(Tidnodepairseq224863** data, Tidobj197015* key, Tnode224809* 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_232256(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_232219)(Tidnodetable224865* t, Tidobj197015* key, Tnode224809* val) {
	NI index;
	index = idnodetablerawget_238296((*t), key);
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRefNoCycle((void**) (&(*t).data->data[index].val), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			Tidnodepairseq224863* n;
			Tidnodepairseq224863* LOC18;
			LOC8 = 0;
			LOC8 = mustrehash_232249(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			n = 0;
			n = (Tidnodepairseq224863*) newSeq((&NTI224863), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
			{
				NI i_238840;
				NI HEX3Atmp_238876;
				NI res_238879;
				i_238840 = 0;
				HEX3Atmp_238876 = 0;
				HEX3Atmp_238876 = ((*t).data ? ((*t).data->Sup.len-1) : -1);
				res_238879 = ((NI) 0);
				{
					while (1) {
						if (!(res_238879 <= HEX3Atmp_238876)) goto LA13;
						i_238840 = res_238879;
						{
							if (!!(((*t).data->data[i_238840].key == NIM_NIL))) goto LA16;
							idnodetablerawinsert_238360((&n), (*t).data->data[i_238840].key, (*t).data->data[i_238840].val);
						}
						LA16: ;
						res_238879 += ((NI) 1);
					} LA13: ;
				}
			}
			LOC18 = 0;
			LOC18 = (*t).data;
			unsureAsgnRef((void**) (&(*t).data), n);
			n = LOC18;
		}
		LA9: ;
		idnodetablerawinsert_238360((&(*t).data), key, val);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(Tnode224809*, skipconvandclosure_232305)(Tnode224809* n) {
	Tnode224809* 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_236032)(Tsymseq224811** data, Tsym224841* prevsym, Tsym224841* 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_232256(h, ((*data) ? ((*data)->Sup.len-1) : -1));
		} LA2: ;
	}
	}BeforeRet: ;
}

N_NIMCALL(void, symtabreplace_236415)(Tstrtable224813* t, Tsym224841* prevsym, Tsym224841* newsym) {
	symtabreplaceraw_236032((&(*t).data), prevsym, newsym);
}

N_NIMCALL(NIM_BOOL, idtablehasobjectaskey_232205)(Tidtable224859 t, Tidobj197015* key) {
	NIM_BOOL result;
	NI index;
	result = 0;
	index = idtablerawget_237306(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];
NTI232274.size = sizeof(Tiitable232274);
NTI232274.kind = 18;
NTI232274.base = 0;
NTI232274.flags = 2;
TMP902[0] = &TMP872[1];
TMP872[1].kind = 1;
TMP872[1].offset = offsetof(Tiitable232274, counter);
TMP872[1].typ = (&NTI108);
TMP872[1].name = "counter";
TMP902[1] = &TMP872[2];
NTI232270.size = sizeof(Tiipair232270);
NTI232270.kind = 18;
NTI232270.base = 0;
NTI232270.flags = 3;
TMP903[0] = &TMP872[4];
TMP872[4].kind = 1;
TMP872[4].offset = offsetof(Tiipair232270, key);
TMP872[4].typ = (&NTI108);
TMP872[4].name = "key";
TMP903[1] = &TMP872[5];
TMP872[5].kind = 1;
TMP872[5].offset = offsetof(Tiipair232270, val);
TMP872[5].typ = (&NTI108);
TMP872[5].name = "val";
TMP872[3].len = 2; TMP872[3].kind = 2; TMP872[3].sons = &TMP903[0];
NTI232270.node = &TMP872[3];
NTI232272.size = sizeof(Tiipairseq232272*);
NTI232272.kind = 24;
NTI232272.base = (&NTI232270);
NTI232272.flags = 2;
NTI232272.marker = TMP904;
TMP872[2].kind = 1;
TMP872[2].offset = offsetof(Tiitable232274, data);
TMP872[2].typ = (&NTI232272);
TMP872[2].name = "data";
TMP872[0].len = 2; TMP872[0].kind = 2; TMP872[0].sons = &TMP902[0];
NTI232274.node = &TMP872[0];
}

