/* Generated by Nimrod Compiler v0.9.5 */
/*   (c) 2014 Andreas Rumpf */
/* The generated code is subject to the original license. */
/* Compiled for: Linux, i386, gcc */
/* Command for C compiler:
   gcc -c  -w -O3 -fno-strict-aliasing  -I/build/nimrod/src/nimrod/lib -o compiler/nimcache/stdlib_system.o compiler/nimcache/stdlib_system.c */
#define NIM_INTBITS 32
#include "nimbase.h"

#include <errno.h>

#include <stdio.h>

#include <sys/mman.h>

#include <stdlib.h>

#include <setjmp.h>

#include <string.h>

#include <signal.h>

#include <dlfcn.h>
typedef struct E_Base E_Base;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tavlnode23408 tavlnode23408;
typedef struct tgcheap43016 tgcheap43016;
typedef struct tcellseq41106 tcellseq41106;
typedef struct tcell41090 tcell41090;
typedef struct tcellset41102 tcellset41102;
typedef struct tpagedesc41098 tpagedesc41098;
typedef struct tmemregion23410 tmemregion23410;
typedef struct tsmallchunk22638 tsmallchunk22638;
typedef struct tllchunk23404 tllchunk23404;
typedef struct tbigchunk22640 tbigchunk22640;
typedef struct tintset22615 tintset22615;
typedef struct ttrunk22611 ttrunk22611;
typedef struct tgcstat43014 tgcstat43014;
typedef struct tbasechunk22636 tbasechunk22636;
typedef struct tfreecell22628 tfreecell22628;
typedef struct TGenericSeq TGenericSeq;
typedef struct NimStringDesc NimStringDesc;
typedef struct TSafePoint TSafePoint;
typedef struct TNimObject TNimObject;
typedef struct EOverflow EOverflow;
typedef struct earithmetic2441 earithmetic2441;
typedef struct esynch2429 esynch2429;
typedef struct esystem2431 esystem2431;
typedef struct eoutofmemory2457 eoutofmemory2457;
typedef struct einvalidvalue2453 einvalidvalue2453;
typedef struct eio2433 eio2433;
typedef struct TY110805 TY110805;
typedef struct einvalidindex2459 einvalidindex2459;
typedef struct enoexceptiontoreraise2467 enoexceptiontoreraise2467;
typedef struct TY79484 TY79484;
typedef struct eos2435 eos2435;
typedef struct eoutofrange2463 eoutofrange2463;
typedef struct TY188922 TY188922;
typedef struct EAssertionFailed EAssertionFailed;
typedef struct TY227866 TY227866;
typedef struct ttypeseq188835 ttypeseq188835;
typedef struct ttype188837 ttype188837;
typedef struct TY360552 TY360552;
typedef struct tlinemap360551 tlinemap360551;
typedef struct TY360556 TY360556;
typedef struct tentry360549 tentry360549;
typedef struct tsym188833 tsym188833;
typedef struct tinstantiation188823 tinstantiation188823;
typedef struct TY188933 TY188933;
typedef struct tnodeseq188797 tnodeseq188797;
typedef struct tnode188803 tnode188803;
typedef struct tslice78892 tslice78892;
typedef struct EDivByZero EDivByZero;
typedef struct TY158815 TY158815;
typedef struct tsocketimpl150605 tsocketimpl150605;
typedef struct tidobj167013 tidobj167013;
typedef struct tloc188817 tloc188817;
typedef struct trope145007 trope145007;
typedef struct tscope188827 tscope188827;
typedef struct tstrtable188807 tstrtable188807;
typedef struct tsymseq188805 tsymseq188805;
typedef struct tident167019 tident167019;
typedef struct tlineinfo163527 tlineinfo163527;
typedef struct tlib188821 tlib188821;
typedef struct tlistentry118017 tlistentry118017;
typedef N_NIMCALL_PTR(NIM_BOOL, TY6815) (E_Base* e);
typedef N_NIMCALL_PTR(NIM_BOOL, TY6820) (E_Base* e);
typedef N_NIMCALL_PTR(void, TY6825) (void);
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
typedef tavlnode23408* TY23414[2];
struct  tavlnode23408  {
TY23414 Link;
NI Key;
NI Upperbound;
NI Level;
};
struct  tcellseq41106  {
NI Len;
NI Cap;
tcell41090** D;
};
struct  tcellset41102  {
NI Counter;
NI Max;
tpagedesc41098* Head;
tpagedesc41098** Data;
};
typedef tsmallchunk22638* TY23422[512];
typedef ttrunk22611* ttrunkbuckets22613[256];
struct  tintset22615  {
ttrunkbuckets22613 Data;
};
struct  tmemregion23410  {
NI Minlargeobj;
NI Maxlargeobj;
TY23422 Freesmallchunks;
tllchunk23404* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22640* Freechunkslist;
tintset22615 Chunkstarts;
tavlnode23408* Root;
tavlnode23408* Deleted;
tavlnode23408* Last;
tavlnode23408* Freeavlnodes;
};
struct  tgcstat43014  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43016  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41106 Zct;
tcellseq41106 Decstack;
tcellset41102 Cycleroots;
tcellseq41106 Tempstack;
NI Recgclock;
tmemregion23410 Region;
tgcstat43014 Stat;
};
struct  tbasechunk22636  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tsmallchunk22638  {
  tbasechunk22636 Sup;
tsmallchunk22638* Next;
tsmallchunk22638* Prev;
tfreecell22628* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tbigchunk22640  {
  tbasechunk22636 Sup;
tbigchunk22640* Next;
tbigchunk22640* Prev;
NI Align;
NF Data;
};
typedef NI TY22618[16];
struct  ttrunk22611  {
ttrunk22611* Next;
NI Key;
TY22618 Bits;
};
struct  tllchunk23404  {
NI Size;
NI Acc;
tllchunk23404* Next;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tfreecell22628  {
tfreecell22628* Next;
NI Zerofield;
};
typedef N_NIMCALL_PTR(void, TY12801) (NimStringDesc* msg);
typedef TFrame* TY13601[128];
struct  tcell41090  {
NI Refcount;
TNimType* Typ;
};
struct  tpagedesc41098  {
tpagedesc41098* Next;
NI Key;
TY22618 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  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  esynch2429  {
  E_Base Sup;
};
struct  earithmetic2441  {
  esynch2429 Sup;
};
struct  EOverflow  {
  earithmetic2441 Sup;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (E_Base* e, void* ClEnv);
void* ClEnv;
} TY11626;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY11626 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP51) (E_Base* e);
struct  esystem2431  {
  esynch2429 Sup;
};
struct  eoutofmemory2457  {
  esystem2431 Sup;
};
typedef NIM_CHAR TY14616[2001];
struct  einvalidvalue2453  {
  esynch2429 Sup;
};
struct  eio2433  {
  esystem2431 Sup;
};
typedef NimStringDesc* TY165002[1];
struct  einvalidindex2459  {
  esynch2429 Sup;
};
typedef NimStringDesc* TY73011[5];
struct  enoexceptiontoreraise2467  {
  esynch2429 Sup;
};
struct TY79484 {
NimStringDesc* Field0;
NI Field1;
};
struct  eos2435  {
  esystem2431 Sup;
NI32 Errorcode;
};
struct  eoutofrange2463  {
  esynch2429 Sup;
};
typedef NIM_CHAR TY71582[60];
typedef NI32 TY524333[1];
struct  EAssertionFailed  {
  esynch2429 Sup;
};
struct TY227866 {
NI Field0;
NI Field1;
};
typedef ttype188837* TY350968[1];
struct  tentry360549  {
NI Pos;
tsym188833* Sym;
};
struct  tlinemap360551  {
TY360556* Entries;
};
struct  tinstantiation188823  {
tsym188833* Sym;
ttypeseq188835* Concretetypes;
TY188922* Usedby;
};
typedef tinstantiation188823* TY419616[1];
typedef tnode188803* TY207692[1];
struct  tslice78892  {
NI A;
NI B;
};
struct  EDivByZero  {
  earithmetic2441 Sup;
};
struct  tidobj167013  {
  TNimObject Sup;
NI Id;
};
struct  tloc188817  {
NU8 K;
NU8 S;
NU8 Flags;
ttype188837* T;
trope145007* R;
trope145007* Heaproot;
NI A;
};
struct  ttype188837  {
  tidobj167013 Sup;
NU8 Kind;
NU8 Callconv;
NU32 Flags;
ttypeseq188835* Sons;
tnode188803* N;
tsym188833* Destructor;
tsym188833* Owner;
tsym188833* Sym;
NI64 Size;
NI Align;
tloc188817 Loc;
};
struct  tstrtable188807  {
NI Counter;
tsymseq188805* Data;
};
struct  tlineinfo163527  {
NI16 Line;
NI16 Col;
NI32 Fileindex;
};
struct  tsym188833  {
  tidobj167013 Sup;
NU8 Kind;
union {
struct {ttypeseq188835* Typeinstcache;
tscope188827* Typscope;
} S1;
struct {TY188933* Procinstcache;
tscope188827* Scope;
} S2;
struct {TY188933* Usedgenerics;
tstrtable188807 Tab;
} S3;
} kindU;
NU16 Magic;
ttype188837* Typ;
tident167019* Name;
tlineinfo163527 Info;
tsym188833* Owner;
NU32 Flags;
tnode188803* Ast;
NU32 Options;
NI Position;
NI Offset;
tloc188817 Loc;
tlib188821* Annex;
tnode188803* Constraint;
};
struct  tnode188803  {
ttype188837* Typ;
tlineinfo163527 Info;
NU16 Flags;
NU8 Kind;
union {
struct {NI64 Intval;
} S1;
struct {NF Floatval;
} S2;
struct {NimStringDesc* Strval;
} S3;
struct {tsym188833* Sym;
} S4;
struct {tident167019* Ident;
} S5;
struct {tnodeseq188797* Sons;
} S6;
} kindU;
NimStringDesc* Comment;
};
typedef NIM_CHAR TY150630[4001];
struct  tsocketimpl150605  {
int Fd;
NIM_BOOL Isbuffered;
union {
struct {TY150630 Buffer;
NI Currpos;
NI Buflen;
} S1;
} isbufferedU;
NIM_BOOL Nonblocking;
};
struct  trope145007  {
  TNimObject Sup;
trope145007* Left;
trope145007* Right;
NI Length;
NimStringDesc* Data;
};
struct  tscope188827  {
NI Depthlevel;
tstrtable188807 Symbols;
tnodeseq188797* Usingsyms;
tscope188827* Parent;
};
struct  tident167019  {
  tidobj167013 Sup;
NimStringDesc* S;
tident167019* Next;
NI H;
};
struct  tlistentry118017  {
  TNimObject Sup;
tlistentry118017* Prev;
tlistentry118017* Next;
};
struct  tlib188821  {
  tlistentry118017 Sup;
NU8 Kind;
NIM_BOOL Generated;
NIM_BOOL Isoverriden;
trope145007* Name;
tnode188803* Path;
};
struct TY110805 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
struct TY188922 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct ttypeseq188835 {
  TGenericSeq Sup;
  ttype188837* data[SEQ_DECL_SIZE];
};
struct TY360556 {
  TGenericSeq Sup;
  tentry360549 data[SEQ_DECL_SIZE];
};
struct TY360552 {
  TGenericSeq Sup;
  tlinemap360551 data[SEQ_DECL_SIZE];
};
struct TY188933 {
  TGenericSeq Sup;
  tinstantiation188823* data[SEQ_DECL_SIZE];
};
struct tnodeseq188797 {
  TGenericSeq Sup;
  tnode188803* data[SEQ_DECL_SIZE];
};
struct TY158815 {
  TGenericSeq Sup;
  tsocketimpl150605* data[SEQ_DECL_SIZE];
};
struct tsymseq188805 {
  TGenericSeq Sup;
  tsym188833* data[SEQ_DECL_SIZE];
};
static N_INLINE(void, initallocator_7801)(void);
static N_INLINE(void, initStackBottom)(void);
N_NOINLINE(void, setStackBottom)(void* thestackbottom);
N_NIMCALL(void, initgc_7601)(void);
N_NIMCALL(void, init_41194)(tcellseq41106* s, NI cap);
N_NOCONV(void*, alloc0_4616)(NI size);
N_NIMCALL(void*, alloc0_39817)(tmemregion23410* allocator, NI size);
N_NIMCALL(void*, alloc_39636)(tmemregion23410* allocator, NI size);
N_NIMCALL(void*, rawalloc_30504)(tmemregion23410* a, NI requestedsize);
static N_INLINE(NI, roundup_22668)(NI x, NI v);
N_NIMCALL(tsmallchunk22638*, getsmallchunk_30022)(tmemregion23410* a);
N_NIMCALL(tbigchunk22640*, getbigchunk_29218)(tmemregion23410* a, NI size);
static N_INLINE(void, listremove_27003)(tbigchunk22640** head_27009, tbigchunk22640* c_27012);
N_NIMCALL(void, splitchunk_29011)(tmemregion23410* a, tbigchunk22640* c, NI size);
static N_INLINE(void, updateprevsize_26080)(tmemregion23410* a, tbigchunk22640* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_26023)(tmemregion23410* a, void* p);
N_NIMCALL(NIM_BOOL, contains_24977)(tintset22615* s, NI key);
N_NIMCALL(ttrunk22611*, intsetget_24916)(tintset22615* t, NI key);
static N_INLINE(NI, pageindex_25240)(void* p);
N_NIMCALL(void, incl_25004)(tmemregion23410* a, tintset22615* s, NI key);
N_NIMCALL(ttrunk22611*, intsetput_24944)(tmemregion23410* a, tintset22615* t, NI key);
N_NIMCALL(void*, llalloc_23659)(tmemregion23410* a, NI size);
static N_INLINE(void*, osallocpages_22414)(NI size);
N_NOINLINE(void, raiseoutofmem_21859)(void);
static N_INLINE(void, inccurrmem_23603)(tmemregion23410* a, NI bytes);
static N_INLINE(NI, pageindex_25234)(tbasechunk22636* c);
static N_INLINE(void, listadd_28235)(tbigchunk22640** head_28241, tbigchunk22640* c_28244);
N_NIMCALL(tbigchunk22640*, requestoschunks_25254)(tmemregion23410* a, NI size);
static N_INLINE(void, listadd_31405)(tsmallchunk22638** head_31411, tsmallchunk22638* c_31414);
static N_INLINE(void, listremove_34203)(tsmallchunk22638** head_34209, tsmallchunk22638* c_34212);
N_NIMCALL(void, add_24588)(tmemregion23410* a, tavlnode23408** t, NI key, NI upperbound);
N_NIMCALL(tavlnode23408*, allocavlnode_23842)(tmemregion23410* a, NI key, NI upperbound);
N_NIMCALL(void, skew_24560)(tavlnode23408** t);
N_NIMCALL(void, split_24566)(tavlnode23408** t);
N_NIMCALL(void, init_41211)(tcellset41102* s);
N_NOCONV(void, signalHandler)(int sig);
N_NIMCALL(void, showerrormessage_13007)(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_50602)(TNimType* typ, NI size, tgcheap43016* gch);
N_NIMCALL(void, collectct_44808)(tgcheap43016* gch);
static N_INLINE(NI, getoccupiedmem_41032)(tmemregion23410* a);
N_NIMCALL(void, collectctbody_67407)(tgcheap43016* gch);
N_NOINLINE(NI, stacksize_64808)(void);
static N_INLINE(void, prepareforinteriorpointerchecking_38478)(tmemregion23410* a);
N_NIMCALL(NI, lowgauge_24414)(tavlnode23408* n);
N_NIMCALL(NI, highgauge_24437)(tavlnode23408* n);
N_CDECL(void, markstackandregisters_65038)(tgcheap43016* gch);
static N_INLINE(void, gcmark_63416)(tgcheap43016* gch, void* p);
static N_INLINE(tcell41090*, usrtocell_44443)(void* usr);
N_NIMCALL(void*, interiorallocatedptr_38483)(tmemregion23410* a, void* p);
static N_INLINE(tbasechunk22636*, pageaddr_25246)(void* p);
static N_INLINE(NIM_BOOL, chunkunused_25158)(tbasechunk22636* c);
static N_INLINE(NIM_BOOL, issmallchunk_25149)(tbasechunk22636* c);
N_NIMCALL(tavlnode23408*, inrange_24501)(tavlnode23408* root, NI key);
static N_INLINE(void, add_41166)(tcellseq41106* s, tcell41090* c);
N_NOCONV(void*, alloc_4601)(NI size);
N_NOCONV(void, dealloc_4645)(void* p);
N_NIMCALL(void, dealloc_39824)(tmemregion23410* allocator, void* p);
N_NIMCALL(void, rawdealloc_36819)(tmemregion23410* a, void* p);
N_NIMCALL(void, freebigchunk_26204)(tmemregion23410* a, tbigchunk22640* c_26208);
N_NIMCALL(void, excl_25016)(tintset22615* s, NI key);
N_NIMCALL(void, freeoschunks_25808)(tmemregion23410* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_22421)(void* p, NI size);
static N_INLINE(void, deccurrmem_23625)(tmemregion23410* a, NI bytes);
N_NIMCALL(void, del_24802)(tmemregion23410* a, tavlnode23408** t, NI x);
static N_INLINE(void, deallocavlnode_24404)(tmemregion23410* a, tavlnode23408* n);
N_NIMCALL(void, markthreadstacks_64004)(tgcheap43016* gch);
N_NIMCALL(NIM_BOOL, collectzct_62808)(tgcheap43016* gch);
static N_INLINE(NIM_BOOL, canbecycleroot_44462)(tcell41090* c);
N_NIMCALL(void, excl_41884)(tcellset41102* s, tcell41090* cell);
N_NIMCALL(tpagedesc41098*, cellsetget_41251)(tcellset41102 t, NI key);
static N_INLINE(NI, nexttry_41245)(NI h, NI maxhash);
N_NIMCALL(void, preparedealloc_45008)(tcell41090* cell);
static N_INLINE(void*, celltousr_44424)(tcell41090* cell);
N_NIMCALL(void, forallchildren_44815)(tcell41090* cell, NU8 op);
N_NIMCALL(void, forallchildrenaux_44823)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, dooperation_44819)(void* p, NU8 op);
static N_INLINE(void, decref_46402)(tcell41090* c);
static N_INLINE(void, rtladdzct_46002)(tcell41090* c);
N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c);
static N_INLINE(void, rtladdcycleroot_45235)(tcell41090* c);
N_NOINLINE(void, incl_41855)(tcellset41102* s, tcell41090* cell);
N_NIMCALL(tpagedesc41098*, cellsetput_41646)(tcellset41102* t, NI key);
N_NIMCALL(void, cellsetenlarge_41604)(tcellset41102* t);
N_NIMCALL(void, cellsetrawinsert_41277)(tcellset41102 t, tpagedesc41098** data, tpagedesc41098* desc);
N_NIMCALL(void, markgray_60003)(tcell41090* s);
N_NIMCALL(void, scan_60402)(tcell41090* s);
N_NIMCALL(void, scanblack_60202)(tcell41090* s);
N_NIMCALL(void, collectwhite_60602)(tcell41090* s);
N_NIMCALL(NIM_BOOL, contains_41809)(tcellset41102 s, tcell41090* cell);
N_NIMCALL(void, freecycliccell_59217)(tgcheap43016* gch, tcell41090* c);
N_NIMCALL(void, forallslotsaux_49006)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_21608)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_21320)(void* aa, TNimNode* n);
N_NIMCALL(void, collectcycles_63021)(tgcheap43016* gch);
N_NIMCALL(void, markroots_60803)(tgcheap43016* gch);
N_NIMCALL(void, collectroots_63001)(tgcheap43016* gch);
N_NIMCALL(void, cellsetreset_49001)(tcellset41102* s);
N_NIMCALL(void, deinit_41220)(tcellset41102* s);
N_NIMCALL(NI, getoccupiedmem_5261)(void);
N_NIMCALL(NI, gettotalmem_5265)(void);
N_NIMCALL(NI, getfreemem_5263)(void);
N_NIMCALL(void, unmarkstackandregisters_67203)(tgcheap43016* gch);
static N_INLINE(void, addnewobjtozct_50078)(tcell41090* res, tgcheap43016* gch);
N_NIMCALL(void, writetostderr_13001)(NCSTRING msg);
N_NIMCALL(void, write_10475)(FILE* f, NCSTRING c);
N_NIMCALL(void, registersignalhandler_16403)(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)(E_Base* e, NCSTRING ename);
N_NIMCALL(void, raiseexceptionaux_14402)(E_Base* e);
static N_INLINE(void, pushCurrentException)(E_Base* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_46827)(tcell41090* c);
N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
static N_INLINE(void, quitordebug_14201)(void);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NOINLINE(NIM_BOOL, isonstack_44812)(void* p);
N_NIMCALL(void, TMP135)(void* p, NI op);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, genericresetaux_73801)(void* dest, TNimNode* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_70624, NI last);
static N_INLINE(NI, resize_70401)(NI old);
N_NIMCALL(void*, growobj_59210)(void* old, NI newsize);
N_NIMCALL(void*, growobj_56204)(void* old, NI newsize, tgcheap43016* gch);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
static N_INLINE(void, gcdisable_6602)(void);
N_NIMCALL(void, genericassignaux_73806)(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_73812)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
static N_INLINE(void, gcenable_6604)(void);
N_NIMCALL(NI, writebuffer_10646)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_72005)(NimStringDesc* msg);
N_NIMCALL(void, TMP148)(void* p, NI op);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_164476)(TY110805* x_164482, TY110805* y_164487);
static N_INLINE(void*, seqtoptr_164492)(TY110805* x_164498);
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, TMP819)(void* p, NI op);
N_NIMCALL(void, TMP1016)(void* p, NI op);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NIM_BOOL, open_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(void, TMP1138)(void* p, NI op);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, TMP1140)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(void, TMP1173)(void* p, NI op);
N_NIMCALL(void*, realloc_40805)(tmemregion23410* allocator, void* p, NI newsize);
N_NIMCALL(NI, ptrsize_39414)(void* p);
N_NIMCALL(void, objectinitaux_74678)(void* dest, TNimNode* n);
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_524207)(TY188922* x_524213, TY188922* y_524218);
static N_INLINE(void*, seqtoptr_524223)(TY188922* x_524229);
N_NIMCALL(void, write_10463)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, TMP2045)(void* p, NI op);
N_NIMCALL(FILE*, open_10217)(NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readallfile_72701)(FILE* file);
N_NIMCALL(NI, rawfilesize_72685)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_72692)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_10627)(FILE* f, void* buffer, NI len);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void*, seqtoptr_233280)(ttypeseq188835* x_233286);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_233264)(ttypeseq188835* x_233270, ttypeseq188835* y_233275);
static N_INLINE(void*, seqtoptr_360713)(TY360552* x_360719);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360802)(tlinemap360551 x_360806, tlinemap360551 y_360808);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360821)(TY360556* x_360827, TY360556* y_360832);
static N_INLINE(void*, seqtoptr_360837)(TY360556* x_360843);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360926)(tentry360549 x_360930, tentry360549 y_360932);
static N_INLINE(void*, seqtoptr_191908)(TY188933* x_191914);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_191892)(TY188933* x_191898, TY188933* y_191903);
static N_INLINE(void*, seqtoptr_272180)(tnodeseq188797* x_272186);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_272164)(tnodeseq188797* x_272170, tnodeseq188797* y_272175);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, TMP4543)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
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(TMP1133, "rb", 2);
STRING_LITERAL(TMP1134, "wb", 2);
STRING_LITERAL(TMP1135, "w+b", 3);
STRING_LITERAL(TMP1136, "r+b", 3);
STRING_LITERAL(TMP1137, "ab", 2);
NIM_CONST TY73011 formatopen_73010 = {((NimStringDesc*) &TMP1133),
((NimStringDesc*) &TMP1134),
((NimStringDesc*) &TMP1135),
((NimStringDesc*) &TMP1136),
((NimStringDesc*) &TMP1137)}
;
STRING_LITERAL(TMP1139, "cannot open: ", 13);
STRING_LITERAL(TMP1141, "no exception to reraise", 23);
STRING_LITERAL(TMP1142, "(", 1);
STRING_LITERAL(TMP1143, ", ", 2);
STRING_LITERAL(TMP1144, "filename", 8);
STRING_LITERAL(TMP1145, ": ", 2);
STRING_LITERAL(TMP1146, "line", 4);
STRING_LITERAL(TMP1147, ")", 1);
STRING_LITERAL(TMP1602, " (invalid data!)", 16);
STRING_LITERAL(TMP2481, "error while reading from file", 29);
STRING_LITERAL(TMP2653, "cannot set file position", 24);
STRING_LITERAL(TMP2654, "cannot retrieve file position", 29);
STRING_LITERAL(TMP4478, "true", 4);
STRING_LITERAL(TMP4479, "false", 5);
STRING_LITERAL(TMP4532, "EOF reached", 11);
STRING_LITERAL(TMP4552, "[GC] total memory: ", 19);
STRING_LITERAL(TMP4553, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP4554, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP4555, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP4556, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP4557, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP4558, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP4559, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP4560, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP4561, "\012[GC] max pause time [ms]: ", 27);
NI nim_program_result;
TY6815 globalraisehook_6819;
TY6820 localraisehook_6824;
TY6825 outofmemhook_6827;
TNimType strdesc_8005;
TY12801 errormessagewriter_12804;
TFrame* frameptr_13038;
TSafePoint* exchandler_13039;
E_Base* currexception_13041;
TY13601 tempframes_13604;
tavlnode23408 bottomdata_23438;
tavlnode23408* bottom_23439;
tgcheap43016 gch_43044;
TNimType NTI2409; /* TObject */
TNimType NTI106; /* int */
TNimType NTI143; /* string */
TNimType NTI2425; /* E_Base */
TNimType NTI6816; /* ref E_Base */
TNimType NTI145; /* cstring */
TNimType NTI2429; /* ESynch */
TNimType NTI2441; /* EArithmetic */
TNimType NTI2445; /* EOverflow */
TNimType NTI18401; /* ref EOverflow */
TNimType NTI2431; /* ESystem */
TNimType NTI2457; /* EOutOfMemory */
TNimType NTI112; /* int32 */
TNimType NTI2453; /* EInvalidValue */
TNimType NTI17801; /* ref EInvalidValue */
TNimType NTI110; /* int16 */
TNimType NTI2433; /* EIO */
TNimType NTI72201; /* ref EIO */
extern TNimType NTI110805; /* seq[string] */
TNimType NTI134; /* bool */
TNimType NTI4289; /* BiggestInt */
TNimType NTI4291; /* BiggestFloat */
TNimType NTI2411; /* PObject */
TNimType NTI147; /* pointer */
TNimType NTI4409; /* cint */
TNimType NTI22618; /* array[0..15, int] */
TNimType NTI70707; /* range 0..2147483647(int) */
TNimType NTI126; /* float */
TNimType NTI2459; /* EInvalidIndex */
TNimType NTI114213; /* ref EInvalidIndex */
TNimType NTI73201; /* ref EOutOfMemory */
TNimType NTI2467; /* ENoExceptionToReraise */
TNimType NTI15001; /* ref ENoExceptionToReraise */
TNimType NTI2435; /* EOS */
TNimType NTI106208; /* ref EOS */
TNimType NTI10002; /* CFile */
TNimType NTI10004; /* TFile */
TNimType NTI2463; /* EOutOfRange */
TNimType NTI108; /* int8 */
extern TNimType NTI188922; /* seq[int32] */
TNimType NTI122; /* uint32 */
TNimType NTI2449; /* EAssertionFailed */
TNimType NTI79601; /* ref EAssertionFailed */
extern TNimType NTI188835; /* TTypeSeq */
TNimType NTI10008; /* TFileHandle */
extern TNimType NTI188825; /* PInstantiation */
extern TNimType NTI188933; /* seq[PInstantiation] */
extern TNimType NTI188797; /* TNodeSeq */
TNimType NTI2443; /* EDivByZero */
TNimType NTI141; /* char */
extern TNimType NTI150607; /* TSocket */
TNimType NTI158815; /* seq[TSocket] */

static N_INLINE(void, initallocator_7801)(void) {
	bottom_23439 = &bottomdata_23438;
	(*bottom_23439).Link[(0)- 0] = bottom_23439;
	(*bottom_23439).Link[(1)- 0] = bottom_23439;
}

N_NOINLINE(void, setStackBottom)(void* thestackbottom) {
	{
		if (!(gch_43044.Stackbottom == NIM_NIL)) goto LA3;
		gch_43044.Stackbottom = thestackbottom;
	}
	goto LA1;
	LA3: ;
	{
		NI a;
		NI b;
		a = ((NI) (thestackbottom));
		b = ((NI) (gch_43044.Stackbottom));
		gch_43044.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_22668)(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_27003)(tbigchunk22640** head_27009, tbigchunk22640* c_27012) {
	{
		if (!(c_27012 == (*head_27009))) goto LA3;
		(*head_27009) = (*c_27012).Next;
		{
			if (!!(((*head_27009) == NIM_NIL))) goto LA7;
			(*(*head_27009)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_27012).Prev).Next = (*c_27012).Next;
		{
			if (!!(((*c_27012).Next == NIM_NIL))) goto LA12;
			(*(*c_27012).Next).Prev = (*c_27012).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_27012).Next = NIM_NIL;
	(*c_27012).Prev = NIM_NIL;
}

N_NIMCALL(ttrunk22611*, intsetget_24916)(tintset22615* t, NI key) {
	ttrunk22611* result;
	ttrunk22611* it;
	result = 0;
	it = (*t).Data[((NI)(key & 255))- 0];
	while (1) {
		if (!!((it == NIM_NIL))) goto LA1;
		{
			if (!((*it).Key == key)) goto LA4;
			result = it;
			goto BeforeRet;
		}
		LA4: ;
		it = (*it).Next;
	} LA1: ;
	result = NIM_NIL;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, contains_24977)(tintset22615* s, NI key) {
	NIM_BOOL result;
	ttrunk22611* t;
	result = 0;
	t = intsetget_24916(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_25240)(void* p) {
	NI result;
	result = 0;
	result = (NI)((NU32)(((NI) (p))) >> (NU32)(12));
	return result;
}

static N_INLINE(NIM_BOOL, isaccessible_26023)(tmemregion23410* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = pageindex_25240(p);
	result = contains_24977(&(*a).Chunkstarts, LOC1);
	return result;
}

static N_INLINE(void, updateprevsize_26080)(tmemregion23410* a, tbigchunk22640* c, NI prevsize) {
	tbasechunk22636* ri;
	ri = ((tbasechunk22636*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_26023(&(*a), ((void*) (ri)));
		if (!LOC3) goto LA4;
		(*ri).Prevsize = prevsize;
	}
	LA4: ;
}

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

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

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

N_NIMCALL(void*, llalloc_23659)(tmemregion23410* a, NI size) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tllchunk23404* 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_22414(4096);
		(*a).Llmem = ((tllchunk23404*) (LOC7));
		inccurrmem_23603(a, 4096);
		(*(*a).Llmem).Size = (NI32)(4096 - ((NI)sizeof(tllchunk23404)));
		(*(*a).Llmem).Acc = ((NI)sizeof(tllchunk23404));
		(*(*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(ttrunk22611*, intsetput_24944)(tmemregion23410* a, tintset22615* t, NI key) {
	ttrunk22611* result;
	result = 0;
	result = intsetget_24916(&(*t), key);
	{
		void* LOC5;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = llalloc_23659(a, ((NI)sizeof(ttrunk22611)));
		result = ((ttrunk22611*) (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_25004)(tmemregion23410* a, tintset22615* s, NI key) {
	ttrunk22611* t;
	NI u;
	t = intsetput_24944(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_25234)(tbasechunk22636* c) {
	NI result;
	result = 0;
	result = (NI)((NU32)(((NI) (c))) >> (NU32)(12));
	return result;
}

static N_INLINE(void, listadd_28235)(tbigchunk22640** head_28241, tbigchunk22640* c_28244) {
	(*c_28244).Next = (*head_28241);
	{
		if (!!(((*head_28241) == NIM_NIL))) goto LA3;
		(*(*head_28241)).Prev = c_28244;
	}
	LA3: ;
	(*head_28241) = c_28244;
}

N_NIMCALL(void, splitchunk_29011)(tmemregion23410* a, tbigchunk22640* c, NI size) {
	tbigchunk22640* rest;
	NI LOC1;
	rest = ((tbigchunk22640*) ((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_26080(a, c, (*rest).Sup.Size);
	(*c).Sup.Size = size;
	LOC1 = 0;
	LOC1 = pageindex_25234(&rest->Sup);
	incl_25004(a, &(*a).Chunkstarts, LOC1);
	listadd_28235(&(*a).Freechunkslist, rest);
}

N_NIMCALL(tbigchunk22640*, requestoschunks_25254)(tmemregion23410* a, NI size) {
	tbigchunk22640* result;
	void* LOC1;
	NI nxt;
	tbasechunk22636* next;
	NI lastsize;
	NI prv;
	tbasechunk22636* prev;
	result = 0;
	inccurrmem_23603(a, size);
	(*a).Freemem += size;
	LOC1 = 0;
	LOC1 = osallocpages_22414(size);
	result = ((tbigchunk22640*) (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 = ((tbasechunk22636*) (nxt));
	{
		NI LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC4 = pageindex_25234(next);
		LOC5 = 0;
		LOC5 = contains_24977(&(*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 = ((tbasechunk22636*) (prv));
	{
		NIM_BOOL LOC15;
		NI LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = pageindex_25234(prev);
		LOC15 = contains_24977(&(*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(tbigchunk22640*, getbigchunk_29218)(tmemregion23410* a, NI size) {
	tbigchunk22640* result;
	NI LOC15;
	result = 0;
	result = (*a).Freechunkslist;
	{
		while (1) {
			if (!!((result == NIM_NIL))) goto LA2;
			{
				if (!((*result).Sup.Size == size)) goto LA5;
				listremove_27003(&(*a).Freechunkslist, result);
				goto LA1;
			}
			goto LA3;
			LA5: ;
			{
				if (!(size < (*result).Sup.Size)) goto LA8;
				listremove_27003(&(*a).Freechunkslist, result);
				splitchunk_29011(a, result, size);
				goto LA1;
			}
			goto LA3;
			LA8: ;
			LA3: ;
			result = (*result).Next;
		} LA2: ;
		{
			if (!(size < 524288)) goto LA12;
			result = requestoschunks_25254(a, 524288);
			splitchunk_29011(a, result, size);
		}
		goto LA10;
		LA12: ;
		{
			result = requestoschunks_25254(a, size);
		}
		LA10: ;
	} LA1: ;
	(*result).Sup.Prevsize = 0;
	(*result).Sup.Used = NIM_TRUE;
	LOC15 = 0;
	LOC15 = pageindex_25234(&result->Sup);
	incl_25004(a, &(*a).Chunkstarts, LOC15);
	(*a).Freemem -= size;
	return result;
}

N_NIMCALL(tsmallchunk22638*, getsmallchunk_30022)(tmemregion23410* a) {
	tsmallchunk22638* result;
	tbigchunk22640* res;
	result = 0;
	res = getbigchunk_29218(a, 4096);
	result = ((tsmallchunk22638*) (res));
	return result;
}

static N_INLINE(void, listadd_31405)(tsmallchunk22638** head_31411, tsmallchunk22638* c_31414) {
	(*c_31414).Next = (*head_31411);
	{
		if (!!(((*head_31411) == NIM_NIL))) goto LA3;
		(*(*head_31411)).Prev = c_31414;
	}
	LA3: ;
	(*head_31411) = c_31414;
}

static N_INLINE(void, listremove_34203)(tsmallchunk22638** head_34209, tsmallchunk22638* c_34212) {
	{
		if (!(c_34212 == (*head_34209))) goto LA3;
		(*head_34209) = (*c_34212).Next;
		{
			if (!!(((*head_34209) == NIM_NIL))) goto LA7;
			(*(*head_34209)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c_34212).Prev).Next = (*c_34212).Next;
		{
			if (!!(((*c_34212).Next == NIM_NIL))) goto LA12;
			(*(*c_34212).Next).Prev = (*c_34212).Prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c_34212).Next = NIM_NIL;
	(*c_34212).Prev = NIM_NIL;
}

N_NIMCALL(tavlnode23408*, allocavlnode_23842)(tmemregion23410* a, NI key, NI upperbound) {
	tavlnode23408* 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_23659(a, ((NI)sizeof(tavlnode23408)));
		result = ((tavlnode23408*) (LOC6));
	}
	LA1: ;
	(*result).Key = key;
	(*result).Upperbound = upperbound;
	(*result).Link[(0)- 0] = bottom_23439;
	(*result).Link[(1)- 0] = bottom_23439;
	(*result).Level = 1;
	return result;
}

N_NIMCALL(void, skew_24560)(tavlnode23408** t) {
	{
		tavlnode23408* 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_24566)(tavlnode23408** t) {
	{
		tavlnode23408* 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_24588)(tmemregion23410* a, tavlnode23408** t, NI key, NI upperbound) {
	{
		if (!((*t) == bottom_23439)) goto LA3;
		(*t) = allocavlnode_23842(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!((NU32)(key) < (NU32)((*(*t)).Key))) goto LA8;
			add_24588(a, &(*(*t)).Link[(0)- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			if (!((NU32)((*(*t)).Key) < (NU32)(key))) goto LA11;
			add_24588(a, &(*(*t)).Link[(1)- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		skew_24560(t);
		split_24566(t);
	}
	LA1: ;
}

N_NIMCALL(void*, rawalloc_30504)(tmemregion23410* a, NI requestedsize) {
	void* result;
	NI size;
	result = 0;
	size = roundup_22668(requestedsize, 8);
	{
		NI s;
		tsmallchunk22638* c;
		if (!(size <= (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22638)) - 8)))) goto LA3;
		s = (NI32)(size / 8);
		c = (*a).Freesmallchunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7;
			c = getsmallchunk_30022(a);
			(*c).Freelist = NIM_NIL;
			(*c).Sup.Size = size;
			(*c).Acc = size;
			(*c).Free = (NI32)((NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22638)) - 8)) - size);
			(*c).Next = NIM_NIL;
			(*c).Prev = NIM_NIL;
			listadd_31405(&(*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_34203(&(*a).Freesmallchunks[(s)- 0], c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		tbigchunk22640* c;
		size = roundup_22668((NI32)(requestedsize + (NI32)(((NI)sizeof(tbigchunk22640)) - 8)), 4096);
		c = getbigchunk_29218(a, size);
		result = ((void*) (&(*c).Data));
		{
			if (!((*a).Root == NIM_NIL)) goto LA22;
			(*a).Root = bottom_23439;
		}
		LA22: ;
		add_24588(a, &(*a).Root, ((NI) (result)), (NI)((NU32)(((NI) (result))) + (NU32)(size)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, alloc_39636)(tmemregion23410* allocator, NI size) {
	void* result;
	result = 0;
	result = rawalloc_30504(allocator, (NI32)(size + ((NI)sizeof(tfreecell22628))));
	(*((tfreecell22628*) (result))).Zerofield = 1;
	result = ((void*) ((NI)((NU32)(((NI) (result))) + (NU32)(((NI)sizeof(tfreecell22628))))));
	return result;
}

N_NIMCALL(void*, alloc0_39817)(tmemregion23410* allocator, NI size) {
	void* result;
	result = 0;
	result = alloc_39636(allocator, size);
	zeroMem(result, size);
	return result;
}

N_NOCONV(void*, alloc0_4616)(NI size) {
	void* result;
	result = 0;
	result = alloc0_39817(&gch_43044.Region, size);
	return result;
}

N_NIMCALL(void, init_41194)(tcellseq41106* s, NI cap) {
	void* LOC1;
	(*s).Len = 0;
	(*s).Cap = cap;
	LOC1 = 0;
	LOC1 = alloc0_4616((NI32)(cap * 4));
	(*s).D = ((tcell41090**) (LOC1));
}

N_NIMCALL(void, init_41211)(tcellset41102* s) {
	void* LOC1;
	LOC1 = 0;
	LOC1 = alloc0_4616(4096);
	(*s).Data = ((tpagedesc41098**) (LOC1));
	(*s).Max = 1023;
	(*s).Counter = 0;
	(*s).Head = NIM_NIL;
}

N_NIMCALL(void, initgc_7601)(void) {
	gch_43044.Cyclethreshold = 4194304;
	gch_43044.Stat.Stackscans = 0;
	gch_43044.Stat.Cyclecollections = 0;
	gch_43044.Stat.Maxthreshold = 0;
	gch_43044.Stat.Maxstacksize = 0;
	gch_43044.Stat.Maxstackcells = 0;
	gch_43044.Stat.Cycletablesize = 0;
	init_41194(&gch_43044.Zct, 1024);
	init_41194(&gch_43044.Tempstack, 1024);
	init_41211(&gch_43044.Cycleroots);
	init_41194(&gch_43044.Decstack, 1024);
}

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

N_NOINLINE(NI, stacksize_64808)(void) {
	NI result;
	void* volatile stacktop;
	result = 0;
	stacktop = 0;
	result = (NI32)abs((NI32)(((NI) (&stacktop)) - ((NI) (gch_43044.Stackbottom))));
	return result;
}

N_NIMCALL(NI, lowgauge_24414)(tavlnode23408* n) {
	NI result;
	tavlnode23408* it;
	result = 0;
	it = n;
	while (1) {
		if (!!((it == bottom_23439))) goto LA1;
		result = (*it).Key;
		it = (*it).Link[(0)- 0];
	} LA1: ;
	return result;
}

N_NIMCALL(NI, highgauge_24437)(tavlnode23408* n) {
	NI result;
	tavlnode23408* it;
	result = 0;
	result = -1;
	it = n;
	while (1) {
		if (!!((it == bottom_23439))) goto LA1;
		result = (*it).Upperbound;
		it = (*it).Link[(1)- 0];
	} LA1: ;
	return result;
}

static N_INLINE(void, prepareforinteriorpointerchecking_38478)(tmemregion23410* a) {
	(*a).Minlargeobj = lowgauge_24414((*a).Root);
	(*a).Maxlargeobj = highgauge_24437((*a).Root);
}

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

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

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

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

N_NIMCALL(tavlnode23408*, inrange_24501)(tavlnode23408* root, NI key) {
	tavlnode23408* result;
	tavlnode23408* it;
	result = 0;
	it = root;
	while (1) {
		if (!!((it == bottom_23439))) goto LA1;
		{
			NIM_BOOL LOC4;
			LOC4 = 0;
			LOC4 = ((NU32)((*it).Key) <= (NU32)(key));
			if (!(LOC4)) goto LA5;
			LOC4 = ((NU32)(key) < (NU32)((*it).Upperbound));
			LA5: ;
			if (!LOC4) goto LA6;
			result = it;
			goto BeforeRet;
		}
		LA6: ;
		it = (*it).Link[(((NU32)((*it).Key) < (NU32)(key)))- 0];
	} LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void*, interiorallocatedptr_38483)(tmemregion23410* a, void* p) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		tbasechunk22636* c_38488;
		LOC3 = 0;
		LOC3 = isaccessible_26023(a, p);
		if (!LOC3) goto LA4;
		c_38488 = pageaddr_25246(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_25158(c_38488);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				tsmallchunk22638* c;
				NI offset;
				LOC13 = 0;
				LOC13 = issmallchunk_25149(c_38488);
				if (!LOC13) goto LA14;
				c = ((tsmallchunk22638*) (c_38488));
				offset = (NI)((NU32)((NI)(((NI) (p)) & 4095)) - (NU32)((NI32)(((NI)sizeof(tsmallchunk22638)) - 8)));
				{
					tfreecell22628* d;
					if (!((NU32)(offset) < (NU32)((*c).Acc))) goto LA18;
					d = ((tfreecell22628*) ((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: ;
			{
				tbigchunk22640* c;
				NF* d;
				c = ((tbigchunk22640*) (c_38488));
				d = &(*c).Data;
				{
					NIM_BOOL LOC27;
					LOC27 = 0;
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					LOC27 = ((NU32)(1) < (NU32)((*((tfreecell22628*) (d))).Zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL LOC34;
			tavlnode23408* 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_24501((*a).Root, q);
			{
				void* k;
				tbigchunk22640* c;
				tbasechunk22636* LOC42;
				if (!!((avlnode == NIM_NIL))) goto LA40;
				k = ((void*) ((*avlnode).Key));
				LOC42 = 0;
				LOC42 = pageaddr_25246(k);
				c = ((tbigchunk22640*) (LOC42));
				{
					if (!((NU32)(1) < (NU32)((*((tfreecell22628*) (k))).Zerofield))) goto LA45;
					result = k;
				}
				LA45: ;
			}
			LA40: ;
		}
		LA36: ;
	}
	LA1: ;
	return result;
}

N_NOCONV(void*, alloc_4601)(NI size) {
	void* result;
	result = 0;
	result = alloc_39636(&gch_43044.Region, size);
	return result;
}

N_NIMCALL(void, excl_25016)(tintset22615* s, NI key) {
	ttrunk22611* t;
	t = intsetget_24916(&(*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_22421)(void* p, NI size) {
	munmap(p, size);
}

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

N_NIMCALL(void, freeoschunks_25808)(tmemregion23410* a, void* p, NI size) {
	tbasechunk22636* c;
	NI nxt;
	tbasechunk22636* next;
	NI LOC7;
	c = ((tbasechunk22636*) (p));
	nxt = (NI)((NU32)(((NI) (p))) + (NU32)((*c).Size));
	next = ((tbasechunk22636*) (nxt));
	{
		NI LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC3 = pageindex_25234(next);
		LOC4 = 0;
		LOC4 = contains_24977(&(*a).Chunkstarts, LOC3);
		if (!LOC4) goto LA5;
		(*next).Prevsize = 0;
	}
	LA5: ;
	LOC7 = 0;
	LOC7 = pageindex_25240(p);
	excl_25016(&(*a).Chunkstarts, LOC7);
	osdeallocpages_22421(p, size);
	deccurrmem_23625(a, size);
	(*a).Freemem -= size;
}

N_NIMCALL(void, freebigchunk_26204)(tmemregion23410* a, tbigchunk22640* c_26208) {
	tbigchunk22640* c;
	tbasechunk22636* ri;
	c = c_26208;
	(*a).Freemem += (*c).Sup.Size;
	ri = ((tbasechunk22636*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_26023(&(*a), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		LOC3 = chunkunused_25158(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC12;
			LOC9 = 0;
			LOC9 = issmallchunk_25149(ri);
			if (!!(LOC9)) goto LA10;
			listremove_27003(&(*a).Freechunkslist, ((tbigchunk22640*) (ri)));
			(*c).Sup.Size += (*ri).Size;
			LOC12 = 0;
			LOC12 = pageindex_25234(ri);
			excl_25016(&(*a).Chunkstarts, LOC12);
		}
		LA10: ;
	}
	LA5: ;
	{
		tbasechunk22636* le;
		if (!!(((*c).Sup.Prevsize == 0))) goto LA15;
		le = ((tbasechunk22636*) ((NI)((NU32)(((NI) (c))) - (NU32)((*c).Sup.Prevsize))));
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = isaccessible_26023(&(*a), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			LOC19 = chunkunused_25158(le);
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				NI LOC28;
				LOC25 = 0;
				LOC25 = issmallchunk_25149(le);
				if (!!(LOC25)) goto LA26;
				listremove_27003(&(*a).Freechunkslist, ((tbigchunk22640*) (le)));
				(*le).Size += (*c).Sup.Size;
				LOC28 = 0;
				LOC28 = pageindex_25234(&c->Sup);
				excl_25016(&(*a).Chunkstarts, LOC28);
				c = ((tbigchunk22640*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	{
		NIM_BOOL LOC31;
		NI LOC35;
		LOC31 = 0;
		LOC31 = ((*c).Sup.Size < 1048576);
		if (LOC31) goto LA32;
		LOC31 = NIM_FALSE;
		LA32: ;
		if (!LOC31) goto LA33;
		LOC35 = 0;
		LOC35 = pageindex_25234(&c->Sup);
		incl_25004(a, &(*a).Chunkstarts, LOC35);
		updateprevsize_26080(a, c, (*c).Sup.Size);
		listadd_28235(&(*a).Freechunkslist, c);
		(*c).Sup.Used = NIM_FALSE;
	}
	goto LA29;
	LA33: ;
	{
		freeoschunks_25808(a, ((void*) (c)), (*c).Sup.Size);
	}
	LA29: ;
}

static N_INLINE(void, deallocavlnode_24404)(tmemregion23410* a, tavlnode23408* n) {
	(*n).Link[(0)- 0] = (*a).Freeavlnodes;
	(*a).Freeavlnodes = n;
}

N_NIMCALL(void, del_24802)(tmemregion23410* a, tavlnode23408** t, NI x) {
	{
		if (!((*t) == bottom_23439)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	(*a).Last = (*t);
	{
		if (!((NU32)(x) < (NU32)((*(*t)).Key))) goto LA7;
		del_24802(a, &(*(*t)).Link[(0)- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		(*a).Deleted = (*t);
		del_24802(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_23439));
		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_23439;
		(*t) = (*(*t)).Link[(1)- 0];
		deallocavlnode_24404(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_24560(t);
		skew_24560(&(*(*t)).Link[(1)- 0]);
		skew_24560(&(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]);
		split_24566(t);
		split_24566(&(*(*t)).Link[(1)- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	BeforeRet: ;
}

N_NIMCALL(void, rawdealloc_36819)(tmemregion23410* a, void* p) {
	tbasechunk22636* c_37001;
	c_37001 = pageaddr_25246(p);
	{
		NIM_BOOL LOC3;
		tsmallchunk22638* c;
		NI s;
		tfreecell22628* f;
		LOC3 = 0;
		LOC3 = issmallchunk_25149(c_37001);
		if (!LOC3) goto LA4;
		c = ((tsmallchunk22638*) (c_37001));
		s = (*c).Sup.Size;
		f = ((tfreecell22628*) (p));
		(*f).Zerofield = 0;
		(*f).Next = (*c).Freelist;
		(*c).Freelist = f;
		{
			if (!((*c).Free < s)) goto LA8;
			listadd_31405(&(*a).Freesmallchunks[((NI32)(s / 8))- 0], c);
			(*c).Free += s;
		}
		goto LA6;
		LA8: ;
		{
			(*c).Free += s;
			{
				if (!((*c).Free == (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22638)) - 8)))) goto LA13;
				listremove_34203(&(*a).Freesmallchunks[((NI32)(s / 8))- 0], c);
				(*c).Sup.Size = 4096;
				freebigchunk_26204(a, ((tbigchunk22640*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		tbigchunk22640* c;
		c = ((tbigchunk22640*) (c_37001));
		(*a).Deleted = bottom_23439;
		del_24802(a, &(*a).Root, ((NI) (&(*c).Data)));
		freebigchunk_26204(a, c);
	}
	LA1: ;
}

N_NIMCALL(void, dealloc_39824)(tmemregion23410* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell22628))))));
	rawdealloc_36819(allocator, x);
}

N_NOCONV(void, dealloc_4645)(void* p) {
	dealloc_39824(&gch_43044.Region, p);
}

static N_INLINE(void, add_41166)(tcellseq41106* s, tcell41090* c) {
	{
		tcell41090** d;
		void* LOC5;
		if (!((*s).Cap <= (*s).Len)) goto LA3;
		(*s).Cap = (NI32)((NI32)((*s).Cap * 3) / 2);
		LOC5 = 0;
		LOC5 = alloc_4601((NI32)((*s).Cap * 4));
		d = ((tcell41090**) (LOC5));
		memcpy(((void*) (d)), ((void*) ((*s).D)), (NI32)((*s).Len * 4));
		dealloc_4645(((void*) ((*s).D)));
		(*s).D = d;
	}
	LA3: ;
	(*s).D[((*s).Len)- 0] = c;
	(*s).Len += 1;
}

static N_INLINE(void, gcmark_63416)(tgcheap43016* gch, void* p) {
	tcell41090* cell;
	NI c;
	cell = usrtocell_44443(p);
	c = ((NI) (cell));
	{
		tcell41090* objstart;
		void* LOC5;
		if (!((NU32)(4096) < (NU32)(c))) goto LA3;
		LOC5 = 0;
		LOC5 = interiorallocatedptr_38483(&(*gch).Region, ((void*) (cell)));
		objstart = ((tcell41090*) (LOC5));
		{
			if (!!((objstart == NIM_NIL))) goto LA8;
			(*objstart).Refcount = (NI)((NU32)((*objstart).Refcount) + (NU32)(8));
			add_41166(&(*gch).Decstack, objstart);
		}
		LA8: ;
	}
	LA3: ;
}

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

N_NIMCALL(void, markthreadstacks_64004)(tgcheap43016* gch) {
}

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

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

N_NIMCALL(tpagedesc41098*, cellsetget_41251)(tcellset41102 t, NI key) {
	tpagedesc41098* result;
	NI h;
	result = 0;
	h = (NI)(((NI) (key)) & t.Max);
	while (1) {
		if (!!((t.Data[(h)- 0] == NIM_NIL))) goto LA1;
		{
			if (!((*t.Data[(h)- 0]).Key == key)) goto LA4;
			result = t.Data[(h)- 0];
			goto BeforeRet;
		}
		LA4: ;
		h = nexttry_41245(h, t.Max);
	} LA1: ;
	result = NIM_NIL;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, excl_41884)(tcellset41102* s, tcell41090* cell) {
	NI u;
	tpagedesc41098* t;
	u = ((NI) (cell));
	t = cellsetget_41251((*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_44424)(tcell41090* cell) {
	void* result;
	result = 0;
	result = ((void*) ((NI)((NU32)(((NI) (cell))) + (NU32)(((NI)sizeof(tcell41090))))));
	return result;
}

N_NIMCALL(void, preparedealloc_45008)(tcell41090* cell) {
	{
		void* LOC5;
		if (!!(((*(*cell).Typ).finalizer == NIM_NIL))) goto LA3;
		gch_43044.Recgclock += 1;
		LOC5 = 0;
		LOC5 = celltousr_44424(cell);
		((TFinalizer) ((*(*cell).Typ).finalizer))(LOC5);
		gch_43044.Recgclock -= 1;
	}
	LA3: ;
}

N_NOINLINE(void, addzct_44418)(tcellseq41106* s, tcell41090* c) {
	{
		if (!((NI)((*c).Refcount & 4) == 0)) goto LA3;
		(*c).Refcount = (NI)((*c).Refcount | 4);
		add_41166(s, c);
	}
	LA3: ;
}

static N_INLINE(void, rtladdzct_46002)(tcell41090* c) {
	addzct_44418(&gch_43044.Zct, c);
}

N_NIMCALL(void, cellsetrawinsert_41277)(tcellset41102 t, tpagedesc41098** data, tpagedesc41098* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).Key)) & t.Max);
	while (1) {
		if (!!((data[(h)- 0] == NIM_NIL))) goto LA1;
		h = nexttry_41245(h, t.Max);
	} LA1: ;
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellsetenlarge_41604)(tcellset41102* t) {
	NI oldmax;
	tpagedesc41098** n;
	void* LOC1;
	NI i_41621;
	NI res_41642;
	oldmax = (*t).Max;
	(*t).Max = (NI32)((NI32)((NI32)((*t).Max + 1) * 2) - 1);
	LOC1 = 0;
	LOC1 = alloc0_4616((NI32)((NI32)((*t).Max + 1) * 4));
	n = ((tpagedesc41098**) (LOC1));
	i_41621 = 0;
	res_41642 = 0;
	while (1) {
		if (!(res_41642 <= oldmax)) goto LA2;
		i_41621 = res_41642;
		{
			if (!!(((*t).Data[(i_41621)- 0] == NIM_NIL))) goto LA5;
			cellsetrawinsert_41277((*t), n, (*t).Data[(i_41621)- 0]);
		}
		LA5: ;
		res_41642 += 1;
	} LA2: ;
	dealloc_4645(((void*) ((*t).Data)));
	(*t).Data = n;
}

N_NIMCALL(tpagedesc41098*, cellsetput_41646)(tcellset41102* t, NI key) {
	tpagedesc41098* result;
	NI h;
	void* LOC17;
	result = 0;
	h = (NI)(((NI) (key)) & (*t).Max);
	while (1) {
		tpagedesc41098* x;
		x = (*t).Data[(h)- 0];
		{
			if (!(x == NIM_NIL)) goto LA4;
			goto LA1;
		}
		LA4: ;
		{
			if (!((*x).Key == key)) goto LA8;
			result = x;
			goto BeforeRet;
		}
		LA8: ;
		h = nexttry_41245(h, (*t).Max);
	} LA1: ;
	{
		NIM_BOOL LOC12;
		LOC12 = 0;
		LOC12 = ((NI32)((NI32)((*t).Max + 1) * 2) < (NI32)((*t).Counter * 3));
		if (LOC12) goto LA13;
		LOC12 = ((NI32)((NI32)((*t).Max + 1) - (*t).Counter) < 4);
		LA13: ;
		if (!LOC12) goto LA14;
		cellsetenlarge_41604(t);
	}
	LA14: ;
	(*t).Counter += 1;
	h = (NI)(((NI) (key)) & (*t).Max);
	while (1) {
		if (!!(((*t).Data[(h)- 0] == NIM_NIL))) goto LA16;
		h = nexttry_41245(h, (*t).Max);
	} LA16: ;
	LOC17 = 0;
	LOC17 = alloc0_4616(((NI)sizeof(tpagedesc41098)));
	result = ((tpagedesc41098*) (LOC17));
	(*result).Next = (*t).Head;
	(*result).Key = key;
	(*t).Head = result;
	(*t).Data[(h)- 0] = result;
	BeforeRet: ;
	return result;
}

N_NOINLINE(void, incl_41855)(tcellset41102* s, tcell41090* cell) {
	NI u;
	tpagedesc41098* t;
	u = ((NI) (cell));
	t = cellsetput_41646(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_45235)(tcell41090* c) {
	{
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		incl_41855(&gch_43044.Cycleroots, c);
	}
	LA3: ;
}

static N_INLINE(void, decref_46402)(tcell41090* c) {
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_44462(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_45235(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

N_NIMCALL(void, scanblack_60202)(tcell41090* s) {
	(*s).Refcount = (NI)((*s).Refcount & -4);
	forallchildren_44815(s, ((NU8) 7));
}

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

N_NIMCALL(NIM_BOOL, contains_41809)(tcellset41102 s, tcell41090* cell) {
	NIM_BOOL result;
	NI u;
	tpagedesc41098* t;
	result = 0;
	u = ((NI) (cell));
	t = cellsetget_41251(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_59217)(tgcheap43016* gch, tcell41090* c) {
	preparedealloc_45008(c);
	rawdealloc_36819(&(*gch).Region, ((void*) (c)));
}

N_NIMCALL(void, collectwhite_60602)(tcell41090* s) {
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		LOC3 = 0;
		LOC3 = (((NI) ((NI)((*s).Refcount & 3))) == 2);
		if (!(LOC3)) goto LA4;
		LOC5 = 0;
		LOC5 = contains_41809(gch_43044.Cycleroots, s);
		LOC3 = !(LOC5);
		LA4: ;
		if (!LOC3) goto LA6;
		(*s).Refcount = (NI)((*s).Refcount & -4);
		forallchildren_44815(s, ((NU8) 8));
		freecycliccell_59217(&gch_43044, s);
	}
	LA6: ;
}

N_NIMCALL(void, dooperation_44819)(void* p, NU8 op) {
	tcell41090* c;
	{
		if (!(p == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	c = usrtocell_44443(p);
	switch (op) {
	case ((NU8) 2):
	{
		decref_46402(c);
	}
	break;
	case ((NU8) 3):
	{
		add_41166(&gch_43044.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_60003(c);
	}
	break;
	case ((NU8) 6):
	{
		scan_60402(c);
	}
	break;
	case ((NU8) 7):
	{
		(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
		{
			if (!!((((NI) ((NI)((*c).Refcount & 3))) == 0))) goto LA13;
			scanblack_60202(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		collectwhite_60602(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	BeforeRet: ;
}

N_NIMCALL(NI, getdiscriminant_21320)(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_21608)(void* aa, TNimNode* n) {
	TNimNode* result;
	NI discr;
	result = 0;
	discr = getdiscriminant_21320(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_49006)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		forallchildrenaux_44823(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		NI i_49032;
		NI HEX3Atmp_49205;
		NI res_49207;
		i_49032 = 0;
		HEX3Atmp_49205 = 0;
		HEX3Atmp_49205 = (NI32)((*n).len - 1);
		res_49207 = 0;
		while (1) {
			if (!(res_49207 <= HEX3Atmp_49205)) goto LA3;
			i_49032 = res_49207;
			{
				if (!((*(*n).sons[(i_49032)- 0]).kind == ((NU8) 1))) goto LA6;
				{
					if (!((*(*(*n).sons[(i_49032)- 0]).typ).kind == ((NU8) 22) || (*(*(*n).sons[(i_49032)- 0]).typ).kind == ((NU8) 28) || (*(*(*n).sons[(i_49032)- 0]).typ).kind == ((NU8) 24))) goto LA10;
					dooperation_44819((*((void**) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_49032)- 0]).offset))))), op);
				}
				goto LA8;
				LA10: ;
				{
					forallchildrenaux_44823(((void*) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_49032)- 0]).offset)))), (*(*n).sons[(i_49032)- 0]).typ, op);
				}
				LA8: ;
			}
			goto LA4;
			LA6: ;
			{
				forallslotsaux_49006(dest, (*n).sons[(i_49032)- 0], op);
			}
			LA4: ;
			res_49207 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_21608(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA17;
			forallslotsaux_49006(dest, m, op);
		}
		LA17: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forallchildrenaux_44823)(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_44819((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			forallslotsaux_49006(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			NI i_49240;
			NI HEX3Atmp_49262;
			NI res_49264;
			i_49240 = 0;
			HEX3Atmp_49262 = 0;
			HEX3Atmp_49262 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
			res_49264 = 0;
			while (1) {
				if (!(res_49264 <= HEX3Atmp_49262)) goto LA12;
				i_49240 = res_49264;
				forallchildrenaux_44823(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_49240) * (NU32)((*(*mt).base).size)))))), (*mt).base, op);
				res_49264 += 1;
			} LA12: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	BeforeRet: ;
}

N_NIMCALL(void, forallchildren_44815)(tcell41090* cell, NU8 op) {
	TY2289 marker;
	marker = (*(*cell).Typ).marker;
	{
		void* LOC5;
		if (!!((marker == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = celltousr_44424(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		switch ((*(*cell).Typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			LOC8 = 0;
			LOC8 = celltousr_44424(cell);
			forallchildrenaux_44823(LOC8, (*(*cell).Typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			LOC10 = 0;
			LOC10 = celltousr_44424(cell);
			d = ((NI) (LOC10));
			s = ((TGenericSeq*) (d));
			{
				NI i_50040;
				NI HEX3Atmp_50072;
				NI res_50074;
				if (!!((s == NIM_NIL))) goto LA13;
				i_50040 = 0;
				HEX3Atmp_50072 = 0;
				HEX3Atmp_50072 = (NI32)((*s).len - 1);
				res_50074 = 0;
				while (1) {
					if (!(res_50074 <= HEX3Atmp_50072)) goto LA15;
					i_50040 = res_50074;
					forallchildrenaux_44823(((void*) ((NI)((NU32)((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_50040) * (NU32)((*(*(*cell).Typ).base).size))))) + (NU32)(8)))), (*(*cell).Typ).base, op);
					res_50074 += 1;
				} LA15: ;
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
}

N_NIMCALL(NIM_BOOL, collectzct_62808)(tgcheap43016* gch) {
	NIM_BOOL result;
	NI* l;
	result = 0;
	l = &(*gch).Zct.Len;
	while (1) {
		tcell41090* c;
		if (!(0 < (*l))) goto LA1;
		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 LA4;
			{
				NIM_BOOL LOC8;
				LOC8 = 0;
				LOC8 = canbecycleroot_44462(c);
				if (!LOC8) goto LA9;
				excl_41884(&(*gch).Cycleroots, c);
			}
			LA9: ;
			preparedealloc_45008(c);
			forallchildren_44815(c, ((NU8) 2));
			rawdealloc_36819(&(*gch).Region, ((void*) (c)));
		}
		LA4: ;
	} LA1: ;
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, markroots_60803)(tgcheap43016* gch) {
	NI tabsize;
	tcell41090* s_60808;
	tcellset41102 HEX3Atmp_60840;
	tpagedesc41098* r_60842;
	tabsize = 0;
	s_60808 = 0;
	memset((void*)&HEX3Atmp_60840, 0, sizeof(HEX3Atmp_60840));
	HEX3Atmp_60840 = (*gch).Cycleroots;
	r_60842 = HEX3Atmp_60840.Head;
	while (1) {
		NI i_60844;
		if (!!((r_60842 == NIM_NIL))) goto LA1;
		i_60844 = 0;
		while (1) {
			NI w_60846;
			NI j_60848;
			if (!(i_60844 <= 15)) goto LA2;
			w_60846 = (*r_60842).Bits[(i_60844)- 0];
			j_60848 = 0;
			while (1) {
				if (!!((w_60846 == 0))) goto LA3;
				{
					if (!!((((NI) ((NI)(w_60846 & 1))) == 0))) goto LA6;
					s_60808 = ((tcell41090*) ((NI)((NI)((NU32)((*r_60842).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_60844) << (NU32)(5))) + (NU32)(j_60848))) * (NU32)(8)))));
					tabsize += 1;
					{
						NIM_BOOL LOC10;
						LOC10 = 0;
						LOC10 = (((NI) ((NI)((*s_60808).Refcount & 3))) == 3);
						if (!(LOC10)) goto LA11;
						LOC10 = ((NU32)(8) <= (NU32)((*s_60808).Refcount));
						LA11: ;
						if (!LOC10) goto LA12;
						markgray_60003(s_60808);
					}
					goto LA8;
					LA12: ;
					{
						excl_41884(&(*gch).Cycleroots, s_60808);
						{
							if (!((*s_60808).Refcount == 0)) goto LA17;
							freecycliccell_59217(gch, s_60808);
						}
						LA17: ;
					}
					LA8: ;
				}
				LA6: ;
				j_60848 += 1;
				w_60846 = (NI)((NU32)(w_60846) >> (NU32)(1));
			} LA3: ;
			i_60844 += 1;
		} LA2: ;
		r_60842 = (*r_60842).Next;
	} LA1: ;
	(*gch).Stat.Cycletablesize = (((*gch).Stat.Cycletablesize >= tabsize) ? (*gch).Stat.Cycletablesize : tabsize);
}

N_NIMCALL(void, collectroots_63001)(tgcheap43016* gch) {
	tcell41090* s_63005;
	tcellset41102 HEX3Atmp_63007;
	tpagedesc41098* r_63009;
	s_63005 = 0;
	memset((void*)&HEX3Atmp_63007, 0, sizeof(HEX3Atmp_63007));
	HEX3Atmp_63007 = (*gch).Cycleroots;
	r_63009 = HEX3Atmp_63007.Head;
	while (1) {
		NI i_63011;
		if (!!((r_63009 == NIM_NIL))) goto LA1;
		i_63011 = 0;
		while (1) {
			NI w_63013;
			NI j_63015;
			if (!(i_63011 <= 15)) goto LA2;
			w_63013 = (*r_63009).Bits[(i_63011)- 0];
			j_63015 = 0;
			while (1) {
				if (!!((w_63013 == 0))) goto LA3;
				{
					if (!!((((NI) ((NI)(w_63013 & 1))) == 0))) goto LA6;
					s_63005 = ((tcell41090*) ((NI)((NI)((NU32)((*r_63009).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_63011) << (NU32)(5))) + (NU32)(j_63015))) * (NU32)(8)))));
					excl_41884(&(*gch).Cycleroots, s_63005);
					collectwhite_60602(s_63005);
				}
				LA6: ;
				j_63015 += 1;
				w_63013 = (NI)((NU32)(w_63013) >> (NU32)(1));
			} LA3: ;
			i_63011 += 1;
		} LA2: ;
		r_63009 = (*r_63009).Next;
	} LA1: ;
}

N_NIMCALL(void, deinit_41220)(tcellset41102* s) {
	tpagedesc41098* it;
	it = (*s).Head;
	while (1) {
		tpagedesc41098* n;
		if (!!((it == NIM_NIL))) goto LA1;
		n = (*it).Next;
		dealloc_4645(((void*) (it)));
		it = n;
	} LA1: ;
	(*s).Head = NIM_NIL;
	dealloc_4645(((void*) ((*s).Data)));
	(*s).Data = NIM_NIL;
	(*s).Counter = 0;
}

N_NIMCALL(void, cellsetreset_49001)(tcellset41102* s) {
	deinit_41220(s);
	init_41211(s);
}

N_NIMCALL(void, collectcycles_63021)(tgcheap43016* gch) {
	tcell41090* s_63201;
	tcellset41102 HEX3Atmp_63401;
	tpagedesc41098* r_63403;
	while (1) {
		NIM_BOOL LOC2;
		if (!(0 < (*gch).Zct.Len)) goto LA1;
		LOC2 = 0;
		LOC2 = collectzct_62808(gch);
	} LA1: ;
	markroots_60803(gch);
	s_63201 = 0;
	memset((void*)&HEX3Atmp_63401, 0, sizeof(HEX3Atmp_63401));
	HEX3Atmp_63401 = (*gch).Cycleroots;
	r_63403 = HEX3Atmp_63401.Head;
	while (1) {
		NI i_63405;
		if (!!((r_63403 == NIM_NIL))) goto LA3;
		i_63405 = 0;
		while (1) {
			NI w_63407;
			NI j_63409;
			if (!(i_63405 <= 15)) goto LA4;
			w_63407 = (*r_63403).Bits[(i_63405)- 0];
			j_63409 = 0;
			while (1) {
				if (!!((w_63407 == 0))) goto LA5;
				{
					if (!!((((NI) ((NI)(w_63407 & 1))) == 0))) goto LA8;
					s_63201 = ((tcell41090*) ((NI)((NI)((NU32)((*r_63403).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_63405) << (NU32)(5))) + (NU32)(j_63409))) * (NU32)(8)))));
					scan_60402(s_63201);
				}
				LA8: ;
				j_63409 += 1;
				w_63407 = (NI)((NU32)(w_63407) >> (NU32)(1));
			} LA5: ;
			i_63405 += 1;
		} LA4: ;
		r_63403 = (*r_63403).Next;
	} LA3: ;
	collectroots_63001(gch);
	cellsetreset_49001(&(*gch).Cycleroots);
}

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

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

N_NIMCALL(NI, getoccupiedmem_5261)(void) {
	NI result;
	NI LOC1;
	NI LOC2;
	result = 0;
	LOC1 = 0;
	LOC1 = gettotalmem_5265();
	LOC2 = 0;
	LOC2 = getfreemem_5263();
	result = (NI32)(LOC1 - LOC2);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, unmarkstackandregisters_67203)(tgcheap43016* gch) {
	tcell41090** d;
	NI i_67218;
	NI HEX3Atmp_67401;
	NI res_67403;
	d = (*gch).Decstack.D;
	i_67218 = 0;
	HEX3Atmp_67401 = 0;
	HEX3Atmp_67401 = (NI32)((*gch).Decstack.Len - 1);
	res_67403 = 0;
	while (1) {
		if (!(res_67403 <= HEX3Atmp_67401)) goto LA1;
		i_67218 = res_67403;
		decref_46402(d[(i_67218)- 0]);
		res_67403 += 1;
	} LA1: ;
	(*gch).Decstack.Len = 0;
}

N_NIMCALL(void, collectctbody_67407)(tgcheap43016* gch) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_64808();
	(*gch).Stat.Maxstacksize = (((*gch).Stat.Maxstacksize >= LOC1) ? (*gch).Stat.Maxstacksize : LOC1);
	prepareforinteriorpointerchecking_38478(&(*gch).Region);
	markstackandregisters_65038(gch);
	markthreadstacks_64004(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_62808(gch);
		if (!LOC4) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = getoccupiedmem_41032(&(*gch).Region);
			LOC9 = ((*gch).Cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			collectcycles_63021(gch);
			(*gch).Stat.Cyclecollections += 1;
			LOC14 = 0;
			LOC14 = getoccupiedmem_5261();
			(*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_67203(gch);
}

N_NIMCALL(void, collectct_44808)(tgcheap43016* 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_41032(&(*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_67407(gch);
	}
	LA12: ;
}

static N_INLINE(void, addnewobjtozct_50078)(tcell41090* res, tgcheap43016* gch) {
	NI l;
	tcell41090** d;
	l = (*gch).Zct.Len;
	d = (*gch).Zct.D;
	{
		tcell41090* 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_41166(&(*gch).Zct, res);
	}
	goto LA1;
	LA3: ;
	{
		d[(l)- 0] = res;
		(*gch).Zct.Len += 1;
	}
	LA1: ;
	BeforeRet: ;
}

N_NIMCALL(void*, rawnewobj_50602)(TNimType* typ, NI size, tgcheap43016* gch) {
	void* result;
	tcell41090* res;
	void* LOC1;
	result = 0;
	collectct_44808(gch);
	LOC1 = 0;
	LOC1 = rawalloc_30504(&(*gch).Region, (NI32)(size + ((NI)sizeof(tcell41090))));
	res = ((tcell41090*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 4;
	addnewobjtozct_50078(res, gch);
	result = celltousr_44424(res);
	return result;
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_50602(typ, size, &gch_43044);
	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_8005, (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_10475)(FILE* f, NCSTRING c) {
	fputs(c, f);
}

N_NIMCALL(void, writetostderr_13001)(NCSTRING msg) {
	write_10475(stdout, msg);
}

N_NIMCALL(void, showerrormessage_13007)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_12804 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_12804(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_13001(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. (Attempt to read from nil?)\012";
	}
	goto LA1;
	LA6: ;
	{
		if (!(sig == SIGABRT)) goto LA9;
		msg = "SIGABRT: Abnormal termination.\012";
	}
	goto LA1;
	LA9: ;
	{
		if (!(sig == SIGFPE)) goto LA12;
		msg = "SIGFPE: Arithmetic error.\012";
	}
	goto LA1;
	LA12: ;
	{
		if (!(sig == SIGILL)) goto LA15;
		msg = "SIGILL: Illegal operation.\012";
	}
	goto LA1;
	LA15: ;
	{
		if (!(sig == SIGSEGV)) goto LA18;
		msg = "SIGBUS: Illegal storage access. (Attempt to read from nil?)\012";
	}
	goto LA1;
	LA18: ;
	{
		msg = "unknown signal\012";
	}
	LA1: ;
	showerrormessage_13007(msg);
	exit(1);
}

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

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

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	tcell41090* res;
	void* LOC1;
	result = 0;
	collectct_44808(&gch_43044);
	LOC1 = 0;
	LOC1 = rawalloc_30504(&gch_43044.Region, (NI32)(size + ((NI)sizeof(tcell41090))));
	res = ((tcell41090*) (LOC1));
	(*res).Typ = typ;
	(*res).Refcount = 8;
	result = celltousr_44424(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_8005, (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_44819(d, ((NU8) (op)));
}
N_NIMCALL(void, TMP48)(void* p, NI op) {
	E_Base* a;
	a = (E_Base*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
}
N_NIMCALL(void, TMP49)(void* p, NI op) {
	EOverflow* a;
	a = (EOverflow*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41090* c;
	c = usrtocell_44443(p);
	{
		(*c).Refcount -= 8;
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		rtladdzct_46002(c);
	}
	LA3: ;
}

static N_INLINE(void, incref_46827)(tcell41090* c) {
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_44462(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_45235(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tcell41090* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_44443(src);
		incref_46827(LOC5);
	}
	LA3: ;
	{
		tcell41090* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_44443((*dest));
		decref_46402(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

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 LA5;
		{
			if (!(x == NIM_NIL)) goto LA8;
			result = NIM_FALSE;
			goto BeforeRet;
		}
		LA8: ;
		x = (*x).base;
	} LA5: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

N_NIMCALL(void, raiseexceptionaux_14402)(E_Base* e) {
	{
		if (!!((localraisehook_6824 == NIM_NIL))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = localraisehook_6824(e);
			if (!!(LOC7)) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
	}
	LA3: ;
	{
		if (!!((globalraisehook_6819 == NIM_NIL))) goto LA12;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = globalraisehook_6819(e);
			if (!!(LOC16)) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
	}
	LA12: ;
	{
		if (!!((exchandler_13039 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_13039).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_13039).raiseAction.ClEnv? (*exchandler_13039).raiseAction.ClPrc(e, (*exchandler_13039).raiseAction.ClEnv):((TMP51)((*exchandler_13039).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			longjmp((*exchandler_13039).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!isObj((*e).Sup.m_type, (&NTI2457))) goto LA30;
		showerrormessage_13007((*e).name);
		quitordebug_14201();
	}
	goto LA19;
	LA30: ;
	{
		TY14616 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_13007(((NCSTRING) (buf)));
		quitordebug_14201();
	}
	LA19: ;
	BeforeRet: ;
}

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

N_NOINLINE(void, raiseOverflow)(void) {
	EOverflow* e_18281;
	NimStringDesc* LOC1;
	e_18281 = 0;
	e_18281 = (EOverflow*) newObj((&NTI18401), sizeof(EOverflow));
	(*e_18281).Sup.Sup.Sup.Sup.m_type = (&NTI2445);
	LOC1 = 0;
	LOC1 = (*e_18281).Sup.Sup.Sup.message; (*e_18281).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP50));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_18281, "EOverflow");
}

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_44812)(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_43044.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_44812(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		{
			tcell41090* LOC10;
			if (!!((src == NIM_NIL))) goto LA8;
			LOC10 = 0;
			LOC10 = usrtocell_44443(src);
			incref_46827(LOC10);
		}
		LA8: ;
		{
			tcell41090* LOC15;
			if (!((NU32)(4096) <= (NU32)(((NI) ((*dest)))))) goto LA13;
			LOC15 = 0;
			LOC15 = usrtocell_44443((*dest));
			decref_46402(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	(*dest) = src;
}
N_NIMCALL(void, TMP135)(void* p, NI op) {
	einvalidvalue2453* a;
	a = (einvalidvalue2453*)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, chckNil)(void* p) {
	{
		einvalidvalue2453* e_17625;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_17625 = 0;
		e_17625 = (einvalidvalue2453*) newObj((&NTI17801), sizeof(einvalidvalue2453));
		(*e_17625).Sup.Sup.Sup.m_type = (&NTI2453);
		LOC5 = 0;
		LOC5 = (*e_17625).Sup.Sup.message; (*e_17625).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP136));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((E_Base*)e_17625, "EInvalidValue");
	}
	LA3: ;
}

N_NIMCALL(void, genericresetaux_73801)(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_75220;
		NI HEX3Atmp_75250;
		NI res_75252;
		i_75220 = 0;
		HEX3Atmp_75250 = 0;
		HEX3Atmp_75250 = (NI32)((*n).len - 1);
		res_75252 = 0;
		while (1) {
			if (!(res_75252 <= HEX3Atmp_75250)) goto LA4;
			i_75220 = res_75252;
			genericresetaux_73801(dest, (*n).sons[(i_75220)- 0]);
			res_75252 += 1;
		} LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_21608(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA8;
			genericresetaux_73801(dest, m);
		}
		LA8: ;
		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_73801(dest, (*mt).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_75411;
		NI HEX3Atmp_75433;
		NI res_75435;
		i_75411 = 0;
		HEX3Atmp_75433 = 0;
		HEX3Atmp_75433 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
		res_75435 = 0;
		while (1) {
			if (!(res_75435 <= HEX3Atmp_75433)) goto LA4;
			i_75411 = res_75435;
			genericReset(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_75411) * (NU32)((*(*mt).base).size)))))), (*mt).base);
			res_75435 += 1;
		} LA4: ;
	}
	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_70624, NI last) {
	NimStringDesc* result;
	NI start;
	NI len;
	result = 0;
	start = ((start_70624 >= 0) ? start_70624 : 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_70401)(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_56204)(void* old, NI newsize, tgcheap43016* gch) {
	void* result;
	tcell41090* ol;
	tcell41090* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	result = 0;
	collectct_44808(gch);
	ol = usrtocell_44443(old);
	LOC1 = 0;
	LOC1 = rawalloc_30504(&(*gch).Region, (NI32)(newsize + ((NI)sizeof(tcell41090))));
	res = ((tcell41090*) (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(tcell41090))));
	zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (res))) + (NU32)(oldsize))) + (NU32)(((NI)sizeof(tcell41090)))))), (NI32)(newsize - oldsize));
	{
		NI j;
		tcell41090** 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 LA10;
			{
				if (!(d[(j)- 0] == ol)) goto LA13;
				d[(j)- 0] = res;
				goto LA10;
			}
			LA13: ;
			j -= 1;
		} LA10: ;
	}
	LA8: ;
	{
		NIM_BOOL LOC17;
		LOC17 = 0;
		LOC17 = canbecycleroot_44462(ol);
		if (!LOC17) goto LA18;
		excl_41884(&(*gch).Cycleroots, ol);
	}
	LA18: ;
	rawdealloc_36819(&(*gch).Region, ((void*) (ol)));
	result = celltousr_44424(res);
	return result;
}

N_NIMCALL(void*, growobj_59210)(void* old, NI newsize) {
	void* result;
	result = 0;
	result = growobj_56204(old, newsize, &gch_43044);
	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_70401(((NI) ((NI)((*result).Sup.reserved & 2147483647))));
		LOC5 = 0;
		LOC5 = growobj_59210(((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_70401(((NI) ((NI)((*dest).Sup.reserved & 2147483647))));
		sp = ((LOC6 >= (NI32)((*dest).Sup.len + addlen)) ? LOC6 : (NI32)((*dest).Sup.len + addlen));
		LOC7 = 0;
		LOC7 = growobj_59210(((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_70401(((NI) ((NI)((*result).reserved & 2147483647))));
		LOC5 = 0;
		LOC5 = growobj_59210(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC5));
	}
	LA3: ;
	(*result).len += 1;
	return result;
}

static N_INLINE(void, gcdisable_6602)(void) {
	gch_43044.Recgclock += 1;
}

N_NIMCALL(void, genericassignaux_73812)(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_73806(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		NI i_73849;
		NI HEX3Atmp_74005;
		NI res_74007;
		i_73849 = 0;
		HEX3Atmp_74005 = 0;
		HEX3Atmp_74005 = (NI32)((*n).len - 1);
		res_74007 = 0;
		while (1) {
			if (!(res_74007 <= HEX3Atmp_74005)) goto LA3;
			i_73849 = res_74007;
			genericassignaux_73812(dest, src, (*n).sons[(i_73849)- 0], shallow);
			res_74007 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		dd = selectbranch_21608(dest, n);
		m = selectbranch_21608(src, n);
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = !((m == dd));
			if (!(LOC7)) goto LA8;
			LOC7 = !((dd == NIM_NIL));
			LA8: ;
			if (!LOC7) goto LA9;
			genericresetaux_73801(dest, dd);
		}
		LA9: ;
		memcpy(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*(*n).typ).size);
		{
			if (!!((m == NIM_NIL))) goto LA13;
			genericassignaux_73812(dest, src, m, shallow);
		}
		LA13: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, genericassignaux_73806)(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;
		NI i_74412;
		NI HEX3Atmp_74548;
		NI res_74550;
		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)))));
		i_74412 = 0;
		HEX3Atmp_74548 = 0;
		HEX3Atmp_74548 = (NI32)((*seq).len - 1);
		res_74550 = 0;
		while (1) {
			if (!(res_74550 <= HEX3Atmp_74548)) goto LA22;
			i_74412 = res_74550;
			genericassignaux_73806(((void*) ((NI)((NU32)((NI)((NU32)(dst) + (NU32)((NI)((NU32)(i_74412) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), ((void*) ((NI)((NU32)((NI)((NU32)(((NI) (s2))) + (NU32)((NI)((NU32)(i_74412) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), (*mt).base, shallow);
			res_74550 += 1;
		} LA22: ;
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		pint = ((TNimType**) (dest));
		(*pint) = (*((TNimType**) (src)));
		{
			if (!!(((*mt).base == NIM_NIL))) goto LA26;
			genericassignaux_73806(dest, src, (*mt).base, shallow);
		}
		LA26: ;
		genericassignaux_73812(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 18):
	{
		genericassignaux_73812(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_74497;
		NI HEX3Atmp_74556;
		NI res_74558;
		i_74497 = 0;
		HEX3Atmp_74556 = 0;
		HEX3Atmp_74556 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
		res_74558 = 0;
		while (1) {
			if (!(res_74558 <= HEX3Atmp_74556)) goto LA30;
			i_74497 = res_74558;
			genericassignaux_73806(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_74497) * (NU32)((*(*mt).base).size)))))), ((void*) ((NI)((NU32)(s) + (NU32)((NI)((NU32)(i_74497) * (NU32)((*(*mt).base).size)))))), (*mt).base, shallow);
			res_74558 += 1;
		} LA30: ;
	}
	break;
	case ((NU8) 22):
	{
		unsureAsgnRef(((void**) (dest)), (*((void**) (s))));
	}
	break;
	default:
	{
		memcpy(dest, src, (*mt).size);
	}
	break;
	}
	BeforeRet: ;
}

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

N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt) {
	gcdisable_6602();
	genericassignaux_73806(dest, src, mt, NIM_FALSE);
	gcenable_6604();
}

N_NIMCALL(NI, writebuffer_10646)(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) {
	eio2433* a;
	a = (eio2433*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NOINLINE(void, raiseeio_72005)(NimStringDesc* msg) {
	eio2433* e_72010;
	NimStringDesc* LOC1;
	e_72010 = 0;
	e_72010 = (eio2433*) newObj((&NTI72201), sizeof(eio2433));
	(*e_72010).Sup.Sup.Sup.Sup.m_type = (&NTI2433);
	LOC1 = 0;
	LOC1 = (*e_72010).Sup.Sup.Sup.message; (*e_72010).Sup.Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_72010, "EIO");
}

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

static N_INLINE(void*, seqtoptr_164492)(TY110805* x_164498) {
	void* result;
	result = 0;
	result = ((void*) (x_164498));
	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_164476)(TY110805* x_164482, TY110805* y_164487) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_164492(x_164482);
		LOC4 = 0;
		LOC4 = seqtoptr_164492(y_164487);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_164492(x_164482);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_164492(y_164487);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_164579;
		NI HEX3Atmp_164580;
		NI res_164582;
		if (!(x_164482->Sup.len == y_164487->Sup.len)) goto LA15;
		i_164579 = 0;
		HEX3Atmp_164580 = 0;
		HEX3Atmp_164580 = (NI32)(x_164482->Sup.len - 1);
		res_164582 = 0;
		while (1) {
			if (!(res_164582 <= HEX3Atmp_164580)) goto LA17;
			i_164579 = res_164582;
			{
				if (!!(eqStrings(x_164482->data[i_164579], y_164487->data[i_164579]))) goto LA20;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA20: ;
			res_164582 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_164460)(TY110805** x_164468, NimStringDesc* y_164472) {
	{
		NIM_BOOL LOC3;
		TY165002 LOC6;
		NimStringDesc* LOC7;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_164476((*x_164468), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_164468), (TY110805*) newSeq((&NTI110805), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = copyString(y_164472);
		LOC7 = 0;
		LOC7 = (*x_164468)->data[0]; (*x_164468)->data[0] = copyStringRC1(LOC6[0]);
		if (LOC7) nimGCunrefNoCycle(LOC7);
	}
	goto LA1;
	LA4: ;
	{
		NimStringDesc* LOC9;
		(*x_164468) = (TY110805*) incrSeq(&((*x_164468))->Sup, sizeof(NimStringDesc*));
		LOC9 = 0;
		LOC9 = (*x_164468)->data[(*x_164468)->Sup.len-1]; (*x_164468)->data[(*x_164468)->Sup.len-1] = copyStringRC1(y_164472);
		if (LOC9) nimGCunrefNoCycle(LOC9);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x) {
	NimStringDesc* result;
	NI i;
	NI y;
	NI j_71554;
	NI HEX3Atmp_71571;
	NI res_71573;
	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)abs((NI32)(y - (NI32)(d * 10))) + 48)))));
		i += 1;
		y = d;
		{
			if (!(y == 0)) goto LA4;
			goto LA1;
		}
		LA4: ;
	} LA1: ;
	{
		if (!(x < 0)) goto LA8;
		result->data[i] = 45;
		i += 1;
	}
	LA8: ;
	result = setLengthStr(result, i);
	j_71554 = 0;
	HEX3Atmp_71571 = 0;
	HEX3Atmp_71571 = (NI32)((NI32)(i / 2) - 1);
	res_71573 = 0;
	while (1) {
		NIM_CHAR LOC11;
		if (!(res_71573 <= HEX3Atmp_71571)) goto LA10;
		j_71554 = res_71573;
		LOC11 = 0;
		LOC11 = result->data[j_71554];
		result->data[j_71554] = result->data[(NI32)((NI32)(i - j_71554) - 1)];
		result->data[(NI32)((NI32)(i - j_71554) - 1)] = LOC11;
		res_71573 += 1;
	} LA10: ;
	return result;
}

N_NIMCALL(void, writestacktrace_12406)(void) {
	showerrormessage_13007("No stack traceback available\012");
}
N_NIMCALL(void, TMP819)(void* p, NI op) {
	TNimObject* a;
	a = (TNimObject*)p;
}

N_NIMCALL(void, gcdisablemarkandsweep_6619)(void) {
	gch_43044.Cyclethreshold = 2147483646;
}

N_NIMCALL(NI, cmp_3490)(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(void, TMP1016)(void* p, NI op) {
	einvalidindex2459* a;
	a = (einvalidindex2459*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NIMCALL(NI, hashString)(NimStringDesc* s) {
	NI result;
	NI h;
	NI i_70821;
	NI HEX3Atmp_70868;
	NI res_70870;
	result = 0;
	h = 0;
	i_70821 = 0;
	HEX3Atmp_70868 = 0;
	HEX3Atmp_70868 = (NI32)(s->Sup.len - 1);
	res_70870 = 0;
	while (1) {
		if (!(res_70870 <= HEX3Atmp_70868)) goto LA1;
		i_70821 = res_70870;
		h = (NI)((NU32)(h) + (NU32)(((NI) (((NU8)(s->data[i_70821]))))));
		h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(10))));
		h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(6)));
		res_70870 += 1;
	} LA1: ;
	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(TNimType*, extGetCellType)(void* c) {
	TNimType* result;
	tcell41090* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_44443(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_70401(((NI) ((NI)((*result).reserved & 2147483647))));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_59210(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		NI i_71411;
		NI HEX3Atmp_71487;
		NI res_71489;
		if (!(newlen < (*result).len)) goto LA8;
		i_71411 = 0;
		HEX3Atmp_71487 = 0;
		HEX3Atmp_71487 = (NI32)((*result).len - 1);
		res_71489 = newlen;
		while (1) {
			TNimType* LOC11;
			if (!(res_71489 <= HEX3Atmp_71487)) goto LA10;
			i_71411 = res_71489;
			LOC11 = 0;
			LOC11 = extGetCellType(((void*) (result)));
			forallchildrenaux_44823(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(8))) + (NU32)((NI)((NU32)(i_71411) * (NU32)(elemsize)))))), (*LOC11).base, ((NU8) 2));
			res_71489 += 1;
		} LA10: ;
		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;
}
N_NIMCALL(void, TMP1138)(void* p, NI op) {
	eoutofmemory2457* a;
	a = (eoutofmemory2457*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NIMCALL(NIM_BOOL, open_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize) {
	NIM_BOOL result;
	void* p;
	result = 0;
	p = fopen(filename->data, formatopen_73010[(mode)- 0]->data);
	result = !((p == NIM_NIL));
	(*f) = ((FILE*) (p));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 < bufsize);
		if (!(LOC3)) goto LA4;
		LOC3 = (bufsize <= 2147483647);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			int LOC9;
			eoutofmemory2457* e_73030;
			NimStringDesc* LOC12;
			LOC9 = 0;
			LOC9 = setvbuf((*f), NIM_NIL, _IOFBF, ((int) (bufsize)));
			if (!!((LOC9 == ((NI32) 0)))) goto LA10;
			e_73030 = 0;
			e_73030 = (eoutofmemory2457*) newObj((&NTI73201), sizeof(eoutofmemory2457));
			(*e_73030).Sup.Sup.Sup.Sup.m_type = (&NTI2457);
			LOC12 = 0;
			LOC12 = (*e_73030).Sup.Sup.Sup.message; (*e_73030).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP2));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			raiseException((E_Base*)e_73030, "EOutOfMemory");
		}
		LA10: ;
	}
	goto LA1;
	LA5: ;
	{
		int LOC16;
		if (!(bufsize == 0)) goto LA14;
		LOC16 = 0;
		LOC16 = setvbuf((*f), NIM_NIL, _IONBF, ((int) 0));
	}
	goto LA1;
	LA14: ;
	LA1: ;
	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) {
	{
		tcell41090* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_44443(src);
		(*c).Refcount += 8;
	}
	LA3: ;
	{
		tcell41090* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_44443((*dest));
		{
			(*c).Refcount -= 8;
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			rtladdzct_46002(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(FILE*, open_10217)(NimStringDesc* filename, NU8 mode, NI bufsize) {
	FILE* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		eio2433* e_10226;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = open_10203(&result, filename, mode, bufsize);
		if (!!(LOC3)) goto LA4;
		e_10226 = 0;
		e_10226 = (eio2433*) newObj((&NTI72201), sizeof(eio2433));
		(*e_10226).Sup.Sup.Sup.Sup.m_type = (&NTI2433);
		LOC6 = 0;
		LOC6 = rawNewString(filename->Sup.len + 13);
appendString(LOC6, ((NimStringDesc*) &TMP1139));
appendString(LOC6, filename);
		asgnRefNoCycle((void**) &(*e_10226).Sup.Sup.Sup.message, LOC6);
		raiseException((E_Base*)e_10226, "EIO");
	}
	LA4: ;
	return result;
}

N_NIMCALL(NIM_BOOL, readline_10487)(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 LA4;
			{
				if (!(0 < (*line)->Sup.len)) goto LA8;
				goto LA1;
			}
			goto LA6;
			LA8: ;
			{
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA6: ;
		}
		LA4: ;
		{
			if (!(c == ((NI32) 10))) goto LA13;
			goto LA1;
		}
		LA13: ;
		{
			if (!(c == ((NI32) 13))) goto LA17;
			c = fgetc(f);
			{
				if (!!((c == ((NI32) 10)))) goto LA21;
				ungetc(c, f);
			}
			LA21: ;
			goto LA1;
		}
		LA17: ;
		(*line) = addChar((*line), ((NIM_CHAR) (((NI) (((NI) (c)))))));
	} LA1: ;
	result = NIM_TRUE;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP1140)(void* p, NI op) {
	enoexceptiontoreraise2467* a;
	a = (enoexceptiontoreraise2467*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NIMCALL(void, reraiseException)(void) {
	{
		enoexceptiontoreraise2467* e_14823;
		NimStringDesc* LOC5;
		if (!(currexception_13041 == NIM_NIL)) goto LA3;
		e_14823 = 0;
		e_14823 = (enoexceptiontoreraise2467*) newObj((&NTI15001), sizeof(enoexceptiontoreraise2467));
		(*e_14823).Sup.Sup.Sup.m_type = (&NTI2467);
		LOC5 = 0;
		LOC5 = (*e_14823).Sup.Sup.message; (*e_14823).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP1141));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((E_Base*)e_14823, "ENoExceptionToReraise");
	}
	goto LA1;
	LA3: ;
	{
		raiseexceptionaux_14402(currexception_13041);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, HEX24_165714)(TY79484 x_165718) {
	NimStringDesc* result;
	NIM_BOOL firstelement;
	NimStringDesc* LOC9;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP1142));
	firstelement = NIM_TRUE;
	{
		if (!!(firstelement)) goto LA3;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1143));
	}
	LA3: ;
	result = resizeString(result, 8);
appendString(result, ((NimStringDesc*) &TMP1144));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1145));
	result = resizeString(result, x_165718.Field0->Sup.len + 0);
appendString(result, x_165718.Field0);
	firstelement = NIM_FALSE;
	{
		if (!!(firstelement)) goto LA7;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1143));
	}
	LA7: ;
	result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TMP1146));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP1145));
	LOC9 = 0;
	LOC9 = nimIntToStr(x_165718.Field1);
	result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
	firstelement = NIM_FALSE;
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP1147));
	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, TMP1173)(void* p, NI op) {
	eos2435* a;
	a = (eos2435*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

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

N_NIMCALL(NI, ptrsize_39414)(void* p) {
	NI result;
	void* x;
	tbasechunk22636* c;
	result = 0;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell22628))))));
	c = pageaddr_25246(p);
	result = (NI)((NU32)((*c).Size) - (NU32)(((NI)sizeof(tfreecell22628))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = issmallchunk_25149(c);
		if (!!(LOC3)) goto LA4;
		result -= (NI32)(((NI)sizeof(tbigchunk22640)) - 8);
	}
	LA4: ;
	return result;
}

N_NIMCALL(void*, realloc_40805)(tmemregion23410* allocator, void* p, NI newsize) {
	void* result;
	result = 0;
	{
		if (!(0 < newsize)) goto LA3;
		result = alloc0_39817(allocator, newsize);
		{
			NI LOC9;
			if (!!((p == NIM_NIL))) goto LA7;
			LOC9 = 0;
			LOC9 = ptrsize_39414(p);
			memcpy(result, p, LOC9);
			dealloc_39824(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!!((p == NIM_NIL))) goto LA11;
		dealloc_39824(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}

N_NOCONV(void*, realloc_4631)(void* p, NI newsize) {
	void* result;
	result = 0;
	result = realloc_40805(&gch_43044.Region, p, newsize);
	return result;
}

N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x) {
	NimStringDesc* result;
	NI i;
	NI64 y;
	NI j_71647;
	NI HEX3Atmp_71663;
	NI res_71665;
	result = 0;
	result = mnewString(32);
	i = 0;
	y = x;
	while (1) {
		NI64 d;
		d = (NI64)(y / 10);
		result->data[i] = ((NIM_CHAR) (((NI) ((NI32)((NI32)abs(((NI) ((NI64)(y - (NI64)(d * 10))))) + 48)))));
		i += 1;
		y = d;
		{
			if (!(y == 0)) goto LA4;
			goto LA1;
		}
		LA4: ;
	} LA1: ;
	{
		if (!(x < 0)) goto LA8;
		result->data[i] = 45;
		i += 1;
	}
	LA8: ;
	result = setLengthStr(result, i);
	j_71647 = 0;
	HEX3Atmp_71663 = 0;
	HEX3Atmp_71663 = (NI32)((NI32)(i / 2) - 1);
	res_71665 = 0;
	while (1) {
		NIM_CHAR LOC11;
		if (!(res_71665 <= HEX3Atmp_71663)) goto LA10;
		j_71647 = res_71665;
		LOC11 = 0;
		LOC11 = result->data[j_71647];
		result->data[j_71647] = result->data[(NI32)((NI32)(i - j_71647) - 1)];
		result->data[(NI32)((NI32)(i - j_71647) - 1)] = LOC11;
		res_71665 += 1;
	} LA10: ;
	return result;
}

N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF x) {
	NimStringDesc* result;
	TY71582 buf;
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	sprintf(((NCSTRING) (buf)), "%#.16e", x);
	result = cstrToNimstr(((NCSTRING) (buf)));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, objectinitaux_74678)(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_74820;
		NI HEX3Atmp_74841;
		NI res_74843;
		i_74820 = 0;
		HEX3Atmp_74841 = 0;
		HEX3Atmp_74841 = (NI32)((*n).len - 1);
		res_74843 = 0;
		while (1) {
			if (!(res_74843 <= HEX3Atmp_74841)) goto LA4;
			i_74820 = res_74843;
			objectinitaux_74678(dest, (*n).sons[(i_74820)- 0]);
			res_74843 += 1;
		} LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_21608(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA8;
			objectinitaux_74678(dest, m);
		}
		LA8: ;
	}
	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_74678(dest, (*typ).node);
	}
	break;
	case ((NU8) 18):
	{
		objectinitaux_74678(dest, (*typ).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_74864;
		NI HEX3Atmp_74877;
		NI res_74879;
		i_74864 = 0;
		HEX3Atmp_74877 = 0;
		HEX3Atmp_74877 = (NI32)((NI32)((*typ).size / (*(*typ).base).size) - 1);
		res_74879 = 0;
		while (1) {
			if (!(res_74879 <= HEX3Atmp_74877)) goto LA4;
			i_74864 = res_74879;
			objectInit(((void*) ((NI)((NU32)(d) + (NU32)((NI32)(i_74864 * (*(*typ).base).size))))), (*typ).base);
			res_74879 += 1;
		} LA4: ;
	}
	break;
	default:
	{
	}
	break;
	}
}

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

N_NIMCALL(NimStringDesc*, reprEnum)(NI e_75880, TNimType* typ) {
	NimStringDesc* result;
	NI e;
	NimStringDesc* LOC23;
	NimStringDesc* LOC24;
	result = 0;
	{
		if (!((*typ).size == 1)) goto LA3;
		e = ((NI) ((NI)(e_75880 & 255)));
	}
	goto LA1;
	LA3: ;
	{
		if (!((*typ).size == 2)) goto LA6;
		e = ((NI) ((NI)(e_75880 & 65535)));
	}
	goto LA1;
	LA6: ;
	{
		e = e_75880;
	}
	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;
		NI i_75922;
		NI HEX3Atmp_75923;
		NI res_75925;
		n = (*typ).node;
		s = (*n).sons;
		i_75922 = 0;
		HEX3Atmp_75923 = 0;
		HEX3Atmp_75923 = (NI32)((*n).len - 1);
		res_75925 = 0;
		while (1) {
			if (!(res_75925 <= HEX3Atmp_75923)) goto LA18;
			i_75922 = res_75925;
			{
				if (!((*s[(i_75922)- 0]).offset == e)) goto LA21;
				result = cstrToNimstr((*s[(i_75922)- 0]).name);
				goto BeforeRet;
			}
			LA21: ;
			res_75925 += 1;
		} LA18: ;
	}
	LA9: ;
	LOC23 = 0;
	LOC24 = 0;
	LOC24 = nimIntToStr(e);
	LOC23 = rawNewString(LOC24->Sup.len + 16);
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP1602));
	result = LOC23;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_524223)(TY188922* x_524229) {
	void* result;
	result = 0;
	result = ((void*) (x_524229));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_524207)(TY188922* x_524213, TY188922* y_524218) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_524223(x_524213);
		LOC4 = 0;
		LOC4 = seqtoptr_524223(y_524218);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_524223(x_524213);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_524223(y_524218);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_524310;
		NI HEX3Atmp_524311;
		NI res_524313;
		if (!(x_524213->Sup.len == y_524218->Sup.len)) goto LA15;
		i_524310 = 0;
		HEX3Atmp_524311 = 0;
		HEX3Atmp_524311 = (NI32)(x_524213->Sup.len - 1);
		res_524313 = 0;
		while (1) {
			if (!(res_524313 <= HEX3Atmp_524311)) goto LA17;
			i_524310 = res_524313;
			{
				if (!!((x_524213->data[i_524310] == y_524218->data[i_524310]))) goto LA20;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA20: ;
			res_524313 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_524191)(TY188922** x_524199, NI32 y_524203) {
	{
		NIM_BOOL LOC3;
		TY524333 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_524207((*x_524199), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_524199), (TY188922*) newSeq((&NTI188922), 1));
		LOC6[0] = y_524203;
		(*x_524199)->data[0] = LOC6[0];
	}
	goto LA1;
	LA4: ;
	{
		(*x_524199) = (TY188922*) incrSeq(&((*x_524199))->Sup, sizeof(NI32));
		(*x_524199)->data[(*x_524199)->Sup.len-1] = y_524203;
	}
	LA1: ;
}

N_NIMCALL(void, write_10479)(FILE* f, NimStringDesc** a, NI aLen0) {
	NimStringDesc* x_72669;
	NI i_72673;
	x_72669 = 0;
	i_72673 = 0;
	while (1) {
		if (!(i_72673 < aLen0)) goto LA1;
		x_72669 = a[i_72673];
		write_10463(f, x_72669);
		i_72673 += 1;
	} LA1: ;
}
N_NIMCALL(void, TMP2045)(void* p, NI op) {
	EAssertionFailed* a;
	a = (EAssertionFailed*)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, raiseassert_79492)(NimStringDesc* msg) {
	EAssertionFailed* e_79497;
	NimStringDesc* LOC1;
	e_79497 = 0;
	e_79497 = (EAssertionFailed*) newObj((&NTI79601), sizeof(EAssertionFailed));
	(*e_79497).Sup.Sup.Sup.m_type = (&NTI2449);
	LOC1 = 0;
	LOC1 = (*e_79497).Sup.Sup.message; (*e_79497).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_79497, "EAssertionFailed");
}

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

N_NIMCALL(NI, rawfilesize_72685)(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_72692)(FILE* file, NI len) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(len);
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = readbuffer_10627(file, ((void*) (&result->data[0])), len);
		if (!!((LOC3 == len))) goto LA4;
		raiseeio_72005(((NimStringDesc*) &TMP2481));
	}
	LA4: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readallfile_72701)(FILE* file) {
	NimStringDesc* result;
	NI len;
	result = 0;
	len = rawfilesize_72685(file);
	result = readallfile_72692(file, len);
	return result;
}

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

N_NIMCALL(NimStringDesc*, readfile_10440)(NimStringDesc* filename) {
	NimStringDesc* result;
	FILE* f;
	TSafePoint TMP2480;
	result = 0;
	f = open_10217(filename, ((NU8) 0), -1);
	pushSafePoint(&TMP2480);
	TMP2480.status = setjmp(TMP2480.context);
	if (TMP2480.status == 0) {
		result = readallfile_72701(f);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2480.status != 0) reraiseException();
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_227959)(TY227866 x_227963, TY227866 y_227965) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_227963.Field0 == y_227965.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_227963.Field1 == y_227965.Field1))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_233280)(ttypeseq188835* x_233286) {
	void* result;
	result = 0;
	result = ((void*) (x_233286));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_233264)(ttypeseq188835* x_233270, ttypeseq188835* y_233275) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_233280(x_233270);
		LOC4 = 0;
		LOC4 = seqtoptr_233280(y_233275);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_233280(x_233270);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_233280(y_233275);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_233367;
		NI HEX3Atmp_233384;
		NI res_233386;
		if (!(x_233270->Sup.len == y_233275->Sup.len)) goto LA15;
		i_233367 = 0;
		HEX3Atmp_233384 = 0;
		HEX3Atmp_233384 = (NI32)(x_233270->Sup.len - 1);
		res_233386 = 0;
		while (1) {
			if (!(res_233386 <= HEX3Atmp_233384)) goto LA17;
			i_233367 = res_233386;
			{
				if (!!((x_233270->data[i_233367] == y_233275->data[i_233367]))) goto LA20;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA20: ;
			res_233386 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_273475)(ttypeseq188835** x_273483, ttype188837* y_273487) {
	{
		NIM_BOOL LOC3;
		TY350968 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_233264((*x_273483), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_273483), (ttypeseq188835*) newSeq((&NTI188835), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_273487;
		asgnRefNoCycle((void**) &(*x_273483)->data[0], LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_273483) = (ttypeseq188835*) incrSeq(&((*x_273483))->Sup, sizeof(ttype188837*));
		asgnRefNoCycle((void**) &(*x_273483)->data[(*x_273483)->Sup.len-1], y_273487);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_360713)(TY360552* x_360719) {
	void* result;
	result = 0;
	result = ((void*) (x_360719));
	return result;
}

static N_INLINE(void*, seqtoptr_360837)(TY360556* x_360843) {
	void* result;
	result = 0;
	result = ((void*) (x_360843));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360926)(tentry360549 x_360930, tentry360549 y_360932) {
	NIM_BOOL result;
	result = 0;
	{
		if (!!((x_360930.Pos == y_360932.Pos))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x_360930.Sym == y_360932.Sym))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360821)(TY360556* x_360827, TY360556* y_360832) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_360837(x_360827);
		LOC4 = 0;
		LOC4 = seqtoptr_360837(y_360832);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_360837(x_360827);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_360837(y_360832);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_360924;
		NI HEX3Atmp_360960;
		NI res_360962;
		if (!(x_360827->Sup.len == y_360832->Sup.len)) goto LA15;
		i_360924 = 0;
		HEX3Atmp_360960 = 0;
		HEX3Atmp_360960 = (NI32)(x_360827->Sup.len - 1);
		res_360962 = 0;
		while (1) {
			if (!(res_360962 <= HEX3Atmp_360960)) goto LA17;
			i_360924 = res_360962;
			{
				NIM_BOOL LOC20;
				LOC20 = 0;
				LOC20 = HEX3DHEX3D_360926(x_360827->data[i_360924], y_360832->data[i_360924]);
				if (!!(LOC20)) goto LA21;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA21: ;
			res_360962 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360802)(tlinemap360551 x_360806, tlinemap360551 y_360808) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_360821(x_360806.Entries, y_360808.Entries);
		if (!!(LOC3)) goto LA4;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA4: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_360697)(TY360552* x_360703, TY360552* y_360708) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_360713(x_360703);
		LOC4 = 0;
		LOC4 = seqtoptr_360713(y_360708);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_360713(x_360703);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_360713(y_360708);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_360800;
		NI HEX3Atmp_360967;
		NI res_360969;
		if (!(x_360703->Sup.len == y_360708->Sup.len)) goto LA15;
		i_360800 = 0;
		HEX3Atmp_360967 = 0;
		HEX3Atmp_360967 = (NI32)(x_360703->Sup.len - 1);
		res_360969 = 0;
		while (1) {
			if (!(res_360969 <= HEX3Atmp_360967)) goto LA17;
			i_360800 = res_360969;
			{
				NIM_BOOL LOC20;
				LOC20 = 0;
				LOC20 = HEX3DHEX3D_360802(x_360703->data[i_360800], y_360708->data[i_360800]);
				if (!!(LOC20)) goto LA21;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA21: ;
			res_360969 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, genericShallowAssign)(void* dest, void* src, TNimType* mt) {
	gcdisable_6602();
	genericassignaux_73806(dest, src, mt, NIM_TRUE);
	gcenable_6604();
}

N_NIMCALL(NCSTRING*, alloccstringarray_10801)(NimStringDesc** a, NI aLen0) {
	NCSTRING* result;
	void* LOC1;
	NimStringDesc** x;
	NI i_10830;
	NI HEX3Atmp_10836;
	NI res_10838;
	result = 0;
	LOC1 = 0;
	LOC1 = alloc0_4616((NI32)((NI32)(aLen0 + 1) * 4));
	result = ((NCSTRING*) (LOC1));
	x = ((NimStringDesc**) (a));
	i_10830 = 0;
	HEX3Atmp_10836 = 0;
	HEX3Atmp_10836 = (aLen0-1);
	res_10838 = 0;
	while (1) {
		void* LOC3;
		if (!(res_10838 <= HEX3Atmp_10836)) goto LA2;
		i_10830 = res_10838;
		LOC3 = 0;
		LOC3 = alloc0_4616((NI32)(x[(i_10830)- 0]->Sup.len + 1));
		result[(i_10830)- 0] = ((NCSTRING) (LOC3));
		memcpy(((void*) (result[(i_10830)- 0])), ((void*) (&x[(i_10830)- 0]->data[0])), x[(i_10830)- 0]->Sup.len);
		res_10838 += 1;
	} LA2: ;
	return result;
}

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

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

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

N_NIMCALL(NI64, getfilepos_10655)(FILE* f) {
	NI64 result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = ftell(f);
	result = ((NI64) (LOC1));
	{
		if (!(result < 0)) goto LA4;
		raiseeio_72005(((NimStringDesc*) &TMP2654));
	}
	LA4: ;
	return result;
}

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

N_NIMCALL(tinstantiation188823*, new_419481)(void) {
	tinstantiation188823* result;
	result = 0;
	result = (tinstantiation188823*) newObj((&NTI188825), sizeof(tinstantiation188823));
	return result;
}

static N_INLINE(void*, seqtoptr_191908)(TY188933* x_191914) {
	void* result;
	result = 0;
	result = ((void*) (x_191914));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_191892)(TY188933* x_191898, TY188933* y_191903) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_191908(x_191898);
		LOC4 = 0;
		LOC4 = seqtoptr_191908(y_191903);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_191908(x_191898);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_191908(y_191903);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_191995;
		NI HEX3Atmp_192012;
		NI res_192014;
		if (!(x_191898->Sup.len == y_191903->Sup.len)) goto LA15;
		i_191995 = 0;
		HEX3Atmp_192012 = 0;
		HEX3Atmp_192012 = (NI32)(x_191898->Sup.len - 1);
		res_192014 = 0;
		while (1) {
			if (!(res_192014 <= HEX3Atmp_192012)) goto LA17;
			i_191995 = res_192014;
			{
				if (!!((x_191898->data[i_191995] == y_191903->data[i_191995]))) goto LA20;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA20: ;
			res_192014 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_419570)(TY188933** x_419578, tinstantiation188823* y_419582) {
	{
		NIM_BOOL LOC3;
		TY419616 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_191892((*x_419578), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_419578), (TY188933*) newSeq((&NTI188933), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_419582;
		asgnRefNoCycle((void**) &(*x_419578)->data[0], LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_419578) = (TY188933*) incrSeq(&((*x_419578))->Sup, sizeof(tinstantiation188823*));
		asgnRefNoCycle((void**) &(*x_419578)->data[(*x_419578)->Sup.len-1], y_419582);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_272180)(tnodeseq188797* x_272186) {
	void* result;
	result = 0;
	result = ((void*) (x_272186));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_272164)(tnodeseq188797* x_272170, tnodeseq188797* y_272175) {
	NIM_BOOL result;
	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_272180(x_272170);
		LOC4 = 0;
		LOC4 = seqtoptr_272180(y_272175);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_272180(x_272170);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_272180(y_272175);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		NI i_272267;
		NI HEX3Atmp_272284;
		NI res_272286;
		if (!(x_272170->Sup.len == y_272175->Sup.len)) goto LA15;
		i_272267 = 0;
		HEX3Atmp_272284 = 0;
		HEX3Atmp_272284 = (NI32)(x_272170->Sup.len - 1);
		res_272286 = 0;
		while (1) {
			if (!(res_272286 <= HEX3Atmp_272284)) goto LA17;
			i_272267 = res_272286;
			{
				if (!!((x_272170->data[i_272267] == y_272175->data[i_272267]))) goto LA20;
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA20: ;
			res_272286 += 1;
		} LA17: ;
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_420113)(tnodeseq188797** x_420121, tnode188803* y_420125) {
	{
		NIM_BOOL LOC3;
		TY207692 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_272164((*x_420121), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) &(*x_420121), (tnodeseq188797*) newSeq((&NTI188797), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y_420125;
		asgnRefNoCycle((void**) &(*x_420121)->data[0], LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x_420121) = (tnodeseq188797*) incrSeq(&((*x_420121))->Sup, sizeof(tnode188803*));
		asgnRefNoCycle((void**) &(*x_420121)->data[(*x_420121)->Sup.len-1], y_420125);
	}
	LA1: ;
}

N_NIMCALL(void, insert_420294)(tnodeseq188797** x_420302, tnode188803* item_420306, NI i_420308) {
	NI xl;
	NI j;
	xl = (*x_420302)->Sup.len;
	(*x_420302) = (tnodeseq188797*) setLengthSeq(&((*x_420302))->Sup, sizeof(tnode188803*), (NI32)(xl + 1));
	j = (NI32)(xl - 1);
	while (1) {
		if (!(i_420308 <= j)) goto LA1;
		asgnRefNoCycle((void**) &(*x_420302)->data[(NI32)(j + 1)], (*x_420302)->data[j]);
		j -= 1;
	} LA1: ;
	asgnRefNoCycle((void**) &(*x_420302)->data[i_420308], item_420306);
}

N_NIMCALL(tnodeseq188797*, HEX5BHEX5D_438583)(tnodeseq188797* s_438589, tslice78892 x_438594) {
	tnodeseq188797* result;
	NI a;
	NI l;
	NI LOC6;
	NI i_438659;
	NI HEX3Atmp_438660;
	NI res_438662;
	result = 0;
	{
		if (!(0 <= x_438594.A)) goto LA3;
		a = x_438594.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI32)(s_438589->Sup.len + x_438594.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_438594.B)) goto LA9;
		LOC6 = x_438594.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI32)(s_438589->Sup.len + x_438594.B);
	}
	LA7: ;
	l = (NI32)((NI32)(LOC6 - a) + 1);
	result = (tnodeseq188797*) newSeq((&NTI188797), l);
	i_438659 = 0;
	HEX3Atmp_438660 = 0;
	HEX3Atmp_438660 = l - 1;
	res_438662 = 0;
	while (1) {
		if (!(res_438662 <= HEX3Atmp_438660)) goto LA12;
		i_438659 = res_438662;
		asgnRefNoCycle((void**) &result->data[i_438659], s_438589->data[(NI32)(i_438659 + a)]);
		res_438662 += 1;
	} LA12: ;
	return result;
}

N_NIMCALL(void, delete_420419)(tnodeseq188797** x_420427, NI i_420431) {
	NI xl;
	NI j_420454;
	NI HEX3Atmp_420471;
	NI res_420473;
	xl = (*x_420427)->Sup.len;
	j_420454 = 0;
	HEX3Atmp_420471 = 0;
	HEX3Atmp_420471 = (NI32)(xl - 2);
	res_420473 = i_420431;
	while (1) {
		if (!(res_420473 <= HEX3Atmp_420471)) goto LA1;
		j_420454 = res_420473;
		asgnRefNoCycle((void**) &(*x_420427)->data[j_420454], (*x_420427)->data[(NI32)(j_420454 + 1)]);
		res_420473 += 1;
	} LA1: ;
	(*x_420427) = (tnodeseq188797*) setLengthSeq(&((*x_420427))->Sup, sizeof(tnode188803*), (NI32)(xl - 1));
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_420606)(tnodeseq188797** s_420614, tslice78892 x_420620, tnode188803** b_420625, NI b_420625Len0) {
	NI a;
	NI l;
	NI LOC6;
	{
		if (!(0 <= x_420620.A)) goto LA3;
		a = x_420620.A;
	}
	goto LA1;
	LA3: ;
	{
		a = (NI32)((*s_420614)->Sup.len + x_420620.A);
	}
	LA1: ;
	LOC6 = 0;
	{
		if (!(0 <= x_420620.B)) goto LA9;
		LOC6 = x_420620.B;
	}
	goto LA7;
	LA9: ;
	{
		LOC6 = (NI32)((*s_420614)->Sup.len + x_420620.B);
	}
	LA7: ;
	l = (NI32)((NI32)(LOC6 - a) + 1);
	{
		NI i_420691;
		NI HEX3Atmp_420812;
		NI res_420814;
		if (!(l == b_420625Len0)) goto LA14;
		i_420691 = 0;
		HEX3Atmp_420812 = 0;
		HEX3Atmp_420812 = l - 1;
		res_420814 = 0;
		while (1) {
			if (!(res_420814 <= HEX3Atmp_420812)) goto LA16;
			i_420691 = res_420814;
			asgnRefNoCycle((void**) &(*s_420614)->data[(NI32)(i_420691 + a)], b_420625[i_420691]);
			res_420814 += 1;
		} LA16: ;
	}
	goto LA12;
	LA14: ;
	{
		NI slen_420628;
		NI shift_420630;
		NI newlen_420632;
		NI i_420638;
		NI HEX3Atmp_420825;
		NI res_420827;
		slen_420628 = (*s_420614)->Sup.len;
		shift_420630 = (NI32)(b_420625Len0 - l);
		newlen_420632 = (NI32)(slen_420628 + shift_420630);
		{
			NI i_420634;
			NI HEX3Atmp_420816;
			NI HEX3Atmp_420817;
			NI res_420819;
			if (!(0 < shift_420630)) goto LA20;
			(*s_420614) = (tnodeseq188797*) setLengthSeq(&((*s_420614))->Sup, sizeof(tnode188803*), newlen_420632);
			i_420634 = 0;
			HEX3Atmp_420816 = 0;
			HEX3Atmp_420817 = 0;
			HEX3Atmp_420816 = (NI32)(newlen_420632 - 1);
			HEX3Atmp_420817 = (NI32)((NI32)(a + shift_420630) + 1);
			res_420819 = HEX3Atmp_420816;
			while (1) {
				if (!(HEX3Atmp_420817 <= res_420819)) goto LA22;
				i_420634 = res_420819;
				asgnRefNoCycle((void**) &(*s_420614)->data[i_420634], (*s_420614)->data[(NI32)(i_420634 - shift_420630)]);
				res_420819 -= 1;
			} LA22: ;
		}
		goto LA18;
		LA20: ;
		{
			NI i_420636;
			NI HEX3Atmp_420820;
			NI HEX3Atmp_420821;
			NI res_420823;
			i_420636 = 0;
			HEX3Atmp_420820 = 0;
			HEX3Atmp_420821 = 0;
			HEX3Atmp_420820 = (NI32)(a + b_420625Len0);
			HEX3Atmp_420821 = (NI32)((NI32)((*s_420614)->Sup.len - 1) + shift_420630);
			res_420823 = HEX3Atmp_420820;
			while (1) {
				if (!(res_420823 <= HEX3Atmp_420821)) goto LA24;
				i_420636 = res_420823;
				asgnRefNoCycle((void**) &(*s_420614)->data[i_420636], (*s_420614)->data[(NI32)(i_420636 - shift_420630)]);
				res_420823 += 1;
			} LA24: ;
			(*s_420614) = (tnodeseq188797*) setLengthSeq(&((*s_420614))->Sup, sizeof(tnode188803*), newlen_420632);
		}
		LA18: ;
		i_420638 = 0;
		HEX3Atmp_420825 = 0;
		HEX3Atmp_420825 = b_420625Len0 - 1;
		res_420827 = 0;
		while (1) {
			if (!(res_420827 <= HEX3Atmp_420825)) goto LA25;
			i_420638 = res_420827;
			asgnRefNoCycle((void**) &(*s_420614)->data[(NI32)(i_420638 + a)], b_420625[i_420638]);
			res_420827 += 1;
		} LA25: ;
	}
	LA12: ;
}

N_NIMCALL(tnodeseq188797*, newseq_459573)(NI len_459577) {
	tnodeseq188797* result;
	result = 0;
	result = (tnodeseq188797*) newSeq((&NTI188797), len_459577);
	return result;
}

N_NIMCALL(void, gcfullcollect_6606)(void) {
	NI oldthreshold;
	oldthreshold = gch_43044.Cyclethreshold;
	gch_43044.Cyclethreshold = 0;
	collectct_44808(&gch_43044);
	gch_43044.Cyclethreshold = oldthreshold;
}

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

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

N_NIMCALL(NI, cmp_361132)(NI x_361136, NI y_361138) {
	NI result;
	result = 0;
	{
		if (!(x_361136 == y_361138)) goto LA3;
		result = 0;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(x_361136 < y_361138)) goto LA7;
		result = -1;
		goto BeforeRet;
	}
	LA7: ;
	result = 1;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readline_10484)(FILE* f) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(80);
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = readline_10487(f, &result);
		if (!!(LOC3)) goto LA4;
		raiseeio_72005(((NimStringDesc*) &TMP4532));
	}
	LA4: ;
	return result;
}
N_NIMCALL(void, TMP4543)(void* p, NI op) {
	TY158815* a;
	NI LOC1;
	a = (TY158815*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1], op);
	}
}

N_NIMCALL(NimStringDesc*, gcgetstatistics_6621)(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_6602();
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = gettotalmem_5265();
	LOC3 = 0;
	LOC3 = nimIntToStr(LOC2);
	LOC4 = 0;
	LOC4 = getoccupiedmem_5261();
	LOC5 = 0;
	LOC5 = nimIntToStr(LOC4);
	LOC6 = 0;
	LOC6 = nimIntToStr(gch_43044.Stat.Stackscans);
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_43044.Stat.Maxstackcells);
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_43044.Stat.Cyclecollections);
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_43044.Stat.Maxthreshold);
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_43044.Zct.Cap);
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_43044.Stat.Cycletablesize);
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_43044.Stat.Maxstacksize);
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_43044.Stat.Maxpause / 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*) &TMP4552));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP4553));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP4554));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP4555));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP4556));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP4557));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP4558));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP4559));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP4560));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP4561));
appendString(LOC1, LOC13);
	result = LOC1;
	gcenable_6604();
	return result;
}
N_NOINLINE(void, systemInit)(void) {
	strdesc_8005.size = 4;
	strdesc_8005.kind = ((NU8) 28);
	strdesc_8005.flags = 2;
	initallocator_7801();
	initStackBottom();
	initgc_7601();
	registersignalhandler_16403();
}

N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP47[4];
static TNimNode TMP0[20];
NTI2409.size = sizeof(TNimObject);
NTI2409.kind = 17;
NTI2409.base = 0;
NTI2409.flags = 1;
TMP0[0].len = 0; TMP0[0].kind = 2;
NTI2409.node = &TMP0[0];
NTI106.size = sizeof(NI);
NTI106.kind = 31;
NTI106.base = 0;
NTI106.flags = 3;
NTI143.size = sizeof(NimStringDesc*);
NTI143.kind = 28;
NTI143.base = 0;
NTI143.flags = 2;
NTI2425.size = sizeof(E_Base);
NTI2425.kind = 17;
NTI2425.base = (&NTI2409);
TMP47[0] = &TMP0[2];
NTI6816.size = sizeof(E_Base*);
NTI6816.kind = 22;
NTI6816.base = (&NTI2425);
NTI6816.marker = TMP48;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(E_Base, parent);
TMP0[2].typ = (&NTI6816);
TMP0[2].name = "parent";
TMP47[1] = &TMP0[3];
NTI145.size = sizeof(NCSTRING);
NTI145.kind = 29;
NTI145.base = 0;
NTI145.flags = 3;
TMP0[3].kind = 1;
TMP0[3].offset = offsetof(E_Base, name);
TMP0[3].typ = (&NTI145);
TMP0[3].name = "name";
TMP47[2] = &TMP0[4];
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(E_Base, message);
TMP0[4].typ = (&NTI143);
TMP0[4].name = "msg";
TMP47[3] = &TMP0[5];
TMP0[5].kind = 1;
TMP0[5].offset = offsetof(E_Base, trace);
TMP0[5].typ = (&NTI143);
TMP0[5].name = "trace";
TMP0[1].len = 4; TMP0[1].kind = 2; TMP0[1].sons = &TMP47[0];
NTI2425.node = &TMP0[1];
NTI2429.size = sizeof(esynch2429);
NTI2429.kind = 17;
NTI2429.base = (&NTI2425);
TMP0[6].len = 0; TMP0[6].kind = 2;
NTI2429.node = &TMP0[6];
NTI2441.size = sizeof(earithmetic2441);
NTI2441.kind = 17;
NTI2441.base = (&NTI2429);
TMP0[7].len = 0; TMP0[7].kind = 2;
NTI2441.node = &TMP0[7];
NTI2445.size = sizeof(EOverflow);
NTI2445.kind = 17;
NTI2445.base = (&NTI2441);
TMP0[8].len = 0; TMP0[8].kind = 2;
NTI2445.node = &TMP0[8];
NTI18401.size = sizeof(EOverflow*);
NTI18401.kind = 22;
NTI18401.base = (&NTI2445);
NTI18401.marker = TMP49;
NTI2431.size = sizeof(esystem2431);
NTI2431.kind = 17;
NTI2431.base = (&NTI2429);
TMP0[9].len = 0; TMP0[9].kind = 2;
NTI2431.node = &TMP0[9];
NTI2457.size = sizeof(eoutofmemory2457);
NTI2457.kind = 17;
NTI2457.base = (&NTI2431);
TMP0[10].len = 0; TMP0[10].kind = 2;
NTI2457.node = &TMP0[10];
NTI112.size = sizeof(NI32);
NTI112.kind = 34;
NTI112.base = 0;
NTI112.flags = 3;
NTI2453.size = sizeof(einvalidvalue2453);
NTI2453.kind = 17;
NTI2453.base = (&NTI2429);
TMP0[11].len = 0; TMP0[11].kind = 2;
NTI2453.node = &TMP0[11];
NTI17801.size = sizeof(einvalidvalue2453*);
NTI17801.kind = 22;
NTI17801.base = (&NTI2453);
NTI17801.marker = TMP135;
NTI110.size = sizeof(NI16);
NTI110.kind = 33;
NTI110.base = 0;
NTI110.flags = 3;
NTI2433.size = sizeof(eio2433);
NTI2433.kind = 17;
NTI2433.base = (&NTI2431);
TMP0[12].len = 0; TMP0[12].kind = 2;
NTI2433.node = &TMP0[12];
NTI72201.size = sizeof(eio2433*);
NTI72201.kind = 22;
NTI72201.base = (&NTI2433);
NTI72201.marker = TMP148;
NTI134.size = sizeof(NIM_BOOL);
NTI134.kind = 1;
NTI134.base = 0;
NTI134.flags = 3;
NTI4289.size = sizeof(NI64);
NTI4289.kind = 35;
NTI4289.base = 0;
NTI4289.flags = 3;
NTI4291.size = sizeof(NF);
NTI4291.kind = 36;
NTI4291.base = 0;
NTI4291.flags = 3;
NTI2411.size = sizeof(TNimObject*);
NTI2411.kind = 22;
NTI2411.base = (&NTI2409);
NTI2411.marker = TMP819;
NTI147.size = sizeof(void*);
NTI147.kind = 26;
NTI147.base = 0;
NTI147.flags = 3;
NTI4409.size = sizeof(int);
NTI4409.kind = 34;
NTI4409.base = 0;
NTI4409.flags = 3;
NTI22618.size = sizeof(TY22618);
NTI22618.kind = 16;
NTI22618.base = (&NTI106);
NTI22618.flags = 3;
NTI70707.size = sizeof(NI);
NTI70707.kind = 20;
NTI70707.base = (&NTI106);
NTI70707.flags = 3;
NTI126.size = sizeof(NF);
NTI126.kind = 36;
NTI126.base = 0;
NTI126.flags = 3;
NTI2459.size = sizeof(einvalidindex2459);
NTI2459.kind = 17;
NTI2459.base = (&NTI2429);
TMP0[13].len = 0; TMP0[13].kind = 2;
NTI2459.node = &TMP0[13];
NTI114213.size = sizeof(einvalidindex2459*);
NTI114213.kind = 22;
NTI114213.base = (&NTI2459);
NTI114213.marker = TMP1016;
NTI73201.size = sizeof(eoutofmemory2457*);
NTI73201.kind = 22;
NTI73201.base = (&NTI2457);
NTI73201.marker = TMP1138;
NTI2467.size = sizeof(enoexceptiontoreraise2467);
NTI2467.kind = 17;
NTI2467.base = (&NTI2429);
TMP0[14].len = 0; TMP0[14].kind = 2;
NTI2467.node = &TMP0[14];
NTI15001.size = sizeof(enoexceptiontoreraise2467*);
NTI15001.kind = 22;
NTI15001.base = (&NTI2467);
NTI15001.marker = TMP1140;
NTI2435.size = sizeof(eos2435);
NTI2435.kind = 17;
NTI2435.base = (&NTI2431);
TMP0[15].kind = 1;
TMP0[15].offset = offsetof(eos2435, Errorcode);
TMP0[15].typ = (&NTI112);
TMP0[15].name = "errorCode";
NTI2435.node = &TMP0[15];
NTI106208.size = sizeof(eos2435*);
NTI106208.kind = 22;
NTI106208.base = (&NTI2435);
NTI106208.marker = TMP1173;
NTI10002.size = sizeof(void*);
NTI10002.kind = 18;
NTI10002.base = 0;
NTI10002.flags = 3;
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI10002.node = &TMP0[16];
NTI10004.size = sizeof(FILE*);
NTI10004.kind = 21;
NTI10004.base = (&NTI10002);
NTI10004.flags = 3;
NTI2463.size = sizeof(eoutofrange2463);
NTI2463.kind = 17;
NTI2463.base = (&NTI2429);
TMP0[17].len = 0; TMP0[17].kind = 2;
NTI2463.node = &TMP0[17];
NTI108.size = sizeof(NI8);
NTI108.kind = 32;
NTI108.base = 0;
NTI108.flags = 3;
NTI122.size = sizeof(NU32);
NTI122.kind = 43;
NTI122.base = 0;
NTI122.flags = 3;
NTI2449.size = sizeof(EAssertionFailed);
NTI2449.kind = 17;
NTI2449.base = (&NTI2429);
TMP0[18].len = 0; TMP0[18].kind = 2;
NTI2449.node = &TMP0[18];
NTI79601.size = sizeof(EAssertionFailed*);
NTI79601.kind = 22;
NTI79601.base = (&NTI2449);
NTI79601.marker = TMP2045;
NTI10008.size = sizeof(int);
NTI10008.kind = 34;
NTI10008.base = 0;
NTI10008.flags = 3;
NTI2443.size = sizeof(EDivByZero);
NTI2443.kind = 17;
NTI2443.base = (&NTI2441);
TMP0[19].len = 0; TMP0[19].kind = 2;
NTI2443.node = &TMP0[19];
NTI141.size = sizeof(NIM_CHAR);
NTI141.kind = 2;
NTI141.base = 0;
NTI141.flags = 3;
NTI158815.size = sizeof(TY158815*);
NTI158815.kind = 24;
NTI158815.base = (&NTI150607);
NTI158815.flags = 2;
NTI158815.marker = TMP4543;
}

