/* 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 Table188452 Table188452;
typedef struct Keyvaluepairseq188455 Keyvaluepairseq188455;
typedef struct Keyvaluepair188458 Keyvaluepair188458;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Table266063 Table266063;
typedef struct Keyvaluepairseq266066 Keyvaluepairseq266066;
typedef struct Keyvaluepair266069 Keyvaluepair266069;
typedef struct Tsym223841 Tsym223841;
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 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 Table345053 Table345053;
typedef struct Keyvaluepairseq345056 Keyvaluepairseq345056;
typedef struct Keyvaluepair345059 Keyvaluepair345059;
typedef struct Table427650 Table427650;
typedef struct Keyvaluepairseq427653 Keyvaluepairseq427653;
typedef struct Keyvaluepair427656 Keyvaluepair427656;
typedef struct Tnode223809 Tnode223809;
typedef struct Table346410 Table346410;
typedef struct Keyvaluepairseq346413 Keyvaluepairseq346413;
typedef struct Keyvaluepair346416 Keyvaluepair346416;
typedef struct Indexentry346397 Indexentry346397;
typedef struct TY349507 TY349507;
typedef struct Tidobj196015 Tidobj196015;
typedef struct Ttypeseq223843 Ttypeseq223843;
typedef struct Tscope223835 Tscope223835;
typedef struct TY223944 TY223944;
typedef struct Tstrtable223813 Tstrtable223813;
typedef struct Tsymseq223811 Tsymseq223811;
typedef struct Ttype223847 Ttype223847;
typedef struct Tident196021 Tident196021;
typedef struct Tlineinfo188352 Tlineinfo188352;
typedef struct Tloc223823 Tloc223823;
typedef struct Ropeobj174009 Ropeobj174009;
typedef struct Tlib223827 Tlib223827;
typedef struct Basechunk30840 Basechunk30840;
typedef struct Freecell30832 Freecell30832;
typedef struct Tnodeseq223803 Tnodeseq223803;
typedef struct Tinstantiation223831 Tinstantiation223831;
typedef struct Tlistentry139022 Tlistentry139022;
typedef struct TY223932 TY223932;
struct  Table188452  {
Keyvaluepairseq188455* data;
NI counter;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct Keyvaluepair188458 {
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  Table266063  {
Keyvaluepairseq266066* data;
NI counter;
};
struct Keyvaluepair266069 {
NI Field0;
NI Field1;
Tsym223841* 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 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;
Cellseq48963 zct;
Cellseq48963 decstack;
Cellset48959 cycleroots;
Cellseq48963 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  Table345053  {
Keyvaluepairseq345056* data;
NI counter;
};
struct Keyvaluepair345059 {
NI Field0;
NimStringDesc* Field1;
NI Field2;
};
struct  Table427650  {
Keyvaluepairseq427653* data;
NI counter;
};
struct Keyvaluepair427656 {
NI Field0;
NI64 Field1;
Tnode223809* Field2;
};
struct  Table346410  {
Keyvaluepairseq346413* data;
NI counter;
};
struct  Indexentry346397  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct Keyvaluepair346416 {
NI Field0;
Indexentry346397 Field1;
TY349507* Field2;
};
struct  Tidobj196015  {
  TNimObject Sup;
NI id;
};
struct  Tstrtable223813  {
NI counter;
Tsymseq223811* data;
};
struct  Tlineinfo188352  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tloc223823  {
NU8 k;
NU8 s;
NU16 flags;
Ttype223847* t;
Ropeobj174009* r;
Ropeobj174009* heaproot;
};
struct  Tsym223841  {
  Tidobj196015 Sup;
NU8 kind;
union{
struct {Ttypeseq223843* typeinstcache;
Tscope223835* typscope;
} S1;
struct {TY223944* procinstcache;
Tsym223841* gcunsafetyreason;
} S2;
struct {TY223944* usedgenerics;
Tstrtable223813 tab;
} S3;
struct {Tsym223841* guard;
NI bitsize;
} S4;
} kindU;
NU8 magic;
Ttype223847* typ;
Tident196021* name;
Tlineinfo188352 info;
Tsym223841* owner;
NU32 flags;
Tnode223809* ast;
NU32 options;
NI position;
NI offset;
Tloc223823 loc;
Tlib223827* annex;
Tnode223809* constraint;
};
struct  Gcstack51016  {
Gcstack51016* prev;
Gcstack51016* next;
void* starts;
void* pos;
NI maxstacksize;
};
typedef NI TY30821[16];
struct  Pagedesc48955  {
Pagedesc48955* 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  Tnode223809  {
Ttype223847* typ;
Tlineinfo188352 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym223841* sym;
} S4;
struct {Tident196021* ident;
} S5;
struct {Tnodeseq223803* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Tscope223835  {
NI depthlevel;
Tstrtable223813 symbols;
Tnodeseq223803* usingsyms;
Tscope223835* parent;
};
struct  Ttype223847  {
  Tidobj196015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq223843* sons;
Tnode223809* n;
Tsym223841* owner;
Tsym223841* sym;
Tsym223841* destructor;
Tsym223841* deepcopy;
Tsym223841* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc223823 loc;
};
struct  Tident196021  {
  Tidobj196015 Sup;
NimStringDesc* s;
Tident196021* next;
NI h;
};
struct  Ropeobj174009  {
  TNimObject Sup;
Ropeobj174009* left;
Ropeobj174009* right;
NI length;
NimStringDesc* data;
};
struct  Tlistentry139022  {
  TNimObject Sup;
Tlistentry139022* prev;
Tlistentry139022* next;
};
struct  Tlib223827  {
  Tlistentry139022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj174009* name;
Tnode223809* path;
};
struct  Freecell30832  {
Freecell30832* next;
NI zerofield;
};
struct  Tinstantiation223831  {
Tsym223841* sym;
Ttypeseq223843* concretetypes;
TY223932* usedby;
NI compilesid;
};
struct Keyvaluepairseq188455 {
  TGenericSeq Sup;
  Keyvaluepair188458 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq266066 {
  TGenericSeq Sup;
  Keyvaluepair266069 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq345056 {
  TGenericSeq Sup;
  Keyvaluepair345059 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq427653 {
  TGenericSeq Sup;
  Keyvaluepair427656 data[SEQ_DECL_SIZE];
};
struct TY349507 {
  TGenericSeq Sup;
  Indexentry346397 data[SEQ_DECL_SIZE];
};
struct Keyvaluepairseq346413 {
  TGenericSeq Sup;
  Keyvaluepair346416 data[SEQ_DECL_SIZE];
};
struct Ttypeseq223843 {
  TGenericSeq Sup;
  Ttype223847* data[SEQ_DECL_SIZE];
};
struct TY223944 {
  TGenericSeq Sup;
  Tinstantiation223831* data[SEQ_DECL_SIZE];
};
struct Tsymseq223811 {
  TGenericSeq Sup;
  Tsym223841* data[SEQ_DECL_SIZE];
};
struct Tnodeseq223803 {
  TGenericSeq Sup;
  Tnode223809* data[SEQ_DECL_SIZE];
};
struct TY223932 {
  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_266752)(Table266063 t, NI key, NI* hc);
static N_INLINE(NI, hash_141801)(NI x);
static N_INLINE(NIM_BOOL, isfilled_168281)(NI hcode);
static N_INLINE(NI, nexttry_168404)(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_168289)(NI length, NI counter);
N_NIMCALL(void, enlarge_266840)(Table266063* t);
static N_INLINE(NI, rawgetknownhc_266894)(Table266063 t, NI key, NI hc);
N_NIMCALL(void, rawinsert_266919)(Table266063* t, Keyvaluepairseq266066** data, NI key, Tsym223841* val, NI hc, NI h);
static N_INLINE(NI, rawget_188754)(Table188452 t, NimStringDesc* key, NI* hc);
N_NIMCALL(NI, hash_141848)(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_189074)(Table188452* t);
static N_INLINE(NI, rawgetknownhc_189128)(Table188452 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_189153)(Table188452* t, Keyvaluepairseq188455** 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_346088)(Table345053 t, NimStringDesc* key, NI* hc);
N_NIMCALL(void, enlarge_346188)(Table345053* t);
N_NIMCALL(void, TMP2541)(void* p, NI op);
static N_INLINE(NI, rawgetknownhc_346242)(Table345053 t, NimStringDesc* key, NI hc);
N_NIMCALL(void, rawinsert_346267)(Table345053* t, Keyvaluepairseq345056** data, NimStringDesc* key, NI val, NI hc, NI h);
N_NIMCALL(void, TMP3042)(void* p, NI op);
static N_INLINE(NI, rawget_428113)(Table427650 t, NI64 key, NI* hc);
static N_INLINE(NI, hash_141811)(NI64 x);
N_NIMCALL(void, enlarge_428198)(Table427650* t);
static N_INLINE(NI, rawgetknownhc_428252)(Table427650 t, NI64 key, NI hc);
N_NIMCALL(void, rawinsert_428277)(Table427650* t, Keyvaluepairseq427653** data, NI64 key, Tnode223809* val, NI hc, NI h);
N_NIMCALL(void, TMP5174)(void* p, NI op);
static N_INLINE(NI, rawget_348698)(Table346410 t, Indexentry346397 key, NI* hc);
N_NIMCALL(NI, hash_346447)(Indexentry346397 x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_348712)(Indexentry346397 x, Indexentry346397 y);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_85804, TNimType* mt);
N_NIMCALL(void, enlarge_349908)(Table346410* t);
static N_INLINE(NI, rawgetknownhc_349962)(Table346410 t, Indexentry346397 key, NI hc);
N_NIMCALL(void, rawinsert_349996)(Table346410* t, Keyvaluepairseq346413** data, Indexentry346397 key, TY349507* val, NI hc, NI h);
STRING_LITERAL(TMP1193, "key not found: ", 15);
TNimType NTI188458; /* KeyValuePair */
extern TNimType NTI141005; /* Hash */
extern TNimType NTI149; /* string */
extern TNimType NTI114; /* int32 */
TNimType NTI188455; /* KeyValuePairSeq */
TNimType NTI188452; /* Table */
extern TNimType NTI108; /* int */
TNimType NTI266063; /* Table */
TNimType NTI266069; /* KeyValuePair */
extern TNimType NTI223807; /* PSym */
TNimType NTI266066; /* KeyValuePairSeq */
extern Gcheap51018 gch_51059;
extern TNimType NTI189004; /* ref KeyError */
extern TNimType NTI4051; /* KeyError */
TNimType NTI345059; /* KeyValuePair */
TNimType NTI345056; /* KeyValuePairSeq */
TNimType NTI427656; /* KeyValuePair */
extern TNimType NTI8112; /* BiggestInt */
extern TNimType NTI223801; /* PNode */
TNimType NTI427653; /* KeyValuePairSeq */
TNimType NTI345053; /* Table */
TNimType NTI346416; /* KeyValuePair */
extern TNimType NTI346397; /* IndexEntry */
extern TNimType NTI349507; /* seq[IndexEntry] */
TNimType NTI346413; /* KeyValuePairSeq */
N_NIMCALL(void, TMP139)(void* p, NI op) {
	Keyvaluepairseq188455* a;
	NI LOC1;
	a = (Keyvaluepairseq188455*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

N_NIMCALL(void, inittable_188444)(NI initialsize, Table188452* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq188455*) newSeq((&NTI188455), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP907)(void* p, NI op) {
	Keyvaluepairseq266066* a;
	NI LOC1;
	a = (Keyvaluepairseq266066*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

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

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

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

static N_INLINE(NI, rawget_266752)(Table266063 t, NI key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_141801(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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tsym223841*, getordefault_266737)(Table266063 t, NI key) {
	Tsym223841* result;
	NI hc_266748;
	NI index_266750;
	result = 0;
	hc_266748 = 0;
	index_266750 = rawget_266752(t, key, (&hc_266748));
	{
		if (!(((NI) 0) <= index_266750)) goto LA3;
		result = t.data->data[index_266750].Field2;
	}
	LA3: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, mustrehash_168289)(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_266894)(Table266063 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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_266919)(Table266063* t, Keyvaluepairseq266066** data, NI key, Tsym223841* 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_266840)(Table266063* t) {
	Keyvaluepairseq266066* n;
	Keyvaluepairseq266066* LOC1;
	n = 0;
	n = (Keyvaluepairseq266066*) newSeq((&NTI266066), ((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_266892;
		NI HEX3Atmp_266945;
		NI res_266948;
		i_266892 = 0;
		HEX3Atmp_266945 = 0;
		HEX3Atmp_266945 = (n ? (n->Sup.len-1) : -1);
		res_266948 = ((NI) 0);
		{
			while (1) {
				if (!(res_266948 <= HEX3Atmp_266945)) goto LA4;
				i_266892 = res_266948;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_168281(n->data[i_266892].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_266894((*t), n->data[i_266892].Field1, n->data[i_266892].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_266919(t, (&(*t).data), n->data[i_266892].Field1, n->data[i_266892].Field2, n->data[i_266892].Field0, j);
				}
				LA8: ;
				res_266948 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_266804)(Table266063* t, NI key, Tsym223841* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_266752((*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_168289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_266840(t);
			index = rawgetknownhc_266894((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_266919(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_188754)(Table188452 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_141848(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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_188742)(Table188452 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_188754(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_188786)(Table188452* t, NimStringDesc* key) {
	NI32* result;
	NI hc_188799;
	NI index_188801;
	result = 0;
	hc_188799 = 0;
	index_188801 = rawget_188754((*t), key, (&hc_188799));
	{
		if (!(((NI) 0) <= index_188801)) goto LA3;
		result = (&(*t).data->data[index_188801].Field2);
	}
	goto LA1;
	LA3: ;
	{
		Keyerror4051* e_189003;
		NimStringDesc* LOC6;
		e_189003 = 0;
		e_189003 = (Keyerror4051*) newObj((&NTI189004), sizeof(Keyerror4051));
		(*e_189003).Sup.Sup.Sup.m_type = (&NTI4051);
		LOC6 = 0;
		LOC6 = rawNewString(key->Sup.len + 15);
appendString(LOC6, ((NimStringDesc*) &TMP1193));
appendString(LOC6, key);
		asgnRefNoCycle((void**) (&(*e_189003).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_189003, "KeyError");
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_189128)(Table188452 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_168281(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_168404(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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_54204(c);
	}
	LA3: ;
}

N_NIMCALL(void, rawinsert_189153)(Table188452* t, Keyvaluepairseq188455** 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_189074)(Table188452* t) {
	Keyvaluepairseq188455* n;
	Keyvaluepairseq188455* LOC1;
	n = 0;
	n = (Keyvaluepairseq188455*) newSeq((&NTI188455), ((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_189126;
		NI HEX3Atmp_189179;
		NI res_189182;
		i_189126 = 0;
		HEX3Atmp_189179 = 0;
		HEX3Atmp_189179 = (n ? (n->Sup.len-1) : -1);
		res_189182 = ((NI) 0);
		{
			while (1) {
				if (!(res_189182 <= HEX3Atmp_189179)) goto LA4;
				i_189126 = res_189182;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_168281(n->data[i_189126].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_189128((*t), n->data[i_189126].Field1, n->data[i_189126].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_189153(t, (&(*t).data), n->data[i_189126].Field1, n->data[i_189126].Field2, n->data[i_189126].Field0, j);
				}
				LA8: ;
				res_189182 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_189038)(Table188452* t, NimStringDesc* key, NI32 val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_188754((*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_168289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_189074(t);
			index = rawgetknownhc_189128((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_189153(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_268032)(NI initialsize, Table266063* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq266066*) newSeq((&NTI266066), ((NI) (initialsize))));
}

static N_INLINE(NI, rawget_346088)(Table345053 t, NimStringDesc* key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_141848(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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, haskey_346076)(Table345053 t, NimStringDesc* key) {
	NIM_BOOL result;
	NI hc;
	NI LOC1;
	result = 0;
	hc = 0;
	LOC1 = 0;
	LOC1 = rawget_346088(t, key, (&hc));
	result = (((NI) 0) <= LOC1);
	return result;
}
N_NIMCALL(void, TMP2541)(void* p, NI op) {
	Keyvaluepairseq345056* a;
	NI LOC1;
	a = (Keyvaluepairseq345056*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field1, op);
	}
}

static N_INLINE(NI, rawgetknownhc_346242)(Table345053 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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_346267)(Table345053* t, Keyvaluepairseq345056** 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_346188)(Table345053* t) {
	Keyvaluepairseq345056* n;
	Keyvaluepairseq345056* LOC1;
	n = 0;
	n = (Keyvaluepairseq345056*) newSeq((&NTI345056), ((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_346240;
		NI HEX3Atmp_346293;
		NI res_346296;
		i_346240 = 0;
		HEX3Atmp_346293 = 0;
		HEX3Atmp_346293 = (n ? (n->Sup.len-1) : -1);
		res_346296 = ((NI) 0);
		{
			while (1) {
				if (!(res_346296 <= HEX3Atmp_346293)) goto LA4;
				i_346240 = res_346296;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_168281(n->data[i_346240].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_346242((*t), n->data[i_346240].Field1, n->data[i_346240].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_346267(t, (&(*t).data), n->data[i_346240].Field1, n->data[i_346240].Field2, n->data[i_346240].Field0, j);
				}
				LA8: ;
				res_346296 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_346152)(Table345053* t, NimStringDesc* key, NI val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_346088((*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_168289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_346188(t);
			index = rawgetknownhc_346242((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_346267(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(NI, getordefault_346120)(Table345053 t, NimStringDesc* key) {
	NI result;
	NI hc_346131;
	NI index_346133;
	result = 0;
	hc_346131 = 0;
	index_346133 = rawget_346088(t, key, (&hc_346131));
	{
		if (!(((NI) 0) <= index_346133)) goto LA3;
		result = t.data->data[index_346133].Field2;
	}
	LA3: ;
	return result;
}
N_NIMCALL(void, TMP3042)(void* p, NI op) {
	Keyvaluepairseq427653* a;
	NI LOC1;
	a = (Keyvaluepairseq427653*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1].Field2, op);
	}
}

N_NIMCALL(void, inittable_428467)(NI initialsize, Table427650* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq427653*) newSeq((&NTI427653), ((NI) (initialsize))));
}

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

static N_INLINE(NI, rawget_428113)(Table427650 t, NI64 key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_141811(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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tnode223809*, getordefault_428098)(Table427650 t, NI64 key) {
	Tnode223809* result;
	NI hc_428109;
	NI index_428111;
	result = 0;
	hc_428109 = 0;
	index_428111 = rawget_428113(t, key, (&hc_428109));
	{
		if (!(((NI) 0) <= index_428111)) goto LA3;
		result = t.data->data[index_428111].Field2;
	}
	LA3: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_428252)(Table427650 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_168281(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_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_428277)(Table427650* t, Keyvaluepairseq427653** data, NI64 key, Tnode223809* 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_428198)(Table427650* t) {
	Keyvaluepairseq427653* n;
	Keyvaluepairseq427653* LOC1;
	n = 0;
	n = (Keyvaluepairseq427653*) newSeq((&NTI427653), ((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_428250;
		NI HEX3Atmp_428303;
		NI res_428306;
		i_428250 = 0;
		HEX3Atmp_428303 = 0;
		HEX3Atmp_428303 = (n ? (n->Sup.len-1) : -1);
		res_428306 = ((NI) 0);
		{
			while (1) {
				if (!(res_428306 <= HEX3Atmp_428303)) goto LA4;
				i_428250 = res_428306;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_168281(n->data[i_428250].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_428252((*t), n->data[i_428250].Field1, n->data[i_428250].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_428277(t, (&(*t).data), n->data[i_428250].Field1, n->data[i_428250].Field2, n->data[i_428250].Field0, j);
				}
				LA8: ;
				res_428306 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_428162)(Table427650* t, NI64 key, Tnode223809* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_428113((*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_168289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_428198(t);
			index = rawgetknownhc_428252((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_428277(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(void, inittable_345124)(NI initialsize, Table345053* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq345056*) newSeq((&NTI345056), ((NI) (initialsize))));
}
N_NIMCALL(void, TMP5174)(void* p, NI op) {
	Keyvaluepairseq346413* a;
	NI LOC1;
	a = (Keyvaluepairseq346413*)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_349529)(NI initialsize, Table346410* Result) {
	(*Result).counter = ((NI) 0);
	unsureAsgnRef((void**) (&(*Result).data), (Keyvaluepairseq346413*) newSeq((&NTI346413), ((NI) (initialsize))));
}

N_NIMCALL(NI, len_349860)(Table346410 t) {
	NI result;
	result = 0;
	result = t.counter;
	return result;
}

static N_INLINE(NI, rawget_348698)(Table346410 t, Indexentry346397 key, NI* hc) {
	NI result;
	NI h;
{	result = 0;
	(*hc) = hash_346447(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_168281(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_348712(t.data->data[h].Field1, key);
				LA11: ;
				if (!LOC10) goto LA12;
				result = h;
				goto BeforeRet;
			}
			LA12: ;
			h = nexttry_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA6: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

static N_INLINE(NI, rawgetknownhc_349962)(Table346410 t, Indexentry346397 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_168281(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_348712(t.data->data[h].Field1, key);
				LA7: ;
				if (!LOC6) goto LA8;
				result = h;
				goto BeforeRet;
			}
			LA8: ;
			h = nexttry_168404(h, (t.data ? (t.data->Sup.len-1) : -1));
		} LA2: ;
	}
	result = (NI)(((NI) -1) - h);
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, rawinsert_349996)(Table346410* t, Keyvaluepairseq346413** data, Indexentry346397 key, TY349507* 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, (&NTI349507));
	(*data)->data[h].Field0 = hc;
}

N_NIMCALL(void, enlarge_349908)(Table346410* t) {
	Keyvaluepairseq346413* n;
	Keyvaluepairseq346413* LOC1;
	n = 0;
	n = (Keyvaluepairseq346413*) newSeq((&NTI346413), ((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_349960;
		NI HEX3Atmp_350022;
		NI res_350025;
		i_349960 = 0;
		HEX3Atmp_350022 = 0;
		HEX3Atmp_350022 = (n ? (n->Sup.len-1) : -1);
		res_350025 = ((NI) 0);
		{
			while (1) {
				if (!(res_350025 <= HEX3Atmp_350022)) goto LA4;
				i_349960 = res_350025;
				{
					NIM_BOOL LOC7;
					NI j;
					NI LOC10;
					LOC7 = 0;
					LOC7 = isfilled_168281(n->data[i_349960].Field0);
					if (!LOC7) goto LA8;
					LOC10 = 0;
					LOC10 = rawgetknownhc_349962((*t), n->data[i_349960].Field1, n->data[i_349960].Field0);
					j = (NI)(((NI) -1) - LOC10);
					rawinsert_349996(t, (&(*t).data), n->data[i_349960].Field1, n->data[i_349960].Field2, n->data[i_349960].Field0, j);
				}
				LA8: ;
				res_350025 += ((NI) 1);
			} LA4: ;
		}
	}
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_349872)(Table346410* t, Indexentry346397 key, TY349507* val) {
	NI hc;
	NI index;
	hc = 0;
	index = rawget_348698((*t), key, (&hc));
	{
		if (!(((NI) 0) <= index)) goto LA3;
		genericSeqAssign((&(*t).data->data[index].Field2), val, (&NTI349507));
	}
	goto LA1;
	LA3: ;
	{
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = mustrehash_168289(((*t).data ? (*t).data->Sup.len : 0), (*t).counter);
			if (!LOC8) goto LA9;
			enlarge_349908(t);
			index = rawgetknownhc_349962((*t), key, hc);
		}
		LA9: ;
		index = (NI)(((NI) -1) - index);
		rawinsert_349996(t, (&(*t).data), key, val, hc, index);
		(*t).counter += ((NI) 1);
	}
	LA1: ;
}

N_NIMCALL(TY349507*, getordefault_348683)(Table346410 t, Indexentry346397 key) {
	TY349507* result;
	NI hc_348694;
	NI index_348696;
	result = 0;
	hc_348694 = 0;
	index_348696 = rawget_348698(t, key, (&hc_348694));
	{
		if (!(((NI) 0) <= index_348696)) goto LA3;
		genericSeqAssign((&result), t.data->data[index_348696].Field2, (&NTI349507));
	}
	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* TMP2540[3];
static TNimNode* TMP3041[3];
static TNimNode* TMP5017[2];
static TNimNode* TMP5171[3];
static TNimNode TMP55[29];
NTI188458.size = sizeof(Keyvaluepair188458);
NTI188458.kind = 18;
NTI188458.base = 0;
NTI188458.flags = 2;
TMP138[0] = &TMP55[1];
TMP55[1].kind = 1;
TMP55[1].offset = offsetof(Keyvaluepair188458, Field0);
TMP55[1].typ = (&NTI141005);
TMP55[1].name = "Field0";
TMP138[1] = &TMP55[2];
TMP55[2].kind = 1;
TMP55[2].offset = offsetof(Keyvaluepair188458, Field1);
TMP55[2].typ = (&NTI149);
TMP55[2].name = "Field1";
TMP138[2] = &TMP55[3];
TMP55[3].kind = 1;
TMP55[3].offset = offsetof(Keyvaluepair188458, Field2);
TMP55[3].typ = (&NTI114);
TMP55[3].name = "Field2";
TMP55[0].len = 3; TMP55[0].kind = 2; TMP55[0].sons = &TMP138[0];
NTI188458.node = &TMP55[0];
NTI188455.size = sizeof(Keyvaluepairseq188455*);
NTI188455.kind = 24;
NTI188455.base = (&NTI188458);
NTI188455.flags = 2;
NTI188455.marker = TMP139;
NTI188452.size = sizeof(Table188452);
NTI188452.kind = 18;
NTI188452.base = 0;
NTI188452.flags = 2;
TMP142[0] = &TMP55[5];
TMP55[5].kind = 1;
TMP55[5].offset = offsetof(Table188452, data);
TMP55[5].typ = (&NTI188455);
TMP55[5].name = "data";
TMP142[1] = &TMP55[6];
TMP55[6].kind = 1;
TMP55[6].offset = offsetof(Table188452, counter);
TMP55[6].typ = (&NTI108);
TMP55[6].name = "counter";
TMP55[4].len = 2; TMP55[4].kind = 2; TMP55[4].sons = &TMP142[0];
NTI188452.node = &TMP55[4];
NTI266063.size = sizeof(Table266063);
NTI266063.kind = 18;
NTI266063.base = 0;
NTI266063.flags = 2;
TMP905[0] = &TMP55[8];
NTI266069.size = sizeof(Keyvaluepair266069);
NTI266069.kind = 18;
NTI266069.base = 0;
NTI266069.flags = 2;
TMP906[0] = &TMP55[10];
TMP55[10].kind = 1;
TMP55[10].offset = offsetof(Keyvaluepair266069, Field0);
TMP55[10].typ = (&NTI141005);
TMP55[10].name = "Field0";
TMP906[1] = &TMP55[11];
TMP55[11].kind = 1;
TMP55[11].offset = offsetof(Keyvaluepair266069, Field1);
TMP55[11].typ = (&NTI108);
TMP55[11].name = "Field1";
TMP906[2] = &TMP55[12];
TMP55[12].kind = 1;
TMP55[12].offset = offsetof(Keyvaluepair266069, Field2);
TMP55[12].typ = (&NTI223807);
TMP55[12].name = "Field2";
TMP55[9].len = 3; TMP55[9].kind = 2; TMP55[9].sons = &TMP906[0];
NTI266069.node = &TMP55[9];
NTI266066.size = sizeof(Keyvaluepairseq266066*);
NTI266066.kind = 24;
NTI266066.base = (&NTI266069);
NTI266066.flags = 2;
NTI266066.marker = TMP907;
TMP55[8].kind = 1;
TMP55[8].offset = offsetof(Table266063, data);
TMP55[8].typ = (&NTI266066);
TMP55[8].name = "data";
TMP905[1] = &TMP55[13];
TMP55[13].kind = 1;
TMP55[13].offset = offsetof(Table266063, counter);
TMP55[13].typ = (&NTI108);
TMP55[13].name = "counter";
TMP55[7].len = 2; TMP55[7].kind = 2; TMP55[7].sons = &TMP905[0];
NTI266063.node = &TMP55[7];
NTI345059.size = sizeof(Keyvaluepair345059);
NTI345059.kind = 18;
NTI345059.base = 0;
NTI345059.flags = 2;
TMP2540[0] = &TMP55[15];
TMP55[15].kind = 1;
TMP55[15].offset = offsetof(Keyvaluepair345059, Field0);
TMP55[15].typ = (&NTI141005);
TMP55[15].name = "Field0";
TMP2540[1] = &TMP55[16];
TMP55[16].kind = 1;
TMP55[16].offset = offsetof(Keyvaluepair345059, Field1);
TMP55[16].typ = (&NTI149);
TMP55[16].name = "Field1";
TMP2540[2] = &TMP55[17];
TMP55[17].kind = 1;
TMP55[17].offset = offsetof(Keyvaluepair345059, Field2);
TMP55[17].typ = (&NTI108);
TMP55[17].name = "Field2";
TMP55[14].len = 3; TMP55[14].kind = 2; TMP55[14].sons = &TMP2540[0];
NTI345059.node = &TMP55[14];
NTI345056.size = sizeof(Keyvaluepairseq345056*);
NTI345056.kind = 24;
NTI345056.base = (&NTI345059);
NTI345056.flags = 2;
NTI345056.marker = TMP2541;
NTI427656.size = sizeof(Keyvaluepair427656);
NTI427656.kind = 18;
NTI427656.base = 0;
NTI427656.flags = 2;
TMP3041[0] = &TMP55[19];
TMP55[19].kind = 1;
TMP55[19].offset = offsetof(Keyvaluepair427656, Field0);
TMP55[19].typ = (&NTI141005);
TMP55[19].name = "Field0";
TMP3041[1] = &TMP55[20];
TMP55[20].kind = 1;
TMP55[20].offset = offsetof(Keyvaluepair427656, Field1);
TMP55[20].typ = (&NTI8112);
TMP55[20].name = "Field1";
TMP3041[2] = &TMP55[21];
TMP55[21].kind = 1;
TMP55[21].offset = offsetof(Keyvaluepair427656, Field2);
TMP55[21].typ = (&NTI223801);
TMP55[21].name = "Field2";
TMP55[18].len = 3; TMP55[18].kind = 2; TMP55[18].sons = &TMP3041[0];
NTI427656.node = &TMP55[18];
NTI427653.size = sizeof(Keyvaluepairseq427653*);
NTI427653.kind = 24;
NTI427653.base = (&NTI427656);
NTI427653.flags = 2;
NTI427653.marker = TMP3042;
NTI345053.size = sizeof(Table345053);
NTI345053.kind = 18;
NTI345053.base = 0;
NTI345053.flags = 2;
TMP5017[0] = &TMP55[23];
TMP55[23].kind = 1;
TMP55[23].offset = offsetof(Table345053, data);
TMP55[23].typ = (&NTI345056);
TMP55[23].name = "data";
TMP5017[1] = &TMP55[24];
TMP55[24].kind = 1;
TMP55[24].offset = offsetof(Table345053, counter);
TMP55[24].typ = (&NTI108);
TMP55[24].name = "counter";
TMP55[22].len = 2; TMP55[22].kind = 2; TMP55[22].sons = &TMP5017[0];
NTI345053.node = &TMP55[22];
NTI346416.size = sizeof(Keyvaluepair346416);
NTI346416.kind = 18;
NTI346416.base = 0;
NTI346416.flags = 2;
TMP5171[0] = &TMP55[26];
TMP55[26].kind = 1;
TMP55[26].offset = offsetof(Keyvaluepair346416, Field0);
TMP55[26].typ = (&NTI141005);
TMP55[26].name = "Field0";
TMP5171[1] = &TMP55[27];
TMP55[27].kind = 1;
TMP55[27].offset = offsetof(Keyvaluepair346416, Field1);
TMP55[27].typ = (&NTI346397);
TMP55[27].name = "Field1";
TMP5171[2] = &TMP55[28];
TMP55[28].kind = 1;
TMP55[28].offset = offsetof(Keyvaluepair346416, Field2);
TMP55[28].typ = (&NTI349507);
TMP55[28].name = "Field2";
TMP55[25].len = 3; TMP55[25].kind = 2; TMP55[25].sons = &TMP5171[0];
NTI346416.node = &TMP55[25];
NTI346413.size = sizeof(Keyvaluepairseq346413*);
NTI346413.kind = 24;
NTI346413.base = (&NTI346416);
NTI346413.flags = 2;
NTI346413.marker = TMP5174;
}

