/* 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 Table189452 Table189452;
typedef struct Keyvaluepairseq189455 Keyvaluepairseq189455;
typedef struct Keyvaluepair189458 Keyvaluepair189458;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Table267063 Table267063;
typedef struct Keyvaluepairseq267066 Keyvaluepairseq267066;
typedef struct Keyvaluepair267069 Keyvaluepair267069;
typedef struct Tsym224841 Tsym224841;
typedef struct Cell48947 Cell48947;
typedef struct Cellseq48963 Cellseq48963;
typedef struct Gcheap51018 Gcheap51018;
typedef struct Gcstack51016 Gcstack51016;
typedef struct Cellset48959 Cellset48959;
typedef struct Pagedesc48955 Pagedesc48955;
typedef struct 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 Table346053 Table346053;
typedef struct Keyvaluepairseq346056 Keyvaluepairseq346056;
typedef struct Keyvaluepair346059 Keyvaluepair346059;
typedef struct Table428650 Table428650;
typedef struct Keyvaluepairseq428653 Keyvaluepairseq428653;
typedef struct Keyvaluepair428656 Keyvaluepair428656;
typedef struct Tnode224809 Tnode224809;
typedef struct Table347410 Table347410;
typedef struct Keyvaluepairseq347413 Keyvaluepairseq347413;
typedef struct Keyvaluepair347416 Keyvaluepair347416;
typedef struct Indexentry347397 Indexentry347397;
typedef struct TY350507 TY350507;
typedef struct Tidobj197015 Tidobj197015;
typedef struct Ttypeseq224843 Ttypeseq224843;
typedef struct Tscope224835 Tscope224835;
typedef struct TY224944 TY224944;
typedef struct Tstrtable224813 Tstrtable224813;
typedef struct Tsymseq224811 Tsymseq224811;
typedef struct Ttype224847 Ttype224847;
typedef struct Tident197021 Tident197021;
typedef struct Tlineinfo189352 Tlineinfo189352;
typedef struct Tloc224823 Tloc224823;
typedef struct Ropeobj175009 Ropeobj175009;
typedef struct Tlib224827 Tlib224827;
typedef struct Basechunk30841 Basechunk30841;
typedef struct Freecell30833 Freecell30833;
typedef struct Tnodeseq224803 Tnodeseq224803;
typedef struct Tinstantiation224831 Tinstantiation224831;
typedef struct Tlistentry140022 Tlistentry140022;
typedef struct TY224932 TY224932;
struct  Table189452  {
Keyvaluepairseq189455* data;
NI counter;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct Keyvaluepair189458 {
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  Table267063  {
Keyvaluepairseq267066* data;
NI counter;
};
struct Keyvaluepair267069 {
NI Field0;
NI Field1;
Tsym224841* Field2;
};
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  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  Table346053  {
Keyvaluepairseq346056* data;
NI counter;
};
struct Keyvaluepair346059 {
NI Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  Table428650  {
Keyvaluepairseq428653* data;
NI counter;
};
struct Keyvaluepair428656 {
NI Field0;
NI64 Field1;
Tnode224809* Field2;
};
struct  Table347410  {
Keyvaluepairseq347413* data;
NI counter;
};
struct  Indexentry347397  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct Keyvaluepair347416 {
NI Field0;
Indexentry347397 Field1;
TY350507* Field2;
};
struct  Tidobj197015  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable224813  {
NI counter;
Tsymseq224811* data;
};
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  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  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  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  Tident197021  {
  Tidobj197015 Sup;
NimStringDesc* s;
Tident197021* next;
NI h;
};
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  Freecell30833  {
Freecell30833* next;
NI zerofield;
};
struct  Tinstantiation224831  {
Tsym224841* sym;
Ttypeseq224843* concretetypes;
TY224932* usedby;
NI compilesid;
};
struct Keyvaluepairseq189455 {
  TGenericSeq Sup;
  Keyvaluepair189458 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq267066 {
  TGenericSeq Sup;
  Keyvaluepair267069 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq346056 {
  TGenericSeq Sup;
  Keyvaluepair346059 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq428653 {
  TGenericSeq Sup;
  Keyvaluepair428656 data[SEQ_DECL_SIZE];
};
struct TY350507 {
  TGenericSeq Sup;
  Indexentry347397 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq347413 {
  TGenericSeq Sup;
  Keyvaluepair347416 data[SEQ_DECL_SIZE];
};
struct Ttypeseq224843 {
  TGenericSeq Sup;
  Ttype224847* data[SEQ_DECL_SIZE];
};
struct TY224944 {
  TGenericSeq Sup;
  Tinstantiation224831* data[SEQ_DECL_SIZE];
};
struct Tsymseq224811 {
  TGenericSeq Sup;
  Tsym224841* data[SEQ_DECL_SIZE];
};
struct Tnodeseq224803 {
  TGenericSeq Sup;
  Tnode224809* data[SEQ_DECL_SIZE];
};
struct TY224932 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP139)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, TMP907)(void* p, NI op);
static N_INLINE(NI, rawget_267749)(Table267063 t, NI key, NI* hc);
static N_INLINE(NI, hash_142801)(NI x);
static N_INLINE(NIM_BOOL, isfilled_169281)(NI hcode);
static N_INLINE(NI, nexttry_169404)(NI h, NI maxhash);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(Cell48947*, usrtocell_52646)(void* usr);
static N_INLINE(void, rtladdzct_54204)(Cell48947* c);
N_NOINLINE(void, addzct_52617)(Cellseq48963* s, Cell48947* c);
static N_INLINE(NIM_BOOL, mustrehash_169289)(NI length, NI counter);
N_NIMCALL(void, enlarge_267837)(Table267063* t);
static N_INLINE(NI, rawgetknownhc_267891)(Table267063 t, NI key, NI hc);
N_NIMCALL(void, rawinsert_267916)(Table267063* t, Keyvaluepairseq267066** data, NI key, Tsym224841* val, NI hc, NI h);
static N_INLINE(NI, rawget_189754)(Table189452 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_190074)(Table189452* t);
static N_INLINE(NI, rawgetknownhc_190128)(Table189452 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_190153)(Table189452* t, Keyvaluepairseq189455** 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_347088)(Table346053 t, NimStringDesc* key, NI* hc);
N_NIMCALL(void, enlarge_347188)(Table346053* t);
N_NIMCALL(void, TMP2542)(void* p, NI op);
static N_INLINE(NI, rawgetknownhc_347242)(Table346053 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_347267)(Table346053* t, Keyvaluepairseq346056** data, NimStringDesc* key, NI val, NI hc, NI h);
N_NIMCALL(void, TMP3043)(void* p, NI op);
static N_INLINE(NI, rawget_429113)(Table428650 t, NI64 key, NI* hc);
static N_INLINE(NI, hash_142811)(NI64 x);
N_NIMCALL(void, enlarge_429198)(Table428650* t);
static N_INLINE(NI, rawgetknownhc_429252)(Table428650 t, NI64 key, NI hc);
N_NIMCALL(void, rawinsert_429277)(Table428650* t, Keyvaluepairseq428653** data, NI64 key, Tnode224809* val, NI hc, NI h);
N_NIMCALL(void, TMP5175)(void* p, NI op);
static N_INLINE(NI, rawget_349698)(Table347410 t, Indexentry347397* key, NI* hc);
N_NIMCALL(NI, hash_347447)(Indexentry347397* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_349712)(Indexentry347397* x, Indexentry347397* y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_85804, TNimType* mt);
N_NIMCALL(void, enlarge_350908)(Table347410* t);
static N_INLINE(NI, rawgetknownhc_350962)(Table347410 t, Indexentry347397* key, NI hc);
N_NIMCALL(void, rawinsert_350996)(Table347410* t, Keyvaluepairseq347413** data, Indexentry347397* key, TY350507* val, NI hc, NI h);
STRING_LITERAL(TMP1193, "key not found: ", 15);
TNimType NTI189458; /* KeyValuePair */
extern TNimType NTI142005; /* Hash */
extern TNimType NTI149; /* string */
extern TNimType NTI114; /* int32 */
TNimType NTI189455; /* KeyValuePairSeq */
TNimType NTI189452; /* Table */
extern TNimType NTI108; /* int */
TNimType NTI267063; /* Table */
TNimType NTI267069; /* KeyValuePair */
extern TNimType NTI224807; /* PSym */
TNimType NTI267066; /* KeyValuePairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI190004; /* ref KeyError */
extern TNimType NTI4051; /* KeyError */
TNimType NTI346059; /* KeyValuePair */
TNimType NTI346056; /* KeyValuePairSeq */
TNimType NTI428656; /* KeyValuePair */
extern TNimType NTI8112; /* BiggestInt */
extern TNimType NTI224801; /* PNode */
TNimType NTI428653; /* KeyValuePairSeq */
TNimType NTI346053; /* Table */
TNimType NTI347416; /* KeyValuePair */
extern TNimType NTI347397; /* IndexEntry */
extern TNimType NTI350507; /* seq[IndexEntry] */
TNimType NTI347413; /* KeyValuePairSeq */
N_NIMCALL(void, TMP139)(void* p, NI op) {
	Keyvaluepairseq189455* a;
	NI LOC1;
	a = (Keyvaluepairseq189455*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

N_NIMCALL(void, inittable_189444)(NI initialsize, Table189452* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq189455*) newSeq((&NTI189455), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP907)(void* p, NI op) {
	Keyvaluepairseq267066* a;
	NI LOC1;
	a = (Keyvaluepairseq267066*)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_169281)(NI hcode) {
	NIM_BOOL result;
	result = 0;
	result = !((hcode == ((NI) 0)));
	return result;
}

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

static N_INLINE(NI, rawget_267749)(Table267063 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym224841*, getordefault_267734)(Table267063 t, NI key) {
	Tsym224841* result;
	NI hc_267745;
	NI index_267747;
	result = 0;
	hc_267745 = 0;
	index_267747 = rawget_267749(t, key, (&hc_267745));
	{
		if (!(((NI) 0) <= index_267747)) goto LA3;
		result = t.data->data[index_267747].Field2;
	}
	LA3: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, mustrehash_169289)(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_267891)(Table267063 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_267916)(Table267063* t, Keyvaluepairseq267066** data, NI key, Tsym224841* 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_267837)(Table267063* t) {
	Keyvaluepairseq267066* n;
	Keyvaluepairseq267066* LOC1;
	n = 0;
	n = (Keyvaluepairseq267066*) newSeq((&NTI267066), ((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_267889;
		NI HEX3Atmp_267942;
		NI res_267945;
		i_267889 = 0;
		HEX3Atmp_267942 = 0;
		HEX3Atmp_267942 = (n ? (n->Sup.len-1) : -1);
		res_267945 = ((NI) 0);
		{
			while (1) {
				if (!(res_267945 <= HEX3Atmp_267942)) goto LA4;
				i_267889 = res_267945;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_169281(n->data[i_267889].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_267891((*t), n->data[i_267889].Field1, n->data[i_267889].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_267916(t, (&(*t).data), n->data[i_267889].Field1, n->data[i_267889].Field2, n->data[i_267889].Field0, j);
				}
				LA8: ;
				res_267945 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_267801)(Table267063* t, NI key, Tsym224841* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_267749((*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_169289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_267837(t);
			index = rawgetknownhc_267891((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_267916(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_189754)(Table189452 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_189742)(Table189452 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_189754(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_189786)(Table189452* t, NimStringDesc* key) {
	NI32* result;
	NI hc_189799;
	NI index_189801;
	result = 0;
	hc_189799 = 0;
	index_189801 = rawget_189754((*t), key, (&hc_189799));
	{
		if (!(((NI) 0) <= index_189801)) goto LA3;
		result = (&(*t).data->data[index_189801].Field2);
	}
	goto LA1;
	LA3: ;
	{
		Keyerror4051* e_190003;
		NimStringDesc* LOC6;
		e_190003 = 0;
		e_190003 = (Keyerror4051*) newObj((&NTI190004), sizeof(Keyerror4051));
		(*e_190003).Sup.Sup.Sup.m_type = (&NTI4051);
		LOC6 = 0;
		LOC6 = rawNewString(key->Sup.len + 15);
appendString(LOC6, ((NimStringDesc*) &TMP1193));
appendString(LOC6, key);
		asgnRefNoCycle((void**) (&(*e_190003).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_190003, "KeyError");
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_190128)(Table189452 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_169281(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_169404(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) {
	Cell48947* 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_190153)(Table189452* t, Keyvaluepairseq189455** 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_190074)(Table189452* t) {
	Keyvaluepairseq189455* n;
	Keyvaluepairseq189455* LOC1;
	n = 0;
	n = (Keyvaluepairseq189455*) newSeq((&NTI189455), ((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_190126;
		NI HEX3Atmp_190179;
		NI res_190182;
		i_190126 = 0;
		HEX3Atmp_190179 = 0;
		HEX3Atmp_190179 = (n ? (n->Sup.len-1) : -1);
		res_190182 = ((NI) 0);
		{
			while (1) {
				if (!(res_190182 <= HEX3Atmp_190179)) goto LA4;
				i_190126 = res_190182;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_169281(n->data[i_190126].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_190128((*t), n->data[i_190126].Field1, n->data[i_190126].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_190153(t, (&(*t).data), n->data[i_190126].Field1, n->data[i_190126].Field2, n->data[i_190126].Field0, j);
				}
				LA8: ;
				res_190182 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_190038)(Table189452* t, NimStringDesc* key, NI32 val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_189754((*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_169289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_190074(t);
			index = rawgetknownhc_190128((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_190153(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_269023)(NI initialsize, Table267063* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq267066*) newSeq((&NTI267066), ((NI) (initialsize))));
}

static N_INLINE(NI, rawget_347088)(Table346053 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_347076)(Table346053 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_347088(t, key, (&hc));
	result = (((NI) 0) <= LOC1);
	return result;
}
N_NIMCALL(void, TMP2542)(void* p, NI op) {
	Keyvaluepairseq346056* a;
	NI LOC1;
	a = (Keyvaluepairseq346056*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NI, rawgetknownhc_347242)(Table346053 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_347267)(Table346053* t, Keyvaluepairseq346056** 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_347188)(Table346053* t) {
	Keyvaluepairseq346056* n;
	Keyvaluepairseq346056* LOC1;
	n = 0;
	n = (Keyvaluepairseq346056*) newSeq((&NTI346056), ((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_347240;
		NI HEX3Atmp_347293;
		NI res_347296;
		i_347240 = 0;
		HEX3Atmp_347293 = 0;
		HEX3Atmp_347293 = (n ? (n->Sup.len-1) : -1);
		res_347296 = ((NI) 0);
		{
			while (1) {
				if (!(res_347296 <= HEX3Atmp_347293)) goto LA4;
				i_347240 = res_347296;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_169281(n->data[i_347240].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_347242((*t), n->data[i_347240].Field1, n->data[i_347240].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_347267(t, (&(*t).data), n->data[i_347240].Field1, n->data[i_347240].Field2, n->data[i_347240].Field0, j);
				}
				LA8: ;
				res_347296 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_347152)(Table346053* t, NimStringDesc* key, NI val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_347088((*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_169289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_347188(t);
			index = rawgetknownhc_347242((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_347267(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(NI, getordefault_347120)(Table346053 t, NimStringDesc* key) {
	NI result;
	NI hc_347131;
	NI index_347133;
	result = 0;
	hc_347131 = 0;
	index_347133 = rawget_347088(t, key, (&hc_347131));
	{
		if (!(((NI) 0) <= index_347133)) goto LA3;
		result = t.data->data[index_347133].Field2;
	}
	LA3: ;
	return result;
}
N_NIMCALL(void, TMP3043)(void* p, NI op) {
	Keyvaluepairseq428653* a;
	NI LOC1;
	a = (Keyvaluepairseq428653*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

N_NIMCALL(void, inittable_429467)(NI initialsize, Table428650* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq428653*) newSeq((&NTI428653), ((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_429113)(Table428650 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode224809*, getordefault_429098)(Table428650 t, NI64 key) {
	Tnode224809* result;
	NI hc_429109;
	NI index_429111;
	result = 0;
	hc_429109 = 0;
	index_429111 = rawget_429113(t, key, (&hc_429109));
	{
		if (!(((NI) 0) <= index_429111)) goto LA3;
		result = t.data->data[index_429111].Field2;
	}
	LA3: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_429252)(Table428650 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_169281(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_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_429277)(Table428650* t, Keyvaluepairseq428653** data, NI64 key, Tnode224809* 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_429198)(Table428650* t) {
	Keyvaluepairseq428653* n;
	Keyvaluepairseq428653* LOC1;
	n = 0;
	n = (Keyvaluepairseq428653*) newSeq((&NTI428653), ((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_429250;
		NI HEX3Atmp_429303;
		NI res_429306;
		i_429250 = 0;
		HEX3Atmp_429303 = 0;
		HEX3Atmp_429303 = (n ? (n->Sup.len-1) : -1);
		res_429306 = ((NI) 0);
		{
			while (1) {
				if (!(res_429306 <= HEX3Atmp_429303)) goto LA4;
				i_429250 = res_429306;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_169281(n->data[i_429250].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_429252((*t), n->data[i_429250].Field1, n->data[i_429250].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_429277(t, (&(*t).data), n->data[i_429250].Field1, n->data[i_429250].Field2, n->data[i_429250].Field0, j);
				}
				LA8: ;
				res_429306 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_429162)(Table428650* t, NI64 key, Tnode224809* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_429113((*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_169289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_429198(t);
			index = rawgetknownhc_429252((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_429277(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_346124)(NI initialsize, Table346053* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq346056*) newSeq((&NTI346056), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP5175)(void* p, NI op) {
	Keyvaluepairseq347413* a;
	NI LOC1;
	a = (Keyvaluepairseq347413*)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_350529)(NI initialsize, Table347410* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq347413*) newSeq((&NTI347413), ((NI) (initialsize))));
}

N_NIMCALL(NI, len_350860)(Table347410 t) {
	NI result;
	result = 0;
	result = t.counter;
	return result;
}

static N_INLINE(NI, rawget_349698)(Table347410 t, Indexentry347397* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_347447(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_169281(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_349712((&t.data->data[h].Field1), key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_350962)(Table347410 t, Indexentry347397* 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_169281(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_349712((&t.data->data[h].Field1), key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_169404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_350996)(Table347410* t, Keyvaluepairseq347413** data, Indexentry347397* key, TY350507* 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, (&NTI350507));
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_350908)(Table347410* t) {
	Keyvaluepairseq347413* n;
	Keyvaluepairseq347413* LOC1;
	n = 0;
	n = (Keyvaluepairseq347413*) newSeq((&NTI347413), ((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_350960;
		NI HEX3Atmp_351022;
		NI res_351025;
		i_350960 = 0;
		HEX3Atmp_351022 = 0;
		HEX3Atmp_351022 = (n ? (n->Sup.len-1) : -1);
		res_351025 = ((NI) 0);
		{
			while (1) {
				if (!(res_351025 <= HEX3Atmp_351022)) goto LA4;
				i_350960 = res_351025;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_169281(n->data[i_350960].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_350962((*t), (&n->data[i_350960].Field1), n->data[i_350960].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_350996(t, (&(*t).data), (&n->data[i_350960].Field1), n->data[i_350960].Field2, n->data[i_350960].Field0, j);
				}
				LA8: ;
				res_351025 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_350872)(Table347410* t, Indexentry347397* key, TY350507* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_349698((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		genericSeqAssign((&(*t).data->data[index].Field2), val, (&NTI350507));
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_169289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_350908(t);
			index = rawgetknownhc_350962((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_350996(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(TY350507*, getordefault_349683)(Table347410 t, Indexentry347397* key) {
	TY350507* result;
	NI hc_349694;
	NI index_349696;
	result = 0;
	hc_349694 = 0;
	index_349696 = rawget_349698(t, key, (&hc_349694));
	{
		if (!(((NI) 0) <= index_349696)) goto LA3;
		genericSeqAssign((&result), t.data->data[index_349696].Field2, (&NTI350507));
	}
	LA3: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_tablesInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_tablesDatInit000)(void) {
static TNimNode* TMP138[3];
static TNimNode* TMP142[2];
static TNimNode* TMP905[2];
static TNimNode* TMP906[3];
static TNimNode* TMP2541[3];
static TNimNode* TMP3042[3];
static TNimNode* TMP5018[2];
static TNimNode* TMP5172[3];
static TNimNode TMP55[29];
NTI189458.size = sizeof(Keyvaluepair189458);
NTI189458.kind = 18;
NTI189458.base = 0;
NTI189458.flags = 2;
TMP138[0] = &TMP55[1];
TMP55[1].kind = 1;
TMP55[1].offset = offsetof(Keyvaluepair189458, Field0);
TMP55[1].typ = (&NTI142005);
TMP55[1].name = "Field0";
TMP138[1] = &TMP55[2];
TMP55[2].kind = 1;
TMP55[2].offset = offsetof(Keyvaluepair189458, Field1);
TMP55[2].typ = (&NTI149);
TMP55[2].name = "Field1";
TMP138[2] = &TMP55[3];
TMP55[3].kind = 1;
TMP55[3].offset = offsetof(Keyvaluepair189458, Field2);
TMP55[3].typ = (&NTI114);
TMP55[3].name = "Field2";
TMP55[0].len = 3; TMP55[0].kind = 2; TMP55[0].sons = &TMP138[0];
NTI189458.node = &TMP55[0];
NTI189455.size = sizeof(Keyvaluepairseq189455*);
NTI189455.kind = 24;
NTI189455.base = (&NTI189458);
NTI189455.flags = 2;
NTI189455.marker = TMP139;
NTI189452.size = sizeof(Table189452);
NTI189452.kind = 18;
NTI189452.base = 0;
NTI189452.flags = 2;
TMP142[0] = &TMP55[5];
TMP55[5].kind = 1;
TMP55[5].offset = offsetof(Table189452, data);
TMP55[5].typ = (&NTI189455);
TMP55[5].name = "data";
TMP142[1] = &TMP55[6];
TMP55[6].kind = 1;
TMP55[6].offset = offsetof(Table189452, counter);
TMP55[6].typ = (&NTI108);
TMP55[6].name = "counter";
TMP55[4].len = 2; TMP55[4].kind = 2; TMP55[4].sons = &TMP142[0];
NTI189452.node = &TMP55[4];
NTI267063.size = sizeof(Table267063);
NTI267063.kind = 18;
NTI267063.base = 0;
NTI267063.flags = 2;
TMP905[0] = &TMP55[8];
NTI267069.size = sizeof(Keyvaluepair267069);
NTI267069.kind = 18;
NTI267069.base = 0;
NTI267069.flags = 2;
TMP906[0] = &TMP55[10];
TMP55[10].kind = 1;
TMP55[10].offset = offsetof(Keyvaluepair267069, Field0);
TMP55[10].typ = (&NTI142005);
TMP55[10].name = "Field0";
TMP906[1] = &TMP55[11];
TMP55[11].kind = 1;
TMP55[11].offset = offsetof(Keyvaluepair267069, Field1);
TMP55[11].typ = (&NTI108);
TMP55[11].name = "Field1";
TMP906[2] = &TMP55[12];
TMP55[12].kind = 1;
TMP55[12].offset = offsetof(Keyvaluepair267069, Field2);
TMP55[12].typ = (&NTI224807);
TMP55[12].name = "Field2";
TMP55[9].len = 3; TMP55[9].kind = 2; TMP55[9].sons = &TMP906[0];
NTI267069.node = &TMP55[9];
NTI267066.size = sizeof(Keyvaluepairseq267066*);
NTI267066.kind = 24;
NTI267066.base = (&NTI267069);
NTI267066.flags = 2;
NTI267066.marker = TMP907;
TMP55[8].kind = 1;
TMP55[8].offset = offsetof(Table267063, data);
TMP55[8].typ = (&NTI267066);
TMP55[8].name = "data";
TMP905[1] = &TMP55[13];
TMP55[13].kind = 1;
TMP55[13].offset = offsetof(Table267063, counter);
TMP55[13].typ = (&NTI108);
TMP55[13].name = "counter";
TMP55[7].len = 2; TMP55[7].kind = 2; TMP55[7].sons = &TMP905[0];
NTI267063.node = &TMP55[7];
NTI346059.size = sizeof(Keyvaluepair346059);
NTI346059.kind = 18;
NTI346059.base = 0;
NTI346059.flags = 2;
TMP2541[0] = &TMP55[15];
TMP55[15].kind = 1;
TMP55[15].offset = offsetof(Keyvaluepair346059, Field0);
TMP55[15].typ = (&NTI142005);
TMP55[15].name = "Field0";
TMP2541[1] = &TMP55[16];
TMP55[16].kind = 1;
TMP55[16].offset = offsetof(Keyvaluepair346059, Field1);
TMP55[16].typ = (&NTI149);
TMP55[16].name = "Field1";
TMP2541[2] = &TMP55[17];
TMP55[17].kind = 1;
TMP55[17].offset = offsetof(Keyvaluepair346059, Field2);
TMP55[17].typ = (&NTI108);
TMP55[17].name = "Field2";
TMP55[14].len = 3; TMP55[14].kind = 2; TMP55[14].sons = &TMP2541[0];
NTI346059.node = &TMP55[14];
NTI346056.size = sizeof(Keyvaluepairseq346056*);
NTI346056.kind = 24;
NTI346056.base = (&NTI346059);
NTI346056.flags = 2;
NTI346056.marker = TMP2542;
NTI428656.size = sizeof(Keyvaluepair428656);
NTI428656.kind = 18;
NTI428656.base = 0;
NTI428656.flags = 2;
TMP3042[0] = &TMP55[19];
TMP55[19].kind = 1;
TMP55[19].offset = offsetof(Keyvaluepair428656, Field0);
TMP55[19].typ = (&NTI142005);
TMP55[19].name = "Field0";
TMP3042[1] = &TMP55[20];
TMP55[20].kind = 1;
TMP55[20].offset = offsetof(Keyvaluepair428656, Field1);
TMP55[20].typ = (&NTI8112);
TMP55[20].name = "Field1";
TMP3042[2] = &TMP55[21];
TMP55[21].kind = 1;
TMP55[21].offset = offsetof(Keyvaluepair428656, Field2);
TMP55[21].typ = (&NTI224801);
TMP55[21].name = "Field2";
TMP55[18].len = 3; TMP55[18].kind = 2; TMP55[18].sons = &TMP3042[0];
NTI428656.node = &TMP55[18];
NTI428653.size = sizeof(Keyvaluepairseq428653*);
NTI428653.kind = 24;
NTI428653.base = (&NTI428656);
NTI428653.flags = 2;
NTI428653.marker = TMP3043;
NTI346053.size = sizeof(Table346053);
NTI346053.kind = 18;
NTI346053.base = 0;
NTI346053.flags = 2;
TMP5018[0] = &TMP55[23];
TMP55[23].kind = 1;
TMP55[23].offset = offsetof(Table346053, data);
TMP55[23].typ = (&NTI346056);
TMP55[23].name = "data";
TMP5018[1] = &TMP55[24];
TMP55[24].kind = 1;
TMP55[24].offset = offsetof(Table346053, counter);
TMP55[24].typ = (&NTI108);
TMP55[24].name = "counter";
TMP55[22].len = 2; TMP55[22].kind = 2; TMP55[22].sons = &TMP5018[0];
NTI346053.node = &TMP55[22];
NTI347416.size = sizeof(Keyvaluepair347416);
NTI347416.kind = 18;
NTI347416.base = 0;
NTI347416.flags = 2;
TMP5172[0] = &TMP55[26];
TMP55[26].kind = 1;
TMP55[26].offset = offsetof(Keyvaluepair347416, Field0);
TMP55[26].typ = (&NTI142005);
TMP55[26].name = "Field0";
TMP5172[1] = &TMP55[27];
TMP55[27].kind = 1;
TMP55[27].offset = offsetof(Keyvaluepair347416, Field1);
TMP55[27].typ = (&NTI347397);
TMP55[27].name = "Field1";
TMP5172[2] = &TMP55[28];
TMP55[28].kind = 1;
TMP55[28].offset = offsetof(Keyvaluepair347416, Field2);
TMP55[28].typ = (&NTI350507);
TMP55[28].name = "Field2";
TMP55[25].len = 3; TMP55[25].kind = 2; TMP55[25].sons = &TMP5172[0];
NTI347416.node = &TMP55[25];
NTI347413.size = sizeof(Keyvaluepairseq347413*);
NTI347413.kind = 24;
NTI347413.base = (&NTI347416);
NTI347413.flags = 2;
NTI347413.marker = TMP5175;
}

