/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64
#include "nimbase.h"

#include <sys/mman.h>

#include <stdio.h>

#include <stdlib.h>

#include <setjmp.h>

#include <string.h>

#include <signal.h>
typedef struct Exception Exception;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tavlnode27208 tavlnode27208;
typedef struct tgcheap47016 tgcheap47016;
typedef struct tcellseq44951 tcellseq44951;
typedef struct tcell44935 tcell44935;
typedef struct tcellset44947 tcellset44947;
typedef struct tpagedesc44943 tpagedesc44943;
typedef struct tmemregion27210 tmemregion27210;
typedef struct tsmallchunk26440 tsmallchunk26440;
typedef struct tllchunk27204 tllchunk27204;
typedef struct tbigchunk26442 tbigchunk26442;
typedef struct tintset26417 tintset26417;
typedef struct ttrunk26413 ttrunk26413;
typedef struct tgcstat47014 tgcstat47014;
typedef struct tbasechunk26438 tbasechunk26438;
typedef struct tfreecell26430 tfreecell26430;
typedef struct TGenericSeq TGenericSeq;
typedef struct NimStringDesc NimStringDesc;
typedef struct TSafePoint TSafePoint;
typedef struct TNimObject TNimObject;
typedef struct overflowerror3243 overflowerror3243;
typedef struct arithmeticerror3239 arithmeticerror3239;
typedef struct systemerror3229 systemerror3229;
typedef struct outofmemerror3253 outofmemerror3253;
typedef struct valueerror3249 valueerror3249;
typedef struct ioerror3231 ioerror3231;
typedef struct TY119808 TY119808;
typedef struct reraiseerror3263 reraiseerror3263;
typedef struct TY84745 TY84745;
typedef struct rangeerror3259 rangeerror3259;
typedef struct oserror3233 oserror3233;
typedef struct indexerror3255 indexerror3255;
typedef struct TY226936 TY226936;
typedef struct assertionerror3247 assertionerror3247;
typedef struct TY269081 TY269081;
typedef struct ttypeseq226848 ttypeseq226848;
typedef struct ttype226852 ttype226852;
typedef struct TY419481 TY419481;
typedef struct tlinemap419480 tlinemap419480;
typedef struct TY419485 TY419485;
typedef struct tentry419478 tentry419478;
typedef struct tsym226846 tsym226846;
typedef struct tinstantiation226836 tinstantiation226836;
typedef struct TY226947 TY226947;
typedef struct tnodeseq226810 tnodeseq226810;
typedef struct tnode226816 tnode226816;
typedef struct slice84178 slice84178;
typedef struct divbyzeroerror3241 divbyzeroerror3241;
typedef struct tsymseq226818 tsymseq226818;
typedef struct TY337062 TY337062;
typedef struct jsonnodeobj337042 jsonnodeobj337042;
typedef struct TY337057 TY337057;
typedef struct TY337611 TY337611;
typedef struct tindexentry360264 tindexentry360264;
typedef struct TY192015 TY192015;
typedef struct tsocketimpl183607 tsocketimpl183607;
typedef struct tidobj201015 tidobj201015;
typedef struct tloc226830 tloc226830;
typedef struct trope178009 trope178009;
typedef struct tscope226840 tscope226840;
typedef struct tstrtable226820 tstrtable226820;
typedef struct tident201021 tident201021;
typedef struct tlineinfo196539 tlineinfo196539;
typedef struct tlib226834 tlib226834;
typedef struct tlistentry127022 tlistentry127022;
typedef N_NIMCALL_PTR(NIM_BOOL, TY8221) (Exception* e);
typedef N_NIMCALL_PTR(NIM_BOOL, TY8226) (Exception* e);
typedef N_NIMCALL_PTR(void, TY8231) (void);
typedef N_NIMCALL_PTR(void, TY3089) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3094) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3089 marker;
TY3094 deepcopy;
};
typedef tavlnode27208* TY27214[2];
struct  tavlnode27208  {
TY27214 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tcellseq44951  {
NI Len;
NI Cap;
tcell44935** D;
};
struct  tcellset44947  {
NI Counter;
NI Max;
tpagedesc44943* Head;
tpagedesc44943** Data;
};
typedef tsmallchunk26440* TY27222[512];
typedef ttrunk26413* ttrunkbuckets26415[256];
struct  tintset26417  {
ttrunkbuckets26415 Data;
};
struct  tmemregion27210  {
NI Minlargeobj;
NI Maxlargeobj;
TY27222 Freesmallchunks;
tllchunk27204* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26442* Freechunkslist;
tintset26417 Chunkstarts;
tavlnode27208* Root;
tavlnode27208* Deleted;
tavlnode27208* Last;
tavlnode27208* Freeavlnodes;
};
struct  tgcstat47014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq44951 Zct;
tcellseq44951 Decstack;
tcellset44947 Cycleroots;
tcellseq44951 Tempstack;
NI Recgclock;
tmemregion27210 Region;
tgcstat47014 Stat;
};
struct  tbasechunk26438  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26440  {
  tbasechunk26438 Sup;
tsmallchunk26440* Next;
tsmallchunk26440* Prev;
tfreecell26430* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tbigchunk26442  {
  tbasechunk26438 Sup;
tbigchunk26442* Next;
tbigchunk26442* Prev;
NI Align;
NF Data;
};
typedef NI TY26420[8];
struct  ttrunk26413  {
ttrunk26413* Next;
NI Key;
TY26420 Bits;
};
struct  tllchunk27204  {
NI Size;
NI Acc;
tllchunk27204* Next;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tfreecell26430  {
tfreecell26430* Next;
NI Zerofield;
};
typedef N_NIMCALL_PTR(void, TY16001) (NimStringDesc* msg);
typedef TFrame* TY16601[128];
struct  tcell44935  {
NI Refcount;
TNimType* Typ;
};
struct  tpagedesc44943  {
tpagedesc44943* Next;
NI Key;
TY26420 Bits;
};
typedef N_NIMCALL_PTR(void, TFinalizer) (void* self);
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  arithmeticerror3239  {
  Exception Sup;
};
struct  overflowerror3243  {
  arithmeticerror3239 Sup;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (Exception* e, void* ClEnv);
void* ClEnv;
} TY14809;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY14809 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP53) (Exception* e);
struct  systemerror3229  {
  Exception Sup;
};
struct  outofmemerror3253  {
  systemerror3229 Sup;
};
typedef NIM_CHAR TY17616[2001];
struct  valueerror3249  {
  Exception Sup;
};
struct  ioerror3231  {
  systemerror3229 Sup;
};
typedef NimStringDesc* TY198301[1];
typedef NimStringDesc* TY78011[5];
struct  reraiseerror3263  {
  Exception Sup;
};
struct TY84745 {
NimStringDesc* Field0;
NI Field1;
};
typedef NIM_CHAR TY75879[500];
struct  rangeerror3259  {
  Exception Sup;
};
struct  oserror3233  {
  systemerror3229 Sup;
NI32 Errorcode;
};
struct  indexerror3255  {
  Exception Sup;
};
typedef NIM_CHAR TY75804[65];
typedef NI32 TY612372[1];
struct  assertionerror3247  {
  Exception Sup;
};
struct TY269081 {
NI Field0;
NI Field1;
};
typedef ttype226852* TY412748[1];
struct  tentry419478  {
NI Pos;
tsym226846* Sym;
};
struct  tlinemap419480  {
TY419485* Entries;
};
typedef NIM_CHAR TY80835[60];
struct  tinstantiation226836  {
tsym226846* Sym;
ttypeseq226848* Concretetypes;
TY226936* Usedby;
};
typedef tinstantiation226836* TY492078[1];
typedef tnode226816* TY247892[1];
struct  slice84178  {
NI A;
NI B;
};
struct  divbyzeroerror3241  {
  arithmeticerror3239 Sup;
};
typedef tsym226846* TY291498[1];
struct TY337611 {
NimStringDesc* Field0;
jsonnodeobj337042* Field1;
};
struct  tindexentry360264  {
NimStringDesc* Keyword;
NimStringDesc* Link;
NimStringDesc* Linktitle;
NimStringDesc* Linkdesc;
};
struct  tidobj201015  {
  TNimObject Sup;
NI Id;
};
struct  tloc226830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype226852* T;
trope178009* R;
trope178009* Heaproot;
};
struct  ttype226852  {
  tidobj201015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq226848* Sons;
tnode226816* N;
tsym226846* Owner;
tsym226846* Sym;
tsym226846* Destructor;
tsym226846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc226830 Loc;
};
struct  tstrtable226820  {
NI Counter;
tsymseq226818* Data;
};
struct  tlineinfo196539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tsym226846  {
  tidobj201015 Sup;
NU8 Kind;
union {
struct {ttypeseq226848* Typeinstcache;
tscope226840* Typscope;
} S1;
struct {TY226947* Procinstcache;
tscope226840* Scope;
} S2;
struct {TY226947* Usedgenerics;
tstrtable226820 Tab;
} S3;
struct {tsym226846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype226852* Typ;
tident201021* Name;
tlineinfo196539 Info;
tsym226846* Owner;
NU32 Flags;
tnode226816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc226830 Loc;
tlib226834* Annex;
tnode226816* Constraint;
};
struct  tnode226816  {
ttype226852* Typ;
tlineinfo196539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym226846* Sym;
} S4;
struct {tident201021* Ident;
} S5;
struct {tnodeseq226810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  jsonnodeobj337042  {
NU8 Kind;
union {
struct {NimStringDesc* Str;
} S1;
struct {NI64 Num;
} S2;
struct {NF Fnum;
} S3;
struct {NIM_BOOL Bval;
} S4;
struct {TY337057* Fields;
} S6;
struct {TY337062* Elems;
} S7;
} kindU;
};
typedef NIM_CHAR TY183632[4001];
struct  tsocketimpl183607  {
int Fd;
NIM_BOOL Isbuffered;
union {
struct {TY183632 Buffer;
NI Currpos;
NI Buflen;
} S1;
} isbufferedU;
NIM_BOOL Nonblocking;
};
struct  trope178009  {
  TNimObject Sup;
trope178009* Left;
trope178009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tscope226840  {
NI Depthlevel;
tstrtable226820 Symbols;
tnodeseq226810* Usingsyms;
tscope226840* Parent;
};
struct  tident201021  {
  tidobj201015 Sup;
NimStringDesc* S;
tident201021* Next;
NI H;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib226834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope178009* Name;
tnode226816* Path;
};
struct TY119808 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY226936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct ttypeseq226848 {
  TGenericSeq Sup;
  ttype226852* data[SEQ_DECL_SIZE];
};
struct TY419485 {
  TGenericSeq Sup;
  tentry419478 data[SEQ_DECL_SIZE];
};
struct TY419481 {
  TGenericSeq Sup;
  tlinemap419480 data[SEQ_DECL_SIZE];
};
struct TY226947 {
  TGenericSeq Sup;
  tinstantiation226836* data[SEQ_DECL_SIZE];
};
struct tnodeseq226810 {
  TGenericSeq Sup;
  tnode226816* data[SEQ_DECL_SIZE];
};
struct tsymseq226818 {
  TGenericSeq Sup;
  tsym226846* data[SEQ_DECL_SIZE];
};
struct TY337062 {
  TGenericSeq Sup;
  jsonnodeobj337042* data[SEQ_DECL_SIZE];
};
struct TY337057 {
  TGenericSeq Sup;
  TY337611 data[SEQ_DECL_SIZE];
};
struct TY192015 {
  TGenericSeq Sup;
  tsocketimpl183607* data[SEQ_DECL_SIZE];
};
static N_INLINE(void, initallocator_9401)(void);
static N_INLINE(void, initStackBottom)(void);
N_NOINLINE(void, setStackBottom)(void* thestackbottom);
N_NIMCALL(void, initgc_9201)(void);
N_NIMCALL(void, init_45049)(tcellseq44951* s, NI cap);
N_NOCONV(void*, alloc0_5817)(NI size);
N_NIMCALL(void*, alloc0_43619)(tmemregion27210* allocator, NI size);
N_NIMCALL(void*, alloc_43434)(tmemregion27210* allocator, NI size);
N_NIMCALL(void*, rawalloc_34346)(tmemregion27210* a, NI requestedsize);
static N_INLINE(NI, roundup_26470)(NI x, NI v);
N_NIMCALL(tsmallchunk26440*, getsmallchunk_33828)(tmemregion27210* a);
N_NIMCALL(tbigchunk26442*, getbigchunk_33020)(tmemregion27210* a, NI size);
static N_INLINE(void, listremove_30803)(tbigchunk26442** head_30809, tbigchunk26442* c_30812);
N_NIMCALL(void, splitchunk_32815)(tmemregion27210* a, tbigchunk26442* c, NI size);
static N_INLINE(void, updateprevsize_29891)(tmemregion27210* a, tbigchunk26442* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_29821)(tmemregion27210* a, void* p);
N_NIMCALL(NIM_BOOL, contains_28795)(tintset26417* s, NI key);
N_NIMCALL(ttrunk26413*, intsetget_28724)(tintset26417* t, NI key);
static N_INLINE(NI, pageindex_29138)(void* p);
N_NIMCALL(void, incl_28824)(tmemregion27210* a, tintset26417* s, NI key);
N_NIMCALL(ttrunk26413*, intsetput_28760)(tmemregion27210* a, tintset26417* t, NI key);
N_NIMCALL(void*, llalloc_27459)(tmemregion27210* a, NI size);
static N_INLINE(void*, osallocpages_26214)(NI size);
N_NOINLINE(void, raiseoutofmem_25660)(void);
static N_INLINE(void, inccurrmem_27405)(tmemregion27210* a, NI bytes);
static N_INLINE(NI, pageindex_29130)(tbasechunk26438* c);
static N_INLINE(void, listadd_32031)(tbigchunk26442** head_32037, tbigchunk26442* c_32040);
N_NIMCALL(tbigchunk26442*, requestoschunks_29156)(tmemregion27210* a, NI size);
static N_INLINE(void, listadd_35205)(tsmallchunk26440** head_35211, tsmallchunk26440* c_35214);
static N_INLINE(void, listremove_38003)(tsmallchunk26440** head_38009, tsmallchunk26440* c_38012);
N_NIMCALL(void, add_28424)(tmemregion27210* a, tavlnode27208** t, NI key, NI upperbound);
N_NIMCALL(tavlnode27208*, allocavlnode_27636)(tmemregion27210* a, NI key, NI upperbound);
N_NIMCALL(void, skew_28396)(tavlnode27208** t);
N_NIMCALL(void, split_28404)(tavlnode27208** t);
N_NIMCALL(void, init_45070)(tcellset44947* s);
N_NOCONV(void, signalHandler)(int sig);
N_NIMCALL(void, showerrormessage_16209)(NCSTRING data);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void*, rawnewobj_54804)(TNimType* typ, NI size, tgcheap47016* gch);
N_NIMCALL(void, collectct_49010)(tgcheap47016* gch);
static N_INLINE(NI, getoccupiedmem_44870)(tmemregion27210* a);
N_NIMCALL(void, collectctbody_71619)(tgcheap47016* gch);
N_NOINLINE(NI, stacksize_69010)(void);
static N_INLINE(void, prepareforinteriorpointerchecking_42282)(tmemregion27210* a);
N_NIMCALL(NI, lowgauge_28218)(tavlnode27208* n);
N_NIMCALL(NI, highgauge_28249)(tavlnode27208* n);
N_CDECL(void, markstackandregisters_69240)(tgcheap47016* gch);
static N_INLINE(void, gcmark_67646)(tgcheap47016* gch, void* p);
static N_INLINE(tcell44935*, usrtocell_48646)(void* usr);
N_NIMCALL(void*, interiorallocatedptr_42289)(tmemregion27210* a, void* p);
static N_INLINE(tbasechunk26438*, pageaddr_29146)(void* p);
static N_INLINE(NIM_BOOL, chunkunused_29010)(tbasechunk26438* c);
static N_INLINE(NIM_BOOL, issmallchunk_28999)(tbasechunk26438* c);
N_NIMCALL(tavlnode27208*, inrange_28329)(tavlnode27208* root, NI key);
static N_INLINE(void, add_45023)(tcellseq44951* s, tcell44935* c);
N_NOCONV(void*, alloc_5801)(NI size);
N_NOCONV(void, dealloc_5848)(void* p);
N_NIMCALL(void, dealloc_43628)(tmemregion27210* allocator, void* p);
N_NIMCALL(void, rawdealloc_40623)(tmemregion27210* a, void* p);
N_NIMCALL(void, freebigchunk_30006)(tmemregion27210* a, tbigchunk26442* c_30010);
N_NIMCALL(void, excl_28838)(tintset26417* s, NI key);
N_NIMCALL(void, freeoschunks_29610)(tmemregion27210* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_26223)(void* p, NI size);
static N_INLINE(void, deccurrmem_27425)(tmemregion27210* a, NI bytes);
N_NIMCALL(void, del_28604)(tmemregion27210* a, tavlnode27208** t, NI x);
static N_INLINE(void, deallocavlnode_28206)(tmemregion27210* a, tavlnode27208* n);
N_NIMCALL(void, markthreadstacks_68206)(tgcheap47016* gch);
N_NIMCALL(NIM_BOOL, collectzct_67012)(tgcheap47016* gch);
static N_INLINE(NIM_BOOL, canbecycleroot_48667)(tcell44935* c);
N_NIMCALL(void, excl_45702)(tcellset44947* s, tcell44935* cell);
N_NIMCALL(tpagedesc44943*, cellsetget_45122)(tcellset44947* t, NI key);
static N_INLINE(NI, nexttry_45114)(NI h, NI maxhash);
N_NIMCALL(void, preparedealloc_49208)(tcell44935* cell);
static N_INLINE(void*, celltousr_48625)(tcell44935* cell);
N_NIMCALL(void, forallchildren_49017)(tcell44935* cell, NU8 op);
N_NIMCALL(void, forallchildrenaux_49025)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, dooperation_49021)(void* p, NU8 op);
static N_INLINE(void, decref_50604)(tcell44935* c);
static N_INLINE(void, rtladdzct_50204)(tcell44935* c);
N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c);
static N_INLINE(void, rtladdcycleroot_49429)(tcell44935* c);
N_NOINLINE(void, incl_45671)(tcellset44947* s, tcell44935* cell);
N_NIMCALL(tpagedesc44943*, cellsetput_45466)(tcellset44947* t, NI key);
N_NIMCALL(void, cellsetenlarge_45412)(tcellset44947* t);
N_NIMCALL(void, cellsetrawinsert_45156)(tcellset44947* t, tpagedesc44943** data, tpagedesc44943* desc);
N_NIMCALL(void, markgray_64205)(tcell44935* s);
N_NIMCALL(void, scan_64604)(tcell44935* s);
N_NIMCALL(void, scanblack_64404)(tcell44935* s);
N_NIMCALL(void, collectwhite_64804)(tcell44935* s);
N_NIMCALL(NIM_BOOL, contains_45623)(tcellset44947* s, tcell44935* cell);
N_NIMCALL(void, freecycliccell_63427)(tgcheap47016* gch, tcell44935* c);
N_NIMCALL(void, forallslotsaux_53208)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_25410)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_25137)(void* aa, TNimNode* n);
N_NIMCALL(void, collectcycles_67245)(tgcheap47016* gch);
N_NIMCALL(void, markroots_65005)(tgcheap47016* gch);
N_NIMCALL(void, collectroots_67201)(tgcheap47016* gch);
N_NIMCALL(void, cellsetreset_53201)(tcellset44947* s);
N_NIMCALL(void, deinit_45081)(tcellset44947* s);
N_NIMCALL(NI, getoccupiedmem_6495)(void);
N_NIMCALL(NI, gettotalmem_6499)(void);
N_NIMCALL(NI, getfreemem_6497)(void);
N_NIMCALL(void, unmarkstackandregisters_71411)(tgcheap47016* gch);
static N_INLINE(void, addnewobjtozct_54290)(tcell44935* res, tgcheap47016* gch);
N_NIMCALL(void, writetostderr_16201)(NCSTRING msg);
N_NIMCALL(void, write_12877)(FILE* f, NCSTRING c);
N_NIMCALL(void, registersignalhandler_19808)(void);
N_NIMCALL(NI, getRefcount)(void* p);
N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP50)(void* p, NI op);
N_NIMCALL(void, TMP51)(void* p, NI op);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
N_NIMCALL(void, raiseexceptionaux_17404)(Exception* e);
static N_INLINE(void, pushCurrentException)(Exception* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_51025)(tcell44935* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isobjslowpath_21825)(TNimType* obj, TNimType* subclass, TNimType** cache);
static N_INLINE(void, quitordebug_17201)(void);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NOINLINE(NIM_BOOL, isonstack_49014)(void* p);
N_NIMCALL(void, TMP137)(void* p, NI op);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, genericresetaux_78601)(void* dest, TNimNode* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_74828, NI last);
static N_INLINE(NI, resize_74601)(NI old);
N_NIMCALL(void*, growobj_63418)(void* old, NI newsize);
N_NIMCALL(void*, growobj_60406)(void* old, NI newsize, tgcheap47016* gch);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(void, genericassignaux_78606)(void* dest, void* src, TNimType* mt, NIM_BOOL shallow);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
N_NIMCALL(void, genericassignaux_78612)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
N_NIMCALL(NI, writebuffer_13046)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_76805)(NimStringDesc* msg);
N_NIMCALL(void, TMP150)(void* p, NI op);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_197676)(TY119808* x_197682, TY119808* y_197687);
static N_INLINE(void*, seqtoptr_197692)(TY119808* x_197698);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(void, TMP829)(void* p, NI op);
N_NIMCALL(void, objectinitaux_79692)(void* dest, TNimNode* n);
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void*, realloc_44607)(tmemregion27210* allocator, void* p, NI newsize);
N_NIMCALL(NI, ptrsize_43216)(void* p);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NIM_BOOL, open_12603)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(void, TMP1042)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_CHAR, getdecimalpoint_75860)(void);
N_NIMCALL(void, TMP1075)(void* p, NI op);
N_NIMCALL(void, TMP1078)(void* p, NI op);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_612232)(TY226936* x_612238, TY226936* y_612243);
static N_INLINE(void*, seqtoptr_612248)(TY226936* x_612254);
N_NIMCALL(void, write_12865)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, TMP2177)(void* p, NI op);
N_NIMCALL(FILE*, open_12617)(NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readallfile_77539)(FILE* file);
N_NIMCALL(NI, rawfilesize_77519)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_77528)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_13027)(FILE* f, void* buffer, NI len);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void*, seqtoptr_274513)(ttypeseq226848* x_274519);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_274497)(ttypeseq226848* x_274503, ttypeseq226848* y_274508);
static N_INLINE(void*, seqtoptr_419648)(TY419481* x_419654);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419739)(tlinemap419480 x_419743, tlinemap419480 y_419745);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419758)(TY419485* x_419764, TY419485* y_419769);
static N_INLINE(void*, seqtoptr_419774)(TY419485* x_419780);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419865)(tentry419478 x_419869, tentry419478 y_419871);
static N_INLINE(void*, seqtoptr_230354)(TY226947* x_230360);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_230338)(TY226947* x_230344, TY226947* y_230349);
static N_INLINE(void*, seqtoptr_316683)(tnodeseq226810* x_316689);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_316667)(tnodeseq226810* x_316673, tnodeseq226810* y_316678);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void*, seqtoptr_492417)(tsymseq226818* x_492423);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_492401)(tsymseq226818* x_492407, tsymseq226818* y_492412);
static N_INLINE(void*, seqtoptr_338098)(TY337062* x_338104);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_337893)(jsonnodeobj337042* a, jsonnodeobj337042* b);
static N_INLINE(void*, seqtoptr_338253)(TY337057* x_338259);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_338344)(TY337611 x_338348, TY337611 y_338350);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_12889)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, TMP4872)(void* p, NI op);
static N_INLINE(void, gcdisable_8001)(void);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
static N_INLINE(void, gcenable_8003)(void);
STRING_LITERAL(TMP2, "out of memory", 13);
STRING_LITERAL(TMP52, "over- or underflow", 18);
STRING_LITERAL(TMP138, "attempt to write to a nil address", 33);
STRING_LITERAL(TMP151, "cannot write string to file", 27);
STRING_LITERAL(TMP1025, "rb", 2);
STRING_LITERAL(TMP1026, "wb", 2);
STRING_LITERAL(TMP1027, "w+b", 3);
STRING_LITERAL(TMP1028, "r+b", 3);
STRING_LITERAL(TMP1029, "ab", 2);
NIM_CONST TY78011 formatopen_78010 = {((NimStringDesc*) &TMP1025),
((NimStringDesc*) &TMP1026),
((NimStringDesc*) &TMP1027),
((NimStringDesc*) &TMP1028),
((NimStringDesc*) &TMP1029)}
;
STRING_LITERAL(TMP1041, "cannot open: ", 13);
STRING_LITERAL(TMP1043, "no exception to reraise", 23);
STRING_LITERAL(TMP1044, "(", 1);
STRING_LITERAL(TMP1045, ", ", 2);
STRING_LITERAL(TMP1046, "filename", 8);
STRING_LITERAL(TMP1047, ": ", 2);
STRING_LITERAL(TMP1048, "line", 4);
STRING_LITERAL(TMP1049, ")", 1);
STRING_LITERAL(TMP1241, " (invalid data!)", 16);
STRING_LITERAL(TMP2621, "error while reading from file", 29);
STRING_LITERAL(TMP2715, "cannot set file position", 24);
STRING_LITERAL(TMP2716, "cannot retrieve file position", 29);
STRING_LITERAL(TMP4779, "true", 4);
STRING_LITERAL(TMP4780, "false", 5);
STRING_LITERAL(TMP4861, "EOF reached", 11);
STRING_LITERAL(TMP4881, "[GC] total memory: ", 19);
STRING_LITERAL(TMP4882, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP4883, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP4884, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP4885, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP4886, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP4887, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP4888, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP4889, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP4890, "\012[GC] max pause time [ms]: ", 27);
NI nim_program_result;
TY8221 globalraisehook_8225;
TY8226 localraisehook_8230;
TY8231 outofmemhook_8233;
TNimType strdesc_9804;
TY16001 errormessagewriter_16004;
TFrame* frameptr_16242;
TSafePoint* exchandler_16243;
Exception* currexception_16245;
TY16601 tempframes_16604;
tavlnode27208 bottomdata_27238;
tavlnode27208* bottom_27239;
tgcheap47016 gch_47044;
NIM_BOOL localgcinitialized_53004;
NIM_CHAR decimalpoint_75859;
TNimType NTI3211; /* RootObj */
TNimType NTI108; /* int */
TNimType NTI149; /* string */
TNimType NTI3227; /* Exception */
TNimType NTI8222; /* ref Exception */
TNimType NTI151; /* cstring */
TNimType NTI3239; /* ArithmeticError */
TNimType NTI3243; /* OverflowError */
TNimType NTI22201; /* ref OverflowError */
TNimType NTI3229; /* SystemError */
TNimType NTI3253; /* OutOfMemError */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI114; /* int32 */
TNimType NTI3249; /* ValueError */
TNimType NTI21401; /* ref ValueError */
TNimType NTI112; /* int16 */
TNimType NTI3231; /* IOError */
TNimType NTI77001; /* ref IOError */
extern TNimType NTI119808; /* seq[string] */
TNimType NTI138; /* bool */
TNimType NTI5510; /* BiggestInt */
TNimType NTI5512; /* BiggestFloat */
TNimType NTI3213; /* RootRef */
TNimType NTI153; /* pointer */
TNimType NTI5611; /* cint */
TNimType NTI26420; /* array[0..7, int] */
TNimType NTI3207; /* Natural */
TNimType NTI128; /* float */
TNimType NTI12402; /* CFile */
TNimType NTI12404; /* File */
TNimType NTI110; /* int8 */
TNimType NTI3263; /* ReraiseError */
TNimType NTI18001; /* ref ReraiseError */
TNimType NTI3259; /* RangeError */
TNimType NTI3233; /* OSError */
TNimType NTI114812; /* ref OSError */
TNimType NTI3255; /* IndexError */
TNimType NTI123617; /* ref IndexError */
extern TNimType NTI226936; /* seq[int32] */
TNimType NTI124; /* uint32 */
TNimType NTI3247; /* AssertionError */
TNimType NTI84801; /* ref AssertionError */
extern TNimType NTI226848; /* TTypeSeq */
TNimType NTI12408; /* FileHandle */
extern TNimType NTI226838; /* PInstantiation */
extern TNimType NTI226947; /* seq[PInstantiation] */
extern TNimType NTI226810; /* TNodeSeq */
TNimType NTI3241; /* DivByZeroError */
extern TNimType NTI226818; /* TSymSeq */
TNimType NTI147; /* char */
extern TNimType NTI183609; /* Socket */
TNimType NTI192015; /* seq[Socket] */

static N_INLINE(void, initallocator_9401)(void) {
	bottom_27239 = (&bottomdata_27238);
	(*bottom_27239).Link[(0)- 0] = bottom_27239;
	(*bottom_27239).Link[(1)- 0] = bottom_27239;
}

N_NOINLINE(void, setStackBottom)(void* thestackbottom) {
	{
		if (!(gch_47044.Stackbottom == NIM_NIL)) goto LA3;
		gch_47044.Stackbottom = thestackbottom;
	}
	goto LA1;
	LA3: ;
	{
		NI a;
		NI b;
		a = ((NI) (thestackbottom));
		b = ((NI) (gch_47044.Stackbottom));
		gch_47044.Stackbottom = ((void*) (((a >= b) ? a : b)));
	}
	LA1: ;
}

static N_INLINE(void, initStackBottom)(void) {
	void* volatile locals;
	locals = 0;
	locals = ((void*) ((&locals)));
	setStackBottom(locals);
}

static N_INLINE(NI, roundup_26470)(NI x, NI v) {
	NI result;
	result = 0;
	result = (NI)((NI64)(x + (NI64)(v - 1)) & (NI)((NU64) ~((NI64)(v - 1))));
	return result;
}

static N_INLINE(void, listremove_30803)(tbigchunk26442** head_30809, tbigchunk26442* c_30812) {
	{
		if (!(c_30812 == (*head_30809))) goto LA3;
		(*head_30809) = (*c_30812).Next;
		{
			if (!!(((*head_30809) == NIM_NIL))) goto LA7;
			(*(*head_30809)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_30812).Prev).Next = (*c_30812).Next;
		{
			if (!!(((*c_30812).Next == NIM_NIL))) goto LA12;
			(*(*c_30812).Next).Prev = (*c_30812).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_30812).Next = NIM_NIL;
	(*c_30812).Prev = NIM_NIL;
}

N_NIMCALL(ttrunk26413*, intsetget_28724)(tintset26417* t, NI key) {
	ttrunk26413* result;
	ttrunk26413* it;
	result = 0;
	it = (*t).Data[((NI)(key & 255))- 0];
	{
		while (1) {
			if (!!((it == NIM_NIL))) goto LA2;
			{
				if (!((*it).Key == key)) goto LA5;
				result = it;
				goto BeforeRet;
			}
			LA5: ;
			it = (*it).Next;
		} LA2: ;
	}
	result = NIM_NIL;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, contains_28795)(tintset26417* s, NI key) {
	NIM_BOOL result;
	ttrunk26413* t;
	result = 0;
	t = intsetget_28724(s, (NI)((NU64)(key) >> (NU64)(9)));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & 511);
		result = !(((NI)((*t).Bits[((NI)((NU64)(((NI) (u))) >> (NU64)(6)))- 0] & (NI)((NU64)(1) << (NU64)(((NI) ((NI)(((NI) (u)) & 63)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

static N_INLINE(NI, pageindex_29138)(void* p) {
	NI result;
	result = 0;
	result = (NI)((NU64)(((NI) (p))) >> (NU64)(12));
	return result;
}

static N_INLINE(NIM_BOOL, isaccessible_29821)(tmemregion27210* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = pageindex_29138(p);
	result = contains_28795((&(*a).Chunkstarts), LOC1);
	return result;
}

static N_INLINE(void, updateprevsize_29891)(tmemregion27210* a, tbigchunk26442* c, NI prevsize) {
	tbasechunk26438* ri;
	ri = ((tbasechunk26438*) ((NI)((NU64)(((NI) (c))) + (NU64)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_29821((&(*a)), ((void*) (ri)));
		if (!LOC3) goto LA4;
		(*ri).Prevsize = prevsize;
	}
	LA4: ;
}

N_NOINLINE(void, raiseoutofmem_25660)(void) {
	{
		if (!!((outofmemhook_8233 == NIM_NIL))) goto LA3;
		outofmemhook_8233();
	}
	LA3: ;
	printf("%s\012", (((NimStringDesc*) &TMP2))->data);
	exit(1);
}

static N_INLINE(void*, osallocpages_26214)(NI size) {
	void* result;
	result = 0;
	result = mmap(NIM_NIL, size, ((int) 3), (NI32)(((NI32) 2) | MAP_ANONYMOUS), ((int) -1), 0);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (result == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = (result == ((void*) -1));
		LA4: ;
		if (!LOC3) goto LA5;
		raiseoutofmem_25660();
	}
	LA5: ;
	return result;
}

static N_INLINE(void, inccurrmem_27405)(tmemregion27210* a, NI bytes) {
	(*a).Currmem += bytes;
}

N_NIMCALL(void*, llalloc_27459)(tmemregion27210* a, NI size) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tllchunk27204* old;
		void* LOC7;
		LOC3 = 0;
		LOC3 = ((*a).Llmem == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = ((*(*a).Llmem).Size < size);
		LA4: ;
		if (!LOC3) goto LA5;
		old = (*a).Llmem;
		LOC7 = 0;
		LOC7 = osallocpages_26214(4096);
		(*a).Llmem = ((tllchunk27204*) (LOC7));
		inccurrmem_27405(a, 4096);
		(*(*a).Llmem).Size = (NI64)(4096 - ((NI)sizeof(tllchunk27204)));
		(*(*a).Llmem).Acc = ((NI)sizeof(tllchunk27204));
		(*(*a).Llmem).Next = old;
	}
	LA5: ;
	result = ((void*) ((NI64)(((NI) ((*a).Llmem)) + (*(*a).Llmem).Acc)));
	(*(*a).Llmem).Size -= size;
	(*(*a).Llmem).Acc += size;
	zeroMem(result, size);
	return result;
}

N_NIMCALL(ttrunk26413*, intsetput_28760)(tmemregion27210* a, tintset26417* t, NI key) {
	ttrunk26413* result;
	result = 0;
	result = intsetget_28724((&(*t)), key);
	{
		void* LOC5;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = llalloc_27459(a, ((NI)sizeof(ttrunk26413)));
		result = ((ttrunk26413*) (LOC5));
		(*result).Next = (*t).Data[((NI)(key & 255))- 0];
		(*t).Data[((NI)(key & 255))- 0] = result;
		(*result).Key = key;
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, incl_28824)(tmemregion27210* a, tintset26417* s, NI key) {
	ttrunk26413* t;
	NI u;
	t = intsetput_28760(a, s, (NI)((NU64)(key) >> (NU64)(9)));
	u = (NI)(key & 511);
	(*t).Bits[((NI)((NU64)(((NI) (u))) >> (NU64)(6)))- 0] = (NI)((*t).Bits[((NI)((NU64)(((NI) (u))) >> (NU64)(6)))- 0] | (NI)((NU64)(1) << (NU64)(((NI) ((NI)(((NI) (u)) & 63))))));
}

static N_INLINE(NI, pageindex_29130)(tbasechunk26438* c) {
	NI result;
	result = 0;
	result = (NI)((NU64)(((NI) (c))) >> (NU64)(12));
	return result;
}

static N_INLINE(void, listadd_32031)(tbigchunk26442** head_32037, tbigchunk26442* c_32040) {
	(*c_32040).Next = (*head_32037);
	{
		if (!!(((*head_32037) == NIM_NIL))) goto LA3;
		(*(*head_32037)).Prev = c_32040;
	}
	LA3: ;
	(*head_32037) = c_32040;
}

N_NIMCALL(void, splitchunk_32815)(tmemregion27210* a, tbigchunk26442* c, NI size) {
	tbigchunk26442* rest;
	tbasechunk26438* LOC1;
	NI LOC2;
	rest = ((tbigchunk26442*) ((NI)((NU64)(((NI) (c))) + (NU64)(size))));
	(*rest).Sup.Size = (NI64)((*c).Sup.Size - size);
	(*rest).Sup.Used = NIM_FALSE;
	(*rest).Next = NIM_NIL;
	(*rest).Prev = NIM_NIL;
	(*rest).Sup.Prevsize = size;
	updateprevsize_29891(a, c, (*rest).Sup.Size);
	(*c).Sup.Size = size;
	LOC1 = 0;
	LOC1 = &rest->Sup;
	LOC2 = 0;
	LOC2 = pageindex_29130(LOC1);
	incl_28824(a, (&(*a).Chunkstarts), LOC2);
	listadd_32031((&(*a).Freechunkslist), rest);
}

N_NIMCALL(tbigchunk26442*, requestoschunks_29156)(tmemregion27210* a, NI size) {
	tbigchunk26442* result;
	void* LOC1;
	NI nxt;
	tbasechunk26438* next;
	NI lastsize;
	NI prv;
	tbasechunk26438* prev;
	result = 0;
	inccurrmem_27405(a, size);
	(*a).Freemem += size;
	LOC1 = 0;
	LOC1 = osallocpages_26214(size);
	result = ((tbigchunk26442*) (LOC1));
	(*result).Next = NIM_NIL;
	(*result).Prev = NIM_NIL;
	(*result).Sup.Used = NIM_FALSE;
	(*result).Sup.Size = size;
	nxt = (NI)((NU64)(((NI) (result))) + (NU64)(size));
	next = ((tbasechunk26438*) (nxt));
	{
		NI LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC4 = pageindex_29130(next);
		LOC5 = 0;
		LOC5 = contains_28795((&(*a).Chunkstarts), LOC4);
		if (!LOC5) goto LA6;
		(*next).Prevsize = size;
	}
	LA6: ;
	{
		if (!!(((*a).Lastsize == 0))) goto LA10;
		lastsize = (*a).Lastsize;
	}
	goto LA8;
	LA10: ;
	{
		lastsize = 4096;
	}
	LA8: ;
	prv = (NI)((NU64)(((NI) (result))) - (NU64)(lastsize));
	prev = ((tbasechunk26438*) (prv));
	{
		NIM_BOOL LOC15;
		NI LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = pageindex_29130(prev);
		LOC15 = contains_28795((&(*a).Chunkstarts), LOC16);
		if (!(LOC15)) goto LA17;
		LOC15 = ((*prev).Size == lastsize);
		LA17: ;
		if (!LOC15) goto LA18;
		(*result).Sup.Prevsize = lastsize;
	}
	goto LA13;
	LA18: ;
	{
		(*result).Sup.Prevsize = 0;
	}
	LA13: ;
	(*a).Lastsize = size;
	return result;
}

N_NIMCALL(tbigchunk26442*, getbigchunk_33020)(tmemregion27210* a, NI size) {
	tbigchunk26442* result;
	tbasechunk26438* LOC16;
	NI LOC17;
	result = 0;
	result = (*a).Freechunkslist;
	{
		{
			while (1) {
				if (!!((result == NIM_NIL))) goto LA3;
				{
					if (!((*result).Sup.Size == size)) goto LA6;
					listremove_30803((&(*a).Freechunkslist), result);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					if (!(size < (*result).Sup.Size)) goto LA9;
					listremove_30803((&(*a).Freechunkslist), result);
					splitchunk_32815(a, result, size);
					goto LA1;
				}
				goto LA4;
				LA9: ;
				LA4: ;
				result = (*result).Next;
			} LA3: ;
		}
		{
			if (!(size < 524288)) goto LA13;
			result = requestoschunks_29156(a, 524288);
			splitchunk_32815(a, result, size);
		}
		goto LA11;
		LA13: ;
		{
			result = requestoschunks_29156(a, size);
		}
		LA11: ;
	} LA1: ;
	(*result).Sup.Prevsize = 0;
	(*result).Sup.Used = NIM_TRUE;
	LOC16 = 0;
	LOC16 = &result->Sup;
	LOC17 = 0;
	LOC17 = pageindex_29130(LOC16);
	incl_28824(a, (&(*a).Chunkstarts), LOC17);
	(*a).Freemem -= size;
	return result;
}

N_NIMCALL(tsmallchunk26440*, getsmallchunk_33828)(tmemregion27210* a) {
	tsmallchunk26440* result;
	tbigchunk26442* res;
	result = 0;
	res = getbigchunk_33020(a, 4096);
	result = ((tsmallchunk26440*) (res));
	return result;
}

static N_INLINE(void, listadd_35205)(tsmallchunk26440** head_35211, tsmallchunk26440* c_35214) {
	(*c_35214).Next = (*head_35211);
	{
		if (!!(((*head_35211) == NIM_NIL))) goto LA3;
		(*(*head_35211)).Prev = c_35214;
	}
	LA3: ;
	(*head_35211) = c_35214;
}

static N_INLINE(void, listremove_38003)(tsmallchunk26440** head_38009, tsmallchunk26440* c_38012) {
	{
		if (!(c_38012 == (*head_38009))) goto LA3;
		(*head_38009) = (*c_38012).Next;
		{
			if (!!(((*head_38009) == NIM_NIL))) goto LA7;
			(*(*head_38009)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_38012).Prev).Next = (*c_38012).Next;
		{
			if (!!(((*c_38012).Next == NIM_NIL))) goto LA12;
			(*(*c_38012).Next).Prev = (*c_38012).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_38012).Next = NIM_NIL;
	(*c_38012).Prev = NIM_NIL;
}

N_NIMCALL(tavlnode27208*, allocavlnode_27636)(tmemregion27210* a, NI key, NI upperbound) {
	tavlnode27208* result;
	result = 0;
	{
		if (!!(((*a).Freeavlnodes == NIM_NIL))) goto LA3;
		result = (*a).Freeavlnodes;
		(*a).Freeavlnodes = (*(*a).Freeavlnodes).Link[(0)- 0];
	}
	goto LA1;
	LA3: ;
	{
		void* LOC6;
		LOC6 = 0;
		LOC6 = llalloc_27459(a, ((NI)sizeof(tavlnode27208)));
		result = ((tavlnode27208*) (LOC6));
	}
	LA1: ;
	(*result).Key = key;
	(*result).Upperbound = upperbound;
	(*result).Link[(0)- 0] = bottom_27239;
	(*result).Link[(1)- 0] = bottom_27239;
	(*result).Level = 1;
	return result;
}

N_NIMCALL(void, skew_28396)(tavlnode27208** t) {
	{
		tavlnode27208* temp;
		if (!((*(*(*t)).Link[(0)- 0]).Level == (*(*t)).Level)) goto LA3;
		temp = (*t);
		(*t) = (*(*t)).Link[(0)- 0];
		(*temp).Link[(0)- 0] = (*(*t)).Link[(1)- 0];
		(*(*t)).Link[(1)- 0] = temp;
	}
	LA3: ;
}

N_NIMCALL(void, split_28404)(tavlnode27208** t) {
	{
		tavlnode27208* temp;
		if (!((*(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]).Level == (*(*t)).Level)) goto LA3;
		temp = (*t);
		(*t) = (*(*t)).Link[(1)- 0];
		(*temp).Link[(1)- 0] = (*(*t)).Link[(0)- 0];
		(*(*t)).Link[(0)- 0] = temp;
		(*(*t)).Level += 1;
	}
	LA3: ;
}

N_NIMCALL(void, add_28424)(tmemregion27210* a, tavlnode27208** t, NI key, NI upperbound) {
	{
		if (!((*t) == bottom_27239)) goto LA3;
		(*t) = allocavlnode_27636(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!((NU64)(key) < (NU64)((*(*t)).Key))) goto LA8;
			add_28424(a, &(*(*t)).Link[(0)- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			if (!((NU64)((*(*t)).Key) < (NU64)(key))) goto LA11;
			add_28424(a, &(*(*t)).Link[(1)- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		skew_28396(t);
		split_28404(t);
	}
	LA1: ;
}

N_NIMCALL(void*, rawalloc_34346)(tmemregion27210* a, NI requestedsize) {
	void* result;
	NI size;
	result = 0;
	size = roundup_26470(requestedsize, 8);
	{
		NI s;
		tsmallchunk26440* c;
		if (!(size <= (NI64)(4096 - (NI64)(((NI)sizeof(tsmallchunk26440)) - 8)))) goto LA3;
		s = (NI64)(size / 8);
		c = (*a).Freesmallchunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7;
			c = getsmallchunk_33828(a);
			(*c).Freelist = NIM_NIL;
			(*c).Sup.Size = size;
			(*c).Acc = size;
			(*c).Free = (NI64)((NI64)(4096 - (NI64)(((NI)sizeof(tsmallchunk26440)) - 8)) - size);
			(*c).Next = NIM_NIL;
			(*c).Prev = NIM_NIL;
			listadd_35205((&(*a).Freesmallchunks[(s)- 0]), c);
			result = ((void*) ((&(*c).Data)));
		}
		goto LA5;
		LA7: ;
		{
			{
				if (!((*c).Freelist == NIM_NIL)) goto LA12;
				result = ((void*) ((NI)((NU64)(((NI) ((&(*c).Data)))) + (NU64)((*c).Acc))));
				(*c).Acc += size;
			}
			goto LA10;
			LA12: ;
			{
				result = ((void*) ((*c).Freelist));
				(*c).Freelist = (*(*c).Freelist).Next;
			}
			LA10: ;
			(*c).Free -= size;
		}
		LA5: ;
		{
			if (!((*c).Free < size)) goto LA17;
			listremove_38003((&(*a).Freesmallchunks[(s)- 0]), c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		tbigchunk26442* c;
		size = roundup_26470((NI64)(requestedsize + (NI64)(((NI)sizeof(tbigchunk26442)) - 8)), 4096);
		c = getbigchunk_33020(a, size);
		result = ((void*) ((&(*c).Data)));
		{
			if (!((*a).Root == NIM_NIL)) goto LA22;
			(*a).Root = bottom_27239;
		}
		LA22: ;
		add_28424(a, &(*a).Root, ((NI) (result)), (NI)((NU64)(((NI) (result))) + (NU64)(size)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, alloc_43434)(tmemregion27210* allocator, NI size) {
	void* result;
	result = 0;
	result = rawalloc_34346(allocator, (NI64)(size + ((NI)sizeof(tfreecell26430))));
	(*((tfreecell26430*) (result))).Zerofield = 1;
	result = ((void*) ((NI)((NU64)(((NI) (result))) + (NU64)(((NI)sizeof(tfreecell26430))))));
	return result;
}

N_NIMCALL(void*, alloc0_43619)(tmemregion27210* allocator, NI size) {
	void* result;
	result = 0;
	result = alloc_43434(allocator, size);
	zeroMem(result, size);
	return result;
}

N_NOCONV(void*, alloc0_5817)(NI size) {
	void* result;
	result = 0;
	result = alloc0_43619((&gch_47044.Region), size);
	return result;
}

N_NIMCALL(void, init_45049)(tcellseq44951* s, NI cap) {
	void* LOC1;
	(*s).Len = 0;
	(*s).Cap = cap;
	LOC1 = 0;
	LOC1 = alloc0_5817((NI64)(cap * 8));
	(*s).D = ((tcell44935**) (LOC1));
}

N_NIMCALL(void, init_45070)(tcellset44947* s) {
	void* LOC1;
	LOC1 = 0;
	LOC1 = alloc0_5817(8192);
	(*s).Data = ((tpagedesc44943**) (LOC1));
	(*s).Max = 1023;
	(*s).Counter = 0;
	(*s).Head = NIM_NIL;
}

N_NIMCALL(void, initgc_9201)(void) {
	gch_47044.Cyclethreshold = 4194304;
	gch_47044.Stat.Stackscans = 0;
	gch_47044.Stat.Cyclecollections = 0;
	gch_47044.Stat.Maxthreshold = 0;
	gch_47044.Stat.Maxstacksize = 0;
	gch_47044.Stat.Maxstackcells = 0;
	gch_47044.Stat.Cycletablesize = 0;
	init_45049((&gch_47044.Zct), 1024);
	init_45049((&gch_47044.Tempstack), 1024);
	init_45070((&gch_47044.Cycleroots));
	init_45049((&gch_47044.Decstack), 1024);
}

static N_INLINE(NI, getoccupiedmem_44870)(tmemregion27210* a) {
	NI result;
	result = 0;
	result = (NI64)((*a).Currmem - (*a).Freemem);
	return result;
}

N_NOINLINE(NI, stacksize_69010)(void) {
	NI result;
	void* volatile stacktop;
	result = 0;
	stacktop = 0;
	result = ((NI64)(((NI) ((&stacktop))) - ((NI) (gch_47044.Stackbottom))) > 0? ((NI64)(((NI) ((&stacktop))) - ((NI) (gch_47044.Stackbottom)))) : -((NI64)(((NI) ((&stacktop))) - ((NI) (gch_47044.Stackbottom)))));
	return result;
}

N_NIMCALL(NI, lowgauge_28218)(tavlnode27208* n) {
	NI result;
	tavlnode27208* it;
	result = 0;
	it = n;
	{
		while (1) {
			if (!!((it == bottom_27239))) goto LA2;
			result = (*it).Key;
			it = (*it).Link[(0)- 0];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NI, highgauge_28249)(tavlnode27208* n) {
	NI result;
	tavlnode27208* it;
	result = 0;
	result = -1;
	it = n;
	{
		while (1) {
			if (!!((it == bottom_27239))) goto LA2;
			result = (*it).Upperbound;
			it = (*it).Link[(1)- 0];
		} LA2: ;
	}
	return result;
}

static N_INLINE(void, prepareforinteriorpointerchecking_42282)(tmemregion27210* a) {
	(*a).Minlargeobj = lowgauge_28218((*a).Root);
	(*a).Maxlargeobj = highgauge_28249((*a).Root);
}

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

static N_INLINE(tbasechunk26438*, pageaddr_29146)(void* p) {
	tbasechunk26438* result;
	result = 0;
	result = ((tbasechunk26438*) ((NI)(((NI) (p)) & -4096)));
	return result;
}

static N_INLINE(NIM_BOOL, chunkunused_29010)(tbasechunk26438* c) {
	NIM_BOOL result;
	result = 0;
	result = !((*c).Used);
	return result;
}

static N_INLINE(NIM_BOOL, issmallchunk_28999)(tbasechunk26438* c) {
	NIM_BOOL result;
	result = 0;
	result = ((*c).Size <= (NI64)(4096 - (NI64)(((NI)sizeof(tsmallchunk26440)) - 8)));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tavlnode27208*, inrange_28329)(tavlnode27208* root, NI key) {
	tavlnode27208* result;
	tavlnode27208* it;
	result = 0;
	it = root;
	{
		while (1) {
			if (!!((it == bottom_27239))) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = ((NU64)((*it).Key) <= (NU64)(key));
				if (!(LOC5)) goto LA6;
				LOC5 = ((NU64)(key) < (NU64)((*it).Upperbound));
				LA6: ;
				if (!LOC5) goto LA7;
				result = it;
				goto BeforeRet;
			}
			LA7: ;
			it = (*it).Link[(((NU64)((*it).Key) < (NU64)(key)))- 0];
		} LA2: ;
	}
	BeforeRet: ;
	return result;
}

N_NIMCALL(void*, interiorallocatedptr_42289)(tmemregion27210* a, void* p) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tbasechunk26438* c_42294;
		LOC3 = 0;
		LOC3 = isaccessible_29821(a, p);
		if (!LOC3) goto LA4;
		c_42294 = pageaddr_29146(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_29010(c_42294);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				tsmallchunk26440* c;
				NI offset;
				LOC13 = 0;
				LOC13 = issmallchunk_28999(c_42294);
				if (!LOC13) goto LA14;
				c = ((tsmallchunk26440*) (c_42294));
				offset = (NI)((NU64)((NI)(((NI) (p)) & 4095)) - (NU64)((NI64)(((NI)sizeof(tsmallchunk26440)) - 8)));
				{
					tfreecell26430* d;
					if (!((NU64)(offset) < (NU64)((*c).Acc))) goto LA18;
					d = ((tfreecell26430*) ((NI)((NU64)((NI)((NU64)(((NI) ((&(*c).Data)))) + (NU64)(offset))) - (NU64)((NI)((NU64)(offset) % (NU64)((*c).Sup.Size))))));
					{
						if (!((NU64)(1) < (NU64)((*d).Zerofield))) goto LA22;
						result = ((void*) (d));
					}
					LA22: ;
				}
				LA18: ;
			}
			goto LA11;
			LA14: ;
			{
				tbigchunk26442* c;
				NF* d;
				c = ((tbigchunk26442*) (c_42294));
				d = (&(*c).Data);
				{
					NIM_BOOL LOC27;
					LOC27 = 0;
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					LOC27 = ((NU64)(1) < (NU64)((*((tfreecell26430*) (d))).Zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL LOC34;
			tavlnode27208* avlnode;
			LOC34 = 0;
			LOC34 = ((NU64)((*a).Minlargeobj) <= (NU64)(q));
			if (!(LOC34)) goto LA35;
			LOC34 = ((NU64)(q) <= (NU64)((*a).Maxlargeobj));
			LA35: ;
			if (!LOC34) goto LA36;
			avlnode = inrange_28329((*a).Root, q);
			{
				void* k;
				tbigchunk26442* c;
				tbasechunk26438* LOC42;
				if (!!((avlnode == NIM_NIL))) goto LA40;
				k = ((void*) ((*avlnode).Key));
				LOC42 = 0;
				LOC42 = pageaddr_29146(k);
				c = ((tbigchunk26442*) (LOC42));
				{
					if (!((NU64)(1) < (NU64)((*((tfreecell26430*) (k))).Zerofield))) goto LA45;
					result = k;
				}
				LA45: ;
			}
			LA40: ;
		}
		LA36: ;
	}
	LA1: ;
	return result;
}

N_NOCONV(void*, alloc_5801)(NI size) {
	void* result;
	result = 0;
	result = alloc_43434((&gch_47044.Region), size);
	return result;
}

N_NIMCALL(void, excl_28838)(tintset26417* s, NI key) {
	ttrunk26413* t;
	t = intsetget_28724((&(*s)), (NI)((NU64)(key) >> (NU64)(9)));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & 511);
		(*t).Bits[((NI)((NU64)(((NI) (u))) >> (NU64)(6)))- 0] = (NI)((*t).Bits[((NI)((NU64)(((NI) (u))) >> (NU64)(6)))- 0] & (NI)((NU64) ~((NI)((NU64)(1) << (NU64)(((NI) ((NI)(((NI) (u)) & 63))))))));
	}
	LA3: ;
}

static N_INLINE(void, osdeallocpages_26223)(void* p, NI size) {
	munmap(p, size);
}

static N_INLINE(void, deccurrmem_27425)(tmemregion27210* a, NI bytes) {
	(*a).Maxmem = (((*a).Maxmem >= (*a).Currmem) ? (*a).Maxmem : (*a).Currmem);
	(*a).Currmem -= bytes;
}

N_NIMCALL(void, freeoschunks_29610)(tmemregion27210* a, void* p, NI size) {
	tbasechunk26438* c;
	NI nxt;
	tbasechunk26438* next;
	NI LOC7;
	c = ((tbasechunk26438*) (p));
	nxt = (NI)((NU64)(((NI) (p))) + (NU64)((*c).Size));
	next = ((tbasechunk26438*) (nxt));
	{
		NI LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC3 = pageindex_29130(next);
		LOC4 = 0;
		LOC4 = contains_28795((&(*a).Chunkstarts), LOC3);
		if (!LOC4) goto LA5;
		(*next).Prevsize = 0;
	}
	LA5: ;
	LOC7 = 0;
	LOC7 = pageindex_29138(p);
	excl_28838((&(*a).Chunkstarts), LOC7);
	osdeallocpages_26223(p, size);
	deccurrmem_27425(a, size);
	(*a).Freemem -= size;
}

N_NIMCALL(void, freebigchunk_30006)(tmemregion27210* a, tbigchunk26442* c_30010) {
	tbigchunk26442* c;
	tbasechunk26438* ri;
	c = c_30010;
	(*a).Freemem += (*c).Sup.Size;
	ri = ((tbasechunk26438*) ((NI)((NU64)(((NI) (c))) + (NU64)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_29821((&(*a)), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		LOC3 = chunkunused_29010(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC12;
			LOC9 = 0;
			LOC9 = issmallchunk_28999(ri);
			if (!!(LOC9)) goto LA10;
			listremove_30803((&(*a).Freechunkslist), ((tbigchunk26442*) (ri)));
			(*c).Sup.Size += (*ri).Size;
			LOC12 = 0;
			LOC12 = pageindex_29130(ri);
			excl_28838((&(*a).Chunkstarts), LOC12);
		}
		LA10: ;
	}
	LA5: ;
	{
		tbasechunk26438* le;
		if (!!(((*c).Sup.Prevsize == 0))) goto LA15;
		le = ((tbasechunk26438*) ((NI)((NU64)(((NI) (c))) - (NU64)((*c).Sup.Prevsize))));
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = isaccessible_29821((&(*a)), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			LOC19 = chunkunused_29010(le);
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				tbasechunk26438* LOC28;
				NI LOC29;
				LOC25 = 0;
				LOC25 = issmallchunk_28999(le);
				if (!!(LOC25)) goto LA26;
				listremove_30803((&(*a).Freechunkslist), ((tbigchunk26442*) (le)));
				(*le).Size += (*c).Sup.Size;
				LOC28 = 0;
				LOC28 = &c->Sup;
				LOC29 = 0;
				LOC29 = pageindex_29130(LOC28);
				excl_28838((&(*a).Chunkstarts), LOC29);
				c = ((tbigchunk26442*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	{
		NIM_BOOL LOC32;
		tbasechunk26438* LOC36;
		NI LOC37;
		LOC32 = 0;
		LOC32 = ((*c).Sup.Size < 1048576);
		if (LOC32) goto LA33;
		LOC32 = NIM_FALSE;
		LA33: ;
		if (!LOC32) goto LA34;
		LOC36 = 0;
		LOC36 = &c->Sup;
		LOC37 = 0;
		LOC37 = pageindex_29130(LOC36);
		incl_28824(a, (&(*a).Chunkstarts), LOC37);
		updateprevsize_29891(a, c, (*c).Sup.Size);
		listadd_32031((&(*a).Freechunkslist), c);
		(*c).Sup.Used = NIM_FALSE;
	}
	goto LA30;
	LA34: ;
	{
		freeoschunks_29610(a, ((void*) (c)), (*c).Sup.Size);
	}
	LA30: ;
}

static N_INLINE(void, deallocavlnode_28206)(tmemregion27210* a, tavlnode27208* n) {
	(*n).Link[(0)- 0] = (*a).Freeavlnodes;
	(*a).Freeavlnodes = n;
}

N_NIMCALL(void, del_28604)(tmemregion27210* a, tavlnode27208** t, NI x) {
	{
		if (!((*t) == bottom_27239)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	(*a).Last = (*t);
	{
		if (!((NU64)(x) < (NU64)((*(*t)).Key))) goto LA7;
		del_28604(a, &(*(*t)).Link[(0)- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		(*a).Deleted = (*t);
		del_28604(a, &(*(*t)).Link[(1)- 0], x);
	}
	LA5: ;
	{
		NIM_BOOL LOC12;
		NIM_BOOL LOC13;
		LOC12 = 0;
		LOC13 = 0;
		LOC13 = ((*t) == (*a).Last);
		if (!(LOC13)) goto LA14;
		LOC13 = !(((*a).Deleted == bottom_27239));
		LA14: ;
		LOC12 = LOC13;
		if (!(LOC12)) goto LA15;
		LOC12 = (x == (*(*a).Deleted).Key);
		LA15: ;
		if (!LOC12) goto LA16;
		(*(*a).Deleted).Key = (*(*t)).Key;
		(*(*a).Deleted).Upperbound = (*(*t)).Upperbound;
		(*a).Deleted = bottom_27239;
		(*t) = (*(*t)).Link[(1)- 0];
		deallocavlnode_28206(a, (*a).Last);
	}
	goto LA10;
	LA16: ;
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = ((*(*(*t)).Link[(0)- 0]).Level < (NI64)((*(*t)).Level - 1));
		if (LOC19) goto LA20;
		LOC19 = ((*(*(*t)).Link[(1)- 0]).Level < (NI64)((*(*t)).Level - 1));
		LA20: ;
		if (!LOC19) goto LA21;
		(*(*t)).Level -= 1;
		{
			if (!((*(*t)).Level < (*(*(*t)).Link[(1)- 0]).Level)) goto LA25;
			(*(*(*t)).Link[(1)- 0]).Level = (*(*t)).Level;
		}
		LA25: ;
		skew_28396(t);
		skew_28396(&(*(*t)).Link[(1)- 0]);
		skew_28396(&(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]);
		split_28404(t);
		split_28404(&(*(*t)).Link[(1)- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	BeforeRet: ;
}

N_NIMCALL(void, rawdealloc_40623)(tmemregion27210* a, void* p) {
	tbasechunk26438* c_40801;
	c_40801 = pageaddr_29146(p);
	{
		NIM_BOOL LOC3;
		tsmallchunk26440* c;
		NI s;
		tfreecell26430* f;
		LOC3 = 0;
		LOC3 = issmallchunk_28999(c_40801);
		if (!LOC3) goto LA4;
		c = ((tsmallchunk26440*) (c_40801));
		s = (*c).Sup.Size;
		f = ((tfreecell26430*) (p));
		(*f).Zerofield = 0;
		(*f).Next = (*c).Freelist;
		(*c).Freelist = f;
		{
			if (!((*c).Free < s)) goto LA8;
			listadd_35205((&(*a).Freesmallchunks[((NI64)(s / 8))- 0]), c);
			(*c).Free += s;
		}
		goto LA6;
		LA8: ;
		{
			(*c).Free += s;
			{
				if (!((*c).Free == (NI64)(4096 - (NI64)(((NI)sizeof(tsmallchunk26440)) - 8)))) goto LA13;
				listremove_38003((&(*a).Freesmallchunks[((NI64)(s / 8))- 0]), c);
				(*c).Sup.Size = 4096;
				freebigchunk_30006(a, ((tbigchunk26442*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		tbigchunk26442* c;
		c = ((tbigchunk26442*) (c_40801));
		(*a).Deleted = bottom_27239;
		del_28604(a, &(*a).Root, ((NI) ((&(*c).Data))));
		freebigchunk_30006(a, c);
	}
	LA1: ;
}

N_NIMCALL(void, dealloc_43628)(tmemregion27210* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU64)(((NI) (p))) - (NU64)(((NI)sizeof(tfreecell26430))))));
	rawdealloc_40623(allocator, x);
}

N_NOCONV(void, dealloc_5848)(void* p) {
	dealloc_43628((&gch_47044.Region), p);
}

static N_INLINE(void, add_45023)(tcellseq44951* s, tcell44935* c) {
	{
		tcell44935** d;
		void* LOC5;
		if (!((*s).Cap <= (*s).Len)) goto LA3;
		(*s).Cap = (NI64)((NI64)((*s).Cap * 3) / 2);
		LOC5 = 0;
		LOC5 = alloc_5801((NI64)((*s).Cap * 8));
		d = ((tcell44935**) (LOC5));
		memcpy(((void*) (d)), ((void*) ((*s).D)), (NI64)((*s).Len * 8));
		dealloc_5848(((void*) ((*s).D)));
		(*s).D = d;
	}
	LA3: ;
	(*s).D[((*s).Len)- 0] = c;
	(*s).Len += 1;
}

static N_INLINE(void, gcmark_67646)(tgcheap47016* gch, void* p) {
	tcell44935* cell;
	NI c;
	cell = usrtocell_48646(p);
	c = ((NI) (cell));
	{
		tcell44935* objstart;
		void* LOC5;
		if (!((NU64)(4096) < (NU64)(c))) goto LA3;
		LOC5 = 0;
		LOC5 = interiorallocatedptr_42289((&(*gch).Region), ((void*) (cell)));
		objstart = ((tcell44935*) (LOC5));
		{
			if (!!((objstart == NIM_NIL))) goto LA8;
			(*objstart).Refcount = (NI)((NU64)((*objstart).Refcount) + (NU64)(8));
			add_45023((&(*gch).Decstack), objstart);
		}
		LA8: ;
	}
	LA3: ;
}

N_CDECL(void, markstackandregisters_69240)(tgcheap47016* gch) {
	jmp_buf registers;
	{
		int LOC3;
		NI max;
		NI sp;
		LOC3 = 0;
		LOC3 = setjmp(registers);
		if (!(LOC3 == ((NI32) 0))) goto LA4;
		max = ((NI) ((*gch).Stackbottom));
		sp = ((NI) ((&registers)));
		{
			while (1) {
				if (!((NU64)(sp) < (NU64)((NI64)(max - 64)))) goto LA7;
				gcmark_67646(gch, ((void**) (sp))[(0)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(1)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(2)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(3)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(4)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(5)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(6)- 0]);
				gcmark_67646(gch, ((void**) (sp))[(7)- 0]);
				sp = (NI)((NU64)(sp) + (NU64)(64));
			} LA7: ;
		}
		{
			while (1) {
				if (!((NU64)(sp) <= (NU64)(max))) goto LA9;
				gcmark_67646(gch, (*((void**) (sp))));
				sp = (NI)((NU64)(sp) + (NU64)(8));
			} LA9: ;
		}
	}
	LA4: ;
}

N_NIMCALL(void, markthreadstacks_68206)(tgcheap47016* gch) {
}

static N_INLINE(NIM_BOOL, canbecycleroot_48667)(tcell44935* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).Typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

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

N_NIMCALL(tpagedesc44943*, cellsetget_45122)(tcellset44947* t, NI key) {
	tpagedesc44943* result;
	NI h;
	result = 0;
	h = (NI)(((NI) (key)) & (*t).Max);
	{
		while (1) {
			if (!!(((*t).Data[(h)- 0] == NIM_NIL))) goto LA2;
			{
				if (!((*(*t).Data[(h)- 0]).Key == key)) goto LA5;
				result = (*t).Data[(h)- 0];
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_45114(h, (*t).Max);
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, excl_45702)(tcellset44947* s, tcell44935* cell) {
	NI u;
	tpagedesc44943* t;
	u = ((NI) (cell));
	t = cellsetget_45122((&(*s)), (NI)((NU64)(u) >> (NU64)(12)));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU64)((NI)((NU64)(u) % (NU64)(4096))) / (NU64)(8));
		(*t).Bits[((NI)((NU64)(u) >> (NU64)(6)))- 0] = (NI)((*t).Bits[((NI)((NU64)(u) >> (NU64)(6)))- 0] & (NI)((NU64) ~((NI)((NU64)(1) << (NU64)(((NI) ((NI)(u & 63))))))));
	}
	LA3: ;
}

static N_INLINE(void*, celltousr_48625)(tcell44935* cell) {
	void* result;
	result = 0;
	result = ((void*) ((NI)((NU64)(((NI) (cell))) + (NU64)(((NI)sizeof(tcell44935))))));
	return result;
}

N_NIMCALL(void, preparedealloc_49208)(tcell44935* cell) {
	{
		void* LOC5;
		if (!!(((*(*cell).Typ).finalizer == NIM_NIL))) goto LA3;
		gch_47044.Recgclock += 1;
		LOC5 = 0;
		LOC5 = celltousr_48625(cell);
		((TFinalizer) ((*(*cell).Typ).finalizer))(LOC5);
		gch_47044.Recgclock -= 1;
	}
	LA3: ;
}

N_NOINLINE(void, addzct_48617)(tcellseq44951* s, tcell44935* c) {
	{
		if (!((NI)((*c).Refcount & 4) == 0)) goto LA3;
		(*c).Refcount = (NI)((*c).Refcount | 4);
		add_45023(s, c);
	}
	LA3: ;
}

static N_INLINE(void, rtladdzct_50204)(tcell44935* c) {
	addzct_48617((&gch_47044.Zct), c);
}

N_NIMCALL(void, cellsetrawinsert_45156)(tcellset44947* t, tpagedesc44943** data, tpagedesc44943* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).Key)) & (*t).Max);
	{
		while (1) {
			if (!!((data[(h)- 0] == NIM_NIL))) goto LA2;
			h = nexttry_45114(h, (*t).Max);
		} LA2: ;
	}
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellsetenlarge_45412)(tcellset44947* t) {
	NI oldmax;
	tpagedesc44943** n;
	void* LOC1;
	oldmax = (*t).Max;
	(*t).Max = (NI64)((NI64)((NI64)((*t).Max + 1) * 2) - 1);
	LOC1 = 0;
	LOC1 = alloc0_5817((NI64)((NI64)((*t).Max + 1) * 8));
	n = ((tpagedesc44943**) (LOC1));
	{
		NI i_45429;
		NI res_45452;
		i_45429 = 0;
		res_45452 = 0;
		{
			while (1) {
				if (!(res_45452 <= oldmax)) goto LA4;
				i_45429 = res_45452;
				{
					if (!!(((*t).Data[(i_45429)- 0] == NIM_NIL))) goto LA7;
					cellsetrawinsert_45156((&(*t)), n, (*t).Data[(i_45429)- 0]);
				}
				LA7: ;
				res_45452 += 1;
			} LA4: ;
		}
	}
	dealloc_5848(((void*) ((*t).Data)));
	(*t).Data = n;
}

N_NIMCALL(tpagedesc44943*, cellsetput_45466)(tcellset44947* t, NI key) {
	tpagedesc44943* result;
	NI h;
	void* LOC19;
	result = 0;
	h = (NI)(((NI) (key)) & (*t).Max);
	{
		while (1) {
			tpagedesc44943* x;
			x = (*t).Data[(h)- 0];
			{
				if (!(x == NIM_NIL)) goto LA5;
				goto LA1;
			}
			LA5: ;
			{
				if (!((*x).Key == key)) goto LA9;
				result = x;
				goto BeforeRet;
			}
			LA9: ;
			h = nexttry_45114(h, (*t).Max);
		}
	} LA1: ;
	{
		NIM_BOOL LOC13;
		LOC13 = 0;
		LOC13 = ((NI64)((NI64)((*t).Max + 1) * 2) < (NI64)((*t).Counter * 3));
		if (LOC13) goto LA14;
		LOC13 = ((NI64)((NI64)((*t).Max + 1) - (*t).Counter) < 4);
		LA14: ;
		if (!LOC13) goto LA15;
		cellsetenlarge_45412(t);
	}
	LA15: ;
	(*t).Counter += 1;
	h = (NI)(((NI) (key)) & (*t).Max);
	{
		while (1) {
			if (!!(((*t).Data[(h)- 0] == NIM_NIL))) goto LA18;
			h = nexttry_45114(h, (*t).Max);
		} LA18: ;
	}
	LOC19 = 0;
	LOC19 = alloc0_5817(((NI)sizeof(tpagedesc44943)));
	result = ((tpagedesc44943*) (LOC19));
	(*result).Next = (*t).Head;
	(*result).Key = key;
	(*t).Head = result;
	(*t).Data[(h)- 0] = result;
	BeforeRet: ;
	return result;
}

N_NOINLINE(void, incl_45671)(tcellset44947* s, tcell44935* cell) {
	NI u;
	tpagedesc44943* t;
	u = ((NI) (cell));
	t = cellsetput_45466(s, (NI)((NU64)(u) >> (NU64)(12)));
	u = (NI)((NU64)((NI)((NU64)(u) % (NU64)(4096))) / (NU64)(8));
	(*t).Bits[((NI)((NU64)(u) >> (NU64)(6)))- 0] = (NI)((*t).Bits[((NI)((NU64)(u) >> (NU64)(6)))- 0] | (NI)((NU64)(1) << (NU64)(((NI) ((NI)(u & 63))))));
}

static N_INLINE(void, rtladdcycleroot_49429)(tcell44935* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_45671((&gch_47044.Cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_50604)(tcell44935* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_48667(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_49429(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

N_NIMCALL(void, markgray_64205)(tcell44935* s) {
	{
		if (!!((((NI) ((NI)((*s).Refcount & 3))) == 1))) goto LA3;
		(*s).Refcount = (NI)((NI)((*s).Refcount & -4) | 1);
		forallchildren_49017(s, ((NU8) 5));
	}
	LA3: ;
}

N_NIMCALL(void, scanblack_64404)(tcell44935* s) {
	(*s).Refcount = (NI)((*s).Refcount & -4);
	forallchildren_49017(s, ((NU8) 7));
}

N_NIMCALL(void, scan_64604)(tcell44935* s) {
	{
		if (!(((NI) ((NI)((*s).Refcount & 3))) == 1)) goto LA3;
		{
			if (!((NU64)(8) <= (NU64)((*s).Refcount))) goto LA7;
			scanblack_64404(s);
		}
		goto LA5;
		LA7: ;
		{
			(*s).Refcount = (NI)((NI)((*s).Refcount & -4) | 2);
			forallchildren_49017(s, ((NU8) 6));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, contains_45623)(tcellset44947* s, tcell44935* cell) {
	NIM_BOOL result;
	NI u;
	tpagedesc44943* t;
	result = 0;
	u = ((NI) (cell));
	t = cellsetget_45122(s, (NI)((NU64)(u) >> (NU64)(12)));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU64)((NI)((NU64)(u) % (NU64)(4096))) / (NU64)(8));
		result = !(((NI)((*t).Bits[((NI)((NU64)(u) >> (NU64)(6)))- 0] & (NI)((NU64)(1) << (NU64)(((NI) ((NI)(u & 63)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, freecycliccell_63427)(tgcheap47016* gch, tcell44935* c) {
	preparedealloc_49208(c);
	rawdealloc_40623((&(*gch).Region), ((void*) (c)));
}

N_NIMCALL(void, collectwhite_64804)(tcell44935* s) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		LOC3 = 0;
		LOC3 = (((NI) ((NI)((*s).Refcount & 3))) == 2);
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = contains_45623((&gch_47044.Cycleroots), s);
		LOC3 = !(LOC5);
		LA4: ;
		if (!LOC3) goto LA6;
		(*s).Refcount = (NI)((*s).Refcount & -4);
		forallchildren_49017(s, ((NU8) 8));
		freecycliccell_63427((&gch_47044), s);
	}
	LA6: ;
}

N_NIMCALL(void, dooperation_49021)(void* p, NU8 op) {
	tcell44935* c;
	{
		if (!(p == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	c = usrtocell_48646(p);
	switch (op) {
	case ((NU8) 2):
	{
		decref_50604(c);
	}
	break;
	case ((NU8) 3):
	{
		add_45023((&gch_47044.Tempstack), c);
	}
	break;
	case ((NU8) 4):
	{
		(*c).Refcount = (NI)((NU64)((*c).Refcount) - (NU64)(8));
	}
	break;
	case ((NU8) 5):
	{
		(*c).Refcount = (NI)((NU64)((*c).Refcount) - (NU64)(8));
		markgray_64205(c);
	}
	break;
	case ((NU8) 6):
	{
		scan_64604(c);
	}
	break;
	case ((NU8) 7):
	{
		(*c).Refcount = (NI)((NU64)((*c).Refcount) + (NU64)(8));
		{
			if (!!((((NI) ((NI)((*c).Refcount & 3))) == 0))) goto LA13;
			scanblack_64404(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		collectwhite_64804(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(NI, getdiscriminant_25137)(void* aa, TNimNode* n) {
	NI result;
	NI d;
	NI a;
	result = 0;
	d = 0;
	a = ((NI) (aa));
	switch ((*(*n).typ).size) {
	case 1:
	{
		d = ((NI)(NU)(NU8)((*((NI8*) ((NI)((NU64)(a) + (NU64)((*n).offset)))))));
	}
	break;
	case 2:
	{
		d = ((NI)(NU)(NU16)((*((NI16*) ((NI)((NU64)(a) + (NU64)((*n).offset)))))));
	}
	break;
	case 4:
	{
		d = ((NI) ((*((NI32*) ((NI)((NU64)(a) + (NU64)((*n).offset)))))));
	}
	break;
	default:
	{
	}
	break;
	}
	result = d;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(TNimNode*, selectbranch_25410)(void* aa, TNimNode* n) {
	TNimNode* result;
	NI discr;
	result = 0;
	discr = getdiscriminant_25137(aa, n);
	{
		if (!((NU64)(discr) < (NU64)((*n).len))) goto LA3;
		result = (*n).sons[(discr)- 0];
		{
			if (!(result == NIM_NIL)) goto LA7;
			result = (*n).sons[((*n).len)- 0];
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		result = (*n).sons[((*n).len)- 0];
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, forallslotsaux_53208)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		forallchildrenaux_49025(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_53234;
			NI HEX3Atmp_53406;
			NI res_53409;
			i_53234 = 0;
			HEX3Atmp_53406 = 0;
			HEX3Atmp_53406 = (NI64)((*n).len - 1);
			res_53409 = 0;
			{
				while (1) {
					if (!(res_53409 <= HEX3Atmp_53406)) goto LA5;
					i_53234 = res_53409;
					{
						if (!((*(*n).sons[(i_53234)- 0]).kind == ((NU8) 1))) goto LA8;
						{
							if (!((289406976 &(IL64(1)<<(((*(*(*n).sons[(i_53234)- 0]).typ).kind)&IL64(63))))!=0)) goto LA12;
							dooperation_49021((*((void**) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i_53234)- 0]).offset))))), op);
						}
						goto LA10;
						LA12: ;
						{
							forallchildrenaux_49025(((void*) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i_53234)- 0]).offset)))), (*(*n).sons[(i_53234)- 0]).typ, op);
						}
						LA10: ;
					}
					goto LA6;
					LA8: ;
					{
						forallslotsaux_53208(dest, (*n).sons[(i_53234)- 0], op);
					}
					LA6: ;
					res_53409 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA19;
			forallslotsaux_53208(dest, m, op);
		}
		LA19: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forallchildrenaux_49025)(void* dest, TNimType* mt, NU8 op) {
	NI d;
	d = ((NI) (dest));
	{
		if (!(dest == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((((*mt).flags &(1<<((((NU8) 0))&7)))!=0))) goto LA7;
		switch ((*mt).kind) {
		case ((NU8) 22):
		case ((NU8) 28):
		case ((NU8) 24):
		{
			dooperation_49021((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			forallslotsaux_53208(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			{
				NI i_53452;
				NI HEX3Atmp_53475;
				NI res_53478;
				i_53452 = 0;
				HEX3Atmp_53475 = 0;
				HEX3Atmp_53475 = (NI64)((NI64)((*mt).size / (*(*mt).base).size) - 1);
				res_53478 = 0;
				{
					while (1) {
						if (!(res_53478 <= HEX3Atmp_53475)) goto LA14;
						i_53452 = res_53478;
						forallchildrenaux_49025(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_53452) * (NU64)((*(*mt).base).size)))))), (*mt).base, op);
						res_53478 += 1;
					} LA14: ;
				}
			}
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	BeforeRet: ;
}

N_NIMCALL(void, forallchildren_49017)(tcell44935* cell, NU8 op) {
	TY3089 marker;
	marker = (*(*cell).Typ).marker;
	{
		void* LOC5;
		if (!!((marker == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = celltousr_48625(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		switch ((*(*cell).Typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			LOC8 = 0;
			LOC8 = celltousr_48625(cell);
			forallchildrenaux_49025(LOC8, (*(*cell).Typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			LOC10 = 0;
			LOC10 = celltousr_48625(cell);
			d = ((NI) (LOC10));
			s = ((TGenericSeq*) (d));
			{
				if (!!((s == NIM_NIL))) goto LA13;
				{
					NI i_54240;
					NI HEX3Atmp_54273;
					NI res_54276;
					i_54240 = 0;
					HEX3Atmp_54273 = 0;
					HEX3Atmp_54273 = (NI64)((*s).len - 1);
					res_54276 = 0;
					{
						while (1) {
							if (!(res_54276 <= HEX3Atmp_54273)) goto LA17;
							i_54240 = res_54276;
							forallchildrenaux_49025(((void*) ((NI)((NU64)((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_54240) * (NU64)((*(*(*cell).Typ).base).size))))) + (NU64)(16)))), (*(*cell).Typ).base, op);
							res_54276 += 1;
						} LA17: ;
					}
				}
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
}

N_NIMCALL(NIM_BOOL, collectzct_67012)(tgcheap47016* gch) {
	NIM_BOOL result;
	NI* l;
	result = 0;
	l = (&(*gch).Zct.Len);
	{
		while (1) {
			tcell44935* c;
			if (!(0 < (*l))) goto LA2;
			c = (*gch).Zct.D[(0)- 0];
			(*c).Refcount = (NI)((*c).Refcount & -5);
			(*gch).Zct.D[(0)- 0] = (*gch).Zct.D[((NI64)((*l) - 1))- 0];
			(*l) -= 1;
			{
				if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA5;
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = canbecycleroot_48667(c);
					if (!LOC9) goto LA10;
					excl_45702((&(*gch).Cycleroots), c);
				}
				LA10: ;
				preparedealloc_49208(c);
				forallchildren_49017(c, ((NU8) 2));
				rawdealloc_40623((&(*gch).Region), ((void*) (c)));
			}
			LA5: ;
		} LA2: ;
	}
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, markroots_65005)(tgcheap47016* gch) {
	NI tabsize;
	tabsize = 0;
	{
		tcell44935* s_65010;
		tcellset44947 HEX3Atmp_65039;
		tpagedesc44943* r_65044;
		s_65010 = 0;
		memset((void*)(&HEX3Atmp_65039), 0, sizeof(HEX3Atmp_65039));
		HEX3Atmp_65039 = (*gch).Cycleroots;
		r_65044 = HEX3Atmp_65039.Head;
		{
			while (1) {
				NI i_65046;
				if (!!((r_65044 == NIM_NIL))) goto LA3;
				i_65046 = 0;
				{
					while (1) {
						NI w_65048;
						NI j_65050;
						if (!(i_65046 <= 7)) goto LA5;
						w_65048 = (*r_65044).Bits[(i_65046)- 0];
						j_65050 = 0;
						{
							while (1) {
								if (!!((w_65048 == 0))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_65048 & 1))) == 0))) goto LA10;
									s_65010 = ((tcell44935*) ((NI)((NI)((NU64)((*r_65044).Key) << (NU64)(12)) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_65046) << (NU64)(6))) + (NU64)(j_65050))) * (NU64)(8)))));
									tabsize += 1;
									{
										NIM_BOOL LOC14;
										LOC14 = 0;
										LOC14 = (((NI) ((NI)((*s_65010).Refcount & 3))) == 3);
										if (!(LOC14)) goto LA15;
										LOC14 = ((NU64)(8) <= (NU64)((*s_65010).Refcount));
										LA15: ;
										if (!LOC14) goto LA16;
										markgray_64205(s_65010);
									}
									goto LA12;
									LA16: ;
									{
										excl_45702((&(*gch).Cycleroots), s_65010);
										{
											if (!((*s_65010).Refcount == 0)) goto LA21;
											freecycliccell_63427(gch, s_65010);
										}
										LA21: ;
									}
									LA12: ;
								}
								LA10: ;
								j_65050 += 1;
								w_65048 = (NI)((NU64)(w_65048) >> (NU64)(1));
							} LA7: ;
						}
						i_65046 += 1;
					} LA5: ;
				}
				r_65044 = (*r_65044).Next;
			} LA3: ;
		}
	}
	(*gch).Stat.Cycletablesize = (((*gch).Stat.Cycletablesize >= tabsize) ? (*gch).Stat.Cycletablesize : tabsize);
}

N_NIMCALL(void, collectroots_67201)(tgcheap47016* gch) {
	{
		tcell44935* s_67205;
		tcellset44947 HEX3Atmp_67208;
		tpagedesc44943* r_67213;
		s_67205 = 0;
		memset((void*)(&HEX3Atmp_67208), 0, sizeof(HEX3Atmp_67208));
		HEX3Atmp_67208 = (*gch).Cycleroots;
		r_67213 = HEX3Atmp_67208.Head;
		{
			while (1) {
				NI i_67215;
				if (!!((r_67213 == NIM_NIL))) goto LA3;
				i_67215 = 0;
				{
					while (1) {
						NI w_67217;
						NI j_67219;
						if (!(i_67215 <= 7)) goto LA5;
						w_67217 = (*r_67213).Bits[(i_67215)- 0];
						j_67219 = 0;
						{
							while (1) {
								if (!!((w_67217 == 0))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_67217 & 1))) == 0))) goto LA10;
									s_67205 = ((tcell44935*) ((NI)((NI)((NU64)((*r_67213).Key) << (NU64)(12)) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_67215) << (NU64)(6))) + (NU64)(j_67219))) * (NU64)(8)))));
									excl_45702((&(*gch).Cycleroots), s_67205);
									collectwhite_64804(s_67205);
								}
								LA10: ;
								j_67219 += 1;
								w_67217 = (NI)((NU64)(w_67217) >> (NU64)(1));
							} LA7: ;
						}
						i_67215 += 1;
					} LA5: ;
				}
				r_67213 = (*r_67213).Next;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, deinit_45081)(tcellset44947* s) {
	tpagedesc44943* it;
	it = (*s).Head;
	{
		while (1) {
			tpagedesc44943* n;
			if (!!((it == NIM_NIL))) goto LA2;
			n = (*it).Next;
			dealloc_5848(((void*) (it)));
			it = n;
		} LA2: ;
	}
	(*s).Head = NIM_NIL;
	dealloc_5848(((void*) ((*s).Data)));
	(*s).Data = NIM_NIL;
	(*s).Counter = 0;
}

N_NIMCALL(void, cellsetreset_53201)(tcellset44947* s) {
	deinit_45081(s);
	init_45070(s);
}

N_NIMCALL(void, collectcycles_67245)(tgcheap47016* gch) {
	{
		while (1) {
			NIM_BOOL LOC3;
			if (!(0 < (*gch).Zct.Len)) goto LA2;
			LOC3 = 0;
			LOC3 = collectzct_67012(gch);
		} LA2: ;
	}
	markroots_65005(gch);
	{
		tcell44935* s_67401;
		tcellset44947 HEX3Atmp_67603;
		tpagedesc44943* r_67608;
		s_67401 = 0;
		memset((void*)(&HEX3Atmp_67603), 0, sizeof(HEX3Atmp_67603));
		HEX3Atmp_67603 = (*gch).Cycleroots;
		r_67608 = HEX3Atmp_67603.Head;
		{
			while (1) {
				NI i_67610;
				if (!!((r_67608 == NIM_NIL))) goto LA6;
				i_67610 = 0;
				{
					while (1) {
						NI w_67612;
						NI j_67614;
						if (!(i_67610 <= 7)) goto LA8;
						w_67612 = (*r_67608).Bits[(i_67610)- 0];
						j_67614 = 0;
						{
							while (1) {
								if (!!((w_67612 == 0))) goto LA10;
								{
									if (!!((((NI) ((NI)(w_67612 & 1))) == 0))) goto LA13;
									s_67401 = ((tcell44935*) ((NI)((NI)((NU64)((*r_67608).Key) << (NU64)(12)) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_67610) << (NU64)(6))) + (NU64)(j_67614))) * (NU64)(8)))));
									scan_64604(s_67401);
								}
								LA13: ;
								j_67614 += 1;
								w_67612 = (NI)((NU64)(w_67612) >> (NU64)(1));
							} LA10: ;
						}
						i_67610 += 1;
					} LA8: ;
				}
				r_67608 = (*r_67608).Next;
			} LA6: ;
		}
	}
	collectroots_67201(gch);
	cellsetreset_53201((&(*gch).Cycleroots));
}

N_NIMCALL(NI, gettotalmem_6499)(void) {
	NI result;
	result = 0;
	result = gch_47044.Region.Currmem;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, getfreemem_6497)(void) {
	NI result;
	result = 0;
	result = gch_47044.Region.Freemem;
	return result;
}

N_NIMCALL(NI, getoccupiedmem_6495)(void) {
	NI result;
	NI LOC1;
	NI LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = gettotalmem_6499();
	LOC2 = 0;
	LOC2 = getfreemem_6497();
	result = (NI64)(LOC1 - LOC2);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, unmarkstackandregisters_71411)(tgcheap47016* gch) {
	tcell44935** d;
	d = (*gch).Decstack.D;
	{
		NI i_71426;
		NI HEX3Atmp_71602;
		NI res_71605;
		i_71426 = 0;
		HEX3Atmp_71602 = 0;
		HEX3Atmp_71602 = (NI64)((*gch).Decstack.Len - 1);
		res_71605 = 0;
		{
			while (1) {
				if (!(res_71605 <= HEX3Atmp_71602)) goto LA3;
				i_71426 = res_71605;
				decref_50604(d[(i_71426)- 0]);
				res_71605 += 1;
			} LA3: ;
		}
	}
	(*gch).Decstack.Len = 0;
}

N_NIMCALL(void, collectctbody_71619)(tgcheap47016* gch) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_69010();
	(*gch).Stat.Maxstacksize = (((*gch).Stat.Maxstacksize >= LOC1) ? (*gch).Stat.Maxstacksize : LOC1);
	prepareforinteriorpointerchecking_42282((&(*gch).Region));
	markstackandregisters_69240(gch);
	markthreadstacks_68206(gch);
	(*gch).Stat.Maxstackcells = (((*gch).Stat.Maxstackcells >= (*gch).Decstack.Len) ? (*gch).Stat.Maxstackcells : (*gch).Decstack.Len);
	(*gch).Stat.Stackscans += 1;
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = collectzct_67012(gch);
		if (!LOC4) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = getoccupiedmem_44870((&(*gch).Region));
			LOC9 = ((*gch).Cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			collectcycles_67245(gch);
			(*gch).Stat.Cyclecollections += 1;
			LOC14 = 0;
			LOC14 = getoccupiedmem_6495();
			(*gch).Cyclethreshold = ((4194304 >= (NI64)(LOC14 * 2)) ? 4194304 : (NI64)(LOC14 * 2));
			(*gch).Stat.Maxthreshold = (((*gch).Stat.Maxthreshold >= (*gch).Cyclethreshold) ? (*gch).Stat.Maxthreshold : (*gch).Cyclethreshold);
		}
		LA12: ;
	}
	LA5: ;
	unmarkstackandregisters_71411(gch);
}

N_NIMCALL(void, collectct_49010)(tgcheap47016* gch) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC7;
		NI LOC9;
		LOC3 = 0;
		LOC4 = 0;
		LOC5 = 0;
		LOC5 = (500 <= (*gch).Zct.Len);
		if (LOC5) goto LA6;
		LOC7 = 0;
		LOC7 = NIM_TRUE;
		if (!(LOC7)) goto LA8;
		LOC9 = 0;
		LOC9 = getoccupiedmem_44870((&(*gch).Region));
		LOC7 = ((*gch).Cyclethreshold <= LOC9);
		LA8: ;
		LOC5 = LOC7;
		LA6: ;
		LOC4 = LOC5;
		if (LOC4) goto LA10;
		LOC4 = NIM_FALSE;
		LA10: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA11;
		LOC3 = ((*gch).Recgclock == 0);
		LA11: ;
		if (!LOC3) goto LA12;
		collectctbody_71619(gch);
	}
	LA12: ;
}

static N_INLINE(void, addnewobjtozct_54290)(tcell44935* res, tgcheap47016* gch) {
	NI l;
	tcell44935** d;
	l = (*gch).Zct.Len;
	d = (*gch).Zct.D;
	{
		tcell44935* c;
		if (!(8 < l)) goto LA3;
		c = 0;
		c = d[((NI64)(l - 1))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA7;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 1))- 0] = res;
			goto BeforeRet;
		}
		LA7: ;
		c = d[((NI64)(l - 2))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA11;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 2))- 0] = res;
			goto BeforeRet;
		}
		LA11: ;
		c = d[((NI64)(l - 3))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA15;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 3))- 0] = res;
			goto BeforeRet;
		}
		LA15: ;
		c = d[((NI64)(l - 4))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA19;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 4))- 0] = res;
			goto BeforeRet;
		}
		LA19: ;
		c = d[((NI64)(l - 5))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA23;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 5))- 0] = res;
			goto BeforeRet;
		}
		LA23: ;
		c = d[((NI64)(l - 6))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA27;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 6))- 0] = res;
			goto BeforeRet;
		}
		LA27: ;
		c = d[((NI64)(l - 7))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA31;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 7))- 0] = res;
			goto BeforeRet;
		}
		LA31: ;
		c = d[((NI64)(l - 8))- 0];
		{
			if (!((NU64)(8) <= (NU64)((*c).Refcount))) goto LA35;
			(*c).Refcount = (NI)((*c).Refcount & -5);
			d[((NI64)(l - 8))- 0] = res;
			goto BeforeRet;
		}
		LA35: ;
		add_45023((&(*gch).Zct), res);
	}
	goto LA1;
	LA3: ;
	{
		d[(l)- 0] = res;
		(*gch).Zct.Len += 1;
	}
	LA1: ;
	BeforeRet: ;
}

N_NIMCALL(void*, rawnewobj_54804)(TNimType* typ, NI size, tgcheap47016* gch) {
	void* result;
	tcell44935* res;
	void* LOC1;
	result = 0;
	collectct_49010(gch);
	LOC1 = 0;
	LOC1 = rawalloc_34346((&(*gch).Region), (NI64)(size + ((NI)sizeof(tcell44935))));
	res = ((tcell44935*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 4;
	addnewobjtozct_54290(res, gch);
	result = celltousr_48625(res);
	return result;
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_54804(typ, size, (&gch_47044));
	zeroMem(result, size);
	return result;
}

N_NIMCALL(NimStringDesc*, rawNewString)(NI space) {
	NimStringDesc* result;
	NI s;
	void* LOC5;
	result = 0;
	s = space;
	{
		if (!(s < 8)) goto LA3;
		s = 7;
	}
	LA3: ;
	LOC5 = 0;
	LOC5 = newObj((&strdesc_9804), (NI64)((NI64)(((NI)sizeof(TGenericSeq)) + s) + 1));
	result = ((NimStringDesc*) (LOC5));
	(*result).Sup.reserved = s;
	return result;
}

N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(len);
	(*result).Sup.len = len;
	memcpy(((NCSTRING) ((*result).data)), str, (NI64)((NI64)(len + 1) * 1));
	return result;
}

N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str) {
	NimStringDesc* result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = strlen(str);
	result = toNimStr(str, LOC1);
	return result;
}

N_NIMCALL(void, write_12877)(FILE* f, NCSTRING c) {
	fputs(c, f);
}

N_NIMCALL(void, writetostderr_16201)(NCSTRING msg) {
	write_12877(stdout, msg);
}

N_NIMCALL(void, showerrormessage_16209)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_16004 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_16004(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_16201(data);
	}
	LA1: ;
}

N_NOCONV(void, signalHandler)(int sig) {
	NCSTRING msg;
	msg = 0;
	{
		if (!(sig == SIGINT)) goto LA3;
		msg = "SIGINT: Interrupted by Ctrl-C.\012";
	}
	goto LA1;
	LA3: ;
	{
		if (!(sig == SIGSEGV)) goto LA6;
		msg = "SIGSEGV: Illegal storage access. (Try to compile with -d:useSys"
"Assert -d:useGcAssert for details.)\012";
	}
	goto LA1;
	LA6: ;
	{
		if (!(sig == SIGABRT)) goto LA9;
		msg = "SIGABRT: Abnormal termination.\012";
	}
	goto LA1;
	LA9: ;
	{
		if (!(sig == SIGFPE)) goto LA12;
		msg = "SIGFPE: Arithmetic error.\012";
	}
	goto LA1;
	LA12: ;
	{
		if (!(sig == SIGILL)) goto LA15;
		msg = "SIGILL: Illegal operation.\012";
	}
	goto LA1;
	LA15: ;
	{
		if (!(sig == SIGSEGV)) goto LA18;
		msg = "SIGBUS: Illegal storage access.  (Try to compile with -d:useSys"
"Assert -d:useGcAssert for details.)\012";
	}
	goto LA1;
	LA18: ;
	{
		{
			{
				if (!(sig == SIGPIPE)) goto LA24;
				msg = "SIGPIPE: Pipe closed.\012";
				goto LA21;
			}
			LA24: ;
			msg = "unknown signal\012";
		} LA21: ;
	}
	LA1: ;
	showerrormessage_16209(msg);
	exit(1);
}

N_NIMCALL(void, registersignalhandler_19808)(void) {
	signal(SIGINT, signalHandler);
	signal(SIGSEGV, signalHandler);
	signal(SIGABRT, signalHandler);
	signal(SIGFPE, signalHandler);
	signal(SIGILL, signalHandler);
	signal(SIGSEGV, signalHandler);
	signal(SIGPIPE, signalHandler);
}

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	tcell44935* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_48646(p);
	result = (NI)((NU64)((*LOC1).Refcount) >> (NU64)(3));
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	tcell44935* res;
	void* LOC1;
	result = 0;
	collectct_49010((&gch_47044));
	LOC1 = 0;
	LOC1 = rawalloc_34346((&gch_47044.Region), (NI64)(size + ((NI)sizeof(tcell44935))));
	res = ((tcell44935*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 8;
	result = celltousr_48625(res);
	zeroMem(result, size);
	return result;
}

N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src) {
	NimStringDesc* result;
	result = 0;
	{
		NI s;
		void* LOC9;
		if (!!((src == NIM_NIL))) goto LA3;
		s = (NI)((*src).Sup.reserved & IL64(9223372036854775807));
		{
			if (!(s < 8)) goto LA7;
			s = 7;
		}
		LA7: ;
		LOC9 = 0;
		LOC9 = newObjRC1((&strdesc_9804), (NI64)((NI64)(((NI)sizeof(TGenericSeq)) + s) + 1));
		result = ((NimStringDesc*) (LOC9));
		(*result).Sup.reserved = s;
		(*result).Sup.len = (*src).Sup.len;
		memcpy(((NCSTRING) ((*result).data)), ((NCSTRING) ((*src).data)), (NI64)((*src).Sup.len + 1));
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, nimGCvisit)(void* d, NI op) {
	dooperation_49021(d, ((NU8) (op)));
}
N_NIMCALL(void, TMP50)(void* p, NI op) {
	Exception* a;
	a = (Exception*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
}
N_NIMCALL(void, TMP51)(void* p, NI op) {
	overflowerror3243* a;
	a = (overflowerror3243*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell44935* c;
	c = usrtocell_48646(p);
	{
		(*c).Refcount -= 8;
		if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA3;
		rtladdzct_50204(c);
	}
	LA3: ;
}

static N_INLINE(void, incref_51025)(tcell44935* c) {
	(*c).Refcount = (NI)((NU64)((*c).Refcount) + (NU64)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_48667(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_49429(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell44935* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_48646(src);
		incref_51025(LOC5);
	}
	LA3: ;
	{
		tcell44935* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_48646((*dest));
		decref_50604(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

static N_INLINE(void, pushCurrentException)(Exception* e) {
	asgnRef((void**) (&(*e).parent), currexception_16245);
	asgnRef((void**) (&currexception_16245), e);
}

N_NOINLINE(NIM_BOOL, isobjslowpath_21825)(TNimType* obj, TNimType* subclass, TNimType** cache) {
	NIM_BOOL result;
	TNimType* x;
	result = 0;
	x = (*obj).base;
	{
		while (1) {
			if (!!((x == subclass))) goto LA2;
			{
				if (!(x == NIM_NIL)) goto LA5;
				cache[(0)- 0] = obj;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA5: ;
			x = (*x).base;
		} LA2: ;
	}
	cache[(1)- 0] = obj;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache) {
	NIM_BOOL result;
	result = 0;
	{
		if (!(obj == subclass)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!((*obj).base == subclass)) goto LA7;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!(cache[(0)- 0] == obj)) goto LA11;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA11: ;
	{
		if (!(cache[(1)- 0] == obj)) goto LA15;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA15: ;
	result = isobjslowpath_21825(obj, subclass, cache);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(void, quitordebug_17201)(void) {
	exit(1);
}

N_NIMCALL(void, raiseexceptionaux_17404)(Exception* e) {
	{
		if (!!((localraisehook_8230 == NIM_NIL))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = localraisehook_8230(e);
			if (!!(LOC7)) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
	}
	LA3: ;
	{
		if (!!((globalraisehook_8225 == NIM_NIL))) goto LA12;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = globalraisehook_8225(e);
			if (!!(LOC16)) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
	}
	LA12: ;
	{
		if (!!((exchandler_16243 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_16243).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_16243).raiseAction.ClEnv? (*exchandler_16243).raiseAction.ClPrc(e, (*exchandler_16243).raiseAction.ClEnv):((TMP53)((*exchandler_16243).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			longjmp((*exchandler_16243).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!(isObjWithCache((*e).Sup.m_type, (&NTI3253), Nim_OfCheck_CACHE1))) goto LA30;
		showerrormessage_16209((*e).name);
		quitordebug_17201();
	}
	goto LA19;
	LA30: ;
	{
		TY17616 buf;
		NI l;
		memset((void*)buf, 0, sizeof(buf));
		l = 0;
		{
			if (!((NI64)(l + 28) < 2000)) goto LA35;
			memcpy(((void*) ((&buf[(l)- 0]))), "Error: unhandled exception: ", 28);
			l += 28;
		}
		LA35: ;
		{
			if (!!((*e).message == 0)) goto LA39;
			{
				if (!((NI64)(l + (*e).message->Sup.len) < 2000)) goto LA43;
				memcpy(((void*) ((&buf[(l)- 0]))), ((void*) ((*e).message->data)), (*e).message->Sup.len);
				l += (*e).message->Sup.len;
			}
			LA43: ;
		}
		LA39: ;
		{
			if (!((NI64)(l + 2) < 2000)) goto LA47;
			memcpy(((void*) ((&buf[(l)- 0]))), " [", 2);
			l += 2;
		}
		LA47: ;
		{
			NI LOC51;
			NI LOC54;
			NI LOC55;
			LOC51 = 0;
			LOC51 = strlen((*e).name);
			if (!((NI64)(l + LOC51) < 2000)) goto LA52;
			LOC54 = 0;
			LOC54 = strlen((*e).name);
			memcpy(((void*) ((&buf[(l)- 0]))), ((void*) ((*e).name)), LOC54);
			LOC55 = 0;
			LOC55 = strlen((*e).name);
			l += LOC55;
		}
		LA52: ;
		{
			if (!((NI64)(l + 2) < 2000)) goto LA58;
			memcpy(((void*) ((&buf[(l)- 0]))), "]\012", 2);
			l += 2;
		}
		LA58: ;
		showerrormessage_16209(((NCSTRING) (buf)));
		quitordebug_17201();
	}
	LA19: ;
	BeforeRet: ;
}

N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename) {
	(*e).name = ename;
	raiseexceptionaux_17404(e);
}

N_NOINLINE(void, raiseOverflow)(void) {
	overflowerror3243* e_22019;
	NimStringDesc* LOC1;
	e_22019 = 0;
	e_22019 = (overflowerror3243*) newObj((&NTI22201), sizeof(overflowerror3243));
	(*e_22019).Sup.Sup.Sup.m_type = (&NTI3243);
	LOC1 = 0;
	LOC1 = (*e_22019).Sup.Sup.message; (*e_22019).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP52));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_22019, "OverflowError");
}

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
	result = 0;
	result = (NI)((NU64)(a) + (NU64)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 <= (NI)(result ^ a));
		if (LOC3) goto LA4;
		LOC3 = (0 <= (NI)(result ^ b));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, mulInt)(NI a, NI b) {
	NI result;
	NF resasfloat;
	NF floatprod;
	result = 0;
	resasfloat = 0;
	floatprod = 0;
	result = (NI)((NU64)(a) * (NU64)(b));
	floatprod = ((NF)(((double) (a))) * (NF)(((double) (b))));
	resasfloat = ((double) (result));
	{
		if (!(resasfloat == floatprod)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(((NF)(3.2000000000000000e+01) * (NF)((((NF)(resasfloat) - (NF)(floatprod)) > 0? (((NF)(resasfloat) - (NF)(floatprod))) : -(((NF)(resasfloat) - (NF)(floatprod)))))) <= (floatprod > 0? (floatprod) : -(floatprod)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len) {
	void* result;
	NI size;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = mulInt(len, (*(*typ).base).size);
	size = addInt(LOC1, 16);
	result = newObjRC1(typ, size);
	(*((TGenericSeq*) (result))).len = len;
	(*((TGenericSeq*) (result))).reserved = len;
	return result;
}

N_NIMCALL(void*, newSeq)(TNimType* typ, NI len) {
	void* result;
	NI size;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = mulInt(len, (*(*typ).base).size);
	size = addInt(LOC1, 16);
	result = newObj(typ, size);
	(*((TGenericSeq*) (result))).len = len;
	(*((TGenericSeq*) (result))).reserved = len;
	return result;
}

N_NOINLINE(NIM_BOOL, isonstack_49014)(void* p) {
	NIM_BOOL result;
	void* volatile stacktop;
	NI b;
	NI a;
	NI x;
	NIM_BOOL LOC1;
	result = 0;
	stacktop = 0;
	stacktop = ((void*) ((&stacktop)));
	b = ((NI) (gch_47044.Stackbottom));
	a = ((NI) (stacktop));
	x = ((NI) (p));
	LOC1 = 0;
	LOC1 = ((NU64)(a) <= (NU64)(x));
	if (!(LOC1)) goto LA2;
	LOC1 = ((NU64)(x) <= (NU64)(b));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isonstack_49014(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		{
			tcell44935* LOC10;
			if (!!((src == NIM_NIL))) goto LA8;
			LOC10 = 0;
			LOC10 = usrtocell_48646(src);
			incref_51025(LOC10);
		}
		LA8: ;
		{
			tcell44935* LOC15;
			if (!((NU64)(4096) <= (NU64)(((NI) ((*dest)))))) goto LA13;
			LOC15 = 0;
			LOC15 = usrtocell_48646((*dest));
			decref_50604(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	(*dest) = src;
}
N_NIMCALL(void, TMP137)(void* p, NI op) {
	valueerror3249* a;
	a = (valueerror3249*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

N_NOINLINE(void, chckNil)(void* p) {
	{
		valueerror3249* e_21227;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_21227 = 0;
		e_21227 = (valueerror3249*) newObj((&NTI21401), sizeof(valueerror3249));
		(*e_21227).Sup.Sup.m_type = (&NTI3249);
		LOC5 = 0;
		LOC5 = (*e_21227).Sup.message; (*e_21227).Sup.message = copyStringRC1(((NimStringDesc*) &TMP138));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_21227, "ValueError");
	}
	LA3: ;
}

N_NIMCALL(void, genericresetaux_78601)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		genericReset(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_80220;
			NI HEX3Atmp_80251;
			NI res_80254;
			i_80220 = 0;
			HEX3Atmp_80251 = 0;
			HEX3Atmp_80251 = (NI64)((*n).len - 1);
			res_80254 = 0;
			{
				while (1) {
					if (!(res_80254 <= HEX3Atmp_80251)) goto LA6;
					i_80220 = res_80254;
					genericresetaux_78601(dest, (*n).sons[(i_80220)- 0]);
					res_80254 += 1;
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			genericresetaux_78601(dest, m);
		}
		LA10: ;
		zeroMem(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*(*n).typ).size);
	}
	break;
	}
}

N_NIMCALL(void, genericReset)(void* dest, TNimType* mt) {
	NI d;
	d = ((NI) (dest));
	switch ((*mt).kind) {
	case ((NU8) 28):
	case ((NU8) 22):
	case ((NU8) 24):
	{
		unsureAsgnRef(((void**) (dest)), NIM_NIL);
	}
	break;
	case ((NU8) 17):
	case ((NU8) 18):
	{
		genericresetaux_78601(dest, (*mt).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_80411;
			NI HEX3Atmp_80434;
			NI res_80437;
			i_80411 = 0;
			HEX3Atmp_80434 = 0;
			HEX3Atmp_80434 = (NI64)((NI64)((*mt).size / (*(*mt).base).size) - 1);
			res_80437 = 0;
			{
				while (1) {
					if (!(res_80437 <= HEX3Atmp_80434)) goto LA6;
					i_80411 = res_80437;
					genericReset(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_80411) * (NU64)((*(*mt).base).size)))))), (*mt).base);
					res_80437 += 1;
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
		zeroMem(dest, (*mt).size);
	}
	break;
	}
}

N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src) {
	NimStringDesc* result;
	result = 0;
	{
		if (!!((src == NIM_NIL))) goto LA3;
		{
			if (!!(((NI)((*src).Sup.reserved & (IL64(-9223372036854775807) - IL64(1))) == 0))) goto LA7;
			result = src;
		}
		goto LA5;
		LA7: ;
		{
			result = rawNewString((NI)((*src).Sup.reserved & IL64(9223372036854775807)));
			(*result).Sup.len = (*src).Sup.len;
			memcpy(((NCSTRING) ((*result).data)), ((NCSTRING) ((*src).data)), (NI64)((NI64)((*src).Sup.len + 1) * 1));
		}
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_74828, NI last) {
	NimStringDesc* result;
	NI start;
	NI len;
	result = 0;
	start = ((start_74828 >= 0) ? start_74828 : 0);
	len = (NI64)((NI64)(((last <= (NI64)((*s).Sup.len - 1)) ? last : (NI64)((*s).Sup.len - 1)) - start) + 1);
	{
		if (!(0 < len)) goto LA3;
		result = rawNewString(len);
		(*result).Sup.len = len;
		memcpy(((NCSTRING) ((*result).data)), ((NCSTRING) ((&(*s).data[(start)- 0]))), (NI64)(len * 1));
	}
	goto LA1;
	LA3: ;
	{
		result = rawNewString(len);
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start) {
	NimStringDesc* result;
	result = 0;
	result = copyStrLast(s, start, (NI64)((*s).Sup.len - 1));
	return result;
}

static N_INLINE(NI, resize_74601)(NI old) {
	NI result;
	result = 0;
	{
		if (!(old <= 0)) goto LA3;
		result = 4;
	}
	goto LA1;
	LA3: ;
	{
		if (!(old < 65536)) goto LA6;
		result = (NI64)(old * 2);
	}
	goto LA1;
	LA6: ;
	{
		result = (NI64)((NI64)(old * 3) / 2);
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, growobj_60406)(void* old, NI newsize, tgcheap47016* gch) {
	void* result;
	tcell44935* ol;
	tcell44935* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	result = 0;
	collectct_49010(gch);
	ol = usrtocell_48646(old);
	LOC1 = 0;
	LOC1 = rawalloc_34346((&(*gch).Region), (NI64)(newsize + ((NI)sizeof(tcell44935))));
	res = ((tcell44935*) (LOC1));
	elemsize = 1;
	{
		if (!!(((*(*ol).Typ).kind == ((NU8) 28)))) goto LA4;
		elemsize = (*(*(*ol).Typ).base).size;
	}
	LA4: ;
	oldsize = (NI64)((NI64)((*((TGenericSeq*) (old))).len * elemsize) + 16);
	memcpy(((void*) (res)), ((void*) (ol)), (NI64)(oldsize + ((NI)sizeof(tcell44935))));
	zeroMem(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (res))) + (NU64)(oldsize))) + (NU64)(((NI)sizeof(tcell44935)))))), (NI64)(newsize - oldsize));
	{
		NI j;
		tcell44935** d;
		if (!!(((NI)((*ol).Refcount & 4) == 0))) goto LA8;
		j = (NI64)((*gch).Zct.Len - 1);
		d = (*gch).Zct.D;
		{
			while (1) {
				if (!(0 <= j)) goto LA11;
				{
					if (!(d[(j)- 0] == ol)) goto LA14;
					d[(j)- 0] = res;
					goto LA10;
				}
				LA14: ;
				j -= 1;
			} LA11: ;
		} LA10: ;
	}
	LA8: ;
	{
		NIM_BOOL LOC18;
		LOC18 = 0;
		LOC18 = canbecycleroot_48667(ol);
		if (!LOC18) goto LA19;
		excl_45702((&(*gch).Cycleroots), ol);
	}
	LA19: ;
	rawdealloc_40623((&(*gch).Region), ((void*) (ol)));
	result = celltousr_48625(res);
	return result;
}

N_NIMCALL(void*, growobj_63418)(void* old, NI newsize) {
	void* result;
	result = 0;
	result = growobj_60406(old, newsize, (&gch_47044));
	return result;
}

N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c) {
	NimStringDesc* result;
	result = 0;
	result = s;
	{
		void* LOC5;
		if (!((NI)((*result).Sup.reserved & IL64(9223372036854775807)) <= (*result).Sup.len)) goto LA3;
		(*result).Sup.reserved = resize_74601((NI)((*result).Sup.reserved & IL64(9223372036854775807)));
		LOC5 = 0;
		LOC5 = growobj_63418(((void*) (result)), (NI64)(((NI)sizeof(TGenericSeq)) + (NI64)((NI64)((*result).Sup.reserved + 1) * 1)));
		result = ((NimStringDesc*) (LOC5));
	}
	LA3: ;
	(*result).data[((*result).Sup.len)- 0] = c;
	(*result).data[((NI64)((*result).Sup.len + 1))- 0] = 0;
	(*result).Sup.len += 1;
	return result;
}

N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((NI64)((*dest).Sup.len + addlen) <= (NI)((*dest).Sup.reserved & IL64(9223372036854775807)))) goto LA3;
		result = dest;
	}
	goto LA1;
	LA3: ;
	{
		NI sp;
		NI LOC6;
		void* LOC7;
		LOC6 = 0;
		LOC6 = resize_74601((NI)((*dest).Sup.reserved & IL64(9223372036854775807)));
		sp = ((LOC6 >= (NI64)((*dest).Sup.len + addlen)) ? LOC6 : (NI64)((*dest).Sup.len + addlen));
		LOC7 = 0;
		LOC7 = growobj_63418(((void*) (dest)), (NI64)((NI64)(((NI)sizeof(TGenericSeq)) + sp) + 1));
		result = ((NimStringDesc*) (LOC7));
		(*result).Sup.reserved = sp;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen) {
	NimStringDesc* result;
	NI n;
	result = 0;
	n = ((newlen >= 0) ? newlen : 0);
	{
		if (!(n <= (NI)((*s).Sup.reserved & IL64(9223372036854775807)))) goto LA3;
		result = s;
	}
	goto LA1;
	LA3: ;
	{
		result = resizeString(s, n);
	}
	LA1: ;
	(*result).Sup.len = n;
	(*result).data[(n)- 0] = 0;
	return result;
}

N_NIMCALL(NimStringDesc*, mnewString)(NI len) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(len);
	(*result).Sup.len = len;
	return result;
}

N_NIMCALL(NimStringDesc*, nimCharToStr)(NIM_CHAR x) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(1);
	result->data[0] = x;
	return result;
}

N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		void* LOC5;
		if (!((NI)((*result).reserved & IL64(9223372036854775807)) <= (*result).len)) goto LA3;
		(*result).reserved = resize_74601((NI)((*result).reserved & IL64(9223372036854775807)));
		LOC5 = 0;
		LOC5 = growobj_63418(((void*) (result)), (NI64)((NI64)(elemsize * (*result).reserved) + 16));
		result = ((TGenericSeq*) (LOC5));
	}
	LA3: ;
	(*result).len += 1;
	return result;
}

N_NIMCALL(void, genericassignaux_78612)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow) {
	NI d;
	NI s;
	d = ((NI) (dest));
	s = ((NI) (src));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		genericassignaux_78606(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), ((void*) ((NI)((NU64)(s) + (NU64)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_78649;
			NI HEX3Atmp_78806;
			NI res_78809;
			i_78649 = 0;
			HEX3Atmp_78806 = 0;
			HEX3Atmp_78806 = (NI64)((*n).len - 1);
			res_78809 = 0;
			{
				while (1) {
					if (!(res_78809 <= HEX3Atmp_78806)) goto LA5;
					i_78649 = res_78809;
					genericassignaux_78612(dest, src, (*n).sons[(i_78649)- 0], shallow);
					res_78809 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		dd = selectbranch_25410(dest, n);
		m = selectbranch_25410(src, n);
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = !((m == dd));
			if (!(LOC9)) goto LA10;
			LOC9 = !((dd == NIM_NIL));
			LA10: ;
			if (!LOC9) goto LA11;
			genericresetaux_78601(dest, dd);
		}
		LA11: ;
		memcpy(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), ((void*) ((NI)((NU64)(s) + (NU64)((*n).offset)))), (*(*n).typ).size);
		{
			if (!!((m == NIM_NIL))) goto LA15;
			genericassignaux_78612(dest, src, m, shallow);
		}
		LA15: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, genericassignaux_78606)(void* dest, void* src, TNimType* mt, NIM_BOOL shallow) {
	NI d;
	NI s;
	d = ((NI) (dest));
	s = ((NI) (src));
	switch ((*mt).kind) {
	case ((NU8) 28):
	{
		void** x;
		void* s2;
		x = ((void**) (dest));
		s2 = (*((void**) (s)));
		{
			NIM_BOOL LOC4;
			NIM_BOOL LOC5;
			LOC4 = 0;
			LOC5 = 0;
			LOC5 = (s2 == NIM_NIL);
			if (LOC5) goto LA6;
			LOC5 = shallow;
			LA6: ;
			LOC4 = LOC5;
			if (LOC4) goto LA7;
			LOC4 = !(((NI)((*((TGenericSeq*) (s2))).reserved & (IL64(-9223372036854775807) - IL64(1))) == 0));
			LA7: ;
			if (!LOC4) goto LA8;
			unsureAsgnRef(x, s2);
		}
		goto LA2;
		LA8: ;
		{
			NimStringDesc* LOC11;
			LOC11 = 0;
			LOC11 = copyString(((NimStringDesc*) (s2)));
			unsureAsgnRef(x, ((void*) (LOC11)));
		}
		LA2: ;
	}
	break;
	case ((NU8) 24):
	{
		void* s2;
		TGenericSeq* seq;
		void** x;
		void* LOC21;
		NI dst;
		s2 = (*((void**) (src)));
		seq = ((TGenericSeq*) (s2));
		x = ((void**) (dest));
		{
			NIM_BOOL LOC15;
			NIM_BOOL LOC16;
			LOC15 = 0;
			LOC16 = 0;
			LOC16 = (s2 == NIM_NIL);
			if (LOC16) goto LA17;
			LOC16 = shallow;
			LA17: ;
			LOC15 = LOC16;
			if (LOC15) goto LA18;
			LOC15 = !(((NI)((*seq).reserved & (IL64(-9223372036854775807) - IL64(1))) == 0));
			LA18: ;
			if (!LOC15) goto LA19;
			unsureAsgnRef(x, s2);
			goto BeforeRet;
		}
		LA19: ;
		LOC21 = 0;
		LOC21 = newSeq(mt, (*seq).len);
		unsureAsgnRef(x, LOC21);
		dst = ((NI) ((*((void**) (dest)))));
		{
			NI i_79212;
			NI HEX3Atmp_79348;
			NI res_79351;
			i_79212 = 0;
			HEX3Atmp_79348 = 0;
			HEX3Atmp_79348 = (NI64)((*seq).len - 1);
			res_79351 = 0;
			{
				while (1) {
					if (!(res_79351 <= HEX3Atmp_79348)) goto LA24;
					i_79212 = res_79351;
					genericassignaux_78606(((void*) ((NI)((NU64)((NI)((NU64)(dst) + (NU64)((NI)((NU64)(i_79212) * (NU64)((*(*mt).base).size))))) + (NU64)(16)))), ((void*) ((NI)((NU64)((NI)((NU64)(((NI) (s2))) + (NU64)((NI)((NU64)(i_79212) * (NU64)((*(*mt).base).size))))) + (NU64)(16)))), (*mt).base, shallow);
					res_79351 += 1;
				} LA24: ;
			}
		}
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		{
			if (!!(((*mt).base == NIM_NIL))) goto LA28;
			genericassignaux_78606(dest, src, (*mt).base, shallow);
		}
		LA28: ;
		genericassignaux_78612(dest, src, (*mt).node, shallow);
		pint = ((TNimType**) (dest));
		(*pint) = mt;
	}
	break;
	case ((NU8) 18):
	{
		genericassignaux_78612(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_79296;
			NI HEX3Atmp_79357;
			NI res_79360;
			i_79296 = 0;
			HEX3Atmp_79357 = 0;
			HEX3Atmp_79357 = (NI64)((NI64)((*mt).size / (*(*mt).base).size) - 1);
			res_79360 = 0;
			{
				while (1) {
					if (!(res_79360 <= HEX3Atmp_79357)) goto LA34;
					i_79296 = res_79360;
					genericassignaux_78606(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_79296) * (NU64)((*(*mt).base).size)))))), ((void*) ((NI)((NU64)(s) + (NU64)((NI)((NU64)(i_79296) * (NU64)((*(*mt).base).size)))))), (*mt).base, shallow);
					res_79360 += 1;
				} LA34: ;
			}
		}
	}
	break;
	case ((NU8) 22):
	{
		unsureAsgnRef(((void**) (dest)), (*((void**) (s))));
	}
	break;
	default:
	{
		memcpy(dest, src, (*mt).size);
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt) {
	genericassignaux_78606(dest, src, mt, NIM_FALSE);
}

N_NIMCALL(NI, writebuffer_13046)(FILE* f, void* buffer, NI len) {
	NI result;
	result = 0;
	result = fwrite(buffer, 1, len, f);
	return result;
}
N_NIMCALL(void, TMP150)(void* p, NI op) {
	ioerror3231* a;
	a = (ioerror3231*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NOINLINE(void, raiseeio_76805)(NimStringDesc* msg) {
	ioerror3231* e_76810;
	NimStringDesc* LOC1;
	e_76810 = 0;
	e_76810 = (ioerror3231*) newObj((&NTI77001), sizeof(ioerror3231));
	(*e_76810).Sup.Sup.Sup.m_type = (&NTI3231);
	LOC1 = 0;
	LOC1 = (*e_76810).Sup.Sup.message; (*e_76810).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_76810, "IOError");
}

N_NIMCALL(void, write_12865)(FILE* f, NimStringDesc* s) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = writebuffer_13046(f, ((void*) (s->data)), s->Sup.len);
		if (!!((LOC3 == s->Sup.len))) goto LA4;
		raiseeio_76805(((NimStringDesc*) &TMP151));
	}
	LA4: ;
}

static N_INLINE(void*, seqtoptr_197692)(TY119808* x_197698) {
	void* result;
	result = 0;
	result = ((void*) (x_197698));
	return result;
}

static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
	NIM_BOOL result;
	NIM_BOOL LOC11;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == NIM_NIL);
		if (LOC7) goto LA8;
		LOC7 = (b == NIM_NIL);
		LA8: ;
		if (!LOC7) goto LA9;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA9: ;
	LOC11 = 0;
	LOC11 = ((*a).Sup.len == (*b).Sup.len);
	if (!(LOC11)) goto LA12;
	LOC13 = 0;
	LOC13 = memcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)), (NI64)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_197676)(TY119808* x_197682, TY119808* y_197687) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_197692(x_197682);
		LOC4 = 0;
		LOC4 = seqtoptr_197692(y_197687);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_197692(x_197682);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_197692(y_197687);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_197682->Sup.len == y_197687->Sup.len)) goto LA15;
		{
			NI i_197781;
			NI HEX3Atmp_197783;
			NI res_197786;
			i_197781 = 0;
			HEX3Atmp_197783 = 0;
			HEX3Atmp_197783 = (NI64)(x_197682->Sup.len - 1);
			res_197786 = 0;
			{
				while (1) {
					if (!(res_197786 <= HEX3Atmp_197783)) goto LA19;
					i_197781 = res_197786;
					{
						if (!!(eqStrings(x_197682->data[i_197781], y_197687->data[i_197781]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_197786 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_197660)(TY119808** x_197668, NimStringDesc* y_197672) {
	{
		NIM_BOOL LOC3;
		TY198301 LOC6;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_197676((*x_197668), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_197668)), (TY119808*) newSeq((&NTI119808), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(y_197672);
		LOC7 = 0;
		LOC7 = (*x_197668)->data[0]; (*x_197668)->data[0] = copyStringRC1(LOC6[0]);
		if (LOC7) nimGCunrefNoCycle(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* LOC9;
		(*x_197668) = (TY119808*) incrSeq(&((*x_197668))->Sup, sizeof(NimStringDesc*));
		LOC9 = 0;
		LOC9 = (*x_197668)->data[(*x_197668)->Sup.len-1]; (*x_197668)->data[(*x_197668)->Sup.len-1] = copyStringRC1(y_197672);
		if (LOC9) nimGCunrefNoCycle(LOC9);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x) {
	NimStringDesc* result;
	NI i;
	NI y;
	result = 0;
	result = mnewString(32);
	i = 0;
	y = x;
	{
		while (1) {
			NI d;
			d = (NI64)(y / 10);
			result->data[i] = ((NIM_CHAR) (((NI) ((NI64)(((NI64)(y - (NI64)(d * 10)) > 0? ((NI64)(y - (NI64)(d * 10))) : -((NI64)(y - (NI64)(d * 10)))) + 48)))));
			i += 1;
			y = d;
			{
				if (!(y == 0)) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	{
		if (!(x < 0)) goto LA9;
		result->data[i] = 45;
		i += 1;
	}
	LA9: ;
	result = setLengthStr(result, i);
	{
		NI j_75758;
		NI HEX3Atmp_75777;
		NI res_75780;
		j_75758 = 0;
		HEX3Atmp_75777 = 0;
		HEX3Atmp_75777 = (NI64)((NI64)(i / 2) - 1);
		res_75780 = 0;
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_75780 <= HEX3Atmp_75777)) goto LA13;
				j_75758 = res_75780;
				LOC14 = 0;
				LOC14 = result->data[j_75758];
				result->data[j_75758] = result->data[(NI64)((NI64)(i - j_75758) - 1)];
				result->data[(NI64)((NI64)(i - j_75758) - 1)] = LOC14;
				res_75780 += 1;
			} LA13: ;
		}
	}
	return result;
}

N_NIMCALL(void, writestacktrace_15606)(void) {
	showerrormessage_16209("No stack traceback available\012");
}
N_NIMCALL(void, TMP829)(void* p, NI op) {
	TNimObject* a;
	a = (TNimObject*)p;
}

N_NIMCALL(void, objectinitaux_79692)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		objectInit(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_79820;
			NI HEX3Atmp_79842;
			NI res_79845;
			i_79820 = 0;
			HEX3Atmp_79842 = 0;
			HEX3Atmp_79842 = (NI64)((*n).len - 1);
			res_79845 = 0;
			{
				while (1) {
					if (!(res_79845 <= HEX3Atmp_79842)) goto LA6;
					i_79820 = res_79845;
					objectinitaux_79692(dest, (*n).sons[(i_79820)- 0]);
					res_79845 += 1;
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			objectinitaux_79692(dest, m);
		}
		LA10: ;
	}
	break;
	}
}

N_NIMCALL(void, objectInit)(void* dest, TNimType* typ) {
	NI d;
	d = ((NI) (dest));
	switch ((*typ).kind) {
	case ((NU8) 17):
	{
		TNimType** pint;
		pint = ((TNimType**) (dest));
		(*pint) = typ;
		objectinitaux_79692(dest, (*typ).node);
	}
	break;
	case ((NU8) 18):
	{
		objectinitaux_79692(dest, (*typ).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_79876;
			NI HEX3Atmp_79890;
			NI res_79893;
			i_79876 = 0;
			HEX3Atmp_79890 = 0;
			HEX3Atmp_79890 = (NI64)((NI64)((*typ).size / (*(*typ).base).size) - 1);
			res_79893 = 0;
			{
				while (1) {
					if (!(res_79893 <= HEX3Atmp_79890)) goto LA6;
					i_79876 = res_79893;
					objectInit(((void*) ((NI)((NU64)(d) + (NU64)((NI64)(i_79876 * (*(*typ).base).size))))), (*typ).base);
					res_79893 += 1;
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(NIM_BOOL, open_12603)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize) {
	NIM_BOOL result;
	void* p;
	result = 0;
	p = fopen(filename->data, formatopen_78010[(mode)- 0]->data);
	{
		if (!!((p == NIM_NIL))) goto LA3;
		result = NIM_TRUE;
		(*f) = ((FILE*) (p));
		{
			NIM_BOOL LOC7;
			int LOC11;
			LOC7 = 0;
			LOC7 = (0 < bufsize);
			if (!(LOC7)) goto LA8;
			LOC7 = (bufsize <= 2147483647);
			LA8: ;
			if (!LOC7) goto LA9;
			LOC11 = 0;
			LOC11 = setvbuf((*f), NIM_NIL, _IOFBF, ((int) (bufsize)));
		}
		goto LA5;
		LA9: ;
		{
			int LOC15;
			if (!(bufsize == 0)) goto LA13;
			LOC15 = 0;
			LOC15 = setvbuf((*f), NIM_NIL, _IONBF, ((int) 0));
		}
		goto LA5;
		LA13: ;
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NIM_BOOL, readline_12889)(FILE* f, NimStringDesc** line) {
	NIM_BOOL result;
	result = 0;
	(*line) = setLengthStr((*line), 0);
	{
		while (1) {
			int c;
			c = fgetc(f);
			{
				if (!(c < ((NI32) 0))) goto LA5;
				{
					if (!(0 < (*line)->Sup.len)) goto LA9;
					goto LA1;
				}
				goto LA7;
				LA9: ;
				{
					result = NIM_FALSE;
					goto BeforeRet;
				}
				LA7: ;
			}
			LA5: ;
			{
				if (!(c == ((NI32) 10))) goto LA14;
				goto LA1;
			}
			LA14: ;
			{
				if (!(c == ((NI32) 13))) goto LA18;
				c = fgetc(f);
				{
					if (!!((c == ((NI32) 10)))) goto LA22;
					ungetc(c, f);
				}
				LA22: ;
				goto LA1;
			}
			LA18: ;
			(*line) = addChar((*line), ((NIM_CHAR) (((NI) (((NI) (c)))))));
		}
	} LA1: ;
	result = NIM_TRUE;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, readbuffer_13027)(FILE* f, void* buffer, NI len) {
	NI result;
	result = 0;
	result = fread(buffer, 1, len, f);
	return result;
}

N_NIMCALL(NI, ptrsize_43216)(void* p) {
	NI result;
	void* x;
	tbasechunk26438* c;
	result = 0;
	x = ((void*) ((NI)((NU64)(((NI) (p))) - (NU64)(((NI)sizeof(tfreecell26430))))));
	c = pageaddr_29146(p);
	result = (NI)((NU64)((*c).Size) - (NU64)(((NI)sizeof(tfreecell26430))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = issmallchunk_28999(c);
		if (!!(LOC3)) goto LA4;
		result -= (NI64)(((NI)sizeof(tbigchunk26442)) - 8);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void*, realloc_44607)(tmemregion27210* allocator, void* p, NI newsize) {
	void* result;
	result = 0;
	{
		if (!(0 < newsize)) goto LA3;
		result = alloc0_43619(allocator, newsize);
		{
			NI LOC9;
			if (!!((p == NIM_NIL))) goto LA7;
			LOC9 = 0;
			LOC9 = ptrsize_43216(p);
			memcpy(result, p, LOC9);
			dealloc_43628(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!!((p == NIM_NIL))) goto LA11;
		dealloc_43628(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}

N_NOCONV(void*, realloc_5833)(void* p, NI newsize) {
	void* result;
	result = 0;
	result = realloc_44607((&gch_47044.Region), p, newsize);
	return result;
}

N_NIMCALL(TNimType*, extGetCellType)(void* c) {
	TNimType* result;
	tcell44935* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_48646(c);
	result = (*LOC1).Typ;
	return result;
}

N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		NI LOC5;
		void* LOC6;
		if (!((NI)((*result).reserved & IL64(9223372036854775807)) < newlen)) goto LA3;
		LOC5 = 0;
		LOC5 = resize_74601((NI)((*result).reserved & IL64(9223372036854775807)));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_63418(((void*) (result)), (NI64)((NI64)(elemsize * (*result).reserved) + 16));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		if (!(newlen < (*result).len)) goto LA8;
		{
			NI i_75611;
			NI HEX3Atmp_75688;
			NI res_75691;
			i_75611 = 0;
			HEX3Atmp_75688 = 0;
			HEX3Atmp_75688 = (NI64)((*result).len - 1);
			res_75691 = newlen;
			{
				while (1) {
					TNimType* LOC13;
					if (!(res_75691 <= HEX3Atmp_75688)) goto LA12;
					i_75611 = res_75691;
					LOC13 = 0;
					LOC13 = extGetCellType(((void*) (result)));
					forallchildrenaux_49025(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (result))) + (NU64)(16))) + (NU64)((NI)((NU64)(i_75611) * (NU64)(elemsize)))))), (*LOC13).base, ((NU8) 2));
					res_75691 += 1;
				} LA12: ;
			}
		}
		zeroMem(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (result))) + (NU64)(16))) + (NU64)((NI)((NU64)(newlen) * (NU64)(elemsize)))))), (NI)((NU64)((NI)((NU64)((*result).len) - (NU64)(newlen))) * (NU64)(elemsize)));
	}
	goto LA1;
	LA8: ;
	LA1: ;
	(*result).len = newlen;
	return result;
}

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

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell44935* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48646(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell44935* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_48646((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU64)((*c).Refcount) < (NU64)(8))) goto LA11;
			rtladdzct_50204(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(FILE*, open_12617)(NimStringDesc* filename, NU8 mode, NI bufsize) {
	FILE* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		ioerror3231* e_12626;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = open_12603(&result, filename, mode, bufsize);
		if (!!(LOC3)) goto LA4;
		e_12626 = 0;
		e_12626 = (ioerror3231*) newObj((&NTI77001), sizeof(ioerror3231));
		(*e_12626).Sup.Sup.Sup.m_type = (&NTI3231);
		LOC6 = 0;
		LOC6 = rawNewString(filename->Sup.len + 13);
appendString(LOC6, ((NimStringDesc*) &TMP1041));
appendString(LOC6, filename);
		asgnRefNoCycle((void**) (&(*e_12626).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_12626, "IOError");
	}
	LA4: ;
	return result;
}

N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass) {
	NIM_BOOL result;
	TNimType* x;
	result = 0;
	x = obj;
	{
		if (!(x == subclass)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	{
		while (1) {
			if (!!((x == subclass))) goto LA6;
			{
				if (!(x == NIM_NIL)) goto LA9;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA9: ;
			x = (*x).base;
		} LA6: ;
	}
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP1042)(void* p, NI op) {
	reraiseerror3263* a;
	a = (reraiseerror3263*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

N_NIMCALL(void, reraiseException)(void) {
	{
		reraiseerror3263* e_17825;
		NimStringDesc* LOC5;
		if (!(currexception_16245 == NIM_NIL)) goto LA3;
		e_17825 = 0;
		e_17825 = (reraiseerror3263*) newObj((&NTI18001), sizeof(reraiseerror3263));
		(*e_17825).Sup.Sup.m_type = (&NTI3263);
		LOC5 = 0;
		LOC5 = (*e_17825).Sup.message; (*e_17825).Sup.message = copyStringRC1(((NimStringDesc*) &TMP1043));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_17825, "ReraiseError");
	}
	goto LA1;
	LA3: ;
	{
		raiseexceptionaux_17404(currexception_16245);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, HEX24_199126)(TY84745 x_199130) {
	NimStringDesc* result;
	NIM_BOOL firstelement;
	NimStringDesc* LOC9;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1044));
	firstelement = NIM_TRUE;
	{
		if (!!(firstelement)) goto LA3;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1045));
	}
	LA3: ;
	result = resizeString(result, 8);
appendString(result, ((NimStringDesc*) &TMP1046));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1047));
	result = resizeString(result, x_199130.Field0->Sup.len + 0);
appendString(result, x_199130.Field0);
	firstelement = NIM_FALSE;
	{
		if (!!(firstelement)) goto LA7;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1045));
	}
	LA7: ;
	result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TMP1048));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1047));
	LOC9 = 0;
	LOC9 = nimIntToStr(x_199130.Field1);
	result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
	firstelement = NIM_FALSE;
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP1049));
	return result;
}

N_NIMCALL(NIM_CHAR, getdecimalpoint_75860)(void) {
	NIM_CHAR result;
	result = 0;
	result = decimalpoint_75859;
	{
		if (!((NU8)(result) == (NU8)(0))) goto LA3;
		{
			NF LOC7;
			LOC7 = 0;
			LOC7 = strtod("0,5", NIM_NIL);
			if (!(LOC7 == 5.0000000000000000e-01)) goto LA8;
			result = 44;
		}
		goto LA5;
		LA8: ;
		{
			result = 46;
		}
		LA5: ;
		decimalpoint_75859 = result;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NI, nimParseBiggestFloat)(NimStringDesc* s, NF* number, NI start) {
	NI result;
	NI i;
	NF sign;
	TY75879 t;
	NI ti;
	NIM_BOOL hasdigits;
	result = 0;
	i = start;
	sign = 1.0000000000000000e+00;
	memset((void*)t, 0, sizeof(t));
	ti = 0;
	hasdigits = NIM_FALSE;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = ((NU8)(s->data[i]) == (NU8)(43));
		if (LOC3) goto LA4;
		LOC3 = ((NU8)(s->data[i]) == (NU8)(45));
		LA4: ;
		if (!LOC3) goto LA5;
		{
			if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA9;
			sign = -1.0000000000000000e+00;
		}
		LA9: ;
		t[(ti)- 0] = s->data[i];
		i += 1;
		ti += 1;
	}
	LA5: ;
	{
		NIM_BOOL LOC13;
		LOC13 = 0;
		LOC13 = ((NU8)(s->data[i]) == (NU8)(78));
		if (LOC13) goto LA14;
		LOC13 = ((NU8)(s->data[i]) == (NU8)(110));
		LA14: ;
		if (!LOC13) goto LA15;
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = ((NU8)(s->data[(NI64)(i + 1)]) == (NU8)(65));
			if (LOC19) goto LA20;
			LOC19 = ((NU8)(s->data[(NI64)(i + 1)]) == (NU8)(97));
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				LOC25 = 0;
				LOC25 = ((NU8)(s->data[(NI64)(i + 2)]) == (NU8)(78));
				if (LOC25) goto LA26;
				LOC25 = ((NU8)(s->data[(NI64)(i + 2)]) == (NU8)(110));
				LA26: ;
				if (!LOC25) goto LA27;
				{
					if (!!((((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(97)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(122)) || ((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(90)) || ((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(48)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(57)) || ((NU8)(s->data[(NI64)(i + 3)])) == ((NU8)(95))))) goto LA31;
					(*number) = NAN;
					result = (NI64)((NI64)(i + 3) - start);
					goto BeforeRet;
				}
				LA31: ;
			}
			LA27: ;
		}
		LA21: ;
		result = 0;
		goto BeforeRet;
	}
	LA15: ;
	{
		NIM_BOOL LOC35;
		LOC35 = 0;
		LOC35 = ((NU8)(s->data[i]) == (NU8)(73));
		if (LOC35) goto LA36;
		LOC35 = ((NU8)(s->data[i]) == (NU8)(105));
		LA36: ;
		if (!LOC35) goto LA37;
		{
			NIM_BOOL LOC41;
			LOC41 = 0;
			LOC41 = ((NU8)(s->data[(NI64)(i + 1)]) == (NU8)(78));
			if (LOC41) goto LA42;
			LOC41 = ((NU8)(s->data[(NI64)(i + 1)]) == (NU8)(110));
			LA42: ;
			if (!LOC41) goto LA43;
			{
				NIM_BOOL LOC47;
				LOC47 = 0;
				LOC47 = ((NU8)(s->data[(NI64)(i + 2)]) == (NU8)(70));
				if (LOC47) goto LA48;
				LOC47 = ((NU8)(s->data[(NI64)(i + 2)]) == (NU8)(102));
				LA48: ;
				if (!LOC47) goto LA49;
				{
					if (!!((((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(97)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(122)) || ((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(90)) || ((NU8)(s->data[(NI64)(i + 3)])) >= ((NU8)(48)) && ((NU8)(s->data[(NI64)(i + 3)])) <= ((NU8)(57)) || ((NU8)(s->data[(NI64)(i + 3)])) == ((NU8)(95))))) goto LA53;
					(*number) = ((NF)(INF) * (NF)(sign));
					result = (NI64)((NI64)(i + 3) - start);
					goto BeforeRet;
				}
				LA53: ;
			}
			LA49: ;
		}
		LA43: ;
		result = 0;
		goto BeforeRet;
	}
	LA37: ;
	{
		while (1) {
			if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA56;
			hasdigits = NIM_TRUE;
			{
				if (!(ti < 499)) goto LA59;
				t[(ti)- 0] = s->data[i];
				ti += 1;
			}
			LA59: ;
			i += 1;
			{
				while (1) {
					if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA62;
					i += 1;
				} LA62: ;
			}
		} LA56: ;
	}
	{
		if (!((NU8)(s->data[i]) == (NU8)(46))) goto LA65;
		{
			if (!(ti < 499)) goto LA69;
			t[(ti)- 0] = getdecimalpoint_75860();
			ti += 1;
		}
		LA69: ;
		i += 1;
		{
			while (1) {
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA72;
				hasdigits = NIM_TRUE;
				{
					if (!(ti < 499)) goto LA75;
					t[(ti)- 0] = s->data[i];
					ti += 1;
				}
				LA75: ;
				i += 1;
				{
					while (1) {
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA78;
						i += 1;
					} LA78: ;
				}
			} LA72: ;
		}
	}
	LA65: ;
	{
		if (!!(hasdigits)) goto LA81;
		result = 0;
		goto BeforeRet;
	}
	LA81: ;
	{
		if (!(((NU8)(s->data[i])) == ((NU8)(101)) || ((NU8)(s->data[i])) == ((NU8)(69)))) goto LA85;
		{
			if (!(ti < 499)) goto LA89;
			t[(ti)- 0] = s->data[i];
			ti += 1;
		}
		LA89: ;
		i += 1;
		{
			if (!(((NU8)(s->data[i])) == ((NU8)(43)) || ((NU8)(s->data[i])) == ((NU8)(45)))) goto LA93;
			{
				if (!(ti < 499)) goto LA97;
				t[(ti)- 0] = s->data[i];
				ti += 1;
			}
			LA97: ;
			i += 1;
		}
		LA93: ;
		{
			if (!!((((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57))))) goto LA101;
			result = 0;
			goto BeforeRet;
		}
		LA101: ;
		{
			while (1) {
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA104;
				{
					if (!(ti < 499)) goto LA107;
					t[(ti)- 0] = s->data[i];
					ti += 1;
				}
				LA107: ;
				i += 1;
				{
					while (1) {
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA110;
						i += 1;
					} LA110: ;
				}
			} LA104: ;
		}
	}
	LA85: ;
	(*number) = strtod(((NCSTRING) (t)), NIM_NIL);
	result = (NI64)(i - start);
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI64, mulInt64)(NI64 a, NI64 b) {
	NI64 result;
	NF resasfloat;
	NF floatprod;
	result = 0;
	resasfloat = 0;
	floatprod = 0;
	result = (NI64)((NU64)(a) * (NU64)(b));
	floatprod = ((double) (a));
	floatprod = ((NF)(floatprod) * (NF)(((double) (b))));
	resasfloat = ((double) (result));
	{
		if (!(resasfloat == floatprod)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(((NF)(3.2000000000000000e+01) * (NF)((((NF)(resasfloat) - (NF)(floatprod)) > 0? (((NF)(resasfloat) - (NF)(floatprod))) : -(((NF)(resasfloat) - (NF)(floatprod)))))) <= (floatprod > 0? (floatprod) : -(floatprod)))) goto LA7;
		goto BeforeRet;
	}
	LA7: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP1075)(void* p, NI op) {
	oserror3233* a;
	a = (oserror3233*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}
N_NIMCALL(void, TMP1078)(void* p, NI op) {
	indexerror3255* a;
	a = (indexerror3255*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x) {
	NimStringDesc* result;
	NI i;
	NI64 y;
	result = 0;
	result = mnewString(32);
	i = 0;
	y = x;
	{
		while (1) {
			NI64 d;
			d = (NI64)(y / IL64(10));
			result->data[i] = ((NIM_CHAR) (((NI) ((NI64)((((NI) ((NI64)(y - (NI64)(d * IL64(10))))) > 0? (((NI) ((NI64)(y - (NI64)(d * IL64(10)))))) : -(((NI) ((NI64)(y - (NI64)(d * IL64(10))))))) + 48)))));
			i += 1;
			y = d;
			{
				if (!(y == IL64(0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	{
		if (!(x < IL64(0))) goto LA9;
		result->data[i] = 45;
		i += 1;
	}
	LA9: ;
	result = setLengthStr(result, i);
	{
		NI j_76325;
		NI HEX3Atmp_76344;
		NI res_76347;
		j_76325 = 0;
		HEX3Atmp_76344 = 0;
		HEX3Atmp_76344 = (NI64)((NI64)(i / 2) - 1);
		res_76347 = 0;
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_76347 <= HEX3Atmp_76344)) goto LA13;
				j_76325 = res_76347;
				LOC14 = 0;
				LOC14 = result->data[j_76325];
				result->data[j_76325] = result->data[(NI64)((NI64)(i - j_76325) - 1)];
				result->data[(NI64)((NI64)(i - j_76325) - 1)] = LOC14;
				res_76347 += 1;
			} LA13: ;
		}
	}
	return result;
}

N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF f) {
	NimStringDesc* result;
	TY75804 buf;
	NI n;
	int LOC1;
	NIM_BOOL hasdot;
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	LOC1 = 0;
	LOC1 = sprintf(((NCSTRING) (buf)), "%.16g", f);
	n = ((NI) (LOC1));
	hasdot = NIM_FALSE;
	{
		NI i_75819;
		NI HEX3Atmp_75837;
		NI res_75840;
		i_75819 = 0;
		HEX3Atmp_75837 = 0;
		HEX3Atmp_75837 = (NI64)(n - 1);
		res_75840 = 0;
		{
			while (1) {
				if (!(res_75840 <= HEX3Atmp_75837)) goto LA4;
				i_75819 = res_75840;
				{
					if (!((NU8)(buf[(i_75819)- 0]) == (NU8)(44))) goto LA7;
					buf[(i_75819)- 0] = 46;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA7: ;
				{
					if (!(((NU8)(buf[(i_75819)- 0])) >= ((NU8)(97)) && ((NU8)(buf[(i_75819)- 0])) <= ((NU8)(122)) || ((NU8)(buf[(i_75819)- 0])) >= ((NU8)(65)) && ((NU8)(buf[(i_75819)- 0])) <= ((NU8)(90)) || ((NU8)(buf[(i_75819)- 0])) == ((NU8)(46)))) goto LA10;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA10: ;
				LA5: ;
				res_75840 += 1;
			} LA4: ;
		}
	}
	{
		if (!!(hasdot)) goto LA14;
		buf[(n)- 0] = 46;
		buf[((NI64)(n + 1))- 0] = 48;
		buf[((NI64)(n + 2))- 0] = 0;
	}
	LA14: ;
	result = cstrToNimstr(((NCSTRING) (buf)));
	return result;
}

N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_79604, TNimType* mt) {
	void* src;
	src = src_79604;
	genericAssign(dest, ((void*) ((&src))), mt);
}

N_NIMCALL(NimStringDesc*, reprEnum)(NI e_80907, TNimType* typ) {
	NimStringDesc* result;
	NI e;
	NimStringDesc* LOC25;
	NimStringDesc* LOC26;
	result = 0;
	{
		if (!((*typ).size == 1)) goto LA3;
		e = ((NI) ((NI)(e_80907 & 255)));
	}
	goto LA1;
	LA3: ;
	{
		if (!((*typ).size == 2)) goto LA6;
		e = ((NI) ((NI)(e_80907 & 65535)));
	}
	goto LA1;
	LA6: ;
	{
		e = e_80907;
	}
	LA1: ;
	{
		if (!!((((*typ).flags &(1<<((((NU8) 2))&7)))!=0))) goto LA11;
		{
			if (!((NU64)(e) < (NU64)((*(*typ).node).len))) goto LA15;
			result = cstrToNimstr((*(*(*typ).node).sons[(e)- 0]).name);
			goto BeforeRet;
		}
		LA15: ;
	}
	goto LA9;
	LA11: ;
	{
		TNimNode* n;
		TNimNode** s;
		n = (*typ).node;
		s = (*n).sons;
		{
			NI i_80949;
			NI HEX3Atmp_80951;
			NI res_80954;
			i_80949 = 0;
			HEX3Atmp_80951 = 0;
			HEX3Atmp_80951 = (NI64)((*n).len - 1);
			res_80954 = 0;
			{
				while (1) {
					if (!(res_80954 <= HEX3Atmp_80951)) goto LA20;
					i_80949 = res_80954;
					{
						if (!((*s[(i_80949)- 0]).offset == e)) goto LA23;
						result = cstrToNimstr((*s[(i_80949)- 0]).name);
						goto BeforeRet;
					}
					LA23: ;
					res_80954 += 1;
				} LA20: ;
			}
		}
	}
	LA9: ;
	LOC25 = 0;
	LOC26 = 0;
	LOC26 = nimIntToStr(e);
	LOC25 = rawNewString(LOC26->Sup.len + 16);
appendString(LOC25, LOC26);
appendString(LOC25, ((NimStringDesc*) &TMP1241));
	result = LOC25;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_612248)(TY226936* x_612254) {
	void* result;
	result = 0;
	result = ((void*) (x_612254));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_612232)(TY226936* x_612238, TY226936* y_612243) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_612248(x_612238);
		LOC4 = 0;
		LOC4 = seqtoptr_612248(y_612243);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_612248(x_612238);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_612248(y_612243);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_612238->Sup.len == y_612243->Sup.len)) goto LA15;
		{
			NI i_612337;
			NI HEX3Atmp_612339;
			NI res_612342;
			i_612337 = 0;
			HEX3Atmp_612339 = 0;
			HEX3Atmp_612339 = (NI64)(x_612238->Sup.len - 1);
			res_612342 = 0;
			{
				while (1) {
					if (!(res_612342 <= HEX3Atmp_612339)) goto LA19;
					i_612337 = res_612342;
					{
						if (!!((x_612238->data[i_612337] == y_612243->data[i_612337]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_612342 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_612216)(TY226936** x_612224, NI32 y_612228) {
	{
		NIM_BOOL LOC3;
		TY612372 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_612232((*x_612224), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_612224)), (TY226936*) newSeq((&NTI226936), 1));
		LOC6[0] = y_612228;
		(*x_612224)->data[0] = LOC6[0];
	}
	goto LA1;
	LA4: ;
	{
		(*x_612224) = (TY226936*) incrSeq(&((*x_612224))->Sup, sizeof(NI32));
		(*x_612224)->data[(*x_612224)->Sup.len-1] = y_612228;
	}
	LA1: ;
}

N_NIMCALL(NI, cmp_4517)(NimStringDesc* x, NimStringDesc* y) {
	NI result;
	int LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = strcmp(x->data, y->data);
	result = ((NI) (LOC1));
	return result;
}

N_NIMCALL(NI, hashString)(NimStringDesc* s) {
	NI result;
	NI h;
	result = 0;
	h = 0;
	{
		NI i_75023;
		NI HEX3Atmp_75070;
		NI res_75073;
		i_75023 = 0;
		HEX3Atmp_75070 = 0;
		HEX3Atmp_75070 = (NI64)(s->Sup.len - 1);
		res_75073 = 0;
		{
			while (1) {
				if (!(res_75073 <= HEX3Atmp_75070)) goto LA3;
				i_75023 = res_75073;
				h = (NI)((NU64)(h) + (NU64)(((NI) (((NU8)(s->data[i_75023]))))));
				h = (NI)((NU64)(h) + (NU64)((NI)((NU64)(h) << (NU64)(10))));
				h = (NI)(h ^ (NI)((NU64)(h) >> (NU64)(6)));
				res_75073 += 1;
			} LA3: ;
		}
	}
	h = (NI)((NU64)(h) + (NU64)((NI)((NU64)(h) << (NU64)(3))));
	h = (NI)(h ^ (NI)((NU64)(h) >> (NU64)(11)));
	h = (NI)((NU64)(h) + (NU64)((NI)((NU64)(h) << (NU64)(15))));
	result = h;
	return result;
}

N_NIMCALL(void, write_12881)(FILE* f, NimStringDesc** a, NI aLen0) {
	{
		NimStringDesc* x_77483;
		NI i_77489;
		x_77483 = 0;
		i_77489 = 0;
		{
			while (1) {
				if (!(i_77489 < aLen0)) goto LA3;
				x_77483 = a[i_77489];
				write_12865(f, x_77483);
				i_77489 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, gcdisablemarkandsweep_8019)(void) {
	gch_47044.Cyclethreshold = IL64(9223372036854775806);
}

N_NIMCALL(void, insert_85801)(NimStringDesc** x, NimStringDesc* item, NI i) {
	NI xl;
	NI j;
	xl = (*x)->Sup.len;
	(*x) = setLengthStr((*x), (NI64)(xl + item->Sup.len));
	j = (NI64)(xl - 1);
	{
		while (1) {
			if (!(i <= j)) goto LA2;
			(*x)->data[(NI64)(j + item->Sup.len)] = (*x)->data[j];
			j -= 1;
		} LA2: ;
	}
	j = 0;
	{
		while (1) {
			if (!(j < item->Sup.len)) goto LA4;
			(*x)->data[(NI64)(j + i)] = item->data[j];
			j += 1;
		} LA4: ;
	}
}
N_NIMCALL(void, TMP2177)(void* p, NI op) {
	assertionerror3247* a;
	a = (assertionerror3247*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

N_NOINLINE(void, raiseassert_84757)(NimStringDesc* msg) {
	assertionerror3247* e_84762;
	NimStringDesc* LOC1;
	e_84762 = 0;
	e_84762 = (assertionerror3247*) newObj((&NTI84801), sizeof(assertionerror3247));
	(*e_84762).Sup.Sup.m_type = (&NTI3247);
	LOC1 = 0;
	LOC1 = (*e_84762).Sup.message; (*e_84762).Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_84762, "AssertionError");
}

static N_INLINE(void, pushSafePoint)(TSafePoint* s) {
	(*s).hasRaiseAction = NIM_FALSE;
	(*s).prev = exchandler_16243;
	exchandler_16243 = s;
}

N_NIMCALL(NI, rawfilesize_77519)(FILE* file) {
	NI result;
	NI oldpos;
	NI LOC1;
	NI LOC2;
	result = 0;
	oldpos = ftell(file);
	LOC1 = 0;
	LOC1 = fseek(file, 0, 2);
	result = ftell(file);
	LOC2 = 0;
	LOC2 = fseek(file, oldpos, 0);
	return result;
}

N_NIMCALL(NimStringDesc*, readallfile_77528)(FILE* file, NI len) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(len);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = readbuffer_13027(file, ((void*) ((&result->data[0]))), len);
		if (!!((LOC3 == len))) goto LA4;
		raiseeio_76805(((NimStringDesc*) &TMP2621));
	}
	LA4: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readallfile_77539)(FILE* file) {
	NimStringDesc* result;
	NI len;
	result = 0;
	len = rawfilesize_77519(file);
	result = readallfile_77528(file, len);
	return result;
}

static N_INLINE(void, popSafePoint)(void) {
	exchandler_16243 = (*exchandler_16243).prev;
}

N_NIMCALL(NimStringDesc*, readfile_12842)(NimStringDesc* filename) {
	NimStringDesc* volatile result;
	FILE* f;
	TSafePoint TMP2620;
	result = 0;
	f = open_12617(filename, ((NU8) 0), -1);
	pushSafePoint(&TMP2620);
	TMP2620.status = setjmp(TMP2620.context);
	if (TMP2620.status == 0) {
		result = readallfile_77539(f);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2620.status != 0) reraiseException();
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_152641)(TY269081 x_152645, TY269081 y_152647) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_152645.Field0 == y_152647.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_152645.Field1 == y_152647.Field1))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_274513)(ttypeseq226848* x_274519) {
	void* result;
	result = 0;
	result = ((void*) (x_274519));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_274497)(ttypeseq226848* x_274503, ttypeseq226848* y_274508) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_274513(x_274503);
		LOC4 = 0;
		LOC4 = seqtoptr_274513(y_274508);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_274513(x_274503);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_274513(y_274508);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_274503->Sup.len == y_274508->Sup.len)) goto LA15;
		{
			NI i_274602;
			NI HEX3Atmp_274620;
			NI res_274623;
			i_274602 = 0;
			HEX3Atmp_274620 = 0;
			HEX3Atmp_274620 = (NI64)(x_274503->Sup.len - 1);
			res_274623 = 0;
			{
				while (1) {
					if (!(res_274623 <= HEX3Atmp_274620)) goto LA19;
					i_274602 = res_274623;
					{
						if (!!((x_274503->data[i_274602] == y_274508->data[i_274602]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_274623 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_318709)(ttypeseq226848** x_318717, ttype226852* y_318721) {
	{
		NIM_BOOL LOC3;
		TY412748 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_274497((*x_318717), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_318717)), (ttypeseq226848*) newSeq((&NTI226848), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_318721;
		asgnRefNoCycle((void**) (&(*x_318717)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_318717) = (ttypeseq226848*) incrSeq(&((*x_318717))->Sup, sizeof(ttype226852*));
		asgnRefNoCycle((void**) (&(*x_318717)->data[(*x_318717)->Sup.len-1]), y_318721);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_419648)(TY419481* x_419654) {
	void* result;
	result = 0;
	result = ((void*) (x_419654));
	return result;
}

static N_INLINE(void*, seqtoptr_419774)(TY419485* x_419780) {
	void* result;
	result = 0;
	result = ((void*) (x_419780));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419865)(tentry419478 x_419869, tentry419478 y_419871) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_419869.Pos == y_419871.Pos))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_419869.Sym == y_419871.Sym))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419758)(TY419485* x_419764, TY419485* y_419769) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_419774(x_419764);
		LOC4 = 0;
		LOC4 = seqtoptr_419774(y_419769);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_419774(x_419764);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_419774(y_419769);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_419764->Sup.len == y_419769->Sup.len)) goto LA15;
		{
			NI i_419863;
			NI HEX3Atmp_419902;
			NI res_419905;
			i_419863 = 0;
			HEX3Atmp_419902 = 0;
			HEX3Atmp_419902 = (NI64)(x_419764->Sup.len - 1);
			res_419905 = 0;
			{
				while (1) {
					if (!(res_419905 <= HEX3Atmp_419902)) goto LA19;
					i_419863 = res_419905;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_419865(x_419764->data[i_419863], y_419769->data[i_419863]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_419905 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419739)(tlinemap419480 x_419743, tlinemap419480 y_419745) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_419758(x_419743.Entries, y_419745.Entries);
		if (!!(LOC3)) goto LA4;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA4: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_419632)(TY419481* x_419638, TY419481* y_419643) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_419648(x_419638);
		LOC4 = 0;
		LOC4 = seqtoptr_419648(y_419643);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_419648(x_419638);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_419648(y_419643);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_419638->Sup.len == y_419643->Sup.len)) goto LA15;
		{
			NI i_419737;
			NI HEX3Atmp_419923;
			NI res_419926;
			i_419737 = 0;
			HEX3Atmp_419923 = 0;
			HEX3Atmp_419923 = (NI64)(x_419638->Sup.len - 1);
			res_419926 = 0;
			{
				while (1) {
					if (!(res_419926 <= HEX3Atmp_419923)) goto LA19;
					i_419737 = res_419926;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_419739(x_419638->data[i_419737], y_419643->data[i_419737]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_419926 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, endoffile_12830)(FILE* f) {
	NIM_BOOL result;
	int c;
	result = 0;
	c = fgetc(f);
	ungetc(c, f);
	result = (c < ((NI32) 0));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, setfilepos_13051)(FILE* f, NI64 pos) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = fseek(f, ((long) (pos)), 0);
		if (!!((LOC3 == 0))) goto LA4;
		raiseeio_76805(((NimStringDesc*) &TMP2715));
	}
	LA4: ;
}

N_NIMCALL(NI64, getfilepos_13055)(FILE* f) {
	NI64 result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = ftell(f);
	result = ((NI64) (LOC1));
	{
		if (!(result < IL64(0))) goto LA4;
		raiseeio_76805(((NimStringDesc*) &TMP2716));
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, writefile_12845)(NimStringDesc* filename, NimStringDesc* content) {
	FILE* f;
	TSafePoint TMP2786;
	f = open_12617(filename, ((NU8) 1), -1);
	pushSafePoint(&TMP2786);
	TMP2786.status = setjmp(TMP2786.context);
	if (TMP2786.status == 0) {
		write_12865(f, content);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2786.status != 0) reraiseException();
}

N_NIMCALL(void, genericShallowAssign)(void* dest, void* src, TNimType* mt) {
	genericassignaux_78606(dest, src, mt, NIM_TRUE);
}

N_NIMCALL(NCSTRING*, alloccstringarray_13401)(NimStringDesc** a, NI aLen0) {
	NCSTRING* result;
	void* LOC1;
	NimStringDesc** x;
	result = 0;
	LOC1 = 0;
	LOC1 = alloc0_5817((NI64)((NI64)(aLen0 + 1) * 8));
	result = ((NCSTRING*) (LOC1));
	x = ((NimStringDesc**) (a));
	{
		NI i_13430;
		NI HEX3Atmp_13437;
		NI res_13440;
		i_13430 = 0;
		HEX3Atmp_13437 = 0;
		HEX3Atmp_13437 = (aLen0-1);
		res_13440 = 0;
		{
			while (1) {
				void* LOC5;
				if (!(res_13440 <= HEX3Atmp_13437)) goto LA4;
				i_13430 = res_13440;
				LOC5 = 0;
				LOC5 = alloc0_5817((NI64)(x[(i_13430)- 0]->Sup.len + 1));
				result[(i_13430)- 0] = ((NCSTRING) (LOC5));
				memcpy(((void*) (result[(i_13430)- 0])), ((void*) ((&x[(i_13430)- 0]->data[0]))), x[(i_13430)- 0]->Sup.len);
				res_13440 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(void, dealloccstringarray_13454)(NCSTRING* a) {
	NI i;
	i = 0;
	{
		while (1) {
			if (!!((a[(i)- 0] == NIM_NIL))) goto LA2;
			dealloc_5848(((void*) (a[(i)- 0])));
			i += 1;
		} LA2: ;
	}
	dealloc_5848(((void*) (a)));
}

N_NIMCALL(NIM_BOOL, open_12611)(FILE** f, int filehandle, NU8 mode) {
	NIM_BOOL result;
	result = 0;
	(*f) = fdopen(filehandle, formatopen_78010[(mode)- 0]->data);
	result = !(((*f) == NIM_NIL));
	return result;
}

N_NIMCALL(NimStringDesc*, HEX24_6201)(NU64 x) {
	NimStringDesc* result;
	TY80835 buf;
	int LOC1;
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	LOC1 = 0;
	LOC1 = sprintf(((NCSTRING) (buf)), "%llu", x);
	result = cstrToNimstr(((NCSTRING) (buf)));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(tinstantiation226836*, new_491941)(void) {
	tinstantiation226836* result;
	result = 0;
	result = (tinstantiation226836*) newObj((&NTI226838), sizeof(tinstantiation226836));
	return result;
}

static N_INLINE(void*, seqtoptr_230354)(TY226947* x_230360) {
	void* result;
	result = 0;
	result = ((void*) (x_230360));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_230338)(TY226947* x_230344, TY226947* y_230349) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_230354(x_230344);
		LOC4 = 0;
		LOC4 = seqtoptr_230354(y_230349);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_230354(x_230344);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_230354(y_230349);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_230344->Sup.len == y_230349->Sup.len)) goto LA15;
		{
			NI i_230443;
			NI HEX3Atmp_230461;
			NI res_230464;
			i_230443 = 0;
			HEX3Atmp_230461 = 0;
			HEX3Atmp_230461 = (NI64)(x_230344->Sup.len - 1);
			res_230464 = 0;
			{
				while (1) {
					if (!(res_230464 <= HEX3Atmp_230461)) goto LA19;
					i_230443 = res_230464;
					{
						if (!!((x_230344->data[i_230443] == y_230349->data[i_230443]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_230464 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_492032)(TY226947** x_492040, tinstantiation226836* y_492044) {
	{
		NIM_BOOL LOC3;
		TY492078 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_230338((*x_492040), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_492040)), (TY226947*) newSeq((&NTI226947), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_492044;
		asgnRefNoCycle((void**) (&(*x_492040)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_492040) = (TY226947*) incrSeq(&((*x_492040))->Sup, sizeof(tinstantiation226836*));
		asgnRefNoCycle((void**) (&(*x_492040)->data[(*x_492040)->Sup.len-1]), y_492044);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_316683)(tnodeseq226810* x_316689) {
	void* result;
	result = 0;
	result = ((void*) (x_316689));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_316667)(tnodeseq226810* x_316673, tnodeseq226810* y_316678) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_316683(x_316673);
		LOC4 = 0;
		LOC4 = seqtoptr_316683(y_316678);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_316683(x_316673);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_316683(y_316678);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_316673->Sup.len == y_316678->Sup.len)) goto LA15;
		{
			NI i_316772;
			NI HEX3Atmp_316790;
			NI res_316793;
			i_316772 = 0;
			HEX3Atmp_316790 = 0;
			HEX3Atmp_316790 = (NI64)(x_316673->Sup.len - 1);
			res_316793 = 0;
			{
				while (1) {
					if (!(res_316793 <= HEX3Atmp_316790)) goto LA19;
					i_316772 = res_316793;
					{
						if (!!((x_316673->data[i_316772] == y_316678->data[i_316772]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_316793 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_492915)(tnodeseq226810** x_492923, tnode226816* y_492927) {
	{
		NIM_BOOL LOC3;
		TY247892 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_316667((*x_492923), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_492923)), (tnodeseq226810*) newSeq((&NTI226810), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_492927;
		asgnRefNoCycle((void**) (&(*x_492923)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_492923) = (tnodeseq226810*) incrSeq(&((*x_492923))->Sup, sizeof(tnode226816*));
		asgnRefNoCycle((void**) (&(*x_492923)->data[(*x_492923)->Sup.len-1]), y_492927);
	}
	LA1: ;
}

N_NIMCALL(void, insert_493119)(tnodeseq226810** x_493127, tnode226816* item_493131, NI i_493133) {
	NI xl;
	NI j;
	xl = (*x_493127)->Sup.len;
	(*x_493127) = (tnodeseq226810*) setLengthSeq(&((*x_493127))->Sup, sizeof(tnode226816*), (NI64)(xl + 1));
	j = (NI64)(xl - 1);
	{
		while (1) {
			if (!(i_493133 <= j)) goto LA2;
			asgnRefNoCycle((void**) (&(*x_493127)->data[(NI64)(j + 1)]), (*x_493127)->data[j]);
			j -= 1;
		} LA2: ;
	}
	asgnRefNoCycle((void**) (&(*x_493127)->data[i_493133]), item_493131);
}

N_NIMCALL(tnodeseq226810*, HEX5BHEX5D_517155)(tnodeseq226810* s_517161, slice84178 x_517166) {
	tnodeseq226810* result;
	NI a;
	NI l;
	NI LOC6;
	result = 0;
	{
		if (!(0 <= x_517166.A)) goto LA3;
		a = x_517166.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI64)(s_517161->Sup.len + x_517166.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_517166.B)) goto LA9;
		LOC6 = x_517166.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI64)(s_517161->Sup.len + x_517166.B);
	}
	LA7: ;
	l = (NI64)((NI64)(LOC6 - a) + 1);
	result = (tnodeseq226810*) newSeq((&NTI226810), l);
	{
		NI i_517231;
		NI HEX3Atmp_517233;
		NI res_517236;
		i_517231 = 0;
		HEX3Atmp_517233 = 0;
		HEX3Atmp_517233 = (l - 1);
		res_517236 = 0;
		{
			while (1) {
				if (!(res_517236 <= HEX3Atmp_517233)) goto LA14;
				i_517231 = res_517236;
				asgnRefNoCycle((void**) (&result->data[i_517231]), s_517161->data[(NI64)(i_517231 + a)]);
				res_517236 += 1;
			} LA14: ;
		}
	}
	return result;
}

static N_INLINE(void*, seqtoptr_492417)(tsymseq226818* x_492423) {
	void* result;
	result = 0;
	result = ((void*) (x_492423));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_492401)(tsymseq226818* x_492407, tsymseq226818* y_492412) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_492417(x_492407);
		LOC4 = 0;
		LOC4 = seqtoptr_492417(y_492412);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_492417(x_492407);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_492417(y_492412);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_492407->Sup.len == y_492412->Sup.len)) goto LA15;
		{
			NI i_492506;
			NI HEX3Atmp_492524;
			NI res_492527;
			i_492506 = 0;
			HEX3Atmp_492524 = 0;
			HEX3Atmp_492524 = (NI64)(x_492407->Sup.len - 1);
			res_492527 = 0;
			{
				while (1) {
					if (!(res_492527 <= HEX3Atmp_492524)) goto LA19;
					i_492506 = res_492527;
					{
						if (!!((x_492407->data[i_492506] == y_492412->data[i_492506]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_492527 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_492544)(tsymseq226818** x_492552, tsym226846* y_492556) {
	{
		NIM_BOOL LOC3;
		TY291498 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_492401((*x_492552), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_492552)), (tsymseq226818*) newSeq((&NTI226818), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_492556;
		asgnRefNoCycle((void**) (&(*x_492552)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_492552) = (tsymseq226818*) incrSeq(&((*x_492552))->Sup, sizeof(tsym226846*));
		asgnRefNoCycle((void**) (&(*x_492552)->data[(*x_492552)->Sup.len-1]), y_492556);
	}
	LA1: ;
}

N_NIMCALL(void, delete_493248)(tnodeseq226810** x_493256, NI i_493260) {
	NI xl;
	xl = (*x_493256)->Sup.len;
	{
		NI j_493283;
		NI HEX3Atmp_493301;
		NI res_493304;
		j_493283 = 0;
		HEX3Atmp_493301 = 0;
		HEX3Atmp_493301 = (NI64)(xl - 2);
		res_493304 = i_493260;
		{
			while (1) {
				if (!(res_493304 <= HEX3Atmp_493301)) goto LA3;
				j_493283 = res_493304;
				asgnRefNoCycle((void**) (&(*x_493256)->data[j_493283]), (*x_493256)->data[(NI64)(j_493283 + 1)]);
				res_493304 += 1;
			} LA3: ;
		}
	}
	(*x_493256) = (tnodeseq226810*) setLengthSeq(&((*x_493256))->Sup, sizeof(tnode226816*), (NI64)(xl - 1));
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_493447)(tnodeseq226810** s_493455, slice84178 x_493461, tnode226816** b_493466, NI b_493466Len0) {
	NI a;
	NI l;
	NI LOC6;
	{
		if (!(0 <= x_493461.A)) goto LA3;
		a = x_493461.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI64)((*s_493455)->Sup.len + x_493461.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_493461.B)) goto LA9;
		LOC6 = x_493461.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI64)((*s_493455)->Sup.len + x_493461.B);
	}
	LA7: ;
	l = (NI64)((NI64)(LOC6 - a) + 1);
	{
		if (!(l == b_493466Len0)) goto LA14;
		{
			NI i_493532;
			NI HEX3Atmp_493654;
			NI res_493657;
			i_493532 = 0;
			HEX3Atmp_493654 = 0;
			HEX3Atmp_493654 = (l - 1);
			res_493657 = 0;
			{
				while (1) {
					if (!(res_493657 <= HEX3Atmp_493654)) goto LA18;
					i_493532 = res_493657;
					asgnRefNoCycle((void**) (&(*s_493455)->data[(NI64)(i_493532 + a)]), b_493466[i_493532]);
					res_493657 += 1;
				} LA18: ;
			}
		}
	}
	goto LA12;
	LA14: ;
	{
		NI slen_493469;
		NI shift_493471;
		NI newlen_493473;
		slen_493469 = (*s_493455)->Sup.len;
		shift_493471 = (NI64)(b_493466Len0 - l);
		newlen_493473 = (NI64)(slen_493469 + shift_493471);
		{
			if (!(0 < shift_493471)) goto LA22;
			(*s_493455) = (tnodeseq226810*) setLengthSeq(&((*s_493455))->Sup, sizeof(tnode226816*), newlen_493473);
			{
				NI i_493475;
				NI HEX3Atmp_493660;
				NI HEX3Atmp_493661;
				NI res_493664;
				i_493475 = 0;
				HEX3Atmp_493660 = 0;
				HEX3Atmp_493661 = 0;
				HEX3Atmp_493660 = (NI64)(newlen_493473 - 1);
				HEX3Atmp_493661 = (NI64)((NI64)(a + shift_493471) + 1);
				res_493664 = HEX3Atmp_493660;
				{
					while (1) {
						if (!(HEX3Atmp_493661 <= res_493664)) goto LA26;
						i_493475 = res_493664;
						asgnRefNoCycle((void**) (&(*s_493455)->data[i_493475]), (*s_493455)->data[(NI64)(i_493475 - shift_493471)]);
						res_493664 -= 1;
					} LA26: ;
				}
			}
		}
		goto LA20;
		LA22: ;
		{
			{
				NI i_493477;
				NI HEX3Atmp_493666;
				NI HEX3Atmp_493667;
				NI res_493670;
				i_493477 = 0;
				HEX3Atmp_493666 = 0;
				HEX3Atmp_493667 = 0;
				HEX3Atmp_493666 = (NI64)(a + b_493466Len0);
				HEX3Atmp_493667 = (NI64)((NI64)((*s_493455)->Sup.len - 1) + shift_493471);
				res_493670 = HEX3Atmp_493666;
				{
					while (1) {
						if (!(res_493670 <= HEX3Atmp_493667)) goto LA30;
						i_493477 = res_493670;
						asgnRefNoCycle((void**) (&(*s_493455)->data[i_493477]), (*s_493455)->data[(NI64)(i_493477 - shift_493471)]);
						res_493670 += 1;
					} LA30: ;
				}
			}
			(*s_493455) = (tnodeseq226810*) setLengthSeq(&((*s_493455))->Sup, sizeof(tnode226816*), newlen_493473);
		}
		LA20: ;
		{
			NI i_493479;
			NI HEX3Atmp_493673;
			NI res_493676;
			i_493479 = 0;
			HEX3Atmp_493673 = 0;
			HEX3Atmp_493673 = (b_493466Len0 - 1);
			res_493676 = 0;
			{
				while (1) {
					if (!(res_493676 <= HEX3Atmp_493673)) goto LA33;
					i_493479 = res_493676;
					asgnRefNoCycle((void**) (&(*s_493455)->data[(NI64)(i_493479 + a)]), b_493466[i_493479]);
					res_493676 += 1;
				} LA33: ;
			}
		}
	}
	LA12: ;
}

N_NIMCALL(tnodeseq226810*, newseq_540811)(NI len_540815) {
	tnodeseq226810* result;
	result = 0;
	result = (tnodeseq226810*) newSeq((&NTI226810), len_540815);
	return result;
}

N_NIMCALL(void, gcfullcollect_8005)(void) {
	NI oldthreshold;
	oldthreshold = gch_47044.Cyclethreshold;
	gch_47044.Cyclethreshold = 0;
	collectct_49010((&gch_47044));
	gch_47044.Cyclethreshold = oldthreshold;
}

static N_INLINE(void*, seqtoptr_338098)(TY337062* x_338104) {
	void* result;
	result = 0;
	result = ((void*) (x_338104));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_338082)(TY337062* x_338088, TY337062* y_338093) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_338098(x_338088);
		LOC4 = 0;
		LOC4 = seqtoptr_338098(y_338093);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_338098(x_338088);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_338098(y_338093);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_338088->Sup.len == y_338093->Sup.len)) goto LA15;
		{
			NI i_338187;
			NI HEX3Atmp_338190;
			NI res_338193;
			i_338187 = 0;
			HEX3Atmp_338190 = 0;
			HEX3Atmp_338190 = (NI64)(x_338088->Sup.len - 1);
			res_338193 = 0;
			{
				while (1) {
					if (!(res_338193 <= HEX3Atmp_338190)) goto LA19;
					i_338187 = res_338193;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_337893(x_338088->data[i_338187], y_338093->data[i_338187]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_338193 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_338253)(TY337057* x_338259) {
	void* result;
	result = 0;
	result = ((void*) (x_338259));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_338344)(TY337611 x_338348, TY337611 y_338350) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!(eqStrings(x_338348.Field0, y_338350.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = HEX3DHEX3D_337893(x_338348.Field1, y_338350.Field1);
		if (!!(LOC7)) goto LA8;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA8: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_338237)(TY337057* x_338243, TY337057* y_338248) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_338253(x_338243);
		LOC4 = 0;
		LOC4 = seqtoptr_338253(y_338248);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_338253(x_338243);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_338253(y_338248);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_338243->Sup.len == y_338248->Sup.len)) goto LA15;
		{
			NI i_338342;
			NI HEX3Atmp_338366;
			NI res_338369;
			i_338342 = 0;
			HEX3Atmp_338366 = 0;
			HEX3Atmp_338366 = (NI64)(x_338243->Sup.len - 1);
			res_338369 = 0;
			{
				while (1) {
					if (!(res_338369 <= HEX3Atmp_338366)) goto LA19;
					i_338342 = res_338369;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_338344(x_338243->data[i_338342], y_338248->data[i_338342]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_338369 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, nimBoolToStr)(NIM_BOOL x) {
	NimStringDesc* result;
	result = 0;
	{
		if (!x) goto LA3;
		result = copyString(((NimStringDesc*) &TMP4779));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP4780));
	}
	LA1: ;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_362335)(tindexentry360264* x_362339, tindexentry360264* y_362341) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!(eqStrings((*x_362339).Keyword, (*y_362341).Keyword))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(eqStrings((*x_362339).Link, (*y_362341).Link))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!!(eqStrings((*x_362339).Linktitle, (*y_362341).Linktitle))) goto LA11;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA11: ;
	{
		if (!!(eqStrings((*x_362339).Linkdesc, (*y_362341).Linkdesc))) goto LA15;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA15: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, cmp_420107)(NI x_420111, NI y_420113) {
	NI result;
	result = 0;
	{
		if (!(x_420111 == y_420113)) goto LA3;
		result = 0;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(x_420111 < y_420113)) goto LA7;
		result = -1;
		goto BeforeRet;
	}
	LA7: ;
	result = 1;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readline_12886)(FILE* f) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(80);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = readline_12889(f, (&result));
		if (!!(LOC3)) goto LA4;
		raiseeio_76805(((NimStringDesc*) &TMP4861));
	}
	LA4: ;
	return result;
}
N_NIMCALL(void, TMP4872)(void* p, NI op) {
	TY192015* a;
	NI LOC1;
	a = (TY192015*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1], op);
	}
}

static N_INLINE(void, gcdisable_8001)(void) {
	gch_47044.Recgclock += 1;
}

static N_INLINE(void, gcenable_8003)(void) {
	{
		if (!(0 < gch_47044.Recgclock)) goto LA3;
		gch_47044.Recgclock -= 1;
	}
	LA3: ;
}

N_NIMCALL(NimStringDesc*, gcgetstatistics_8021)(void) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NI LOC2;
	NimStringDesc* LOC3;
	NI LOC4;
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* LOC11;
	NimStringDesc* LOC12;
	NimStringDesc* LOC13;
	result = 0;
	gcdisable_8001();
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = gettotalmem_6499();
	LOC3 = 0;
	LOC3 = nimIntToStr(LOC2);
	LOC4 = 0;
	LOC4 = getoccupiedmem_6495();
	LOC5 = 0;
	LOC5 = nimIntToStr(LOC4);
	LOC6 = 0;
	LOC6 = nimIntToStr(gch_47044.Stat.Stackscans);
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_47044.Stat.Maxstackcells);
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_47044.Stat.Cyclecollections);
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_47044.Stat.Maxthreshold);
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_47044.Zct.Cap);
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_47044.Stat.Cycletablesize);
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_47044.Stat.Maxstacksize);
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_47044.Stat.Maxpause / IL64(1000000)));
	LOC1 = rawNewString(LOC3->Sup.len + LOC5->Sup.len + LOC6->Sup.len + LOC7->Sup.len + LOC8->Sup.len + LOC9->Sup.len + LOC10->Sup.len + LOC11->Sup.len + LOC12->Sup.len + LOC13->Sup.len + 223);
appendString(LOC1, ((NimStringDesc*) &TMP4881));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP4882));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP4883));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP4884));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP4885));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP4886));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP4887));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP4888));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP4889));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP4890));
appendString(LOC1, LOC13);
	result = LOC1;
	gcenable_8003();
	return result;
}
NIM_EXTERNC N_NOINLINE(void, systemInit)(void) {
	strdesc_9804.size = 8;
	strdesc_9804.kind = ((NU8) 28);
	strdesc_9804.flags = 2;
	initallocator_9401();
	initStackBottom();
	initgc_9201();
	registersignalhandler_19808();
}

NIM_EXTERNC N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP49[4];
static TNimNode TMP0[19];
NTI3211.size = sizeof(TNimObject);
NTI3211.kind = 17;
NTI3211.base = 0;
NTI3211.flags = 1;
TMP0[0].len = 0; TMP0[0].kind = 2;
NTI3211.node = &TMP0[0];
NTI108.size = sizeof(NI);
NTI108.kind = 31;
NTI108.base = 0;
NTI108.flags = 3;
NTI149.size = sizeof(NimStringDesc*);
NTI149.kind = 28;
NTI149.base = 0;
NTI149.flags = 2;
NTI3227.size = sizeof(Exception);
NTI3227.kind = 17;
NTI3227.base = (&NTI3211);
TMP49[0] = &TMP0[2];
NTI8222.size = sizeof(Exception*);
NTI8222.kind = 22;
NTI8222.base = (&NTI3227);
NTI8222.marker = TMP50;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(Exception, parent);
TMP0[2].typ = (&NTI8222);
TMP0[2].name = "parent";
TMP49[1] = &TMP0[3];
NTI151.size = sizeof(NCSTRING);
NTI151.kind = 29;
NTI151.base = 0;
NTI151.flags = 3;
TMP0[3].kind = 1;
TMP0[3].offset = offsetof(Exception, name);
TMP0[3].typ = (&NTI151);
TMP0[3].name = "name";
TMP49[2] = &TMP0[4];
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(Exception, message);
TMP0[4].typ = (&NTI149);
TMP0[4].name = "msg";
TMP49[3] = &TMP0[5];
TMP0[5].kind = 1;
TMP0[5].offset = offsetof(Exception, trace);
TMP0[5].typ = (&NTI149);
TMP0[5].name = "trace";
TMP0[1].len = 4; TMP0[1].kind = 2; TMP0[1].sons = &TMP49[0];
NTI3227.node = &TMP0[1];
NTI3239.size = sizeof(arithmeticerror3239);
NTI3239.kind = 17;
NTI3239.base = (&NTI3227);
TMP0[6].len = 0; TMP0[6].kind = 2;
NTI3239.node = &TMP0[6];
NTI3243.size = sizeof(overflowerror3243);
NTI3243.kind = 17;
NTI3243.base = (&NTI3239);
TMP0[7].len = 0; TMP0[7].kind = 2;
NTI3243.node = &TMP0[7];
NTI22201.size = sizeof(overflowerror3243*);
NTI22201.kind = 22;
NTI22201.base = (&NTI3243);
NTI22201.marker = TMP51;
NTI3229.size = sizeof(systemerror3229);
NTI3229.kind = 17;
NTI3229.base = (&NTI3227);
TMP0[8].len = 0; TMP0[8].kind = 2;
NTI3229.node = &TMP0[8];
NTI3253.size = sizeof(outofmemerror3253);
NTI3253.kind = 17;
NTI3253.base = (&NTI3229);
TMP0[9].len = 0; TMP0[9].kind = 2;
NTI3253.node = &TMP0[9];
NTI114.size = sizeof(NI32);
NTI114.kind = 34;
NTI114.base = 0;
NTI114.flags = 3;
NTI3249.size = sizeof(valueerror3249);
NTI3249.kind = 17;
NTI3249.base = (&NTI3227);
TMP0[10].len = 0; TMP0[10].kind = 2;
NTI3249.node = &TMP0[10];
NTI21401.size = sizeof(valueerror3249*);
NTI21401.kind = 22;
NTI21401.base = (&NTI3249);
NTI21401.marker = TMP137;
NTI112.size = sizeof(NI16);
NTI112.kind = 33;
NTI112.base = 0;
NTI112.flags = 3;
NTI3231.size = sizeof(ioerror3231);
NTI3231.kind = 17;
NTI3231.base = (&NTI3229);
TMP0[11].len = 0; TMP0[11].kind = 2;
NTI3231.node = &TMP0[11];
NTI77001.size = sizeof(ioerror3231*);
NTI77001.kind = 22;
NTI77001.base = (&NTI3231);
NTI77001.marker = TMP150;
NTI138.size = sizeof(NIM_BOOL);
NTI138.kind = 1;
NTI138.base = 0;
NTI138.flags = 3;
NTI5510.size = sizeof(NI64);
NTI5510.kind = 35;
NTI5510.base = 0;
NTI5510.flags = 3;
NTI5512.size = sizeof(NF);
NTI5512.kind = 36;
NTI5512.base = 0;
NTI5512.flags = 3;
NTI3213.size = sizeof(TNimObject*);
NTI3213.kind = 22;
NTI3213.base = (&NTI3211);
NTI3213.marker = TMP829;
NTI153.size = sizeof(void*);
NTI153.kind = 26;
NTI153.base = 0;
NTI153.flags = 3;
NTI5611.size = sizeof(int);
NTI5611.kind = 34;
NTI5611.base = 0;
NTI5611.flags = 3;
NTI26420.size = sizeof(TY26420);
NTI26420.kind = 16;
NTI26420.base = (&NTI108);
NTI26420.flags = 3;
NTI3207.size = sizeof(NI);
NTI3207.kind = 20;
NTI3207.base = (&NTI108);
NTI3207.flags = 3;
NTI128.size = sizeof(NF);
NTI128.kind = 36;
NTI128.base = 0;
NTI128.flags = 3;
NTI12402.size = sizeof(void*);
NTI12402.kind = 18;
NTI12402.base = 0;
NTI12402.flags = 3;
TMP0[12].len = 0; TMP0[12].kind = 2;
NTI12402.node = &TMP0[12];
NTI12404.size = sizeof(FILE*);
NTI12404.kind = 21;
NTI12404.base = (&NTI12402);
NTI12404.flags = 3;
NTI110.size = sizeof(NI8);
NTI110.kind = 32;
NTI110.base = 0;
NTI110.flags = 3;
NTI3263.size = sizeof(reraiseerror3263);
NTI3263.kind = 17;
NTI3263.base = (&NTI3227);
TMP0[13].len = 0; TMP0[13].kind = 2;
NTI3263.node = &TMP0[13];
NTI18001.size = sizeof(reraiseerror3263*);
NTI18001.kind = 22;
NTI18001.base = (&NTI3263);
NTI18001.marker = TMP1042;
NTI3259.size = sizeof(rangeerror3259);
NTI3259.kind = 17;
NTI3259.base = (&NTI3227);
TMP0[14].len = 0; TMP0[14].kind = 2;
NTI3259.node = &TMP0[14];
NTI3233.size = sizeof(oserror3233);
NTI3233.kind = 17;
NTI3233.base = (&NTI3229);
TMP0[15].kind = 1;
TMP0[15].offset = offsetof(oserror3233, Errorcode);
TMP0[15].typ = (&NTI114);
TMP0[15].name = "errorCode";
NTI3233.node = &TMP0[15];
NTI114812.size = sizeof(oserror3233*);
NTI114812.kind = 22;
NTI114812.base = (&NTI3233);
NTI114812.marker = TMP1075;
NTI3255.size = sizeof(indexerror3255);
NTI3255.kind = 17;
NTI3255.base = (&NTI3227);
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI3255.node = &TMP0[16];
NTI123617.size = sizeof(indexerror3255*);
NTI123617.kind = 22;
NTI123617.base = (&NTI3255);
NTI123617.marker = TMP1078;
NTI124.size = sizeof(NU32);
NTI124.kind = 43;
NTI124.base = 0;
NTI124.flags = 3;
NTI3247.size = sizeof(assertionerror3247);
NTI3247.kind = 17;
NTI3247.base = (&NTI3227);
TMP0[17].len = 0; TMP0[17].kind = 2;
NTI3247.node = &TMP0[17];
NTI84801.size = sizeof(assertionerror3247*);
NTI84801.kind = 22;
NTI84801.base = (&NTI3247);
NTI84801.marker = TMP2177;
NTI12408.size = sizeof(int);
NTI12408.kind = 34;
NTI12408.base = 0;
NTI12408.flags = 3;
NTI3241.size = sizeof(divbyzeroerror3241);
NTI3241.kind = 17;
NTI3241.base = (&NTI3239);
TMP0[18].len = 0; TMP0[18].kind = 2;
NTI3241.node = &TMP0[18];
NTI147.size = sizeof(NIM_CHAR);
NTI147.kind = 2;
NTI147.base = 0;
NTI147.flags = 3;
NTI192015.size = sizeof(TY192015*);
NTI192015.kind = 24;
NTI192015.base = (&NTI183609);
NTI192015.flags = 2;
NTI192015.marker = TMP4872;
}

