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

#include <sys/mman.h>

#include <stdio.h>

#include <stdlib.h>

#include <setjmp.h>

#include <string.h>

#include <signal.h>
typedef struct Exception Exception;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct Tavlnode28208 Tavlnode28208;
typedef struct Tgcheap48216 Tgcheap48216;
typedef struct Tcellseq46362 Tcellseq46362;
typedef struct Tcell46346 Tcell46346;
typedef struct Tcellset46358 Tcellset46358;
typedef struct Tpagedesc46354 Tpagedesc46354;
typedef struct Tmemregion28210 Tmemregion28210;
typedef struct Tsmallchunk27440 Tsmallchunk27440;
typedef struct Tllchunk28204 Tllchunk28204;
typedef struct Tbigchunk27442 Tbigchunk27442;
typedef struct Tintset27417 Tintset27417;
typedef struct Ttrunk27413 Ttrunk27413;
typedef struct Tgcstat48214 Tgcstat48214;
typedef struct Tbasechunk27438 Tbasechunk27438;
typedef struct Tfreecell27430 Tfreecell27430;
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 TY86345 TY86345;
typedef struct Rangeerror3459 Rangeerror3459;
typedef struct Oserror3433 Oserror3433;
typedef struct Indexerror3455 Indexerror3455;
typedef struct TY191933 TY191933;
typedef struct Assertionerror3447 Assertionerror3447;
typedef struct Ttypeseq191845 Ttypeseq191845;
typedef struct Ttype191849 Ttype191849;
typedef struct TY225855 TY225855;
typedef struct Tinstantiation191833 Tinstantiation191833;
typedef struct Tsym191843 Tsym191843;
typedef struct TY191944 TY191944;
typedef struct Tnodeseq191807 Tnodeseq191807;
typedef struct Tnode191813 Tnode191813;
typedef struct Slice85773 Slice85773;
typedef struct Divbyzeroerror3441 Divbyzeroerror3441;
typedef struct Tsymseq191815 Tsymseq191815;
typedef struct TY290746 TY290746;
typedef struct Jsonnodeobj290726 Jsonnodeobj290726;
typedef struct TY290741 TY290741;
typedef struct TY291209 TY291209;
typedef struct Tindexentry313396 Tindexentry313396;
typedef struct TY517225 TY517225;
typedef struct Tidobj168015 Tidobj168015;
typedef struct Tloc191827 Tloc191827;
typedef struct Ropeobj162009 Ropeobj162009;
typedef struct Tscope191837 Tscope191837;
typedef struct Tstrtable191817 Tstrtable191817;
typedef struct Tident168021 Tident168021;
typedef struct Tlineinfo164338 Tlineinfo164338;
typedef struct Tlib191831 Tlib191831;
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 Tavlnode28208* TY28214[2];
struct  Tavlnode28208  {
TY28214 link;
NI key;
NI upperbound;
NI level;
};
struct  Tcellseq46362  {
NI len;
NI cap;
Tcell46346** d;
};
struct  Tcellset46358  {
NI counter;
NI max;
Tpagedesc46354* head;
Tpagedesc46354** data;
};
typedef Tsmallchunk27440* TY28222[512];
typedef Ttrunk27413* Ttrunkbuckets27415[256];
struct  Tintset27417  {
Ttrunkbuckets27415 data;
};
struct  Tmemregion28210  {
NI minlargeobj;
NI maxlargeobj;
TY28222 freesmallchunks;
Tllchunk28204* llmem;
NI currmem;
NI maxmem;
NI freemem;
NI lastsize;
Tbigchunk27442* freechunkslist;
Tintset27417 chunkstarts;
Tavlnode28208* root;
Tavlnode28208* deleted;
Tavlnode28208* last;
Tavlnode28208* freeavlnodes;
};
struct  Tgcstat48214  {
NI stackscans;
NI cyclecollections;
NI maxthreshold;
NI maxstacksize;
NI maxstackcells;
NI cycletablesize;
NI64 maxpause;
};
struct  Tgcheap48216  {
void* stackbottom;
NI cyclethreshold;
Tcellseq46362 zct;
Tcellseq46362 decstack;
Tcellset46358 cycleroots;
Tcellseq46362 tempstack;
NI recgclock;
Tmemregion28210 region;
Tgcstat48214 stat;
};
struct  Tbasechunk27438  {
NI prevsize;
NI size;
NIM_BOOL used;
};
struct  Tsmallchunk27440  {
  Tbasechunk27438 Sup;
Tsmallchunk27440* next;
Tsmallchunk27440* prev;
Tfreecell27430* freelist;
NI free;
NI acc;
NF data;
};
struct  Tbigchunk27442  {
  Tbasechunk27438 Sup;
Tbigchunk27442* next;
Tbigchunk27442* prev;
NI align;
NF data;
};
typedef NI TY27420[16];
struct  Ttrunk27413  {
Ttrunk27413* next;
NI key;
TY27420 bits;
};
struct  Tllchunk28204  {
NI size;
NI acc;
Tllchunk28204* next;
};
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  Tfreecell27430  {
Tfreecell27430* next;
NI zerofield;
};
typedef N_NIMCALL_PTR(void, TY16801) (NimStringDesc* msg);
typedef TFrame* TY17401[128];
struct  Tcell46346  {
NI refcount;
TNimType* typ;
};
struct  Tpagedesc46354  {
Tpagedesc46354* next;
NI key;
TY27420 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;
} TY15609;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY15609 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP53) (Exception* e);
struct  Systemerror3429  {
  Exception Sup;
};
struct  Outofmemerror3453  {
  Systemerror3429 Sup;
};
typedef NIM_CHAR TY18616[2001];
struct  Valueerror3449  {
  Exception Sup;
};
struct  Ioerror3431  {
  Systemerror3429 Sup;
};
typedef NimStringDesc* TY79611[5];
struct  Reraiseerror3463  {
  Exception Sup;
};
struct TY86345 {
NimStringDesc* Field0;
NI Field1;
};
typedef NIM_CHAR TY77270[500];
struct  Rangeerror3459  {
  Exception Sup;
};
struct  Oserror3433  {
  Systemerror3429 Sup;
NI32 errorcode;
};
struct  Indexerror3455  {
  Exception Sup;
};
typedef NIM_CHAR TY77196[65];
typedef NI32 TY523284[1];
struct  Assertionerror3447  {
  Exception Sup;
};
struct TY225855 {
NI Field0;
NI Field1;
};
typedef Ttype191849* TY350187[1];
typedef NIM_CHAR TY82435[60];
struct  Tinstantiation191833  {
Tsym191843* sym;
Ttypeseq191845* concretetypes;
TY191933* usedby;
};
typedef Tinstantiation191833* TY413582[1];
typedef Tnode191813* TY209680[1];
struct  Slice85773  {
NI a;
NI b;
};
struct  Divbyzeroerror3441  {
  Arithmeticerror3439 Sup;
};
typedef Tsym191843* TY245432[1];
struct TY291209 {
NimStringDesc* Field0;
Jsonnodeobj290726* Field1;
};
struct  Tindexentry313396  {
NimStringDesc* keyword;
NimStringDesc* link;
NimStringDesc* linktitle;
NimStringDesc* linkdesc;
};
struct  Tidobj168015  {
  TNimObject Sup;
NI id;
};
struct  Tloc191827  {
NU8 k;
NU8 s;
NU16 flags;
Ttype191849* t;
Ropeobj162009* r;
Ropeobj162009* heaproot;
};
struct  Ttype191849  {
  Tidobj168015 Sup;
NU8 kind;
NU8 callconv;
NU32 flags;
Ttypeseq191845* sons;
Tnode191813* n;
Tsym191843* owner;
Tsym191843* sym;
Tsym191843* destructor;
Tsym191843* deepcopy;
Tsym191843* assignment;
NI64 size;
NI16 align;
NI16 locklevel;
Tloc191827 loc;
};
struct  Tstrtable191817  {
NI counter;
Tsymseq191815* data;
};
struct  Tlineinfo164338  {
NI16 line;
NI16 col;
NI32 fileindex;
};
struct  Tsym191843  {
  Tidobj168015 Sup;
NU8 kind;
union{
struct {Ttypeseq191845* typeinstcache;
Tscope191837* typscope;
} S1;
struct {TY191944* procinstcache;
Tsym191843* gcunsafetyreason;
} S2;
struct {TY191944* usedgenerics;
Tstrtable191817 tab;
} S3;
struct {Tsym191843* guard;
} S4;
} kindU;
NU16 magic;
Ttype191849* typ;
Tident168021* name;
Tlineinfo164338 info;
Tsym191843* owner;
NU32 flags;
Tnode191813* ast;
NU32 options;
NI position;
NI offset;
Tloc191827 loc;
Tlib191831* annex;
Tnode191813* constraint;
};
struct  Tnode191813  {
Ttype191849* typ;
Tlineinfo164338 info;
NU16 flags;
NU8 kind;
union{
struct {NI64 intval;
} S1;
struct {NF floatval;
} S2;
struct {NimStringDesc* strval;
} S3;
struct {Tsym191843* sym;
} S4;
struct {Tident168021* ident;
} S5;
struct {Tnodeseq191807* sons;
} S6;
} kindU;
NimStringDesc* comment;
};
struct  Jsonnodeobj290726  {
NU8 kind;
union{
struct {NimStringDesc* str;
} S1;
struct {NI64 num;
} S2;
struct {NF fnum;
} S3;
struct {NIM_BOOL bval;
} S4;
struct {TY290741* fields;
} S6;
struct {TY290746* elems;
} S7;
} kindU;
};
struct  Ropeobj162009  {
  TNimObject Sup;
Ropeobj162009* left;
Ropeobj162009* right;
NI length;
NimStringDesc* data;
};
struct  Tscope191837  {
NI depthlevel;
Tstrtable191817 symbols;
Tnodeseq191807* usingsyms;
Tscope191837* parent;
};
struct  Tident168021  {
  Tidobj168015 Sup;
NimStringDesc* s;
Tident168021* next;
NI h;
};
struct  Tlistentry130022  {
  TNimObject Sup;
Tlistentry130022* prev;
Tlistentry130022* next;
};
struct  Tlib191831  {
  Tlistentry130022 Sup;
NU8 kind;
NIM_BOOL generated;
NIM_BOOL isoverriden;
Ropeobj162009* name;
Tnode191813* path;
};
struct TY191933 {
  TGenericSeq Sup;
  NI32 data[SEQ_DECL_SIZE];
};
struct Ttypeseq191845 {
  TGenericSeq Sup;
  Ttype191849* data[SEQ_DECL_SIZE];
};
struct TY191944 {
  TGenericSeq Sup;
  Tinstantiation191833* data[SEQ_DECL_SIZE];
};
struct Tnodeseq191807 {
  TGenericSeq Sup;
  Tnode191813* data[SEQ_DECL_SIZE];
};
struct Tsymseq191815 {
  TGenericSeq Sup;
  Tsym191843* data[SEQ_DECL_SIZE];
};
struct TY290746 {
  TGenericSeq Sup;
  Jsonnodeobj290726* data[SEQ_DECL_SIZE];
};
struct TY290741 {
  TGenericSeq Sup;
  TY291209 data[SEQ_DECL_SIZE];
};
struct TY517225 {
  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_46454)(Tcellseq46362* s, NI cap);
N_NOCONV(void*, alloc0_6017)(NI size);
N_NIMCALL(void*, alloc0_45019)(Tmemregion28210* allocator, NI size);
N_NIMCALL(void*, alloc_44831)(Tmemregion28210* allocator, NI size);
N_NIMCALL(void*, rawalloc_35701)(Tmemregion28210* a, NI requestedsize);
static N_INLINE(NI, roundup_27470)(NI x, NI v);
N_NIMCALL(Tsmallchunk27440*, getsmallchunk_35024)(Tmemregion28210* a);
N_NIMCALL(Tbigchunk27442*, getbigchunk_34217)(Tmemregion28210* a, NI size);
static N_INLINE(void, listremove_32002)(Tbigchunk27442** head, Tbigchunk27442* c);
N_NIMCALL(void, splitchunk_34015)(Tmemregion28210* a, Tbigchunk27442* c, NI size);
static N_INLINE(void, updateprevsize_31083)(Tmemregion28210* a, Tbigchunk27442* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_31018)(Tmemregion28210* a, void* p);
N_NIMCALL(NIM_BOOL, contains_29759)(Tintset27417* s, NI key);
N_NIMCALL(Ttrunk27413*, intsetget_29698)(Tintset27417* t, NI key);
static N_INLINE(NI, pageindex_30247)(void* p);
N_NIMCALL(void, incl_29783)(Tmemregion28210* a, Tintset27417* s, NI key);
N_NIMCALL(Ttrunk27413*, intsetput_29729)(Tmemregion28210* a, Tintset27417* t, NI key);
N_NIMCALL(void*, llalloc_28455)(Tmemregion28210* a, NI size);
static N_INLINE(void*, osallocpages_27214)(NI size);
N_NOINLINE(void, raiseoutofmem_26659)(void);
static N_INLINE(void, inccurrmem_28405)(Tmemregion28210* a, NI bytes);
static N_INLINE(NI, pageindex_30239)(Tbasechunk27438* c);
static N_INLINE(void, listadd_33223)(Tbigchunk27442** head, Tbigchunk27442* c);
N_NIMCALL(Tbigchunk27442*, requestoschunks_30265)(Tmemregion28210* a, NI size);
static N_INLINE(void, listadd_36604)(Tsmallchunk27440** head, Tsmallchunk27440* c);
static N_INLINE(void, listremove_39402)(Tsmallchunk27440** head, Tsmallchunk27440* c);
N_NIMCALL(void, add_29401)(Tmemregion28210* a, Tavlnode28208** t, NI key, NI upperbound);
N_NIMCALL(Tavlnode28208*, allocavlnode_28630)(Tmemregion28210* a, NI key, NI upperbound);
N_NIMCALL(void, skew_29376)(Tavlnode28208** t);
N_NIMCALL(void, split_29384)(Tavlnode28208** t);
N_NIMCALL(void, init_46475)(Tcellset46358* s);
N_NOCONV(void, signalHandler)(int sig);
N_NIMCALL(void, showerrormessage_17009)(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_56004)(TNimType* typ, NI size, Tgcheap48216* gch);
N_NIMCALL(void, collectct_50210)(Tgcheap48216* gch);
N_NOINLINE(NI, stacksize_70411)(void);
static N_INLINE(NI, getoccupiedmem_46268)(Tmemregion28210* a);
N_NIMCALL(void, collectctbody_73021)(Tgcheap48216* gch);
static N_INLINE(void, prepareforinteriorpointerchecking_43682)(Tmemregion28210* a);
N_NIMCALL(NI, lowgauge_29218)(Tavlnode28208* n);
N_NIMCALL(NI, highgauge_29244)(Tavlnode28208* n);
N_CDECL(void, markstackandregisters_70640)(Tgcheap48216* gch);
static N_INLINE(void, gcmark_69046)(Tgcheap48216* gch, void* p);
static N_INLINE(Tcell46346*, usrtocell_49846)(void* usr);
N_NIMCALL(void*, interiorallocatedptr_43689)(Tmemregion28210* a, void* p);
static N_INLINE(Tbasechunk27438*, pageaddr_30255)(void* p);
static N_INLINE(NIM_BOOL, chunkunused_30119)(Tbasechunk27438* c);
static N_INLINE(NIM_BOOL, issmallchunk_30108)(Tbasechunk27438* c);
N_NIMCALL(Tavlnode28208*, inrange_29314)(Tavlnode28208* root, NI key);
static N_INLINE(void, add_46431)(Tcellseq46362* s, Tcell46346* c);
N_NOCONV(void*, alloc_6001)(NI size);
N_NOCONV(void, dealloc_6048)(void* p);
N_NIMCALL(void, dealloc_45028)(Tmemregion28210* allocator, void* p);
N_NIMCALL(void, rawdealloc_42023)(Tmemregion28210* a, void* p);
N_NIMCALL(void, freebigchunk_31206)(Tmemregion28210* a, Tbigchunk27442* c_31210);
N_NIMCALL(void, excl_29797)(Tintset27417* s, NI key);
N_NIMCALL(void, freeoschunks_30810)(Tmemregion28210* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_27223)(void* p, NI size);
static N_INLINE(void, deccurrmem_28422)(Tmemregion28210* a, NI bytes);
N_NIMCALL(void, del_29604)(Tmemregion28210* a, Tavlnode28208** t, NI x);
static N_INLINE(void, deallocavlnode_29206)(Tmemregion28210* a, Tavlnode28208* n);
N_NIMCALL(void, markthreadstacks_69606)(Tgcheap48216* gch);
N_NIMCALL(NIM_BOOL, collectzct_68412)(Tgcheap48216* gch);
static N_INLINE(NIM_BOOL, canbecycleroot_49867)(Tcell46346* c);
N_NIMCALL(void, excl_47095)(Tcellset46358* s, Tcell46346* cell);
N_NIMCALL(Tpagedesc46354*, cellsetget_46522)(Tcellset46358 t, NI key);
static N_INLINE(NI, nexttry_46514)(NI h, NI maxhash);
N_NIMCALL(void, preparedealloc_50408)(Tcell46346* cell);
static N_INLINE(void*, celltousr_49825)(Tcell46346* cell);
N_NIMCALL(void, forallchildren_50217)(Tcell46346* cell, NU8 op);
N_NIMCALL(void, forallchildrenaux_50225)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, dooperation_50221)(void* p, NU8 op);
static N_INLINE(void, decref_51804)(Tcell46346* c);
static N_INLINE(void, rtladdzct_51404)(Tcell46346* c);
N_NOINLINE(void, addzct_49817)(Tcellseq46362* s, Tcell46346* c);
static N_INLINE(void, rtladdcycleroot_50623)(Tcell46346* c);
N_NOINLINE(void, incl_47065)(Tcellset46358* s, Tcell46346* cell);
N_NIMCALL(Tpagedesc46354*, cellsetput_46863)(Tcellset46358* t, NI key);
N_NIMCALL(void, cellsetenlarge_46812)(Tcellset46358* t);
N_NIMCALL(void, cellsetrawinsert_46551)(Tcellset46358 t, Tpagedesc46354** data, Tpagedesc46354* desc);
N_NIMCALL(void, markgray_65405)(Tcell46346* s);
N_NIMCALL(void, scan_65804)(Tcell46346* s);
N_NIMCALL(void, scanblack_65604)(Tcell46346* s);
N_NIMCALL(void, collectwhite_66004)(Tcell46346* s);
N_NIMCALL(NIM_BOOL, isallocatedptr_35405)(Tmemregion28210* a, void* p);
N_NIMCALL(void, freecycliccell_64627)(Tgcheap48216* gch, Tcell46346* c);
N_NIMCALL(void, forallslotsaux_54408)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_26410)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_26058)(void* aa, TNimNode* n);
N_NIMCALL(void, collectcycles_68644)(Tgcheap48216* gch);
N_NIMCALL(void, markroots_66205)(Tgcheap48216* gch);
N_NIMCALL(void, collectroots_68601)(Tgcheap48216* gch);
N_NIMCALL(void, cellsetreset_54401)(Tcellset46358* s);
N_NIMCALL(void, deinit_46486)(Tcellset46358* s);
N_NIMCALL(NI, getoccupiedmem_6695)(void);
N_NIMCALL(NI, gettotalmem_6699)(void);
N_NIMCALL(NI, getfreemem_6697)(void);
N_NIMCALL(void, unmarkstackandregisters_72811)(Tgcheap48216* gch);
static N_INLINE(void, addnewobjtozct_55487)(Tcell46346* res, Tgcheap48216* gch);
N_NIMCALL(void, writetostderr_17001)(NCSTRING msg);
N_NIMCALL(void, write_13469)(FILE* f, NCSTRING c);
N_NIMCALL(void, registersignalhandler_20808)(void);
N_NIMCALL(NI, getRefcount)(void* p);
N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, TMP50)(void* p, NI op);
N_NIMCALL(void, TMP51)(void* p, NI op);
N_NIMCALL(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_18204)(Exception* e);
static N_INLINE(void, pushCurrentException)(Exception* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_52222)(Tcell46346* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isobjslowpath_22817)(TNimType* obj, TNimType* subclass, TNimType** cache);
static N_INLINE(void, quitordebug_18007)(void);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NOINLINE(NIM_BOOL, isonstack_50214)(void* p);
N_NIMCALL(void, TMP130)(void* p, NI op);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, genericresetaux_80201)(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_76243, NI last);
static N_INLINE(NI, resize_76001)(NI old);
N_NIMCALL(void*, growobj_64618)(void* old, NI newsize);
N_NIMCALL(void*, growobj_61806)(void* old, NI newsize, Tgcheap48216* gch);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(void, genericassignaux_80206)(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_80212)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
N_NIMCALL(NI, writebuffer_13537)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_78205)(NimStringDesc* msg);
N_NIMCALL(void, TMP144)(void* p, NI op);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_NIMCALL(void, TMP831)(void* p, NI op);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NIM_BOOL, open_13203)(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, TMP979)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NIM_CHAR, getdecimalpoint_77251)(void);
N_NIMCALL(void, objectinitaux_81294)(void* dest, TNimNode* n);
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(void*, realloc_46007)(Tmemregion28210* allocator, void* p, NI newsize);
N_NIMCALL(NI, ptrsize_44616)(void* p);
N_NIMCALL(void, TMP1142)(void* p, NI op);
N_NIMCALL(void, TMP1145)(void* p, NI op);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_523183)(TY191933* x, TY191933* y);
static N_INLINE(void*, seqtoptr_523194)(TY191933* x);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(void, write_13457)(FILE* f, NimStringDesc* s);
N_NIMCALL(void, TMP2160)(void* p, NI op);
N_NIMCALL(FILE*, open_13217)(NimStringDesc* filename, NU8 mode, NI bufsize);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readall_13431)(FILE* file);
N_NIMCALL(NI, rawfilesize_79112)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_79121)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_13515)(FILE* f, void* buffer, NI len);
N_NIMCALL(NimStringDesc*, readallbuffer_79095)(FILE* file);
static N_INLINE(void, popSafePoint)(void);
N_NIMCALL(void, reraiseException)(void);
static N_INLINE(void*, seqtoptr_230750)(Ttypeseq191845* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_230739)(Ttypeseq191845* x, Ttypeseq191845* y);
static N_INLINE(void*, seqtoptr_194881)(TY191944* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_194870)(TY191944* x, TY191944* y);
static N_INLINE(void*, seqtoptr_264729)(Tnodeseq191807* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_264718)(Tnodeseq191807* x, Tnodeseq191807* y);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
static N_INLINE(void*, seqtoptr_413864)(Tsymseq191815* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_413853)(Tsymseq191815* x, Tsymseq191815* y);
static N_INLINE(void*, seqtoptr_291724)(TY290746* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_291661)(Jsonnodeobj290726* a, Jsonnodeobj290726* b);
static N_INLINE(void*, seqtoptr_291828)(TY290741* x);
N_NIMCALL(NIM_BOOL, HEX3DHEX3D_291899)(TY291209 x, TY291209 y);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readline_13481)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, TMP5003)(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(TMP52, "over- or underflow", 18);
STRING_LITERAL(TMP131, "attempt to write to a nil address", 33);
STRING_LITERAL(TMP145, "cannot write string to file", 27);
STRING_LITERAL(TMP973, "rb", 2);
STRING_LITERAL(TMP974, "wb", 2);
STRING_LITERAL(TMP975, "w+b", 3);
STRING_LITERAL(TMP976, "r+b", 3);
STRING_LITERAL(TMP977, "ab", 2);
NIM_CONST TY79611 Formatopen_79610 = {((NimStringDesc*) &TMP973),
((NimStringDesc*) &TMP974),
((NimStringDesc*) &TMP975),
((NimStringDesc*) &TMP976),
((NimStringDesc*) &TMP977)}
;
STRING_LITERAL(TMP978, "cannot open: ", 13);
STRING_LITERAL(TMP980, "no exception to reraise", 23);
STRING_LITERAL(TMP981, "(", 1);
STRING_LITERAL(TMP982, ", ", 2);
STRING_LITERAL(TMP983, "filename", 8);
STRING_LITERAL(TMP984, ": ", 2);
STRING_LITERAL(TMP985, "line", 4);
STRING_LITERAL(TMP986, ")", 1);
STRING_LITERAL(TMP1031, " (invalid data!)", 16);
STRING_LITERAL(TMP1271, "nan", 3);
STRING_LITERAL(TMP1272, "-inf", 4);
STRING_LITERAL(TMP1273, "inf", 3);
STRING_LITERAL(TMP2606, "error while reading from file", 29);
STRING_LITERAL(TMP2607, "", 0);
STRING_LITERAL(TMP2685, "cannot set file position", 24);
STRING_LITERAL(TMP2686, "cannot retrieve file position", 29);
STRING_LITERAL(TMP2972, "true", 4);
STRING_LITERAL(TMP2973, "false", 5);
STRING_LITERAL(TMP4992, "EOF reached", 11);
STRING_LITERAL(TMP5015, "[GC] total memory: ", 19);
STRING_LITERAL(TMP5016, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP5017, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP5018, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP5019, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP5020, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP5021, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP5022, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP5023, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP5024, "\012[GC] max pause time [ms]: ", 27);
NI nim_program_result;
TY9021 globalraisehook_9025;
TY9026 localraisehook_9030;
TY9031 outofmemhook_9033;
TNimType strdesc_10404;
TY16801 errormessagewriter_16804;
TFrame* frameptr_17042;
TSafePoint* exchandler_17043;
Exception* currexception_17045;
TY17401 tempframes_17404;
Tavlnode28208 bottomdata_28238;
Tavlnode28208* bottom_28239;
Tgcheap48216 gch_48244;
NIM_BOOL localgcinitialized_54204;
NIM_CHAR decimalpoint_77250;
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 NTI23001; /* ref OverflowError */
TNimType NTI3429; /* SystemError */
TNimType NTI3453; /* OutOfMemError */
static TNimType* Nim_OfCheck_CACHE1[2];
TNimType NTI114; /* int32 */
TNimType NTI3449; /* ValueError */
TNimType NTI22401; /* ref ValueError */
TNimType NTI112; /* int16 */
TNimType NTI3431; /* IOError */
TNimType NTI78401; /* ref IOError */
TNimType NTI138; /* bool */
TNimType NTI5710; /* BiggestInt */
TNimType NTI5712; /* BiggestFloat */
TNimType NTI3413; /* RootRef */
TNimType NTI153; /* pointer */
TNimType NTI5811; /* cint */
TNimType NTI3463; /* ReraiseError */
TNimType NTI19001; /* ref ReraiseError */
TNimType NTI27420; /* array[0..15, int] */
TNimType NTI3407; /* Natural */
TNimType NTI128; /* float */
TNimType NTI13002; /* CFile */
TNimType NTI13004; /* File */
TNimType NTI110; /* int8 */
TNimType NTI3459; /* RangeError */
TNimType NTI3433; /* OSError */
TNimType NTI116812; /* ref OSError */
TNimType NTI3455; /* IndexError */
TNimType NTI125816; /* ref IndexError */
extern TNimType NTI191933; /* seq[int32] */
TNimType NTI124; /* uint32 */
TNimType NTI3447; /* AssertionError */
TNimType NTI86401; /* ref AssertionError */
extern TNimType NTI191845; /* TTypeSeq */
TNimType NTI13008; /* FileHandle */
extern TNimType NTI191835; /* PInstantiation */
extern TNimType NTI191944; /* seq[PInstantiation] */
extern TNimType NTI191807; /* TNodeSeq */
TNimType NTI3441; /* DivByZeroError */
extern TNimType NTI191815; /* TSymSeq */
TNimType NTI147; /* char */
TNimType NTI517225; /* seq[SocketHandle] */

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

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

static N_INLINE(void, listremove_32002)(Tbigchunk27442** head, Tbigchunk27442* 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(Ttrunk27413*, intsetget_29698)(Tintset27417* t, NI key) {
	Ttrunk27413* result;
	Ttrunk27413* 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_29759)(Tintset27417* s, NI key) {
	NIM_BOOL result;
	Ttrunk27413* t;
	result = 0;
	t = intsetget_29698(s, (NI)((NU32)(key) >> (NU32)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & ((NI) 511));
		result = !(((NI)((*t).bits[((NI)((NU32)(((NI) (u))) >> (NU32)(((NI) 5))))- 0] & (NI)((NU32)(((NI) 1)) << (NU32)(((NI) ((NI)(((NI) (u)) & ((NI) 31))))))) == ((NI) 0)));
	}
	goto LA1;
	LA3: ;
	{
		result = NIM_FALSE;
	}
	LA1: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, isaccessible_31018)(Tmemregion28210* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = pageindex_30247(p);
	result = contains_29759((&(*a).chunkstarts), LOC1);
	return result;
}

static N_INLINE(void, updateprevsize_31083)(Tmemregion28210* a, Tbigchunk27442* c, NI prevsize) {
	Tbasechunk27438* ri;
	ri = ((Tbasechunk27438*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_31018((&(*a)), ((void*) (ri)));
		if (!LOC3) goto LA4;
		(*ri).prevsize = prevsize;
	}
	LA4: ;
}

N_NOINLINE(void, raiseoutofmem_26659)(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_27214)(NI size) {
	void* result;
	result = 0;
	result = mmap(NIM_NIL, size, ((int) 3), (NI32)(((NI32) 2) | MAP_ANONYMOUS), ((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_26659();
	}
	LA5: ;
	return result;
}

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

N_NIMCALL(void*, llalloc_28455)(Tmemregion28210* a, NI size) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tllchunk28204* 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_27214(((NI) 4096));
		(*a).llmem = ((Tllchunk28204*) (LOC7));
		inccurrmem_28405(a, ((NI) 4096));
		(*(*a).llmem).size = (NI)(((NI) 4096) - ((NI)sizeof(Tllchunk28204)));
		(*(*a).llmem).acc = ((NI)sizeof(Tllchunk28204));
		(*(*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(Ttrunk27413*, intsetput_29729)(Tmemregion28210* a, Tintset27417* t, NI key) {
	Ttrunk27413* result;
	result = 0;
	result = intsetget_29698((&(*t)), key);
	{
		void* LOC5;
		if (!(result == NIM_NIL)) goto LA3;
		LOC5 = 0;
		LOC5 = llalloc_28455(a, ((NI)sizeof(Ttrunk27413)));
		result = ((Ttrunk27413*) (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_29783)(Tmemregion28210* a, Tintset27417* s, NI key) {
	Ttrunk27413* t;
	NI u;
	t = intsetput_29729(a, s, (NI)((NU32)(key) >> (NU32)(((NI) 9))));
	u = (NI)(key & ((NI) 511));
	(*t).bits[((NI)((NU32)(((NI) (u))) >> (NU32)(((NI) 5))))- 0] = (NI)((*t).bits[((NI)((NU32)(((NI) (u))) >> (NU32)(((NI) 5))))- 0] | (NI)((NU32)(((NI) 1)) << (NU32)(((NI) ((NI)(((NI) (u)) & ((NI) 31)))))));
}

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

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

N_NIMCALL(void, splitchunk_34015)(Tmemregion28210* a, Tbigchunk27442* c, NI size) {
	Tbigchunk27442* rest;
	Tbasechunk27438* LOC1;
	NI LOC2;
	rest = ((Tbigchunk27442*) ((NI)((NU32)(((NI) (c))) + (NU32)(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_31083(a, c, (*rest).Sup.size);
	(*c).Sup.size = size;
	LOC1 = 0;
	LOC1 = &rest->Sup;
	LOC2 = 0;
	LOC2 = pageindex_30239(LOC1);
	incl_29783(a, (&(*a).chunkstarts), LOC2);
	listadd_33223(&(*a).freechunkslist, rest);
}

N_NIMCALL(Tbigchunk27442*, requestoschunks_30265)(Tmemregion28210* a, NI size) {
	Tbigchunk27442* result;
	void* LOC1;
	NI nxt;
	Tbasechunk27438* next;
	NI lastsize;
	NI prv;
	Tbasechunk27438* prev;
	result = 0;
	inccurrmem_28405(a, size);
	(*a).freemem += size;
	LOC1 = 0;
	LOC1 = osallocpages_27214(size);
	result = ((Tbigchunk27442*) (LOC1));
	(*result).next = NIM_NIL;
	(*result).prev = NIM_NIL;
	(*result).Sup.used = NIM_FALSE;
	(*result).Sup.size = size;
	nxt = (NI)((NU32)(((NI) (result))) + (NU32)(size));
	next = ((Tbasechunk27438*) (nxt));
	{
		NI LOC4;
		NIM_BOOL LOC5;
		LOC4 = 0;
		LOC4 = pageindex_30239(next);
		LOC5 = 0;
		LOC5 = contains_29759((&(*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)((NU32)(((NI) (result))) - (NU32)(lastsize));
	prev = ((Tbasechunk27438*) (prv));
	{
		NIM_BOOL LOC15;
		NI LOC16;
		LOC15 = 0;
		LOC16 = 0;
		LOC16 = pageindex_30239(prev);
		LOC15 = contains_29759((&(*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(Tbigchunk27442*, getbigchunk_34217)(Tmemregion28210* a, NI size) {
	Tbigchunk27442* result;
	Tbasechunk27438* LOC16;
	NI LOC17;
	result = 0;
	result = (*a).freechunkslist;
	{
		{
			while (1) {
				if (!!((result == NIM_NIL))) goto LA3;
				{
					if (!((*result).Sup.size == size)) goto LA6;
					listremove_32002(&(*a).freechunkslist, result);
					goto LA1;
				}
				goto LA4;
				LA6: ;
				{
					if (!(size < (*result).Sup.size)) goto LA9;
					listremove_32002(&(*a).freechunkslist, result);
					splitchunk_34015(a, result, size);
					goto LA1;
				}
				goto LA4;
				LA9: ;
				LA4: ;
				result = (*result).next;
			} LA3: ;
		}
		{
			if (!(size < ((NI) 524288))) goto LA13;
			result = requestoschunks_30265(a, ((NI) 524288));
			splitchunk_34015(a, result, size);
		}
		goto LA11;
		LA13: ;
		{
			result = requestoschunks_30265(a, size);
		}
		LA11: ;
	} LA1: ;
	(*result).Sup.prevsize = ((NI) 0);
	(*result).Sup.used = NIM_TRUE;
	LOC16 = 0;
	LOC16 = &result->Sup;
	LOC17 = 0;
	LOC17 = pageindex_30239(LOC16);
	incl_29783(a, (&(*a).chunkstarts), LOC17);
	(*a).freemem -= size;
	return result;
}

N_NIMCALL(Tsmallchunk27440*, getsmallchunk_35024)(Tmemregion28210* a) {
	Tsmallchunk27440* result;
	Tbigchunk27442* res;
	result = 0;
	res = getbigchunk_34217(a, ((NI) 4096));
	result = ((Tsmallchunk27440*) (res));
	return result;
}

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

static N_INLINE(void, listremove_39402)(Tsmallchunk27440** head, Tsmallchunk27440* 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(Tavlnode28208*, allocavlnode_28630)(Tmemregion28210* a, NI key, NI upperbound) {
	Tavlnode28208* 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_28455(a, ((NI)sizeof(Tavlnode28208)));
		result = ((Tavlnode28208*) (LOC6));
	}
	LA1: ;
	(*result).key = key;
	(*result).upperbound = upperbound;
	(*result).link[(((NI) 0))- 0] = bottom_28239;
	(*result).link[(((NI) 1))- 0] = bottom_28239;
	(*result).level = ((NI) 1);
	return result;
}

N_NIMCALL(void, skew_29376)(Tavlnode28208** t) {
	{
		Tavlnode28208* 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_29384)(Tavlnode28208** t) {
	{
		Tavlnode28208* 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_29401)(Tmemregion28210* a, Tavlnode28208** t, NI key, NI upperbound) {
	{
		if (!((*t) == bottom_28239)) goto LA3;
		(*t) = allocavlnode_28630(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		{
			if (!((NU32)(key) < (NU32)((*(*t)).key))) goto LA8;
			add_29401(a, &(*(*t)).link[(((NI) 0))- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			if (!((NU32)((*(*t)).key) < (NU32)(key))) goto LA11;
			add_29401(a, &(*(*t)).link[(((NI) 1))- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		skew_29376(t);
		split_29384(t);
	}
	LA1: ;
}

N_NIMCALL(void*, rawalloc_35701)(Tmemregion28210* a, NI requestedsize) {
	void* result;
	NI size;
	result = 0;
	size = roundup_27470(requestedsize, ((NI) 8));
	{
		NI s;
		Tsmallchunk27440* c;
		if (!(size <= (NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27440)) - ((NI) 8))))) goto LA3;
		s = (NI)(size / ((NI) 8));
		c = (*a).freesmallchunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7;
			c = getsmallchunk_35024(a);
			(*c).freelist = NIM_NIL;
			(*c).Sup.size = size;
			(*c).acc = size;
			(*c).free = (NI)((NI)(((NI) 4096) - (NI)(((NI)sizeof(Tsmallchunk27440)) - ((NI) 8))) - size);
			(*c).next = NIM_NIL;
			(*c).prev = NIM_NIL;
			listadd_36604(&(*a).freesmallchunks[(s)- 0], c);
			result = ((void*) ((&(*c).data)));
		}
		goto LA5;
		LA7: ;
		{
			{
				if (!((*c).freelist == NIM_NIL)) goto LA12;
				result = ((void*) ((NI)((NU32)(((NI) ((&(*c).data)))) + (NU32)((*c).acc))));
				(*c).acc += size;
			}
			goto LA10;
			LA12: ;
			{
				result = ((void*) ((*c).freelist));
				(*c).freelist = (*(*c).freelist).next;
			}
			LA10: ;
			(*c).free -= size;
		}
		LA5: ;
		{
			if (!((*c).free < size)) goto LA17;
			listremove_39402(&(*a).freesmallchunks[(s)- 0], c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		Tbigchunk27442* c;
		size = roundup_27470((NI)(requestedsize + (NI)(((NI)sizeof(Tbigchunk27442)) - ((NI) 8))), ((NI) 4096));
		c = getbigchunk_34217(a, size);
		result = ((void*) ((&(*c).data)));
		{
			if (!((*a).root == NIM_NIL)) goto LA22;
			(*a).root = bottom_28239;
		}
		LA22: ;
		add_29401(a, &(*a).root, ((NI) (result)), (NI)((NU32)(((NI) (result))) + (NU32)(size)));
	}
	LA1: ;
	return result;
}

N_NIMCALL(void*, alloc_44831)(Tmemregion28210* allocator, NI size) {
	void* result;
	result = 0;
	result = rawalloc_35701(allocator, (NI)(((NI) (size)) + ((NI)sizeof(Tfreecell27430))));
	(*((Tfreecell27430*) (result))).zerofield = ((NI) 1);
	result = ((void*) ((NI)((NU32)(((NI) (result))) + (NU32)(((NI)sizeof(Tfreecell27430))))));
	return result;
}

N_NIMCALL(void*, alloc0_45019)(Tmemregion28210* allocator, NI size) {
	void* result;
	result = 0;
	result = alloc_44831(allocator, size);
	zeroMem(result, size);
	return result;
}

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

N_NIMCALL(void, init_46454)(Tcellseq46362* s, NI cap) {
	void* LOC1;
	(*s).len = ((NI) 0);
	(*s).cap = cap;
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) ((NI)(cap * ((NI) 4)))));
	(*s).d = ((Tcell46346**) (LOC1));
}

N_NIMCALL(void, init_46475)(Tcellset46358* s) {
	void* LOC1;
	LOC1 = 0;
	LOC1 = alloc0_6017(((NI) 4096));
	(*s).data = ((Tpagedesc46354**) (LOC1));
	(*s).max = ((NI) 1023);
	(*s).counter = ((NI) 0);
	(*s).head = NIM_NIL;
}

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

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

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

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

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

static N_INLINE(void, prepareforinteriorpointerchecking_43682)(Tmemregion28210* a) {
	(*a).minlargeobj = lowgauge_29218((*a).root);
	(*a).maxlargeobj = highgauge_29244((*a).root);
}

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

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

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

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

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

N_NIMCALL(void*, interiorallocatedptr_43689)(Tmemregion28210* a, void* p) {
	void* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tbasechunk27438* c_43694;
		LOC3 = 0;
		LOC3 = isaccessible_31018(a, p);
		if (!LOC3) goto LA4;
		c_43694 = pageaddr_30255(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_30119(c_43694);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				Tsmallchunk27440* c;
				NI offset;
				LOC13 = 0;
				LOC13 = issmallchunk_30108(c_43694);
				if (!LOC13) goto LA14;
				c = ((Tsmallchunk27440*) (c_43694));
				offset = (NI)((NU32)(((NI) ((NI)(((NI) (p)) & ((NI) 4095))))) - (NU32)((NI)(((NI)sizeof(Tsmallchunk27440)) - ((NI) 8))));
				{
					Tfreecell27430* d;
					if (!((NU32)(offset) < (NU32)((*c).acc))) goto LA18;
					d = ((Tfreecell27430*) ((NI)((NU32)((NI)((NU32)(((NI) ((&(*c).data)))) + (NU32)(offset))) - (NU32)((NI)((NU32)(offset) % (NU32)((*c).Sup.size))))));
					{
						if (!((NU32)(((NI) 1)) < (NU32)((*d).zerofield))) goto LA22;
						result = ((void*) (d));
					}
					LA22: ;
				}
				LA18: ;
			}
			goto LA11;
			LA14: ;
			{
				Tbigchunk27442* c;
				NF* d;
				c = ((Tbigchunk27442*) (c_43694));
				d = (&(*c).data);
				{
					NIM_BOOL LOC27;
					LOC27 = 0;
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					LOC27 = ((NU32)(((NI) 1)) < (NU32)((*((Tfreecell27430*) (d))).zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL LOC34;
			Tavlnode28208* avlnode;
			LOC34 = 0;
			LOC34 = ((NU32)((*a).minlargeobj) <= (NU32)(q));
			if (!(LOC34)) goto LA35;
			LOC34 = ((NU32)(q) <= (NU32)((*a).maxlargeobj));
			LA35: ;
			if (!LOC34) goto LA36;
			avlnode = inrange_29314((*a).root, q);
			{
				void* k;
				Tbigchunk27442* c;
				Tbasechunk27438* LOC42;
				if (!!((avlnode == NIM_NIL))) goto LA40;
				k = ((void*) ((*avlnode).key));
				LOC42 = 0;
				LOC42 = pageaddr_30255(k);
				c = ((Tbigchunk27442*) (LOC42));
				{
					if (!((NU32)(((NI) 1)) < (NU32)((*((Tfreecell27430*) (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_44831((&gch_48244.region), size);
	return result;
}

N_NIMCALL(void, excl_29797)(Tintset27417* s, NI key) {
	Ttrunk27413* t;
	t = intsetget_29698((&(*s)), (NI)((NU32)(key) >> (NU32)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)(key & ((NI) 511));
		(*t).bits[((NI)((NU32)(((NI) (u))) >> (NU32)(((NI) 5))))- 0] = (NI)((*t).bits[((NI)((NU32)(((NI) (u))) >> (NU32)(((NI) 5))))- 0] & (NI)((NU32) ~((NI)((NU32)(((NI) 1)) << (NU32)(((NI) ((NI)(((NI) (u)) & ((NI) 31)))))))));
	}
	LA3: ;
}

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

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

N_NIMCALL(void, freeoschunks_30810)(Tmemregion28210* a, void* p, NI size) {
	Tbasechunk27438* c;
	NI nxt;
	Tbasechunk27438* next;
	NI LOC7;
	c = ((Tbasechunk27438*) (p));
	nxt = (NI)((NU32)(((NI) (p))) + (NU32)((*c).size));
	next = ((Tbasechunk27438*) (nxt));
	{
		NI LOC3;
		NIM_BOOL LOC4;
		LOC3 = 0;
		LOC3 = pageindex_30239(next);
		LOC4 = 0;
		LOC4 = contains_29759((&(*a).chunkstarts), LOC3);
		if (!LOC4) goto LA5;
		(*next).prevsize = ((NI) 0);
	}
	LA5: ;
	LOC7 = 0;
	LOC7 = pageindex_30247(p);
	excl_29797((&(*a).chunkstarts), LOC7);
	osdeallocpages_27223(p, size);
	deccurrmem_28422(a, size);
	(*a).freemem -= size;
}

N_NIMCALL(void, freebigchunk_31206)(Tmemregion28210* a, Tbigchunk27442* c_31210) {
	Tbigchunk27442* c;
	Tbasechunk27438* ri;
	c = c_31210;
	(*a).freemem += (*c).Sup.size;
	ri = ((Tbasechunk27438*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.size))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isaccessible_31018((&(*a)), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		LOC3 = chunkunused_30119(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC12;
			LOC9 = 0;
			LOC9 = issmallchunk_30108(ri);
			if (!!(LOC9)) goto LA10;
			listremove_32002(&(*a).freechunkslist, ((Tbigchunk27442*) (ri)));
			(*c).Sup.size += (*ri).size;
			LOC12 = 0;
			LOC12 = pageindex_30239(ri);
			excl_29797((&(*a).chunkstarts), LOC12);
		}
		LA10: ;
	}
	LA5: ;
	{
		Tbasechunk27438* le;
		if (!!(((*c).Sup.prevsize == ((NI) 0)))) goto LA15;
		le = ((Tbasechunk27438*) ((NI)((NU32)(((NI) (c))) - (NU32)((*c).Sup.prevsize))));
		{
			NIM_BOOL LOC19;
			LOC19 = 0;
			LOC19 = isaccessible_31018((&(*a)), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			LOC19 = chunkunused_30119(le);
			LA20: ;
			if (!LOC19) goto LA21;
			{
				NIM_BOOL LOC25;
				Tbasechunk27438* LOC28;
				NI LOC29;
				LOC25 = 0;
				LOC25 = issmallchunk_30108(le);
				if (!!(LOC25)) goto LA26;
				listremove_32002(&(*a).freechunkslist, ((Tbigchunk27442*) (le)));
				(*le).size += (*c).Sup.size;
				LOC28 = 0;
				LOC28 = &c->Sup;
				LOC29 = 0;
				LOC29 = pageindex_30239(LOC28);
				excl_29797((&(*a).chunkstarts), LOC29);
				c = ((Tbigchunk27442*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	{
		NIM_BOOL LOC32;
		Tbasechunk27438* LOC36;
		NI LOC37;
		LOC32 = 0;
		LOC32 = ((*c).Sup.size < ((NI) 1048576));
		if (LOC32) goto LA33;
		LOC32 = NIM_TRUE;
		LA33: ;
		if (!LOC32) goto LA34;
		LOC36 = 0;
		LOC36 = &c->Sup;
		LOC37 = 0;
		LOC37 = pageindex_30239(LOC36);
		incl_29783(a, (&(*a).chunkstarts), LOC37);
		updateprevsize_31083(a, c, (*c).Sup.size);
		listadd_33223(&(*a).freechunkslist, c);
		(*c).Sup.used = NIM_FALSE;
	}
	goto LA30;
	LA34: ;
	{
		freeoschunks_30810(a, ((void*) (c)), (*c).Sup.size);
	}
	LA30: ;
}

static N_INLINE(void, deallocavlnode_29206)(Tmemregion28210* a, Tavlnode28208* n) {
	(*n).link[(((NI) 0))- 0] = (*a).freeavlnodes;
	(*a).freeavlnodes = n;
}

N_NIMCALL(void, del_29604)(Tmemregion28210* a, Tavlnode28208** t, NI x) {
{	{
		if (!((*t) == bottom_28239)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	(*a).last = (*t);
	{
		if (!((NU32)(x) < (NU32)((*(*t)).key))) goto LA7;
		del_29604(a, &(*(*t)).link[(((NI) 0))- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		(*a).deleted = (*t);
		del_29604(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_28239));
		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_28239;
		(*t) = (*(*t)).link[(((NI) 1))- 0];
		deallocavlnode_29206(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_29376(t);
		skew_29376(&(*(*t)).link[(((NI) 1))- 0]);
		skew_29376(&(*(*(*t)).link[(((NI) 1))- 0]).link[(((NI) 1))- 0]);
		split_29384(t);
		split_29384(&(*(*t)).link[(((NI) 1))- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	}BeforeRet: ;
}

N_NIMCALL(void, rawdealloc_42023)(Tmemregion28210* a, void* p) {
	Tbasechunk27438* c_42201;
	c_42201 = pageaddr_30255(p);
	{
		NIM_BOOL LOC3;
		Tsmallchunk27440* c;
		NI s;
		Tfreecell27430* f;
		LOC3 = 0;
		LOC3 = issmallchunk_30108(c_42201);
		if (!LOC3) goto LA4;
		c = ((Tsmallchunk27440*) (c_42201));
		s = (*c).Sup.size;
		f = ((Tfreecell27430*) (p));
		(*f).zerofield = ((NI) 0);
		(*f).next = (*c).freelist;
		(*c).freelist = f;
		{
			if (!((*c).free < s)) goto LA8;
			listadd_36604(&(*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(Tsmallchunk27440)) - ((NI) 8))))) goto LA13;
				listremove_39402(&(*a).freesmallchunks[((NI)(s / ((NI) 8)))- 0], c);
				(*c).Sup.size = ((NI) 4096);
				freebigchunk_31206(a, ((Tbigchunk27442*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		Tbigchunk27442* c;
		c = ((Tbigchunk27442*) (c_42201));
		(*a).deleted = bottom_28239;
		del_29604(a, &(*a).root, ((NI) ((&(*c).data))));
		freebigchunk_31206(a, c);
	}
	LA1: ;
}

N_NIMCALL(void, dealloc_45028)(Tmemregion28210* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(Tfreecell27430))))));
	rawdealloc_42023(allocator, x);
}

N_NOCONV(void, dealloc_6048)(void* p) {
	dealloc_45028((&gch_48244.region), p);
}

static N_INLINE(void, add_46431)(Tcellseq46362* s, Tcell46346* c) {
	{
		Tcell46346** 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) 4)))));
		d = ((Tcell46346**) (LOC5));
		memcpy(((void*) (d)), ((void*) ((*s).d)), ((NI) ((NI)((*s).len * ((NI) 4)))));
		dealloc_6048(((void*) ((*s).d)));
		(*s).d = d;
	}
	LA3: ;
	(*s).d[((*s).len)- 0] = c;
	(*s).len += ((NI) 1);
}

static N_INLINE(void, gcmark_69046)(Tgcheap48216* gch, void* p) {
	Tcell46346* cell;
	NI c;
	cell = usrtocell_49846(p);
	c = ((NI) (cell));
	{
		Tcell46346* objstart;
		void* LOC5;
		if (!((NU32)(((NI) 4096)) < (NU32)(c))) goto LA3;
		LOC5 = 0;
		LOC5 = interiorallocatedptr_43689((&(*gch).region), ((void*) (cell)));
		objstart = ((Tcell46346*) (LOC5));
		{
			if (!!((objstart == NIM_NIL))) goto LA8;
			(*objstart).refcount = (NI)((NU32)((*objstart).refcount) + (NU32)(((NI) 8)));
			add_46431((&(*gch).decstack), objstart);
		}
		LA8: ;
	}
	LA3: ;
}

N_CDECL(void, markstackandregisters_70640)(Tgcheap48216* gch) {
	jmp_buf registers;
	{
		int LOC3;
		NI max;
		NI sp;
		LOC3 = 0;
		LOC3 = setjmp(registers);
		if (!(LOC3 == ((NI32) 0))) goto LA4;
		max = ((NI) ((*gch).stackbottom));
		sp = ((NI) ((&registers)));
		{
			while (1) {
				if (!((NU32)(sp) < (NU32)((NI)(max - ((NI) 32))))) goto LA7;
				gcmark_69046(gch, ((void**) (sp))[(((NI) 0))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 1))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 2))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 3))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 4))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 5))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 6))- 0]);
				gcmark_69046(gch, ((void**) (sp))[(((NI) 7))- 0]);
				sp = (NI)((NU32)(sp) + (NU32)(((NI) 32)));
			} LA7: ;
		}
		{
			while (1) {
				if (!((NU32)(sp) <= (NU32)(max))) goto LA9;
				gcmark_69046(gch, (*((void**) (sp))));
				sp = (NI)((NU32)(sp) + (NU32)(((NI) 4)));
			} LA9: ;
		}
	}
	LA4: ;
}

N_NIMCALL(void, markthreadstacks_69606)(Tgcheap48216* gch) {
}

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

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

N_NIMCALL(Tpagedesc46354*, cellsetget_46522)(Tcellset46358 t, NI key) {
	Tpagedesc46354* 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_46514(h, t.max);
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, excl_47095)(Tcellset46358* s, Tcell46346* cell) {
	NI u;
	Tpagedesc46354* t;
	u = ((NI) (cell));
	t = cellsetget_46522((*s), (NI)((NU32)(u) >> (NU32)(((NI) 12))));
	{
		if (!!((t == NIM_NIL))) goto LA3;
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(((NI) 4096)))) / (NU32)(((NI) 8)));
		(*t).bits[((NI)((NU32)(u) >> (NU32)(((NI) 5))))- 0] = (NI)((*t).bits[((NI)((NU32)(u) >> (NU32)(((NI) 5))))- 0] & (NI)((NU32) ~((NI)((NU32)(((NI) 1)) << (NU32)(((NI) ((NI)(u & ((NI) 31)))))))));
	}
	LA3: ;
}

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

N_NIMCALL(void, preparedealloc_50408)(Tcell46346* cell) {
	{
		void* LOC5;
		if (!!(((*(*cell).typ).finalizer == NIM_NIL))) goto LA3;
		gch_48244.recgclock += ((NI) 1);
		LOC5 = 0;
		LOC5 = celltousr_49825(cell);
		((TFinalizer) ((*(*cell).typ).finalizer))(LOC5);
		gch_48244.recgclock -= ((NI) 1);
	}
	LA3: ;
}

N_NOINLINE(void, addzct_49817)(Tcellseq46362* s, Tcell46346* c) {
	{
		if (!((NI)((*c).refcount & ((NI) 4)) == ((NI) 0))) goto LA3;
		(*c).refcount = (NI)((*c).refcount | ((NI) 4));
		add_46431(s, c);
	}
	LA3: ;
}

static N_INLINE(void, rtladdzct_51404)(Tcell46346* c) {
	addzct_49817((&gch_48244.zct), c);
}

N_NIMCALL(void, cellsetrawinsert_46551)(Tcellset46358 t, Tpagedesc46354** data, Tpagedesc46354* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).key)) & t.max);
	{
		while (1) {
			if (!!((data[(h)- 0] == NIM_NIL))) goto LA2;
			h = nexttry_46514(h, t.max);
		} LA2: ;
	}
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellsetenlarge_46812)(Tcellset46358* t) {
	NI oldmax;
	Tpagedesc46354** 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) 4)))));
	n = ((Tpagedesc46354**) (LOC1));
	{
		NI i_46829;
		NI res_46847;
		i_46829 = 0;
		res_46847 = ((NI) 0);
		{
			while (1) {
				if (!(res_46847 <= oldmax)) goto LA4;
				i_46829 = res_46847;
				{
					if (!!(((*t).data[(i_46829)- 0] == NIM_NIL))) goto LA7;
					cellsetrawinsert_46551((*t), n, (*t).data[(i_46829)- 0]);
				}
				LA7: ;
				res_46847 += ((NI) 1);
			} LA4: ;
		}
	}
	dealloc_6048(((void*) ((*t).data)));
	(*t).data = n;
}

N_NIMCALL(Tpagedesc46354*, cellsetput_46863)(Tcellset46358* t, NI key) {
	Tpagedesc46354* result;
	NI h;
	void* LOC19;
{	result = 0;
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			Tpagedesc46354* 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_46514(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_46812(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_46514(h, (*t).max);
		} LA18: ;
	}
	LOC19 = 0;
	LOC19 = alloc0_6017(((NI) (((NI)sizeof(Tpagedesc46354)))));
	result = ((Tpagedesc46354*) (LOC19));
	(*result).next = (*t).head;
	(*result).key = key;
	(*t).head = result;
	(*t).data[(h)- 0] = result;
	}BeforeRet: ;
	return result;
}

N_NOINLINE(void, incl_47065)(Tcellset46358* s, Tcell46346* cell) {
	NI u;
	Tpagedesc46354* t;
	u = ((NI) (cell));
	t = cellsetput_46863(s, (NI)((NU32)(u) >> (NU32)(((NI) 12))));
	u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(((NI) 4096)))) / (NU32)(((NI) 8)));
	(*t).bits[((NI)((NU32)(u) >> (NU32)(((NI) 5))))- 0] = (NI)((*t).bits[((NI)((NU32)(u) >> (NU32)(((NI) 5))))- 0] | (NI)((NU32)(((NI) 1)) << (NU32)(((NI) ((NI)(u & ((NI) 31)))))));
}

static N_INLINE(void, rtladdcycleroot_50623)(Tcell46346* c) {
	{
		if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 3)))) goto LA3;
		(*c).refcount = (NI)((NI)((*c).refcount & ((NI) -4)) | ((NI) 3));
		incl_47065((&gch_48244.cycleroots), c);
	}
	LA3: ;
}

static N_INLINE(void, decref_51804)(Tcell46346* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		LOC6 = 0;
		LOC6 = canbecycleroot_49867(c);
		if (!LOC6) goto LA7;
		rtladdcycleroot_50623(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
}

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

N_NIMCALL(void, scanblack_65604)(Tcell46346* s) {
	(*s).refcount = (NI)((*s).refcount & ((NI) -4));
	forallchildren_50217(s, ((NU8) 7));
}

N_NIMCALL(void, scan_65804)(Tcell46346* s) {
	{
		if (!(((NI) ((NI)((*s).refcount & ((NI) 3)))) == ((NI) 1))) goto LA3;
		{
			if (!((NU32)(((NI) 8)) <= (NU32)((*s).refcount))) goto LA7;
			scanblack_65604(s);
		}
		goto LA5;
		LA7: ;
		{
			(*s).refcount = (NI)((NI)((*s).refcount & ((NI) -4)) | ((NI) 2));
			forallchildren_50217(s, ((NU8) 6));
		}
		LA5: ;
	}
	LA3: ;
}

N_NIMCALL(NIM_BOOL, isallocatedptr_35405)(Tmemregion28210* a, void* p) {
	NIM_BOOL result;
	result = 0;
	{
		NIM_BOOL LOC3;
		Tbasechunk27438* c_43616;
		LOC3 = 0;
		LOC3 = isaccessible_31018(a, p);
		if (!LOC3) goto LA4;
		c_43616 = pageaddr_30255(p);
		{
			NIM_BOOL LOC8;
			LOC8 = 0;
			LOC8 = chunkunused_30119(c_43616);
			if (!!(LOC8)) goto LA9;
			{
				NIM_BOOL LOC13;
				Tsmallchunk27440* c;
				NI offset;
				NIM_BOOL LOC16;
				NIM_BOOL LOC17;
				LOC13 = 0;
				LOC13 = issmallchunk_30108(c_43616);
				if (!LOC13) goto LA14;
				c = ((Tsmallchunk27440*) (c_43616));
				offset = (NI)((NU32)(((NI) ((NI)(((NI) (p)) & ((NI) 4095))))) - (NU32)((NI)(((NI)sizeof(Tsmallchunk27440)) - ((NI) 8))));
				LOC16 = 0;
				LOC17 = 0;
				LOC17 = ((NU32)(offset) < (NU32)((*c).acc));
				if (!(LOC17)) goto LA18;
				LOC17 = ((NI)((NU32)(offset) % (NU32)((*c).Sup.size)) == ((NI) 0));
				LA18: ;
				LOC16 = LOC17;
				if (!(LOC16)) goto LA19;
				LOC16 = ((NU32)(((NI) 1)) < (NU32)((*((Tfreecell27430*) (p))).zerofield));
				LA19: ;
				result = LOC16;
			}
			goto LA11;
			LA14: ;
			{
				Tbigchunk27442* c;
				NIM_BOOL LOC21;
				c = ((Tbigchunk27442*) (c_43616));
				LOC21 = 0;
				LOC21 = (p == ((void*) ((&(*c).data))));
				if (!(LOC21)) goto LA22;
				LOC21 = ((NU32)(((NI) 1)) < (NU32)((*((Tfreecell27430*) (p))).zerofield));
				LA22: ;
				result = LOC21;
			}
			LA11: ;
		}
		LA9: ;
	}
	LA4: ;
	return result;
}

N_NIMCALL(void, freecycliccell_64627)(Tgcheap48216* gch, Tcell46346* c) {
	preparedealloc_50408(c);
	rawdealloc_42023((&(*gch).region), ((void*) (c)));
}

N_NIMCALL(void, collectwhite_66004)(Tcell46346* s) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isallocatedptr_35405((&gch_48244.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_50217(s, ((NU8) 8));
		freecycliccell_64627((&gch_48244), s);
	}
	LA5: ;
}

N_NIMCALL(void, dooperation_50221)(void* p, NU8 op) {
	Tcell46346* c;
{	{
		if (!(p == NIM_NIL)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	c = usrtocell_49846(p);
	switch (op) {
	case ((NU8) 2):
	{
		decref_51804(c);
	}
	break;
	case ((NU8) 3):
	{
		add_46431((&gch_48244.tempstack), c);
	}
	break;
	case ((NU8) 4):
	{
		(*c).refcount = (NI)((NU32)((*c).refcount) - (NU32)(((NI) 8)));
	}
	break;
	case ((NU8) 5):
	{
		(*c).refcount = (NI)((NU32)((*c).refcount) - (NU32)(((NI) 8)));
		markgray_65405(c);
	}
	break;
	case ((NU8) 6):
	{
		scan_65804(c);
	}
	break;
	case ((NU8) 7):
	{
		(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
		{
			if (!!((((NI) ((NI)((*c).refcount & ((NI) 3)))) == ((NI) 0)))) goto LA13;
			scanblack_65604(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		collectwhite_66004(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	}BeforeRet: ;
}

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

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

N_NIMCALL(void, forallslotsaux_54408)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		forallchildrenaux_50225(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_54434;
			NI HEX3Atmp_54606;
			NI res_54609;
			i_54434 = 0;
			HEX3Atmp_54606 = 0;
			HEX3Atmp_54606 = (NI)((*n).len - ((NI) 1));
			res_54609 = ((NI) 0);
			{
				while (1) {
					if (!(res_54609 <= HEX3Atmp_54606)) goto LA5;
					i_54434 = res_54609;
					{
						if (!((*(*n).sons[(i_54434)- 0]).kind == ((NU8) 1))) goto LA8;
						{
							if (!((*(*(*n).sons[(i_54434)- 0]).typ).kind == ((NU8) 22) || (*(*(*n).sons[(i_54434)- 0]).typ).kind == ((NU8) 28) || (*(*(*n).sons[(i_54434)- 0]).typ).kind == ((NU8) 24))) goto LA12;
							dooperation_50221((*((void**) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_54434)- 0]).offset))))), op);
						}
						goto LA10;
						LA12: ;
						{
							forallchildrenaux_50225(((void*) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_54434)- 0]).offset)))), (*(*n).sons[(i_54434)- 0]).typ, op);
						}
						LA10: ;
					}
					goto LA6;
					LA8: ;
					{
						forallslotsaux_54408(dest, (*n).sons[(i_54434)- 0], op);
					}
					LA6: ;
					res_54609 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_26410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA19;
			forallslotsaux_54408(dest, m, op);
		}
		LA19: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forallchildrenaux_50225)(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_50221((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			forallslotsaux_54408(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			{
				NI i_54651;
				NI HEX3Atmp_54674;
				NI res_54677;
				i_54651 = 0;
				HEX3Atmp_54674 = 0;
				HEX3Atmp_54674 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
				res_54677 = ((NI) 0);
				{
					while (1) {
						if (!(res_54677 <= HEX3Atmp_54674)) goto LA14;
						i_54651 = res_54677;
						forallchildrenaux_50225(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_54651) * (NU32)((*(*mt).base).size)))))), (*mt).base, op);
						res_54677 += ((NI) 1);
					} LA14: ;
				}
			}
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	}BeforeRet: ;
}

N_NIMCALL(void, forallchildren_50217)(Tcell46346* cell, NU8 op) {
	TY3289 marker;
	marker = (*(*cell).typ).marker;
	{
		void* LOC5;
		if (!!((marker == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = celltousr_49825(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		switch ((*(*cell).typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			LOC8 = 0;
			LOC8 = celltousr_49825(cell);
			forallchildrenaux_50225(LOC8, (*(*cell).typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			LOC10 = 0;
			LOC10 = celltousr_49825(cell);
			d = ((NI) (LOC10));
			s = ((TGenericSeq*) (d));
			{
				if (!!((s == NIM_NIL))) goto LA13;
				{
					NI i_55435;
					NI HEX3Atmp_55468;
					NI res_55471;
					i_55435 = 0;
					HEX3Atmp_55468 = 0;
					HEX3Atmp_55468 = (NI)((*s).len - ((NI) 1));
					res_55471 = ((NI) 0);
					{
						while (1) {
							if (!(res_55471 <= HEX3Atmp_55468)) goto LA17;
							i_55435 = res_55471;
							forallchildrenaux_50225(((void*) ((NI)((NU32)((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_55435) * (NU32)((*(*(*cell).typ).base).size))))) + (NU32)(((NI) 8))))), (*(*cell).typ).base, op);
							res_55471 += ((NI) 1);
						} LA17: ;
					}
				}
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
}

N_NIMCALL(NIM_BOOL, collectzct_68412)(Tgcheap48216* gch) {
	NIM_BOOL result;
	NI* L;
	result = 0;
	L = (&(*gch).zct.len);
	{
		while (1) {
			Tcell46346* 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 (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA5;
				{
					NIM_BOOL LOC9;
					LOC9 = 0;
					LOC9 = canbecycleroot_49867(c);
					if (!LOC9) goto LA10;
					excl_47095((&(*gch).cycleroots), c);
				}
				LA10: ;
				preparedealloc_50408(c);
				forallchildren_50217(c, ((NU8) 2));
				rawdealloc_42023((&(*gch).region), ((void*) (c)));
			}
			LA5: ;
		} LA2: ;
	}
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, markroots_66205)(Tgcheap48216* gch) {
	NI tabsize;
	tabsize = ((NI) 0);
	{
		Tcell46346* s_66210;
		Tcellset46358 HEX3Atmp_66237;
		Tpagedesc46354* r_66242;
		s_66210 = 0;
		memset((void*)(&HEX3Atmp_66237), 0, sizeof(HEX3Atmp_66237));
		HEX3Atmp_66237 = (*gch).cycleroots;
		r_66242 = HEX3Atmp_66237.head;
		{
			while (1) {
				NI i_66244;
				if (!!((r_66242 == NIM_NIL))) goto LA3;
				i_66244 = ((NI) 0);
				{
					while (1) {
						NI w_66246;
						NI j_66248;
						if (!(i_66244 <= ((NI) 15))) goto LA5;
						w_66246 = (*r_66242).bits[(i_66244)- 0];
						j_66248 = ((NI) 0);
						{
							while (1) {
								if (!!((w_66246 == ((NI) 0)))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_66246 & ((NI) 1)))) == ((NI) 0)))) goto LA10;
									s_66210 = ((Tcell46346*) ((NI)((NI)((NU32)((*r_66242).key) << (NU32)(((NI) 12))) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_66244) << (NU32)(((NI) 5)))) + (NU32)(j_66248))) * (NU32)(((NI) 8))))));
									tabsize += ((NI) 1);
									{
										NIM_BOOL LOC14;
										LOC14 = 0;
										LOC14 = (((NI) ((NI)((*s_66210).refcount & ((NI) 3)))) == ((NI) 3));
										if (!(LOC14)) goto LA15;
										LOC14 = ((NU32)(((NI) 8)) <= (NU32)((*s_66210).refcount));
										LA15: ;
										if (!LOC14) goto LA16;
										markgray_65405(s_66210);
									}
									goto LA12;
									LA16: ;
									{
										excl_47095((&(*gch).cycleroots), s_66210);
										{
											if (!((*s_66210).refcount == ((NI) 0))) goto LA21;
											freecycliccell_64627(gch, s_66210);
										}
										LA21: ;
									}
									LA12: ;
								}
								LA10: ;
								j_66248 += ((NI) 1);
								w_66246 = (NI)((NU32)(w_66246) >> (NU32)(((NI) 1)));
							} LA7: ;
						}
						i_66244 += ((NI) 1);
					} LA5: ;
				}
				r_66242 = (*r_66242).next;
			} LA3: ;
		}
	}
	(*gch).stat.cycletablesize = (((*gch).stat.cycletablesize >= tabsize) ? (*gch).stat.cycletablesize : tabsize);
}

N_NIMCALL(void, collectroots_68601)(Tgcheap48216* gch) {
	{
		Tcell46346* s_68605;
		Tcellset46358 HEX3Atmp_68607;
		Tpagedesc46354* r_68612;
		s_68605 = 0;
		memset((void*)(&HEX3Atmp_68607), 0, sizeof(HEX3Atmp_68607));
		HEX3Atmp_68607 = (*gch).cycleroots;
		r_68612 = HEX3Atmp_68607.head;
		{
			while (1) {
				NI i_68614;
				if (!!((r_68612 == NIM_NIL))) goto LA3;
				i_68614 = ((NI) 0);
				{
					while (1) {
						NI w_68616;
						NI j_68618;
						if (!(i_68614 <= ((NI) 15))) goto LA5;
						w_68616 = (*r_68612).bits[(i_68614)- 0];
						j_68618 = ((NI) 0);
						{
							while (1) {
								if (!!((w_68616 == ((NI) 0)))) goto LA7;
								{
									if (!!((((NI) ((NI)(w_68616 & ((NI) 1)))) == ((NI) 0)))) goto LA10;
									s_68605 = ((Tcell46346*) ((NI)((NI)((NU32)((*r_68612).key) << (NU32)(((NI) 12))) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_68614) << (NU32)(((NI) 5)))) + (NU32)(j_68618))) * (NU32)(((NI) 8))))));
									collectwhite_66004(s_68605);
								}
								LA10: ;
								j_68618 += ((NI) 1);
								w_68616 = (NI)((NU32)(w_68616) >> (NU32)(((NI) 1)));
							} LA7: ;
						}
						i_68614 += ((NI) 1);
					} LA5: ;
				}
				r_68612 = (*r_68612).next;
			} LA3: ;
		}
	}
}

N_NIMCALL(void, deinit_46486)(Tcellset46358* s) {
	Tpagedesc46354* it;
	it = (*s).head;
	{
		while (1) {
			Tpagedesc46354* 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_54401)(Tcellset46358* s) {
	deinit_46486(s);
	init_46475(s);
}

N_NIMCALL(void, collectcycles_68644)(Tgcheap48216* gch) {
	{
		while (1) {
			NIM_BOOL LOC3;
			if (!(((NI) 0) < (*gch).zct.len)) goto LA2;
			LOC3 = 0;
			LOC3 = collectzct_68412(gch);
		} LA2: ;
	}
	markroots_66205(gch);
	{
		Tcell46346* s_68801;
		Tcellset46358 HEX3Atmp_69003;
		Tpagedesc46354* r_69008;
		s_68801 = 0;
		memset((void*)(&HEX3Atmp_69003), 0, sizeof(HEX3Atmp_69003));
		HEX3Atmp_69003 = (*gch).cycleroots;
		r_69008 = HEX3Atmp_69003.head;
		{
			while (1) {
				NI i_69010;
				if (!!((r_69008 == NIM_NIL))) goto LA6;
				i_69010 = ((NI) 0);
				{
					while (1) {
						NI w_69012;
						NI j_69014;
						if (!(i_69010 <= ((NI) 15))) goto LA8;
						w_69012 = (*r_69008).bits[(i_69010)- 0];
						j_69014 = ((NI) 0);
						{
							while (1) {
								if (!!((w_69012 == ((NI) 0)))) goto LA10;
								{
									if (!!((((NI) ((NI)(w_69012 & ((NI) 1)))) == ((NI) 0)))) goto LA13;
									s_68801 = ((Tcell46346*) ((NI)((NI)((NU32)((*r_69008).key) << (NU32)(((NI) 12))) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_69010) << (NU32)(((NI) 5)))) + (NU32)(j_69014))) * (NU32)(((NI) 8))))));
									scan_65804(s_68801);
								}
								LA13: ;
								j_69014 += ((NI) 1);
								w_69012 = (NI)((NU32)(w_69012) >> (NU32)(((NI) 1)));
							} LA10: ;
						}
						i_69010 += ((NI) 1);
					} LA8: ;
				}
				r_69008 = (*r_69008).next;
			} LA6: ;
		}
	}
	collectroots_68601(gch);
	cellsetreset_54401((&(*gch).cycleroots));
}

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

N_NIMCALL(NI, getfreemem_6697)(void) {
	NI result;
	result = 0;
	result = gch_48244.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_72811)(Tgcheap48216* gch) {
	Tcell46346** d;
	d = (*gch).decstack.d;
	{
		NI i_72826;
		NI HEX3Atmp_73002;
		NI res_73005;
		i_72826 = 0;
		HEX3Atmp_73002 = 0;
		HEX3Atmp_73002 = (NI)((*gch).decstack.len - ((NI) 1));
		res_73005 = ((NI) 0);
		{
			while (1) {
				if (!(res_73005 <= HEX3Atmp_73002)) goto LA3;
				i_72826 = res_73005;
				decref_51804(d[(i_72826)- 0]);
				res_73005 += ((NI) 1);
			} LA3: ;
		}
	}
	(*gch).decstack.len = ((NI) 0);
}

N_NIMCALL(void, collectctbody_73021)(Tgcheap48216* gch) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_70411();
	(*gch).stat.maxstacksize = (((*gch).stat.maxstacksize >= LOC1) ? (*gch).stat.maxstacksize : LOC1);
	prepareforinteriorpointerchecking_43682((&(*gch).region));
	markstackandregisters_70640(gch);
	markthreadstacks_69606(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_68412(gch);
		if (!LOC4) goto LA5;
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			LOC9 = 0;
			LOC10 = 0;
			LOC10 = getoccupiedmem_46268((&(*gch).region));
			LOC9 = ((*gch).cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			collectcycles_68644(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_72811(gch);
}

N_NIMCALL(void, collectct_50210)(Tgcheap48216* gch) {
	NI stackmarkcosts;
	NI LOC1;
	LOC1 = 0;
	LOC1 = stacksize_70411();
	stackmarkcosts = (((NI)(LOC1 / ((NI) 64)) >= ((NI) 500)) ? (NI)(LOC1 / ((NI) 64)) : ((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_46268((&(*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_73021(gch);
	}
	LA13: ;
}

static N_INLINE(void, addnewobjtozct_55487)(Tcell46346* res, Tgcheap48216* gch) {
	NI L;
	Tcell46346** d;
{	L = (*gch).zct.len;
	d = (*gch).zct.d;
	{
		Tcell46346* c;
		if (!(((NI) 8) < L)) goto LA3;
		c = 0;
		c = d[((NI)(L - ((NI) 1)))- 0];
		{
			if (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*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 (!((NU32)(((NI) 8)) <= (NU32)((*c).refcount))) goto LA35;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 8)))- 0] = res;
			goto BeforeRet;
		}
		LA35: ;
		add_46431((&(*gch).zct), res);
	}
	goto LA1;
	LA3: ;
	{
		d[(L)- 0] = res;
		(*gch).zct.len += ((NI) 1);
	}
	LA1: ;
	}BeforeRet: ;
}

N_NIMCALL(void*, rawnewobj_56004)(TNimType* typ, NI size, Tgcheap48216* gch) {
	void* result;
	Tcell46346* res;
	void* LOC1;
	result = 0;
	collectct_50210(gch);
	LOC1 = 0;
	LOC1 = rawalloc_35701((&(*gch).region), (NI)(size + ((NI)sizeof(Tcell46346))));
	res = ((Tcell46346*) (LOC1));
	(*res).typ = typ;
	(*res).refcount = ((NI) 4);
	addnewobjtozct_55487(res, gch);
	result = celltousr_49825(res);
	return result;
}

N_NIMCALL(void*, newObjNoInit)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_56004(typ, size, (&gch_48244));
	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_13469)(FILE* f, NCSTRING c) {
	fputs(c, f);
}

N_NIMCALL(void, writetostderr_17001)(NCSTRING msg) {
	write_13469(stdout, msg);
}

N_NIMCALL(void, showerrormessage_17009)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_16804 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_16804(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_17001(data);
	}
	LA1: ;
}

N_NOCONV(void, signalHandler)(int sig) {
	NCSTRING msg;
	msg = 0;
	{
		if (!(sig == SIGINT)) goto LA3;
		msg = "SIGINT: Interrupted by Ctrl-C.\012";
	}
	goto LA1;
	LA3: ;
	{
		if (!(sig == SIGSEGV)) goto LA6;
		msg = "SIGSEGV: Illegal storage access. (Attempt to read from nil?)\012";
	}
	goto LA1;
	LA6: ;
	{
		if (!(sig == SIGABRT)) goto LA9;
		msg = "SIGABRT: Abnormal termination.\012";
	}
	goto LA1;
	LA9: ;
	{
		if (!(sig == SIGFPE)) goto LA12;
		msg = "SIGFPE: Arithmetic error.\012";
	}
	goto LA1;
	LA12: ;
	{
		if (!(sig == SIGILL)) goto LA15;
		msg = "SIGILL: Illegal operation.\012";
	}
	goto LA1;
	LA15: ;
	{
		if (!(sig == SIGSEGV)) goto LA18;
		msg = "SIGBUS: Illegal storage access. (Attempt to read from nil?)\012";
	}
	goto LA1;
	LA18: ;
	{
		{
			{
				if (!(sig == SIGPIPE)) goto LA24;
				msg = "SIGPIPE: Pipe closed.\012";
				goto LA21;
			}
			LA24: ;
			msg = "unknown signal\012";
		} LA21: ;
	}
	LA1: ;
	showerrormessage_17009(msg);
	exit(((NI) 1));
}

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

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	Tcell46346* LOC1;
	result = 0;
	LOC1 = 0;
	LOC1 = usrtocell_49846(p);
	result = (NI)((NU32)((*LOC1).refcount) >> (NU32)(((NI) 3)));
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	Tcell46346* res;
	void* LOC1;
	result = 0;
	collectct_50210((&gch_48244));
	LOC1 = 0;
	LOC1 = rawalloc_35701((&gch_48244.region), (NI)(size + ((NI)sizeof(Tcell46346))));
	res = ((Tcell46346*) (LOC1));
	(*res).typ = typ;
	(*res).refcount = ((NI) 8);
	result = celltousr_49825(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_50221(d, ((NU8) (op)));
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = 0;
	result = rawnewobj_56004(typ, size, (&gch_48244));
	zeroMem(result, ((NI) (size)));
	return result;
}
N_NIMCALL(void, TMP50)(void* p, NI op) {
	Exception* a;
	a = (Exception*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
}
N_NIMCALL(void, TMP51)(void* p, NI op) {
	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) {
	Tcell46346* c;
	c = usrtocell_49846(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA3;
		rtladdzct_51404(c);
	}
	LA3: ;
}

static N_INLINE(void, incref_52222)(Tcell46346* c) {
	(*c).refcount = (NI)((NU32)((*c).refcount) + (NU32)(((NI) 8)));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = canbecycleroot_49867(c);
		if (!LOC3) goto LA4;
		rtladdcycleroot_50623(c);
	}
	LA4: ;
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		Tcell46346* LOC5;
		if (!!((src == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = usrtocell_49846(src);
		incref_52222(LOC5);
	}
	LA3: ;
	{
		Tcell46346* LOC10;
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		LOC10 = 0;
		LOC10 = usrtocell_49846((*dest));
		decref_51804(LOC10);
	}
	LA8: ;
	(*dest) = src;
}

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

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

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

N_NIMCALL(void, raiseexceptionaux_18204)(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_17043 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_17043).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_17043).raiseAction.ClEnv? (*exchandler_17043).raiseAction.ClPrc(e, (*exchandler_17043).raiseAction.ClEnv):((TMP53)((*exchandler_17043).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			longjmp((*exchandler_17043).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!(isObjWithCache((*e).Sup.m_type, (&NTI3453), Nim_OfCheck_CACHE1))) goto LA30;
		showerrormessage_17009((*e).name);
		quitordebug_18007();
	}
	goto LA19;
	LA30: ;
	{
		TY18616 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_17009(((NCSTRING) (buf)));
		quitordebug_18007();
	}
	LA19: ;
	}BeforeRet: ;
}

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

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

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
{	result = 0;
	result = (NI)((NU32)(a) + (NU32)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (((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)((NU32)(a) * (NU32)(b));
	floatprod = ((NF)(((double) (a))) * (NF)(((double) (b))));
	resasfloat = ((double) (result));
	{
		if (!(resasfloat == floatprod)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(((NF)(3.2000000000000000e+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) 8));
	result = newObjRC1(typ, size);
	(*((TGenericSeq*) (result))).len = len;
	(*((TGenericSeq*) (result))).reserved = len;
	return result;
}

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

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

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = isonstack_50214(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		{
			Tcell46346* LOC10;
			if (!!((src == NIM_NIL))) goto LA8;
			LOC10 = 0;
			LOC10 = usrtocell_49846(src);
			incref_52222(LOC10);
		}
		LA8: ;
		{
			Tcell46346* LOC15;
			if (!((NU32)(((NI) 4096)) <= (NU32)(((NI) ((*dest)))))) goto LA13;
			LOC15 = 0;
			LOC15 = usrtocell_49846((*dest));
			decref_51804(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	(*dest) = src;
}
N_NIMCALL(void, TMP130)(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_22219;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_22219 = 0;
		e_22219 = (Valueerror3449*) newObj((&NTI22401), sizeof(Valueerror3449));
		(*e_22219).Sup.Sup.m_type = (&NTI3449);
		LOC5 = 0;
		LOC5 = (*e_22219).Sup.message; (*e_22219).Sup.message = copyStringRC1(((NimStringDesc*) &TMP131));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_22219, "ValueError");
	}
	LA3: ;
}

N_NIMCALL(void, genericresetaux_80201)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		genericReset(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_81820;
			NI HEX3Atmp_81846;
			NI res_81849;
			i_81820 = 0;
			HEX3Atmp_81846 = 0;
			HEX3Atmp_81846 = (NI)((*n).len - ((NI) 1));
			res_81849 = ((NI) 0);
			{
				while (1) {
					if (!(res_81849 <= HEX3Atmp_81846)) goto LA6;
					i_81820 = res_81849;
					genericresetaux_80201(dest, (*n).sons[(i_81820)- 0]);
					res_81849 += ((NI) 1);
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_26410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			genericresetaux_80201(dest, m);
		}
		LA10: ;
		zeroMem(((void*) ((NI)((NU32)(d) + (NU32)((*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_80201(dest, (*mt).node);
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		genericresetaux_80201(dest, (*mt).node);
		pint = ((TNimType**) (dest));
		(*pint) = NIM_NIL;
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_82013;
			NI HEX3Atmp_82037;
			NI res_82040;
			i_82013 = 0;
			HEX3Atmp_82037 = 0;
			HEX3Atmp_82037 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
			res_82040 = ((NI) 0);
			{
				while (1) {
					if (!(res_82040 <= HEX3Atmp_82037)) goto LA7;
					i_82013 = res_82040;
					genericReset(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_82013) * (NU32)((*(*mt).base).size)))))), (*mt).base);
					res_82040 += ((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) (-2147483647 -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_76243, NI last) {
	NimStringDesc* result;
	NI start;
	NI len;
	result = 0;
	start = ((start_76243 >= ((NI) 0)) ? start_76243 : ((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_76001)(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_61806)(void* old, NI newsize, Tgcheap48216* gch) {
	void* result;
	Tcell46346* ol;
	Tcell46346* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	result = 0;
	collectct_50210(gch);
	ol = usrtocell_49846(old);
	LOC1 = 0;
	LOC1 = rawalloc_35701((&(*gch).region), (NI)(newsize + ((NI)sizeof(Tcell46346))));
	res = ((Tcell46346*) (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) 8));
	memcpy(((void*) (res)), ((void*) (ol)), ((NI) ((NI)(oldsize + ((NI)sizeof(Tcell46346))))));
	zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (res))) + (NU32)(oldsize))) + (NU32)(((NI)sizeof(Tcell46346)))))), ((NI) ((NI)(newsize - oldsize))));
	{
		if (!((NU32)((NI)((NU32)((*ol).refcount) >> (NU32)(((NI) 3)))) <= (NU32)(((NI) 1)))) goto LA8;
		{
			NI j;
			Tcell46346** 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_49867(ol);
			if (!LOC22) goto LA23;
			excl_47095((&(*gch).cycleroots), ol);
		}
		LA23: ;
		rawdealloc_42023((&(*gch).region), ((void*) (ol)));
	}
	goto LA6;
	LA8: ;
	{
		(*res).refcount = ((NI) 8);
		decref_51804(ol);
	}
	LA6: ;
	result = celltousr_49825(res);
	return result;
}

N_NIMCALL(void*, growobj_64618)(void* old, NI newsize) {
	void* result;
	result = 0;
	result = growobj_61806(old, newsize, (&gch_48244));
	return result;
}

N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen) {
	NimStringDesc* result;
	result = 0;
	{
		if (!((NI)((*dest).Sup.len + addlen) <= ((NI) ((NI)((*dest).Sup.reserved & ((NI) 2147483647)))))) goto LA3;
		result = dest;
	}
	goto LA1;
	LA3: ;
	{
		NI sp;
		NI LOC6;
		void* LOC7;
		LOC6 = 0;
		LOC6 = resize_76001(((NI) ((NI)((*dest).Sup.reserved & ((NI) 2147483647)))));
		sp = ((LOC6 >= (NI)((*dest).Sup.len + addlen)) ? LOC6 : (NI)((*dest).Sup.len + addlen));
		LOC7 = 0;
		LOC7 = growobj_64618(((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) ((NI)((*result).Sup.reserved & ((NI) 2147483647)))) <= (*result).Sup.len)) goto LA3;
		(*result).Sup.reserved = resize_76001(((NI) ((NI)((*result).Sup.reserved & ((NI) 2147483647)))));
		LOC5 = 0;
		LOC5 = growobj_64618(((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) ((NI)((*result).reserved & ((NI) 2147483647)))) <= (*result).len)) goto LA3;
		(*result).reserved = resize_76001(((NI) ((NI)((*result).reserved & ((NI) 2147483647)))));
		LOC5 = 0;
		LOC5 = growobj_64618(((void*) (result)), (NI)((NI)(elemsize * (*result).reserved) + ((NI) 8)));
		result = ((TGenericSeq*) (LOC5));
	}
	LA3: ;
	(*result).len += ((NI) 1);
	return result;
}

N_NIMCALL(void, genericassignaux_80212)(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_80206(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_80249;
			NI HEX3Atmp_80406;
			NI res_80409;
			i_80249 = 0;
			HEX3Atmp_80406 = 0;
			HEX3Atmp_80406 = (NI)((*n).len - ((NI) 1));
			res_80409 = ((NI) 0);
			{
				while (1) {
					if (!(res_80409 <= HEX3Atmp_80406)) goto LA5;
					i_80249 = res_80409;
					genericassignaux_80212(dest, src, (*n).sons[(i_80249)- 0], shallow);
					res_80409 += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		dd = selectbranch_26410(dest, n);
		m = selectbranch_26410(src, n);
		{
			NIM_BOOL LOC9;
			LOC9 = 0;
			LOC9 = !((m == dd));
			if (!(LOC9)) goto LA10;
			LOC9 = !((dd == NIM_NIL));
			LA10: ;
			if (!LOC9) goto LA11;
			genericresetaux_80201(dest, dd);
		}
		LA11: ;
		memcpy(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), ((NI) ((*(*n).typ).size)));
		{
			if (!!((m == NIM_NIL))) goto LA15;
			genericassignaux_80212(dest, src, m, shallow);
		}
		LA15: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, genericassignaux_80206)(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) (-2147483647 -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) (-2147483647 -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_80812;
			NI HEX3Atmp_80943;
			NI res_80946;
			i_80812 = 0;
			HEX3Atmp_80943 = 0;
			HEX3Atmp_80943 = (NI)((*seq).len - ((NI) 1));
			res_80946 = ((NI) 0);
			{
				while (1) {
					if (!(res_80946 <= HEX3Atmp_80943)) goto LA24;
					i_80812 = res_80946;
					genericassignaux_80206(((void*) ((NI)((NU32)((NI)((NU32)(dst) + (NU32)((NI)((NU32)(i_80812) * (NU32)((*(*mt).base).size))))) + (NU32)(((NI) 8))))), ((void*) ((NI)((NU32)((NI)((NU32)(((NI) (s2))) + (NU32)((NI)((NU32)(i_80812) * (NU32)((*(*mt).base).size))))) + (NU32)(((NI) 8))))), (*mt).base, shallow);
					res_80946 += ((NI) 1);
				} LA24: ;
			}
		}
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		{
			if (!!(((*mt).base == NIM_NIL))) goto LA28;
			genericassignaux_80206(dest, src, (*mt).base, shallow);
		}
		LA28: ;
		genericassignaux_80212(dest, src, (*mt).node, shallow);
		pint = ((TNimType**) (dest));
		(*pint) = mt;
	}
	break;
	case ((NU8) 18):
	{
		genericassignaux_80212(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_80891;
			NI HEX3Atmp_80954;
			NI res_80957;
			i_80891 = 0;
			HEX3Atmp_80954 = 0;
			HEX3Atmp_80954 = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
			res_80957 = ((NI) 0);
			{
				while (1) {
					if (!(res_80957 <= HEX3Atmp_80954)) goto LA34;
					i_80891 = res_80957;
					genericassignaux_80206(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_80891) * (NU32)((*(*mt).base).size)))))), ((void*) ((NI)((NU32)(s) + (NU32)((NI)((NU32)(i_80891) * (NU32)((*(*mt).base).size)))))), (*mt).base, shallow);
					res_80957 += ((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_80206(dest, src, mt, NIM_FALSE);
}

N_NIMCALL(NI, writebuffer_13537)(FILE* f, void* buffer, NI len) {
	NI result;
	result = 0;
	result = fwrite(buffer, ((NI) 1), ((NI) (len)), f);
	return result;
}
N_NIMCALL(void, TMP144)(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_78205)(NimStringDesc* msg) {
	Ioerror3431* e_78210;
	NimStringDesc* LOC1;
	e_78210 = 0;
	e_78210 = (Ioerror3431*) newObj((&NTI78401), sizeof(Ioerror3431));
	(*e_78210).Sup.Sup.Sup.m_type = (&NTI3431);
	LOC1 = 0;
	LOC1 = (*e_78210).Sup.Sup.message; (*e_78210).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_78210, "IOError");
}

N_NIMCALL(void, write_13457)(FILE* f, NimStringDesc* s) {
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = writebuffer_13537(f, ((void*) (s->data)), ((NI) ((s ? s->Sup.len : 0))));
		if (!!((LOC3 == (s ? s->Sup.len : 0)))) goto LA4;
		raiseeio_78205(((NimStringDesc*) &TMP145));
	}
	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) ((NI)((*s).Sup.reserved & ((NI) 2147483647)))))) goto LA3;
		result = s;
	}
	goto LA1;
	LA3: ;
	{
		result = resizeString(s, n);
	}
	LA1: ;
	(*result).Sup.len = n;
	(*result).data[(n)- 0] = 0;
	return result;
}

N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x) {
	NimStringDesc* result;
	NI i;
	NI y;
	result = 0;
	result = mnewString(((NI) 16));
	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_77153;
		NI HEX3Atmp_77167;
		NI res_77170;
		j_77153 = 0;
		HEX3Atmp_77167 = 0;
		HEX3Atmp_77167 = (NI)((NI)(i / ((NI) 2)) - ((NI) 1));
		res_77170 = ((NI) 0);
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_77170 <= HEX3Atmp_77167)) goto LA13;
				j_77153 = res_77170;
				LOC14 = 0;
				LOC14 = result->data[j_77153];
				result->data[j_77153] = result->data[(NI)((NI)(i - j_77153) - ((NI) 1))];
				result->data[(NI)((NI)(i - j_77153) - ((NI) 1))] = LOC14;
				res_77170 += ((NI) 1);
			} LA13: ;
		}
	}
	return result;
}

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

N_NIMCALL(void, writestacktrace_16407)(void) {
	showerrormessage_17009("No stack traceback available\012");
}
N_NIMCALL(void, TMP831)(void* p, NI op) {
	TNimObject* a;
	a = (TNimObject*)p;
}

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

N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		NI LOC5;
		void* LOC6;
		if (!(((NI) ((NI)((*result).reserved & ((NI) 2147483647)))) < newlen)) goto LA3;
		LOC5 = 0;
		LOC5 = resize_76001(((NI) ((NI)((*result).reserved & ((NI) 2147483647)))));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_64618(((void*) (result)), (NI)((NI)(elemsize * (*result).reserved) + ((NI) 8)));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		if (!(newlen < (*result).len)) goto LA8;
		{
			NI i_77011;
			NI HEX3Atmp_77088;
			NI res_77091;
			i_77011 = 0;
			HEX3Atmp_77088 = 0;
			HEX3Atmp_77088 = (NI)((*result).len - ((NI) 1));
			res_77091 = newlen;
			{
				while (1) {
					TNimType* LOC13;
					if (!(res_77091 <= HEX3Atmp_77088)) goto LA12;
					i_77011 = res_77091;
					LOC13 = 0;
					LOC13 = extGetCellType(((void*) (result)));
					forallchildrenaux_50225(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(((NI) 8)))) + (NU32)((NI)((NU32)(i_77011) * (NU32)(elemsize)))))), (*LOC13).base, ((NU8) 2));
					res_77091 += ((NI) 1);
				} LA12: ;
			}
		}
		zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(((NI) 8)))) + (NU32)((NI)((NU32)(newlen) * (NU32)(elemsize)))))), ((NI) ((NI)((NU32)((NI)((NU32)((*result).len) - (NU32)(newlen))) * (NU32)(elemsize)))));
	}
	goto LA1;
	LA8: ;
	LA1: ;
	(*result).len = newlen;
	return result;
}

N_NIMCALL(NIM_BOOL, open_13203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize) {
	NIM_BOOL result;
	void* p;
	result = 0;
	p = fopen(filename->data, Formatopen_79610[(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) {
	{
		Tcell46346* c;
		if (!!((src == NIM_NIL))) goto LA3;
		c = usrtocell_49846(src);
		(*c).refcount += ((NI) 8);
	}
	LA3: ;
	{
		Tcell46346* c;
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		c = usrtocell_49846((*dest));
		{
			(*c).refcount -= ((NI) 8);
			if (!((NU32)((*c).refcount) < (NU32)(((NI) 8)))) goto LA11;
			rtladdzct_51404(c);
		}
		LA11: ;
	}
	LA7: ;
	(*dest) = src;
}

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

N_NIMCALL(NIM_BOOL, readline_13481)(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, TMP979)(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_18820;
		NimStringDesc* LOC5;
		if (!(currexception_17045 == NIM_NIL)) goto LA3;
		e_18820 = 0;
		e_18820 = (Reraiseerror3463*) newObj((&NTI19001), sizeof(Reraiseerror3463));
		(*e_18820).Sup.Sup.m_type = (&NTI3463);
		LOC5 = 0;
		LOC5 = (*e_18820).Sup.message; (*e_18820).Sup.message = copyStringRC1(((NimStringDesc*) &TMP980));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((Exception*)e_18820, "ReraiseError");
	}
	goto LA1;
	LA3: ;
	{
		raiseexceptionaux_18204(currexception_17045);
	}
	LA1: ;
}

N_NIMCALL(NimStringDesc*, HEX24_166306)(TY86345 x) {
	NimStringDesc* result;
	NIM_BOOL firstelement;
	NimStringDesc* LOC9;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP981));
	firstelement = NIM_TRUE;
	{
		if (!!(firstelement)) goto LA3;
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP982));
	}
	LA3: ;
	result = resizeString(result, 8);
appendString(result, ((NimStringDesc*) &TMP983));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP984));
	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*) &TMP982));
	}
	LA7: ;
	result = resizeString(result, 4);
appendString(result, ((NimStringDesc*) &TMP985));
	result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP984));
	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*) &TMP986));
	return result;
}

N_NIMCALL(NIM_CHAR, getdecimalpoint_77251)(void) {
	NIM_CHAR result;
	result = 0;
	result = decimalpoint_77250;
	{
		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_77250 = result;
	}
	LA3: ;
	return result;
}

N_NIMCALL(NI, nimParseBiggestFloat)(NimStringDesc* s, NF* number, NI start) {
	NI result;
	NI i;
	NF sign;
	TY77270 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_77251();
			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_82529, TNimType* typ) {
	NimStringDesc* result;
	NI e;
	NimStringDesc* LOC25;
	NimStringDesc* LOC26;
{	result = 0;
	{
		if (!((*typ).size == ((NI) 1))) goto LA3;
		e = ((NI) ((NI)(e_82529 & ((NI) 255))));
	}
	goto LA1;
	LA3: ;
	{
		if (!((*typ).size == ((NI) 2))) goto LA6;
		e = ((NI) ((NI)(e_82529 & ((NI) 65535))));
	}
	goto LA1;
	LA6: ;
	{
		e = e_82529;
	}
	LA1: ;
	{
		if (!!((((*typ).flags &(1<<((((NU8) 2))&7)))!=0))) goto LA11;
		{
			if (!((NU32)(e) < (NU32)((*(*typ).node).len))) goto LA15;
			result = cstrToNimstr((*(*(*typ).node).sons[(e)- 0]).name);
			goto BeforeRet;
		}
		LA15: ;
	}
	goto LA9;
	LA11: ;
	{
		TNimNode* n;
		TNimNode** s;
		n = (*typ).node;
		s = (*n).sons;
		{
			NI i_82568;
			NI HEX3Atmp_82570;
			NI res_82573;
			i_82568 = 0;
			HEX3Atmp_82570 = 0;
			HEX3Atmp_82570 = (NI)((*n).len - ((NI) 1));
			res_82573 = ((NI) 0);
			{
				while (1) {
					if (!(res_82573 <= HEX3Atmp_82570)) goto LA20;
					i_82568 = res_82573;
					{
						if (!((*s[(i_82568)- 0]).offset == e)) goto LA23;
						result = cstrToNimstr((*s[(i_82568)- 0]).name);
						goto BeforeRet;
					}
					LA23: ;
					res_82573 += ((NI) 1);
				} LA20: ;
			}
		}
	}
	LA9: ;
	LOC25 = 0;
	LOC26 = 0;
	LOC26 = nimIntToStr(e);
	LOC25 = rawNewString(LOC26->Sup.len + 16);
appendString(LOC25, LOC26);
appendString(LOC25, ((NimStringDesc*) &TMP1031));
	result = LOC25;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, objectinitaux_81294)(void* dest, TNimNode* n) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		objectInit(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		{
			NI i_81420;
			NI HEX3Atmp_81437;
			NI res_81440;
			i_81420 = 0;
			HEX3Atmp_81437 = 0;
			HEX3Atmp_81437 = (NI)((*n).len - ((NI) 1));
			res_81440 = ((NI) 0);
			{
				while (1) {
					if (!(res_81440 <= HEX3Atmp_81437)) goto LA6;
					i_81420 = res_81440;
					objectinitaux_81294(dest, (*n).sons[(i_81420)- 0]);
					res_81440 += ((NI) 1);
				} LA6: ;
			}
		}
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		m = selectbranch_26410(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA10;
			objectinitaux_81294(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_81294(dest, (*typ).node);
	}
	break;
	case ((NU8) 18):
	{
		objectinitaux_81294(dest, (*typ).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		{
			NI i_81473;
			NI HEX3Atmp_81487;
			NI res_81490;
			i_81473 = 0;
			HEX3Atmp_81487 = 0;
			HEX3Atmp_81487 = (NI)((NI)((*typ).size / (*(*typ).base).size) - ((NI) 1));
			res_81490 = ((NI) 0);
			{
				while (1) {
					if (!(res_81490 <= HEX3Atmp_81487)) goto LA6;
					i_81473 = res_81490;
					objectInit(((void*) ((NI)((NU32)(d) + (NU32)((NI)(i_81473 * (*(*typ).base).size))))), (*typ).base);
					res_81490 += ((NI) 1);
				} LA6: ;
			}
		}
	}
	break;
	default:
	{
	}
	break;
	}
}

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

N_NIMCALL(NI, ptrsize_44616)(void* p) {
	NI result;
	void* x;
	Tbasechunk27438* c;
	result = 0;
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(Tfreecell27430))))));
	c = pageaddr_30255(p);
	result = (NI)((NU32)((*c).size) - (NU32)(((NI)sizeof(Tfreecell27430))));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = issmallchunk_30108(c);
		if (!!(LOC3)) goto LA4;
		result -= (NI)(((NI)sizeof(Tbigchunk27442)) - ((NI) 8));
	}
	LA4: ;
	return result;
}

N_NIMCALL(void*, realloc_46007)(Tmemregion28210* allocator, void* p, NI newsize) {
	void* result;
	result = 0;
	{
		if (!(((NI) 0) < ((NI) (newsize)))) goto LA3;
		result = alloc0_45019(allocator, newsize);
		{
			NI LOC9;
			if (!!((p == NIM_NIL))) goto LA7;
			LOC9 = 0;
			LOC9 = ptrsize_44616(p);
			memcpy(result, p, ((NI) (LOC9)));
			dealloc_45028(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		if (!!((p == NIM_NIL))) goto LA11;
		dealloc_45028(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	return result;
}

N_NOCONV(void*, realloc_6033)(void* p, NI newsize) {
	void* result;
	result = 0;
	result = realloc_46007((&gch_48244.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_77627;
		NI HEX3Atmp_77640;
		NI res_77643;
		j_77627 = 0;
		HEX3Atmp_77640 = 0;
		HEX3Atmp_77640 = (NI)((NI)(i / ((NI) 2)) - ((NI) 1));
		res_77643 = ((NI) 0);
		{
			while (1) {
				NIM_CHAR LOC14;
				if (!(res_77643 <= HEX3Atmp_77640)) goto LA13;
				j_77627 = res_77643;
				LOC14 = 0;
				LOC14 = result->data[j_77627];
				result->data[j_77627] = result->data[(NI)((NI)(i - j_77627) - ((NI) 1))];
				result->data[(NI)((NI)(i - j_77627) - ((NI) 1))] = LOC14;
				res_77643 += ((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, TMP1142)(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(void, TMP1145)(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(NimStringDesc*, nimFloatToStr)(NF f) {
	NimStringDesc* result;
	TY77196 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_77211;
		NI HEX3Atmp_77226;
		NI res_77229;
		i_77211 = 0;
		HEX3Atmp_77226 = 0;
		HEX3Atmp_77226 = (NI)(n - ((NI) 1));
		res_77229 = ((NI) 0);
		{
			while (1) {
				if (!(res_77229 <= HEX3Atmp_77226)) goto LA4;
				i_77211 = res_77229;
				{
					if (!((NU8)(buf[(i_77211)- 0]) == (NU8)(44))) goto LA7;
					buf[(i_77211)- 0] = 46;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA7: ;
				{
					if (!(((NU8)(buf[(i_77211)- 0])) >= ((NU8)(97)) && ((NU8)(buf[(i_77211)- 0])) <= ((NU8)(122)) || ((NU8)(buf[(i_77211)- 0])) >= ((NU8)(65)) && ((NU8)(buf[(i_77211)- 0])) <= ((NU8)(90)) || ((NU8)(buf[(i_77211)- 0])) == ((NU8)(46)))) goto LA10;
					hasdot = NIM_TRUE;
				}
				goto LA5;
				LA10: ;
				LA5: ;
				res_77229 += ((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*) &TMP1271));
	}
	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*) &TMP1272));
		}
		goto LA23;
		LA25: ;
		{
			result = copyString(((NimStringDesc*) &TMP1273));
		}
		LA23: ;
	}
	goto LA16;
	LA21: ;
	{
		result = cstrToNimstr(((NCSTRING) (buf)));
	}
	LA16: ;
	return result;
}

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

static N_INLINE(void*, seqtoptr_523194)(TY191933* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_523183)(TY191933* x, TY191933* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_523194(x);
		LOC4 = 0;
		LOC4 = seqtoptr_523194(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_523194(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_523194(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_523263;
			NI HEX3Atmp_523265;
			NI res_523268;
			i_523263 = 0;
			HEX3Atmp_523265 = 0;
			HEX3Atmp_523265 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_523268 = ((NI) 0);
			{
				while (1) {
					if (!(res_523268 <= HEX3Atmp_523265)) goto LA19;
					i_523263 = res_523268;
					{
						if (!!((x->data[i_523263] == y->data[i_523263]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_523268 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_523172)(TY191933** x, NI32 y) {
	{
		NIM_BOOL LOC3;
		TY523284 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_523183((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (TY191933*) newSeq((&NTI191933), 1));
		LOC6[0] = y;
		(*x)->data[0] = LOC6[0];
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (TY191933*) 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_76424;
		NI HEX3Atmp_76471;
		NI res_76474;
		i_76424 = 0;
		HEX3Atmp_76471 = 0;
		HEX3Atmp_76471 = (NI)((s ? s->Sup.len : 0) - ((NI) 1));
		res_76474 = ((NI) 0);
		{
			while (1) {
				if (!(res_76474 <= HEX3Atmp_76471)) goto LA3;
				i_76424 = res_76474;
				h = (NI)((NU32)(h) + (NU32)(((NI) (((NU8)(s->data[i_76424]))))));
				h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(((NI) 10)))));
				h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(((NI) 6))));
				res_76474 += ((NI) 1);
			} LA3: ;
		}
	}
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(((NI) 3)))));
	h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(((NI) 11))));
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(((NI) 15)))));
	result = h;
	return result;
}

N_NIMCALL(void, write_13473)(FILE* f, NimStringDesc** a, NI aLen0) {
	{
		NimStringDesc* x_79076;
		NI i_79082;
		x_79076 = 0;
		i_79082 = ((NI) 0);
		{
			while (1) {
				if (!(i_79082 < aLen0)) goto LA3;
				x_79076 = a[i_79082];
				write_13457(f, x_79076);
				i_79082 += ((NI) 1);
			} LA3: ;
		}
	}
}

N_NIMCALL(void, Gcdisablemarkandsweep_8819)(void) {
	gch_48244.cyclethreshold = ((NI) 2147483646);
}

N_NIMCALL(void, insert_87401)(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, TMP2160)(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_86357)(NimStringDesc* msg) {
	Assertionerror3447* e_86362;
	NimStringDesc* LOC1;
	e_86362 = 0;
	e_86362 = (Assertionerror3447*) newObj((&NTI86401), sizeof(Assertionerror3447));
	(*e_86362).Sup.Sup.m_type = (&NTI3447);
	LOC1 = 0;
	LOC1 = (*e_86362).Sup.message; (*e_86362).Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((Exception*)e_86362, "AssertionError");
}

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

N_NIMCALL(NI, rawfilesize_79112)(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_79121)(FILE* file, NI len) {
	NimStringDesc* result;
	result = 0;
	result = mnewString(((NI) (len)));
	{
		NI LOC3;
		LOC3 = 0;
		LOC3 = readbuffer_13515(file, ((void*) ((&result->data[((NI) 0)]))), ((NI) (len)));
		if (!!((LOC3 == len))) goto LA4;
		raiseeio_78205(((NimStringDesc*) &TMP2606));
	}
	LA4: ;
	return result;
}

N_NIMCALL(NimStringDesc*, readallbuffer_79095)(FILE* file) {
	NimStringDesc* result;
	NimStringDesc* buffer;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP2607));
	buffer = mnewString(((NI) 4000));
	{
		while (1) {
			NI bytesread;
			bytesread = readbuffer_13515(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_13431)(FILE* file) {
	NimStringDesc* result;
	NI len;
	result = 0;
	{
		if (!!((file == stdin))) goto LA3;
		len = rawfilesize_79112(file);
	}
	goto LA1;
	LA3: ;
	{
		len = ((NI) -1);
	}
	LA1: ;
	{
		if (!(((NI) 0) < len)) goto LA8;
		result = readallfile_79121(file, len);
	}
	goto LA6;
	LA8: ;
	{
		result = readallbuffer_79095(file);
	}
	LA6: ;
	return result;
}

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

N_NIMCALL(NimStringDesc*, readfile_13434)(NimStringDesc* filename) {
	NimStringDesc* volatile result;
	FILE* f;
	TSafePoint TMP2605;
	result = 0;
	f = open_13217(filename, ((NU8) 0), ((NI) -1));
	pushSafePoint(&TMP2605);
	TMP2605.status = setjmp(TMP2605.context);
	if (TMP2605.status == 0) {
		result = readall_13431(f);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2605.status != 0) reraiseException();
	return result;
}

static N_INLINE(void*, seqtoptr_230750)(Ttypeseq191845* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_230739)(Ttypeseq191845* x, Ttypeseq191845* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_230750(x);
		LOC4 = 0;
		LOC4 = seqtoptr_230750(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_230750(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_230750(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_230819;
			NI HEX3Atmp_230832;
			NI res_230835;
			i_230819 = 0;
			HEX3Atmp_230832 = 0;
			HEX3Atmp_230832 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_230835 = ((NI) 0);
			{
				while (1) {
					if (!(res_230835 <= HEX3Atmp_230832)) goto LA19;
					i_230819 = res_230835;
					{
						if (!!((x->data[i_230819] == y->data[i_230819]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_230835 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_225946)(TY225855 x, TY225855 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_266489)(Ttypeseq191845** x, Ttype191849* y) {
	{
		NIM_BOOL LOC3;
		TY350187 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_230739((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Ttypeseq191845*) newSeq((&NTI191845), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Ttypeseq191845*) incrSeq(&((*x))->Sup, sizeof(Ttype191849*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

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

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

N_NIMCALL(void, writefile_13437)(NimStringDesc* filename, NimStringDesc* content) {
	FILE* f;
	TSafePoint TMP2756;
	f = open_13217(filename, ((NU8) 1), ((NI) -1));
	pushSafePoint(&TMP2756);
	TMP2756.status = setjmp(TMP2756.context);
	if (TMP2756.status == 0) {
		write_13457(f, content);
		popSafePoint();
	}
	else {
		popSafePoint();
	}
	{
		fclose(f);
	}
	if (TMP2756.status != 0) reraiseException();
}

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

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

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

N_NIMCALL(NimStringDesc*, HEX24_6401)(NU64 x) {
	NimStringDesc* result;
	TY82435 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*) &TMP2972));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString(((NimStringDesc*) &TMP2973));
	}
	LA1: ;
	goto BeforeRet;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(Tinstantiation191833*, new_413524)(void) {
	Tinstantiation191833* result;
	result = 0;
	result = (Tinstantiation191833*) newObj((&NTI191835), sizeof(Tinstantiation191833));
	return result;
}

static N_INLINE(void*, seqtoptr_194881)(TY191944* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_194870)(TY191944* x, TY191944* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_194881(x);
		LOC4 = 0;
		LOC4 = seqtoptr_194881(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_194881(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_194881(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_194950;
			NI HEX3Atmp_194963;
			NI res_194966;
			i_194950 = 0;
			HEX3Atmp_194963 = 0;
			HEX3Atmp_194963 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_194966 = ((NI) 0);
			{
				while (1) {
					if (!(res_194966 <= HEX3Atmp_194963)) goto LA19;
					i_194950 = res_194966;
					{
						if (!!((x->data[i_194950] == y->data[i_194950]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_194966 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_413561)(TY191944** x, Tinstantiation191833* y) {
	{
		NIM_BOOL LOC3;
		TY413582 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_194870((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (TY191944*) newSeq((&NTI191944), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (TY191944*) incrSeq(&((*x))->Sup, sizeof(Tinstantiation191833*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

static N_INLINE(void*, seqtoptr_264729)(Tnodeseq191807* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_264718)(Tnodeseq191807* x, Tnodeseq191807* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_264729(x);
		LOC4 = 0;
		LOC4 = seqtoptr_264729(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_264729(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_264729(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_264798;
			NI HEX3Atmp_264811;
			NI res_264814;
			i_264798 = 0;
			HEX3Atmp_264811 = 0;
			HEX3Atmp_264811 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_264814 = ((NI) 0);
			{
				while (1) {
					if (!(res_264814 <= HEX3Atmp_264811)) goto LA19;
					i_264798 = res_264814;
					{
						if (!!((x->data[i_264798] == y->data[i_264798]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_264814 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_414279)(Tnodeseq191807** x, Tnode191813* y) {
	{
		NIM_BOOL LOC3;
		TY209680 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_264718((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Tnodeseq191807*) newSeq((&NTI191807), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Tnodeseq191807*) incrSeq(&((*x))->Sup, sizeof(Tnode191813*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

N_NIMCALL(void, insert_414412)(Tnodeseq191807** x, Tnode191813* item, NI i) {
	NI xl;
	NI j;
	xl = ((*x) ? (*x)->Sup.len : 0);
	(*x) = (Tnodeseq191807*) setLengthSeq(&((*x))->Sup, sizeof(Tnode191813*), ((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(Tnodeseq191807*, HEX5BHEX5D_432717)(Tnodeseq191807* s, Slice85773 x) {
	Tnodeseq191807* result;
	NI a;
	NI L;
	result = 0;
	a = x.a;
	L = (NI)((NI)(x.b - a) + ((NI) 1));
	result = (Tnodeseq191807*) newSeq((&NTI191807), ((NI) (L)));
	{
		NI i_432758;
		NI HEX3Atmp_432760;
		NI res_432763;
		i_432758 = 0;
		HEX3Atmp_432760 = 0;
		HEX3Atmp_432760 = (L - 1);
		res_432763 = ((NI) 0);
		{
			while (1) {
				if (!(res_432763 <= HEX3Atmp_432760)) goto LA3;
				i_432758 = res_432763;
				asgnRefNoCycle((void**) (&result->data[i_432758]), s->data[(NI)(i_432758 + a)]);
				res_432763 += ((NI) 1);
			} LA3: ;
		}
	}
	return result;
}

static N_INLINE(void*, seqtoptr_413864)(Tsymseq191815* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_413853)(Tsymseq191815* x, Tsymseq191815* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_413864(x);
		LOC4 = 0;
		LOC4 = seqtoptr_413864(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_413864(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_413864(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_413933;
			NI HEX3Atmp_413946;
			NI res_413949;
			i_413933 = 0;
			HEX3Atmp_413946 = 0;
			HEX3Atmp_413946 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_413949 = ((NI) 0);
			{
				while (1) {
					if (!(res_413949 <= HEX3Atmp_413946)) goto LA19;
					i_413933 = res_413949;
					{
						if (!!((x->data[i_413933] == y->data[i_413933]))) goto LA22;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA22: ;
					res_413949 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(void, safeadd_413966)(Tsymseq191815** x, Tsym191843* y) {
	{
		NIM_BOOL LOC3;
		TY245432 LOC6;
		LOC3 = 0;
		LOC3 = HEX3DHEX3D_413853((*x), NIM_NIL);
		if (!LOC3) goto LA4;
		unsureAsgnRef((void**) (&(*x)), (Tsymseq191815*) newSeq((&NTI191815), 1));
		memset((void*)LOC6, 0, sizeof(LOC6));
		LOC6[0] = y;
		asgnRefNoCycle((void**) (&(*x)->data[0]), LOC6[0]);
	}
	goto LA1;
	LA4: ;
	{
		(*x) = (Tsymseq191815*) incrSeq(&((*x))->Sup, sizeof(Tsym191843*));
		asgnRefNoCycle((void**) (&(*x)->data[(*x)->Sup.len-1]), y);
	}
	LA1: ;
}

N_NIMCALL(void, delete_414490)(Tnodeseq191807** x, NI i) {
	NI xl;
	xl = ((*x) ? (*x)->Sup.len : 0);
	{
		NI j_414518;
		NI HEX3Atmp_414530;
		NI res_414533;
		j_414518 = 0;
		HEX3Atmp_414530 = 0;
		HEX3Atmp_414530 = (NI)(xl - ((NI) 2));
		res_414533 = ((NI) (i));
		{
			while (1) {
				if (!(res_414533 <= HEX3Atmp_414530)) goto LA3;
				j_414518 = res_414533;
				asgnRefNoCycle((void**) (&(*x)->data[j_414518]), (*x)->data[(NI)(j_414518 + ((NI) 1))]);
				res_414533 += ((NI) 1);
			} LA3: ;
		}
	}
	(*x) = (Tnodeseq191807*) setLengthSeq(&((*x))->Sup, sizeof(Tnode191813*), ((NI) ((NI)(xl - ((NI) 1)))));
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_414619)(Tnodeseq191807** s, Slice85773 x, Tnode191813** 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_414671;
			NI HEX3Atmp_414771;
			NI res_414774;
			i_414671 = 0;
			HEX3Atmp_414771 = 0;
			HEX3Atmp_414771 = (L - 1);
			res_414774 = ((NI) 0);
			{
				while (1) {
					if (!(res_414774 <= HEX3Atmp_414771)) goto LA7;
					i_414671 = res_414774;
					asgnRefNoCycle((void**) (&(*s)->data[(NI)(i_414671 + a)]), b[i_414671]);
					res_414774 += ((NI) 1);
				} LA7: ;
			}
		}
	}
	goto LA1;
	LA3: ;
	{
		NI slen_414633;
		NI shift_414635;
		NI newlen_414637;
		slen_414633 = ((*s) ? (*s)->Sup.len : 0);
		shift_414635 = (NI)(bLen0 - L);
		newlen_414637 = (NI)(slen_414633 + shift_414635);
		{
			if (!(((NI) 0) < shift_414635)) goto LA11;
			(*s) = (Tnodeseq191807*) setLengthSeq(&((*s))->Sup, sizeof(Tnode191813*), ((NI) (newlen_414637)));
			{
				NI i_414639;
				NI HEX3Atmp_414779;
				NI HEX3Atmp_414780;
				NI res_414783;
				i_414639 = 0;
				HEX3Atmp_414779 = 0;
				HEX3Atmp_414780 = 0;
				HEX3Atmp_414779 = (NI)(newlen_414637 - ((NI) 1));
				HEX3Atmp_414780 = (NI)((NI)(a + shift_414635) + ((NI) 1));
				res_414783 = HEX3Atmp_414779;
				{
					while (1) {
						if (!(HEX3Atmp_414780 <= res_414783)) goto LA15;
						i_414639 = res_414783;
						asgnRefNoCycle((void**) (&(*s)->data[i_414639]), (*s)->data[(NI)(i_414639 - shift_414635)]);
						res_414783 -= ((NI) 1);
					} LA15: ;
				}
			}
		}
		goto LA9;
		LA11: ;
		{
			{
				NI i_414641;
				NI HEX3Atmp_414788;
				NI HEX3Atmp_414789;
				NI res_414792;
				i_414641 = 0;
				HEX3Atmp_414788 = 0;
				HEX3Atmp_414789 = 0;
				HEX3Atmp_414788 = (NI)(a + bLen0);
				HEX3Atmp_414789 = (NI)((NI)(((*s) ? (*s)->Sup.len : 0) - ((NI) 1)) + shift_414635);
				res_414792 = HEX3Atmp_414788;
				{
					while (1) {
						if (!(res_414792 <= HEX3Atmp_414789)) goto LA19;
						i_414641 = res_414792;
						asgnRefNoCycle((void**) (&(*s)->data[i_414641]), (*s)->data[(NI)(i_414641 - shift_414635)]);
						res_414792 += ((NI) 1);
					} LA19: ;
				}
			}
			(*s) = (Tnodeseq191807*) setLengthSeq(&((*s))->Sup, sizeof(Tnode191813*), ((NI) (newlen_414637)));
		}
		LA9: ;
		{
			NI i_414643;
			NI HEX3Atmp_414797;
			NI res_414800;
			i_414643 = 0;
			HEX3Atmp_414797 = 0;
			HEX3Atmp_414797 = (bLen0 - 1);
			res_414800 = ((NI) 0);
			{
				while (1) {
					if (!(res_414800 <= HEX3Atmp_414797)) goto LA22;
					i_414643 = res_414800;
					asgnRefNoCycle((void**) (&(*s)->data[(NI)(i_414643 + a)]), b[i_414643]);
					res_414800 += ((NI) 1);
				} LA22: ;
			}
		}
	}
	LA1: ;
}

N_NIMCALL(Tnodeseq191807*, newseq_449261)(NI len) {
	Tnodeseq191807* result;
	result = 0;
	result = (Tnodeseq191807*) newSeq((&NTI191807), len);
	return result;
}

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

static N_INLINE(void*, seqtoptr_291724)(TY290746* x) {
	void* result;
	result = 0;
	result = ((void*) (x));
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_291713)(TY290746* x, TY290746* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_291724(x);
		LOC4 = 0;
		LOC4 = seqtoptr_291724(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_291724(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_291724(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_291793;
			NI HEX3Atmp_291795;
			NI res_291798;
			i_291793 = 0;
			HEX3Atmp_291795 = 0;
			HEX3Atmp_291795 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_291798 = ((NI) 0);
			{
				while (1) {
					if (!(res_291798 <= HEX3Atmp_291795)) goto LA19;
					i_291793 = res_291798;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_291661(x->data[i_291793], y->data[i_291793]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_291798 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

static N_INLINE(void*, seqtoptr_291828)(TY290741* 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_291899)(TY291209 x, TY291209 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_291661(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_291817)(TY290741* x, TY290741* y) {
	NIM_BOOL result;
{	result = 0;
	{
		void* LOC3;
		void* LOC4;
		LOC3 = 0;
		LOC3 = seqtoptr_291828(x);
		LOC4 = 0;
		LOC4 = seqtoptr_291828(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_291828(x);
		LOC8 = (LOC9 == NIM_NIL);
		if (LOC8) goto LA10;
		LOC11 = 0;
		LOC11 = seqtoptr_291828(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_291897;
			NI HEX3Atmp_291920;
			NI res_291923;
			i_291897 = 0;
			HEX3Atmp_291920 = 0;
			HEX3Atmp_291920 = (NI)((x ? x->Sup.len : 0) - ((NI) 1));
			res_291923 = ((NI) 0);
			{
				while (1) {
					if (!(res_291923 <= HEX3Atmp_291920)) goto LA19;
					i_291897 = res_291923;
					{
						NIM_BOOL LOC22;
						LOC22 = 0;
						LOC22 = HEX3DHEX3D_291899(x->data[i_291897], y->data[i_291897]);
						if (!!(LOC22)) goto LA23;
						result = NIM_FALSE;
						goto BeforeRet;
					}
					LA23: ;
					res_291923 += ((NI) 1);
				} LA19: ;
			}
		}
		result = NIM_TRUE;
	}
	goto LA1;
	LA15: ;
	LA1: ;
	}BeforeRet: ;
	return result;
}

N_NIMCALL(NIM_BOOL, HEX3DHEX3D_315309)(Tindexentry313396 x, Tindexentry313396 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_13478)(FILE* f) {
	NimStringDesc* result;
	result = 0;
	result = rawNewString(((NI) 80));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = readline_13481(f, (&result));
		if (!!(LOC3)) goto LA4;
		raiseeio_78205(((NimStringDesc*) &TMP4992));
	}
	LA4: ;
	return result;
}
N_NIMCALL(void, TMP5003)(void* p, NI op) {
	TY517225* a;
	NI LOC1;
	a = (TY517225*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	}
}

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

static N_INLINE(void, Gcenable_8803)(void) {
	{
		if (!(((NI) 0) < gch_48244.recgclock)) goto LA3;
		gch_48244.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_48244.stat.stackscans);
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_48244.stat.maxstackcells);
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_48244.stat.cyclecollections);
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_48244.stat.maxthreshold);
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_48244.zct.cap);
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_48244.stat.cycletablesize);
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_48244.stat.maxstacksize);
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_48244.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*) &TMP5015));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP5016));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP5017));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP5018));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP5019));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP5020));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP5021));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP5022));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP5023));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP5024));
appendString(LOC1, LOC13);
	result = LOC1;
	Gcenable_8803();
	return result;
}
NIM_EXTERNC N_NOINLINE(void, systemInit)(void) {
	strdesc_10404.size = ((NI) 4);
	strdesc_10404.kind = ((NU8) 28);
	strdesc_10404.flags = 2;
	initallocator_10001();
	initStackBottom();
	initgc_9801();
	registersignalhandler_20808();
}

NIM_EXTERNC N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP49[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);
TMP49[0] = &TMP0[2];
NTI9022.size = sizeof(Exception*);
NTI9022.kind = 22;
NTI9022.base = (&NTI3427);
NTI9022.marker = TMP50;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(Exception, parent);
TMP0[2].typ = (&NTI9022);
TMP0[2].name = "parent";
TMP49[1] = &TMP0[3];
NTI151.size = sizeof(NCSTRING);
NTI151.kind = 29;
NTI151.base = 0;
NTI151.flags = 3;
TMP0[3].kind = 1;
TMP0[3].offset = offsetof(Exception, name);
TMP0[3].typ = (&NTI151);
TMP0[3].name = "name";
TMP49[2] = &TMP0[4];
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(Exception, message);
TMP0[4].typ = (&NTI149);
TMP0[4].name = "msg";
TMP49[3] = &TMP0[5];
TMP0[5].kind = 1;
TMP0[5].offset = offsetof(Exception, trace);
TMP0[5].typ = (&NTI149);
TMP0[5].name = "trace";
TMP0[1].len = 4; TMP0[1].kind = 2; TMP0[1].sons = &TMP49[0];
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];
NTI23001.size = sizeof(Overflowerror3443*);
NTI23001.kind = 22;
NTI23001.base = (&NTI3443);
NTI23001.marker = TMP51;
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];
NTI22401.size = sizeof(Valueerror3449*);
NTI22401.kind = 22;
NTI22401.base = (&NTI3449);
NTI22401.marker = TMP130;
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];
NTI78401.size = sizeof(Ioerror3431*);
NTI78401.kind = 22;
NTI78401.base = (&NTI3431);
NTI78401.marker = TMP144;
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 = TMP831;
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];
NTI19001.size = sizeof(Reraiseerror3463*);
NTI19001.kind = 22;
NTI19001.base = (&NTI3463);
NTI19001.marker = TMP979;
NTI27420.size = sizeof(TY27420);
NTI27420.kind = 16;
NTI27420.base = (&NTI108);
NTI27420.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;
NTI13002.size = sizeof(void*);
NTI13002.kind = 18;
NTI13002.base = 0;
NTI13002.flags = 3;
TMP0[13].len = 0; TMP0[13].kind = 2;
NTI13002.node = &TMP0[13];
NTI13004.size = sizeof(FILE*);
NTI13004.kind = 21;
NTI13004.base = (&NTI13002);
NTI13004.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];
NTI116812.size = sizeof(Oserror3433*);
NTI116812.kind = 22;
NTI116812.base = (&NTI3433);
NTI116812.marker = TMP1142;
NTI3455.size = sizeof(Indexerror3455);
NTI3455.kind = 17;
NTI3455.base = (&NTI3427);
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI3455.node = &TMP0[16];
NTI125816.size = sizeof(Indexerror3455*);
NTI125816.kind = 22;
NTI125816.base = (&NTI3455);
NTI125816.marker = TMP1145;
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];
NTI86401.size = sizeof(Assertionerror3447*);
NTI86401.kind = 22;
NTI86401.base = (&NTI3447);
NTI86401.marker = TMP2160;
NTI13008.size = sizeof(int);
NTI13008.kind = 34;
NTI13008.base = 0;
NTI13008.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;
NTI517225.size = sizeof(TY517225*);
NTI517225.kind = 24;
NTI517225.base = (&NTI5811);
NTI517225.flags = 2;
NTI517225.marker = TMP5003;
}

