/* Generated by Nim Compiler v0.10.2 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 32
#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 tavlnode27408 tavlnode27408;
typedef struct tgcheap47216 tgcheap47216;
typedef struct tcellseq45151 tcellseq45151;
typedef struct tcell45135 tcell45135;
typedef struct tcellset45147 tcellset45147;
typedef struct tpagedesc45143 tpagedesc45143;
typedef struct tmemregion27410 tmemregion27410;
typedef struct tsmallchunk26640 tsmallchunk26640;
typedef struct tllchunk27404 tllchunk27404;
typedef struct tbigchunk26642 tbigchunk26642;
typedef struct tintset26617 tintset26617;
typedef struct ttrunk26613 ttrunk26613;
typedef struct tgcstat47214 tgcstat47214;
typedef struct tbasechunk26638 tbasechunk26638;
typedef struct tfreecell26630 tfreecell26630;
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 TY120008 TY120008;
typedef struct reraiseerror3263 reraiseerror3263;
typedef struct TY84945 TY84945;
typedef struct rangeerror3259 rangeerror3259;
typedef struct oserror3233 oserror3233;
typedef struct TY225936 TY225936;
typedef struct indexerror3255 indexerror3255;
typedef struct assertionerror3247 assertionerror3247;
typedef struct TY268081 TY268081;
typedef struct ttypeseq225848 ttypeseq225848;
typedef struct ttype225852 ttype225852;
typedef struct TY418481 TY418481;
typedef struct tlinemap418480 tlinemap418480;
typedef struct TY418485 TY418485;
typedef struct tentry418478 tentry418478;
typedef struct tsym225846 tsym225846;
typedef struct tinstantiation225836 tinstantiation225836;
typedef struct TY225947 TY225947;
typedef struct tnodeseq225810 tnodeseq225810;
typedef struct tnode225816 tnode225816;
typedef struct slice84375 slice84375;
typedef struct divbyzeroerror3241 divbyzeroerror3241;
typedef struct tsymseq225818 tsymseq225818;
typedef struct TY336062 TY336062;
typedef struct jsonnodeobj336042 jsonnodeobj336042;
typedef struct TY336057 TY336057;
typedef struct TY336611 TY336611;
typedef struct tindexentry359264 tindexentry359264;
typedef struct TY191015 TY191015;
typedef struct tsocketimpl182607 tsocketimpl182607;
typedef struct tidobj200015 tidobj200015;
typedef struct tloc225830 tloc225830;
typedef struct trope177009 trope177009;
typedef struct tscope225840 tscope225840;
typedef struct tstrtable225820 tstrtable225820;
typedef struct tident200021 tident200021;
typedef struct tlineinfo195539 tlineinfo195539;
typedef struct tlib225834 tlib225834;
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 tavlnode27408* TY27414[2];
struct  tavlnode27408  {
TY27414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tcellseq45151  {
NI Len;
NI Cap;
tcell45135** D;
};
struct  tcellset45147  {
NI Counter;
NI Max;
tpagedesc45143* Head;
tpagedesc45143** Data;
};
typedef tsmallchunk26640* TY27422[512];
typedef ttrunk26613* ttrunkbuckets26615[256];
struct  tintset26617  {
ttrunkbuckets26615 Data;
};
struct  tmemregion27410  {
NI Minlargeobj;
NI Maxlargeobj;
TY27422 Freesmallchunks;
tllchunk27404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk26642* Freechunkslist;
tintset26617 Chunkstarts;
tavlnode27408* Root;
tavlnode27408* Deleted;
tavlnode27408* Last;
tavlnode27408* Freeavlnodes;
};
struct  tgcstat47214  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap47216  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq45151 Zct;
tcellseq45151 Decstack;
tcellset45147 Cycleroots;
tcellseq45151 Tempstack;
NI Recgclock;
tmemregion27410 Region;
tgcstat47214 Stat;
};
struct  tbasechunk26638  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk26640  {
  tbasechunk26638 Sup;
tsmallchunk26640* Next;
tsmallchunk26640* Prev;
tfreecell26630* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tbigchunk26642  {
  tbasechunk26638 Sup;
tbigchunk26642* Next;
tbigchunk26642* Prev;
NI Align;
NF Data;
};
typedef NI TY26620[16];
struct  ttrunk26613  {
ttrunk26613* Next;
NI Key;
TY26620 Bits;
};
struct  tllchunk27404  {
NI Size;
NI Acc;
tllchunk27404* Next;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tfreecell26630  {
tfreecell26630* Next;
NI Zerofield;
};
typedef N_NIMCALL_PTR(void, TY16201) (NimStringDesc* msg);
typedef TFrame* TY16801[128];
struct  tcell45135  {
NI Refcount;
TNimType* Typ;
};
struct  tpagedesc45143  {
tpagedesc45143* Next;
NI Key;
TY26620 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;
} TY15009;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY15009 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP51) (Exception* e);
struct  systemerror3229  {
  Exception Sup;
};
struct  outofmemerror3253  {
  systemerror3229 Sup;
};
typedef NIM_CHAR TY17816[2001];
struct  valueerror3249  {
  Exception Sup;
};
struct  ioerror3231  {
  systemerror3229 Sup;
};
typedef NimStringDesc* TY197301[1];
typedef NimStringDesc* TY78211[5];
struct  reraiseerror3263  {
  Exception Sup;
};
struct TY84945 {
NimStringDesc* Field0;
NI Field1;
};
typedef NIM_CHAR TY76080[500];
struct  rangeerror3259  {
  Exception Sup;
};
struct  oserror3233  {
  systemerror3229 Sup;
NI32 Errorcode;
};
typedef NIM_CHAR TY76004[65];
typedef NI32 TY611372[1];
struct  indexerror3255  {
  Exception Sup;
};
struct  assertionerror3247  {
  Exception Sup;
};
struct TY268081 {
NI Field0;
NI Field1;
};
typedef ttype225852* TY411748[1];
struct  tentry418478  {
NI Pos;
tsym225846* Sym;
};
struct  tlinemap418480  {
TY418485* Entries;
};
typedef NIM_CHAR TY81035[60];
struct  tinstantiation225836  {
tsym225846* Sym;
ttypeseq225848* Concretetypes;
TY225936* Usedby;
};
typedef tinstantiation225836* TY491078[1];
typedef tnode225816* TY246892[1];
struct  slice84375  {
NI A;
NI B;
};
struct  divbyzeroerror3241  {
  arithmeticerror3239 Sup;
};
typedef tsym225846* TY290499[1];
struct TY336611 {
NimStringDesc* Field0;
jsonnodeobj336042* Field1;
};
struct  tindexentry359264  {
NimStringDesc* Keyword;
NimStringDesc* Link;
NimStringDesc* Linktitle;
NimStringDesc* Linkdesc;
};
struct  tidobj200015  {
  TNimObject Sup;
NI Id;
};
struct  tloc225830  {
NU8 K;
NU8 S;
NU8 Flags;
ttype225852* T;
trope177009* R;
trope177009* Heaproot;
};
struct  ttype225852  {
  tidobj200015 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq225848* Sons;
tnode225816* N;
tsym225846* Owner;
tsym225846* Sym;
tsym225846* Destructor;
tsym225846* Deepcopy;
NI64 Size;
NI16 Align;
NI16 Locklevel;
tloc225830 Loc;
};
struct  tstrtable225820  {
NI Counter;
tsymseq225818* Data;
};
struct  tlineinfo195539  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tsym225846  {
  tidobj200015 Sup;
NU8 Kind;
union {
struct {ttypeseq225848* Typeinstcache;
tscope225840* Typscope;
} S1;
struct {TY225947* Procinstcache;
tscope225840* Scope;
} S2;
struct {TY225947* Usedgenerics;
tstrtable225820 Tab;
} S3;
struct {tsym225846* Guard;
} S4;
} kindU;
NU16 Magic;
ttype225852* Typ;
tident200021* Name;
tlineinfo195539 Info;
tsym225846* Owner;
NU32 Flags;
tnode225816* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc225830 Loc;
tlib225834* Annex;
tnode225816* Constraint;
};
struct  tnode225816  {
ttype225852* Typ;
tlineinfo195539 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym225846* Sym;
} S4;
struct {tident200021* Ident;
} S5;
struct {tnodeseq225810* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
struct  jsonnodeobj336042  {
NU8 Kind;
union {
struct {NimStringDesc* Str;
} S1;
struct {NI64 Num;
} S2;
struct {NF Fnum;
} S3;
struct {NIM_BOOL Bval;
} S4;
struct {TY336057* Fields;
} S6;
struct {TY336062* Elems;
} S7;
} kindU;
};
typedef NIM_CHAR TY182632[4001];
struct  tsocketimpl182607  {
int Fd;
NIM_BOOL Isbuffered;
union {
struct {TY182632 Buffer;
NI Currpos;
NI Buflen;
} S1;
} isbufferedU;
NIM_BOOL Nonblocking;
};
struct  trope177009  {
  TNimObject Sup;
trope177009* Left;
trope177009* Right;
NI Length;
NimStringDesc* Data;
};
struct  tscope225840  {
NI Depthlevel;
tstrtable225820 Symbols;
tnodeseq225810* Usingsyms;
tscope225840* Parent;
};
struct  tident200021  {
  tidobj200015 Sup;
NimStringDesc* S;
tident200021* Next;
NI H;
};
struct  tlistentry127022  {
  TNimObject Sup;
tlistentry127022* Prev;
tlistentry127022* Next;
};
struct  tlib225834  {
  tlistentry127022 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope177009* Name;
tnode225816* Path;
};
struct TY120008 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY225936 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct ttypeseq225848 {
  TGenericSeq Sup;
  ttype225852* data[SEQ_DECL_SIZE];
};
struct TY418485 {
  TGenericSeq Sup;
  tentry418478 data[SEQ_DECL_SIZE];
};
struct TY418481 {
  TGenericSeq Sup;
  tlinemap418480 data[SEQ_DECL_SIZE];
};
struct TY225947 {
  TGenericSeq Sup;
  tinstantiation225836* data[SEQ_DECL_SIZE];
};
struct tnodeseq225810 {
  TGenericSeq Sup;
  tnode225816* data[SEQ_DECL_SIZE];
};
struct tsymseq225818 {
  TGenericSeq Sup;
  tsym225846* data[SEQ_DECL_SIZE];
};
struct TY336062 {
  TGenericSeq Sup;
  jsonnodeobj336042* data[SEQ_DECL_SIZE];
};
struct TY336057 {
  TGenericSeq Sup;
  TY336611 data[SEQ_DECL_SIZE];
};
struct TY191015 {
  TGenericSeq Sup;
  tsocketimpl182607* 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_45249)(tcellseq45151* s, NI cap);
N_NOCONV(void*, alloc0_5817)(NI size);
N_NIMCALL(void*, alloc0_43819)(tmemregion27410* allocator, NI size);
N_NIMCALL(void*, alloc_43634)(tmemregion27410* allocator, NI size);
N_NIMCALL(void*, rawalloc_34546)(tmemregion27410* a, NI requestedsize);
static N_INLINE(NI, roundup_26670)(NI x, NI v);
N_NIMCALL(tsmallchunk26640*, getsmallchunk_34028)(tmemregion27410* a);
N_NIMCALL(tbigchunk26642*, getbigchunk_33220)(tmemregion27410* a, NI size);
static N_INLINE(void, listremove_31003)(tbigchunk26642** head_31009, tbigchunk26642* c_31012);
N_NIMCALL(void, splitchunk_33015)(tmemregion27410* a, tbigchunk26642* c, NI size);
static N_INLINE(void, updateprevsize_30091)(tmemregion27410* a, tbigchunk26642* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_30021)(tmemregion27410* a, void* p);
N_NIMCALL(NIM_BOOL, contains_28995)(tintset26617* s, NI key);
N_NIMCALL(ttrunk26613*, intsetget_28924)(tintset26617* t, NI key);
static N_INLINE(NI, pageindex_29338)(void* p);
N_NIMCALL(void, incl_29024)(tmemregion27410* a, tintset26617* s, NI key);
N_NIMCALL(ttrunk26613*, intsetput_28960)(tmemregion27410* a, tintset26617* t, NI key);
N_NIMCALL(void*, llalloc_27659)(tmemregion27410* a, NI size);
static N_INLINE(void*, osallocpages_26415)(NI size);
N_NOINLINE(void, raiseoutofmem_25859)(void);
static N_INLINE(void, inccurrmem_27605)(tmemregion27410* a, NI bytes);
static N_INLINE(NI, pageindex_29330)(tbasechunk26638* c);
static N_INLINE(void, listadd_32231)(tbigchunk26642** head_32237, tbigchunk26642* c_32240);
N_NIMCALL(tbigchunk26642*, requestoschunks_29356)(tmemregion27410* a, NI size);
static N_INLINE(void, listadd_35405)(tsmallchunk26640** head_35411, tsmallchunk26640* c_35414);
static N_INLINE(void, listremove_38203)(tsmallchunk26640** head_38209, tsmallchunk26640* c_38212);
N_NIMCALL(void, add_28624)(tmemregion27410* a, tavlnode27408** t, NI key, NI upperbound);
N_NIMCALL(tavlnode27408*, allocavlnode_27836)(tmemregion27410* a, NI key, NI upperbound);
N_NIMCALL(void, skew_28596)(tavlnode27408** t);
N_NIMCALL(void, split_28604)(tavlnode27408** t);
N_NIMCALL(void, init_45270)(tcellset45147* s);
N_NOCONV(void, signalHandler)(int sig);
N_NIMCALL(void, showerrormessage_16409)(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_55004)(TNimType* typ, NI size, tgcheap47216* gch);
N_NIMCALL(void, collectct_49210)(tgcheap47216* gch);
static N_INLINE(NI, getoccupiedmem_45070)(tmemregion27410* a);
N_NIMCALL(void, collectctbody_71819)(tgcheap47216* gch);
N_NOINLINE(NI, stacksize_69210)(void);
static N_INLINE(void, prepareforinteriorpointerchecking_42482)(tmemregion27410* a);
N_NIMCALL(NI, lowgauge_28418)(tavlnode27408* n);
N_NIMCALL(NI, highgauge_28449)(tavlnode27408* n);
N_CDECL(void, markstackandregisters_69440)(tgcheap47216* gch);
static N_INLINE(void, gcmark_67846)(tgcheap47216* gch, void* p);
static N_INLINE(tcell45135*, usrtocell_48846)(void* usr);
N_NIMCALL(void*, interiorallocatedptr_42489)(tmemregion27410* a, void* p);
static N_INLINE(tbasechunk26638*, pageaddr_29346)(void* p);
static N_INLINE(NIM_BOOL, chunkunused_29210)(tbasechunk26638* c);
static N_INLINE(NIM_BOOL, issmallchunk_29199)(tbasechunk26638* c);
N_NIMCALL(tavlnode27408*, inrange_28529)(tavlnode27408* root, NI key);
static N_INLINE(void, add_45223)(tcellseq45151* s, tcell45135* c);
N_NOCONV(void*, alloc_5801)(NI size);
N_NOCONV(void, dealloc_5848)(void* p);
N_NIMCALL(void, dealloc_43828)(tmemregion27410* allocator, void* p);
N_NIMCALL(void, rawdealloc_40823)(tmemregion27410* a, void* p);
N_NIMCALL(void, freebigchunk_30206)(tmemregion27410* a, tbigchunk26642* c_30210);
N_NIMCALL(void, excl_29038)(tintset26617* s, NI key);
N_NIMCALL(void, freeoschunks_29810)(tmemregion27410* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_26424)(void* p, NI size);
static N_INLINE(void, deccurrmem_27625)(tmemregion27410* a, NI bytes);
N_NIMCALL(void, del_28804)(tmemregion27410* a, tavlnode27408** t, NI x);
static N_INLINE(void, deallocavlnode_28406)(tmemregion27410* a, tavlnode27408* n);
N_NIMCALL(void, markthreadstacks_68406)(tgcheap47216* gch);
N_NIMCALL(NIM_BOOL, collectzct_67212)(tgcheap47216* gch);
static N_INLINE(NIM_BOOL, canbecycleroot_48867)(tcell45135* c);
N_NIMCALL(void, excl_45902)(tcellset45147* s, tcell45135* cell);
N_NIMCALL(tpagedesc45143*, cellsetget_45322)(tcellset45147 t, NI key);
static N_INLINE(NI, nexttry_45314)(NI h, NI maxhash);
N_NIMCALL(void, preparedealloc_49408)(tcell45135* cell);
static N_INLINE(void*, celltousr_48825)(tcell45135* cell);
N_NIMCALL(void, forallchildren_49217)(tcell45135* cell, NU8 op);
N_NIMCALL(void, forallchildrenaux_49225)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, dooperation_49221)(void* p, NU8 op);
static N_INLINE(void, decref_50804)(tcell45135* c);
static N_INLINE(void, rtladdzct_50404)(tcell45135* c);
N_NOINLINE(void, addzct_48817)(tcellseq45151* s, tcell45135* c);
static N_INLINE(void, rtladdcycleroot_49629)(tcell45135* c);
N_NOINLINE(void, incl_45871)(tcellset45147* s, tcell45135* cell);
N_NIMCALL(tpagedesc45143*, cellsetput_45666)(tcellset45147* t, NI key);
N_NIMCALL(void, cellsetenlarge_45612)(tcellset45147* t);
N_NIMCALL(void, cellsetrawinsert_45356)(tcellset45147 t, tpagedesc45143** data, tpagedesc45143* desc);
N_NIMCALL(void, markgray_64405)(tcell45135* s);
N_NIMCALL(void, scan_64804)(tcell45135* s);
N_NIMCALL(void, scanblack_64604)(tcell45135* s);
N_NIMCALL(void, collectwhite_65004)(tcell45135* s);
N_NIMCALL(NIM_BOOL, contains_45823)(tcellset45147 s, tcell45135* cell);
N_NIMCALL(void, freecycliccell_63627)(tgcheap47216* gch, tcell45135* c);
N_NIMCALL(void, forallslotsaux_53408)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_25610)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_25336)(void* aa, TNimNode* n);
N_NIMCALL(void, collectcycles_67445)(tgcheap47216* gch);
N_NIMCALL(void, markroots_65205)(tgcheap47216* gch);
N_NIMCALL(void, collectroots_67401)(tgcheap47216* gch);
N_NIMCALL(void, cellsetreset_53401)(tcellset45147* s);
N_NIMCALL(void, deinit_45281)(tcellset45147* s);
N_NIMCALL(NI, getoccupiedmem_6495)(void);
N_NIMCALL(NI, gettotalmem_6499)(void);
N_NIMCALL(NI, getfreemem_6497)(void);
N_NIMCALL(void, unmarkstackandregisters_71611)(tgcheap47216* gch);
static N_INLINE(void, addnewobjtozct_54490)(tcell45135* res, tgcheap47216* gch);
N_NIMCALL(void, writetostderr_16401)(NCSTRING msg);
N_NIMCALL(void, write_13077)(FILE* f, NCSTRING c);
N_NIMCALL(void, registersignalhandler_20008)(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, TMP48)(void* p, NI op);
N_NIMCALL(void, TMP49)(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_17604)(Exception* e);
static N_INLINE(void, pushCurrentException)(Exception* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_51225)(tcell45135* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isobjslowpath_22025)(TNimType* obj, TNimType* subclass, TNimType** cache);
static N_INLINE(void, quitordebug_17401)(void);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NOINLINE(NIM_BOOL, isonstack_49214)(void* p);
N_NIMCALL(void, TMP135)(void* p, NI op);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, genericresetaux_78801)(void* dest, TNimNode* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_75028, NI last);
static N_INLINE(NI, resize_74801)(NI old);
N_NIMCALL(void*, growobj_63618)(void* old, NI newsize);
N_NIMCALL(void*, growobj_60606)(void* old, NI newsize, tgcheap47216* 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_78806)(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_78812)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
N_NIMCALL(NI, writebuffer_13246)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_77005)(NimStringDesc* msg);
N_NIMCALL(void, TMP148)(void* p, NI op);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_196676)(TY120008* x_196682, TY120008* y_196687);
static N_INLINE(void*, seqtoptr_196692)(TY120008* x_196698);
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, TMP827)(void* p, NI op);
N_NIMCALL(void, objectinitaux_79892)(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_44807)(tmemregion27410* allocator, void* p, NI newsize);
N_NIMCALL(NI, ptrsize_43416)(void* p);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NIM_BOOL, open_12803)(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, TMP1040)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_CHAR, getdecimalpoint_76061)(void);
N_NIMCALL(void, TMP1073)(void* p, NI op);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_611232)(TY225936* x_611238, TY225936* y_611243);
static N_INLINE(void*, seqtoptr_611248)(TY225936* x_611254);
N_NIMCALL(void, write_13065)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, TMP1563)(void* p, NI op);
N_NIMCALL(void, TMP2173)(void* p, NI op);
N_NIMCALL(FILE*, open_12817)(NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readallfile_77739)(FILE* file);
N_NIMCALL(NI, rawfilesize_77719)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_77728)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_13227)(FILE* f, void* buffer, NI len);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void*, seqtoptr_273513)(ttypeseq225848* x_273519);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_273497)(ttypeseq225848* x_273503, ttypeseq225848* y_273508);
static N_INLINE(void*, seqtoptr_418648)(TY418481* x_418654);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418739)(tlinemap418480 x_418743, tlinemap418480 y_418745);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418758)(TY418485* x_418764, TY418485* y_418769);
static N_INLINE(void*, seqtoptr_418774)(TY418485* x_418780);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418865)(tentry418478 x_418869, tentry418478 y_418871);
static N_INLINE(void*, seqtoptr_229354)(TY225947* x_229360);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_229338)(TY225947* x_229344, TY225947* y_229349);
static N_INLINE(void*, seqtoptr_315683)(tnodeseq225810* x_315689);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_315667)(tnodeseq225810* x_315673, tnodeseq225810* y_315678);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void*, seqtoptr_491417)(tsymseq225818* x_491423);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_491401)(tsymseq225818* x_491407, tsymseq225818* y_491412);
static N_INLINE(void*, seqtoptr_337098)(TY336062* x_337104);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_336893)(jsonnodeobj336042* a, jsonnodeobj336042* b);
static N_INLINE(void*, seqtoptr_337253)(TY336057* x_337259);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_337344)(TY336611 x_337348, TY336611 y_337350);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_13089)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, TMP4867)(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(TMP50, "over- or underflow", 18);
STRING_LITERAL(TMP136, "attempt to write to a nil address", 33);
STRING_LITERAL(TMP149, "cannot write string to file", 27);
STRING_LITERAL(TMP1023, "rb", 2);
STRING_LITERAL(TMP1024, "wb", 2);
STRING_LITERAL(TMP1025, "w+b", 3);
STRING_LITERAL(TMP1026, "r+b", 3);
STRING_LITERAL(TMP1027, "ab", 2);
NIM_CONST TY78211 formatopen_78210 = {((NimStringDesc*) &TMP1023),
((NimStringDesc*) &TMP1024),
((NimStringDesc*) &TMP1025),
((NimStringDesc*) &TMP1026),
((NimStringDesc*) &TMP1027)}
;
STRING_LITERAL(TMP1039, "cannot open: ", 13);
STRING_LITERAL(TMP1041, "no exception to reraise", 23);
STRING_LITERAL(TMP1042, "(", 1);
STRING_LITERAL(TMP1043, ", ", 2);
STRING_LITERAL(TMP1044, "filename", 8);
STRING_LITERAL(TMP1045, ": ", 2);
STRING_LITERAL(TMP1046, "line", 4);
STRING_LITERAL(TMP1047, ")", 1);
STRING_LITERAL(TMP1235, " (invalid data!)", 16);
STRING_LITERAL(TMP2617, "error while reading from file", 29);
STRING_LITERAL(TMP2711, "cannot set file position", 24);
STRING_LITERAL(TMP2712, "cannot retrieve file position", 29);
STRING_LITERAL(TMP4774, "true", 4);
STRING_LITERAL(TMP4775, "false", 5);
STRING_LITERAL(TMP4856, "EOF reached", 11);
STRING_LITERAL(TMP4876, "[GC] total memory: ", 19);
STRING_LITERAL(TMP4877, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP4878, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP4879, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP4880, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP4881, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP4882, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP4883, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP4884, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP4885, "\012[GC] max pause time [ms]: ", 27);
NI nim_program_result;
TY8221 globalraisehook_8225;
TY8226 localraisehook_8230;
TY8231 outofmemhook_8233;
TNimType strdesc_9804;
TY16201 errormessagewriter_16204;
TFrame* frameptr_16442;
TSafePoint* exchandler_16443;
Exception* currexception_16445;
TY16801 tempframes_16804;
tavlnode27408 bottomdata_27438;
tavlnode27408* bottom_27439;
tgcheap47216 gch_47244;
NIM_BOOL localgcinitialized_53204;
NIM_CHAR decimalpoint_76060;
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 NTI22401; /* ref OverflowError */
TNimType NTI3229; /* SystemError */
TNimType NTI3253; /* OutOfMemError */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI114; /* int32 */
TNimType NTI3249; /* ValueError */
TNimType NTI21601; /* ref ValueError */
TNimType NTI112; /* int16 */
TNimType NTI3231; /* IOError */
TNimType NTI77201; /* ref IOError */
extern TNimType NTI120008; /* seq[string] */
TNimType NTI138; /* bool */
TNimType NTI5510; /* BiggestInt */
TNimType NTI5512; /* BiggestFloat */
TNimType NTI3213; /* RootRef */
TNimType NTI153; /* pointer */
TNimType NTI5611; /* cint */
TNimType NTI26620; /* array[0..15, int] */
TNimType NTI75121; /* range 0..2147483647(int) */
TNimType NTI128; /* float */
TNimType NTI12602; /* CFile */
TNimType NTI12604; /* File */
TNimType NTI110; /* int8 */
TNimType NTI3263; /* ReraiseError */
TNimType NTI18201; /* ref ReraiseError */
TNimType NTI3259; /* RangeError */
TNimType NTI3233; /* OSError */
TNimType NTI115012; /* ref OSError */
extern TNimType NTI225936; /* seq[int32] */
TNimType NTI3255; /* IndexError */
TNimType NTI123817; /* ref IndexError */
TNimType NTI124; /* uint32 */
TNimType NTI3247; /* AssertionError */
TNimType NTI85001; /* ref AssertionError */
extern TNimType NTI225848; /* TTypeSeq */
TNimType NTI12608; /* FileHandle */
extern TNimType NTI225838; /* PInstantiation */
extern TNimType NTI225947; /* seq[PInstantiation] */
extern TNimType NTI225810; /* TNodeSeq */
TNimType NTI3241; /* DivByZeroError */
extern TNimType NTI225818; /* TSymSeq */
TNimType NTI147; /* char */
extern TNimType NTI182609; /* Socket */
TNimType NTI191015; /* seq[Socket] */

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

N_NOINLINE(void, setStackBottom)(void* thestackbottom) {
	{
		if (!(gch_47244.Stackbottom == NIM_NIL)) goto LA3;
		gch_47244.Stackbottom = thestackbottom;
	}
	goto LA1;
	LA3: ;
	{
		NI a;
		NI b;
		a = ((NI) (thestackbottom));
		b = ((NI) (gch_47244.Stackbottom));
		gch_47244.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_26670)(NI x, NI v) {
	NI result;
	result = 0;
	result = (NI)((NI32)(x + (NI32)(v - 1)) & (NI)((NU32) ~((NI32)(v - 1))));
	return result;
}

static N_INLINE(void, listremove_31003)(tbigchunk26642** head_31009, tbigchunk26642* c_31012) {
	{
		if (!(c_31012 == (*head_31009))) goto LA3;
		(*head_31009) = (*c_31012).Next;
		{
			if (!!(((*head_31009) == NIM_NIL))) goto LA7;
			(*(*head_31009)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_31012).Prev).Next = (*c_31012).Next;
		{
			if (!!(((*c_31012).Next == NIM_NIL))) goto LA12;
			(*(*c_31012).Next).Prev = (*c_31012).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_31012).Next = NIM_NIL;
	(*c_31012).Prev = NIM_NIL;
}

N_NIMCALL(ttrunk26613*, intsetget_28924)(tintset26617* t, NI key) {
	ttrunk26613* result;
	ttrunk26613* 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_28995)(tintset26617* s, NI key) {
	NIM_BOOL result;
	ttrunk26613* t;
	result = 0;
	t = intsetget_28924(s, (NI)((NU32)(key) >> (NU32)(9)));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & 511);
		result = !(((NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] & (NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, isaccessible_30021)(tmemregion27410* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = pageindex_29338(p);
	result = contains_28995((&(*a).Chunkstarts), LOC1);
	return result;
}

static N_INLINE(void, updateprevsize_30091)(tmemregion27410* a, tbigchunk26642* c, NI prevsize) {
	tbasechunk26638* ri;
	ri = ((tbasechunk26638*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_30021((&(*a)), ((void*) (ri)));
		if (!LOC3) goto LA4;
		(*ri).Prevsize = prevsize;
	}
	LA4: ;
}

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

static N_INLINE(void*, osallocpages_26415)(NI size) {
	void* result;
	result = 0;
	result = mmap(NIM_NIL, size, ((int) 3), ((NI32) 4098), ((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_25859();
	}
	LA5: ;
	return result;
}

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

N_NIMCALL(void*, llalloc_27659)(tmemregion27410* a, NI size) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tllchunk27404* 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_26415(4096);
		(*a).Llmem = ((tllchunk27404*) (LOC7));
		inccurrmem_27605(a, 4096);
		(*(*a).Llmem).Size = (NI32)(4096 - ((NI)sizeof(tllchunk27404)));
		(*(*a).Llmem).Acc = ((NI)sizeof(tllchunk27404));
		(*(*a).Llmem).Next = old;
	}
	LA5: ;
	result = ((void*) ((NI32)(((NI) ((*a).Llmem)) + (*(*a).Llmem).Acc)));
	(*(*a).Llmem).Size -= size;
	(*(*a).Llmem).Acc += size;
	zeroMem(result, size);
	return result;
}

N_NIMCALL(ttrunk26613*, intsetput_28960)(tmemregion27410* a, tintset26617* t, NI key) {
	ttrunk26613* result;
	result = 0;
	result = intsetget_28924((&(*t)), key);
	{
		void* LOC5;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = llalloc_27659(a, ((NI)sizeof(ttrunk26613)));
		result = ((ttrunk26613*) (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_29024)(tmemregion27410* a, tintset26617* s, NI key) {
	ttrunk26613* t;
	NI u;
	t = intsetput_28960(a, s, (NI)((NU32)(key) >> (NU32)(9)));
	u = (NI)(key & 511);
	(*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] | (NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31))))));
}

static N_INLINE(NI, pageindex_29330)(tbasechunk26638* c) {
	NI result;
	result = 0;
	result = (NI)((NU32)(((NI) (c))) >> (NU32)(12));
	return result;
}

static N_INLINE(void, listadd_32231)(tbigchunk26642** head_32237, tbigchunk26642* c_32240) {
	(*c_32240).Next = (*head_32237);
	{
		if (!!(((*head_32237) == NIM_NIL))) goto LA3;
		(*(*head_32237)).Prev = c_32240;
	}
	LA3: ;
	(*head_32237) = c_32240;
}

N_NIMCALL(void, splitchunk_33015)(tmemregion27410* a, tbigchunk26642* c, NI size) {
	tbigchunk26642* rest;
	tbasechunk26638* LOC1;
	NI LOC2;
	rest = ((tbigchunk26642*) ((NI)((NU32)(((NI) (c))) + (NU32)(size))));
	(*rest).Sup.Size = (NI32)((*c).Sup.Size - size);
	(*rest).Sup.Used = NIM_FALSE;
	(*rest).Next = NIM_NIL;
	(*rest).Prev = NIM_NIL;
	(*rest).Sup.Prevsize = size;
	updateprevsize_30091(a, c, (*rest).Sup.Size);
	(*c).Sup.Size = size;
	LOC1 = 0;
	LOC1 = &rest->Sup;
	LOC2 = 0;
	LOC2 = pageindex_29330(LOC1);
	incl_29024(a, (&(*a).Chunkstarts), LOC2);
	listadd_32231((&(*a).Freechunkslist), rest);
}

N_NIMCALL(tbigchunk26642*, requestoschunks_29356)(tmemregion27410* a, NI size) {
	tbigchunk26642* result;
	void* LOC1;
	NI nxt;
	tbasechunk26638* next;
	NI lastsize;
	NI prv;
	tbasechunk26638* prev;
	result = 0;
	inccurrmem_27605(a, size);
	(*a).Freemem += size;
	LOC1 = 0;
	LOC1 = osallocpages_26415(size);
	result = ((tbigchunk26642*) (LOC1));
	(*result).Next = NIM_NIL;
	(*result).Prev = NIM_NIL;
	(*result).Sup.Used = NIM_FALSE;
	(*result).Sup.Size = size;
	nxt = (NI)((NU32)(((NI) (result))) + (NU32)(size));
	next = ((tbasechunk26638*) (nxt));
	{
		NI LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC4 = pageindex_29330(next);
		LOC5 = 0;
		LOC5 = contains_28995((&(*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)((NU32)(((NI) (result))) - (NU32)(lastsize));
	prev = ((tbasechunk26638*) (prv));
	{
		NIM_BOOL LOC15;
		NI LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = pageindex_29330(prev);
		LOC15 = contains_28995((&(*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(tbigchunk26642*, getbigchunk_33220)(tmemregion27410* a, NI size) {
	tbigchunk26642* result;
	tbasechunk26638* LOC16;
	NI LOC17;
	result = 0;
	result = (*a).Freechunkslist;
	{
		{
			while (1) {
				if (!!((result == NIM_NIL))) goto LA3;
				{
					if (!((*result).Sup.Size == size)) goto LA6;
					listremove_31003((&(*a).Freechunkslist), result);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					if (!(size < (*result).Sup.Size)) goto LA9;
					listremove_31003((&(*a).Freechunkslist), result);
					splitchunk_33015(a, result, size);
					goto LA1;
				}
				goto LA4;
				LA9: ;
				LA4: ;
				result = (*result).Next;
			} LA3: ;
		}
		{
			if (!(size < 524288)) goto LA13;
			result = requestoschunks_29356(a, 524288);
			splitchunk_33015(a, result, size);
		}
		goto LA11;
		LA13: ;
		{
			result = requestoschunks_29356(a, size);
		}
		LA11: ;
	} LA1: ;
	(*result).Sup.Prevsize = 0;
	(*result).Sup.Used = NIM_TRUE;
	LOC16 = 0;
	LOC16 = &result->Sup;
	LOC17 = 0;
	LOC17 = pageindex_29330(LOC16);
	incl_29024(a, (&(*a).Chunkstarts), LOC17);
	(*a).Freemem -= size;
	return result;
}

N_NIMCALL(tsmallchunk26640*, getsmallchunk_34028)(tmemregion27410* a) {
	tsmallchunk26640* result;
	tbigchunk26642* res;
	result = 0;
	res = getbigchunk_33220(a, 4096);
	result = ((tsmallchunk26640*) (res));
	return result;
}

static N_INLINE(void, listadd_35405)(tsmallchunk26640** head_35411, tsmallchunk26640* c_35414) {
	(*c_35414).Next = (*head_35411);
	{
		if (!!(((*head_35411) == NIM_NIL))) goto LA3;
		(*(*head_35411)).Prev = c_35414;
	}
	LA3: ;
	(*head_35411) = c_35414;
}

static N_INLINE(void, listremove_38203)(tsmallchunk26640** head_38209, tsmallchunk26640* c_38212) {
	{
		if (!(c_38212 == (*head_38209))) goto LA3;
		(*head_38209) = (*c_38212).Next;
		{
			if (!!(((*head_38209) == NIM_NIL))) goto LA7;
			(*(*head_38209)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_38212).Prev).Next = (*c_38212).Next;
		{
			if (!!(((*c_38212).Next == NIM_NIL))) goto LA12;
			(*(*c_38212).Next).Prev = (*c_38212).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_38212).Next = NIM_NIL;
	(*c_38212).Prev = NIM_NIL;
}

N_NIMCALL(tavlnode27408*, allocavlnode_27836)(tmemregion27410* a, NI key, NI upperbound) {
	tavlnode27408* 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_27659(a, ((NI)sizeof(tavlnode27408)));
		result = ((tavlnode27408*) (LOC6));
	}
	LA1: ;
	(*result).Key = key;
	(*result).Upperbound = upperbound;
	(*result).Link[(0)- 0] = bottom_27439;
	(*result).Link[(1)- 0] = bottom_27439;
	(*result).Level = 1;
	return result;
}

N_NIMCALL(void, skew_28596)(tavlnode27408** t) {
	{
		tavlnode27408* 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_28604)(tavlnode27408** t) {
	{
		tavlnode27408* 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_28624)(tmemregion27410* a, tavlnode27408** t, NI key, NI upperbound) {
	{
		if (!((*t) == bottom_27439)) goto LA3;
		(*t) = allocavlnode_27836(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!((NU32)(key) < (NU32)((*(*t)).Key))) goto LA8;
			add_28624(a, &(*(*t)).Link[(0)- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			if (!((NU32)((*(*t)).Key) < (NU32)(key))) goto LA11;
			add_28624(a, &(*(*t)).Link[(1)- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		skew_28596(t);
		split_28604(t);
	}
	LA1: ;
}

N_NIMCALL(void*, rawalloc_34546)(tmemregion27410* a, NI requestedsize) {
	void* result;
	NI size;
	result = 0;
	size = roundup_26670(requestedsize, 8);
	{
		NI s;
		tsmallchunk26640* c;
		if (!(size <= (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk26640)) - 8)))) goto LA3;
		s = (NI32)(size / 8);
		c = (*a).Freesmallchunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7;
			c = getsmallchunk_34028(a);
			(*c).Freelist = NIM_NIL;
			(*c).Sup.Size = size;
			(*c).Acc = size;
			(*c).Free = (NI32)((NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk26640)) - 8)) - size);
			(*c).Next = NIM_NIL;
			(*c).Prev = NIM_NIL;
			listadd_35405((&(*a).Freesmallchunks[(s)- 0]), c);
			result = ((void*) ((&(*c).Data)));
		}
		goto LA5;
		LA7: ;
		{
			{
				if (!((*c).Freelist == NIM_NIL)) goto LA12;
				result = ((void*) ((NI)((NU32)(((NI) ((&(*c).Data)))) + (NU32)((*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_38203((&(*a).Freesmallchunks[(s)- 0]), c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		tbigchunk26642* c;
		size = roundup_26670((NI32)(requestedsize + (NI32)(((NI)sizeof(tbigchunk26642)) - 8)), 4096);
		c = getbigchunk_33220(a, size);
		result = ((void*) ((&(*c).Data)));
		{
			if (!((*a).Root == NIM_NIL)) goto LA22;
			(*a).Root = bottom_27439;
		}
		LA22: ;
		add_28624(a, &(*a).Root, ((NI) (result)), (NI)((NU32)(((NI) (result))) + (NU32)(size)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, alloc_43634)(tmemregion27410* allocator, NI size) {
	void* result;
	result = 0;
	result = rawalloc_34546(allocator, (NI32)(size + ((NI)sizeof(tfreecell26630))));
	(*((tfreecell26630*) (result))).Zerofield = 1;
	result = ((void*) ((NI)((NU32)(((NI) (result))) + (NU32)(((NI)sizeof(tfreecell26630))))));
	return result;
}

N_NIMCALL(void*, alloc0_43819)(tmemregion27410* allocator, NI size) {
	void* result;
	result = 0;
	result = alloc_43634(allocator, size);
	zeroMem(result, size);
	return result;
}

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

N_NIMCALL(void, init_45249)(tcellseq45151* s, NI cap) {
	void* LOC1;
	(*s).Len = 0;
	(*s).Cap = cap;
	LOC1 = 0;
	LOC1 = alloc0_5817((NI32)(cap * 4));
	(*s).D = ((tcell45135**) (LOC1));
}

N_NIMCALL(void, init_45270)(tcellset45147* s) {
	void* LOC1;
	LOC1 = 0;
	LOC1 = alloc0_5817(4096);
	(*s).Data = ((tpagedesc45143**) (LOC1));
	(*s).Max = 1023;
	(*s).Counter = 0;
	(*s).Head = NIM_NIL;
}

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

static N_INLINE(NI, getoccupiedmem_45070)(tmemregion27410* a) {
	NI result;
	result = 0;
	result = (NI32)((*a).Currmem - (*a).Freemem);
	return result;
}

N_NOINLINE(NI, stacksize_69210)(void) {
	NI result;
	void* volatile stacktop;
	result = 0;
	stacktop = 0;
	result = ((NI32)(((NI) ((&stacktop))) - ((NI) (gch_47244.Stackbottom))) > 0? ((NI32)(((NI) ((&stacktop))) - ((NI) (gch_47244.Stackbottom)))) : -((NI32)(((NI) ((&stacktop))) - ((NI) (gch_47244.Stackbottom)))));
	return result;
}

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

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

static N_INLINE(void, prepareforinteriorpointerchecking_42482)(tmemregion27410* a) {
	(*a).Minlargeobj = lowgauge_28418((*a).Root);
	(*a).Maxlargeobj = highgauge_28449((*a).Root);
}

static N_INLINE(tcell45135*, usrtocell_48846)(void* usr) {
	tcell45135* result;
	result = 0;
	result = ((tcell45135*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell45135))))));
	return result;
}

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

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

static N_INLINE(NIM_BOOL, issmallchunk_29199)(tbasechunk26638* c) {
	NIM_BOOL result;
	result = 0;
	result = ((*c).Size <= (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk26640)) - 8)));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(void*, interiorallocatedptr_42489)(tmemregion27410* a, void* p) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tbasechunk26638* c_42494;
		LOC3 = 0;
		LOC3 = isaccessible_30021(a, p);
		if (!LOC3) goto LA4;
		c_42494 = pageaddr_29346(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_29210(c_42494);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				tsmallchunk26640* c;
				NI offset;
				LOC13 = 0;
				LOC13 = issmallchunk_29199(c_42494);
				if (!LOC13) goto LA14;
				c = ((tsmallchunk26640*) (c_42494));
				offset = (NI)((NU32)((NI)(((NI) (p)) & 4095)) - (NU32)((NI32)(((NI)sizeof(tsmallchunk26640)) - 8)));
				{
					tfreecell26630* d;
					if (!((NU32)(offset) < (NU32)((*c).Acc))) goto LA18;
					d = ((tfreecell26630*) ((NI)((NU32)((NI)((NU32)(((NI) ((&(*c).Data)))) + (NU32)(offset))) - (NU32)((NI)((NU32)(offset) % (NU32)((*c).Sup.Size))))));
					{
						if (!((NU32)(1) < (NU32)((*d).Zerofield))) goto LA22;
						result = ((void*) (d));
					}
					LA22: ;
				}
				LA18: ;
			}
			goto LA11;
			LA14: ;
			{
				tbigchunk26642* c;
				NF* d;
				c = ((tbigchunk26642*) (c_42494));
				d = (&(*c).Data);
				{
					NIM_BOOL LOC27;
					LOC27 = 0;
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					LOC27 = ((NU32)(1) < (NU32)((*((tfreecell26630*) (d))).Zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL LOC34;
			tavlnode27408* avlnode;
			LOC34 = 0;
			LOC34 = ((NU32)((*a).Minlargeobj) <= (NU32)(q));
			if (!(LOC34)) goto LA35;
			LOC34 = ((NU32)(q) <= (NU32)((*a).Maxlargeobj));
			LA35: ;
			if (!LOC34) goto LA36;
			avlnode = inrange_28529((*a).Root, q);
			{
				void* k;
				tbigchunk26642* c;
				tbasechunk26638* LOC42;
				if (!!((avlnode == NIM_NIL))) goto LA40;
				k = ((void*) ((*avlnode).Key));
				LOC42 = 0;
				LOC42 = pageaddr_29346(k);
				c = ((tbigchunk26642*) (LOC42));
				{
					if (!((NU32)(1) < (NU32)((*((tfreecell26630*) (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_43634((&gch_47244.Region), size);
	return result;
}

N_NIMCALL(void, excl_29038)(tintset26617* s, NI key) {
	ttrunk26613* t;
	t = intsetget_28924((&(*s)), (NI)((NU32)(key) >> (NU32)(9)));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & 511);
		(*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] & (NI)((NU32) ~((NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31))))))));
	}
	LA3: ;
}

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

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

N_NIMCALL(void, freeoschunks_29810)(tmemregion27410* a, void* p, NI size) {
	tbasechunk26638* c;
	NI nxt;
	tbasechunk26638* next;
	NI LOC7;
	c = ((tbasechunk26638*) (p));
	nxt = (NI)((NU32)(((NI) (p))) + (NU32)((*c).Size));
	next = ((tbasechunk26638*) (nxt));
	{
		NI LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC3 = pageindex_29330(next);
		LOC4 = 0;
		LOC4 = contains_28995((&(*a).Chunkstarts), LOC3);
		if (!LOC4) goto LA5;
		(*next).Prevsize = 0;
	}
	LA5: ;
	LOC7 = 0;
	LOC7 = pageindex_29338(p);
	excl_29038((&(*a).Chunkstarts), LOC7);
	osdeallocpages_26424(p, size);
	deccurrmem_27625(a, size);
	(*a).Freemem -= size;
}

N_NIMCALL(void, freebigchunk_30206)(tmemregion27410* a, tbigchunk26642* c_30210) {
	tbigchunk26642* c;
	tbasechunk26638* ri;
	c = c_30210;
	(*a).Freemem += (*c).Sup.Size;
	ri = ((tbasechunk26638*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_30021((&(*a)), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		LOC3 = chunkunused_29210(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC12;
			LOC9 = 0;
			LOC9 = issmallchunk_29199(ri);
			if (!!(LOC9)) goto LA10;
			listremove_31003((&(*a).Freechunkslist), ((tbigchunk26642*) (ri)));
			(*c).Sup.Size += (*ri).Size;
			LOC12 = 0;
			LOC12 = pageindex_29330(ri);
			excl_29038((&(*a).Chunkstarts), LOC12);
		}
		LA10: ;
	}
	LA5: ;
	{
		tbasechunk26638* le;
		if (!!(((*c).Sup.Prevsize == 0))) goto LA15;
		le = ((tbasechunk26638*) ((NI)((NU32)(((NI) (c))) - (NU32)((*c).Sup.Prevsize))));
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = isaccessible_30021((&(*a)), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			LOC19 = chunkunused_29210(le);
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				tbasechunk26638* LOC28;
				NI LOC29;
				LOC25 = 0;
				LOC25 = issmallchunk_29199(le);
				if (!!(LOC25)) goto LA26;
				listremove_31003((&(*a).Freechunkslist), ((tbigchunk26642*) (le)));
				(*le).Size += (*c).Sup.Size;
				LOC28 = 0;
				LOC28 = &c->Sup;
				LOC29 = 0;
				LOC29 = pageindex_29330(LOC28);
				excl_29038((&(*a).Chunkstarts), LOC29);
				c = ((tbigchunk26642*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	{
		NIM_BOOL LOC32;
		tbasechunk26638* 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_29330(LOC36);
		incl_29024(a, (&(*a).Chunkstarts), LOC37);
		updateprevsize_30091(a, c, (*c).Sup.Size);
		listadd_32231((&(*a).Freechunkslist), c);
		(*c).Sup.Used = NIM_FALSE;
	}
	goto LA30;
	LA34: ;
	{
		freeoschunks_29810(a, ((void*) (c)), (*c).Sup.Size);
	}
	LA30: ;
}

static N_INLINE(void, deallocavlnode_28406)(tmemregion27410* a, tavlnode27408* n) {
	(*n).Link[(0)- 0] = (*a).Freeavlnodes;
	(*a).Freeavlnodes = n;
}

N_NIMCALL(void, del_28804)(tmemregion27410* a, tavlnode27408** t, NI x) {
	{
		if (!((*t) == bottom_27439)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	(*a).Last = (*t);
	{
		if (!((NU32)(x) < (NU32)((*(*t)).Key))) goto LA7;
		del_28804(a, &(*(*t)).Link[(0)- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		(*a).Deleted = (*t);
		del_28804(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_27439));
		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_27439;
		(*t) = (*(*t)).Link[(1)- 0];
		deallocavlnode_28406(a, (*a).Last);
	}
	goto LA10;
	LA16: ;
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = ((*(*(*t)).Link[(0)- 0]).Level < (NI32)((*(*t)).Level - 1));
		if (LOC19) goto LA20;
		LOC19 = ((*(*(*t)).Link[(1)- 0]).Level < (NI32)((*(*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_28596(t);
		skew_28596(&(*(*t)).Link[(1)- 0]);
		skew_28596(&(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]);
		split_28604(t);
		split_28604(&(*(*t)).Link[(1)- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	BeforeRet: ;
}

N_NIMCALL(void, rawdealloc_40823)(tmemregion27410* a, void* p) {
	tbasechunk26638* c_41001;
	c_41001 = pageaddr_29346(p);
	{
		NIM_BOOL LOC3;
		tsmallchunk26640* c;
		NI s;
		tfreecell26630* f;
		LOC3 = 0;
		LOC3 = issmallchunk_29199(c_41001);
		if (!LOC3) goto LA4;
		c = ((tsmallchunk26640*) (c_41001));
		s = (*c).Sup.Size;
		f = ((tfreecell26630*) (p));
		(*f).Zerofield = 0;
		(*f).Next = (*c).Freelist;
		(*c).Freelist = f;
		{
			if (!((*c).Free < s)) goto LA8;
			listadd_35405((&(*a).Freesmallchunks[((NI32)(s / 8))- 0]), c);
			(*c).Free += s;
		}
		goto LA6;
		LA8: ;
		{
			(*c).Free += s;
			{
				if (!((*c).Free == (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk26640)) - 8)))) goto LA13;
				listremove_38203((&(*a).Freesmallchunks[((NI32)(s / 8))- 0]), c);
				(*c).Sup.Size = 4096;
				freebigchunk_30206(a, ((tbigchunk26642*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		tbigchunk26642* c;
		c = ((tbigchunk26642*) (c_41001));
		(*a).Deleted = bottom_27439;
		del_28804(a, &(*a).Root, ((NI) ((&(*c).Data))));
		freebigchunk_30206(a, c);
	}
	LA1: ;
}

N_NIMCALL(void, dealloc_43828)(tmemregion27410* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell26630))))));
	rawdealloc_40823(allocator, x);
}

N_NOCONV(void, dealloc_5848)(void* p) {
	dealloc_43828((&gch_47244.Region), p);
}

static N_INLINE(void, add_45223)(tcellseq45151* s, tcell45135* c) {
	{
		tcell45135** d;
		void* LOC5;
		if (!((*s).Cap <= (*s).Len)) goto LA3;
		(*s).Cap = (NI32)((NI32)((*s).Cap * 3) / 2);
		LOC5 = 0;
		LOC5 = alloc_5801((NI32)((*s).Cap * 4));
		d = ((tcell45135**) (LOC5));
		memcpy(((void*) (d)), ((void*) ((*s).D)), (NI32)((*s).Len * 4));
		dealloc_5848(((void*) ((*s).D)));
		(*s).D = d;
	}
	LA3: ;
	(*s).D[((*s).Len)- 0] = c;
	(*s).Len += 1;
}

static N_INLINE(void, gcmark_67846)(tgcheap47216* gch, void* p) {
	tcell45135* cell;
	NI c;
	cell = usrtocell_48846(p);
	c = ((NI) (cell));
	{
		tcell45135* objstart;
		void* LOC5;
		if (!((NU32)(4096) < (NU32)(c))) goto LA3;
		LOC5 = 0;
		LOC5 = interiorallocatedptr_42489((&(*gch).Region), ((void*) (cell)));
		objstart = ((tcell45135*) (LOC5));
		{
			if (!!((objstart == NIM_NIL))) goto LA8;
			(*objstart).Refcount = (NI)((NU32)((*objstart).Refcount) + (NU32)(8));
			add_45223((&(*gch).Decstack), objstart);
		}
		LA8: ;
	}
	LA3: ;
}

N_CDECL(void, markstackandregisters_69440)(tgcheap47216* 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 (!((NU32)(sp) < (NU32)((NI32)(max - 32)))) goto LA7;
				gcmark_67846(gch, ((void**) (sp))[(0)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(1)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(2)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(3)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(4)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(5)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(6)- 0]);
				gcmark_67846(gch, ((void**) (sp))[(7)- 0]);
				sp = (NI)((NU32)(sp) + (NU32)(32));
			} LA7: ;
		}
		{
			while (1) {
				if (!((NU32)(sp) <= (NU32)(max))) goto LA9;
				gcmark_67846(gch, (*((void**) (sp))));
				sp = (NI)((NU32)(sp) + (NU32)(4));
			} LA9: ;
		}
	}
	LA4: ;
}

N_NIMCALL(void, markthreadstacks_68406)(tgcheap47216* gch) {
}

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

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

N_NIMCALL(tpagedesc45143*, cellsetget_45322)(tcellset45147 t, NI key) {
	tpagedesc45143* 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_45314(h, t.Max);
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, excl_45902)(tcellset45147* s, tcell45135* cell) {
	NI u;
	tpagedesc45143* t;
	u = ((NI) (cell));
	t = cellsetget_45322((*s), (NI)((NU32)(u) >> (NU32)(12)));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
		(*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] & (NI)((NU32) ~((NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31))))))));
	}
	LA3: ;
}

static N_INLINE(void*, celltousr_48825)(tcell45135* cell) {
	void* result;
	result = 0;
	result = ((void*) ((NI)((NU32)(((NI) (cell))) + (NU32)(((NI)sizeof(tcell45135))))));
	return result;
}

N_NIMCALL(void, preparedealloc_49408)(tcell45135* cell) {
	{
		void* LOC5;
		if (!!(((*(*cell).Typ).finalizer == NIM_NIL))) goto LA3;
		gch_47244.Recgclock += 1;
		LOC5 = 0;
		LOC5 = celltousr_48825(cell);
		((TFinalizer) ((*(*cell).Typ).finalizer))(LOC5);
		gch_47244.Recgclock -= 1;
	}
	LA3: ;
}

N_NOINLINE(void, addzct_48817)(tcellseq45151* s, tcell45135* c) {
	{
		if (!((NI)((*c).Refcount & 4) == 0)) goto LA3;
		(*c).Refcount = (NI)((*c).Refcount | 4);
		add_45223(s, c);
	}
	LA3: ;
}

static N_INLINE(void, rtladdzct_50404)(tcell45135* c) {
	addzct_48817((&gch_47244.Zct), c);
}

N_NIMCALL(void, cellsetrawinsert_45356)(tcellset45147 t, tpagedesc45143** data, tpagedesc45143* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).Key)) & t.Max);
	{
		while (1) {
			if (!!((data[(h)- 0] == NIM_NIL))) goto LA2;
			h = nexttry_45314(h, t.Max);
		} LA2: ;
	}
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellsetenlarge_45612)(tcellset45147* t) {
	NI oldmax;
	tpagedesc45143** n;
	void* LOC1;
	oldmax = (*t).Max;
	(*t).Max = (NI32)((NI32)((NI32)((*t).Max + 1) * 2) - 1);
	LOC1 = 0;
	LOC1 = alloc0_5817((NI32)((NI32)((*t).Max + 1) * 4));
	n = ((tpagedesc45143**) (LOC1));
	{
		NI i_45629;
		NI res_45652;
		i_45629 = 0;
		res_45652 = 0;
		{
			while (1) {
				if (!(res_45652 <= oldmax)) goto LA4;
				i_45629 = res_45652;
				{
					if (!!(((*t).Data[(i_45629)- 0] == NIM_NIL))) goto LA7;
					cellsetrawinsert_45356((*t), n, (*t).Data[(i_45629)- 0]);
				}
				LA7: ;
				res_45652 += 1;
			} LA4: ;
		}
	}
	dealloc_5848(((void*) ((*t).Data)));
	(*t).Data = n;
}

N_NIMCALL(tpagedesc45143*, cellsetput_45666)(tcellset45147* t, NI key) {
	tpagedesc45143* result;
	NI h;
	void* LOC19;
	result = 0;
	h = (NI)(((NI) (key)) & (*t).Max);
	{
		while (1) {
			tpagedesc45143* 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_45314(h, (*t).Max);
		}
	} LA1: ;
	{
		NIM_BOOL LOC13;
		LOC13 = 0;
		LOC13 = ((NI32)((NI32)((*t).Max + 1) * 2) < (NI32)((*t).Counter * 3));
		if (LOC13) goto LA14;
		LOC13 = ((NI32)((NI32)((*t).Max + 1) - (*t).Counter) < 4);
		LA14: ;
		if (!LOC13) goto LA15;
		cellsetenlarge_45612(t);
	}
	LA15: ;
	(*t).Counter += 1;
	h = (NI)(((NI) (key)) & (*t).Max);
	{
		while (1) {
			if (!!(((*t).Data[(h)- 0] == NIM_NIL))) goto LA18;
			h = nexttry_45314(h, (*t).Max);
		} LA18: ;
	}
	LOC19 = 0;
	LOC19 = alloc0_5817(((NI)sizeof(tpagedesc45143)));
	result = ((tpagedesc45143*) (LOC19));
	(*result).Next = (*t).Head;
	(*result).Key = key;
	(*t).Head = result;
	(*t).Data[(h)- 0] = result;
	BeforeRet: ;
	return result;
}

N_NOINLINE(void, incl_45871)(tcellset45147* s, tcell45135* cell) {
	NI u;
	tpagedesc45143* t;
	u = ((NI) (cell));
	t = cellsetput_45666(s, (NI)((NU32)(u) >> (NU32)(12)));
	u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
	(*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] | (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31))))));
}

static N_INLINE(void, rtladdcycleroot_49629)(tcell45135* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_45871((&gch_47244.Cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_50804)(tcell45135* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_50404(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_48867(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_49629(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

N_NIMCALL(void, scanblack_64604)(tcell45135* s) {
	(*s).Refcount = (NI)((*s).Refcount & -4);
	forallchildren_49217(s, ((NU8) 7));
}

N_NIMCALL(void, scan_64804)(tcell45135* s) {
	{
		if (!(((NI) ((NI)((*s).Refcount & 3))) == 1)) goto LA3;
		{
			if (!((NU32)(8) <= (NU32)((*s).Refcount))) goto LA7;
			scanblack_64604(s);
		}
		goto LA5;
		LA7: ;
		{
			(*s).Refcount = (NI)((NI)((*s).Refcount & -4) | 2);
			forallchildren_49217(s, ((NU8) 6));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, contains_45823)(tcellset45147 s, tcell45135* cell) {
	NIM_BOOL result;
	NI u;
	tpagedesc45143* t;
	result = 0;
	u = ((NI) (cell));
	t = cellsetget_45322(s, (NI)((NU32)(u) >> (NU32)(12)));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
		result = !(((NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] & (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, freecycliccell_63627)(tgcheap47216* gch, tcell45135* c) {
	preparedealloc_49408(c);
	rawdealloc_40823((&(*gch).Region), ((void*) (c)));
}

N_NIMCALL(void, collectwhite_65004)(tcell45135* s) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		LOC3 = 0;
		LOC3 = (((NI) ((NI)((*s).Refcount & 3))) == 2);
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = contains_45823(gch_47244.Cycleroots, s);
		LOC3 = !(LOC5);
		LA4: ;
		if (!LOC3) goto LA6;
		(*s).Refcount = (NI)((*s).Refcount & -4);
		forallchildren_49217(s, ((NU8) 8));
		freecycliccell_63627((&gch_47244), s);
	}
	LA6: ;
}

N_NIMCALL(void, dooperation_49221)(void* p, NU8 op) {
	tcell45135* c;
	{
		if (!(p == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	c = usrtocell_48846(p);
	switch (op) {
	case ((NU8) 2):
	{
		decref_50804(c);
	}
	break;
	case ((NU8) 3):
	{
		add_45223((&gch_47244.Tempstack), c);
	}
	break;
	case ((NU8) 4):
	{
		(*c).Refcount = (NI)((NU32)((*c).Refcount) - (NU32)(8));
	}
	break;
	case ((NU8) 5):
	{
		(*c).Refcount = (NI)((NU32)((*c).Refcount) - (NU32)(8));
		markgray_64405(c);
	}
	break;
	case ((NU8) 6):
	{
		scan_64804(c);
	}
	break;
	case ((NU8) 7):
	{
		(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
		{
			if (!!((((NI) ((NI)((*c).Refcount & 3))) == 0))) goto LA13;
			scanblack_64604(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		collectwhite_65004(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(NI, getdiscriminant_25336)(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)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	case 2:
	{
		d = ((NI)(NU)(NU16)((*((NI16*) ((NI)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	case 4:
	{
		d = ((NI) ((*((NI32*) ((NI)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	default:
	{
	}
	break;
	}
	result = d;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(TNimNode*, selectbranch_25610)(void* aa, TNimNode* n) {
	TNimNode* result;
	NI discr;
	result = 0;
	discr = getdiscriminant_25336(aa, n);
	{
		if (!((NU32)(discr) < (NU32)((*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_53408)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		forallchildrenaux_49225(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_53434;
			NI HEX3Atmp_53606;
			NI res_53609;
			i_53434 = 0;
			HEX3Atmp_53606 = 0;
			HEX3Atmp_53606 = (NI32)((*n).len - 1);
			res_53609 = 0;
			{
				while (1) {
					if (!(res_53609 <= HEX3Atmp_53606)) goto LA5;
					i_53434 = res_53609;
					{
						if (!((*(*n).sons[(i_53434)- 0]).kind == ((NU8) 1))) goto LA8;
						{
							if (!((*(*(*n).sons[(i_53434)- 0]).typ).kind == ((NU8) 22) || (*(*(*n).sons[(i_53434)- 0]).typ).kind == ((NU8) 28) || (*(*(*n).sons[(i_53434)- 0]).typ).kind == ((NU8) 24))) goto LA12;
							dooperation_49221((*((void**) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_53434)- 0]).offset))))), op);
						}
						goto LA10;
						LA12: ;
						{
							forallchildrenaux_49225(((void*) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_53434)- 0]).offset)))), (*(*n).sons[(i_53434)- 0]).typ, op);
						}
						LA10: ;
					}
					goto LA6;
					LA8: ;
					{
						forallslotsaux_53408(dest, (*n).sons[(i_53434)- 0], op);
					}
					LA6: ;
					res_53609 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25610(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA19;
			forallslotsaux_53408(dest, m, op);
		}
		LA19: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forallchildrenaux_49225)(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_49221((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			forallslotsaux_53408(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			{
				NI i_53652;
				NI HEX3Atmp_53675;
				NI res_53678;
				i_53652 = 0;
				HEX3Atmp_53675 = 0;
				HEX3Atmp_53675 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
				res_53678 = 0;
				{
					while (1) {
						if (!(res_53678 <= HEX3Atmp_53675)) goto LA14;
						i_53652 = res_53678;
						forallchildrenaux_49225(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_53652) * (NU32)((*(*mt).base).size)))))), (*mt).base, op);
						res_53678 += 1;
					} LA14: ;
				}
			}
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	BeforeRet: ;
}

N_NIMCALL(void, forallchildren_49217)(tcell45135* cell, NU8 op) {
	TY3089 marker;
	marker = (*(*cell).Typ).marker;
	{
		void* LOC5;
		if (!!((marker == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = celltousr_48825(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		switch ((*(*cell).Typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			LOC8 = 0;
			LOC8 = celltousr_48825(cell);
			forallchildrenaux_49225(LOC8, (*(*cell).Typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			LOC10 = 0;
			LOC10 = celltousr_48825(cell);
			d = ((NI) (LOC10));
			s = ((TGenericSeq*) (d));
			{
				if (!!((s == NIM_NIL))) goto LA13;
				{
					NI i_54440;
					NI HEX3Atmp_54473;
					NI res_54476;
					i_54440 = 0;
					HEX3Atmp_54473 = 0;
					HEX3Atmp_54473 = (NI32)((*s).len - 1);
					res_54476 = 0;
					{
						while (1) {
							if (!(res_54476 <= HEX3Atmp_54473)) goto LA17;
							i_54440 = res_54476;
							forallchildrenaux_49225(((void*) ((NI)((NU32)((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_54440) * (NU32)((*(*(*cell).Typ).base).size))))) + (NU32)(8)))), (*(*cell).Typ).base, op);
							res_54476 += 1;
						} LA17: ;
					}
				}
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
}

N_NIMCALL(NIM_BOOL, collectzct_67212)(tgcheap47216* gch) {
	NIM_BOOL result;
	NI* l;
	result = 0;
	l = (&(*gch).Zct.Len);
	{
		while (1) {
			tcell45135* 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[((NI32)((*l) - 1))- 0];
			(*l) -= 1;
			{
				if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA5;
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = canbecycleroot_48867(c);
					if (!LOC9) goto LA10;
					excl_45902((&(*gch).Cycleroots), c);
				}
				LA10: ;
				preparedealloc_49408(c);
				forallchildren_49217(c, ((NU8) 2));
				rawdealloc_40823((&(*gch).Region), ((void*) (c)));
			}
			LA5: ;
		} LA2: ;
	}
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, markroots_65205)(tgcheap47216* gch) {
	NI tabsize;
	tabsize = 0;
	{
		tcell45135* s_65210;
		tcellset45147 HEX3Atmp_65239;
		tpagedesc45143* r_65244;
		s_65210 = 0;
		memset((void*)(&HEX3Atmp_65239), 0, sizeof(HEX3Atmp_65239));
		HEX3Atmp_65239 = (*gch).Cycleroots;
		r_65244 = HEX3Atmp_65239.Head;
		{
			while (1) {
				NI i_65246;
				if (!!((r_65244 == NIM_NIL))) goto LA3;
				i_65246 = 0;
				{
					while (1) {
						NI w_65248;
						NI j_65250;
						if (!(i_65246 <= 15)) goto LA5;
						w_65248 = (*r_65244).Bits[(i_65246)- 0];
						j_65250 = 0;
						{
							while (1) {
								if (!!((w_65248 == 0))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_65248 & 1))) == 0))) goto LA10;
									s_65210 = ((tcell45135*) ((NI)((NI)((NU32)((*r_65244).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_65246) << (NU32)(5))) + (NU32)(j_65250))) * (NU32)(8)))));
									tabsize += 1;
									{
										NIM_BOOL LOC14;
										LOC14 = 0;
										LOC14 = (((NI) ((NI)((*s_65210).Refcount & 3))) == 3);
										if (!(LOC14)) goto LA15;
										LOC14 = ((NU32)(8) <= (NU32)((*s_65210).Refcount));
										LA15: ;
										if (!LOC14) goto LA16;
										markgray_64405(s_65210);
									}
									goto LA12;
									LA16: ;
									{
										excl_45902((&(*gch).Cycleroots), s_65210);
										{
											if (!((*s_65210).Refcount == 0)) goto LA21;
											freecycliccell_63627(gch, s_65210);
										}
										LA21: ;
									}
									LA12: ;
								}
								LA10: ;
								j_65250 += 1;
								w_65248 = (NI)((NU32)(w_65248) >> (NU32)(1));
							} LA7: ;
						}
						i_65246 += 1;
					} LA5: ;
				}
				r_65244 = (*r_65244).Next;
			} LA3: ;
		}
	}
	(*gch).Stat.Cycletablesize = (((*gch).Stat.Cycletablesize >= tabsize) ? (*gch).Stat.Cycletablesize : tabsize);
}

N_NIMCALL(void, collectroots_67401)(tgcheap47216* gch) {
	{
		tcell45135* s_67405;
		tcellset45147 HEX3Atmp_67408;
		tpagedesc45143* r_67413;
		s_67405 = 0;
		memset((void*)(&HEX3Atmp_67408), 0, sizeof(HEX3Atmp_67408));
		HEX3Atmp_67408 = (*gch).Cycleroots;
		r_67413 = HEX3Atmp_67408.Head;
		{
			while (1) {
				NI i_67415;
				if (!!((r_67413 == NIM_NIL))) goto LA3;
				i_67415 = 0;
				{
					while (1) {
						NI w_67417;
						NI j_67419;
						if (!(i_67415 <= 15)) goto LA5;
						w_67417 = (*r_67413).Bits[(i_67415)- 0];
						j_67419 = 0;
						{
							while (1) {
								if (!!((w_67417 == 0))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_67417 & 1))) == 0))) goto LA10;
									s_67405 = ((tcell45135*) ((NI)((NI)((NU32)((*r_67413).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_67415) << (NU32)(5))) + (NU32)(j_67419))) * (NU32)(8)))));
									excl_45902((&(*gch).Cycleroots), s_67405);
									collectwhite_65004(s_67405);
								}
								LA10: ;
								j_67419 += 1;
								w_67417 = (NI)((NU32)(w_67417) >> (NU32)(1));
							} LA7: ;
						}
						i_67415 += 1;
					} LA5: ;
				}
				r_67413 = (*r_67413).Next;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, deinit_45281)(tcellset45147* s) {
	tpagedesc45143* it;
	it = (*s).Head;
	{
		while (1) {
			tpagedesc45143* 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_53401)(tcellset45147* s) {
	deinit_45281(s);
	init_45270(s);
}

N_NIMCALL(void, collectcycles_67445)(tgcheap47216* gch) {
	{
		while (1) {
			NIM_BOOL LOC3;
			if (!(0 < (*gch).Zct.Len)) goto LA2;
			LOC3 = 0;
			LOC3 = collectzct_67212(gch);
		} LA2: ;
	}
	markroots_65205(gch);
	{
		tcell45135* s_67601;
		tcellset45147 HEX3Atmp_67803;
		tpagedesc45143* r_67808;
		s_67601 = 0;
		memset((void*)(&HEX3Atmp_67803), 0, sizeof(HEX3Atmp_67803));
		HEX3Atmp_67803 = (*gch).Cycleroots;
		r_67808 = HEX3Atmp_67803.Head;
		{
			while (1) {
				NI i_67810;
				if (!!((r_67808 == NIM_NIL))) goto LA6;
				i_67810 = 0;
				{
					while (1) {
						NI w_67812;
						NI j_67814;
						if (!(i_67810 <= 15)) goto LA8;
						w_67812 = (*r_67808).Bits[(i_67810)- 0];
						j_67814 = 0;
						{
							while (1) {
								if (!!((w_67812 == 0))) goto LA10;
								{
									if (!!((((NI) ((NI)(w_67812 & 1))) == 0))) goto LA13;
									s_67601 = ((tcell45135*) ((NI)((NI)((NU32)((*r_67808).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_67810) << (NU32)(5))) + (NU32)(j_67814))) * (NU32)(8)))));
									scan_64804(s_67601);
								}
								LA13: ;
								j_67814 += 1;
								w_67812 = (NI)((NU32)(w_67812) >> (NU32)(1));
							} LA10: ;
						}
						i_67810 += 1;
					} LA8: ;
				}
				r_67808 = (*r_67808).Next;
			} LA6: ;
		}
	}
	collectroots_67401(gch);
	cellsetreset_53401((&(*gch).Cycleroots));
}

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

N_NIMCALL(NI, getfreemem_6497)(void) {
	NI result;
	result = 0;
	result = gch_47244.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 = (NI32)(LOC1 - LOC2);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, unmarkstackandregisters_71611)(tgcheap47216* gch) {
	tcell45135** d;
	d = (*gch).Decstack.D;
	{
		NI i_71626;
		NI HEX3Atmp_71802;
		NI res_71805;
		i_71626 = 0;
		HEX3Atmp_71802 = 0;
		HEX3Atmp_71802 = (NI32)((*gch).Decstack.Len - 1);
		res_71805 = 0;
		{
			while (1) {
				if (!(res_71805 <= HEX3Atmp_71802)) goto LA3;
				i_71626 = res_71805;
				decref_50804(d[(i_71626)- 0]);
				res_71805 += 1;
			} LA3: ;
		}
	}
	(*gch).Decstack.Len = 0;
}

N_NIMCALL(void, collectctbody_71819)(tgcheap47216* gch) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_69210();
	(*gch).Stat.Maxstacksize = (((*gch).Stat.Maxstacksize >= LOC1) ? (*gch).Stat.Maxstacksize : LOC1);
	prepareforinteriorpointerchecking_42482((&(*gch).Region));
	markstackandregisters_69440(gch);
	markthreadstacks_68406(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_67212(gch);
		if (!LOC4) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = getoccupiedmem_45070((&(*gch).Region));
			LOC9 = ((*gch).Cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			collectcycles_67445(gch);
			(*gch).Stat.Cyclecollections += 1;
			LOC14 = 0;
			LOC14 = getoccupiedmem_6495();
			(*gch).Cyclethreshold = ((4194304 >= (NI32)(LOC14 * 2)) ? 4194304 : (NI32)(LOC14 * 2));
			(*gch).Stat.Maxthreshold = (((*gch).Stat.Maxthreshold >= (*gch).Cyclethreshold) ? (*gch).Stat.Maxthreshold : (*gch).Cyclethreshold);
		}
		LA12: ;
	}
	LA5: ;
	unmarkstackandregisters_71611(gch);
}

N_NIMCALL(void, collectct_49210)(tgcheap47216* 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_45070((&(*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_71819(gch);
	}
	LA12: ;
}

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

N_NIMCALL(void*, rawnewobj_55004)(TNimType* typ, NI size, tgcheap47216* gch) {
	void* result;
	tcell45135* res;
	void* LOC1;
	result = 0;
	collectct_49210(gch);
	LOC1 = 0;
	LOC1 = rawalloc_34546((&(*gch).Region), (NI32)(size + ((NI)sizeof(tcell45135))));
	res = ((tcell45135*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 4;
	addnewobjtozct_54490(res, gch);
	result = celltousr_48825(res);
	return result;
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_55004(typ, size, (&gch_47244));
	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), (NI32)((NI32)(((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, (NI32)((NI32)(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_13077)(FILE* f, NCSTRING c) {
	fputs(c, f);
}

N_NIMCALL(void, writetostderr_16401)(NCSTRING msg) {
	write_13077(stdout, msg);
}

N_NIMCALL(void, showerrormessage_16409)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_16204 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_16204(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_16401(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 == SIGBUS)) 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_16409(msg);
	exit(1);
}

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

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	tcell45135* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_48846(p);
	result = (NI)((NU32)((*LOC1).Refcount) >> (NU32)(3));
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	tcell45135* res;
	void* LOC1;
	result = 0;
	collectct_49210((&gch_47244));
	LOC1 = 0;
	LOC1 = rawalloc_34546((&gch_47244.Region), (NI32)(size + ((NI)sizeof(tcell45135))));
	res = ((tcell45135*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 8;
	result = celltousr_48825(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) ((NI)((*src).Sup.reserved & 2147483647)));
		{
			if (!(s < 8)) goto LA7;
			s = 7;
		}
		LA7: ;
		LOC9 = 0;
		LOC9 = newObjRC1((&strdesc_9804), (NI32)((NI32)(((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)), (NI32)((*src).Sup.len + 1));
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, nimGCvisit)(void* d, NI op) {
	dooperation_49221(d, ((NU8) (op)));
}
N_NIMCALL(void, TMP48)(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, TMP49)(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) {
	tcell45135* c;
	c = usrtocell_48846(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_50404(c);
	}
	LA3: ;
}

static N_INLINE(void, incref_51225)(tcell45135* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_48867(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_49629(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell45135* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_48846(src);
		incref_51225(LOC5);
	}
	LA3: ;
	{
		tcell45135* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_48846((*dest));
		decref_50804(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

N_NOINLINE(NIM_BOOL, isobjslowpath_22025)(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_22025(obj, subclass, cache);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(void, raiseexceptionaux_17604)(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_16443 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_16443).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_16443).raiseAction.ClEnv? (*exchandler_16443).raiseAction.ClPrc(e, (*exchandler_16443).raiseAction.ClEnv):((TMP51)((*exchandler_16443).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			_longjmp((*exchandler_16443).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!(isObjWithCache((*e).Sup.m_type, (&NTI3253), Nim_OfCheck_CACHE1))) goto LA30;
		showerrormessage_16409((*e).name);
		quitordebug_17401();
	}
	goto LA19;
	LA30: ;
	{
		TY17816 buf;
		NI l;
		memset((void*)buf, 0, sizeof(buf));
		l = 0;
		{
			if (!((NI32)(l + 28) < 2000)) goto LA35;
			memcpy(((void*) ((&buf[(l)- 0]))), "Error: unhandled exception: ", 28);
			l += 28;
		}
		LA35: ;
		{
			if (!!((*e).message == 0)) goto LA39;
			{
				if (!((NI32)(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 (!((NI32)(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 (!((NI32)(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 (!((NI32)(l + 2) < 2000)) goto LA58;
			memcpy(((void*) ((&buf[(l)- 0]))), "]\012", 2);
			l += 2;
		}
		LA58: ;
		showerrormessage_16409(((NCSTRING) (buf)));
		quitordebug_17401();
	}
	LA19: ;
	BeforeRet: ;
}

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

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

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
	result = 0;
	result = (NI)((NU32)(a) + (NU32)(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)((NU32)(a) * (NU32)(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, 8);
	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, 8);
	result = newObj(typ, size);
	(*((TGenericSeq*) (result))).len = len;
	(*((TGenericSeq*) (result))).reserved = len;
	return result;
}

N_NOINLINE(NIM_BOOL, isonstack_49214)(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_47244.Stackbottom));
	a = ((NI) (stacktop));
	x = ((NI) (p));
	LOC1 = 0;
	LOC1 = ((NU32)(a) <= (NU32)(x));
	if (!(LOC1)) goto LA2;
	LOC1 = ((NU32)(x) <= (NU32)(b));
	LA2: ;
	result = LOC1;
	return result;
}

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isonstack_49214(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		{
			tcell45135* LOC10;
			if (!!((src == NIM_NIL))) goto LA8;
			LOC10 = 0;
			LOC10 = usrtocell_48846(src);
			incref_51225(LOC10);
		}
		LA8: ;
		{
			tcell45135* LOC15;
			if (!((NU32)(4096) <= (NU32)(((NI) ((*dest)))))) goto LA13;
			LOC15 = 0;
			LOC15 = usrtocell_48846((*dest));
			decref_50804(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	(*dest) = src;
}
N_NIMCALL(void, TMP135)(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_21427;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_21427 = 0;
		e_21427 = (valueerror3249*) newObj((&NTI21601), sizeof(valueerror3249));
		(*e_21427).Sup.Sup.m_type = (&NTI3249);
		LOC5 = 0;
		LOC5 = (*e_21427).Sup.message; (*e_21427).Sup.message = copyStringRC1(((NimStringDesc*) &TMP136));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_21427, "ValueError");
	}
	LA3: ;
}

N_NIMCALL(void, genericresetaux_78801)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		genericReset(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_80420;
			NI HEX3Atmp_80451;
			NI res_80454;
			i_80420 = 0;
			HEX3Atmp_80451 = 0;
			HEX3Atmp_80451 = (NI32)((*n).len - 1);
			res_80454 = 0;
			{
				while (1) {
					if (!(res_80454 <= HEX3Atmp_80451)) goto LA6;
					i_80420 = res_80454;
					genericresetaux_78801(dest, (*n).sons[(i_80420)- 0]);
					res_80454 += 1;
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25610(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			genericresetaux_78801(dest, m);
		}
		LA10: ;
		zeroMem(((void*) ((NI)((NU32)(d) + (NU32)((*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_78801(dest, (*mt).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_80611;
			NI HEX3Atmp_80634;
			NI res_80637;
			i_80611 = 0;
			HEX3Atmp_80634 = 0;
			HEX3Atmp_80634 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
			res_80637 = 0;
			{
				while (1) {
					if (!(res_80637 <= HEX3Atmp_80634)) goto LA6;
					i_80611 = res_80637;
					genericReset(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_80611) * (NU32)((*(*mt).base).size)))))), (*mt).base);
					res_80637 += 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 & (-2147483647 -1)) == 0))) goto LA7;
			result = src;
		}
		goto LA5;
		LA7: ;
		{
			result = rawNewString(((NI) ((NI)((*src).Sup.reserved & 2147483647))));
			(*result).Sup.len = (*src).Sup.len;
			memcpy(((NCSTRING) ((*result).data)), ((NCSTRING) ((*src).data)), (NI32)((NI32)((*src).Sup.len + 1) * 1));
		}
		LA5: ;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_75028, NI last) {
	NimStringDesc* result;
	NI start;
	NI len;
	result = 0;
	start = ((start_75028 >= 0) ? start_75028 : 0);
	len = (NI32)((NI32)(((last <= (NI32)((*s).Sup.len - 1)) ? last : (NI32)((*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]))), (NI32)(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, (NI32)((*s).Sup.len - 1));
	return result;
}

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

N_NIMCALL(void*, growobj_60606)(void* old, NI newsize, tgcheap47216* gch) {
	void* result;
	tcell45135* ol;
	tcell45135* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	result = 0;
	collectct_49210(gch);
	ol = usrtocell_48846(old);
	LOC1 = 0;
	LOC1 = rawalloc_34546((&(*gch).Region), (NI32)(newsize + ((NI)sizeof(tcell45135))));
	res = ((tcell45135*) (LOC1));
	elemsize = 1;
	{
		if (!!(((*(*ol).Typ).kind == ((NU8) 28)))) goto LA4;
		elemsize = (*(*(*ol).Typ).base).size;
	}
	LA4: ;
	oldsize = (NI32)((NI32)((*((TGenericSeq*) (old))).len * elemsize) + 8);
	memcpy(((void*) (res)), ((void*) (ol)), (NI32)(oldsize + ((NI)sizeof(tcell45135))));
	zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (res))) + (NU32)(oldsize))) + (NU32)(((NI)sizeof(tcell45135)))))), (NI32)(newsize - oldsize));
	{
		NI j;
		tcell45135** d;
		if (!!(((NI)((*ol).Refcount & 4) == 0))) goto LA8;
		j = (NI32)((*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_48867(ol);
		if (!LOC18) goto LA19;
		excl_45902((&(*gch).Cycleroots), ol);
	}
	LA19: ;
	rawdealloc_40823((&(*gch).Region), ((void*) (ol)));
	result = celltousr_48825(res);
	return result;
}

N_NIMCALL(void*, growobj_63618)(void* old, NI newsize) {
	void* result;
	result = 0;
	result = growobj_60606(old, newsize, (&gch_47244));
	return result;
}

N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c) {
	NimStringDesc* result;
	result = 0;
	result = s;
	{
		void* LOC5;
		if (!(((NI) ((NI)((*result).Sup.reserved & 2147483647))) <= (*result).Sup.len)) goto LA3;
		(*result).Sup.reserved = resize_74801(((NI) ((NI)((*result).Sup.reserved & 2147483647))));
		LOC5 = 0;
		LOC5 = growobj_63618(((void*) (result)), (NI32)(((NI)sizeof(TGenericSeq)) + (NI32)((NI32)((*result).Sup.reserved + 1) * 1)));
		result = ((NimStringDesc*) (LOC5));
	}
	LA3: ;
	(*result).data[((*result).Sup.len)- 0] = c;
	(*result).data[((NI32)((*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 (!((NI32)((*dest).Sup.len + addlen) <= ((NI) ((NI)((*dest).Sup.reserved & 2147483647))))) goto LA3;
		result = dest;
	}
	goto LA1;
	LA3: ;
	{
		NI sp;
		NI LOC6;
		void* LOC7;
		LOC6 = 0;
		LOC6 = resize_74801(((NI) ((NI)((*dest).Sup.reserved & 2147483647))));
		sp = ((LOC6 >= (NI32)((*dest).Sup.len + addlen)) ? LOC6 : (NI32)((*dest).Sup.len + addlen));
		LOC7 = 0;
		LOC7 = growobj_63618(((void*) (dest)), (NI32)((NI32)(((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) ((NI)((*s).Sup.reserved & 2147483647))))) 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) ((NI)((*result).reserved & 2147483647))) <= (*result).len)) goto LA3;
		(*result).reserved = resize_74801(((NI) ((NI)((*result).reserved & 2147483647))));
		LOC5 = 0;
		LOC5 = growobj_63618(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC5));
	}
	LA3: ;
	(*result).len += 1;
	return result;
}

N_NIMCALL(void, genericassignaux_78812)(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_78806(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_78849;
			NI HEX3Atmp_79006;
			NI res_79009;
			i_78849 = 0;
			HEX3Atmp_79006 = 0;
			HEX3Atmp_79006 = (NI32)((*n).len - 1);
			res_79009 = 0;
			{
				while (1) {
					if (!(res_79009 <= HEX3Atmp_79006)) goto LA5;
					i_78849 = res_79009;
					genericassignaux_78812(dest, src, (*n).sons[(i_78849)- 0], shallow);
					res_79009 += 1;
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		dd = selectbranch_25610(dest, n);
		m = selectbranch_25610(src, n);
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = !((m == dd));
			if (!(LOC9)) goto LA10;
			LOC9 = !((dd == NIM_NIL));
			LA10: ;
			if (!LOC9) goto LA11;
			genericresetaux_78801(dest, dd);
		}
		LA11: ;
		memcpy(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*(*n).typ).size);
		{
			if (!!((m == NIM_NIL))) goto LA15;
			genericassignaux_78812(dest, src, m, shallow);
		}
		LA15: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, genericassignaux_78806)(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 & (-2147483647 -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 & (-2147483647 -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_79412;
			NI HEX3Atmp_79548;
			NI res_79551;
			i_79412 = 0;
			HEX3Atmp_79548 = 0;
			HEX3Atmp_79548 = (NI32)((*seq).len - 1);
			res_79551 = 0;
			{
				while (1) {
					if (!(res_79551 <= HEX3Atmp_79548)) goto LA24;
					i_79412 = res_79551;
					genericassignaux_78806(((void*) ((NI)((NU32)((NI)((NU32)(dst) + (NU32)((NI)((NU32)(i_79412) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), ((void*) ((NI)((NU32)((NI)((NU32)(((NI) (s2))) + (NU32)((NI)((NU32)(i_79412) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), (*mt).base, shallow);
					res_79551 += 1;
				} LA24: ;
			}
		}
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		{
			if (!!(((*mt).base == NIM_NIL))) goto LA28;
			genericassignaux_78806(dest, src, (*mt).base, shallow);
		}
		LA28: ;
		genericassignaux_78812(dest, src, (*mt).node, shallow);
		pint = ((TNimType**) (dest));
		(*pint) = mt;
	}
	break;
	case ((NU8) 18):
	{
		genericassignaux_78812(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_79496;
			NI HEX3Atmp_79557;
			NI res_79560;
			i_79496 = 0;
			HEX3Atmp_79557 = 0;
			HEX3Atmp_79557 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
			res_79560 = 0;
			{
				while (1) {
					if (!(res_79560 <= HEX3Atmp_79557)) goto LA34;
					i_79496 = res_79560;
					genericassignaux_78806(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_79496) * (NU32)((*(*mt).base).size)))))), ((void*) ((NI)((NU32)(s) + (NU32)((NI)((NU32)(i_79496) * (NU32)((*(*mt).base).size)))))), (*mt).base, shallow);
					res_79560 += 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_78806(dest, src, mt, NIM_FALSE);
}

N_NIMCALL(NI, writebuffer_13246)(FILE* f, void* buffer, NI len) {
	NI result;
	result = 0;
	result = fwrite(buffer, 1, len, f);
	return result;
}
N_NIMCALL(void, TMP148)(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_77005)(NimStringDesc* msg) {
	ioerror3231* e_77010;
	NimStringDesc* LOC1;
	e_77010 = 0;
	e_77010 = (ioerror3231*) newObj((&NTI77201), sizeof(ioerror3231));
	(*e_77010).Sup.Sup.Sup.m_type = (&NTI3231);
	LOC1 = 0;
	LOC1 = (*e_77010).Sup.Sup.message; (*e_77010).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_77010, "IOError");
}

N_NIMCALL(void, write_13065)(FILE* f, NimStringDesc* s) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = writebuffer_13246(f, ((void*) (s->data)), s->Sup.len);
		if (!!((LOC3 == s->Sup.len))) goto LA4;
		raiseeio_77005(((NimStringDesc*) &TMP149));
	}
	LA4: ;
}

static N_INLINE(void*, seqtoptr_196692)(TY120008* x_196698) {
	void* result;
	result = 0;
	result = ((void*) (x_196698));
	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)), (NI32)((*a).Sup.len * 1));
	LOC11 = (LOC13 == ((NI32) 0));
	LA12: ;
	result = LOC11;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_196676)(TY120008* x_196682, TY120008* y_196687) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_196692(x_196682);
		LOC4 = 0;
		LOC4 = seqtoptr_196692(y_196687);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_196692(x_196682);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_196692(y_196687);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_196682->Sup.len == y_196687->Sup.len)) goto LA15;
		{
			NI i_196781;
			NI HEX3Atmp_196783;
			NI res_196786;
			i_196781 = 0;
			HEX3Atmp_196783 = 0;
			HEX3Atmp_196783 = (NI32)(x_196682->Sup.len - 1);
			res_196786 = 0;
			{
				while (1) {
					if (!(res_196786 <= HEX3Atmp_196783)) goto LA19;
					i_196781 = res_196786;
					{
						if (!!(eqStrings(x_196682->data[i_196781], y_196687->data[i_196781]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_196786 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_196660)(TY120008** x_196668, NimStringDesc* y_196672) {
	{
		NIM_BOOL LOC3;
		TY197301 LOC6;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_196676((*x_196668), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_196668)), (TY120008*) newSeq((&NTI120008), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(y_196672);
		LOC7 = 0;
		LOC7 = (*x_196668)->data[0]; (*x_196668)->data[0] = copyStringRC1(LOC6[0]);
		if (LOC7) nimGCunrefNoCycle(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* LOC9;
		(*x_196668) = (TY120008*) incrSeq(&((*x_196668))->Sup, sizeof(NimStringDesc*));
		LOC9 = 0;
		LOC9 = (*x_196668)->data[(*x_196668)->Sup.len-1]; (*x_196668)->data[(*x_196668)->Sup.len-1] = copyStringRC1(y_196672);
		if (LOC9) nimGCunrefNoCycle(LOC9);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x) {
	NimStringDesc* result;
	NI i;
	NI y;
	result = 0;
	result = mnewString(16);
	i = 0;
	y = x;
	{
		while (1) {
			NI d;
			d = (NI32)(y / 10);
			result->data[i] = ((NIM_CHAR) (((NI) ((NI32)(((NI32)(y - (NI32)(d * 10)) > 0? ((NI32)(y - (NI32)(d * 10))) : -((NI32)(y - (NI32)(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_75958;
		NI HEX3Atmp_75977;
		NI res_75980;
		j_75958 = 0;
		HEX3Atmp_75977 = 0;
		HEX3Atmp_75977 = (NI32)((NI32)(i / 2) - 1);
		res_75980 = 0;
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_75980 <= HEX3Atmp_75977)) goto LA13;
				j_75958 = res_75980;
				LOC14 = 0;
				LOC14 = result->data[j_75958];
				result->data[j_75958] = result->data[(NI32)((NI32)(i - j_75958) - 1)];
				result->data[(NI32)((NI32)(i - j_75958) - 1)] = LOC14;
				res_75980 += 1;
			} LA13: ;
		}
	}
	return result;
}

N_NIMCALL(void, writestacktrace_15806)(void) {
	showerrormessage_16409("No stack traceback available\012");
}
N_NIMCALL(void, TMP827)(void* p, NI op) {
	TNimObject* a;
	a = (TNimObject*)p;
}

N_NIMCALL(void, objectinitaux_79892)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		objectInit(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_80020;
			NI HEX3Atmp_80042;
			NI res_80045;
			i_80020 = 0;
			HEX3Atmp_80042 = 0;
			HEX3Atmp_80042 = (NI32)((*n).len - 1);
			res_80045 = 0;
			{
				while (1) {
					if (!(res_80045 <= HEX3Atmp_80042)) goto LA6;
					i_80020 = res_80045;
					objectinitaux_79892(dest, (*n).sons[(i_80020)- 0]);
					res_80045 += 1;
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_25610(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			objectinitaux_79892(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_79892(dest, (*typ).node);
	}
	break;
	case ((NU8) 18):
	{
		objectinitaux_79892(dest, (*typ).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_80076;
			NI HEX3Atmp_80090;
			NI res_80093;
			i_80076 = 0;
			HEX3Atmp_80090 = 0;
			HEX3Atmp_80090 = (NI32)((NI32)((*typ).size / (*(*typ).base).size) - 1);
			res_80093 = 0;
			{
				while (1) {
					if (!(res_80093 <= HEX3Atmp_80090)) goto LA6;
					i_80076 = res_80093;
					objectInit(((void*) ((NI)((NU32)(d) + (NU32)((NI32)(i_80076 * (*(*typ).base).size))))), (*typ).base);
					res_80093 += 1;
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
}

N_NIMCALL(NIM_BOOL, open_12803)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize) {
	NIM_BOOL result;
	void* p;
	result = 0;
	p = fopen(filename->data, formatopen_78210[(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_13089)(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_13227)(FILE* f, void* buffer, NI len) {
	NI result;
	result = 0;
	result = fread(buffer, 1, len, f);
	return result;
}

N_NIMCALL(NI, ptrsize_43416)(void* p) {
	NI result;
	void* x;
	tbasechunk26638* c;
	result = 0;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell26630))))));
	c = pageaddr_29346(p);
	result = (NI)((NU32)((*c).Size) - (NU32)(((NI)sizeof(tfreecell26630))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = issmallchunk_29199(c);
		if (!!(LOC3)) goto LA4;
		result -= (NI32)(((NI)sizeof(tbigchunk26642)) - 8);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void*, realloc_44807)(tmemregion27410* allocator, void* p, NI newsize) {
	void* result;
	result = 0;
	{
		if (!(0 < newsize)) goto LA3;
		result = alloc0_43819(allocator, newsize);
		{
			NI LOC9;
			if (!!((p == NIM_NIL))) goto LA7;
			LOC9 = 0;
			LOC9 = ptrsize_43416(p);
			memcpy(result, p, LOC9);
			dealloc_43828(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!!((p == NIM_NIL))) goto LA11;
		dealloc_43828(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}

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

N_NIMCALL(TNimType*, extGetCellType)(void* c) {
	TNimType* result;
	tcell45135* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_48846(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) ((NI)((*result).reserved & 2147483647))) < newlen)) goto LA3;
		LOC5 = 0;
		LOC5 = resize_74801(((NI) ((NI)((*result).reserved & 2147483647))));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_63618(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		if (!(newlen < (*result).len)) goto LA8;
		{
			NI i_75811;
			NI HEX3Atmp_75888;
			NI res_75891;
			i_75811 = 0;
			HEX3Atmp_75888 = 0;
			HEX3Atmp_75888 = (NI32)((*result).len - 1);
			res_75891 = newlen;
			{
				while (1) {
					TNimType* LOC13;
					if (!(res_75891 <= HEX3Atmp_75888)) goto LA12;
					i_75811 = res_75891;
					LOC13 = 0;
					LOC13 = extGetCellType(((void*) (result)));
					forallchildrenaux_49225(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(8))) + (NU32)((NI)((NU32)(i_75811) * (NU32)(elemsize)))))), (*LOC13).base, ((NU8) 2));
					res_75891 += 1;
				} LA12: ;
			}
		}
		zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(8))) + (NU32)((NI)((NU32)(newlen) * (NU32)(elemsize)))))), (NI)((NU32)((NI)((NU32)((*result).len) - (NU32)(newlen))) * (NU32)(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)), (NI32)((*src).Sup.len + 1));
	(*dest).Sup.len += (*src).Sup.len;
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tcell45135* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_48846(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell45135* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_48846((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_50404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(FILE*, open_12817)(NimStringDesc* filename, NU8 mode, NI bufsize) {
	FILE* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		ioerror3231* e_12826;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = open_12803(&result, filename, mode, bufsize);
		if (!!(LOC3)) goto LA4;
		e_12826 = 0;
		e_12826 = (ioerror3231*) newObj((&NTI77201), sizeof(ioerror3231));
		(*e_12826).Sup.Sup.Sup.m_type = (&NTI3231);
		LOC6 = 0;
		LOC6 = rawNewString(filename->Sup.len + 13);
appendString(LOC6, ((NimStringDesc*) &TMP1039));
appendString(LOC6, filename);
		asgnRefNoCycle((void**) (&(*e_12826).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_12826, "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, TMP1040)(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_18025;
		NimStringDesc* LOC5;
		if (!(currexception_16445 == NIM_NIL)) goto LA3;
		e_18025 = 0;
		e_18025 = (reraiseerror3263*) newObj((&NTI18201), sizeof(reraiseerror3263));
		(*e_18025).Sup.Sup.m_type = (&NTI3263);
		LOC5 = 0;
		LOC5 = (*e_18025).Sup.message; (*e_18025).Sup.message = copyStringRC1(((NimStringDesc*) &TMP1041));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_18025, "ReraiseError");
	}
	goto LA1;
	LA3: ;
	{
		raiseexceptionaux_17604(currexception_16445);
	}
	LA1: ;
}

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

N_NIMCALL(NIM_CHAR, getdecimalpoint_76061)(void) {
	NIM_CHAR result;
	result = 0;
	result = decimalpoint_76060;
	{
		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_76060 = result;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NI, nimParseBiggestFloat)(NimStringDesc* s, NF* number, NI start) {
	NI result;
	NI i;
	NF sign;
	TY76080 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[(NI32)(i + 1)]) == (NU8)(65));
			if (LOC19) goto LA20;
			LOC19 = ((NU8)(s->data[(NI32)(i + 1)]) == (NU8)(97));
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				LOC25 = 0;
				LOC25 = ((NU8)(s->data[(NI32)(i + 2)]) == (NU8)(78));
				if (LOC25) goto LA26;
				LOC25 = ((NU8)(s->data[(NI32)(i + 2)]) == (NU8)(110));
				LA26: ;
				if (!LOC25) goto LA27;
				{
					if (!!((((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(97)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(122)) || ((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(90)) || ((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(48)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(57)) || ((NU8)(s->data[(NI32)(i + 3)])) == ((NU8)(95))))) goto LA31;
					(*number) = NAN;
					result = (NI32)((NI32)(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[(NI32)(i + 1)]) == (NU8)(78));
			if (LOC41) goto LA42;
			LOC41 = ((NU8)(s->data[(NI32)(i + 1)]) == (NU8)(110));
			LA42: ;
			if (!LOC41) goto LA43;
			{
				NIM_BOOL LOC47;
				LOC47 = 0;
				LOC47 = ((NU8)(s->data[(NI32)(i + 2)]) == (NU8)(70));
				if (LOC47) goto LA48;
				LOC47 = ((NU8)(s->data[(NI32)(i + 2)]) == (NU8)(102));
				LA48: ;
				if (!LOC47) goto LA49;
				{
					if (!!((((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(97)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(122)) || ((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(65)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(90)) || ((NU8)(s->data[(NI32)(i + 3)])) >= ((NU8)(48)) && ((NU8)(s->data[(NI32)(i + 3)])) <= ((NU8)(57)) || ((NU8)(s->data[(NI32)(i + 3)])) == ((NU8)(95))))) goto LA53;
					(*number) = ((NF)(INF) * (NF)(sign));
					result = (NI32)((NI32)(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_76061();
			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 = (NI32)(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, TMP1073)(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(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) ((NI32)((((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_76526;
		NI HEX3Atmp_76544;
		NI res_76547;
		j_76526 = 0;
		HEX3Atmp_76544 = 0;
		HEX3Atmp_76544 = (NI32)((NI32)(i / 2) - 1);
		res_76547 = 0;
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_76547 <= HEX3Atmp_76544)) goto LA13;
				j_76526 = res_76547;
				LOC14 = 0;
				LOC14 = result->data[j_76526];
				result->data[j_76526] = result->data[(NI32)((NI32)(i - j_76526) - 1)];
				result->data[(NI32)((NI32)(i - j_76526) - 1)] = LOC14;
				res_76547 += 1;
			} LA13: ;
		}
	}
	return result;
}

N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF f) {
	NimStringDesc* result;
	TY76004 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_76020;
		NI HEX3Atmp_76038;
		NI res_76041;
		i_76020 = 0;
		HEX3Atmp_76038 = 0;
		HEX3Atmp_76038 = (NI32)(n - 1);
		res_76041 = 0;
		{
			while (1) {
				if (!(res_76041 <= HEX3Atmp_76038)) goto LA4;
				i_76020 = res_76041;
				{
					if (!((NU8)(buf[(i_76020)- 0]) == (NU8)(44))) goto LA7;
					buf[(i_76020)- 0] = 46;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA7: ;
				{
					if (!(((NU8)(buf[(i_76020)- 0])) >= ((NU8)(97)) && ((NU8)(buf[(i_76020)- 0])) <= ((NU8)(122)) || ((NU8)(buf[(i_76020)- 0])) >= ((NU8)(65)) && ((NU8)(buf[(i_76020)- 0])) <= ((NU8)(90)) || ((NU8)(buf[(i_76020)- 0])) == ((NU8)(46)))) goto LA10;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA10: ;
				LA5: ;
				res_76041 += 1;
			} LA4: ;
		}
	}
	{
		if (!!(hasdot)) goto LA14;
		buf[(n)- 0] = 46;
		buf[((NI32)(n + 1))- 0] = 48;
		buf[((NI32)(n + 2))- 0] = 0;
	}
	LA14: ;
	result = cstrToNimstr(((NCSTRING) (buf)));
	return result;
}

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

N_NIMCALL(NimStringDesc*, reprEnum)(NI e_81107, TNimType* typ) {
	NimStringDesc* result;
	NI e;
	NimStringDesc* LOC25;
	NimStringDesc* LOC26;
	result = 0;
	{
		if (!((*typ).size == 1)) goto LA3;
		e = ((NI) ((NI)(e_81107 & 255)));
	}
	goto LA1;
	LA3: ;
	{
		if (!((*typ).size == 2)) goto LA6;
		e = ((NI) ((NI)(e_81107 & 65535)));
	}
	goto LA1;
	LA6: ;
	{
		e = e_81107;
	}
	LA1: ;
	{
		if (!!((((*typ).flags &(1<<((((NU8) 2))&7)))!=0))) goto LA11;
		{
			if (!((NU32)(e) < (NU32)((*(*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_81149;
			NI HEX3Atmp_81151;
			NI res_81154;
			i_81149 = 0;
			HEX3Atmp_81151 = 0;
			HEX3Atmp_81151 = (NI32)((*n).len - 1);
			res_81154 = 0;
			{
				while (1) {
					if (!(res_81154 <= HEX3Atmp_81151)) goto LA20;
					i_81149 = res_81154;
					{
						if (!((*s[(i_81149)- 0]).offset == e)) goto LA23;
						result = cstrToNimstr((*s[(i_81149)- 0]).name);
						goto BeforeRet;
					}
					LA23: ;
					res_81154 += 1;
				} LA20: ;
			}
		}
	}
	LA9: ;
	LOC25 = 0;
	LOC26 = 0;
	LOC26 = nimIntToStr(e);
	LOC25 = rawNewString(LOC26->Sup.len + 16);
appendString(LOC25, LOC26);
appendString(LOC25, ((NimStringDesc*) &TMP1235));
	result = LOC25;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_611248)(TY225936* x_611254) {
	void* result;
	result = 0;
	result = ((void*) (x_611254));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_611232)(TY225936* x_611238, TY225936* y_611243) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_611248(x_611238);
		LOC4 = 0;
		LOC4 = seqtoptr_611248(y_611243);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_611248(x_611238);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_611248(y_611243);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_611238->Sup.len == y_611243->Sup.len)) goto LA15;
		{
			NI i_611337;
			NI HEX3Atmp_611339;
			NI res_611342;
			i_611337 = 0;
			HEX3Atmp_611339 = 0;
			HEX3Atmp_611339 = (NI32)(x_611238->Sup.len - 1);
			res_611342 = 0;
			{
				while (1) {
					if (!(res_611342 <= HEX3Atmp_611339)) goto LA19;
					i_611337 = res_611342;
					{
						if (!!((x_611238->data[i_611337] == y_611243->data[i_611337]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_611342 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_611216)(TY225936** x_611224, NI32 y_611228) {
	{
		NIM_BOOL LOC3;
		TY611372 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_611232((*x_611224), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_611224)), (TY225936*) newSeq((&NTI225936), 1));
		LOC6[0] = y_611228;
		(*x_611224)->data[0] = LOC6[0];
	}
	goto LA1;
	LA4: ;
	{
		(*x_611224) = (TY225936*) incrSeq(&((*x_611224))->Sup, sizeof(NI32));
		(*x_611224)->data[(*x_611224)->Sup.len-1] = y_611228;
	}
	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_75223;
		NI HEX3Atmp_75270;
		NI res_75273;
		i_75223 = 0;
		HEX3Atmp_75270 = 0;
		HEX3Atmp_75270 = (NI32)(s->Sup.len - 1);
		res_75273 = 0;
		{
			while (1) {
				if (!(res_75273 <= HEX3Atmp_75270)) goto LA3;
				i_75223 = res_75273;
				h = (NI)((NU32)(h) + (NU32)(((NI) (((NU8)(s->data[i_75223]))))));
				h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(10))));
				h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(6)));
				res_75273 += 1;
			} LA3: ;
		}
	}
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(3))));
	h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(11)));
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(15))));
	result = h;
	return result;
}

N_NIMCALL(void, write_13081)(FILE* f, NimStringDesc** a, NI aLen0) {
	{
		NimStringDesc* x_77683;
		NI i_77689;
		x_77683 = 0;
		i_77689 = 0;
		{
			while (1) {
				if (!(i_77689 < aLen0)) goto LA3;
				x_77683 = a[i_77689];
				write_13065(f, x_77683);
				i_77689 += 1;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, gcdisablemarkandsweep_8019)(void) {
	gch_47244.Cyclethreshold = 2147483646;
}
N_NIMCALL(void, TMP1563)(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(void, insert_86001)(NimStringDesc** x, NimStringDesc* item, NI i) {
	NI xl;
	NI j;
	xl = (*x)->Sup.len;
	(*x) = setLengthStr((*x), (NI32)(xl + item->Sup.len));
	j = (NI32)(xl - 1);
	{
		while (1) {
			if (!(i <= j)) goto LA2;
			(*x)->data[(NI32)(j + item->Sup.len)] = (*x)->data[j];
			j -= 1;
		} LA2: ;
	}
	j = 0;
	{
		while (1) {
			if (!(j < item->Sup.len)) goto LA4;
			(*x)->data[(NI32)(j + i)] = item->data[j];
			j += 1;
		} LA4: ;
	}
}
N_NIMCALL(void, TMP2173)(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_84957)(NimStringDesc* msg) {
	assertionerror3247* e_84962;
	NimStringDesc* LOC1;
	e_84962 = 0;
	e_84962 = (assertionerror3247*) newObj((&NTI85001), sizeof(assertionerror3247));
	(*e_84962).Sup.Sup.m_type = (&NTI3247);
	LOC1 = 0;
	LOC1 = (*e_84962).Sup.message; (*e_84962).Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_84962, "AssertionError");
}

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

N_NIMCALL(NI, rawfilesize_77719)(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_77728)(FILE* file, NI len) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(len);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = readbuffer_13227(file, ((void*) ((&result->data[0]))), len);
		if (!!((LOC3 == len))) goto LA4;
		raiseeio_77005(((NimStringDesc*) &TMP2617));
	}
	LA4: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readallfile_77739)(FILE* file) {
	NimStringDesc* result;
	NI len;
	result = 0;
	len = rawfilesize_77719(file);
	result = readallfile_77728(file, len);
	return result;
}

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

N_NIMCALL(NimStringDesc*, readfile_13042)(NimStringDesc* filename) {
	NimStringDesc* volatile result;
	FILE* f;
	TSafePoint TMP2616;
	result = 0;
	f = open_12817(filename, ((NU8) 0), -1);
	pushSafePoint(&TMP2616);
	TMP2616.status = _setjmp(TMP2616.context);
	if (TMP2616.status == 0) {
		result = readallfile_77739(f);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2616.status != 0) reraiseException();
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_151641)(TY268081 x_151645, TY268081 y_151647) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_151645.Field0 == y_151647.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_151645.Field1 == y_151647.Field1))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_273513)(ttypeseq225848* x_273519) {
	void* result;
	result = 0;
	result = ((void*) (x_273519));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_273497)(ttypeseq225848* x_273503, ttypeseq225848* y_273508) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_273513(x_273503);
		LOC4 = 0;
		LOC4 = seqtoptr_273513(y_273508);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_273513(x_273503);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_273513(y_273508);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_273503->Sup.len == y_273508->Sup.len)) goto LA15;
		{
			NI i_273602;
			NI HEX3Atmp_273620;
			NI res_273623;
			i_273602 = 0;
			HEX3Atmp_273620 = 0;
			HEX3Atmp_273620 = (NI32)(x_273503->Sup.len - 1);
			res_273623 = 0;
			{
				while (1) {
					if (!(res_273623 <= HEX3Atmp_273620)) goto LA19;
					i_273602 = res_273623;
					{
						if (!!((x_273503->data[i_273602] == y_273508->data[i_273602]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_273623 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_317709)(ttypeseq225848** x_317717, ttype225852* y_317721) {
	{
		NIM_BOOL LOC3;
		TY411748 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_273497((*x_317717), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_317717)), (ttypeseq225848*) newSeq((&NTI225848), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_317721;
		asgnRefNoCycle((void**) (&(*x_317717)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_317717) = (ttypeseq225848*) incrSeq(&((*x_317717))->Sup, sizeof(ttype225852*));
		asgnRefNoCycle((void**) (&(*x_317717)->data[(*x_317717)->Sup.len-1]), y_317721);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_418648)(TY418481* x_418654) {
	void* result;
	result = 0;
	result = ((void*) (x_418654));
	return result;
}

static N_INLINE(void*, seqtoptr_418774)(TY418485* x_418780) {
	void* result;
	result = 0;
	result = ((void*) (x_418780));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418865)(tentry418478 x_418869, tentry418478 y_418871) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_418869.Pos == y_418871.Pos))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_418869.Sym == y_418871.Sym))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418758)(TY418485* x_418764, TY418485* y_418769) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_418774(x_418764);
		LOC4 = 0;
		LOC4 = seqtoptr_418774(y_418769);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_418774(x_418764);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_418774(y_418769);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_418764->Sup.len == y_418769->Sup.len)) goto LA15;
		{
			NI i_418863;
			NI HEX3Atmp_418902;
			NI res_418905;
			i_418863 = 0;
			HEX3Atmp_418902 = 0;
			HEX3Atmp_418902 = (NI32)(x_418764->Sup.len - 1);
			res_418905 = 0;
			{
				while (1) {
					if (!(res_418905 <= HEX3Atmp_418902)) goto LA19;
					i_418863 = res_418905;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_418865(x_418764->data[i_418863], y_418769->data[i_418863]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_418905 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418739)(tlinemap418480 x_418743, tlinemap418480 y_418745) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_418758(x_418743.Entries, y_418745.Entries);
		if (!!(LOC3)) goto LA4;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA4: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_418632)(TY418481* x_418638, TY418481* y_418643) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_418648(x_418638);
		LOC4 = 0;
		LOC4 = seqtoptr_418648(y_418643);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_418648(x_418638);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_418648(y_418643);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_418638->Sup.len == y_418643->Sup.len)) goto LA15;
		{
			NI i_418737;
			NI HEX3Atmp_418923;
			NI res_418926;
			i_418737 = 0;
			HEX3Atmp_418923 = 0;
			HEX3Atmp_418923 = (NI32)(x_418638->Sup.len - 1);
			res_418926 = 0;
			{
				while (1) {
					if (!(res_418926 <= HEX3Atmp_418923)) goto LA19;
					i_418737 = res_418926;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_418739(x_418638->data[i_418737], y_418643->data[i_418737]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_418926 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, endoffile_13030)(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_13251)(FILE* f, NI64 pos) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = fseek(f, ((long) (pos)), 0);
		if (!!((LOC3 == 0))) goto LA4;
		raiseeio_77005(((NimStringDesc*) &TMP2711));
	}
	LA4: ;
}

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

N_NIMCALL(void, writefile_13045)(NimStringDesc* filename, NimStringDesc* content) {
	FILE* f;
	TSafePoint TMP2782;
	f = open_12817(filename, ((NU8) 1), -1);
	pushSafePoint(&TMP2782);
	TMP2782.status = _setjmp(TMP2782.context);
	if (TMP2782.status == 0) {
		write_13065(f, content);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2782.status != 0) reraiseException();
}

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

N_NIMCALL(NCSTRING*, alloccstringarray_13601)(NimStringDesc** a, NI aLen0) {
	NCSTRING* result;
	void* LOC1;
	NimStringDesc** x;
	result = 0;
	LOC1 = 0;
	LOC1 = alloc0_5817((NI32)((NI32)(aLen0 + 1) * 4));
	result = ((NCSTRING*) (LOC1));
	x = ((NimStringDesc**) (a));
	{
		NI i_13630;
		NI HEX3Atmp_13637;
		NI res_13640;
		i_13630 = 0;
		HEX3Atmp_13637 = 0;
		HEX3Atmp_13637 = (aLen0-1);
		res_13640 = 0;
		{
			while (1) {
				void* LOC5;
				if (!(res_13640 <= HEX3Atmp_13637)) goto LA4;
				i_13630 = res_13640;
				LOC5 = 0;
				LOC5 = alloc0_5817((NI32)(x[(i_13630)- 0]->Sup.len + 1));
				result[(i_13630)- 0] = ((NCSTRING) (LOC5));
				memcpy(((void*) (result[(i_13630)- 0])), ((void*) ((&x[(i_13630)- 0]->data[0]))), x[(i_13630)- 0]->Sup.len);
				res_13640 += 1;
			} LA4: ;
		}
	}
	return result;
}

N_NIMCALL(void, dealloccstringarray_13654)(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_12811)(FILE** f, int filehandle, NU8 mode) {
	NIM_BOOL result;
	result = 0;
	(*f) = fdopen(filehandle, formatopen_78210[(mode)- 0]->data);
	result = !(((*f) == NIM_NIL));
	return result;
}

N_NIMCALL(NimStringDesc*, HEX24_6201)(NU64 x) {
	NimStringDesc* result;
	TY81035 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(tinstantiation225836*, new_490941)(void) {
	tinstantiation225836* result;
	result = 0;
	result = (tinstantiation225836*) newObj((&NTI225838), sizeof(tinstantiation225836));
	return result;
}

static N_INLINE(void*, seqtoptr_229354)(TY225947* x_229360) {
	void* result;
	result = 0;
	result = ((void*) (x_229360));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_229338)(TY225947* x_229344, TY225947* y_229349) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_229354(x_229344);
		LOC4 = 0;
		LOC4 = seqtoptr_229354(y_229349);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_229354(x_229344);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_229354(y_229349);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_229344->Sup.len == y_229349->Sup.len)) goto LA15;
		{
			NI i_229443;
			NI HEX3Atmp_229461;
			NI res_229464;
			i_229443 = 0;
			HEX3Atmp_229461 = 0;
			HEX3Atmp_229461 = (NI32)(x_229344->Sup.len - 1);
			res_229464 = 0;
			{
				while (1) {
					if (!(res_229464 <= HEX3Atmp_229461)) goto LA19;
					i_229443 = res_229464;
					{
						if (!!((x_229344->data[i_229443] == y_229349->data[i_229443]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_229464 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_491032)(TY225947** x_491040, tinstantiation225836* y_491044) {
	{
		NIM_BOOL LOC3;
		TY491078 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_229338((*x_491040), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_491040)), (TY225947*) newSeq((&NTI225947), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_491044;
		asgnRefNoCycle((void**) (&(*x_491040)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_491040) = (TY225947*) incrSeq(&((*x_491040))->Sup, sizeof(tinstantiation225836*));
		asgnRefNoCycle((void**) (&(*x_491040)->data[(*x_491040)->Sup.len-1]), y_491044);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_315683)(tnodeseq225810* x_315689) {
	void* result;
	result = 0;
	result = ((void*) (x_315689));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_315667)(tnodeseq225810* x_315673, tnodeseq225810* y_315678) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_315683(x_315673);
		LOC4 = 0;
		LOC4 = seqtoptr_315683(y_315678);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_315683(x_315673);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_315683(y_315678);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_315673->Sup.len == y_315678->Sup.len)) goto LA15;
		{
			NI i_315772;
			NI HEX3Atmp_315790;
			NI res_315793;
			i_315772 = 0;
			HEX3Atmp_315790 = 0;
			HEX3Atmp_315790 = (NI32)(x_315673->Sup.len - 1);
			res_315793 = 0;
			{
				while (1) {
					if (!(res_315793 <= HEX3Atmp_315790)) goto LA19;
					i_315772 = res_315793;
					{
						if (!!((x_315673->data[i_315772] == y_315678->data[i_315772]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_315793 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_491915)(tnodeseq225810** x_491923, tnode225816* y_491927) {
	{
		NIM_BOOL LOC3;
		TY246892 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_315667((*x_491923), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_491923)), (tnodeseq225810*) newSeq((&NTI225810), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_491927;
		asgnRefNoCycle((void**) (&(*x_491923)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_491923) = (tnodeseq225810*) incrSeq(&((*x_491923))->Sup, sizeof(tnode225816*));
		asgnRefNoCycle((void**) (&(*x_491923)->data[(*x_491923)->Sup.len-1]), y_491927);
	}
	LA1: ;
}

N_NIMCALL(void, insert_492119)(tnodeseq225810** x_492127, tnode225816* item_492131, NI i_492133) {
	NI xl;
	NI j;
	xl = (*x_492127)->Sup.len;
	(*x_492127) = (tnodeseq225810*) setLengthSeq(&((*x_492127))->Sup, sizeof(tnode225816*), (NI32)(xl + 1));
	j = (NI32)(xl - 1);
	{
		while (1) {
			if (!(i_492133 <= j)) goto LA2;
			asgnRefNoCycle((void**) (&(*x_492127)->data[(NI32)(j + 1)]), (*x_492127)->data[j]);
			j -= 1;
		} LA2: ;
	}
	asgnRefNoCycle((void**) (&(*x_492127)->data[i_492133]), item_492131);
}

N_NIMCALL(tnodeseq225810*, HEX5BHEX5D_516155)(tnodeseq225810* s_516161, slice84375 x_516166) {
	tnodeseq225810* result;
	NI a;
	NI l;
	NI LOC6;
	result = 0;
	{
		if (!(0 <= x_516166.A)) goto LA3;
		a = x_516166.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI32)(s_516161->Sup.len + x_516166.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_516166.B)) goto LA9;
		LOC6 = x_516166.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI32)(s_516161->Sup.len + x_516166.B);
	}
	LA7: ;
	l = (NI32)((NI32)(LOC6 - a) + 1);
	result = (tnodeseq225810*) newSeq((&NTI225810), l);
	{
		NI i_516231;
		NI HEX3Atmp_516233;
		NI res_516236;
		i_516231 = 0;
		HEX3Atmp_516233 = 0;
		HEX3Atmp_516233 = (l - 1);
		res_516236 = 0;
		{
			while (1) {
				if (!(res_516236 <= HEX3Atmp_516233)) goto LA14;
				i_516231 = res_516236;
				asgnRefNoCycle((void**) (&result->data[i_516231]), s_516161->data[(NI32)(i_516231 + a)]);
				res_516236 += 1;
			} LA14: ;
		}
	}
	return result;
}

static N_INLINE(void*, seqtoptr_491417)(tsymseq225818* x_491423) {
	void* result;
	result = 0;
	result = ((void*) (x_491423));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_491401)(tsymseq225818* x_491407, tsymseq225818* y_491412) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_491417(x_491407);
		LOC4 = 0;
		LOC4 = seqtoptr_491417(y_491412);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_491417(x_491407);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_491417(y_491412);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_491407->Sup.len == y_491412->Sup.len)) goto LA15;
		{
			NI i_491506;
			NI HEX3Atmp_491524;
			NI res_491527;
			i_491506 = 0;
			HEX3Atmp_491524 = 0;
			HEX3Atmp_491524 = (NI32)(x_491407->Sup.len - 1);
			res_491527 = 0;
			{
				while (1) {
					if (!(res_491527 <= HEX3Atmp_491524)) goto LA19;
					i_491506 = res_491527;
					{
						if (!!((x_491407->data[i_491506] == y_491412->data[i_491506]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_491527 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_491544)(tsymseq225818** x_491552, tsym225846* y_491556) {
	{
		NIM_BOOL LOC3;
		TY290499 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_491401((*x_491552), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x_491552)), (tsymseq225818*) newSeq((&NTI225818), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_491556;
		asgnRefNoCycle((void**) (&(*x_491552)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_491552) = (tsymseq225818*) incrSeq(&((*x_491552))->Sup, sizeof(tsym225846*));
		asgnRefNoCycle((void**) (&(*x_491552)->data[(*x_491552)->Sup.len-1]), y_491556);
	}
	LA1: ;
}

N_NIMCALL(void, delete_492248)(tnodeseq225810** x_492256, NI i_492260) {
	NI xl;
	xl = (*x_492256)->Sup.len;
	{
		NI j_492283;
		NI HEX3Atmp_492301;
		NI res_492304;
		j_492283 = 0;
		HEX3Atmp_492301 = 0;
		HEX3Atmp_492301 = (NI32)(xl - 2);
		res_492304 = i_492260;
		{
			while (1) {
				if (!(res_492304 <= HEX3Atmp_492301)) goto LA3;
				j_492283 = res_492304;
				asgnRefNoCycle((void**) (&(*x_492256)->data[j_492283]), (*x_492256)->data[(NI32)(j_492283 + 1)]);
				res_492304 += 1;
			} LA3: ;
		}
	}
	(*x_492256) = (tnodeseq225810*) setLengthSeq(&((*x_492256))->Sup, sizeof(tnode225816*), (NI32)(xl - 1));
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_492447)(tnodeseq225810** s_492455, slice84375 x_492461, tnode225816** b_492466, NI b_492466Len0) {
	NI a;
	NI l;
	NI LOC6;
	{
		if (!(0 <= x_492461.A)) goto LA3;
		a = x_492461.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI32)((*s_492455)->Sup.len + x_492461.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_492461.B)) goto LA9;
		LOC6 = x_492461.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI32)((*s_492455)->Sup.len + x_492461.B);
	}
	LA7: ;
	l = (NI32)((NI32)(LOC6 - a) + 1);
	{
		if (!(l == b_492466Len0)) goto LA14;
		{
			NI i_492532;
			NI HEX3Atmp_492654;
			NI res_492657;
			i_492532 = 0;
			HEX3Atmp_492654 = 0;
			HEX3Atmp_492654 = (l - 1);
			res_492657 = 0;
			{
				while (1) {
					if (!(res_492657 <= HEX3Atmp_492654)) goto LA18;
					i_492532 = res_492657;
					asgnRefNoCycle((void**) (&(*s_492455)->data[(NI32)(i_492532 + a)]), b_492466[i_492532]);
					res_492657 += 1;
				} LA18: ;
			}
		}
	}
	goto LA12;
	LA14: ;
	{
		NI slen_492469;
		NI shift_492471;
		NI newlen_492473;
		slen_492469 = (*s_492455)->Sup.len;
		shift_492471 = (NI32)(b_492466Len0 - l);
		newlen_492473 = (NI32)(slen_492469 + shift_492471);
		{
			if (!(0 < shift_492471)) goto LA22;
			(*s_492455) = (tnodeseq225810*) setLengthSeq(&((*s_492455))->Sup, sizeof(tnode225816*), newlen_492473);
			{
				NI i_492475;
				NI HEX3Atmp_492660;
				NI HEX3Atmp_492661;
				NI res_492664;
				i_492475 = 0;
				HEX3Atmp_492660 = 0;
				HEX3Atmp_492661 = 0;
				HEX3Atmp_492660 = (NI32)(newlen_492473 - 1);
				HEX3Atmp_492661 = (NI32)((NI32)(a + shift_492471) + 1);
				res_492664 = HEX3Atmp_492660;
				{
					while (1) {
						if (!(HEX3Atmp_492661 <= res_492664)) goto LA26;
						i_492475 = res_492664;
						asgnRefNoCycle((void**) (&(*s_492455)->data[i_492475]), (*s_492455)->data[(NI32)(i_492475 - shift_492471)]);
						res_492664 -= 1;
					} LA26: ;
				}
			}
		}
		goto LA20;
		LA22: ;
		{
			{
				NI i_492477;
				NI HEX3Atmp_492666;
				NI HEX3Atmp_492667;
				NI res_492670;
				i_492477 = 0;
				HEX3Atmp_492666 = 0;
				HEX3Atmp_492667 = 0;
				HEX3Atmp_492666 = (NI32)(a + b_492466Len0);
				HEX3Atmp_492667 = (NI32)((NI32)((*s_492455)->Sup.len - 1) + shift_492471);
				res_492670 = HEX3Atmp_492666;
				{
					while (1) {
						if (!(res_492670 <= HEX3Atmp_492667)) goto LA30;
						i_492477 = res_492670;
						asgnRefNoCycle((void**) (&(*s_492455)->data[i_492477]), (*s_492455)->data[(NI32)(i_492477 - shift_492471)]);
						res_492670 += 1;
					} LA30: ;
				}
			}
			(*s_492455) = (tnodeseq225810*) setLengthSeq(&((*s_492455))->Sup, sizeof(tnode225816*), newlen_492473);
		}
		LA20: ;
		{
			NI i_492479;
			NI HEX3Atmp_492673;
			NI res_492676;
			i_492479 = 0;
			HEX3Atmp_492673 = 0;
			HEX3Atmp_492673 = (b_492466Len0 - 1);
			res_492676 = 0;
			{
				while (1) {
					if (!(res_492676 <= HEX3Atmp_492673)) goto LA33;
					i_492479 = res_492676;
					asgnRefNoCycle((void**) (&(*s_492455)->data[(NI32)(i_492479 + a)]), b_492466[i_492479]);
					res_492676 += 1;
				} LA33: ;
			}
		}
	}
	LA12: ;
}

N_NIMCALL(tnodeseq225810*, newseq_539811)(NI len_539815) {
	tnodeseq225810* result;
	result = 0;
	result = (tnodeseq225810*) newSeq((&NTI225810), len_539815);
	return result;
}

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

static N_INLINE(void*, seqtoptr_337098)(TY336062* x_337104) {
	void* result;
	result = 0;
	result = ((void*) (x_337104));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_337082)(TY336062* x_337088, TY336062* y_337093) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_337098(x_337088);
		LOC4 = 0;
		LOC4 = seqtoptr_337098(y_337093);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_337098(x_337088);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_337098(y_337093);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_337088->Sup.len == y_337093->Sup.len)) goto LA15;
		{
			NI i_337187;
			NI HEX3Atmp_337190;
			NI res_337193;
			i_337187 = 0;
			HEX3Atmp_337190 = 0;
			HEX3Atmp_337190 = (NI32)(x_337088->Sup.len - 1);
			res_337193 = 0;
			{
				while (1) {
					if (!(res_337193 <= HEX3Atmp_337190)) goto LA19;
					i_337187 = res_337193;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_336893(x_337088->data[i_337187], y_337093->data[i_337187]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_337193 += 1;
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_337253)(TY336057* x_337259) {
	void* result;
	result = 0;
	result = ((void*) (x_337259));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_337344)(TY336611 x_337348, TY336611 y_337350) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!(eqStrings(x_337348.Field0, y_337350.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = HEX3DHEX3D_336893(x_337348.Field1, y_337350.Field1);
		if (!!(LOC7)) goto LA8;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA8: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_337237)(TY336057* x_337243, TY336057* y_337248) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_337253(x_337243);
		LOC4 = 0;
		LOC4 = seqtoptr_337253(y_337248);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_337253(x_337243);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_337253(y_337248);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!(x_337243->Sup.len == y_337248->Sup.len)) goto LA15;
		{
			NI i_337342;
			NI HEX3Atmp_337366;
			NI res_337369;
			i_337342 = 0;
			HEX3Atmp_337366 = 0;
			HEX3Atmp_337366 = (NI32)(x_337243->Sup.len - 1);
			res_337369 = 0;
			{
				while (1) {
					if (!(res_337369 <= HEX3Atmp_337366)) goto LA19;
					i_337342 = res_337369;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_337344(x_337243->data[i_337342], y_337248->data[i_337342]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_337369 += 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*) &TMP4774));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP4775));
	}
	LA1: ;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_361335)(tindexentry359264 x_361339, tindexentry359264 y_361341) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!(eqStrings(x_361339.Keyword, y_361341.Keyword))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(eqStrings(x_361339.Link, y_361341.Link))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!!(eqStrings(x_361339.Linktitle, y_361341.Linktitle))) goto LA11;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA11: ;
	{
		if (!!(eqStrings(x_361339.Linkdesc, y_361341.Linkdesc))) goto LA15;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA15: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NI, cmp_419107)(NI x_419111, NI y_419113) {
	NI result;
	result = 0;
	{
		if (!(x_419111 == y_419113)) goto LA3;
		result = 0;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(x_419111 < y_419113)) goto LA7;
		result = -1;
		goto BeforeRet;
	}
	LA7: ;
	result = 1;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readline_13086)(FILE* f) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(80);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = readline_13089(f, (&result));
		if (!!(LOC3)) goto LA4;
		raiseeio_77005(((NimStringDesc*) &TMP4856));
	}
	LA4: ;
	return result;
}
N_NIMCALL(void, TMP4867)(void* p, NI op) {
	TY191015* a;
	NI LOC1;
	a = (TY191015*)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_47244.Recgclock += 1;
}

static N_INLINE(void, gcenable_8003)(void) {
	{
		if (!(0 < gch_47244.Recgclock)) goto LA3;
		gch_47244.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_47244.Stat.Stackscans);
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_47244.Stat.Maxstackcells);
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_47244.Stat.Cyclecollections);
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_47244.Stat.Maxthreshold);
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_47244.Zct.Cap);
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_47244.Stat.Cycletablesize);
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_47244.Stat.Maxstacksize);
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_47244.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*) &TMP4876));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP4877));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP4878));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP4879));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP4880));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP4881));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP4882));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP4883));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP4884));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP4885));
appendString(LOC1, LOC13);
	result = LOC1;
	gcenable_8003();
	return result;
}
NIM_EXTERNC N_NOINLINE(void, systemInit)(void) {
	strdesc_9804.size = 4;
	strdesc_9804.kind = ((NU8) 28);
	strdesc_9804.flags = 2;
	initallocator_9401();
	initStackBottom();
	initgc_9201();
	registersignalhandler_20008();
}

NIM_EXTERNC N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP47[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);
TMP47[0] = &TMP0[2];
NTI8222.size = sizeof(Exception*);
NTI8222.kind = 22;
NTI8222.base = (&NTI3227);
NTI8222.marker = TMP48;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(Exception, parent);
TMP0[2].typ = (&NTI8222);
TMP0[2].name = "parent";
TMP47[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";
TMP47[2] = &TMP0[4];
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(Exception, message);
TMP0[4].typ = (&NTI149);
TMP0[4].name = "msg";
TMP47[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 = &TMP47[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];
NTI22401.size = sizeof(overflowerror3243*);
NTI22401.kind = 22;
NTI22401.base = (&NTI3243);
NTI22401.marker = TMP49;
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];
NTI21601.size = sizeof(valueerror3249*);
NTI21601.kind = 22;
NTI21601.base = (&NTI3249);
NTI21601.marker = TMP135;
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];
NTI77201.size = sizeof(ioerror3231*);
NTI77201.kind = 22;
NTI77201.base = (&NTI3231);
NTI77201.marker = TMP148;
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 = TMP827;
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;
NTI26620.size = sizeof(TY26620);
NTI26620.kind = 16;
NTI26620.base = (&NTI108);
NTI26620.flags = 3;
NTI75121.size = sizeof(NI);
NTI75121.kind = 20;
NTI75121.base = (&NTI108);
NTI75121.flags = 3;
NTI128.size = sizeof(NF);
NTI128.kind = 36;
NTI128.base = 0;
NTI128.flags = 3;
NTI12602.size = sizeof(void*);
NTI12602.kind = 18;
NTI12602.base = 0;
NTI12602.flags = 3;
TMP0[12].len = 0; TMP0[12].kind = 2;
NTI12602.node = &TMP0[12];
NTI12604.size = sizeof(FILE*);
NTI12604.kind = 21;
NTI12604.base = (&NTI12602);
NTI12604.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];
NTI18201.size = sizeof(reraiseerror3263*);
NTI18201.kind = 22;
NTI18201.base = (&NTI3263);
NTI18201.marker = TMP1040;
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];
NTI115012.size = sizeof(oserror3233*);
NTI115012.kind = 22;
NTI115012.base = (&NTI3233);
NTI115012.marker = TMP1073;
NTI3255.size = sizeof(indexerror3255);
NTI3255.kind = 17;
NTI3255.base = (&NTI3227);
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI3255.node = &TMP0[16];
NTI123817.size = sizeof(indexerror3255*);
NTI123817.kind = 22;
NTI123817.base = (&NTI3255);
NTI123817.marker = TMP1563;
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];
NTI85001.size = sizeof(assertionerror3247*);
NTI85001.kind = 22;
NTI85001.base = (&NTI3247);
NTI85001.marker = TMP2173;
NTI12608.size = sizeof(int);
NTI12608.kind = 34;
NTI12608.base = 0;
NTI12608.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;
NTI191015.size = sizeof(TY191015*);
NTI191015.kind = 24;
NTI191015.base = (&NTI182609);
NTI191015.flags = 2;
NTI191015.marker = TMP4867;
}

