/* Generated by Nim Compiler v0.12.0 */
/*   (c) 2015 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32

#include "nimbase.h"
#include <string.h>
typedef struct Table190452 Table190452;
typedef struct Keyvaluepairseq190455 Keyvaluepairseq190455;
typedef struct Keyvaluepair190458 Keyvaluepair190458;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Table268063 Table268063;
typedef struct Keyvaluepairseq268066 Keyvaluepairseq268066;
typedef struct Keyvaluepair268069 Keyvaluepair268069;
typedef struct Tsym225841 Tsym225841;
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 Memregion30890 Memregion30890;
typedef struct Smallchunk30842 Smallchunk30842;
typedef struct Llchunk30884 Llchunk30884;
typedef struct Bigchunk30844 Bigchunk30844;
typedef struct Intset30817 Intset30817;
typedef struct Trunk30813 Trunk30813;
typedef struct Avlnode30888 Avlnode30888;
typedef struct Gcstat51014 Gcstat51014;
typedef struct Keyerror4051 Keyerror4051;
typedef struct Valueerror4049 Valueerror4049;
typedef struct Exception Exception;
typedef struct TNimObject TNimObject;
typedef struct Table347053 Table347053;
typedef struct Keyvaluepairseq347056 Keyvaluepairseq347056;
typedef struct Keyvaluepair347059 Keyvaluepair347059;
typedef struct Table429650 Table429650;
typedef struct Keyvaluepairseq429653 Keyvaluepairseq429653;
typedef struct Keyvaluepair429656 Keyvaluepair429656;
typedef struct Tnode225809 Tnode225809;
typedef struct Table348410 Table348410;
typedef struct Keyvaluepairseq348413 Keyvaluepairseq348413;
typedef struct Keyvaluepair348416 Keyvaluepair348416;
typedef struct Indexentry348397 Indexentry348397;
typedef struct TY351507 TY351507;
typedef struct Tidobj198015 Tidobj198015;
typedef struct Ttypeseq225843 Ttypeseq225843;
typedef struct Tscope225835 Tscope225835;
typedef struct TY225944 TY225944;
typedef struct Tstrtable225813 Tstrtable225813;
typedef struct Tsymseq225811 Tsymseq225811;
typedef struct Ttype225847 Ttype225847;
typedef struct Tident198021 Tident198021;
typedef struct Tlineinfo190352 Tlineinfo190352;
typedef struct Tloc225823 Tloc225823;
typedef struct Ropeobj176009 Ropeobj176009;
typedef struct Tlib225827 Tlib225827;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tnodeseq225803 Tnodeseq225803;
typedef struct Tinstantiation225831 Tinstantiation225831;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct TY225932 TY225932;
struct  Table190452  {
Keyvaluepairseq190455* data;
NI counter;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct Keyvaluepair190458 {
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  Table268063  {
Keyvaluepairseq268066* data;
NI counter;
};
struct Keyvaluepair268069 {
NI Field0;
NI Field1;
Tsym225841* 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 Smallchunk30842* TY30905[512];
typedef Trunk30813* Trunkbuckets30815[256];
struct  Intset30817  {
Trunkbuckets30815 data;
};
struct  Memregion30890  {
NI minlargeobj;
NI maxlargeobj;
TY30905 freesmallchunks;
Llchunk30884* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Bigchunk30844* freechunkslist;
Intset30817 chunkstarts;
Avlnode30888* root;
Avlnode30888* deleted;
Avlnode30888* last;
Avlnode30888* freeavlnodes;
};
struct  Gcstat51014  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Gcheap51018  {
Gcstack51016* stack;
void* stackbottom;
NI cyclethreshold;
Cellseq48962 zct;
Cellseq48962 decstack;
Cellset48958 cycleroots;
Cellseq48962 tempstack;
NI recgclock;
Memregion30890 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  Table347053  {
Keyvaluepairseq347056* data;
NI counter;
};
struct Keyvaluepair347059 {
NI Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  Table429650  {
Keyvaluepairseq429653* data;
NI counter;
};
struct Keyvaluepair429656 {
NI Field0;
NI64 Field1;
Tnode225809* Field2;
};
struct  Table348410  {
Keyvaluepairseq348413* data;
NI counter;
};
struct  Indexentry348397  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct Keyvaluepair348416 {
NI Field0;
Indexentry348397 Field1;
TY351507* Field2;
};
struct  Tidobj198015  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable225813  {
NI counter;
Tsymseq225811* data;
};
struct  Tlineinfo190352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc225823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype225847* t;
Ropeobj176009* r;
Ropeobj176009* heaproot;
};
struct  Tsym225841  {
  Tidobj198015 Sup;
NU8 kind;
union{
struct {Ttypeseq225843* typeinstcache;
Tscope225835* typscope;
} S1;
struct {TY225944* procinstcache;
Tsym225841* gcunsafetyreason;
} S2;
struct {TY225944* usedgenerics;
Tstrtable225813 tab;
} S3;
struct {Tsym225841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype225847* typ;
Tident198021* name;
Tlineinfo190352 info;
Tsym225841* owner;
NU32 flags;
Tnode225809* ast;
NU32 options;
NI position;
NI offset;
Tloc225823 loc;
Tlib225827* annex;
Tnode225809* constraint;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48954  {
Pagedesc48954* next;
NI key;
TY30821 bits;
};
struct  Basechunk30840  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Smallchunk30842  {
  Basechunk30840 Sup;
Smallchunk30842* next;
Smallchunk30842* prev;
Freecell30832* freelist;
NI free;
NI acc;
NF data;
};
struct  Llchunk30884  {
NI size;
NI acc;
Llchunk30884* next;
};
struct  Bigchunk30844  {
  Basechunk30840 Sup;
Bigchunk30844* next;
Bigchunk30844* prev;
NI align;
NF data;
};
struct  Trunk30813  {
Trunk30813* next;
NI key;
TY30821 bits;
};
typedef Avlnode30888* TY30895[2];
struct  Avlnode30888  {
TY30895 link;
NI key;
NI upperbound;
NI level;
};
struct  Tnode225809  {
Ttype225847* typ;
Tlineinfo190352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym225841* sym;
} S4;
struct {Tident198021* ident;
} S5;
struct {Tnodeseq225803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tscope225835  {
NI depthlevel;
Tstrtable225813 symbols;
Tnodeseq225803* usingsyms;
Tscope225835* parent;
};
struct  Ttype225847  {
  Tidobj198015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq225843* sons;
Tnode225809* n;
Tsym225841* owner;
Tsym225841* sym;
Tsym225841* destructor;
Tsym225841* deepcopy;
Tsym225841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc225823 loc;
};
struct  Tident198021  {
  Tidobj198015 Sup;
NimStringDesc* s;
Tident198021* next;
NI h;
};
struct  Ropeobj176009  {
  TNimObject Sup;
Ropeobj176009* left;
Ropeobj176009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry140022  {
  TNimObject Sup;
Tlistentry140022* prev;
Tlistentry140022* next;
};
struct  Tlib225827  {
  Tlistentry140022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj176009* name;
Tnode225809* path;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct  Tinstantiation225831  {
Tsym225841* sym;
Ttypeseq225843* concretetypes;
TY225932* usedby;
NI compilesid;
};
struct Keyvaluepairseq190455 {
  TGenericSeq Sup;
  Keyvaluepair190458 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq268066 {
  TGenericSeq Sup;
  Keyvaluepair268069 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq347056 {
  TGenericSeq Sup;
  Keyvaluepair347059 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq429653 {
  TGenericSeq Sup;
  Keyvaluepair429656 data[SEQ_DECL_SIZE];
};
struct TY351507 {
  TGenericSeq Sup;
  Indexentry348397 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq348413 {
  TGenericSeq Sup;
  Keyvaluepair348416 data[SEQ_DECL_SIZE];
};
struct Ttypeseq225843 {
  TGenericSeq Sup;
  Ttype225847* data[SEQ_DECL_SIZE];
};
struct TY225944 {
  TGenericSeq Sup;
  Tinstantiation225831* data[SEQ_DECL_SIZE];
};
struct Tsymseq225811 {
  TGenericSeq Sup;
  Tsym225841* data[SEQ_DECL_SIZE];
};
struct Tnodeseq225803 {
  TGenericSeq Sup;
  Tnode225809* data[SEQ_DECL_SIZE];
};
struct TY225932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP141)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, TMP909)(void* p, NI op);
static N_INLINE(NI, rawget_268752)(Table268063 t, NI key, NI* hc);
static N_INLINE(NI, hash_142801)(NI x);
static N_INLINE(NIM_BOOL, isfilled_170281)(NI hcode);
static N_INLINE(NI, nexttry_170404)(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_170289)(NI length, NI counter);
N_NIMCALL(void, enlarge_268840)(Table268063* t);
static N_INLINE(NI, rawgetknownhc_268894)(Table268063 t, NI key, NI hc);
N_NIMCALL(void, rawinsert_268919)(Table268063* t, Keyvaluepairseq268066** data, NI key, Tsym225841* val, NI hc, NI h);
static N_INLINE(NI, rawget_190754)(Table190452 t, NimStringDesc* key, NI* hc);
N_NIMCALL(NI, hash_142848)(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_191074)(Table190452* t);
static N_INLINE(NI, rawgetknownhc_191128)(Table190452 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_191153)(Table190452* t, Keyvaluepairseq190455** 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_348088)(Table347053 t, NimStringDesc* key, NI* hc);
N_NIMCALL(void, enlarge_348188)(Table347053* t);
N_NIMCALL(void, TMP2543)(void* p, NI op);
static N_INLINE(NI, rawgetknownhc_348242)(Table347053 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_348267)(Table347053* t, Keyvaluepairseq347056** data, NimStringDesc* key, NI val, NI hc, NI h);
N_NIMCALL(void, TMP3044)(void* p, NI op);
static N_INLINE(NI, rawget_430113)(Table429650 t, NI64 key, NI* hc);
static N_INLINE(NI, hash_142811)(NI64 x);
N_NIMCALL(void, enlarge_430198)(Table429650* t);
static N_INLINE(NI, rawgetknownhc_430252)(Table429650 t, NI64 key, NI hc);
N_NIMCALL(void, rawinsert_430277)(Table429650* t, Keyvaluepairseq429653** data, NI64 key, Tnode225809* val, NI hc, NI h);
N_NIMCALL(void, TMP5176)(void* p, NI op);
static N_INLINE(NI, rawget_350698)(Table348410 t, Indexentry348397 key, NI* hc);
N_NIMCALL(NI, hash_348447)(Indexentry348397 x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_350712)(Indexentry348397 x, Indexentry348397 y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_85804, TNimType* mt);
N_NIMCALL(void, enlarge_351908)(Table348410* t);
static N_INLINE(NI, rawgetknownhc_351962)(Table348410 t, Indexentry348397 key, NI hc);
N_NIMCALL(void, rawinsert_351996)(Table348410* t, Keyvaluepairseq348413** data, Indexentry348397 key, TY351507* val, NI hc, NI h);
STRING_LITERAL(TMP1195, "key not found: ", 15);
TNimType NTI190458; /* KeyValuePair */
extern TNimType NTI142005; /* Hash */
extern TNimType NTI149; /* string */
extern TNimType NTI114; /* int32 */
TNimType NTI190455; /* KeyValuePairSeq */
TNimType NTI190452; /* Table */
extern TNimType NTI108; /* int */
TNimType NTI268063; /* Table */
TNimType NTI268069; /* KeyValuePair */
extern TNimType NTI225807; /* PSym */
TNimType NTI268066; /* KeyValuePairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI191004; /* ref KeyError */
extern TNimType NTI4051; /* KeyError */
TNimType NTI347059; /* KeyValuePair */
TNimType NTI347056; /* KeyValuePairSeq */
TNimType NTI429656; /* KeyValuePair */
extern TNimType NTI8112; /* BiggestInt */
extern TNimType NTI225801; /* PNode */
TNimType NTI429653; /* KeyValuePairSeq */
TNimType NTI347053; /* Table */
TNimType NTI348416; /* KeyValuePair */
extern TNimType NTI348397; /* IndexEntry */
extern TNimType NTI351507; /* seq[IndexEntry] */
TNimType NTI348413; /* KeyValuePairSeq */
N_NIMCALL(void, TMP141)(void* p, NI op) {
	Keyvaluepairseq190455* a;
	NI LOC1;
	a = (Keyvaluepairseq190455*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

N_NIMCALL(void, inittable_190444)(NI initialsize, Table190452* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq190455*) newSeq((&NTI190455), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP909)(void* p, NI op) {
	Keyvaluepairseq268066* a;
	NI LOC1;
	a = (Keyvaluepairseq268066*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

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

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

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

static N_INLINE(NI, rawget_268752)(Table268063 t, NI key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_142801(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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym225841*, getordefault_268737)(Table268063 t, NI key) {
	Tsym225841* result;
	NI hc_268748;
	NI index_268750;
	result = 0;
	hc_268748 = 0;
	index_268750 = rawget_268752(t, key, (&hc_268748));
	{
		if (!(((NI) 0) <= index_268750)) goto LA3;
		result = t.data->data[index_268750].Field2;
	}
	LA3: ;
	return result;
}

static N_INLINE(Cell48946*, usrtocell_52646)(void* usr) {
	Cell48946* result;
	result = 0;
	result = ((Cell48946*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_54204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

static N_INLINE(NIM_BOOL, mustrehash_170289)(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_268894)(Table268063 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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_268919)(Table268063* t, Keyvaluepairseq268066** data, NI key, Tsym225841* 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_268840)(Table268063* t) {
	Keyvaluepairseq268066* n;
	Keyvaluepairseq268066* LOC1;
	n = 0;
	n = (Keyvaluepairseq268066*) newSeq((&NTI268066), ((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_268892;
		NI HEX3Atmp_268945;
		NI res_268948;
		i_268892 = 0;
		HEX3Atmp_268945 = 0;
		HEX3Atmp_268945 = (n ? (n->Sup.len-1) : -1);
		res_268948 = ((NI) 0);
		{
			while (1) {
				if (!(res_268948 <= HEX3Atmp_268945)) goto LA4;
				i_268892 = res_268948;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_170281(n->data[i_268892].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_268894((*t), n->data[i_268892].Field1, n->data[i_268892].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_268919(t, (&(*t).data), n->data[i_268892].Field1, n->data[i_268892].Field2, n->data[i_268892].Field0, j);
				}
				LA8: ;
				res_268948 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_268804)(Table268063* t, NI key, Tsym225841* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_268752((*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_170289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_268840(t);
			index = rawgetknownhc_268894((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_268919(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_190754)(Table190452 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_142848(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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_190742)(Table190452 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_190754(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_190786)(Table190452* t, NimStringDesc* key) {
	NI32* result;
	NI hc_190799;
	NI index_190801;
	result = 0;
	hc_190799 = 0;
	index_190801 = rawget_190754((*t), key, (&hc_190799));
	{
		if (!(((NI) 0) <= index_190801)) goto LA3;
		result = (&(*t).data->data[index_190801].Field2);
	}
	goto LA1;
	LA3: ;
	{
		Keyerror4051* e_191003;
		NimStringDesc* LOC6;
		e_191003 = 0;
		e_191003 = (Keyerror4051*) newObj((&NTI191004), sizeof(Keyerror4051));
		(*e_191003).Sup.Sup.Sup.m_type = (&NTI4051);
		LOC6 = 0;
		LOC6 = rawNewString(key->Sup.len + 15);
appendString(LOC6, ((NimStringDesc*) &TMP1195));
appendString(LOC6, key);
		asgnRefNoCycle((void**) (&(*e_191003).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_191003, "KeyError");
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_191128)(Table190452 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_170281(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_170404(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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_54204(c);
	}
	LA3: ;
}

N_NIMCALL(void, rawinsert_191153)(Table190452* t, Keyvaluepairseq190455** 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_191074)(Table190452* t) {
	Keyvaluepairseq190455* n;
	Keyvaluepairseq190455* LOC1;
	n = 0;
	n = (Keyvaluepairseq190455*) newSeq((&NTI190455), ((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_191126;
		NI HEX3Atmp_191179;
		NI res_191182;
		i_191126 = 0;
		HEX3Atmp_191179 = 0;
		HEX3Atmp_191179 = (n ? (n->Sup.len-1) : -1);
		res_191182 = ((NI) 0);
		{
			while (1) {
				if (!(res_191182 <= HEX3Atmp_191179)) goto LA4;
				i_191126 = res_191182;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_170281(n->data[i_191126].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_191128((*t), n->data[i_191126].Field1, n->data[i_191126].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_191153(t, (&(*t).data), n->data[i_191126].Field1, n->data[i_191126].Field2, n->data[i_191126].Field0, j);
				}
				LA8: ;
				res_191182 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_191038)(Table190452* t, NimStringDesc* key, NI32 val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_190754((*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_170289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_191074(t);
			index = rawgetknownhc_191128((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_191153(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_270032)(NI initialsize, Table268063* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq268066*) newSeq((&NTI268066), ((NI) (initialsize))));
}

static N_INLINE(NI, rawget_348088)(Table347053 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_142848(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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_348076)(Table347053 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_348088(t, key, (&hc));
	result = (((NI) 0) <= LOC1);
	return result;
}
N_NIMCALL(void, TMP2543)(void* p, NI op) {
	Keyvaluepairseq347056* a;
	NI LOC1;
	a = (Keyvaluepairseq347056*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NI, rawgetknownhc_348242)(Table347053 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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_348267)(Table347053* t, Keyvaluepairseq347056** 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_348188)(Table347053* t) {
	Keyvaluepairseq347056* n;
	Keyvaluepairseq347056* LOC1;
	n = 0;
	n = (Keyvaluepairseq347056*) newSeq((&NTI347056), ((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_348240;
		NI HEX3Atmp_348293;
		NI res_348296;
		i_348240 = 0;
		HEX3Atmp_348293 = 0;
		HEX3Atmp_348293 = (n ? (n->Sup.len-1) : -1);
		res_348296 = ((NI) 0);
		{
			while (1) {
				if (!(res_348296 <= HEX3Atmp_348293)) goto LA4;
				i_348240 = res_348296;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_170281(n->data[i_348240].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_348242((*t), n->data[i_348240].Field1, n->data[i_348240].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_348267(t, (&(*t).data), n->data[i_348240].Field1, n->data[i_348240].Field2, n->data[i_348240].Field0, j);
				}
				LA8: ;
				res_348296 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_348152)(Table347053* t, NimStringDesc* key, NI val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_348088((*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_170289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_348188(t);
			index = rawgetknownhc_348242((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_348267(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(NI, getordefault_348120)(Table347053 t, NimStringDesc* key) {
	NI result;
	NI hc_348131;
	NI index_348133;
	result = 0;
	hc_348131 = 0;
	index_348133 = rawget_348088(t, key, (&hc_348131));
	{
		if (!(((NI) 0) <= index_348133)) goto LA3;
		result = t.data->data[index_348133].Field2;
	}
	LA3: ;
	return result;
}
N_NIMCALL(void, TMP3044)(void* p, NI op) {
	Keyvaluepairseq429653* a;
	NI LOC1;
	a = (Keyvaluepairseq429653*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

N_NIMCALL(void, inittable_430467)(NI initialsize, Table429650* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq429653*) newSeq((&NTI429653), ((NI) (initialsize))));
}

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

static N_INLINE(NI, rawget_430113)(Table429650 t, NI64 key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_142811(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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode225809*, getordefault_430098)(Table429650 t, NI64 key) {
	Tnode225809* result;
	NI hc_430109;
	NI index_430111;
	result = 0;
	hc_430109 = 0;
	index_430111 = rawget_430113(t, key, (&hc_430109));
	{
		if (!(((NI) 0) <= index_430111)) goto LA3;
		result = t.data->data[index_430111].Field2;
	}
	LA3: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_430252)(Table429650 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_170281(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_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_430277)(Table429650* t, Keyvaluepairseq429653** data, NI64 key, Tnode225809* 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_430198)(Table429650* t) {
	Keyvaluepairseq429653* n;
	Keyvaluepairseq429653* LOC1;
	n = 0;
	n = (Keyvaluepairseq429653*) newSeq((&NTI429653), ((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_430250;
		NI HEX3Atmp_430303;
		NI res_430306;
		i_430250 = 0;
		HEX3Atmp_430303 = 0;
		HEX3Atmp_430303 = (n ? (n->Sup.len-1) : -1);
		res_430306 = ((NI) 0);
		{
			while (1) {
				if (!(res_430306 <= HEX3Atmp_430303)) goto LA4;
				i_430250 = res_430306;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_170281(n->data[i_430250].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_430252((*t), n->data[i_430250].Field1, n->data[i_430250].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_430277(t, (&(*t).data), n->data[i_430250].Field1, n->data[i_430250].Field2, n->data[i_430250].Field0, j);
				}
				LA8: ;
				res_430306 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_430162)(Table429650* t, NI64 key, Tnode225809* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_430113((*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_170289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_430198(t);
			index = rawgetknownhc_430252((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_430277(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_347124)(NI initialsize, Table347053* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq347056*) newSeq((&NTI347056), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP5176)(void* p, NI op) {
	Keyvaluepairseq348413* a;
	NI LOC1;
	a = (Keyvaluepairseq348413*)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_351529)(NI initialsize, Table348410* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq348413*) newSeq((&NTI348413), ((NI) (initialsize))));
}

N_NIMCALL(NI, len_351860)(Table348410 t) {
	NI result;
	result = 0;
	result = t.counter;
	return result;
}

static N_INLINE(NI, rawget_350698)(Table348410 t, Indexentry348397 key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_348447(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_170281(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_350712(t.data->data[h].Field1, key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_351962)(Table348410 t, Indexentry348397 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_170281(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_350712(t.data->data[h].Field1, key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_170404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_351996)(Table348410* t, Keyvaluepairseq348413** data, Indexentry348397 key, TY351507* 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, (&NTI351507));
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_351908)(Table348410* t) {
	Keyvaluepairseq348413* n;
	Keyvaluepairseq348413* LOC1;
	n = 0;
	n = (Keyvaluepairseq348413*) newSeq((&NTI348413), ((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_351960;
		NI HEX3Atmp_352022;
		NI res_352025;
		i_351960 = 0;
		HEX3Atmp_352022 = 0;
		HEX3Atmp_352022 = (n ? (n->Sup.len-1) : -1);
		res_352025 = ((NI) 0);
		{
			while (1) {
				if (!(res_352025 <= HEX3Atmp_352022)) goto LA4;
				i_351960 = res_352025;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_170281(n->data[i_351960].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_351962((*t), n->data[i_351960].Field1, n->data[i_351960].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_351996(t, (&(*t).data), n->data[i_351960].Field1, n->data[i_351960].Field2, n->data[i_351960].Field0, j);
				}
				LA8: ;
				res_352025 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_351872)(Table348410* t, Indexentry348397 key, TY351507* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_350698((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		genericSeqAssign((&(*t).data->data[index].Field2), val, (&NTI351507));
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_170289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_351908(t);
			index = rawgetknownhc_351962((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_351996(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(TY351507*, getordefault_350683)(Table348410 t, Indexentry348397 key) {
	TY351507* result;
	NI hc_350694;
	NI index_350696;
	result = 0;
	hc_350694 = 0;
	index_350696 = rawget_350698(t, key, (&hc_350694));
	{
		if (!(((NI) 0) <= index_350696)) goto LA3;
		genericSeqAssign((&result), t.data->data[index_350696].Field2, (&NTI351507));
	}
	LA3: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_tablesInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_tablesDatInit000)(void) {
static TNimNode* TMP140[3];
static TNimNode* TMP144[2];
static TNimNode* TMP907[2];
static TNimNode* TMP908[3];
static TNimNode* TMP2542[3];
static TNimNode* TMP3043[3];
static TNimNode* TMP5019[2];
static TNimNode* TMP5173[3];
static TNimNode TMP57[29];
NTI190458.size = sizeof(Keyvaluepair190458);
NTI190458.kind = 18;
NTI190458.base = 0;
NTI190458.flags = 2;
TMP140[0] = &TMP57[1];
TMP57[1].kind = 1;
TMP57[1].offset = offsetof(Keyvaluepair190458, Field0);
TMP57[1].typ = (&NTI142005);
TMP57[1].name = "Field0";
TMP140[1] = &TMP57[2];
TMP57[2].kind = 1;
TMP57[2].offset = offsetof(Keyvaluepair190458, Field1);
TMP57[2].typ = (&NTI149);
TMP57[2].name = "Field1";
TMP140[2] = &TMP57[3];
TMP57[3].kind = 1;
TMP57[3].offset = offsetof(Keyvaluepair190458, Field2);
TMP57[3].typ = (&NTI114);
TMP57[3].name = "Field2";
TMP57[0].len = 3; TMP57[0].kind = 2; TMP57[0].sons = &TMP140[0];
NTI190458.node = &TMP57[0];
NTI190455.size = sizeof(Keyvaluepairseq190455*);
NTI190455.kind = 24;
NTI190455.base = (&NTI190458);
NTI190455.flags = 2;
NTI190455.marker = TMP141;
NTI190452.size = sizeof(Table190452);
NTI190452.kind = 18;
NTI190452.base = 0;
NTI190452.flags = 2;
TMP144[0] = &TMP57[5];
TMP57[5].kind = 1;
TMP57[5].offset = offsetof(Table190452, data);
TMP57[5].typ = (&NTI190455);
TMP57[5].name = "data";
TMP144[1] = &TMP57[6];
TMP57[6].kind = 1;
TMP57[6].offset = offsetof(Table190452, counter);
TMP57[6].typ = (&NTI108);
TMP57[6].name = "counter";
TMP57[4].len = 2; TMP57[4].kind = 2; TMP57[4].sons = &TMP144[0];
NTI190452.node = &TMP57[4];
NTI268063.size = sizeof(Table268063);
NTI268063.kind = 18;
NTI268063.base = 0;
NTI268063.flags = 2;
TMP907[0] = &TMP57[8];
NTI268069.size = sizeof(Keyvaluepair268069);
NTI268069.kind = 18;
NTI268069.base = 0;
NTI268069.flags = 2;
TMP908[0] = &TMP57[10];
TMP57[10].kind = 1;
TMP57[10].offset = offsetof(Keyvaluepair268069, Field0);
TMP57[10].typ = (&NTI142005);
TMP57[10].name = "Field0";
TMP908[1] = &TMP57[11];
TMP57[11].kind = 1;
TMP57[11].offset = offsetof(Keyvaluepair268069, Field1);
TMP57[11].typ = (&NTI108);
TMP57[11].name = "Field1";
TMP908[2] = &TMP57[12];
TMP57[12].kind = 1;
TMP57[12].offset = offsetof(Keyvaluepair268069, Field2);
TMP57[12].typ = (&NTI225807);
TMP57[12].name = "Field2";
TMP57[9].len = 3; TMP57[9].kind = 2; TMP57[9].sons = &TMP908[0];
NTI268069.node = &TMP57[9];
NTI268066.size = sizeof(Keyvaluepairseq268066*);
NTI268066.kind = 24;
NTI268066.base = (&NTI268069);
NTI268066.flags = 2;
NTI268066.marker = TMP909;
TMP57[8].kind = 1;
TMP57[8].offset = offsetof(Table268063, data);
TMP57[8].typ = (&NTI268066);
TMP57[8].name = "data";
TMP907[1] = &TMP57[13];
TMP57[13].kind = 1;
TMP57[13].offset = offsetof(Table268063, counter);
TMP57[13].typ = (&NTI108);
TMP57[13].name = "counter";
TMP57[7].len = 2; TMP57[7].kind = 2; TMP57[7].sons = &TMP907[0];
NTI268063.node = &TMP57[7];
NTI347059.size = sizeof(Keyvaluepair347059);
NTI347059.kind = 18;
NTI347059.base = 0;
NTI347059.flags = 2;
TMP2542[0] = &TMP57[15];
TMP57[15].kind = 1;
TMP57[15].offset = offsetof(Keyvaluepair347059, Field0);
TMP57[15].typ = (&NTI142005);
TMP57[15].name = "Field0";
TMP2542[1] = &TMP57[16];
TMP57[16].kind = 1;
TMP57[16].offset = offsetof(Keyvaluepair347059, Field1);
TMP57[16].typ = (&NTI149);
TMP57[16].name = "Field1";
TMP2542[2] = &TMP57[17];
TMP57[17].kind = 1;
TMP57[17].offset = offsetof(Keyvaluepair347059, Field2);
TMP57[17].typ = (&NTI108);
TMP57[17].name = "Field2";
TMP57[14].len = 3; TMP57[14].kind = 2; TMP57[14].sons = &TMP2542[0];
NTI347059.node = &TMP57[14];
NTI347056.size = sizeof(Keyvaluepairseq347056*);
NTI347056.kind = 24;
NTI347056.base = (&NTI347059);
NTI347056.flags = 2;
NTI347056.marker = TMP2543;
NTI429656.size = sizeof(Keyvaluepair429656);
NTI429656.kind = 18;
NTI429656.base = 0;
NTI429656.flags = 2;
TMP3043[0] = &TMP57[19];
TMP57[19].kind = 1;
TMP57[19].offset = offsetof(Keyvaluepair429656, Field0);
TMP57[19].typ = (&NTI142005);
TMP57[19].name = "Field0";
TMP3043[1] = &TMP57[20];
TMP57[20].kind = 1;
TMP57[20].offset = offsetof(Keyvaluepair429656, Field1);
TMP57[20].typ = (&NTI8112);
TMP57[20].name = "Field1";
TMP3043[2] = &TMP57[21];
TMP57[21].kind = 1;
TMP57[21].offset = offsetof(Keyvaluepair429656, Field2);
TMP57[21].typ = (&NTI225801);
TMP57[21].name = "Field2";
TMP57[18].len = 3; TMP57[18].kind = 2; TMP57[18].sons = &TMP3043[0];
NTI429656.node = &TMP57[18];
NTI429653.size = sizeof(Keyvaluepairseq429653*);
NTI429653.kind = 24;
NTI429653.base = (&NTI429656);
NTI429653.flags = 2;
NTI429653.marker = TMP3044;
NTI347053.size = sizeof(Table347053);
NTI347053.kind = 18;
NTI347053.base = 0;
NTI347053.flags = 2;
TMP5019[0] = &TMP57[23];
TMP57[23].kind = 1;
TMP57[23].offset = offsetof(Table347053, data);
TMP57[23].typ = (&NTI347056);
TMP57[23].name = "data";
TMP5019[1] = &TMP57[24];
TMP57[24].kind = 1;
TMP57[24].offset = offsetof(Table347053, counter);
TMP57[24].typ = (&NTI108);
TMP57[24].name = "counter";
TMP57[22].len = 2; TMP57[22].kind = 2; TMP57[22].sons = &TMP5019[0];
NTI347053.node = &TMP57[22];
NTI348416.size = sizeof(Keyvaluepair348416);
NTI348416.kind = 18;
NTI348416.base = 0;
NTI348416.flags = 2;
TMP5173[0] = &TMP57[26];
TMP57[26].kind = 1;
TMP57[26].offset = offsetof(Keyvaluepair348416, Field0);
TMP57[26].typ = (&NTI142005);
TMP57[26].name = "Field0";
TMP5173[1] = &TMP57[27];
TMP57[27].kind = 1;
TMP57[27].offset = offsetof(Keyvaluepair348416, Field1);
TMP57[27].typ = (&NTI348397);
TMP57[27].name = "Field1";
TMP5173[2] = &TMP57[28];
TMP57[28].kind = 1;
TMP57[28].offset = offsetof(Keyvaluepair348416, Field2);
TMP57[28].typ = (&NTI351507);
TMP57[28].name = "Field2";
TMP57[25].len = 3; TMP57[25].kind = 2; TMP57[25].sons = &TMP5173[0];
NTI348416.node = &TMP57[25];
NTI348413.size = sizeof(Keyvaluepairseq348413*);
NTI348413.kind = 24;
NTI348413.base = (&NTI348416);
NTI348413.flags = 2;
NTI348413.marker = TMP5176;
}

