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

#include <sys/mman.h>

#include <stdio.h>

#include <stdlib.h>

#include <setjmp.h>

#include <string.h>

#include <signal.h>
typedef struct Exception Exception;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tavlnode28408 Tavlnode28408;
typedef struct Tgcheap48416 Tgcheap48416;
typedef struct Tcellseq46563 Tcellseq46563;
typedef struct Tcell46547 Tcell46547;
typedef struct Tcellset46559 Tcellset46559;
typedef struct Tpagedesc46555 Tpagedesc46555;
typedef struct Tmemregion28410 Tmemregion28410;
typedef struct Tsmallchunk27640 Tsmallchunk27640;
typedef struct Tllchunk28404 Tllchunk28404;
typedef struct Tbigchunk27642 Tbigchunk27642;
typedef struct Tintset27617 Tintset27617;
typedef struct Ttrunk27613 Ttrunk27613;
typedef struct Tgcstat48414 Tgcstat48414;
typedef struct Tbasechunk27638 Tbasechunk27638;
typedef struct Tfreecell27630 Tfreecell27630;
typedef struct TGenericSeq TGenericSeq;
typedef struct NimStringDesc NimStringDesc;
typedef struct TSafePoint TSafePoint;
typedef struct TNimObject TNimObject;
typedef struct Overflowerror3443 Overflowerror3443;
typedef struct Arithmeticerror3439 Arithmeticerror3439;
typedef struct Systemerror3429 Systemerror3429;
typedef struct Outofmemerror3453 Outofmemerror3453;
typedef struct Valueerror3449 Valueerror3449;
typedef struct Ioerror3431 Ioerror3431;
typedef struct Reraiseerror3463 Reraiseerror3463;
typedef struct TY86545 TY86545;
typedef struct Rangeerror3459 Rangeerror3459;
typedef struct Oserror3433 Oserror3433;
typedef struct TY190933 TY190933;
typedef struct Indexerror3455 Indexerror3455;
typedef struct Assertionerror3447 Assertionerror3447;
typedef struct Ttypeseq190845 Ttypeseq190845;
typedef struct Ttype190849 Ttype190849;
typedef struct TY224855 TY224855;
typedef struct Tinstantiation190833 Tinstantiation190833;
typedef struct Tsym190843 Tsym190843;
typedef struct TY190944 TY190944;
typedef struct Tnodeseq190807 Tnodeseq190807;
typedef struct Tnode190813 Tnode190813;
typedef struct Slice85970 Slice85970;
typedef struct Divbyzeroerror3441 Divbyzeroerror3441;
typedef struct Tsymseq190815 Tsymseq190815;
typedef struct TY289746 TY289746;
typedef struct Jsonnodeobj289726 Jsonnodeobj289726;
typedef struct TY289741 TY289741;
typedef struct TY290209 TY290209;
typedef struct Tindexentry312396 Tindexentry312396;
typedef struct TY516225 TY516225;
typedef struct Tidobj167015 Tidobj167015;
typedef struct Tloc190827 Tloc190827;
typedef struct Ropeobj161009 Ropeobj161009;
typedef struct Tscope190837 Tscope190837;
typedef struct Tstrtable190817 Tstrtable190817;
typedef struct Tident167021 Tident167021;
typedef struct Tlineinfo163338 Tlineinfo163338;
typedef struct Tlib190831 Tlib190831;
typedef struct Tlistentry130022 Tlistentry130022;
typedef N_NIMCALL_PTR(NIM_BOOL, TY9021) (Exception* e);
typedef N_NIMCALL_PTR(NIM_BOOL, TY9026) (Exception* e);
typedef N_NIMCALL_PTR(void, TY9031) (void);
typedef N_NIMCALL_PTR(void, TY3289) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, TY3294) (void* p);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY3289 marker;
TY3294 deepcopy;
};
typedef Tavlnode28408* TY28414[2];
struct  Tavlnode28408  {
TY28414 link;
NI key;
NI upperbound;
NI level;
};
struct  Tcellseq46563  {
NI len;
NI cap;
Tcell46547** d;
};
struct  Tcellset46559  {
NI counter;
NI max;
Tpagedesc46555* head;
Tpagedesc46555** data;
};
typedef Tsmallchunk27640* TY28422[512];
typedef Ttrunk27613* Ttrunkbuckets27615[256];
struct  Tintset27617  {
Ttrunkbuckets27615 data;
};
struct  Tmemregion28410  {
NI minlargeobj;
NI maxlargeobj;
TY28422 freesmallchunks;
Tllchunk28404* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27642* freechunkslist;
Tintset27617 chunkstarts;
Tavlnode28408* root;
Tavlnode28408* deleted;
Tavlnode28408* last;
Tavlnode28408* freeavlnodes;
};
struct  Tgcstat48414  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48416  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46563 zct;
Tcellseq46563 decstack;
Tcellset46559 cycleroots;
Tcellseq46563 tempstack;
NI recgclock;
Tmemregion28410 region;
Tgcstat48414 stat;
};
struct  Tbasechunk27638  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27640  {
  Tbasechunk27638 Sup;
Tsmallchunk27640* next;
Tsmallchunk27640* prev;
Tfreecell27630* freelist;
NI free;
NI acc;
NF data;
};
struct  Tbigchunk27642  {
  Tbasechunk27638 Sup;
Tbigchunk27642* next;
Tbigchunk27642* prev;
NI align;
NF data;
};
typedef NI TY27620[8];
struct  Ttrunk27613  {
Ttrunk27613* next;
NI key;
TY27620 bits;
};
struct  Tllchunk28404  {
NI size;
NI acc;
Tllchunk28404* next;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tfreecell27630  {
Tfreecell27630* next;
NI zerofield;
};
typedef N_NIMCALL_PTR(void, TY17001) (NimStringDesc* msg);
typedef TFrame* TY17601[128];
struct  Tcell46547  {
NI refcount;
TNimType* typ;
};
struct  Tpagedesc46555  {
Tpagedesc46555* next;
NI key;
TY27620 bits;
};
typedef N_NIMCALL_PTR(void, TFinalizer) (void* self);
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
struct  TNimObject  {
TNimType* m_type;
};
struct  Exception  {
  TNimObject Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  Arithmeticerror3439  {
  Exception Sup;
};
struct  Overflowerror3443  {
  Arithmeticerror3439 Sup;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (Exception* e, void* ClEnv);
void* ClEnv;
} TY15809;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY15809 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP51) (Exception* e);
struct  Systemerror3429  {
  Exception Sup;
};
struct  Outofmemerror3453  {
  Systemerror3429 Sup;
};
typedef NIM_CHAR TY18816[2001];
struct  Valueerror3449  {
  Exception Sup;
};
struct  Ioerror3431  {
  Systemerror3429 Sup;
};
typedef NimStringDesc* TY79811[5];
struct  Reraiseerror3463  {
  Exception Sup;
};
struct TY86545 {
NimStringDesc* Field0;
NI Field1;
};
typedef NIM_CHAR TY77470[500];
struct  Rangeerror3459  {
  Exception Sup;
};
struct  Oserror3433  {
  Systemerror3429 Sup;
NI32 errorcode;
};
typedef NIM_CHAR TY77396[65];
typedef NI32 TY522284[1];
struct  Indexerror3455  {
  Exception Sup;
};
struct  Assertionerror3447  {
  Exception Sup;
};
struct TY224855 {
NI Field0;
NI Field1;
};
typedef Ttype190849* TY349187[1];
typedef NIM_CHAR TY82635[60];
struct  Tinstantiation190833  {
Tsym190843* sym;
Ttypeseq190845* concretetypes;
TY190933* usedby;
};
typedef Tinstantiation190833* TY412582[1];
typedef Tnode190813* TY208680[1];
struct  Slice85970  {
NI a;
NI b;
};
struct  Divbyzeroerror3441  {
  Arithmeticerror3439 Sup;
};
typedef Tsym190843* TY244431[1];
struct TY290209 {
NimStringDesc* Field0;
Jsonnodeobj289726* Field1;
};
struct  Tindexentry312396  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct  Tidobj167015  {
  TNimObject Sup;
NI id;
};
struct  Tloc190827  {
NU8 k;
NU8 s;
NU16 flags;
Ttype190849* t;
Ropeobj161009* r;
Ropeobj161009* heaproot;
};
struct  Ttype190849  {
  Tidobj167015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq190845* sons;
Tnode190813* n;
Tsym190843* owner;
Tsym190843* sym;
Tsym190843* destructor;
Tsym190843* deepcopy;
Tsym190843* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc190827 loc;
};
struct  Tstrtable190817  {
NI counter;
Tsymseq190815* data;
};
struct  Tlineinfo163338  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tsym190843  {
  Tidobj167015 Sup;
NU8 kind;
union{
struct {Ttypeseq190845* typeinstcache;
Tscope190837* typscope;
} S1;
struct {TY190944* procinstcache;
Tsym190843* gcunsafetyreason;
} S2;
struct {TY190944* usedgenerics;
Tstrtable190817 tab;
} S3;
struct {Tsym190843* guard;
} S4;
} kindU;
NU16 magic;
Ttype190849* typ;
Tident167021* name;
Tlineinfo163338 info;
Tsym190843* owner;
NU32 flags;
Tnode190813* ast;
NU32 options;
NI position;
NI offset;
Tloc190827 loc;
Tlib190831* annex;
Tnode190813* constraint;
};
struct  Tnode190813  {
Ttype190849* typ;
Tlineinfo163338 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym190843* sym;
} S4;
struct {Tident167021* ident;
} S5;
struct {Tnodeseq190807* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Jsonnodeobj289726  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY289741* fields;
} S6;
struct {TY289746* elems;
} S7;
} kindU;
};
struct  Ropeobj161009  {
  TNimObject Sup;
Ropeobj161009* left;
Ropeobj161009* right;
NI length;
NimStringDesc* data;
};
struct  Tscope190837  {
NI depthlevel;
Tstrtable190817 symbols;
Tnodeseq190807* usingsyms;
Tscope190837* parent;
};
struct  Tident167021  {
  Tidobj167015 Sup;
NimStringDesc* s;
Tident167021* next;
NI h;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Tlib190831  {
  Tlistentry130022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj161009* name;
Tnode190813* path;
};
struct TY190933 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Ttypeseq190845 {
  TGenericSeq Sup;
  Ttype190849* data[SEQ_DECL_SIZE];
};
struct TY190944 {
  TGenericSeq Sup;
  Tinstantiation190833* data[SEQ_DECL_SIZE];
};
struct Tnodeseq190807 {
  TGenericSeq Sup;
  Tnode190813* data[SEQ_DECL_SIZE];
};
struct Tsymseq190815 {
  TGenericSeq Sup;
  Tsym190843* data[SEQ_DECL_SIZE];
};
struct TY289746 {
  TGenericSeq Sup;
  Jsonnodeobj289726* data[SEQ_DECL_SIZE];
};
struct TY289741 {
  TGenericSeq Sup;
  TY290209 data[SEQ_DECL_SIZE];
};
struct TY516225 {
  TGenericSeq Sup;
  int data[SEQ_DECL_SIZE];
};
static N_INLINE(void, initallocator_10001)(void);
static N_INLINE(void, initStackBottom)(void);
N_NOINLINE(void, setStackBottom)(void* thestackbottom);
N_NIMCALL(void, initgc_9801)(void);
N_NIMCALL(void, init_46655)(Tcellseq46563* s, NI cap);
N_NOCONV(void*, alloc0_6017)(NI size);
N_NIMCALL(void*, alloc0_45219)(Tmemregion28410* allocator, NI size);
N_NIMCALL(void*, alloc_45031)(Tmemregion28410* allocator, NI size);
N_NIMCALL(void*, rawalloc_35901)(Tmemregion28410* a, NI requestedsize);
static N_INLINE(NI, roundup_27670)(NI x, NI v);
N_NIMCALL(Tsmallchunk27640*, getsmallchunk_35224)(Tmemregion28410* a);
N_NIMCALL(Tbigchunk27642*, getbigchunk_34417)(Tmemregion28410* a, NI size);
static N_INLINE(void, listremove_32202)(Tbigchunk27642** head, Tbigchunk27642* c);
N_NIMCALL(void, splitchunk_34215)(Tmemregion28410* a, Tbigchunk27642* c, NI size);
static N_INLINE(void, updateprevsize_31283)(Tmemregion28410* a, Tbigchunk27642* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_31218)(Tmemregion28410* a, void* p);
N_NIMCALL(NIM_BOOL, contains_29959)(Tintset27617* s, NI key);
N_NIMCALL(Ttrunk27613*, intsetget_29898)(Tintset27617* t, NI key);
static N_INLINE(NI, pageindex_30447)(void* p);
N_NIMCALL(void, incl_29983)(Tmemregion28410* a, Tintset27617* s, NI key);
N_NIMCALL(Ttrunk27613*, intsetput_29929)(Tmemregion28410* a, Tintset27617* t, NI key);
N_NIMCALL(void*, llalloc_28655)(Tmemregion28410* a, NI size);
static N_INLINE(void*, osallocpages_27415)(NI size);
N_NOINLINE(void, raiseoutofmem_26860)(void);
static N_INLINE(void, inccurrmem_28605)(Tmemregion28410* a, NI bytes);
static N_INLINE(NI, pageindex_30439)(Tbasechunk27638* c);
static N_INLINE(void, listadd_33423)(Tbigchunk27642** head, Tbigchunk27642* c);
N_NIMCALL(Tbigchunk27642*, requestoschunks_30465)(Tmemregion28410* a, NI size);
static N_INLINE(void, listadd_36804)(Tsmallchunk27640** head, Tsmallchunk27640* c);
static N_INLINE(void, listremove_39602)(Tsmallchunk27640** head, Tsmallchunk27640* c);
N_NIMCALL(void, add_29601)(Tmemregion28410* a, Tavlnode28408** t, NI key, NI upperbound);
N_NIMCALL(Tavlnode28408*, allocavlnode_28830)(Tmemregion28410* a, NI key, NI upperbound);
N_NIMCALL(void, skew_29576)(Tavlnode28408** t);
N_NIMCALL(void, split_29584)(Tavlnode28408** t);
N_NIMCALL(void, init_46676)(Tcellset46559* s);
N_NOCONV(void, signalHandler)(int sig);
N_NIMCALL(void, showerrormessage_17209)(NCSTRING data);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len);
N_NIMCALL(NimStringDesc*, rawNewStringNoInit)(NI space);
N_NIMCALL(void*, newObjNoInit)(TNimType* typ, NI size);
N_NIMCALL(void*, rawnewobj_56204)(TNimType* typ, NI size, Tgcheap48416* gch);
N_NIMCALL(void, collectct_50410)(Tgcheap48416* gch);
N_NOINLINE(NI, stacksize_70611)(void);
static N_INLINE(NI, getoccupiedmem_46469)(Tmemregion28410* a);
N_NIMCALL(void, collectctbody_73221)(Tgcheap48416* gch);
static N_INLINE(void, prepareforinteriorpointerchecking_43882)(Tmemregion28410* a);
N_NIMCALL(NI, lowgauge_29418)(Tavlnode28408* n);
N_NIMCALL(NI, highgauge_29444)(Tavlnode28408* n);
N_CDECL(void, markstackandregisters_70840)(Tgcheap48416* gch);
static N_INLINE(void, gcmark_69246)(Tgcheap48416* gch, void* p);
static N_INLINE(Tcell46547*, usrtocell_50046)(void* usr);
N_NIMCALL(void*, interiorallocatedptr_43889)(Tmemregion28410* a, void* p);
static N_INLINE(Tbasechunk27638*, pageaddr_30455)(void* p);
static N_INLINE(NIM_BOOL, chunkunused_30319)(Tbasechunk27638* c);
static N_INLINE(NIM_BOOL, issmallchunk_30308)(Tbasechunk27638* c);
N_NIMCALL(Tavlnode28408*, inrange_29514)(Tavlnode28408* root, NI key);
static N_INLINE(void, add_46632)(Tcellseq46563* s, Tcell46547* c);
N_NOCONV(void*, alloc_6001)(NI size);
N_NOCONV(void, dealloc_6048)(void* p);
N_NIMCALL(void, dealloc_45228)(Tmemregion28410* allocator, void* p);
N_NIMCALL(void, rawdealloc_42223)(Tmemregion28410* a, void* p);
N_NIMCALL(void, freebigchunk_31406)(Tmemregion28410* a, Tbigchunk27642* c_31410);
N_NIMCALL(void, excl_29997)(Tintset27617* s, NI key);
N_NIMCALL(void, freeoschunks_31010)(Tmemregion28410* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_27424)(void* p, NI size);
static N_INLINE(void, deccurrmem_28622)(Tmemregion28410* a, NI bytes);
N_NIMCALL(void, del_29804)(Tmemregion28410* a, Tavlnode28408** t, NI x);
static N_INLINE(void, deallocavlnode_29406)(Tmemregion28410* a, Tavlnode28408* n);
N_NIMCALL(void, markthreadstacks_69806)(Tgcheap48416* gch);
N_NIMCALL(NIM_BOOL, collectzct_68612)(Tgcheap48416* gch);
static N_INLINE(NIM_BOOL, canbecycleroot_50067)(Tcell46547* c);
N_NIMCALL(void, excl_47295)(Tcellset46559* s, Tcell46547* cell);
N_NIMCALL(Tpagedesc46555*, cellsetget_46723)(Tcellset46559* t, NI key);
static N_INLINE(NI, nexttry_46715)(NI h, NI maxhash);
N_NIMCALL(void, preparedealloc_50608)(Tcell46547* cell);
static N_INLINE(void*, celltousr_50025)(Tcell46547* cell);
N_NIMCALL(void, forallchildren_50417)(Tcell46547* cell, NU8 op);
N_NIMCALL(void, forallchildrenaux_50425)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, dooperation_50421)(void* p, NU8 op);
static N_INLINE(void, decref_52004)(Tcell46547* c);
static N_INLINE(void, rtladdzct_51604)(Tcell46547* c);
N_NOINLINE(void, addzct_50017)(Tcellseq46563* s, Tcell46547* c);
static N_INLINE(void, rtladdcycleroot_50823)(Tcell46547* c);
N_NOINLINE(void, incl_47265)(Tcellset46559* s, Tcell46547* cell);
N_NIMCALL(Tpagedesc46555*, cellsetput_47063)(Tcellset46559* t, NI key);
N_NIMCALL(void, cellsetenlarge_47012)(Tcellset46559* t);
N_NIMCALL(void, cellsetrawinsert_46752)(Tcellset46559* t, Tpagedesc46555** data, Tpagedesc46555* desc);
N_NIMCALL(void, markgray_65605)(Tcell46547* s);
N_NIMCALL(void, scan_66004)(Tcell46547* s);
N_NIMCALL(void, scanblack_65804)(Tcell46547* s);
N_NIMCALL(void, collectwhite_66204)(Tcell46547* s);
N_NIMCALL(NIM_BOOL, isallocatedptr_35605)(Tmemregion28410* a, void* p);
N_NIMCALL(void, freecycliccell_64827)(Tgcheap48416* gch, Tcell46547* c);
N_NIMCALL(void, forallslotsaux_54608)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_26610)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_26258)(void* aa, TNimNode* n);
N_NIMCALL(void, collectcycles_68844)(Tgcheap48416* gch);
N_NIMCALL(void, markroots_66405)(Tgcheap48416* gch);
N_NIMCALL(void, collectroots_68801)(Tgcheap48416* gch);
N_NIMCALL(void, cellsetreset_54601)(Tcellset46559* s);
N_NIMCALL(void, deinit_46687)(Tcellset46559* s);
N_NIMCALL(NI, getoccupiedmem_6695)(void);
N_NIMCALL(NI, gettotalmem_6699)(void);
N_NIMCALL(NI, getfreemem_6697)(void);
N_NIMCALL(void, unmarkstackandregisters_73011)(Tgcheap48416* gch);
static N_INLINE(void, addnewobjtozct_55687)(Tcell46547* res, Tgcheap48416* gch);
N_NIMCALL(void, writetostderr_17201)(NCSTRING msg);
N_NIMCALL(void, write_13669)(FILE* f, NCSTRING c);
N_NIMCALL(void, registersignalhandler_21008)(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(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
N_NIMCALL(void, raiseexceptionaux_18404)(Exception* e);
static N_INLINE(void, pushCurrentException)(Exception* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_52422)(Tcell46547* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isobjslowpath_23017)(TNimType* obj, TNimType* subclass, TNimType** cache);
static N_INLINE(void, quitordebug_18207)(void);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NOINLINE(NIM_BOOL, isonstack_50414)(void* p);
N_NIMCALL(void, TMP128)(void* p, NI op);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, genericresetaux_80401)(void* dest, TNimNode* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_76443, NI last);
static N_INLINE(NI, resize_76201)(NI old);
N_NIMCALL(void*, growobj_64818)(void* old, NI newsize);
N_NIMCALL(void*, growobj_62006)(void* old, NI newsize, Tgcheap48416* gch);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(void, genericassignaux_80406)(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_80412)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
N_NIMCALL(NI, writebuffer_13737)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_78405)(NimStringDesc* msg);
N_NIMCALL(void, TMP142)(void* p, NI op);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(void, TMP829)(void* p, NI op);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NIM_BOOL, open_13403)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, TMP977)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_CHAR, getdecimalpoint_77451)(void);
N_NIMCALL(void, objectinitaux_81494)(void* dest, TNimNode* n);
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(void*, realloc_46207)(Tmemregion28410* allocator, void* p, NI newsize);
N_NIMCALL(NI, ptrsize_44816)(void* p);
N_NIMCALL(void, TMP1140)(void* p, NI op);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_522183)(TY190933* x, TY190933* y);
static N_INLINE(void*, seqtoptr_522194)(TY190933* x);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, write_13657)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, TMP1533)(void* p, NI op);
N_NIMCALL(void, TMP2156)(void* p, NI op);
N_NIMCALL(FILE*, open_13417)(NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readall_13631)(FILE* file);
N_NIMCALL(NI, rawfilesize_79312)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_79321)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_13715)(FILE* f, void* buffer, NI len);
N_NIMCALL(NimStringDesc*, readallbuffer_79295)(FILE* file);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void*, seqtoptr_229750)(Ttypeseq190845* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_229739)(Ttypeseq190845* x, Ttypeseq190845* y);
static N_INLINE(void*, seqtoptr_193881)(TY190944* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_193870)(TY190944* x, TY190944* y);
static N_INLINE(void*, seqtoptr_263729)(Tnodeseq190807* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_263718)(Tnodeseq190807* x, Tnodeseq190807* y);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void*, seqtoptr_412864)(Tsymseq190815* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_412853)(Tsymseq190815* x, Tsymseq190815* y);
static N_INLINE(void*, seqtoptr_290724)(TY289746* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290661)(Jsonnodeobj289726* a, Jsonnodeobj289726* b);
static N_INLINE(void*, seqtoptr_290828)(TY289741* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290899)(TY290209 x, TY290209 y);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_13681)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, TMP4998)(void* p, NI op);
static N_INLINE(void, Gcdisable_8801)(void);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
static N_INLINE(void, Gcenable_8803)(void);
STRING_LITERAL(TMP2, "out of memory", 13);
STRING_LITERAL(TMP50, "over- or underflow", 18);
STRING_LITERAL(TMP129, "attempt to write to a nil address", 33);
STRING_LITERAL(TMP143, "cannot write string to file", 27);
STRING_LITERAL(TMP971, "rb", 2);
STRING_LITERAL(TMP972, "wb", 2);
STRING_LITERAL(TMP973, "w+b", 3);
STRING_LITERAL(TMP974, "r+b", 3);
STRING_LITERAL(TMP975, "ab", 2);
NIM_CONST TY79811 Formatopen_79810 = {((NimStringDesc*) &TMP971),
((NimStringDesc*) &TMP972),
((NimStringDesc*) &TMP973),
((NimStringDesc*) &TMP974),
((NimStringDesc*) &TMP975)}
;
STRING_LITERAL(TMP976, "cannot open: ", 13);
STRING_LITERAL(TMP978, "no exception to reraise", 23);
STRING_LITERAL(TMP979, "(", 1);
STRING_LITERAL(TMP980, ", ", 2);
STRING_LITERAL(TMP981, "filename", 8);
STRING_LITERAL(TMP982, ": ", 2);
STRING_LITERAL(TMP983, "line", 4);
STRING_LITERAL(TMP984, ")", 1);
STRING_LITERAL(TMP1029, " (invalid data!)", 16);
STRING_LITERAL(TMP1265, "nan", 3);
STRING_LITERAL(TMP1266, "-inf", 4);
STRING_LITERAL(TMP1267, "inf", 3);
STRING_LITERAL(TMP2602, "error while reading from file", 29);
STRING_LITERAL(TMP2603, "", 0);
STRING_LITERAL(TMP2681, "cannot set file position", 24);
STRING_LITERAL(TMP2682, "cannot retrieve file position", 29);
STRING_LITERAL(TMP2967, "true", 4);
STRING_LITERAL(TMP2968, "false", 5);
STRING_LITERAL(TMP4987, "EOF reached", 11);
STRING_LITERAL(TMP5010, "[GC] total memory: ", 19);
STRING_LITERAL(TMP5011, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP5012, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP5013, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP5014, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP5015, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP5016, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP5017, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP5018, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP5019, "\012[GC] max pause time [ms]: ", 27);
NI nim_program_result;
TY9021 globalraisehook_9025;
TY9026 localraisehook_9030;
TY9031 outofmemhook_9033;
TNimType strdesc_10404;
TY17001 errormessagewriter_17004;
TFrame* frameptr_17242;
TSafePoint* exchandler_17243;
Exception* currexception_17245;
TY17601 tempframes_17604;
Tavlnode28408 bottomdata_28438;
Tavlnode28408* bottom_28439;
Tgcheap48416 gch_48444;
NIM_BOOL localgcinitialized_54404;
NIM_CHAR decimalpoint_77450;
TNimType NTI3411; /* RootObj */
TNimType NTI108; /* int */
TNimType NTI149; /* string */
TNimType NTI3427; /* Exception */
TNimType NTI9022; /* ref Exception */
TNimType NTI151; /* cstring */
TNimType NTI3439; /* ArithmeticError */
TNimType NTI3443; /* OverflowError */
TNimType NTI23201; /* ref OverflowError */
TNimType NTI3429; /* SystemError */
TNimType NTI3453; /* OutOfMemError */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI114; /* int32 */
TNimType NTI3449; /* ValueError */
TNimType NTI22601; /* ref ValueError */
TNimType NTI112; /* int16 */
TNimType NTI3431; /* IOError */
TNimType NTI78601; /* ref IOError */
TNimType NTI138; /* bool */
TNimType NTI5710; /* BiggestInt */
TNimType NTI5712; /* BiggestFloat */
TNimType NTI3413; /* RootRef */
TNimType NTI153; /* pointer */
TNimType NTI5811; /* cint */
TNimType NTI3463; /* ReraiseError */
TNimType NTI19201; /* ref ReraiseError */
TNimType NTI27620; /* array[0..7, int] */
TNimType NTI3407; /* Natural */
TNimType NTI128; /* float */
TNimType NTI13202; /* CFile */
TNimType NTI13204; /* File */
TNimType NTI110; /* int8 */
TNimType NTI3459; /* RangeError */
TNimType NTI3433; /* OSError */
TNimType NTI117012; /* ref OSError */
extern TNimType NTI190933; /* seq[int32] */
TNimType NTI3455; /* IndexError */
TNimType NTI126016; /* ref IndexError */
TNimType NTI124; /* uint32 */
TNimType NTI3447; /* AssertionError */
TNimType NTI86601; /* ref AssertionError */
extern TNimType NTI190845; /* TTypeSeq */
TNimType NTI13208; /* FileHandle */
extern TNimType NTI190835; /* PInstantiation */
extern TNimType NTI190944; /* seq[PInstantiation] */
extern TNimType NTI190807; /* TNodeSeq */
TNimType NTI3441; /* DivByZeroError */
extern TNimType NTI190815; /* TSymSeq */
TNimType NTI147; /* char */
TNimType NTI516225; /* seq[SocketHandle] */

static N_INLINE(void, initallocator_10001)(void) {
	bottom_28439 = (&bottomdata_28438);
	(*bottom_28439).link[(((NI) 0))- 0] = bottom_28439;
	(*bottom_28439).link[(((NI) 1))- 0] = bottom_28439;
}

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

static N_INLINE(void, listremove_32202)(Tbigchunk27642** head, Tbigchunk27642* c) {
	{
		if (!(c == (*head))) goto LA3;
		(*head) = (*c).next;
		{
			if (!!(((*head) == NIM_NIL))) goto LA7;
			(*(*head)).prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c).prev).next = (*c).next;
		{
			if (!!(((*c).next == NIM_NIL))) goto LA12;
			(*(*c).next).prev = (*c).prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c).next = NIM_NIL;
	(*c).prev = NIM_NIL;
}

N_NIMCALL(Ttrunk27613*, intsetget_29898)(Tintset27617* t, NI key) {
	Ttrunk27613* result;
	Ttrunk27613* it;
{	result = 0;
	it = (*t).data[((NI)(key & ((NI) 255)))- 0];
	{
		while (1) {
			if (!!((it == NIM_NIL))) goto LA2;
			{
				if (!((*it).key == key)) goto LA5;
				result = it;
				goto BeforeRet;
			}
			LA5: ;
			it = (*it).next;
		} LA2: ;
	}
	result = NIM_NIL;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, contains_29959)(Tintset27617* s, NI key) {
	NIM_BOOL result;
	Ttrunk27613* t;
	result = 0;
	t = intsetget_29898(s, (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & ((NI) 511));
		result = !(((NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63))))))) == ((NI) 0)));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, isaccessible_31218)(Tmemregion28410* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = pageindex_30447(p);
	result = contains_29959((&(*a).chunkstarts), LOC1);
	return result;
}

static N_INLINE(void, updateprevsize_31283)(Tmemregion28410* a, Tbigchunk27642* c, NI prevsize) {
	Tbasechunk27638* ri;
	ri = ((Tbasechunk27638*) ((NI)((NU64)(((NI) (c))) + (NU64)((*c).Sup.size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_31218((&(*a)), ((void*) (ri)));
		if (!LOC3) goto LA4;
		(*ri).prevsize = prevsize;
	}
	LA4: ;
}

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

static N_INLINE(void*, osallocpages_27415)(NI size) {
	void* result;
	result = 0;
	result = mmap(NIM_NIL, size, ((int) 3), ((NI32) 4098), ((int) -1), ((NI) 0));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (result == NIM_NIL);
		if (LOC3) goto LA4;
		LOC3 = (result == ((void*) -1));
		LA4: ;
		if (!LOC3) goto LA5;
		raiseoutofmem_26860();
	}
	LA5: ;
	return result;
}

static N_INLINE(void, inccurrmem_28605)(Tmemregion28410* a, NI bytes) {
	(*a).currmem += bytes;
}

N_NIMCALL(void*, llalloc_28655)(Tmemregion28410* a, NI size) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tllchunk28404* 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_27415(((NI) 4096));
		(*a).llmem = ((Tllchunk28404*) (LOC7));
		inccurrmem_28605(a, ((NI) 4096));
		(*(*a).llmem).size = (NI)(((NI) 4096) - ((NI)sizeof(Tllchunk28404)));
		(*(*a).llmem).acc = ((NI)sizeof(Tllchunk28404));
		(*(*a).llmem).next = old;
	}
	LA5: ;
	result = ((void*) ((NI)(((NI) ((*a).llmem)) + (*(*a).llmem).acc)));
	(*(*a).llmem).size -= size;
	(*(*a).llmem).acc += size;
	zeroMem(result, ((NI) (size)));
	return result;
}

N_NIMCALL(Ttrunk27613*, intsetput_29929)(Tmemregion28410* a, Tintset27617* t, NI key) {
	Ttrunk27613* result;
	result = 0;
	result = intsetget_29898((&(*t)), key);
	{
		void* LOC5;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = llalloc_28655(a, ((NI)sizeof(Ttrunk27613)));
		result = ((Ttrunk27613*) (LOC5));
		(*result).next = (*t).data[((NI)(key & ((NI) 255)))- 0];
		(*t).data[((NI)(key & ((NI) 255)))- 0] = result;
		(*result).key = key;
	}
	LA3: ;
	return result;
}

N_NIMCALL(void, incl_29983)(Tmemregion28410* a, Tintset27617* s, NI key) {
	Ttrunk27613* t;
	NI u;
	t = intsetput_29929(a, s, (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	u = (NI)(key & ((NI) 511));
	(*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] | (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63)))))));
}

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

static N_INLINE(void, listadd_33423)(Tbigchunk27642** head, Tbigchunk27642* c) {
	(*c).next = (*head);
	{
		if (!!(((*head) == NIM_NIL))) goto LA3;
		(*(*head)).prev = c;
	}
	LA3: ;
	(*head) = c;
}

N_NIMCALL(void, splitchunk_34215)(Tmemregion28410* a, Tbigchunk27642* c, NI size) {
	Tbigchunk27642* rest;
	Tbasechunk27638* LOC1;
	NI LOC2;
	rest = ((Tbigchunk27642*) ((NI)((NU64)(((NI) (c))) + (NU64)(size))));
	(*rest).Sup.size = (NI)((*c).Sup.size - size);
	(*rest).Sup.used = NIM_FALSE;
	(*rest).next = NIM_NIL;
	(*rest).prev = NIM_NIL;
	(*rest).Sup.prevsize = size;
	updateprevsize_31283(a, c, (*rest).Sup.size);
	(*c).Sup.size = size;
	LOC1 = 0;
	LOC1 = &rest->Sup;
	LOC2 = 0;
	LOC2 = pageindex_30439(LOC1);
	incl_29983(a, (&(*a).chunkstarts), LOC2);
	listadd_33423(&(*a).freechunkslist, rest);
}

N_NIMCALL(Tbigchunk27642*, requestoschunks_30465)(Tmemregion28410* a, NI size) {
	Tbigchunk27642* result;
	void* LOC1;
	NI nxt;
	Tbasechunk27638* next;
	NI lastsize;
	NI prv;
	Tbasechunk27638* prev;
	result = 0;
	inccurrmem_28605(a, size);
	(*a).freemem += size;
	LOC1 = 0;
	LOC1 = osallocpages_27415(size);
	result = ((Tbigchunk27642*) (LOC1));
	(*result).next = NIM_NIL;
	(*result).prev = NIM_NIL;
	(*result).Sup.used = NIM_FALSE;
	(*result).Sup.size = size;
	nxt = (NI)((NU64)(((NI) (result))) + (NU64)(size));
	next = ((Tbasechunk27638*) (nxt));
	{
		NI LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC4 = pageindex_30439(next);
		LOC5 = 0;
		LOC5 = contains_29959((&(*a).chunkstarts), LOC4);
		if (!LOC5) goto LA6;
		(*next).prevsize = size;
	}
	LA6: ;
	{
		if (!!(((*a).lastsize == ((NI) 0)))) goto LA10;
		lastsize = (*a).lastsize;
	}
	goto LA8;
	LA10: ;
	{
		lastsize = ((NI) 4096);
	}
	LA8: ;
	prv = (NI)((NU64)(((NI) (result))) - (NU64)(lastsize));
	prev = ((Tbasechunk27638*) (prv));
	{
		NIM_BOOL LOC15;
		NI LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = pageindex_30439(prev);
		LOC15 = contains_29959((&(*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 = ((NI) 0);
	}
	LA13: ;
	(*a).lastsize = size;
	return result;
}

N_NIMCALL(Tbigchunk27642*, getbigchunk_34417)(Tmemregion28410* a, NI size) {
	Tbigchunk27642* result;
	Tbasechunk27638* LOC16;
	NI LOC17;
	result = 0;
	result = (*a).freechunkslist;
	{
		{
			while (1) {
				if (!!((result == NIM_NIL))) goto LA3;
				{
					if (!((*result).Sup.size == size)) goto LA6;
					listremove_32202(&(*a).freechunkslist, result);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					if (!(size < (*result).Sup.size)) goto LA9;
					listremove_32202(&(*a).freechunkslist, result);
					splitchunk_34215(a, result, size);
					goto LA1;
				}
				goto LA4;
				LA9: ;
				LA4: ;
				result = (*result).next;
			} LA3: ;
		}
		{
			if (!(size < ((NI) 524288))) goto LA13;
			result = requestoschunks_30465(a, ((NI) 524288));
			splitchunk_34215(a, result, size);
		}
		goto LA11;
		LA13: ;
		{
			result = requestoschunks_30465(a, size);
		}
		LA11: ;
	} LA1: ;
	(*result).Sup.prevsize = ((NI) 0);
	(*result).Sup.used = NIM_TRUE;
	LOC16 = 0;
	LOC16 = &result->Sup;
	LOC17 = 0;
	LOC17 = pageindex_30439(LOC16);
	incl_29983(a, (&(*a).chunkstarts), LOC17);
	(*a).freemem -= size;
	return result;
}

N_NIMCALL(Tsmallchunk27640*, getsmallchunk_35224)(Tmemregion28410* a) {
	Tsmallchunk27640* result;
	Tbigchunk27642* res;
	result = 0;
	res = getbigchunk_34417(a, ((NI) 4096));
	result = ((Tsmallchunk27640*) (res));
	return result;
}

static N_INLINE(void, listadd_36804)(Tsmallchunk27640** head, Tsmallchunk27640* c) {
	(*c).next = (*head);
	{
		if (!!(((*head) == NIM_NIL))) goto LA3;
		(*(*head)).prev = c;
	}
	LA3: ;
	(*head) = c;
}

static N_INLINE(void, listremove_39602)(Tsmallchunk27640** head, Tsmallchunk27640* c) {
	{
		if (!(c == (*head))) goto LA3;
		(*head) = (*c).next;
		{
			if (!!(((*head) == NIM_NIL))) goto LA7;
			(*(*head)).prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		(*(*c).prev).next = (*c).next;
		{
			if (!!(((*c).next == NIM_NIL))) goto LA12;
			(*(*c).next).prev = (*c).prev;
		}
		LA12: ;
	}
	LA1: ;
	(*c).next = NIM_NIL;
	(*c).prev = NIM_NIL;
}

N_NIMCALL(Tavlnode28408*, allocavlnode_28830)(Tmemregion28410* a, NI key, NI upperbound) {
	Tavlnode28408* result;
	result = 0;
	{
		if (!!(((*a).freeavlnodes == NIM_NIL))) goto LA3;
		result = (*a).freeavlnodes;
		(*a).freeavlnodes = (*(*a).freeavlnodes).link[(((NI) 0))- 0];
	}
	goto LA1;
	LA3: ;
	{
		void* LOC6;
		LOC6 = 0;
		LOC6 = llalloc_28655(a, ((NI)sizeof(Tavlnode28408)));
		result = ((Tavlnode28408*) (LOC6));
	}
	LA1: ;
	(*result).key = key;
	(*result).upperbound = upperbound;
	(*result).link[(((NI) 0))- 0] = bottom_28439;
	(*result).link[(((NI) 1))- 0] = bottom_28439;
	(*result).level = ((NI) 1);
	return result;
}

N_NIMCALL(void, skew_29576)(Tavlnode28408** t) {
	{
		Tavlnode28408* temp;
		if (!((*(*(*t)).link[(((NI) 0))- 0]).level == (*(*t)).level)) goto LA3;
		temp = (*t);
		(*t) = (*(*t)).link[(((NI) 0))- 0];
		(*temp).link[(((NI) 0))- 0] = (*(*t)).link[(((NI) 1))- 0];
		(*(*t)).link[(((NI) 1))- 0] = temp;
	}
	LA3: ;
}

N_NIMCALL(void, split_29584)(Tavlnode28408** t) {
	{
		Tavlnode28408* temp;
		if (!((*(*(*(*t)).link[(((NI) 1))- 0]).link[(((NI) 1))- 0]).level == (*(*t)).level)) goto LA3;
		temp = (*t);
		(*t) = (*(*t)).link[(((NI) 1))- 0];
		(*temp).link[(((NI) 1))- 0] = (*(*t)).link[(((NI) 0))- 0];
		(*(*t)).link[(((NI) 0))- 0] = temp;
		(*(*t)).level += ((NI) 1);
	}
	LA3: ;
}

N_NIMCALL(void, add_29601)(Tmemregion28410* a, Tavlnode28408** t, NI key, NI upperbound) {
	{
		if (!((*t) == bottom_28439)) goto LA3;
		(*t) = allocavlnode_28830(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!((NU64)(key) < (NU64)((*(*t)).key))) goto LA8;
			add_29601(a, &(*(*t)).link[(((NI) 0))- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			if (!((NU64)((*(*t)).key) < (NU64)(key))) goto LA11;
			add_29601(a, &(*(*t)).link[(((NI) 1))- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		skew_29576(t);
		split_29584(t);
	}
	LA1: ;
}

N_NIMCALL(void*, rawalloc_35901)(Tmemregion28410* a, NI requestedsize) {
	void* result;
	NI size;
	result = 0;
	size = roundup_27670(requestedsize, ((NI) 8));
	{
		NI s;
		Tsmallchunk27640* c;
		if (!(size <= (NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))))) goto LA3;
		s = (NI)(size / ((NI) 8));
		c = (*a).freesmallchunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7;
			c = getsmallchunk_35224(a);
			(*c).freelist = NIM_NIL;
			(*c).Sup.size = size;
			(*c).acc = size;
			(*c).free = (NI)((NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))) - size);
			(*c).next = NIM_NIL;
			(*c).prev = NIM_NIL;
			listadd_36804(&(*a).freesmallchunks[(s)- 0], c);
			result = ((void*) ((&(*c).data)));
		}
		goto LA5;
		LA7: ;
		{
			{
				if (!((*c).freelist == NIM_NIL)) goto LA12;
				result = ((void*) ((NI)((NU64)(((NI) ((&(*c).data)))) + (NU64)((*c).acc))));
				(*c).acc += size;
			}
			goto LA10;
			LA12: ;
			{
				result = ((void*) ((*c).freelist));
				(*c).freelist = (*(*c).freelist).next;
			}
			LA10: ;
			(*c).free -= size;
		}
		LA5: ;
		{
			if (!((*c).free < size)) goto LA17;
			listremove_39602(&(*a).freesmallchunks[(s)- 0], c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		Tbigchunk27642* c;
		size = roundup_27670((NI)(requestedsize + (NI)(((NI)sizeof(Tbigchunk27642)) - ((NI) 8))), ((NI) 4096));
		c = getbigchunk_34417(a, size);
		result = ((void*) ((&(*c).data)));
		{
			if (!((*a).root == NIM_NIL)) goto LA22;
			(*a).root = bottom_28439;
		}
		LA22: ;
		add_29601(a, &(*a).root, ((NI) (result)), (NI)((NU64)(((NI) (result))) + (NU64)(size)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, alloc_45031)(Tmemregion28410* allocator, NI size) {
	void* result;
	result = 0;
	result = rawalloc_35901(allocator, (NI)(((NI) (size)) + ((NI)sizeof(Tfreecell27630))));
	(*((Tfreecell27630*) (result))).zerofield = ((NI) 1);
	result = ((void*) ((NI)((NU64)(((NI) (result))) + (NU64)(((NI)sizeof(Tfreecell27630))))));
	return result;
}

N_NIMCALL(void*, alloc0_45219)(Tmemregion28410* allocator, NI size) {
	void* result;
	result = 0;
	result = alloc_45031(allocator, size);
	zeroMem(result, size);
	return result;
}

N_NOCONV(void*, alloc0_6017)(NI size) {
	void* result;
	result = 0;
	result = alloc0_45219((&gch_48444.region), size);
	return result;
}

N_NIMCALL(void, init_46655)(Tcellseq46563* s, NI cap) {
	void* LOC1;
	(*s).len = ((NI) 0);
	(*s).cap = cap;
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) ((NI)(cap * ((NI) 8)))));
	(*s).d = ((Tcell46547**) (LOC1));
}

N_NIMCALL(void, init_46676)(Tcellset46559* s) {
	void* LOC1;
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) 8192));
	(*s).data = ((Tpagedesc46555**) (LOC1));
	(*s).max = ((NI) 1023);
	(*s).counter = ((NI) 0);
	(*s).head = NIM_NIL;
}

N_NIMCALL(void, initgc_9801)(void) {
	gch_48444.cyclethreshold = ((NI) 4194304);
	gch_48444.stat.stackscans = ((NI) 0);
	gch_48444.stat.cyclecollections = ((NI) 0);
	gch_48444.stat.maxthreshold = ((NI) 0);
	gch_48444.stat.maxstacksize = ((NI) 0);
	gch_48444.stat.maxstackcells = ((NI) 0);
	gch_48444.stat.cycletablesize = ((NI) 0);
	init_46655((&gch_48444.zct), ((NI) 1024));
	init_46655((&gch_48444.tempstack), ((NI) 1024));
	init_46676((&gch_48444.cycleroots));
	init_46655((&gch_48444.decstack), ((NI) 1024));
}

N_NOINLINE(NI, stacksize_70611)(void) {
	NI result;
	void* volatile stacktop;
	result = 0;
	stacktop = 0;
	result = ((NI)(((NI) ((&stacktop))) - ((NI) (gch_48444.stackbottom))) > 0? ((NI)(((NI) ((&stacktop))) - ((NI) (gch_48444.stackbottom)))) : -((NI)(((NI) ((&stacktop))) - ((NI) (gch_48444.stackbottom)))));
	return result;
}

static N_INLINE(NI, getoccupiedmem_46469)(Tmemregion28410* a) {
	NI result;
	result = 0;
	result = (NI)((*a).currmem - (*a).freemem);
	return result;
}

N_NIMCALL(NI, lowgauge_29418)(Tavlnode28408* n) {
	NI result;
	Tavlnode28408* it;
	result = 0;
	it = n;
	{
		while (1) {
			if (!!((it == bottom_28439))) goto LA2;
			result = (*it).key;
			it = (*it).link[(((NI) 0))- 0];
		} LA2: ;
	}
	return result;
}

N_NIMCALL(NI, highgauge_29444)(Tavlnode28408* n) {
	NI result;
	Tavlnode28408* it;
	result = 0;
	result = ((NI) -1);
	it = n;
	{
		while (1) {
			if (!!((it == bottom_28439))) goto LA2;
			result = (*it).upperbound;
			it = (*it).link[(((NI) 1))- 0];
		} LA2: ;
	}
	return result;
}

static N_INLINE(void, prepareforinteriorpointerchecking_43882)(Tmemregion28410* a) {
	(*a).minlargeobj = lowgauge_29418((*a).root);
	(*a).maxlargeobj = highgauge_29444((*a).root);
}

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

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

static N_INLINE(NIM_BOOL, chunkunused_30319)(Tbasechunk27638* c) {
	NIM_BOOL result;
	result = 0;
	result = !((*c).used);
	return result;
}

static N_INLINE(NIM_BOOL, issmallchunk_30308)(Tbasechunk27638* c) {
	NIM_BOOL result;
{	result = 0;
	result = ((*c).size <= (NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))));
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tavlnode28408*, inrange_29514)(Tavlnode28408* root, NI key) {
	Tavlnode28408* result;
	Tavlnode28408* it;
{	result = 0;
	it = root;
	{
		while (1) {
			if (!!((it == bottom_28439))) goto LA2;
			{
				NIM_BOOL LOC5;
				LOC5 = 0;
				LOC5 = ((NU64)((*it).key) <= (NU64)(key));
				if (!(LOC5)) goto LA6;
				LOC5 = ((NU64)(key) < (NU64)((*it).upperbound));
				LA6: ;
				if (!LOC5) goto LA7;
				result = it;
				goto BeforeRet;
			}
			LA7: ;
			it = (*it).link[(((NU64)((*it).key) < (NU64)(key)))- 0];
		} LA2: ;
	}
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void*, interiorallocatedptr_43889)(Tmemregion28410* a, void* p) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tbasechunk27638* c_43894;
		LOC3 = 0;
		LOC3 = isaccessible_31218(a, p);
		if (!LOC3) goto LA4;
		c_43894 = pageaddr_30455(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_30319(c_43894);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				Tsmallchunk27640* c;
				NI offset;
				LOC13 = 0;
				LOC13 = issmallchunk_30308(c_43894);
				if (!LOC13) goto LA14;
				c = ((Tsmallchunk27640*) (c_43894));
				offset = (NI)((NU64)(((NI) ((NI)(((NI) (p)) & ((NI) 4095))))) - (NU64)((NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))));
				{
					Tfreecell27630* d;
					if (!((NU64)(offset) < (NU64)((*c).acc))) goto LA18;
					d = ((Tfreecell27630*) ((NI)((NU64)((NI)((NU64)(((NI) ((&(*c).data)))) + (NU64)(offset))) - (NU64)((NI)((NU64)(offset) % (NU64)((*c).Sup.size))))));
					{
						if (!((NU64)(((NI) 1)) < (NU64)((*d).zerofield))) goto LA22;
						result = ((void*) (d));
					}
					LA22: ;
				}
				LA18: ;
			}
			goto LA11;
			LA14: ;
			{
				Tbigchunk27642* c;
				NF* d;
				c = ((Tbigchunk27642*) (c_43894));
				d = (&(*c).data);
				{
					NIM_BOOL LOC27;
					LOC27 = 0;
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					LOC27 = ((NU64)(((NI) 1)) < (NU64)((*((Tfreecell27630*) (d))).zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL LOC34;
			Tavlnode28408* avlnode;
			LOC34 = 0;
			LOC34 = ((NU64)((*a).minlargeobj) <= (NU64)(q));
			if (!(LOC34)) goto LA35;
			LOC34 = ((NU64)(q) <= (NU64)((*a).maxlargeobj));
			LA35: ;
			if (!LOC34) goto LA36;
			avlnode = inrange_29514((*a).root, q);
			{
				void* k;
				Tbigchunk27642* c;
				Tbasechunk27638* LOC42;
				if (!!((avlnode == NIM_NIL))) goto LA40;
				k = ((void*) ((*avlnode).key));
				LOC42 = 0;
				LOC42 = pageaddr_30455(k);
				c = ((Tbigchunk27642*) (LOC42));
				{
					if (!((NU64)(((NI) 1)) < (NU64)((*((Tfreecell27630*) (k))).zerofield))) goto LA45;
					result = k;
				}
				LA45: ;
			}
			LA40: ;
		}
		LA36: ;
	}
	LA1: ;
	return result;
}

N_NOCONV(void*, alloc_6001)(NI size) {
	void* result;
	result = 0;
	result = alloc_45031((&gch_48444.region), size);
	return result;
}

N_NIMCALL(void, excl_29997)(Tintset27617* s, NI key) {
	Ttrunk27613* t;
	t = intsetget_29898((&(*s)), (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & ((NI) 511));
		(*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64) ~((NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63)))))))));
	}
	LA3: ;
}

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

static N_INLINE(void, deccurrmem_28622)(Tmemregion28410* a, NI bytes) {
	(*a).maxmem = (((*a).maxmem >= (*a).currmem) ? (*a).maxmem : (*a).currmem);
	(*a).currmem -= bytes;
}

N_NIMCALL(void, freeoschunks_31010)(Tmemregion28410* a, void* p, NI size) {
	Tbasechunk27638* c;
	NI nxt;
	Tbasechunk27638* next;
	NI LOC7;
	c = ((Tbasechunk27638*) (p));
	nxt = (NI)((NU64)(((NI) (p))) + (NU64)((*c).size));
	next = ((Tbasechunk27638*) (nxt));
	{
		NI LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC3 = pageindex_30439(next);
		LOC4 = 0;
		LOC4 = contains_29959((&(*a).chunkstarts), LOC3);
		if (!LOC4) goto LA5;
		(*next).prevsize = ((NI) 0);
	}
	LA5: ;
	LOC7 = 0;
	LOC7 = pageindex_30447(p);
	excl_29997((&(*a).chunkstarts), LOC7);
	osdeallocpages_27424(p, size);
	deccurrmem_28622(a, size);
	(*a).freemem -= size;
}

N_NIMCALL(void, freebigchunk_31406)(Tmemregion28410* a, Tbigchunk27642* c_31410) {
	Tbigchunk27642* c;
	Tbasechunk27638* ri;
	c = c_31410;
	(*a).freemem += (*c).Sup.size;
	ri = ((Tbasechunk27638*) ((NI)((NU64)(((NI) (c))) + (NU64)((*c).Sup.size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_31218((&(*a)), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		LOC3 = chunkunused_30319(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC12;
			LOC9 = 0;
			LOC9 = issmallchunk_30308(ri);
			if (!!(LOC9)) goto LA10;
			listremove_32202(&(*a).freechunkslist, ((Tbigchunk27642*) (ri)));
			(*c).Sup.size += (*ri).size;
			LOC12 = 0;
			LOC12 = pageindex_30439(ri);
			excl_29997((&(*a).chunkstarts), LOC12);
		}
		LA10: ;
	}
	LA5: ;
	{
		Tbasechunk27638* le;
		if (!!(((*c).Sup.prevsize == ((NI) 0)))) goto LA15;
		le = ((Tbasechunk27638*) ((NI)((NU64)(((NI) (c))) - (NU64)((*c).Sup.prevsize))));
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = isaccessible_31218((&(*a)), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			LOC19 = chunkunused_30319(le);
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				Tbasechunk27638* LOC28;
				NI LOC29;
				LOC25 = 0;
				LOC25 = issmallchunk_30308(le);
				if (!!(LOC25)) goto LA26;
				listremove_32202(&(*a).freechunkslist, ((Tbigchunk27642*) (le)));
				(*le).size += (*c).Sup.size;
				LOC28 = 0;
				LOC28 = &c->Sup;
				LOC29 = 0;
				LOC29 = pageindex_30439(LOC28);
				excl_29997((&(*a).chunkstarts), LOC29);
				c = ((Tbigchunk27642*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	{
		NIM_BOOL LOC32;
		Tbasechunk27638* LOC36;
		NI LOC37;
		LOC32 = 0;
		LOC32 = ((*c).Sup.size < ((NI) 1048576));
		if (LOC32) goto LA33;
		LOC32 = NIM_FALSE;
		LA33: ;
		if (!LOC32) goto LA34;
		LOC36 = 0;
		LOC36 = &c->Sup;
		LOC37 = 0;
		LOC37 = pageindex_30439(LOC36);
		incl_29983(a, (&(*a).chunkstarts), LOC37);
		updateprevsize_31283(a, c, (*c).Sup.size);
		listadd_33423(&(*a).freechunkslist, c);
		(*c).Sup.used = NIM_FALSE;
	}
	goto LA30;
	LA34: ;
	{
		freeoschunks_31010(a, ((void*) (c)), (*c).Sup.size);
	}
	LA30: ;
}

static N_INLINE(void, deallocavlnode_29406)(Tmemregion28410* a, Tavlnode28408* n) {
	(*n).link[(((NI) 0))- 0] = (*a).freeavlnodes;
	(*a).freeavlnodes = n;
}

N_NIMCALL(void, del_29804)(Tmemregion28410* a, Tavlnode28408** t, NI x) {
{	{
		if (!((*t) == bottom_28439)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	(*a).last = (*t);
	{
		if (!((NU64)(x) < (NU64)((*(*t)).key))) goto LA7;
		del_29804(a, &(*(*t)).link[(((NI) 0))- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		(*a).deleted = (*t);
		del_29804(a, &(*(*t)).link[(((NI) 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_28439));
		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_28439;
		(*t) = (*(*t)).link[(((NI) 1))- 0];
		deallocavlnode_29406(a, (*a).last);
	}
	goto LA10;
	LA16: ;
	{
		NIM_BOOL LOC19;
		LOC19 = 0;
		LOC19 = ((*(*(*t)).link[(((NI) 0))- 0]).level < (NI)((*(*t)).level - ((NI) 1)));
		if (LOC19) goto LA20;
		LOC19 = ((*(*(*t)).link[(((NI) 1))- 0]).level < (NI)((*(*t)).level - ((NI) 1)));
		LA20: ;
		if (!LOC19) goto LA21;
		(*(*t)).level -= ((NI) 1);
		{
			if (!((*(*t)).level < (*(*(*t)).link[(((NI) 1))- 0]).level)) goto LA25;
			(*(*(*t)).link[(((NI) 1))- 0]).level = (*(*t)).level;
		}
		LA25: ;
		skew_29576(t);
		skew_29576(&(*(*t)).link[(((NI) 1))- 0]);
		skew_29576(&(*(*(*t)).link[(((NI) 1))- 0]).link[(((NI) 1))- 0]);
		split_29584(t);
		split_29584(&(*(*t)).link[(((NI) 1))- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	}BeforeRet: ;
}

N_NIMCALL(void, rawdealloc_42223)(Tmemregion28410* a, void* p) {
	Tbasechunk27638* c_42401;
	c_42401 = pageaddr_30455(p);
	{
		NIM_BOOL LOC3;
		Tsmallchunk27640* c;
		NI s;
		Tfreecell27630* f;
		LOC3 = 0;
		LOC3 = issmallchunk_30308(c_42401);
		if (!LOC3) goto LA4;
		c = ((Tsmallchunk27640*) (c_42401));
		s = (*c).Sup.size;
		f = ((Tfreecell27630*) (p));
		(*f).zerofield = ((NI) 0);
		(*f).next = (*c).freelist;
		(*c).freelist = f;
		{
			if (!((*c).free < s)) goto LA8;
			listadd_36804(&(*a).freesmallchunks[((NI)(s / ((NI) 8)))- 0], c);
			(*c).free += s;
		}
		goto LA6;
		LA8: ;
		{
			(*c).free += s;
			{
				if (!((*c).free == (NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))))) goto LA13;
				listremove_39602(&(*a).freesmallchunks[((NI)(s / ((NI) 8)))- 0], c);
				(*c).Sup.size = ((NI) 4096);
				freebigchunk_31406(a, ((Tbigchunk27642*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		Tbigchunk27642* c;
		c = ((Tbigchunk27642*) (c_42401));
		(*a).deleted = bottom_28439;
		del_29804(a, &(*a).root, ((NI) ((&(*c).data))));
		freebigchunk_31406(a, c);
	}
	LA1: ;
}

N_NIMCALL(void, dealloc_45228)(Tmemregion28410* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU64)(((NI) (p))) - (NU64)(((NI)sizeof(Tfreecell27630))))));
	rawdealloc_42223(allocator, x);
}

N_NOCONV(void, dealloc_6048)(void* p) {
	dealloc_45228((&gch_48444.region), p);
}

static N_INLINE(void, add_46632)(Tcellseq46563* s, Tcell46547* c) {
	{
		Tcell46547** d;
		void* LOC5;
		if (!((*s).cap <= (*s).len)) goto LA3;
		(*s).cap = (NI)((NI)((*s).cap * ((NI) 3)) / ((NI) 2));
		LOC5 = 0;
		LOC5 = alloc_6001(((NI) ((NI)((*s).cap * ((NI) 8)))));
		d = ((Tcell46547**) (LOC5));
		memcpy(((void*) (d)), ((void*) ((*s).d)), ((NI) ((NI)((*s).len * ((NI) 8)))));
		dealloc_6048(((void*) ((*s).d)));
		(*s).d = d;
	}
	LA3: ;
	(*s).d[((*s).len)- 0] = c;
	(*s).len += ((NI) 1);
}

static N_INLINE(void, gcmark_69246)(Tgcheap48416* gch, void* p) {
	Tcell46547* cell;
	NI c;
	cell = usrtocell_50046(p);
	c = ((NI) (cell));
	{
		Tcell46547* objstart;
		void* LOC5;
		if (!((NU64)(((NI) 4096)) < (NU64)(c))) goto LA3;
		LOC5 = 0;
		LOC5 = interiorallocatedptr_43889((&(*gch).region), ((void*) (cell)));
		objstart = ((Tcell46547*) (LOC5));
		{
			if (!!((objstart == NIM_NIL))) goto LA8;
			(*objstart).refcount = (NI)((NU64)((*objstart).refcount) + (NU64)(((NI) 8)));
			add_46632((&(*gch).decstack), objstart);
		}
		LA8: ;
	}
	LA3: ;
}

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

N_NIMCALL(void, markthreadstacks_69806)(Tgcheap48416* gch) {
}

static N_INLINE(NIM_BOOL, canbecycleroot_50067)(Tcell46547* c) {
	NIM_BOOL result;
	result = 0;
	result = !((((*(*c).typ).flags &(1<<((((NU8) 1))&7)))!=0));
	return result;
}

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

N_NIMCALL(Tpagedesc46555*, cellsetget_46723)(Tcellset46559* t, NI key) {
	Tpagedesc46555* result;
	NI h;
{	result = 0;
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			if (!!(((*t).data[(h)- 0] == NIM_NIL))) goto LA2;
			{
				if (!((*(*t).data[(h)- 0]).key == key)) goto LA5;
				result = (*t).data[(h)- 0];
				goto BeforeRet;
			}
			LA5: ;
			h = nexttry_46715(h, (*t).max);
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, excl_47295)(Tcellset46559* s, Tcell46547* cell) {
	NI u;
	Tpagedesc46555* t;
	u = ((NI) (cell));
	t = cellsetget_46723((&(*s)), (NI)((NU64)(u) >> (NU64)(((NI) 12))));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU64)((NI)((NU64)(u) % (NU64)(((NI) 4096)))) / (NU64)(((NI) 8)));
		(*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64) ~((NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63)))))))));
	}
	LA3: ;
}

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

N_NIMCALL(void, preparedealloc_50608)(Tcell46547* cell) {
	{
		void* LOC5;
		if (!!(((*(*cell).typ).finalizer == NIM_NIL))) goto LA3;
		gch_48444.recgclock += ((NI) 1);
		LOC5 = 0;
		LOC5 = celltousr_50025(cell);
		((TFinalizer) ((*(*cell).typ).finalizer))(LOC5);
		gch_48444.recgclock -= ((NI) 1);
	}
	LA3: ;
}

N_NOINLINE(void, addzct_50017)(Tcellseq46563* s, Tcell46547* c) {
	{
		if (!((NI)((*c).refcount & ((NI) 4)) == ((NI) 0))) goto LA3;
		(*c).refcount = (NI)((*c).refcount | ((NI) 4));
		add_46632(s, c);
	}
	LA3: ;
}

static N_INLINE(void, rtladdzct_51604)(Tcell46547* c) {
	addzct_50017((&gch_48444.zct), c);
}

N_NIMCALL(void, cellsetrawinsert_46752)(Tcellset46559* t, Tpagedesc46555** data, Tpagedesc46555* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).key)) & (*t).max);
	{
		while (1) {
			if (!!((data[(h)- 0] == NIM_NIL))) goto LA2;
			h = nexttry_46715(h, (*t).max);
		} LA2: ;
	}
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellsetenlarge_47012)(Tcellset46559* t) {
	NI oldmax;
	Tpagedesc46555** n;
	void* LOC1;
	oldmax = (*t).max;
	(*t).max = (NI)((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 2)) - ((NI) 1));
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) ((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 8)))));
	n = ((Tpagedesc46555**) (LOC1));
	{
		NI i_47029;
		NI res_47047;
		i_47029 = 0;
		res_47047 = ((NI) 0);
		{
			while (1) {
				if (!(res_47047 <= oldmax)) goto LA4;
				i_47029 = res_47047;
				{
					if (!!(((*t).data[(i_47029)- 0] == NIM_NIL))) goto LA7;
					cellsetrawinsert_46752((&(*t)), n, (*t).data[(i_47029)- 0]);
				}
				LA7: ;
				res_47047 += ((NI) 1);
			} LA4: ;
		}
	}
	dealloc_6048(((void*) ((*t).data)));
	(*t).data = n;
}

N_NIMCALL(Tpagedesc46555*, cellsetput_47063)(Tcellset46559* t, NI key) {
	Tpagedesc46555* result;
	NI h;
	void* LOC19;
{	result = 0;
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			Tpagedesc46555* x;
			x = (*t).data[(h)- 0];
			{
				if (!(x == NIM_NIL)) goto LA5;
				goto LA1;
			}
			LA5: ;
			{
				if (!((*x).key == key)) goto LA9;
				result = x;
				goto BeforeRet;
			}
			LA9: ;
			h = nexttry_46715(h, (*t).max);
		}
	} LA1: ;
	{
		NIM_BOOL LOC13;
		LOC13 = 0;
		LOC13 = ((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 2)) < (NI)((*t).counter * ((NI) 3)));
		if (LOC13) goto LA14;
		LOC13 = ((NI)((NI)((*t).max + ((NI) 1)) - (*t).counter) < ((NI) 4));
		LA14: ;
		if (!LOC13) goto LA15;
		cellsetenlarge_47012(t);
	}
	LA15: ;
	(*t).counter += ((NI) 1);
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			if (!!(((*t).data[(h)- 0] == NIM_NIL))) goto LA18;
			h = nexttry_46715(h, (*t).max);
		} LA18: ;
	}
	LOC19 = 0;
	LOC19 = alloc0_6017(((NI) (((NI)sizeof(Tpagedesc46555)))));
	result = ((Tpagedesc46555*) (LOC19));
	(*result).next = (*t).head;
	(*result).key = key;
	(*t).head = result;
	(*t).data[(h)- 0] = result;
	}BeforeRet: ;
	return result;
}

N_NOINLINE(void, incl_47265)(Tcellset46559* s, Tcell46547* cell) {
	NI u;
	Tpagedesc46555* t;
	u = ((NI) (cell));
	t = cellsetput_47063(s, (NI)((NU64)(u) >> (NU64)(((NI) 12))));
	u = (NI)((NU64)((NI)((NU64)(u) % (NU64)(((NI) 4096)))) / (NU64)(((NI) 8)));
	(*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] | (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63)))))));
}

static N_INLINE(void, rtladdcycleroot_50823)(Tcell46547* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_47265((&gch_48444.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_52004)(Tcell46547* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_51604(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_50067(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_50823(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

N_NIMCALL(void, markgray_65605)(Tcell46547* s) {
	{
		if (!!((((NI) ((NI)((*s).refcount & ((NI) 3)))) == ((NI) 1)))) goto LA3;
		(*s).refcount = (NI)((NI)((*s).refcount & ((NI) -4)) | ((NI) 1));
		forallchildren_50417(s, ((NU8) 5));
	}
	LA3: ;
}

N_NIMCALL(void, scanblack_65804)(Tcell46547* s) {
	(*s).refcount = (NI)((*s).refcount & ((NI) -4));
	forallchildren_50417(s, ((NU8) 7));
}

N_NIMCALL(void, scan_66004)(Tcell46547* s) {
	{
		if (!(((NI) ((NI)((*s).refcount & ((NI) 3)))) == ((NI) 1))) goto LA3;
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*s).refcount))) goto LA7;
			scanblack_65804(s);
		}
		goto LA5;
		LA7: ;
		{
			(*s).refcount = (NI)((NI)((*s).refcount & ((NI) -4)) | ((NI) 2));
			forallchildren_50417(s, ((NU8) 6));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, isallocatedptr_35605)(Tmemregion28410* a, void* p) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tbasechunk27638* c_43816;
		LOC3 = 0;
		LOC3 = isaccessible_31218(a, p);
		if (!LOC3) goto LA4;
		c_43816 = pageaddr_30455(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_30319(c_43816);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				Tsmallchunk27640* c;
				NI offset;
				NIM_BOOL LOC16;
				NIM_BOOL LOC17;
				LOC13 = 0;
				LOC13 = issmallchunk_30308(c_43816);
				if (!LOC13) goto LA14;
				c = ((Tsmallchunk27640*) (c_43816));
				offset = (NI)((NU64)(((NI) ((NI)(((NI) (p)) & ((NI) 4095))))) - (NU64)((NI)(((NI)sizeof(Tsmallchunk27640)) - ((NI) 8))));
				LOC16 = 0;
				LOC17 = 0;
				LOC17 = ((NU64)(offset) < (NU64)((*c).acc));
				if (!(LOC17)) goto LA18;
				LOC17 = ((NI)((NU64)(offset) % (NU64)((*c).Sup.size)) == ((NI) 0));
				LA18: ;
				LOC16 = LOC17;
				if (!(LOC16)) goto LA19;
				LOC16 = ((NU64)(((NI) 1)) < (NU64)((*((Tfreecell27630*) (p))).zerofield));
				LA19: ;
				result = LOC16;
			}
			goto LA11;
			LA14: ;
			{
				Tbigchunk27642* c;
				NIM_BOOL LOC21;
				c = ((Tbigchunk27642*) (c_43816));
				LOC21 = 0;
				LOC21 = (p == ((void*) ((&(*c).data))));
				if (!(LOC21)) goto LA22;
				LOC21 = ((NU64)(((NI) 1)) < (NU64)((*((Tfreecell27630*) (p))).zerofield));
				LA22: ;
				result = LOC21;
			}
			LA11: ;
		}
		LA9: ;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, freecycliccell_64827)(Tgcheap48416* gch, Tcell46547* c) {
	preparedealloc_50608(c);
	rawdealloc_42223((&(*gch).region), ((void*) (c)));
}

N_NIMCALL(void, collectwhite_66204)(Tcell46547* s) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isallocatedptr_35605((&gch_48444.region), ((void*) (s)));
		if (!(LOC3)) goto LA4;
		LOC3 = (((NI) ((NI)((*s).refcount & ((NI) 3)))) == ((NI) 2));
		LA4: ;
		if (!LOC3) goto LA5;
		(*s).refcount = (NI)((*s).refcount & ((NI) -4));
		forallchildren_50417(s, ((NU8) 8));
		freecycliccell_64827((&gch_48444), s);
	}
	LA5: ;
}

N_NIMCALL(void, dooperation_50421)(void* p, NU8 op) {
	Tcell46547* c;
{	{
		if (!(p == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	c = usrtocell_50046(p);
	switch (op) {
	case ((NU8) 2):
	{
		decref_52004(c);
	}
	break;
	case ((NU8) 3):
	{
		add_46632((&gch_48444.tempstack), c);
	}
	break;
	case ((NU8) 4):
	{
		(*c).refcount = (NI)((NU64)((*c).refcount) - (NU64)(((NI) 8)));
	}
	break;
	case ((NU8) 5):
	{
		(*c).refcount = (NI)((NU64)((*c).refcount) - (NU64)(((NI) 8)));
		markgray_65605(c);
	}
	break;
	case ((NU8) 6):
	{
		scan_66004(c);
	}
	break;
	case ((NU8) 7):
	{
		(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
		{
			if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 0)))) goto LA13;
			scanblack_65804(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		collectwhite_66204(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	}BeforeRet: ;
}

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

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

N_NIMCALL(void, forallslotsaux_54608)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		forallchildrenaux_50425(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_54634;
			NI HEX3Atmp_54806;
			NI res_54809;
			i_54634 = 0;
			HEX3Atmp_54806 = 0;
			HEX3Atmp_54806 = (NI)((*n).len - ((NI) 1));
			res_54809 = ((NI) 0);
			{
				while (1) {
					if (!(res_54809 <= HEX3Atmp_54806)) goto LA5;
					i_54634 = res_54809;
					{
						if (!((*(*n).sons[(i_54634)- 0]).kind == ((NU8) 1))) goto LA8;
						{
							if (!((289406976 &(IL64(1)<<(((*(*(*n).sons[(i_54634)- 0]).typ).kind)&IL64(63))))!=0)) goto LA12;
							dooperation_50421((*((void**) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i_54634)- 0]).offset))))), op);
						}
						goto LA10;
						LA12: ;
						{
							forallchildrenaux_50425(((void*) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i_54634)- 0]).offset)))), (*(*n).sons[(i_54634)- 0]).typ, op);
						}
						LA10: ;
					}
					goto LA6;
					LA8: ;
					{
						forallslotsaux_54608(dest, (*n).sons[(i_54634)- 0], op);
					}
					LA6: ;
					res_54809 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_26610(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA19;
			forallslotsaux_54608(dest, m, op);
		}
		LA19: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forallchildrenaux_50425)(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_50421((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			forallslotsaux_54608(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			{
				NI i_54851;
				NI HEX3Atmp_54874;
				NI res_54877;
				i_54851 = 0;
				HEX3Atmp_54874 = 0;
				HEX3Atmp_54874 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
				res_54877 = ((NI) 0);
				{
					while (1) {
						if (!(res_54877 <= HEX3Atmp_54874)) goto LA14;
						i_54851 = res_54877;
						forallchildrenaux_50425(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_54851) * (NU64)((*(*mt).base).size)))))), (*mt).base, op);
						res_54877 += ((NI) 1);
					} LA14: ;
				}
			}
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	}BeforeRet: ;
}

N_NIMCALL(void, forallchildren_50417)(Tcell46547* cell, NU8 op) {
	TY3289 marker;
	marker = (*(*cell).typ).marker;
	{
		void* LOC5;
		if (!!((marker == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = celltousr_50025(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		switch ((*(*cell).typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			LOC8 = 0;
			LOC8 = celltousr_50025(cell);
			forallchildrenaux_50425(LOC8, (*(*cell).typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			LOC10 = 0;
			LOC10 = celltousr_50025(cell);
			d = ((NI) (LOC10));
			s = ((TGenericSeq*) (d));
			{
				if (!!((s == NIM_NIL))) goto LA13;
				{
					NI i_55635;
					NI HEX3Atmp_55668;
					NI res_55671;
					i_55635 = 0;
					HEX3Atmp_55668 = 0;
					HEX3Atmp_55668 = (NI)((*s).len - ((NI) 1));
					res_55671 = ((NI) 0);
					{
						while (1) {
							if (!(res_55671 <= HEX3Atmp_55668)) goto LA17;
							i_55635 = res_55671;
							forallchildrenaux_50425(((void*) ((NI)((NU64)((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_55635) * (NU64)((*(*(*cell).typ).base).size))))) + (NU64)(((NI) 16))))), (*(*cell).typ).base, op);
							res_55671 += ((NI) 1);
						} LA17: ;
					}
				}
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
}

N_NIMCALL(NIM_BOOL, collectzct_68612)(Tgcheap48416* gch) {
	NIM_BOOL result;
	NI* L;
	result = 0;
	L = (&(*gch).zct.len);
	{
		while (1) {
			Tcell46547* c;
			if (!(((NI) 0) < (*L))) goto LA2;
			c = (*gch).zct.d[(((NI) 0))- 0];
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			(*gch).zct.d[(((NI) 0))- 0] = (*gch).zct.d[((NI)((*L) - ((NI) 1)))- 0];
			(*L) -= ((NI) 1);
			{
				if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA5;
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = canbecycleroot_50067(c);
					if (!LOC9) goto LA10;
					excl_47295((&(*gch).cycleroots), c);
				}
				LA10: ;
				preparedealloc_50608(c);
				forallchildren_50417(c, ((NU8) 2));
				rawdealloc_42223((&(*gch).region), ((void*) (c)));
			}
			LA5: ;
		} LA2: ;
	}
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, markroots_66405)(Tgcheap48416* gch) {
	NI tabsize;
	tabsize = ((NI) 0);
	{
		Tcell46547* s_66410;
		Tcellset46559 HEX3Atmp_66437;
		Tpagedesc46555* r_66442;
		s_66410 = 0;
		memset((void*)(&HEX3Atmp_66437), 0, sizeof(HEX3Atmp_66437));
		HEX3Atmp_66437 = (*gch).cycleroots;
		r_66442 = HEX3Atmp_66437.head;
		{
			while (1) {
				NI i_66444;
				if (!!((r_66442 == NIM_NIL))) goto LA3;
				i_66444 = ((NI) 0);
				{
					while (1) {
						NI w_66446;
						NI j_66448;
						if (!(i_66444 <= ((NI) 7))) goto LA5;
						w_66446 = (*r_66442).bits[(i_66444)- 0];
						j_66448 = ((NI) 0);
						{
							while (1) {
								if (!!((w_66446 == ((NI) 0)))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_66446 & ((NI) 1)))) == ((NI) 0)))) goto LA10;
									s_66410 = ((Tcell46547*) ((NI)((NI)((NU64)((*r_66442).key) << (NU64)(((NI) 12))) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_66444) << (NU64)(((NI) 6)))) + (NU64)(j_66448))) * (NU64)(((NI) 8))))));
									tabsize += ((NI) 1);
									{
										NIM_BOOL LOC14;
										LOC14 = 0;
										LOC14 = (((NI) ((NI)((*s_66410).refcount & ((NI) 3)))) == ((NI) 3));
										if (!(LOC14)) goto LA15;
										LOC14 = ((NU64)(((NI) 8)) <= (NU64)((*s_66410).refcount));
										LA15: ;
										if (!LOC14) goto LA16;
										markgray_65605(s_66410);
									}
									goto LA12;
									LA16: ;
									{
										excl_47295((&(*gch).cycleroots), s_66410);
										{
											if (!((*s_66410).refcount == ((NI) 0))) goto LA21;
											freecycliccell_64827(gch, s_66410);
										}
										LA21: ;
									}
									LA12: ;
								}
								LA10: ;
								j_66448 += ((NI) 1);
								w_66446 = (NI)((NU64)(w_66446) >> (NU64)(((NI) 1)));
							} LA7: ;
						}
						i_66444 += ((NI) 1);
					} LA5: ;
				}
				r_66442 = (*r_66442).next;
			} LA3: ;
		}
	}
	(*gch).stat.cycletablesize = (((*gch).stat.cycletablesize >= tabsize) ? (*gch).stat.cycletablesize : tabsize);
}

N_NIMCALL(void, collectroots_68801)(Tgcheap48416* gch) {
	{
		Tcell46547* s_68805;
		Tcellset46559 HEX3Atmp_68807;
		Tpagedesc46555* r_68812;
		s_68805 = 0;
		memset((void*)(&HEX3Atmp_68807), 0, sizeof(HEX3Atmp_68807));
		HEX3Atmp_68807 = (*gch).cycleroots;
		r_68812 = HEX3Atmp_68807.head;
		{
			while (1) {
				NI i_68814;
				if (!!((r_68812 == NIM_NIL))) goto LA3;
				i_68814 = ((NI) 0);
				{
					while (1) {
						NI w_68816;
						NI j_68818;
						if (!(i_68814 <= ((NI) 7))) goto LA5;
						w_68816 = (*r_68812).bits[(i_68814)- 0];
						j_68818 = ((NI) 0);
						{
							while (1) {
								if (!!((w_68816 == ((NI) 0)))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_68816 & ((NI) 1)))) == ((NI) 0)))) goto LA10;
									s_68805 = ((Tcell46547*) ((NI)((NI)((NU64)((*r_68812).key) << (NU64)(((NI) 12))) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_68814) << (NU64)(((NI) 6)))) + (NU64)(j_68818))) * (NU64)(((NI) 8))))));
									collectwhite_66204(s_68805);
								}
								LA10: ;
								j_68818 += ((NI) 1);
								w_68816 = (NI)((NU64)(w_68816) >> (NU64)(((NI) 1)));
							} LA7: ;
						}
						i_68814 += ((NI) 1);
					} LA5: ;
				}
				r_68812 = (*r_68812).next;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, deinit_46687)(Tcellset46559* s) {
	Tpagedesc46555* it;
	it = (*s).head;
	{
		while (1) {
			Tpagedesc46555* n;
			if (!!((it == NIM_NIL))) goto LA2;
			n = (*it).next;
			dealloc_6048(((void*) (it)));
			it = n;
		} LA2: ;
	}
	(*s).head = NIM_NIL;
	dealloc_6048(((void*) ((*s).data)));
	(*s).data = NIM_NIL;
	(*s).counter = ((NI) 0);
}

N_NIMCALL(void, cellsetreset_54601)(Tcellset46559* s) {
	deinit_46687(s);
	init_46676(s);
}

N_NIMCALL(void, collectcycles_68844)(Tgcheap48416* gch) {
	{
		while (1) {
			NIM_BOOL LOC3;
			if (!(((NI) 0) < (*gch).zct.len)) goto LA2;
			LOC3 = 0;
			LOC3 = collectzct_68612(gch);
		} LA2: ;
	}
	markroots_66405(gch);
	{
		Tcell46547* s_69001;
		Tcellset46559 HEX3Atmp_69203;
		Tpagedesc46555* r_69208;
		s_69001 = 0;
		memset((void*)(&HEX3Atmp_69203), 0, sizeof(HEX3Atmp_69203));
		HEX3Atmp_69203 = (*gch).cycleroots;
		r_69208 = HEX3Atmp_69203.head;
		{
			while (1) {
				NI i_69210;
				if (!!((r_69208 == NIM_NIL))) goto LA6;
				i_69210 = ((NI) 0);
				{
					while (1) {
						NI w_69212;
						NI j_69214;
						if (!(i_69210 <= ((NI) 7))) goto LA8;
						w_69212 = (*r_69208).bits[(i_69210)- 0];
						j_69214 = ((NI) 0);
						{
							while (1) {
								if (!!((w_69212 == ((NI) 0)))) goto LA10;
								{
									if (!!((((NI) ((NI)(w_69212 & ((NI) 1)))) == ((NI) 0)))) goto LA13;
									s_69001 = ((Tcell46547*) ((NI)((NI)((NU64)((*r_69208).key) << (NU64)(((NI) 12))) | (NI)((NU64)((NI)((NU64)((NI)((NU64)(i_69210) << (NU64)(((NI) 6)))) + (NU64)(j_69214))) * (NU64)(((NI) 8))))));
									scan_66004(s_69001);
								}
								LA13: ;
								j_69214 += ((NI) 1);
								w_69212 = (NI)((NU64)(w_69212) >> (NU64)(((NI) 1)));
							} LA10: ;
						}
						i_69210 += ((NI) 1);
					} LA8: ;
				}
				r_69208 = (*r_69208).next;
			} LA6: ;
		}
	}
	collectroots_68801(gch);
	cellsetreset_54601((&(*gch).cycleroots));
}

N_NIMCALL(NI, gettotalmem_6699)(void) {
	NI result;
{	result = 0;
	result = gch_48444.region.currmem;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NI, getfreemem_6697)(void) {
	NI result;
	result = 0;
	result = gch_48444.region.freemem;
	return result;
}

N_NIMCALL(NI, getoccupiedmem_6695)(void) {
	NI result;
	NI LOC1;
	NI LOC2;
{	result = 0;
	LOC1 = 0;
	LOC1 = gettotalmem_6699();
	LOC2 = 0;
	LOC2 = getfreemem_6697();
	result = (NI)(LOC1 - LOC2);
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, unmarkstackandregisters_73011)(Tgcheap48416* gch) {
	Tcell46547** d;
	d = (*gch).decstack.d;
	{
		NI i_73026;
		NI HEX3Atmp_73202;
		NI res_73205;
		i_73026 = 0;
		HEX3Atmp_73202 = 0;
		HEX3Atmp_73202 = (NI)((*gch).decstack.len - ((NI) 1));
		res_73205 = ((NI) 0);
		{
			while (1) {
				if (!(res_73205 <= HEX3Atmp_73202)) goto LA3;
				i_73026 = res_73205;
				decref_52004(d[(i_73026)- 0]);
				res_73205 += ((NI) 1);
			} LA3: ;
		}
	}
	(*gch).decstack.len = ((NI) 0);
}

N_NIMCALL(void, collectctbody_73221)(Tgcheap48416* gch) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_70611();
	(*gch).stat.maxstacksize = (((*gch).stat.maxstacksize >= LOC1) ? (*gch).stat.maxstacksize : LOC1);
	prepareforinteriorpointerchecking_43882((&(*gch).region));
	markstackandregisters_70840(gch);
	markthreadstacks_69806(gch);
	(*gch).stat.maxstackcells = (((*gch).stat.maxstackcells >= (*gch).decstack.len) ? (*gch).stat.maxstackcells : (*gch).decstack.len);
	(*gch).stat.stackscans += ((NI) 1);
	{
		NIM_BOOL LOC4;
		LOC4 = 0;
		LOC4 = collectzct_68612(gch);
		if (!LOC4) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = getoccupiedmem_46469((&(*gch).region));
			LOC9 = ((*gch).cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			collectcycles_68844(gch);
			(*gch).stat.cyclecollections += ((NI) 1);
			LOC14 = 0;
			LOC14 = getoccupiedmem_6695();
			(*gch).cyclethreshold = ((((NI) 4194304) >= (NI)(LOC14 * ((NI) 2))) ? ((NI) 4194304) : (NI)(LOC14 * ((NI) 2)));
			(*gch).stat.maxthreshold = (((*gch).stat.maxthreshold >= (*gch).cyclethreshold) ? (*gch).stat.maxthreshold : (*gch).cyclethreshold);
		}
		LA12: ;
	}
	LA5: ;
	unmarkstackandregisters_73011(gch);
}

N_NIMCALL(void, collectct_50410)(Tgcheap48416* gch) {
	NI stackmarkcosts;
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_70611();
	stackmarkcosts = (((NI)(LOC1 / ((NI) 128)) >= ((NI) 500)) ? (NI)(LOC1 / ((NI) 128)) : ((NI) 500));
	{
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC6;
		NIM_BOOL LOC8;
		NI LOC10;
		LOC4 = 0;
		LOC5 = 0;
		LOC6 = 0;
		LOC6 = (stackmarkcosts <= (*gch).zct.len);
		if (LOC6) goto LA7;
		LOC8 = 0;
		LOC8 = NIM_TRUE;
		if (!(LOC8)) goto LA9;
		LOC10 = 0;
		LOC10 = getoccupiedmem_46469((&(*gch).region));
		LOC8 = ((*gch).cyclethreshold <= LOC10);
		LA9: ;
		LOC6 = LOC8;
		LA7: ;
		LOC5 = LOC6;
		if (LOC5) goto LA11;
		LOC5 = NIM_FALSE;
		LA11: ;
		LOC4 = LOC5;
		if (!(LOC4)) goto LA12;
		LOC4 = ((*gch).recgclock == ((NI) 0));
		LA12: ;
		if (!LOC4) goto LA13;
		collectctbody_73221(gch);
	}
	LA13: ;
}

static N_INLINE(void, addnewobjtozct_55687)(Tcell46547* res, Tgcheap48416* gch) {
	NI L;
	Tcell46547** d;
{	L = (*gch).zct.len;
	d = (*gch).zct.d;
	{
		Tcell46547* c;
		if (!(((NI) 8) < L)) goto LA3;
		c = 0;
		c = d[((NI)(L - ((NI) 1)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA7;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 1)))- 0] = res;
			goto BeforeRet;
		}
		LA7: ;
		c = d[((NI)(L - ((NI) 2)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA11;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 2)))- 0] = res;
			goto BeforeRet;
		}
		LA11: ;
		c = d[((NI)(L - ((NI) 3)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA15;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 3)))- 0] = res;
			goto BeforeRet;
		}
		LA15: ;
		c = d[((NI)(L - ((NI) 4)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA19;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 4)))- 0] = res;
			goto BeforeRet;
		}
		LA19: ;
		c = d[((NI)(L - ((NI) 5)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA23;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 5)))- 0] = res;
			goto BeforeRet;
		}
		LA23: ;
		c = d[((NI)(L - ((NI) 6)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA27;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 6)))- 0] = res;
			goto BeforeRet;
		}
		LA27: ;
		c = d[((NI)(L - ((NI) 7)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA31;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 7)))- 0] = res;
			goto BeforeRet;
		}
		LA31: ;
		c = d[((NI)(L - ((NI) 8)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA35;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 8)))- 0] = res;
			goto BeforeRet;
		}
		LA35: ;
		add_46632((&(*gch).zct), res);
	}
	goto LA1;
	LA3: ;
	{
		d[(L)- 0] = res;
		(*gch).zct.len += ((NI) 1);
	}
	LA1: ;
	}BeforeRet: ;
}

N_NIMCALL(void*, rawnewobj_56204)(TNimType* typ, NI size, Tgcheap48416* gch) {
	void* result;
	Tcell46547* res;
	void* LOC1;
	result = 0;
	collectct_50410(gch);
	LOC1 = 0;
	LOC1 = rawalloc_35901((&(*gch).region), (NI)(size + ((NI)sizeof(Tcell46547))));
	res = ((Tcell46547*) (LOC1));
	(*res).typ = typ;
	(*res).refcount = ((NI) 4);
	addnewobjtozct_55687(res, gch);
	result = celltousr_50025(res);
	return result;
}

N_NIMCALL(void*, newObjNoInit)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_56204(typ, size, (&gch_48444));
	return result;
}

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

N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len) {
	NimStringDesc* result;
	result = 0;
	result = rawNewStringNoInit(len);
	(*result).Sup.len = len;
	memcpy(((NCSTRING) ((*result).data)), str, (NI)(len + ((NI) 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_13669)(FILE* f, NCSTRING c) {
	fputs(c, f);
}

N_NIMCALL(void, writetostderr_17201)(NCSTRING msg) {
	write_13669(stdout, msg);
}

N_NIMCALL(void, showerrormessage_17209)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_17004 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_17004(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_17201(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 == SIGBUS)) goto LA18;
		msg = "SIGBUS: Illegal storage access. (Attempt to read from nil?)\012";
	}
	goto LA1;
	LA18: ;
	{
		{
			{
				if (!(sig == SIGPIPE)) goto LA24;
				msg = "SIGPIPE: Pipe closed.\012";
				goto LA21;
			}
			LA24: ;
			msg = "unknown signal\012";
		} LA21: ;
	}
	LA1: ;
	showerrormessage_17209(msg);
	exit(((NI) 1));
}

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

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	Tcell46547* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_50046(p);
	result = (NI)((NU64)((*LOC1).refcount) >> (NU64)(((NI) 3)));
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	Tcell46547* res;
	void* LOC1;
	result = 0;
	collectct_50410((&gch_48444));
	LOC1 = 0;
	LOC1 = rawalloc_35901((&gch_48444.region), (NI)(size + ((NI)sizeof(Tcell46547))));
	res = ((Tcell46547*) (LOC1));
	(*res).typ = typ;
	(*res).refcount = ((NI) 8);
	result = celltousr_50025(res);
	zeroMem(result, ((NI) (size)));
	return result;
}

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

N_NIMCALL(void, nimGCvisit)(void* d, NI op) {
	dooperation_50421(d, ((NU8) (op)));
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_56204(typ, size, (&gch_48444));
	zeroMem(result, ((NI) (size)));
	return result;
}
N_NIMCALL(void, TMP48)(void* p, NI op) {
	Exception* a;
	a = (Exception*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
}
N_NIMCALL(void, TMP49)(void* p, NI op) {
	Overflowerror3443* a;
	a = (Overflowerror3443*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	Tcell46547* c;
	c = usrtocell_50046(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3;
		rtladdzct_51604(c);
	}
	LA3: ;
}

static N_INLINE(void, incref_52422)(Tcell46547* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_50067(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_50823(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Tcell46547* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_50046(src);
		incref_52422(LOC5);
	}
	LA3: ;
	{
		Tcell46547* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_50046((*dest));
		decref_52004(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

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

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

static N_INLINE(void, quitordebug_18207)(void) {
	exit(((NI) 1));
}

N_NIMCALL(void, raiseexceptionaux_18404)(Exception* e) {
{	{
		if (!!((localraisehook_9030 == NIM_NIL))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = localraisehook_9030(e);
			if (!!(LOC7)) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
	}
	LA3: ;
	{
		if (!!((globalraisehook_9025 == NIM_NIL))) goto LA12;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = globalraisehook_9025(e);
			if (!!(LOC16)) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
	}
	LA12: ;
	{
		if (!!((exchandler_17243 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_17243).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_17243).raiseAction.ClEnv? (*exchandler_17243).raiseAction.ClPrc(e, (*exchandler_17243).raiseAction.ClEnv):((TMP51)((*exchandler_17243).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			_longjmp((*exchandler_17243).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!(isObjWithCache((*e).Sup.m_type, (&NTI3453), Nim_OfCheck_CACHE1))) goto LA30;
		showerrormessage_17209((*e).name);
		quitordebug_18207();
	}
	goto LA19;
	LA30: ;
	{
		TY18816 buf;
		NI L;
		memset((void*)buf, 0, sizeof(buf));
		L = ((NI) 0);
		{
			if (!((NI)(L + ((NI) 28)) < ((NI) 2000))) goto LA35;
			memcpy(((void*) ((&buf[(L)- 0]))), "Error: unhandled exception: ", ((NI) 28));
			L += ((NI) 28);
		}
		LA35: ;
		{
			if (!!((*e).message == 0)) goto LA39;
			{
				if (!((NI)(L + ((*e).message ? (*e).message->Sup.len : 0)) < ((NI) 2000))) goto LA43;
				memcpy(((void*) ((&buf[(L)- 0]))), ((void*) ((*e).message->data)), ((NI) (((*e).message ? (*e).message->Sup.len : 0))));
				L += ((*e).message ? (*e).message->Sup.len : 0);
			}
			LA43: ;
		}
		LA39: ;
		{
			if (!((NI)(L + ((NI) 2)) < ((NI) 2000))) goto LA47;
			memcpy(((void*) ((&buf[(L)- 0]))), " [", ((NI) 2));
			L += ((NI) 2);
		}
		LA47: ;
		{
			NI LOC51;
			NI LOC54;
			NI LOC55;
			LOC51 = 0;
			LOC51 = strlen((*e).name);
			if (!((NI)(L + LOC51) < ((NI) 2000))) goto LA52;
			LOC54 = 0;
			LOC54 = strlen((*e).name);
			memcpy(((void*) ((&buf[(L)- 0]))), ((void*) ((*e).name)), ((NI) (LOC54)));
			LOC55 = 0;
			LOC55 = strlen((*e).name);
			L += LOC55;
		}
		LA52: ;
		{
			if (!((NI)(L + ((NI) 2)) < ((NI) 2000))) goto LA58;
			memcpy(((void*) ((&buf[(L)- 0]))), "]\012", ((NI) 2));
			L += ((NI) 2);
		}
		LA58: ;
		showerrormessage_17209(((NCSTRING) (buf)));
		quitordebug_18207();
	}
	LA19: ;
	}BeforeRet: ;
}

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

N_NOINLINE(void, raiseOverflow)(void) {
	Overflowerror3443* e_23166;
	NimStringDesc* LOC1;
	e_23166 = 0;
	e_23166 = (Overflowerror3443*) newObj((&NTI23201), sizeof(Overflowerror3443));
	(*e_23166).Sup.Sup.Sup.m_type = (&NTI3443);
	LOC1 = 0;
	LOC1 = (*e_23166).Sup.Sup.message; (*e_23166).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP50));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_23166, "OverflowError");
}

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

N_NIMCALL(NI, mulInt)(NI a, NI b) {
	NI result;
	NF resasfloat;
	NF floatprod;
{	result = 0;
	resasfloat = 0;
	floatprod = 0;
	result = (NI)((NU64)(a) * (NU64)(b));
	floatprod = ((NF)(((double) (a))) * (NF)(((double) (b))));
	resasfloat = ((double) (result));
	{
		if (!(resasfloat == floatprod)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(((NF)(3.2000000000000000e+001) * (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, ((NI) 16));
	result = newObjRC1(typ, size);
	(*((TGenericSeq*) (result))).len = len;
	(*((TGenericSeq*) (result))).reserved = len;
	return result;
}

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

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

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isonstack_50414(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		{
			Tcell46547* LOC10;
			if (!!((src == NIM_NIL))) goto LA8;
			LOC10 = 0;
			LOC10 = usrtocell_50046(src);
			incref_52422(LOC10);
		}
		LA8: ;
		{
			Tcell46547* LOC15;
			if (!((NU64)(((NI) 4096)) <= (NU64)(((NI) ((*dest)))))) goto LA13;
			LOC15 = 0;
			LOC15 = usrtocell_50046((*dest));
			decref_52004(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	(*dest) = src;
}
N_NIMCALL(void, TMP128)(void* p, NI op) {
	Valueerror3449* a;
	a = (Valueerror3449*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

N_NOINLINE(void, chckNil)(void* p) {
	{
		Valueerror3449* e_22419;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_22419 = 0;
		e_22419 = (Valueerror3449*) newObj((&NTI22601), sizeof(Valueerror3449));
		(*e_22419).Sup.Sup.m_type = (&NTI3449);
		LOC5 = 0;
		LOC5 = (*e_22419).Sup.message; (*e_22419).Sup.message = copyStringRC1(((NimStringDesc*) &TMP129));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_22419, "ValueError");
	}
	LA3: ;
}

N_NIMCALL(void, genericresetaux_80401)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		genericReset(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_82020;
			NI HEX3Atmp_82046;
			NI res_82049;
			i_82020 = 0;
			HEX3Atmp_82046 = 0;
			HEX3Atmp_82046 = (NI)((*n).len - ((NI) 1));
			res_82049 = ((NI) 0);
			{
				while (1) {
					if (!(res_82049 <= HEX3Atmp_82046)) goto LA6;
					i_82020 = res_82049;
					genericresetaux_80401(dest, (*n).sons[(i_82020)- 0]);
					res_82049 += ((NI) 1);
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_26610(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			genericresetaux_80401(dest, m);
		}
		LA10: ;
		zeroMem(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), ((NI) ((*(*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) 18):
	{
		genericresetaux_80401(dest, (*mt).node);
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		genericresetaux_80401(dest, (*mt).node);
		pint = ((TNimType**) (dest));
		(*pint) = NIM_NIL;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_82213;
			NI HEX3Atmp_82237;
			NI res_82240;
			i_82213 = 0;
			HEX3Atmp_82237 = 0;
			HEX3Atmp_82237 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
			res_82240 = ((NI) 0);
			{
				while (1) {
					if (!(res_82240 <= HEX3Atmp_82237)) goto LA7;
					i_82213 = res_82240;
					genericReset(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_82213) * (NU64)((*(*mt).base).size)))))), (*mt).base);
					res_82240 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	break;
	default:
	{
		zeroMem(dest, ((NI) ((*mt).size)));
	}
	break;
	}
}

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

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

N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_76443, NI last) {
	NimStringDesc* result;
	NI start;
	NI len;
	result = 0;
	start = ((start_76443 >= ((NI) 0)) ? start_76443 : ((NI) 0));
	len = (NI)((NI)(((last <= (NI)((*s).Sup.len - ((NI) 1))) ? last : (NI)((*s).Sup.len - ((NI) 1))) - start) + ((NI) 1));
	{
		if (!(((NI) 0) < len)) goto LA3;
		result = rawNewStringNoInit(len);
		(*result).Sup.len = len;
		memcpy(((NCSTRING) ((*result).data)), ((NCSTRING) ((&(*s).data[(start)- 0]))), len);
		(*result).data[(len)- 0] = 0;
	}
	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, (NI)((*s).Sup.len - ((NI) 1)));
	return result;
}

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

N_NIMCALL(void*, growobj_62006)(void* old, NI newsize, Tgcheap48416* gch) {
	void* result;
	Tcell46547* ol;
	Tcell46547* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	result = 0;
	collectct_50410(gch);
	ol = usrtocell_50046(old);
	LOC1 = 0;
	LOC1 = rawalloc_35901((&(*gch).region), (NI)(newsize + ((NI)sizeof(Tcell46547))));
	res = ((Tcell46547*) (LOC1));
	elemsize = ((NI) 1);
	{
		if (!!(((*(*ol).typ).kind == ((NU8) 28)))) goto LA4;
		elemsize = (*(*(*ol).typ).base).size;
	}
	LA4: ;
	oldsize = (NI)((NI)((*((TGenericSeq*) (old))).len * elemsize) + ((NI) 16));
	memcpy(((void*) (res)), ((void*) (ol)), ((NI) ((NI)(oldsize + ((NI)sizeof(Tcell46547))))));
	zeroMem(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (res))) + (NU64)(oldsize))) + (NU64)(((NI)sizeof(Tcell46547)))))), ((NI) ((NI)(newsize - oldsize))));
	{
		if (!((NU64)((NI)((NU64)((*ol).refcount) >> (NU64)(((NI) 3)))) <= (NU64)(((NI) 1)))) goto LA8;
		{
			NI j;
			Tcell46547** d;
			if (!!(((NI)((*ol).refcount & ((NI) 4)) == ((NI) 0)))) goto LA12;
			j = (NI)((*gch).zct.len - ((NI) 1));
			d = (*gch).zct.d;
			{
				while (1) {
					if (!(((NI) 0) <= j)) goto LA15;
					{
						if (!(d[(j)- 0] == ol)) goto LA18;
						d[(j)- 0] = res;
						goto LA14;
					}
					LA18: ;
					j -= ((NI) 1);
				} LA15: ;
			} LA14: ;
		}
		LA12: ;
		{
			NIM_BOOL LOC22;
			LOC22 = 0;
			LOC22 = canbecycleroot_50067(ol);
			if (!LOC22) goto LA23;
			excl_47295((&(*gch).cycleroots), ol);
		}
		LA23: ;
		rawdealloc_42223((&(*gch).region), ((void*) (ol)));
	}
	goto LA6;
	LA8: ;
	{
		(*res).refcount = ((NI) 8);
		decref_52004(ol);
	}
	LA6: ;
	result = celltousr_50025(res);
	return result;
}

N_NIMCALL(void*, growobj_64818)(void* old, NI newsize) {
	void* result;
	result = 0;
	result = growobj_62006(old, newsize, (&gch_48444));
	return result;
}

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

N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c) {
	NimStringDesc* result;
	result = 0;
	result = s;
	{
		void* LOC5;
		if (!((NI)((*result).Sup.reserved & ((NI) IL64(9223372036854775807))) <= (*result).Sup.len)) goto LA3;
		(*result).Sup.reserved = resize_76201((NI)((*result).Sup.reserved & ((NI) IL64(9223372036854775807))));
		LOC5 = 0;
		LOC5 = growobj_64818(((void*) (result)), (NI)((NI)(((NI)sizeof(TGenericSeq)) + (*result).Sup.reserved) + ((NI) 1)));
		result = ((NimStringDesc*) (LOC5));
	}
	LA3: ;
	(*result).data[((*result).Sup.len)- 0] = c;
	(*result).data[((NI)((*result).Sup.len + ((NI) 1)))- 0] = 0;
	(*result).Sup.len += ((NI) 1);
	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(((NI) 1));
	result->data[((NI) 0)] = x;
	return result;
}

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

N_NIMCALL(void, genericassignaux_80412)(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_80406(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), ((void*) ((NI)((NU64)(s) + (NU64)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_80449;
			NI HEX3Atmp_80606;
			NI res_80609;
			i_80449 = 0;
			HEX3Atmp_80606 = 0;
			HEX3Atmp_80606 = (NI)((*n).len - ((NI) 1));
			res_80609 = ((NI) 0);
			{
				while (1) {
					if (!(res_80609 <= HEX3Atmp_80606)) goto LA5;
					i_80449 = res_80609;
					genericassignaux_80412(dest, src, (*n).sons[(i_80449)- 0], shallow);
					res_80609 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		dd = selectbranch_26610(dest, n);
		m = selectbranch_26610(src, n);
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = !((m == dd));
			if (!(LOC9)) goto LA10;
			LOC9 = !((dd == NIM_NIL));
			LA10: ;
			if (!LOC9) goto LA11;
			genericresetaux_80401(dest, dd);
		}
		LA11: ;
		memcpy(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), ((void*) ((NI)((NU64)(s) + (NU64)((*n).offset)))), ((NI) ((*(*n).typ).size)));
		{
			if (!!((m == NIM_NIL))) goto LA15;
			genericassignaux_80412(dest, src, m, shallow);
		}
		LA15: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, genericassignaux_80406)(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 & ((NI) (IL64(-9223372036854775807) - IL64(1)))) == ((NI) 0)));
			LA7: ;
			if (!LOC4) goto LA8;
			unsureAsgnRef(x, s2);
		}
		goto LA2;
		LA8: ;
		{
			NimStringDesc* LOC11;
			LOC11 = 0;
			LOC11 = copyString(((NimStringDesc*) (s2)));
			unsureAsgnRef(x, ((void*) (LOC11)));
		}
		LA2: ;
	}
	break;
	case ((NU8) 24):
	{
		void* s2;
		TGenericSeq* seq;
		void** x;
		void* LOC21;
		NI dst;
		s2 = (*((void**) (src)));
		seq = ((TGenericSeq*) (s2));
		x = ((void**) (dest));
		{
			NIM_BOOL LOC15;
			NIM_BOOL LOC16;
			LOC15 = 0;
			LOC16 = 0;
			LOC16 = (s2 == NIM_NIL);
			if (LOC16) goto LA17;
			LOC16 = shallow;
			LA17: ;
			LOC15 = LOC16;
			if (LOC15) goto LA18;
			LOC15 = !(((NI)((*seq).reserved & ((NI) (IL64(-9223372036854775807) - IL64(1)))) == ((NI) 0)));
			LA18: ;
			if (!LOC15) goto LA19;
			unsureAsgnRef(x, s2);
			goto BeforeRet;
		}
		LA19: ;
		LOC21 = 0;
		LOC21 = newSeq(mt, (*seq).len);
		unsureAsgnRef(x, LOC21);
		dst = ((NI) ((*((void**) (dest)))));
		{
			NI i_81012;
			NI HEX3Atmp_81143;
			NI res_81146;
			i_81012 = 0;
			HEX3Atmp_81143 = 0;
			HEX3Atmp_81143 = (NI)((*seq).len - ((NI) 1));
			res_81146 = ((NI) 0);
			{
				while (1) {
					if (!(res_81146 <= HEX3Atmp_81143)) goto LA24;
					i_81012 = res_81146;
					genericassignaux_80406(((void*) ((NI)((NU64)((NI)((NU64)(dst) + (NU64)((NI)((NU64)(i_81012) * (NU64)((*(*mt).base).size))))) + (NU64)(((NI) 16))))), ((void*) ((NI)((NU64)((NI)((NU64)(((NI) (s2))) + (NU64)((NI)((NU64)(i_81012) * (NU64)((*(*mt).base).size))))) + (NU64)(((NI) 16))))), (*mt).base, shallow);
					res_81146 += ((NI) 1);
				} LA24: ;
			}
		}
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		{
			if (!!(((*mt).base == NIM_NIL))) goto LA28;
			genericassignaux_80406(dest, src, (*mt).base, shallow);
		}
		LA28: ;
		genericassignaux_80412(dest, src, (*mt).node, shallow);
		pint = ((TNimType**) (dest));
		(*pint) = mt;
	}
	break;
	case ((NU8) 18):
	{
		genericassignaux_80412(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_81091;
			NI HEX3Atmp_81154;
			NI res_81157;
			i_81091 = 0;
			HEX3Atmp_81154 = 0;
			HEX3Atmp_81154 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
			res_81157 = ((NI) 0);
			{
				while (1) {
					if (!(res_81157 <= HEX3Atmp_81154)) goto LA34;
					i_81091 = res_81157;
					genericassignaux_80406(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i_81091) * (NU64)((*(*mt).base).size)))))), ((void*) ((NI)((NU64)(s) + (NU64)((NI)((NU64)(i_81091) * (NU64)((*(*mt).base).size)))))), (*mt).base, shallow);
					res_81157 += ((NI) 1);
				} LA34: ;
			}
		}
	}
	break;
	case ((NU8) 22):
	{
		unsureAsgnRef(((void**) (dest)), (*((void**) (s))));
	}
	break;
	default:
	{
		memcpy(dest, src, ((NI) ((*mt).size)));
	}
	break;
	}
	}BeforeRet: ;
}

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

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

N_NOINLINE(void, raiseeio_78405)(NimStringDesc* msg) {
	Ioerror3431* e_78410;
	NimStringDesc* LOC1;
	e_78410 = 0;
	e_78410 = (Ioerror3431*) newObj((&NTI78601), sizeof(Ioerror3431));
	(*e_78410).Sup.Sup.Sup.m_type = (&NTI3431);
	LOC1 = 0;
	LOC1 = (*e_78410).Sup.Sup.message; (*e_78410).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_78410, "IOError");
}

N_NIMCALL(void, write_13657)(FILE* f, NimStringDesc* s) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = writebuffer_13737(f, ((void*) (s->data)), ((NI) ((s ? s->Sup.len : 0))));
		if (!!((LOC3 == (s ? s->Sup.len : 0)))) goto LA4;
		raiseeio_78405(((NimStringDesc*) &TMP143));
	}
	LA4: ;
}

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

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

N_NIMCALL(NIM_BOOL, stacktraceavailable_18130)(void) {
	NIM_BOOL result;
	result = 0;
	result = NIM_FALSE;
	return result;
}

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

N_NIMCALL(TNimType*, extGetCellType)(void* c) {
	TNimType* result;
	Tcell46547* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_50046(c);
	result = (*LOC1).typ;
	return result;
}

N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		NI LOC5;
		void* LOC6;
		if (!((NI)((*result).reserved & ((NI) IL64(9223372036854775807))) < newlen)) goto LA3;
		LOC5 = 0;
		LOC5 = resize_76201((NI)((*result).reserved & ((NI) IL64(9223372036854775807))));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_64818(((void*) (result)), (NI)((NI)(elemsize * (*result).reserved) + ((NI) 16)));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		if (!(newlen < (*result).len)) goto LA8;
		{
			NI i_77211;
			NI HEX3Atmp_77288;
			NI res_77291;
			i_77211 = 0;
			HEX3Atmp_77288 = 0;
			HEX3Atmp_77288 = (NI)((*result).len - ((NI) 1));
			res_77291 = newlen;
			{
				while (1) {
					TNimType* LOC13;
					if (!(res_77291 <= HEX3Atmp_77288)) goto LA12;
					i_77211 = res_77291;
					LOC13 = 0;
					LOC13 = extGetCellType(((void*) (result)));
					forallchildrenaux_50425(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (result))) + (NU64)(((NI) 16)))) + (NU64)((NI)((NU64)(i_77211) * (NU64)(elemsize)))))), (*LOC13).base, ((NU8) 2));
					res_77291 += ((NI) 1);
				} LA12: ;
			}
		}
		zeroMem(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (result))) + (NU64)(((NI) 16)))) + (NU64)((NI)((NU64)(newlen) * (NU64)(elemsize)))))), ((NI) ((NI)((NU64)((NI)((NU64)((*result).len) - (NU64)(newlen))) * (NU64)(elemsize)))));
	}
	goto LA1;
	LA8: ;
	LA1: ;
	(*result).len = newlen;
	return result;
}

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

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

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		Tcell46547* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_50046(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46547* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_50046((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA11;
			rtladdzct_51604(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

N_NIMCALL(FILE*, open_13417)(NimStringDesc* filename, NU8 mode, NI bufsize) {
	FILE* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Ioerror3431* e_13426;
		NimStringDesc* LOC6;
		LOC3 = 0;
		LOC3 = open_13403(&result, filename, mode, bufsize);
		if (!!(LOC3)) goto LA4;
		e_13426 = 0;
		e_13426 = (Ioerror3431*) newObj((&NTI78601), sizeof(Ioerror3431));
		(*e_13426).Sup.Sup.Sup.m_type = (&NTI3431);
		LOC6 = 0;
		LOC6 = rawNewString(filename->Sup.len + 13);
appendString(LOC6, ((NimStringDesc*) &TMP976));
appendString(LOC6, filename);
		asgnRefNoCycle((void**) (&(*e_13426).Sup.Sup.message), LOC6);
		raiseException((Exception*)e_13426, "IOError");
	}
	LA4: ;
	return result;
}

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

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

N_NIMCALL(void, reraiseException)(void) {
	{
		Reraiseerror3463* e_19020;
		NimStringDesc* LOC5;
		if (!(currexception_17245 == NIM_NIL)) goto LA3;
		e_19020 = 0;
		e_19020 = (Reraiseerror3463*) newObj((&NTI19201), sizeof(Reraiseerror3463));
		(*e_19020).Sup.Sup.m_type = (&NTI3463);
		LOC5 = 0;
		LOC5 = (*e_19020).Sup.message; (*e_19020).Sup.message = copyStringRC1(((NimStringDesc*) &TMP978));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_19020, "ReraiseError");
	}
	goto LA1;
	LA3: ;
	{
		raiseexceptionaux_18404(currexception_17245);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, HEX24_165306)(TY86545 x) {
	NimStringDesc* result;
	NIM_BOOL firstelement;
	NimStringDesc* LOC9;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP979));
	firstelement = NIM_TRUE;
	{
		if (!!(firstelement)) goto LA3;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP980));
	}
	LA3: ;
	result = resizeString(result, 8);
appendString(result, ((NimStringDesc*) &TMP981));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP982));
	result = resizeString(result, x.Field0->Sup.len + 0);
appendString(result, x.Field0);
	firstelement = NIM_FALSE;
	{
		if (!!(firstelement)) goto LA7;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP980));
	}
	LA7: ;
	result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TMP983));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP982));
	LOC9 = 0;
	LOC9 = nimIntToStr(x.Field1);
	result = resizeString(result, LOC9->Sup.len + 0);
appendString(result, LOC9);
	firstelement = NIM_FALSE;
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP984));
	return result;
}

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

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

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

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

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

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

N_NIMCALL(NI, ptrsize_44816)(void* p) {
	NI result;
	void* x;
	Tbasechunk27638* c;
	result = 0;
	x = ((void*) ((NI)((NU64)(((NI) (p))) - (NU64)(((NI)sizeof(Tfreecell27630))))));
	c = pageaddr_30455(p);
	result = (NI)((NU64)((*c).size) - (NU64)(((NI)sizeof(Tfreecell27630))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = issmallchunk_30308(c);
		if (!!(LOC3)) goto LA4;
		result -= (NI)(((NI)sizeof(Tbigchunk27642)) - ((NI) 8));
	}
	LA4: ;
	return result;
}

N_NIMCALL(void*, realloc_46207)(Tmemregion28410* allocator, void* p, NI newsize) {
	void* result;
	result = 0;
	{
		if (!(((NI) 0) < ((NI) (newsize)))) goto LA3;
		result = alloc0_45219(allocator, newsize);
		{
			NI LOC9;
			if (!!((p == NIM_NIL))) goto LA7;
			LOC9 = 0;
			LOC9 = ptrsize_44816(p);
			memcpy(result, p, ((NI) (LOC9)));
			dealloc_45228(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!!((p == NIM_NIL))) goto LA11;
		dealloc_45228(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}

N_NOCONV(void*, realloc_6033)(void* p, NI newsize) {
	void* result;
	result = 0;
	result = realloc_46207((&gch_48444.region), p, newsize);
	return result;
}

N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x) {
	NimStringDesc* result;
	NI i;
	NI64 y;
	result = 0;
	result = mnewString(((NI) 32));
	i = ((NI) 0);
	y = x;
	{
		while (1) {
			NI64 d;
			d = (NI64)(y / IL64(10));
			result->data[i] = ((NIM_CHAR) (((NI) ((NI)((((NI) ((NI64)(y - (NI64)(d * IL64(10))))) > 0? (((NI) ((NI64)(y - (NI64)(d * IL64(10)))))) : -(((NI) ((NI64)(y - (NI64)(d * IL64(10))))))) + ((NI) 48))))));
			i += ((NI) 1);
			y = d;
			{
				if (!(y == IL64(0))) goto LA5;
				goto LA1;
			}
			LA5: ;
		}
	} LA1: ;
	{
		if (!(x < IL64(0))) goto LA9;
		result->data[i] = 45;
		i += ((NI) 1);
	}
	LA9: ;
	result = setLengthStr(result, ((NI) (i)));
	{
		NI j_77827;
		NI HEX3Atmp_77841;
		NI res_77844;
		j_77827 = 0;
		HEX3Atmp_77841 = 0;
		HEX3Atmp_77841 = (NI)((NI)(i / ((NI) 2)) - ((NI) 1));
		res_77844 = ((NI) 0);
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_77844 <= HEX3Atmp_77841)) goto LA13;
				j_77827 = res_77844;
				LOC14 = 0;
				LOC14 = result->data[j_77827];
				result->data[j_77827] = result->data[(NI)((NI)(i - j_77827) - ((NI) 1))];
				result->data[(NI)((NI)(i - j_77827) - ((NI) 1))] = LOC14;
				res_77844 += ((NI) 1);
			} LA13: ;
		}
	}
	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+001) * (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, TMP1140)(void* p, NI op) {
	Oserror3433* a;
	a = (Oserror3433*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF f) {
	NimStringDesc* result;
	TY77396 buf;
	NI n;
	int LOC1;
	NIM_BOOL hasdot;
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	LOC1 = 0;
	LOC1 = sprintf(((NCSTRING) (buf)), "%.16g", f);
	n = ((NI) (LOC1));
	hasdot = NIM_FALSE;
	{
		NI i_77411;
		NI HEX3Atmp_77426;
		NI res_77429;
		i_77411 = 0;
		HEX3Atmp_77426 = 0;
		HEX3Atmp_77426 = (NI)(n - ((NI) 1));
		res_77429 = ((NI) 0);
		{
			while (1) {
				if (!(res_77429 <= HEX3Atmp_77426)) goto LA4;
				i_77411 = res_77429;
				{
					if (!((NU8)(buf[(i_77411)- 0]) == (NU8)(44))) goto LA7;
					buf[(i_77411)- 0] = 46;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA7: ;
				{
					if (!(((NU8)(buf[(i_77411)- 0])) >= ((NU8)(97)) && ((NU8)(buf[(i_77411)- 0])) <= ((NU8)(122)) || ((NU8)(buf[(i_77411)- 0])) >= ((NU8)(65)) && ((NU8)(buf[(i_77411)- 0])) <= ((NU8)(90)) || ((NU8)(buf[(i_77411)- 0])) == ((NU8)(46)))) goto LA10;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA10: ;
				LA5: ;
				res_77429 += ((NI) 1);
			} LA4: ;
		}
	}
	{
		if (!!(hasdot)) goto LA14;
		buf[(n)- 0] = 46;
		buf[((NI)(n + ((NI) 1)))- 0] = 48;
		buf[((NI)(n + ((NI) 2)))- 0] = 0;
	}
	LA14: ;
	{
		if (!((NU8)(buf[((NI)(n - ((NI) 1)))- 0]) == (NU8)(78))) goto LA18;
		result = copyString(((NimStringDesc*) &TMP1265));
	}
	goto LA16;
	LA18: ;
	{
		if (!((NU8)(buf[((NI)(n - ((NI) 1)))- 0]) == (NU8)(70))) goto LA21;
		{
			if (!((NU8)(buf[(((NI) 0))- 0]) == (NU8)(45))) goto LA25;
			result = copyString(((NimStringDesc*) &TMP1266));
		}
		goto LA23;
		LA25: ;
		{
			result = copyString(((NimStringDesc*) &TMP1267));
		}
		LA23: ;
	}
	goto LA16;
	LA21: ;
	{
		result = cstrToNimstr(((NCSTRING) (buf)));
	}
	LA16: ;
	return result;
}

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

static N_INLINE(void*, seqtoptr_522194)(TY190933* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_522183)(TY190933* x, TY190933* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_522194(x);
		LOC4 = 0;
		LOC4 = seqtoptr_522194(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_522194(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_522194(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_522263;
			NI HEX3Atmp_522265;
			NI res_522268;
			i_522263 = 0;
			HEX3Atmp_522265 = 0;
			HEX3Atmp_522265 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_522268 = ((NI) 0);
			{
				while (1) {
					if (!(res_522268 <= HEX3Atmp_522265)) goto LA19;
					i_522263 = res_522268;
					{
						if (!!((x->data[i_522263] == y->data[i_522263]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_522268 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_522172)(TY190933** x, NI32 y) {
	{
		NIM_BOOL LOC3;
		TY522284 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_522183((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (TY190933*) newSeq((&NTI190933), 1));
		LOC6[0] = y;
		(*x)->data[0] = LOC6[0];
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (TY190933*) incrSeq(&((*x))->Sup, sizeof(NI32));
		(*x)->data[(*x)->Sup.len-1] = y;
	}
	LA1: ;
}

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

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

N_NIMCALL(void, write_13673)(FILE* f, NimStringDesc** a, NI aLen0) {
	{
		NimStringDesc* x_79276;
		NI i_79282;
		x_79276 = 0;
		i_79282 = ((NI) 0);
		{
			while (1) {
				if (!(i_79282 < aLen0)) goto LA3;
				x_79276 = a[i_79282];
				write_13657(f, x_79276);
				i_79282 += ((NI) 1);
			} LA3: ;
		}
	}
}

N_NIMCALL(void, Gcdisablemarkandsweep_8819)(void) {
	gch_48444.cyclethreshold = ((NI) IL64(9223372036854775806));
}
N_NIMCALL(void, TMP1533)(void* p, NI op) {
	Indexerror3455* a;
	a = (Indexerror3455*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
}

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

N_NOINLINE(void, raiseassert_86557)(NimStringDesc* msg) {
	Assertionerror3447* e_86562;
	NimStringDesc* LOC1;
	e_86562 = 0;
	e_86562 = (Assertionerror3447*) newObj((&NTI86601), sizeof(Assertionerror3447));
	(*e_86562).Sup.Sup.m_type = (&NTI3447);
	LOC1 = 0;
	LOC1 = (*e_86562).Sup.message; (*e_86562).Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_86562, "AssertionError");
}

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

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

N_NIMCALL(NimStringDesc*, readallfile_79321)(FILE* file, NI len) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(((NI) (len)));
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = readbuffer_13715(file, ((void*) ((&result->data[((NI) 0)]))), ((NI) (len)));
		if (!!((LOC3 == len))) goto LA4;
		raiseeio_78405(((NimStringDesc*) &TMP2602));
	}
	LA4: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readallbuffer_79295)(FILE* file) {
	NimStringDesc* result;
	NimStringDesc* buffer;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2603));
	buffer = mnewString(((NI) 4000));
	{
		while (1) {
			NI bytesread;
			bytesread = readbuffer_13715(file, ((void*) ((&buffer->data[((NI) 0)]))), ((NI) 4000));
			{
				if (!(bytesread == ((NI) 4000))) goto LA5;
				result = resizeString(result, buffer->Sup.len + 0);
appendString(result, buffer);
			}
			goto LA3;
			LA5: ;
			{
				buffer = setLengthStr(buffer, ((NI) (bytesread)));
				result = resizeString(result, buffer->Sup.len + 0);
appendString(result, buffer);
				goto LA1;
			}
			LA3: ;
		}
	} LA1: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readall_13631)(FILE* file) {
	NimStringDesc* result;
	NI len;
	result = 0;
	{
		if (!!((file == stdin))) goto LA3;
		len = rawfilesize_79312(file);
	}
	goto LA1;
	LA3: ;
	{
		len = ((NI) -1);
	}
	LA1: ;
	{
		if (!(((NI) 0) < len)) goto LA8;
		result = readallfile_79321(file, len);
	}
	goto LA6;
	LA8: ;
	{
		result = readallbuffer_79295(file);
	}
	LA6: ;
	return result;
}

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

N_NIMCALL(NimStringDesc*, readfile_13634)(NimStringDesc* filename) {
	NimStringDesc* volatile result;
	FILE* f;
	TSafePoint TMP2601;
	result = 0;
	f = open_13417(filename, ((NU8) 0), ((NI) -1));
	pushSafePoint(&TMP2601);
	TMP2601.status = _setjmp(TMP2601.context);
	if (TMP2601.status == 0) {
		result = readall_13631(f);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2601.status != 0) reraiseException();
	return result;
}

static N_INLINE(void*, seqtoptr_229750)(Ttypeseq190845* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_229739)(Ttypeseq190845* x, Ttypeseq190845* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_229750(x);
		LOC4 = 0;
		LOC4 = seqtoptr_229750(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_229750(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_229750(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_229819;
			NI HEX3Atmp_229832;
			NI res_229835;
			i_229819 = 0;
			HEX3Atmp_229832 = 0;
			HEX3Atmp_229832 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_229835 = ((NI) 0);
			{
				while (1) {
					if (!(res_229835 <= HEX3Atmp_229832)) goto LA19;
					i_229819 = res_229835;
					{
						if (!!((x->data[i_229819] == y->data[i_229819]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_229835 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_224946)(TY224855 x, TY224855 y) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!!((x.Field0 == y.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!((x.Field1 == y.Field1))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	result = NIM_TRUE;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_265489)(Ttypeseq190845** x, Ttype190849* y) {
	{
		NIM_BOOL LOC3;
		TY349187 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_229739((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Ttypeseq190845*) newSeq((&NTI190845), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Ttypeseq190845*) incrSeq(&((*x))->Sup, sizeof(Ttype190849*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

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

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

N_NIMCALL(void, writefile_13637)(NimStringDesc* filename, NimStringDesc* content) {
	FILE* f;
	TSafePoint TMP2752;
	f = open_13417(filename, ((NU8) 1), ((NI) -1));
	pushSafePoint(&TMP2752);
	TMP2752.status = _setjmp(TMP2752.context);
	if (TMP2752.status == 0) {
		write_13657(f, content);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2752.status != 0) reraiseException();
}

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

N_NIMCALL(NCSTRING*, alloccstringarray_14201)(NimStringDesc** a, NI aLen0) {
	NCSTRING* result;
	void* LOC1;
	NimStringDesc** x;
	result = 0;
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) ((NI)((NI)(aLen0 + ((NI) 1)) * ((NI) 8)))));
	result = ((NCSTRING*) (LOC1));
	x = ((NimStringDesc**) (a));
	{
		NI i_14424;
		NI HEX3Atmp_14431;
		NI res_14434;
		i_14424 = 0;
		HEX3Atmp_14431 = 0;
		HEX3Atmp_14431 = (aLen0-1);
		res_14434 = ((NI) 0);
		{
			while (1) {
				void* LOC5;
				if (!(res_14434 <= HEX3Atmp_14431)) goto LA4;
				i_14424 = res_14434;
				LOC5 = 0;
				LOC5 = alloc0_6017(((NI) ((NI)((x[(i_14424)- 0] ? x[(i_14424)- 0]->Sup.len : 0) + ((NI) 1)))));
				result[(i_14424)- 0] = ((NCSTRING) (LOC5));
				memcpy(((void*) (result[(i_14424)- 0])), ((void*) ((&x[(i_14424)- 0]->data[((NI) 0)]))), ((NI) ((x[(i_14424)- 0] ? x[(i_14424)- 0]->Sup.len : 0))));
				res_14434 += ((NI) 1);
			} LA4: ;
		}
	}
	return result;
}

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

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

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

N_NIMCALL(NI, clamp_138582)(NI x, NI a, NI b) {
	NI result;
{	result = 0;
	{
		if (!(x < a)) goto LA3;
		result = a;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(b < x)) goto LA7;
		result = b;
		goto BeforeRet;
	}
	LA7: ;
	result = x;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(Tinstantiation190833*, new_412524)(void) {
	Tinstantiation190833* result;
	result = 0;
	result = (Tinstantiation190833*) newObj((&NTI190835), sizeof(Tinstantiation190833));
	return result;
}

static N_INLINE(void*, seqtoptr_193881)(TY190944* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_193870)(TY190944* x, TY190944* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_193881(x);
		LOC4 = 0;
		LOC4 = seqtoptr_193881(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_193881(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_193881(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_193950;
			NI HEX3Atmp_193963;
			NI res_193966;
			i_193950 = 0;
			HEX3Atmp_193963 = 0;
			HEX3Atmp_193963 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_193966 = ((NI) 0);
			{
				while (1) {
					if (!(res_193966 <= HEX3Atmp_193963)) goto LA19;
					i_193950 = res_193966;
					{
						if (!!((x->data[i_193950] == y->data[i_193950]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_193966 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_412561)(TY190944** x, Tinstantiation190833* y) {
	{
		NIM_BOOL LOC3;
		TY412582 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_193870((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (TY190944*) newSeq((&NTI190944), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (TY190944*) incrSeq(&((*x))->Sup, sizeof(Tinstantiation190833*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_263729)(Tnodeseq190807* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_263718)(Tnodeseq190807* x, Tnodeseq190807* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_263729(x);
		LOC4 = 0;
		LOC4 = seqtoptr_263729(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_263729(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_263729(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_263798;
			NI HEX3Atmp_263811;
			NI res_263814;
			i_263798 = 0;
			HEX3Atmp_263811 = 0;
			HEX3Atmp_263811 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_263814 = ((NI) 0);
			{
				while (1) {
					if (!(res_263814 <= HEX3Atmp_263811)) goto LA19;
					i_263798 = res_263814;
					{
						if (!!((x->data[i_263798] == y->data[i_263798]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_263814 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_413279)(Tnodeseq190807** x, Tnode190813* y) {
	{
		NIM_BOOL LOC3;
		TY208680 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_263718((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Tnodeseq190807*) newSeq((&NTI190807), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Tnodeseq190807*) incrSeq(&((*x))->Sup, sizeof(Tnode190813*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

N_NIMCALL(void, insert_413412)(Tnodeseq190807** x, Tnode190813* item, NI i) {
	NI xl;
	NI j;
	xl = ((*x) ? (*x)->Sup.len : 0);
	(*x) = (Tnodeseq190807*) setLengthSeq(&((*x))->Sup, sizeof(Tnode190813*), ((NI) ((NI)(xl + ((NI) 1)))));
	j = (NI)(xl - ((NI) 1));
	{
		while (1) {
			if (!(((NI) (i)) <= j)) goto LA2;
			asgnRefNoCycle((void**) (&(*x)->data[(NI)(j + ((NI) 1))]), (*x)->data[j]);
			j -= ((NI) 1);
		} LA2: ;
	}
	asgnRefNoCycle((void**) (&(*x)->data[i]), item);
}

N_NIMCALL(Tnodeseq190807*, HEX5BHEX5D_431717)(Tnodeseq190807* s, Slice85970 x) {
	Tnodeseq190807* result;
	NI a;
	NI L;
	result = 0;
	a = x.a;
	L = (NI)((NI)(x.b - a) + ((NI) 1));
	result = (Tnodeseq190807*) newSeq((&NTI190807), ((NI) (L)));
	{
		NI i_431758;
		NI HEX3Atmp_431760;
		NI res_431763;
		i_431758 = 0;
		HEX3Atmp_431760 = 0;
		HEX3Atmp_431760 = (L - 1);
		res_431763 = ((NI) 0);
		{
			while (1) {
				if (!(res_431763 <= HEX3Atmp_431760)) goto LA3;
				i_431758 = res_431763;
				asgnRefNoCycle((void**) (&result->data[i_431758]), s->data[(NI)(i_431758 + a)]);
				res_431763 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}

static N_INLINE(void*, seqtoptr_412864)(Tsymseq190815* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_412853)(Tsymseq190815* x, Tsymseq190815* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_412864(x);
		LOC4 = 0;
		LOC4 = seqtoptr_412864(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_412864(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_412864(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_412933;
			NI HEX3Atmp_412946;
			NI res_412949;
			i_412933 = 0;
			HEX3Atmp_412946 = 0;
			HEX3Atmp_412946 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_412949 = ((NI) 0);
			{
				while (1) {
					if (!(res_412949 <= HEX3Atmp_412946)) goto LA19;
					i_412933 = res_412949;
					{
						if (!!((x->data[i_412933] == y->data[i_412933]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_412949 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_412966)(Tsymseq190815** x, Tsym190843* y) {
	{
		NIM_BOOL LOC3;
		TY244431 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_412853((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Tsymseq190815*) newSeq((&NTI190815), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Tsymseq190815*) incrSeq(&((*x))->Sup, sizeof(Tsym190843*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

N_NIMCALL(void, delete_413490)(Tnodeseq190807** x, NI i) {
	NI xl;
	xl = ((*x) ? (*x)->Sup.len : 0);
	{
		NI j_413518;
		NI HEX3Atmp_413530;
		NI res_413533;
		j_413518 = 0;
		HEX3Atmp_413530 = 0;
		HEX3Atmp_413530 = (NI)(xl - ((NI) 2));
		res_413533 = ((NI) (i));
		{
			while (1) {
				if (!(res_413533 <= HEX3Atmp_413530)) goto LA3;
				j_413518 = res_413533;
				asgnRefNoCycle((void**) (&(*x)->data[j_413518]), (*x)->data[(NI)(j_413518 + ((NI) 1))]);
				res_413533 += ((NI) 1);
			} LA3: ;
		}
	}
	(*x) = (Tnodeseq190807*) setLengthSeq(&((*x))->Sup, sizeof(Tnode190813*), ((NI) ((NI)(xl - ((NI) 1)))));
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_413619)(Tnodeseq190807** s, Slice85970 x, Tnode190813** b, NI bLen0) {
	NI a;
	NI L;
	a = x.a;
	L = (NI)((NI)(x.b - a) + ((NI) 1));
	{
		if (!(L == bLen0)) goto LA3;
		{
			NI i_413671;
			NI HEX3Atmp_413771;
			NI res_413774;
			i_413671 = 0;
			HEX3Atmp_413771 = 0;
			HEX3Atmp_413771 = (L - 1);
			res_413774 = ((NI) 0);
			{
				while (1) {
					if (!(res_413774 <= HEX3Atmp_413771)) goto LA7;
					i_413671 = res_413774;
					asgnRefNoCycle((void**) (&(*s)->data[(NI)(i_413671 + a)]), b[i_413671]);
					res_413774 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		NI slen_413633;
		NI shift_413635;
		NI newlen_413637;
		slen_413633 = ((*s) ? (*s)->Sup.len : 0);
		shift_413635 = (NI)(bLen0 - L);
		newlen_413637 = (NI)(slen_413633 + shift_413635);
		{
			if (!(((NI) 0) < shift_413635)) goto LA11;
			(*s) = (Tnodeseq190807*) setLengthSeq(&((*s))->Sup, sizeof(Tnode190813*), ((NI) (newlen_413637)));
			{
				NI i_413639;
				NI HEX3Atmp_413779;
				NI HEX3Atmp_413780;
				NI res_413783;
				i_413639 = 0;
				HEX3Atmp_413779 = 0;
				HEX3Atmp_413780 = 0;
				HEX3Atmp_413779 = (NI)(newlen_413637 - ((NI) 1));
				HEX3Atmp_413780 = (NI)((NI)(a + shift_413635) + ((NI) 1));
				res_413783 = HEX3Atmp_413779;
				{
					while (1) {
						if (!(HEX3Atmp_413780 <= res_413783)) goto LA15;
						i_413639 = res_413783;
						asgnRefNoCycle((void**) (&(*s)->data[i_413639]), (*s)->data[(NI)(i_413639 - shift_413635)]);
						res_413783 -= ((NI) 1);
					} LA15: ;
				}
			}
		}
		goto LA9;
		LA11: ;
		{
			{
				NI i_413641;
				NI HEX3Atmp_413788;
				NI HEX3Atmp_413789;
				NI res_413792;
				i_413641 = 0;
				HEX3Atmp_413788 = 0;
				HEX3Atmp_413789 = 0;
				HEX3Atmp_413788 = (NI)(a + bLen0);
				HEX3Atmp_413789 = (NI)((NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1)) + shift_413635);
				res_413792 = HEX3Atmp_413788;
				{
					while (1) {
						if (!(res_413792 <= HEX3Atmp_413789)) goto LA19;
						i_413641 = res_413792;
						asgnRefNoCycle((void**) (&(*s)->data[i_413641]), (*s)->data[(NI)(i_413641 - shift_413635)]);
						res_413792 += ((NI) 1);
					} LA19: ;
				}
			}
			(*s) = (Tnodeseq190807*) setLengthSeq(&((*s))->Sup, sizeof(Tnode190813*), ((NI) (newlen_413637)));
		}
		LA9: ;
		{
			NI i_413643;
			NI HEX3Atmp_413797;
			NI res_413800;
			i_413643 = 0;
			HEX3Atmp_413797 = 0;
			HEX3Atmp_413797 = (bLen0 - 1);
			res_413800 = ((NI) 0);
			{
				while (1) {
					if (!(res_413800 <= HEX3Atmp_413797)) goto LA22;
					i_413643 = res_413800;
					asgnRefNoCycle((void**) (&(*s)->data[(NI)(i_413643 + a)]), b[i_413643]);
					res_413800 += ((NI) 1);
				} LA22: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(Tnodeseq190807*, newseq_448261)(NI len) {
	Tnodeseq190807* result;
	result = 0;
	result = (Tnodeseq190807*) newSeq((&NTI190807), len);
	return result;
}

N_NIMCALL(void, Gcfullcollect_8805)(void) {
	NI oldthreshold;
	oldthreshold = gch_48444.cyclethreshold;
	gch_48444.cyclethreshold = ((NI) 0);
	collectct_50410((&gch_48444));
	gch_48444.cyclethreshold = oldthreshold;
}

static N_INLINE(void*, seqtoptr_290724)(TY289746* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290713)(TY289746* x, TY289746* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_290724(x);
		LOC4 = 0;
		LOC4 = seqtoptr_290724(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_290724(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_290724(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_290793;
			NI HEX3Atmp_290795;
			NI res_290798;
			i_290793 = 0;
			HEX3Atmp_290795 = 0;
			HEX3Atmp_290795 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_290798 = ((NI) 0);
			{
				while (1) {
					if (!(res_290798 <= HEX3Atmp_290795)) goto LA19;
					i_290793 = res_290798;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_290661(x->data[i_290793], y->data[i_290793]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_290798 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

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

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290899)(TY290209 x, TY290209 y) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!!(eqStrings(x.Field0, y.Field0))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = HEX3DHEX3D_290661(x.Field1, y.Field1);
		if (!!(LOC7)) goto LA8;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA8: ;
	result = NIM_TRUE;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_290817)(TY289741* x, TY289741* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_290828(x);
		LOC4 = 0;
		LOC4 = seqtoptr_290828(y);
		if (!(LOC3 == LOC4)) goto LA5;
		result = NIM_TRUE;
	}
	goto LA1;
	LA5: ;
	{
		NIM_BOOL LOC8;
		void* LOC9;
		void* LOC11;
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = seqtoptr_290828(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_290828(y);
		LOC8 = (LOC11 == NIM_NIL);
		LA10: ;
		if (!LOC8) goto LA12;
		result = NIM_FALSE;
	}
	goto LA1;
	LA12: ;
	{
		if (!((x ? x->Sup.len : 0) == (y ? y->Sup.len : 0))) goto LA15;
		{
			NI i_290897;
			NI HEX3Atmp_290920;
			NI res_290923;
			i_290897 = 0;
			HEX3Atmp_290920 = 0;
			HEX3Atmp_290920 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_290923 = ((NI) 0);
			{
				while (1) {
					if (!(res_290923 <= HEX3Atmp_290920)) goto LA19;
					i_290897 = res_290923;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_290899(x->data[i_290897], y->data[i_290897]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_290923 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_314309)(Tindexentry312396* x, Tindexentry312396* y) {
	NIM_BOOL result;
{	result = 0;
	{
		if (!!(eqStrings((*x).keyword, (*y).keyword))) goto LA3;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!!(eqStrings((*x).link, (*y).link))) goto LA7;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!!(eqStrings((*x).linktitle, (*y).linktitle))) goto LA11;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA11: ;
	{
		if (!!(eqStrings((*x).linkdesc, (*y).linkdesc))) goto LA15;
		result = NIM_FALSE;
		goto BeforeRet;
	}
	LA15: ;
	result = NIM_TRUE;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readline_13678)(FILE* f) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(((NI) 80));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = readline_13681(f, (&result));
		if (!!(LOC3)) goto LA4;
		raiseeio_78405(((NimStringDesc*) &TMP4987));
	}
	LA4: ;
	return result;
}
N_NIMCALL(void, TMP4998)(void* p, NI op) {
	TY516225* a;
	NI LOC1;
	a = (TY516225*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

static N_INLINE(void, Gcdisable_8801)(void) {
	gch_48444.recgclock += ((NI) 1);
}

static N_INLINE(void, Gcenable_8803)(void) {
	{
		if (!(((NI) 0) < gch_48444.recgclock)) goto LA3;
		gch_48444.recgclock -= ((NI) 1);
	}
	LA3: ;
}

N_NIMCALL(NimStringDesc*, Gcgetstatistics_8821)(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_8801();
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = gettotalmem_6699();
	LOC3 = 0;
	LOC3 = nimIntToStr(LOC2);
	LOC4 = 0;
	LOC4 = getoccupiedmem_6695();
	LOC5 = 0;
	LOC5 = nimIntToStr(LOC4);
	LOC6 = 0;
	LOC6 = nimIntToStr(gch_48444.stat.stackscans);
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_48444.stat.maxstackcells);
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_48444.stat.cyclecollections);
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_48444.stat.maxthreshold);
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_48444.zct.cap);
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_48444.stat.cycletablesize);
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_48444.stat.maxstacksize);
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_48444.stat.maxpause / IL64(1000000)));
	LOC1 = rawNewString(LOC3->Sup.len + LOC5->Sup.len + LOC6->Sup.len + LOC7->Sup.len + LOC8->Sup.len + LOC9->Sup.len + LOC10->Sup.len + LOC11->Sup.len + LOC12->Sup.len + LOC13->Sup.len + 223);
appendString(LOC1, ((NimStringDesc*) &TMP5010));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP5011));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP5012));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP5013));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP5014));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP5015));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP5016));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP5017));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP5018));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP5019));
appendString(LOC1, LOC13);
	result = LOC1;
	Gcenable_8803();
	return result;
}
NIM_EXTERNC N_NOINLINE(void, systemInit)(void) {
	strdesc_10404.size = ((NI) 8);
	strdesc_10404.kind = ((NU8) 28);
	strdesc_10404.flags = 2;
	initallocator_10001();
	initStackBottom();
	initgc_9801();
	registersignalhandler_21008();
}

NIM_EXTERNC N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP47[4];
static TNimNode TMP0[19];
NTI3411.size = sizeof(TNimObject);
NTI3411.kind = 17;
NTI3411.base = 0;
NTI3411.flags = 1;
TMP0[0].len = 0; TMP0[0].kind = 2;
NTI3411.node = &TMP0[0];
NTI108.size = sizeof(NI);
NTI108.kind = 31;
NTI108.base = 0;
NTI108.flags = 3;
NTI149.size = sizeof(NimStringDesc*);
NTI149.kind = 28;
NTI149.base = 0;
NTI149.flags = 2;
NTI3427.size = sizeof(Exception);
NTI3427.kind = 17;
NTI3427.base = (&NTI3411);
TMP47[0] = &TMP0[2];
NTI9022.size = sizeof(Exception*);
NTI9022.kind = 22;
NTI9022.base = (&NTI3427);
NTI9022.marker = TMP48;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(Exception, parent);
TMP0[2].typ = (&NTI9022);
TMP0[2].name = "parent";
TMP47[1] = &TMP0[3];
NTI151.size = sizeof(NCSTRING);
NTI151.kind = 29;
NTI151.base = 0;
NTI151.flags = 3;
TMP0[3].kind = 1;
TMP0[3].offset = offsetof(Exception, name);
TMP0[3].typ = (&NTI151);
TMP0[3].name = "name";
TMP47[2] = &TMP0[4];
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(Exception, message);
TMP0[4].typ = (&NTI149);
TMP0[4].name = "msg";
TMP47[3] = &TMP0[5];
TMP0[5].kind = 1;
TMP0[5].offset = offsetof(Exception, trace);
TMP0[5].typ = (&NTI149);
TMP0[5].name = "trace";
TMP0[1].len = 4; TMP0[1].kind = 2; TMP0[1].sons = &TMP47[0];
NTI3427.node = &TMP0[1];
NTI3439.size = sizeof(Arithmeticerror3439);
NTI3439.kind = 17;
NTI3439.base = (&NTI3427);
TMP0[6].len = 0; TMP0[6].kind = 2;
NTI3439.node = &TMP0[6];
NTI3443.size = sizeof(Overflowerror3443);
NTI3443.kind = 17;
NTI3443.base = (&NTI3439);
TMP0[7].len = 0; TMP0[7].kind = 2;
NTI3443.node = &TMP0[7];
NTI23201.size = sizeof(Overflowerror3443*);
NTI23201.kind = 22;
NTI23201.base = (&NTI3443);
NTI23201.marker = TMP49;
NTI3429.size = sizeof(Systemerror3429);
NTI3429.kind = 17;
NTI3429.base = (&NTI3427);
TMP0[8].len = 0; TMP0[8].kind = 2;
NTI3429.node = &TMP0[8];
NTI3453.size = sizeof(Outofmemerror3453);
NTI3453.kind = 17;
NTI3453.base = (&NTI3429);
TMP0[9].len = 0; TMP0[9].kind = 2;
NTI3453.node = &TMP0[9];
NTI114.size = sizeof(NI32);
NTI114.kind = 34;
NTI114.base = 0;
NTI114.flags = 3;
NTI3449.size = sizeof(Valueerror3449);
NTI3449.kind = 17;
NTI3449.base = (&NTI3427);
TMP0[10].len = 0; TMP0[10].kind = 2;
NTI3449.node = &TMP0[10];
NTI22601.size = sizeof(Valueerror3449*);
NTI22601.kind = 22;
NTI22601.base = (&NTI3449);
NTI22601.marker = TMP128;
NTI112.size = sizeof(NI16);
NTI112.kind = 33;
NTI112.base = 0;
NTI112.flags = 3;
NTI3431.size = sizeof(Ioerror3431);
NTI3431.kind = 17;
NTI3431.base = (&NTI3429);
TMP0[11].len = 0; TMP0[11].kind = 2;
NTI3431.node = &TMP0[11];
NTI78601.size = sizeof(Ioerror3431*);
NTI78601.kind = 22;
NTI78601.base = (&NTI3431);
NTI78601.marker = TMP142;
NTI138.size = sizeof(NIM_BOOL);
NTI138.kind = 1;
NTI138.base = 0;
NTI138.flags = 3;
NTI5710.size = sizeof(NI64);
NTI5710.kind = 35;
NTI5710.base = 0;
NTI5710.flags = 3;
NTI5712.size = sizeof(NF);
NTI5712.kind = 36;
NTI5712.base = 0;
NTI5712.flags = 3;
NTI3413.size = sizeof(TNimObject*);
NTI3413.kind = 22;
NTI3413.base = (&NTI3411);
NTI3413.marker = TMP829;
NTI153.size = sizeof(void*);
NTI153.kind = 26;
NTI153.base = 0;
NTI153.flags = 3;
NTI5811.size = sizeof(int);
NTI5811.kind = 34;
NTI5811.base = 0;
NTI5811.flags = 3;
NTI3463.size = sizeof(Reraiseerror3463);
NTI3463.kind = 17;
NTI3463.base = (&NTI3427);
TMP0[12].len = 0; TMP0[12].kind = 2;
NTI3463.node = &TMP0[12];
NTI19201.size = sizeof(Reraiseerror3463*);
NTI19201.kind = 22;
NTI19201.base = (&NTI3463);
NTI19201.marker = TMP977;
NTI27620.size = sizeof(TY27620);
NTI27620.kind = 16;
NTI27620.base = (&NTI108);
NTI27620.flags = 3;
NTI3407.size = sizeof(NI);
NTI3407.kind = 20;
NTI3407.base = (&NTI108);
NTI3407.flags = 3;
NTI128.size = sizeof(NF);
NTI128.kind = 36;
NTI128.base = 0;
NTI128.flags = 3;
NTI13202.size = sizeof(void*);
NTI13202.kind = 18;
NTI13202.base = 0;
NTI13202.flags = 3;
TMP0[13].len = 0; TMP0[13].kind = 2;
NTI13202.node = &TMP0[13];
NTI13204.size = sizeof(FILE*);
NTI13204.kind = 21;
NTI13204.base = (&NTI13202);
NTI13204.flags = 3;
NTI110.size = sizeof(NI8);
NTI110.kind = 32;
NTI110.base = 0;
NTI110.flags = 3;
NTI3459.size = sizeof(Rangeerror3459);
NTI3459.kind = 17;
NTI3459.base = (&NTI3427);
TMP0[14].len = 0; TMP0[14].kind = 2;
NTI3459.node = &TMP0[14];
NTI3433.size = sizeof(Oserror3433);
NTI3433.kind = 17;
NTI3433.base = (&NTI3429);
TMP0[15].kind = 1;
TMP0[15].offset = offsetof(Oserror3433, errorcode);
TMP0[15].typ = (&NTI114);
TMP0[15].name = "errorCode";
NTI3433.node = &TMP0[15];
NTI117012.size = sizeof(Oserror3433*);
NTI117012.kind = 22;
NTI117012.base = (&NTI3433);
NTI117012.marker = TMP1140;
NTI3455.size = sizeof(Indexerror3455);
NTI3455.kind = 17;
NTI3455.base = (&NTI3427);
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI3455.node = &TMP0[16];
NTI126016.size = sizeof(Indexerror3455*);
NTI126016.kind = 22;
NTI126016.base = (&NTI3455);
NTI126016.marker = TMP1533;
NTI124.size = sizeof(NU32);
NTI124.kind = 43;
NTI124.base = 0;
NTI124.flags = 3;
NTI3447.size = sizeof(Assertionerror3447);
NTI3447.kind = 17;
NTI3447.base = (&NTI3427);
TMP0[17].len = 0; TMP0[17].kind = 2;
NTI3447.node = &TMP0[17];
NTI86601.size = sizeof(Assertionerror3447*);
NTI86601.kind = 22;
NTI86601.base = (&NTI3447);
NTI86601.marker = TMP2156;
NTI13208.size = sizeof(int);
NTI13208.kind = 34;
NTI13208.base = 0;
NTI13208.flags = 3;
NTI3441.size = sizeof(Divbyzeroerror3441);
NTI3441.kind = 17;
NTI3441.base = (&NTI3439);
TMP0[18].len = 0; TMP0[18].kind = 2;
NTI3441.node = &TMP0[18];
NTI147.size = sizeof(NIM_CHAR);
NTI147.kind = 2;
NTI147.base = 0;
NTI147.flags = 3;
NTI516225.size = sizeof(TY516225*);
NTI516225.kind = 24;
NTI516225.base = (&NTI5811);
NTI516225.flags = 2;
NTI516225.marker = TMP4998;
}

