/* 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 Table192452 Table192452;
typedef struct Keyvaluepairseq192455 Keyvaluepairseq192455;
typedef struct Keyvaluepair192458 Keyvaluepair192458;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Table270063 Table270063;
typedef struct Keyvaluepairseq270066 Keyvaluepairseq270066;
typedef struct Keyvaluepair270069 Keyvaluepair270069;
typedef struct Tsym227841 Tsym227841;
typedef struct Cell48946 Cell48946;
typedef struct Cellseq48962 Cellseq48962;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48958 Cellset48958;
typedef struct Pagedesc48954 Pagedesc48954;
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 Keyerror4051 Keyerror4051;
typedef struct Valueerror4049 Valueerror4049;
typedef struct Exception Exception;
typedef struct TNimObject TNimObject;
typedef struct Table349053 Table349053;
typedef struct Keyvaluepairseq349056 Keyvaluepairseq349056;
typedef struct Keyvaluepair349059 Keyvaluepair349059;
typedef struct Table431650 Table431650;
typedef struct Keyvaluepairseq431653 Keyvaluepairseq431653;
typedef struct Keyvaluepair431656 Keyvaluepair431656;
typedef struct Tnode227809 Tnode227809;
typedef struct Table350410 Table350410;
typedef struct Keyvaluepairseq350413 Keyvaluepairseq350413;
typedef struct Keyvaluepair350416 Keyvaluepair350416;
typedef struct Indexentry350397 Indexentry350397;
typedef struct TY353507 TY353507;
typedef struct Tidobj200015 Tidobj200015;
typedef struct Ttypeseq227843 Ttypeseq227843;
typedef struct Tscope227835 Tscope227835;
typedef struct TY227944 TY227944;
typedef struct Tstrtable227813 Tstrtable227813;
typedef struct Tsymseq227811 Tsymseq227811;
typedef struct Ttype227847 Ttype227847;
typedef struct Tident200021 Tident200021;
typedef struct Tlineinfo192352 Tlineinfo192352;
typedef struct Tloc227823 Tloc227823;
typedef struct Ropeobj178009 Ropeobj178009;
typedef struct Tlib227827 Tlib227827;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Tnodeseq227803 Tnodeseq227803;
typedef struct Tinstantiation227831 Tinstantiation227831;
typedef struct Tlistentry143022 Tlistentry143022;
typedef struct TY227932 TY227932;
struct  Table192452  {
Keyvaluepairseq192455* data;
NI counter;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct Keyvaluepair192458 {
NI Field0;
NimStringDesc* Field1;
NI32 Field2;
};
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  Table270063  {
Keyvaluepairseq270066* data;
NI counter;
};
struct Keyvaluepair270069 {
NI Field0;
NI Field1;
Tsym227841* Field2;
};
struct  Cell48946  {
NI refcount;
TNimType* typ;
};
struct  Cellseq48962  {
NI len;
NI cap;
Cell48946** d;
};
struct  Cellset48958  {
NI counter;
NI max;
Pagedesc48954* head;
Pagedesc48954** 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;
Cellseq48962 zct;
Cellseq48962 decstack;
Cellset48958 cycleroots;
Cellseq48962 tempstack;
NI recgclock;
Memregion30891 region;
Gcstat51014 stat;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Valueerror4049  {
  Exception Sup;
};
struct  Keyerror4051  {
  Valueerror4049 Sup;
};
struct  Table349053  {
Keyvaluepairseq349056* data;
NI counter;
};
struct Keyvaluepair349059 {
NI Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  Table431650  {
Keyvaluepairseq431653* data;
NI counter;
};
struct Keyvaluepair431656 {
NI Field0;
NI64 Field1;
Tnode227809* Field2;
};
struct  Table350410  {
Keyvaluepairseq350413* data;
NI counter;
};
struct  Indexentry350397  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct Keyvaluepair350416 {
NI Field0;
Indexentry350397 Field1;
TY353507* Field2;
};
struct  Tidobj200015  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable227813  {
NI counter;
Tsymseq227811* data;
};
struct  Tlineinfo192352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc227823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype227847* t;
Ropeobj178009* r;
Ropeobj178009* heaproot;
};
struct  Tsym227841  {
  Tidobj200015 Sup;
NU8 kind;
union{
struct {Ttypeseq227843* typeinstcache;
Tscope227835* typscope;
} S1;
struct {TY227944* procinstcache;
Tsym227841* gcunsafetyreason;
} S2;
struct {TY227944* usedgenerics;
Tstrtable227813 tab;
} S3;
struct {Tsym227841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype227847* typ;
Tident200021* name;
Tlineinfo192352 info;
Tsym227841* owner;
NU32 flags;
Tnode227809* ast;
NU32 options;
NI position;
NI offset;
Tloc227823 loc;
Tlib227827* annex;
Tnode227809* constraint;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30822[8];
struct  Pagedesc48954  {
Pagedesc48954* 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  Tnode227809  {
Ttype227847* typ;
Tlineinfo192352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym227841* sym;
} S4;
struct {Tident200021* ident;
} S5;
struct {Tnodeseq227803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tscope227835  {
NI depthlevel;
Tstrtable227813 symbols;
Tnodeseq227803* usingsyms;
Tscope227835* parent;
};
struct  Ttype227847  {
  Tidobj200015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq227843* sons;
Tnode227809* n;
Tsym227841* owner;
Tsym227841* sym;
Tsym227841* destructor;
Tsym227841* deepcopy;
Tsym227841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc227823 loc;
};
struct  Tident200021  {
  Tidobj200015 Sup;
NimStringDesc* s;
Tident200021* next;
NI h;
};
struct  Ropeobj178009  {
  TNimObject Sup;
Ropeobj178009* left;
Ropeobj178009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry143022  {
  TNimObject Sup;
Tlistentry143022* prev;
Tlistentry143022* next;
};
struct  Tlib227827  {
  Tlistentry143022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj178009* name;
Tnode227809* path;
};
struct  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Tinstantiation227831  {
Tsym227841* sym;
Ttypeseq227843* concretetypes;
TY227932* usedby;
NI compilesid;
};
struct Keyvaluepairseq192455 {
  TGenericSeq Sup;
  Keyvaluepair192458 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq270066 {
  TGenericSeq Sup;
  Keyvaluepair270069 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq349056 {
  TGenericSeq Sup;
  Keyvaluepair349059 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq431653 {
  TGenericSeq Sup;
  Keyvaluepair431656 data[SEQ_DECL_SIZE];
};
struct TY353507 {
  TGenericSeq Sup;
  Indexentry350397 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq350413 {
  TGenericSeq Sup;
  Keyvaluepair350416 data[SEQ_DECL_SIZE];
};
struct Ttypeseq227843 {
  TGenericSeq Sup;
  Ttype227847* data[SEQ_DECL_SIZE];
};
struct TY227944 {
  TGenericSeq Sup;
  Tinstantiation227831* data[SEQ_DECL_SIZE];
};
struct Tsymseq227811 {
  TGenericSeq Sup;
  Tsym227841* data[SEQ_DECL_SIZE];
};
struct Tnodeseq227803 {
  TGenericSeq Sup;
  Tnode227809* data[SEQ_DECL_SIZE];
};
struct TY227932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP148)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, TMP914)(void* p, NI op);
static N_INLINE(NI, rawget_270749)(Table270063 t, NI key, NI* hc);
static N_INLINE(NI, hash_145801)(NI x);
static N_INLINE(NIM_BOOL, isfilled_172281)(NI hcode);
static N_INLINE(NI, nexttry_172404)(NI h, NI maxhash);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Cell48946*, usrtocell_52646)(void* usr);
static N_INLINE(void, rtladdzct_54204)(Cell48946* c);
N_NOINLINE(void, addzct_52617)(Cellseq48962* s, Cell48946* c);
static N_INLINE(NIM_BOOL, mustrehash_172289)(NI length, NI counter);
N_NIMCALL(void, enlarge_270837)(Table270063* t);
static N_INLINE(NI, rawgetknownhc_270891)(Table270063 t, NI key, NI hc);
N_NIMCALL(void, rawinsert_270916)(Table270063* t, Keyvaluepairseq270066** data, NI key, Tsym227841* val, NI hc, NI h);
static N_INLINE(NI, rawget_192754)(Table192452 t, NimStringDesc* key, NI* hc);
N_NIMCALL(NI, hash_145848)(NimStringDesc* x);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
N_NIMCALL(void, enlarge_193074)(Table192452* t);
static N_INLINE(NI, rawgetknownhc_193128)(Table192452 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_193153)(Table192452* t, Keyvaluepairseq192455** data, NimStringDesc* key, NI32 val, NI hc, NI h);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(NI, rawget_350088)(Table349053 t, NimStringDesc* key, NI* hc);
N_NIMCALL(void, enlarge_350188)(Table349053* t);
N_NIMCALL(void, TMP2545)(void* p, NI op);
static N_INLINE(NI, rawgetknownhc_350242)(Table349053 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_350267)(Table349053* t, Keyvaluepairseq349056** data, NimStringDesc* key, NI val, NI hc, NI h);
N_NIMCALL(void, TMP3043)(void* p, NI op);
static N_INLINE(NI, rawget_432113)(Table431650 t, NI64 key, NI* hc);
static N_INLINE(NI, hash_145811)(NI64 x);
N_NIMCALL(void, enlarge_432198)(Table431650* t);
static N_INLINE(NI, rawgetknownhc_432252)(Table431650 t, NI64 key, NI hc);
N_NIMCALL(void, rawinsert_432277)(Table431650* t, Keyvaluepairseq431653** data, NI64 key, Tnode227809* val, NI hc, NI h);
N_NIMCALL(void, TMP5174)(void* p, NI op);
static N_INLINE(NI, rawget_352698)(Table350410 t, Indexentry350397* key, NI* hc);
N_NIMCALL(NI, hash_350447)(Indexentry350397* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_352712)(Indexentry350397* x, Indexentry350397* y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_87604, TNimType* mt);
N_NIMCALL(void, enlarge_353908)(Table350410* t);
static N_INLINE(NI, rawgetknownhc_353962)(Table350410 t, Indexentry350397* key, NI hc);
N_NIMCALL(void, rawinsert_353996)(Table350410* t, Keyvaluepairseq350413** data, Indexentry350397* key, TY353507* val, NI hc, NI h);
STRING_LITERAL(TMP1205, "key not found: ", 15);
TNimType NTI192458; /* KeyValuePair */
extern TNimType NTI145005; /* Hash */
extern TNimType NTI149; /* string */
extern TNimType NTI114; /* int32 */
TNimType NTI192455; /* KeyValuePairSeq */
TNimType NTI192452; /* Table */
extern TNimType NTI108; /* int */
TNimType NTI270063; /* Table */
TNimType NTI270069; /* KeyValuePair */
extern TNimType NTI227807; /* PSym */
TNimType NTI270066; /* KeyValuePairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI193004; /* ref KeyError */
extern TNimType NTI4051; /* KeyError */
TNimType NTI349059; /* KeyValuePair */
TNimType NTI349056; /* KeyValuePairSeq */
TNimType NTI431656; /* KeyValuePair */
extern TNimType NTI8112; /* BiggestInt */
extern TNimType NTI227801; /* PNode */
TNimType NTI431653; /* KeyValuePairSeq */
TNimType NTI349053; /* Table */
TNimType NTI350416; /* KeyValuePair */
extern TNimType NTI350397; /* IndexEntry */
extern TNimType NTI353507; /* seq[IndexEntry] */
TNimType NTI350413; /* KeyValuePairSeq */
N_NIMCALL(void, TMP148)(void* p, NI op) {
	Keyvaluepairseq192455* a;
	NI LOC1;
	a = (Keyvaluepairseq192455*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

N_NIMCALL(void, inittable_192444)(NI initialsize, Table192452* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq192455*) newSeq((&NTI192455), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP914)(void* p, NI op) {
	Keyvaluepairseq270066* a;
	NI LOC1;
	a = (Keyvaluepairseq270066*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

static N_INLINE(NI, hash_145801)(NI x) {
	NI result;
	result = 0;
	result = x;
	return result;
}

static N_INLINE(NIM_BOOL, isfilled_172281)(NI hcode) {
	NIM_BOOL result;
	result = 0;
	result = !((hcode == ((NI) 0)));
	return result;
}

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

static N_INLINE(NI, rawget_270749)(Table270063 t, NI key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_145801(key);
	{
		if (!((*hc) == ((NI) 0))) goto LA3;
		(*hc) = ((NI) 314159265);
	}
	LA3: ;
	h = (NI)((*hc) & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC7) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = (t.data->data[h].Field0 == (*hc));
				if (!(LOC10)) goto LA11;
				LOC10 = (t.data->data[h].Field1 == key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym227841*, getordefault_270734)(Table270063 t, NI key) {
	Tsym227841* result;
	NI hc_270745;
	NI index_270747;
	result = 0;
	hc_270745 = 0;
	index_270747 = rawget_270749(t, key, (&hc_270745));
	{
		if (!(((NI) 0) <= index_270747)) goto LA3;
		result = t.data->data[index_270747].Field2;
	}
	LA3: ;
	return result;
}

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

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

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Cell48946* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_52646(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Cell48946* 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;
}

static N_INLINE(NIM_BOOL, mustrehash_172289)(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;
}

static N_INLINE(NI, rawgetknownhc_270891)(Table270063 t, NI key, NI hc) {
	NI result;
	NI h;
{	result = 0;
	h = (NI)(hc & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC3) goto LA2;
			{
				NIM_BOOL LOC6;
				LOC6 = 0;
				LOC6 = (t.data->data[h].Field0 == hc);
				if (!(LOC6)) goto LA7;
				LOC6 = (t.data->data[h].Field1 == key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_270916)(Table270063* t, Keyvaluepairseq270066** data, NI key, Tsym227841* val, NI hc, NI h) {
	(*data)->data[h].Field1 = key;
	asgnRefNoCycle((void**) (&(*data)->data[h].Field2), val);
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_270837)(Table270063* t) {
	Keyvaluepairseq270066* n;
	Keyvaluepairseq270066* LOC1;
	n = 0;
	n = (Keyvaluepairseq270066*) newSeq((&NTI270066), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	LOC1 = 0;
	LOC1 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC1;
	{
		NI i_270889;
		NI HEX3Atmp_270942;
		NI res_270945;
		i_270889 = 0;
		HEX3Atmp_270942 = 0;
		HEX3Atmp_270942 = (n ? (n->Sup.len-1) : -1);
		res_270945 = ((NI) 0);
		{
			while (1) {
				if (!(res_270945 <= HEX3Atmp_270942)) goto LA4;
				i_270889 = res_270945;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_172281(n->data[i_270889].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_270891((*t), n->data[i_270889].Field1, n->data[i_270889].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_270916(t, (&(*t).data), n->data[i_270889].Field1, n->data[i_270889].Field2, n->data[i_270889].Field0, j);
				}
				LA8: ;
				res_270945 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_270801)(Table270063* t, NI key, Tsym227841* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_270749((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRefNoCycle((void**) (&(*t).data->data[index].Field2), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_172289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_270837(t);
			index = rawgetknownhc_270891((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_270916(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

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;
}

static N_INLINE(NI, rawget_192754)(Table192452 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_145848(key);
	{
		if (!((*hc) == ((NI) 0))) goto LA3;
		(*hc) = ((NI) 314159265);
	}
	LA3: ;
	h = (NI)((*hc) & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC7) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = (t.data->data[h].Field0 == (*hc));
				if (!(LOC10)) goto LA11;
				LOC10 = eqStrings(t.data->data[h].Field1, key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_192742)(Table192452 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_192754(t, key, (&hc));
	result = (((NI) 0) <= LOC1);
	return result;
}

static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	memcpy(((NCSTRING) ((&(*dest).data[((*dest).Sup.len)- 0]))), ((NCSTRING) ((*src).data)), (NI)((*src).Sup.len + ((NI) 1)));
	(*dest).Sup.len += (*src).Sup.len;
}

N_NIMCALL(NI32*, HEX5BHEX5D_192786)(Table192452* t, NimStringDesc* key) {
	NI32* result;
	NI hc_192799;
	NI index_192801;
	result = 0;
	hc_192799 = 0;
	index_192801 = rawget_192754((*t), key, (&hc_192799));
	{
		if (!(((NI) 0) <= index_192801)) goto LA3;
		result = (&(*t).data->data[index_192801].Field2);
	}
	goto LA1;
	LA3: ;
	{
		Keyerror4051* e_193003;
		NimStringDesc* LOC6;
		e_193003 = 0;
		e_193003 = (Keyerror4051*) newObj((&NTI193004), sizeof(Keyerror4051));
		(*e_193003).Sup.Sup.Sup.m_type = (&NTI4051);
		LOC6 = 0;
		LOC6 = rawNewString(key->Sup.len + 15);
appendString(LOC6, ((NimStringDesc*) &TMP1205));
appendString(LOC6, key);
		asgnRefNoCycle((void**) (&(*e_193003).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_193003, "KeyError");
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_193128)(Table192452 t, NimStringDesc* key, NI hc) {
	NI result;
	NI h;
{	result = 0;
	h = (NI)(hc & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC3) goto LA2;
			{
				NIM_BOOL LOC6;
				LOC6 = 0;
				LOC6 = (t.data->data[h].Field0 == hc);
				if (!(LOC6)) goto LA7;
				LOC6 = eqStrings(t.data->data[h].Field1, key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(void, rawinsert_193153)(Table192452* t, Keyvaluepairseq192455** data, NimStringDesc* key, NI32 val, NI hc, NI h) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = (*data)->data[h].Field1; (*data)->data[h].Field1 = copyStringRC1(key);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	(*data)->data[h].Field2 = val;
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_193074)(Table192452* t) {
	Keyvaluepairseq192455* n;
	Keyvaluepairseq192455* LOC1;
	n = 0;
	n = (Keyvaluepairseq192455*) newSeq((&NTI192455), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	LOC1 = 0;
	LOC1 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC1;
	{
		NI i_193126;
		NI HEX3Atmp_193179;
		NI res_193182;
		i_193126 = 0;
		HEX3Atmp_193179 = 0;
		HEX3Atmp_193179 = (n ? (n->Sup.len-1) : -1);
		res_193182 = ((NI) 0);
		{
			while (1) {
				if (!(res_193182 <= HEX3Atmp_193179)) goto LA4;
				i_193126 = res_193182;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_172281(n->data[i_193126].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_193128((*t), n->data[i_193126].Field1, n->data[i_193126].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_193153(t, (&(*t).data), n->data[i_193126].Field1, n->data[i_193126].Field2, n->data[i_193126].Field0, j);
				}
				LA8: ;
				res_193182 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_193038)(Table192452* t, NimStringDesc* key, NI32 val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_192754((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		(*t).data->data[index].Field2 = val;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_172289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_193074(t);
			index = rawgetknownhc_193128((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_193153(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_272023)(NI initialsize, Table270063* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq270066*) newSeq((&NTI270066), ((NI) (initialsize))));
}

static N_INLINE(NI, rawget_350088)(Table349053 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_145848(key);
	{
		if (!((*hc) == ((NI) 0))) goto LA3;
		(*hc) = ((NI) 314159265);
	}
	LA3: ;
	h = (NI)((*hc) & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC7) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = (t.data->data[h].Field0 == (*hc));
				if (!(LOC10)) goto LA11;
				LOC10 = eqStrings(t.data->data[h].Field1, key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_350076)(Table349053 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_350088(t, key, (&hc));
	result = (((NI) 0) <= LOC1);
	return result;
}
N_NIMCALL(void, TMP2545)(void* p, NI op) {
	Keyvaluepairseq349056* a;
	NI LOC1;
	a = (Keyvaluepairseq349056*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NI, rawgetknownhc_350242)(Table349053 t, NimStringDesc* key, NI hc) {
	NI result;
	NI h;
{	result = 0;
	h = (NI)(hc & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC3) goto LA2;
			{
				NIM_BOOL LOC6;
				LOC6 = 0;
				LOC6 = (t.data->data[h].Field0 == hc);
				if (!(LOC6)) goto LA7;
				LOC6 = eqStrings(t.data->data[h].Field1, key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_350267)(Table349053* t, Keyvaluepairseq349056** data, NimStringDesc* key, NI val, NI hc, NI h) {
	NimStringDesc* LOC1;
	LOC1 = 0;
	LOC1 = (*data)->data[h].Field1; (*data)->data[h].Field1 = copyStringRC1(key);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	(*data)->data[h].Field2 = val;
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_350188)(Table349053* t) {
	Keyvaluepairseq349056* n;
	Keyvaluepairseq349056* LOC1;
	n = 0;
	n = (Keyvaluepairseq349056*) newSeq((&NTI349056), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	LOC1 = 0;
	LOC1 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC1;
	{
		NI i_350240;
		NI HEX3Atmp_350293;
		NI res_350296;
		i_350240 = 0;
		HEX3Atmp_350293 = 0;
		HEX3Atmp_350293 = (n ? (n->Sup.len-1) : -1);
		res_350296 = ((NI) 0);
		{
			while (1) {
				if (!(res_350296 <= HEX3Atmp_350293)) goto LA4;
				i_350240 = res_350296;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_172281(n->data[i_350240].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_350242((*t), n->data[i_350240].Field1, n->data[i_350240].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_350267(t, (&(*t).data), n->data[i_350240].Field1, n->data[i_350240].Field2, n->data[i_350240].Field0, j);
				}
				LA8: ;
				res_350296 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_350152)(Table349053* t, NimStringDesc* key, NI val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_350088((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		(*t).data->data[index].Field2 = val;
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_172289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_350188(t);
			index = rawgetknownhc_350242((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_350267(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(NI, getordefault_350120)(Table349053 t, NimStringDesc* key) {
	NI result;
	NI hc_350131;
	NI index_350133;
	result = 0;
	hc_350131 = 0;
	index_350133 = rawget_350088(t, key, (&hc_350131));
	{
		if (!(((NI) 0) <= index_350133)) goto LA3;
		result = t.data->data[index_350133].Field2;
	}
	LA3: ;
	return result;
}
N_NIMCALL(void, TMP3043)(void* p, NI op) {
	Keyvaluepairseq431653* a;
	NI LOC1;
	a = (Keyvaluepairseq431653*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

N_NIMCALL(void, inittable_432467)(NI initialsize, Table431650* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq431653*) newSeq((&NTI431653), ((NI) (initialsize))));
}

static N_INLINE(NI, hash_145811)(NI64 x) {
	NI result;
	result = 0;
	result = ((NI) (((NI32)(NU32)(NU64)(x))));
	return result;
}

static N_INLINE(NI, rawget_432113)(Table431650 t, NI64 key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_145811(key);
	{
		if (!((*hc) == ((NI) 0))) goto LA3;
		(*hc) = ((NI) 314159265);
	}
	LA3: ;
	h = (NI)((*hc) & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC7) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = (t.data->data[h].Field0 == (*hc));
				if (!(LOC10)) goto LA11;
				LOC10 = (t.data->data[h].Field1 == key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode227809*, getordefault_432098)(Table431650 t, NI64 key) {
	Tnode227809* result;
	NI hc_432109;
	NI index_432111;
	result = 0;
	hc_432109 = 0;
	index_432111 = rawget_432113(t, key, (&hc_432109));
	{
		if (!(((NI) 0) <= index_432111)) goto LA3;
		result = t.data->data[index_432111].Field2;
	}
	LA3: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_432252)(Table431650 t, NI64 key, NI hc) {
	NI result;
	NI h;
{	result = 0;
	h = (NI)(hc & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC3) goto LA2;
			{
				NIM_BOOL LOC6;
				LOC6 = 0;
				LOC6 = (t.data->data[h].Field0 == hc);
				if (!(LOC6)) goto LA7;
				LOC6 = (t.data->data[h].Field1 == key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_432277)(Table431650* t, Keyvaluepairseq431653** data, NI64 key, Tnode227809* val, NI hc, NI h) {
	(*data)->data[h].Field1 = key;
	asgnRefNoCycle((void**) (&(*data)->data[h].Field2), val);
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_432198)(Table431650* t) {
	Keyvaluepairseq431653* n;
	Keyvaluepairseq431653* LOC1;
	n = 0;
	n = (Keyvaluepairseq431653*) newSeq((&NTI431653), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	LOC1 = 0;
	LOC1 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC1;
	{
		NI i_432250;
		NI HEX3Atmp_432303;
		NI res_432306;
		i_432250 = 0;
		HEX3Atmp_432303 = 0;
		HEX3Atmp_432303 = (n ? (n->Sup.len-1) : -1);
		res_432306 = ((NI) 0);
		{
			while (1) {
				if (!(res_432306 <= HEX3Atmp_432303)) goto LA4;
				i_432250 = res_432306;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_172281(n->data[i_432250].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_432252((*t), n->data[i_432250].Field1, n->data[i_432250].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_432277(t, (&(*t).data), n->data[i_432250].Field1, n->data[i_432250].Field2, n->data[i_432250].Field0, j);
				}
				LA8: ;
				res_432306 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_432162)(Table431650* t, NI64 key, Tnode227809* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_432113((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		asgnRefNoCycle((void**) (&(*t).data->data[index].Field2), val);
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_172289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_432198(t);
			index = rawgetknownhc_432252((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_432277(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_349124)(NI initialsize, Table349053* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq349056*) newSeq((&NTI349056), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP5174)(void* p, NI op) {
	Keyvaluepairseq350413* a;
	NI LOC1;
	a = (Keyvaluepairseq350413*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1.keyword, op);
	nimGCvisit((void*)a->data[LOC1].Field1.link, op);
	nimGCvisit((void*)a->data[LOC1].Field1.linktitle, op);
	nimGCvisit((void*)a->data[LOC1].Field1.linkdesc, op);
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

N_NIMCALL(void, inittable_353529)(NI initialsize, Table350410* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq350413*) newSeq((&NTI350413), ((NI) (initialsize))));
}

N_NIMCALL(NI, len_353860)(Table350410 t) {
	NI result;
	result = 0;
	result = t.counter;
	return result;
}

static N_INLINE(NI, rawget_352698)(Table350410 t, Indexentry350397* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_350447(key);
	{
		if (!((*hc) == ((NI) 0))) goto LA3;
		(*hc) = ((NI) 314159265);
	}
	LA3: ;
	h = (NI)((*hc) & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC7) goto LA6;
			{
				NIM_BOOL LOC10;
				LOC10 = 0;
				LOC10 = (t.data->data[h].Field0 == (*hc));
				if (!(LOC10)) goto LA11;
				LOC10 = HEX3DHEX3D_352712((&t.data->data[h].Field1), key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_353962)(Table350410 t, Indexentry350397* key, NI hc) {
	NI result;
	NI h;
{	result = 0;
	h = (NI)(hc & (t.data ? (t.data->Sup.len-1) : -1));
	{
		while (1) {
			NIM_BOOL LOC3;
			LOC3 = 0;
			LOC3 = isfilled_172281(t.data->data[h].Field0);
			if (!LOC3) goto LA2;
			{
				NIM_BOOL LOC6;
				LOC6 = 0;
				LOC6 = (t.data->data[h].Field0 == hc);
				if (!(LOC6)) goto LA7;
				LOC6 = HEX3DHEX3D_352712((&t.data->data[h].Field1), key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_172404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_353996)(Table350410* t, Keyvaluepairseq350413** data, Indexentry350397* key, TY353507* val, NI hc, NI h) {
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	NimStringDesc* LOC3;
	NimStringDesc* LOC4;
	LOC1 = 0;
	LOC1 = (*data)->data[h].Field1.keyword; (*data)->data[h].Field1.keyword = copyStringRC1((*key).keyword);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	LOC2 = 0;
	LOC2 = (*data)->data[h].Field1.link; (*data)->data[h].Field1.link = copyStringRC1((*key).link);
	if (LOC2) nimGCunrefNoCycle(LOC2);
	LOC3 = 0;
	LOC3 = (*data)->data[h].Field1.linktitle; (*data)->data[h].Field1.linktitle = copyStringRC1((*key).linktitle);
	if (LOC3) nimGCunrefNoCycle(LOC3);
	LOC4 = 0;
	LOC4 = (*data)->data[h].Field1.linkdesc; (*data)->data[h].Field1.linkdesc = copyStringRC1((*key).linkdesc);
	if (LOC4) nimGCunrefNoCycle(LOC4);
	genericSeqAssign((&(*data)->data[h].Field2), val, (&NTI353507));
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_353908)(Table350410* t) {
	Keyvaluepairseq350413* n;
	Keyvaluepairseq350413* LOC1;
	n = 0;
	n = (Keyvaluepairseq350413*) newSeq((&NTI350413), ((NI) ((NI)(((*t).data ? (*t).data->Sup.len : 0) * ((NI) 2)))));
	LOC1 = 0;
	LOC1 = (*t).data;
	unsureAsgnRef((void**) (&(*t).data), n);
	n = LOC1;
	{
		NI i_353960;
		NI HEX3Atmp_354022;
		NI res_354025;
		i_353960 = 0;
		HEX3Atmp_354022 = 0;
		HEX3Atmp_354022 = (n ? (n->Sup.len-1) : -1);
		res_354025 = ((NI) 0);
		{
			while (1) {
				if (!(res_354025 <= HEX3Atmp_354022)) goto LA4;
				i_353960 = res_354025;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_172281(n->data[i_353960].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_353962((*t), (&n->data[i_353960].Field1), n->data[i_353960].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_353996(t, (&(*t).data), (&n->data[i_353960].Field1), n->data[i_353960].Field2, n->data[i_353960].Field0, j);
				}
				LA8: ;
				res_354025 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_353872)(Table350410* t, Indexentry350397* key, TY353507* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_352698((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		genericSeqAssign((&(*t).data->data[index].Field2), val, (&NTI353507));
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_172289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_353908(t);
			index = rawgetknownhc_353962((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_353996(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(TY353507*, getordefault_352683)(Table350410 t, Indexentry350397* key) {
	TY353507* result;
	NI hc_352694;
	NI index_352696;
	result = 0;
	hc_352694 = 0;
	index_352696 = rawget_352698(t, key, (&hc_352694));
	{
		if (!(((NI) 0) <= index_352696)) goto LA3;
		genericSeqAssign((&result), t.data->data[index_352696].Field2, (&NTI353507));
	}
	LA3: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_tablesInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_tablesDatInit000)(void) {
static TNimNode* TMP147[3];
static TNimNode* TMP151[2];
static TNimNode* TMP912[2];
static TNimNode* TMP913[3];
static TNimNode* TMP2544[3];
static TNimNode* TMP3042[3];
static TNimNode* TMP5017[2];
static TNimNode* TMP5171[3];
static TNimNode TMP57[29];
NTI192458.size = sizeof(Keyvaluepair192458);
NTI192458.kind = 18;
NTI192458.base = 0;
NTI192458.flags = 2;
TMP147[0] = &TMP57[1];
TMP57[1].kind = 1;
TMP57[1].offset = offsetof(Keyvaluepair192458, Field0);
TMP57[1].typ = (&NTI145005);
TMP57[1].name = "Field0";
TMP147[1] = &TMP57[2];
TMP57[2].kind = 1;
TMP57[2].offset = offsetof(Keyvaluepair192458, Field1);
TMP57[2].typ = (&NTI149);
TMP57[2].name = "Field1";
TMP147[2] = &TMP57[3];
TMP57[3].kind = 1;
TMP57[3].offset = offsetof(Keyvaluepair192458, Field2);
TMP57[3].typ = (&NTI114);
TMP57[3].name = "Field2";
TMP57[0].len = 3; TMP57[0].kind = 2; TMP57[0].sons = &TMP147[0];
NTI192458.node = &TMP57[0];
NTI192455.size = sizeof(Keyvaluepairseq192455*);
NTI192455.kind = 24;
NTI192455.base = (&NTI192458);
NTI192455.flags = 2;
NTI192455.marker = TMP148;
NTI192452.size = sizeof(Table192452);
NTI192452.kind = 18;
NTI192452.base = 0;
NTI192452.flags = 2;
TMP151[0] = &TMP57[5];
TMP57[5].kind = 1;
TMP57[5].offset = offsetof(Table192452, data);
TMP57[5].typ = (&NTI192455);
TMP57[5].name = "data";
TMP151[1] = &TMP57[6];
TMP57[6].kind = 1;
TMP57[6].offset = offsetof(Table192452, counter);
TMP57[6].typ = (&NTI108);
TMP57[6].name = "counter";
TMP57[4].len = 2; TMP57[4].kind = 2; TMP57[4].sons = &TMP151[0];
NTI192452.node = &TMP57[4];
NTI270063.size = sizeof(Table270063);
NTI270063.kind = 18;
NTI270063.base = 0;
NTI270063.flags = 2;
TMP912[0] = &TMP57[8];
NTI270069.size = sizeof(Keyvaluepair270069);
NTI270069.kind = 18;
NTI270069.base = 0;
NTI270069.flags = 2;
TMP913[0] = &TMP57[10];
TMP57[10].kind = 1;
TMP57[10].offset = offsetof(Keyvaluepair270069, Field0);
TMP57[10].typ = (&NTI145005);
TMP57[10].name = "Field0";
TMP913[1] = &TMP57[11];
TMP57[11].kind = 1;
TMP57[11].offset = offsetof(Keyvaluepair270069, Field1);
TMP57[11].typ = (&NTI108);
TMP57[11].name = "Field1";
TMP913[2] = &TMP57[12];
TMP57[12].kind = 1;
TMP57[12].offset = offsetof(Keyvaluepair270069, Field2);
TMP57[12].typ = (&NTI227807);
TMP57[12].name = "Field2";
TMP57[9].len = 3; TMP57[9].kind = 2; TMP57[9].sons = &TMP913[0];
NTI270069.node = &TMP57[9];
NTI270066.size = sizeof(Keyvaluepairseq270066*);
NTI270066.kind = 24;
NTI270066.base = (&NTI270069);
NTI270066.flags = 2;
NTI270066.marker = TMP914;
TMP57[8].kind = 1;
TMP57[8].offset = offsetof(Table270063, data);
TMP57[8].typ = (&NTI270066);
TMP57[8].name = "data";
TMP912[1] = &TMP57[13];
TMP57[13].kind = 1;
TMP57[13].offset = offsetof(Table270063, counter);
TMP57[13].typ = (&NTI108);
TMP57[13].name = "counter";
TMP57[7].len = 2; TMP57[7].kind = 2; TMP57[7].sons = &TMP912[0];
NTI270063.node = &TMP57[7];
NTI349059.size = sizeof(Keyvaluepair349059);
NTI349059.kind = 18;
NTI349059.base = 0;
NTI349059.flags = 2;
TMP2544[0] = &TMP57[15];
TMP57[15].kind = 1;
TMP57[15].offset = offsetof(Keyvaluepair349059, Field0);
TMP57[15].typ = (&NTI145005);
TMP57[15].name = "Field0";
TMP2544[1] = &TMP57[16];
TMP57[16].kind = 1;
TMP57[16].offset = offsetof(Keyvaluepair349059, Field1);
TMP57[16].typ = (&NTI149);
TMP57[16].name = "Field1";
TMP2544[2] = &TMP57[17];
TMP57[17].kind = 1;
TMP57[17].offset = offsetof(Keyvaluepair349059, Field2);
TMP57[17].typ = (&NTI108);
TMP57[17].name = "Field2";
TMP57[14].len = 3; TMP57[14].kind = 2; TMP57[14].sons = &TMP2544[0];
NTI349059.node = &TMP57[14];
NTI349056.size = sizeof(Keyvaluepairseq349056*);
NTI349056.kind = 24;
NTI349056.base = (&NTI349059);
NTI349056.flags = 2;
NTI349056.marker = TMP2545;
NTI431656.size = sizeof(Keyvaluepair431656);
NTI431656.kind = 18;
NTI431656.base = 0;
NTI431656.flags = 2;
TMP3042[0] = &TMP57[19];
TMP57[19].kind = 1;
TMP57[19].offset = offsetof(Keyvaluepair431656, Field0);
TMP57[19].typ = (&NTI145005);
TMP57[19].name = "Field0";
TMP3042[1] = &TMP57[20];
TMP57[20].kind = 1;
TMP57[20].offset = offsetof(Keyvaluepair431656, Field1);
TMP57[20].typ = (&NTI8112);
TMP57[20].name = "Field1";
TMP3042[2] = &TMP57[21];
TMP57[21].kind = 1;
TMP57[21].offset = offsetof(Keyvaluepair431656, Field2);
TMP57[21].typ = (&NTI227801);
TMP57[21].name = "Field2";
TMP57[18].len = 3; TMP57[18].kind = 2; TMP57[18].sons = &TMP3042[0];
NTI431656.node = &TMP57[18];
NTI431653.size = sizeof(Keyvaluepairseq431653*);
NTI431653.kind = 24;
NTI431653.base = (&NTI431656);
NTI431653.flags = 2;
NTI431653.marker = TMP3043;
NTI349053.size = sizeof(Table349053);
NTI349053.kind = 18;
NTI349053.base = 0;
NTI349053.flags = 2;
TMP5017[0] = &TMP57[23];
TMP57[23].kind = 1;
TMP57[23].offset = offsetof(Table349053, data);
TMP57[23].typ = (&NTI349056);
TMP57[23].name = "data";
TMP5017[1] = &TMP57[24];
TMP57[24].kind = 1;
TMP57[24].offset = offsetof(Table349053, counter);
TMP57[24].typ = (&NTI108);
TMP57[24].name = "counter";
TMP57[22].len = 2; TMP57[22].kind = 2; TMP57[22].sons = &TMP5017[0];
NTI349053.node = &TMP57[22];
NTI350416.size = sizeof(Keyvaluepair350416);
NTI350416.kind = 18;
NTI350416.base = 0;
NTI350416.flags = 2;
TMP5171[0] = &TMP57[26];
TMP57[26].kind = 1;
TMP57[26].offset = offsetof(Keyvaluepair350416, Field0);
TMP57[26].typ = (&NTI145005);
TMP57[26].name = "Field0";
TMP5171[1] = &TMP57[27];
TMP57[27].kind = 1;
TMP57[27].offset = offsetof(Keyvaluepair350416, Field1);
TMP57[27].typ = (&NTI350397);
TMP57[27].name = "Field1";
TMP5171[2] = &TMP57[28];
TMP57[28].kind = 1;
TMP57[28].offset = offsetof(Keyvaluepair350416, Field2);
TMP57[28].typ = (&NTI353507);
TMP57[28].name = "Field2";
TMP57[25].len = 3; TMP57[25].kind = 2; TMP57[25].sons = &TMP5171[0];
NTI350416.node = &TMP57[25];
NTI350413.size = sizeof(Keyvaluepairseq350413*);
NTI350413.kind = 24;
NTI350413.base = (&NTI350416);
NTI350413.flags = 2;
NTI350413.marker = TMP5174;
}

