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

#include <sys/mman.h>

#include <stdio.h>

#include <stdlib.h>

#include <errno.h>

#include <string.h>

#include <setjmp.h>

#include <signal.h>

#include <dlfcn.h>
typedef struct E_Base E_Base;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tbigchunk22840 tbigchunk22840;
typedef struct tbasechunk22836 tbasechunk22836;
typedef struct tsmallchunk22838 tsmallchunk22838;
typedef struct tfreecell22828 tfreecell22828;
typedef struct tgcheap43216 tgcheap43216;
typedef struct tcellseq41306 tcellseq41306;
typedef struct tcell41290 tcell41290;
typedef struct tcellset41302 tcellset41302;
typedef struct tpagedesc41298 tpagedesc41298;
typedef struct tmemregion23610 tmemregion23610;
typedef struct tllchunk23604 tllchunk23604;
typedef struct tintset22815 tintset22815;
typedef struct ttrunk22811 ttrunk22811;
typedef struct tavlnode23608 tavlnode23608;
typedef struct tgcstat43214 tgcstat43214;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct eoutofmemory2457 eoutofmemory2457;
typedef struct esystem2431 esystem2431;
typedef struct esynch2429 esynch2429;
typedef struct TNimObject TNimObject;
typedef struct TSafePoint TSafePoint;
typedef struct eio2433 eio2433;
typedef struct enoexceptiontoreraise2467 enoexceptiontoreraise2467;
typedef struct TY10665 TY10665;
typedef struct EOverflow EOverflow;
typedef struct earithmetic2441 earithmetic2441;
typedef struct einvalidindex2459 einvalidindex2459;
typedef struct eoutofrange2463 eoutofrange2463;
typedef struct einvalidvalue2453 einvalidvalue2453;
typedef struct einvalidfield2461 einvalidfield2461;
typedef struct einvalidobjectconversion2471 einvalidobjectconversion2471;
typedef struct einvalidobjectassignment2469 einvalidobjectassignment2469;
typedef struct EDivByZero EDivByZero;
typedef struct EFloatInvalidOp EFloatInvalidOp;
typedef struct efloatingpoint2473 efloatingpoint2473;
typedef struct EFloatOverflow EFloatOverflow;
typedef struct EFloatUnderflow EFloatUnderflow;
typedef struct treprclosure76239 treprclosure76239;
typedef struct tslice79092 tslice79092;
typedef struct EAssertionFailed EAssertionFailed;
typedef struct einvalidkey2455 einvalidkey2455;
typedef struct eos2435 eos2435;
typedef N_NIMCALL_PTR(NIM_BOOL, TY6815) (E_Base* e);
typedef N_NIMCALL_PTR(NIM_BOOL, TY6820) (E_Base* e);
typedef N_NIMCALL_PTR(void, TY6825) (void);
struct  TGenericSeq  {
NI len;
NI reserved;
};
struct  NimStringDesc  {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct  tbasechunk22836  {
NI Prevsize;
NI Size;
NIM_BOOL Used;
};
struct  tbigchunk22840  {
  tbasechunk22836 Sup;
tbigchunk22840* Next;
tbigchunk22840* Prev;
NI Align;
NF Data;
};
struct  tsmallchunk22838  {
  tbasechunk22836 Sup;
tsmallchunk22838* Next;
tsmallchunk22838* Prev;
tfreecell22828* Freelist;
NI Free;
NI Acc;
NF Data;
};
struct  tcellseq41306  {
NI Len;
NI Cap;
tcell41290** D;
};
struct  tcellset41302  {
NI Counter;
NI Max;
tpagedesc41298* Head;
tpagedesc41298** Data;
};
typedef tsmallchunk22838* TY23622[512];
typedef ttrunk22811* ttrunkbuckets22813[256];
struct  tintset22815  {
ttrunkbuckets22813 Data;
};
struct  tmemregion23610  {
NI Minlargeobj;
NI Maxlargeobj;
TY23622 Freesmallchunks;
tllchunk23604* Llmem;
NI Currmem;
NI Maxmem;
NI Freemem;
NI Lastsize;
tbigchunk22840* Freechunkslist;
tintset22815 Chunkstarts;
tavlnode23608* Root;
tavlnode23608* Deleted;
tavlnode23608* Last;
tavlnode23608* Freeavlnodes;
};
struct  tgcstat43214  {
NI Stackscans;
NI Cyclecollections;
NI Maxthreshold;
NI Maxstacksize;
NI Maxstackcells;
NI Cycletablesize;
NI64 Maxpause;
};
struct  tgcheap43216  {
void* Stackbottom;
NI Cyclethreshold;
tcellseq41306 Zct;
tcellseq41306 Decstack;
tcellset41302 Cycleroots;
tcellseq41306 Tempstack;
NI Recgclock;
tmemregion23610 Region;
tgcstat43214 Stat;
};
typedef NI TY22818[16];
struct  ttrunk22811  {
ttrunk22811* Next;
NI Key;
TY22818 Bits;
};
struct  tllchunk23604  {
NI Size;
NI Acc;
tllchunk23604* Next;
};
struct  tfreecell22828  {
tfreecell22828* Next;
NI Zerofield;
};
typedef tavlnode23608* TY23614[2];
struct  tavlnode23608  {
TY23614 Link;
NI Key;
NI Upperbound;
NI Level;
};
typedef N_NIMCALL_PTR(void, TY2289) (void* p, NI op);
struct  TNimType  {
NI size;
NU8 kind;
NU8 flags;
TNimType* base;
TNimNode* node;
void* finalizer;
TY2289 marker;
};
typedef NimStringDesc* TY73211[5];
struct  TNimObject  {
TNimType* m_type;
};
struct  E_Base  {
  TNimObject Sup;
E_Base* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
};
struct  esynch2429  {
  E_Base Sup;
};
struct  esystem2431  {
  esynch2429 Sup;
};
struct  eoutofmemory2457  {
  esystem2431 Sup;
};
struct  tcell41290  {
NI Refcount;
TNimType* Typ;
};
struct  tpagedesc41298  {
tpagedesc41298* Next;
NI Key;
TY22818 Bits;
};
struct  TNimNode  {
NU8 kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef N_NIMCALL_PTR(void, TFinalizer) (void* self);
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClPrc) (E_Base* e, void* ClEnv);
void* ClEnv;
} TY11626;
struct  TSafePoint  {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
TY11626 raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TMP17) (E_Base* e);
struct  eio2433  {
  esystem2431 Sup;
};
struct  enoexceptiontoreraise2467  {
  esynch2429 Sup;
};
struct  earithmetic2441  {
  esynch2429 Sup;
};
struct  EOverflow  {
  earithmetic2441 Sup;
};
typedef N_NOCONV_PTR(void, TY12403) (void);
typedef N_NOCONV_PTR(void, tsignalhandler16611) (int sig);
typedef N_NIMCALL_PTR(void, TY12801) (NimStringDesc* msg);
struct  einvalidindex2459  {
  esynch2429 Sup;
};
struct  eoutofrange2463  {
  esynch2429 Sup;
};
typedef NIM_CHAR TY71782[60];
struct  einvalidvalue2453  {
  esynch2429 Sup;
};
typedef TFrame* TY13601[128];
struct  einvalidfield2461  {
  esynch2429 Sup;
};
struct  einvalidobjectconversion2471  {
  esynch2429 Sup;
};
struct  einvalidobjectassignment2469  {
  esynch2429 Sup;
};
struct  EDivByZero  {
  earithmetic2441 Sup;
};
struct  efloatingpoint2473  {
  esynch2429 Sup;
};
struct  EFloatInvalidOp  {
  efloatingpoint2473 Sup;
};
struct  EFloatOverflow  {
  efloatingpoint2473 Sup;
};
struct  EFloatUnderflow  {
  efloatingpoint2473 Sup;
};
typedef NI8 tnimset21402[8192];
struct  treprclosure76239  {
tcellset41302 Marked;
NI Recdepth;
NI Indent;
};
struct  tslice79092  {
NI A;
NI B;
};
struct  EAssertionFailed  {
  esynch2429 Sup;
};
struct  einvalidkey2455  {
  einvalidvalue2453 Sup;
};
struct  eos2435  {
  esystem2431 Sup;
NI32 Errorcode;
};
struct TY10665 {
  TGenericSeq Sup;
  NimStringDesc* data[SEQ_DECL_SIZE];
};
N_NIMCALL(NI, min_5449)(NI x, NI y);
N_NIMCALL(NI8, min_5456)(NI8 x, NI8 y);
N_NIMCALL(NI16, min_5463)(NI16 x, NI16 y);
N_NIMCALL(NI32, min_5470)(NI32 x, NI32 y);
N_NIMCALL(NI64, min_5477)(NI64 x, NI64 y);
N_NIMCALL(NI, max_5495)(NI x, NI y);
N_NIMCALL(NI8, max_5502)(NI8 x, NI8 y);
N_NIMCALL(NI16, max_5509)(NI16 x, NI16 y);
N_NIMCALL(NI32, max_5516)(NI32 x, NI32 y);
N_NIMCALL(NI64, max_5523)(NI64 x, NI64 y);
N_NIMCALL(NF, abs_5541)(NF x);
N_NIMCALL(NF, min_5548)(NF x, NF y);
N_NIMCALL(NF, max_5555)(NF x, NF y);
N_NIMCALL(void, add_6843)(NimStringDesc** x, NCSTRING y);
N_NIMCALL(NI, abs_7409)(NI x);
N_NIMCALL(NI8, abs_7416)(NI8 x);
N_NIMCALL(NI16, abs_7424)(NI16 x);
N_NIMCALL(NI32, abs_7432)(NI32 x);
N_NIMCALL(NI64, abs_7440)(NI64 x);
static N_INLINE(void, listremove_27203)(tbigchunk22840** head_27209, tbigchunk22840* c_27212);
static N_INLINE(void, nimFrame)(TFrame* s);
static N_INLINE(void, popFrame)(void);
N_NIMCALL(NIM_BOOL, contains_27214)(tbigchunk22840* list_27218, tbigchunk22840* x_27220);
static N_INLINE(void, listadd_28435)(tbigchunk22840** head_28441, tbigchunk22840* c_28444);
static N_INLINE(void, listadd_31605)(tsmallchunk22838** head_31611, tsmallchunk22838* c_31614);
N_NIMCALL(NIM_BOOL, contains_31616)(tsmallchunk22838* list_31620, tsmallchunk22838* x_31622);
static N_INLINE(void, listremove_34403)(tsmallchunk22838** head_34409, tsmallchunk22838* c_34412);
N_NIMCALL(void, initgc_7601)(void);
N_NIMCALL(void, init_41394)(tcellseq41306* s, NI cap);
N_NOCONV(void*, alloc0_4616)(NI size);
N_NIMCALL(void*, alloc0_40017)(tmemregion23610* allocator, NI size);
N_NIMCALL(void*, alloc_39836)(tmemregion23610* allocator, NI size);
N_NIMCALL(void*, rawalloc_30704)(tmemregion23610* a, NI requestedsize);
static N_INLINE(NI, roundup_22868)(NI x, NI v);
N_NIMCALL(tsmallchunk22838*, getsmallchunk_30222)(tmemregion23610* a);
N_NIMCALL(tbigchunk22840*, getbigchunk_29418)(tmemregion23610* a, NI size);
N_NIMCALL(void, splitchunk_29211)(tmemregion23610* a, tbigchunk22840* c, NI size);
static N_INLINE(void, updateprevsize_26280)(tmemregion23610* a, tbigchunk22840* c, NI prevsize);
static N_INLINE(NIM_BOOL, isaccessible_26223)(tmemregion23610* a, void* p);
N_NIMCALL(NIM_BOOL, contains_25177)(tintset22815* s, NI key);
N_NIMCALL(ttrunk22811*, intsetget_25116)(tintset22815* t, NI key);
static N_INLINE(NI, pageindex_25440)(void* p);
N_NIMCALL(void, incl_25204)(tmemregion23610* a, tintset22815* s, NI key);
N_NIMCALL(ttrunk22811*, intsetput_25144)(tmemregion23610* a, tintset22815* t, NI key);
N_NIMCALL(void*, llalloc_23859)(tmemregion23610* a, NI size);
static N_INLINE(void*, osallocpages_22614)(NI size);
N_NOINLINE(void, raiseoutofmem_22059)(void);
static N_INLINE(void, inccurrmem_23803)(tmemregion23610* a, NI bytes);
static N_INLINE(NI, pageindex_25434)(tbasechunk22836* c);
N_NIMCALL(tbigchunk22840*, requestoschunks_25454)(tmemregion23610* a, NI size);
N_NIMCALL(void, add_24788)(tmemregion23610* a, tavlnode23608** t, NI key, NI upperbound);
N_NIMCALL(tavlnode23608*, allocavlnode_24042)(tmemregion23610* a, NI key, NI upperbound);
N_NIMCALL(void, skew_24760)(tavlnode23608** t);
N_NIMCALL(void, split_24766)(tavlnode23608** t);
N_NIMCALL(void, init_41411)(tcellset41302* s);
static N_INLINE(void, initallocator_7801)(void);
static N_INLINE(void, initStackBottom)(void);
N_NOINLINE(void, setStackBottom)(void* thestackbottom);
N_NIMCALL(NI, cmp_3490)(NimStringDesc* x, NimStringDesc* y);
N_NIMCALL(NIM_BOOL, open_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, dooperation_45019)(void* p, NU8 op);
static N_INLINE(tcell41290*, usrtocell_44643)(void* usr);
static N_INLINE(void, decref_46602)(tcell41290* c);
static N_INLINE(void, rtladdzct_46202)(tcell41290* c);
N_NOINLINE(void, addzct_44618)(tcellseq41306* s, tcell41290* c);
static N_INLINE(void, add_41366)(tcellseq41306* s, tcell41290* c);
N_NOCONV(void*, alloc_4601)(NI size);
N_NOCONV(void, dealloc_4645)(void* p);
N_NIMCALL(void, dealloc_40024)(tmemregion23610* allocator, void* p);
N_NIMCALL(void, rawdealloc_37019)(tmemregion23610* a, void* p);
static N_INLINE(tbasechunk22836*, pageaddr_25446)(void* p);
static N_INLINE(NIM_BOOL, issmallchunk_25349)(tbasechunk22836* c);
N_NIMCALL(void, freebigchunk_26404)(tmemregion23610* a, tbigchunk22840* c_26408);
static N_INLINE(NIM_BOOL, chunkunused_25358)(tbasechunk22836* c);
N_NIMCALL(void, excl_25216)(tintset22815* s, NI key);
N_NIMCALL(void, freeoschunks_26008)(tmemregion23610* a, void* p, NI size);
static N_INLINE(void, osdeallocpages_22621)(void* p, NI size);
static N_INLINE(void, deccurrmem_23825)(tmemregion23610* a, NI bytes);
N_NIMCALL(void, del_25002)(tmemregion23610* a, tavlnode23608** t, NI x);
static N_INLINE(void, deallocavlnode_24604)(tmemregion23610* a, tavlnode23608* n);
static N_INLINE(NIM_BOOL, canbecycleroot_44662)(tcell41290* c);
static N_INLINE(void, rtladdcycleroot_45435)(tcell41290* c);
N_NOINLINE(void, incl_42055)(tcellset41302* s, tcell41290* cell);
N_NIMCALL(tpagedesc41298*, cellsetput_41846)(tcellset41302* t, NI key);
static N_INLINE(NI, nexttry_41445)(NI h, NI maxhash);
N_NIMCALL(void, cellsetenlarge_41804)(tcellset41302* t);
N_NIMCALL(void, cellsetrawinsert_41477)(tcellset41302 t, tpagedesc41298** data, tpagedesc41298* desc);
N_NIMCALL(void, markgray_60203)(tcell41290* s);
N_NIMCALL(void, forallchildren_45015)(tcell41290* cell, NU8 op);
static N_INLINE(void*, celltousr_44624)(tcell41290* cell);
N_NIMCALL(void, forallchildrenaux_45023)(void* dest, TNimType* mt, NU8 op);
N_NIMCALL(void, forallslotsaux_49206)(void* dest, TNimNode* n, NU8 op);
N_NIMCALL(TNimNode*, selectbranch_21808)(void* aa, TNimNode* n);
N_NIMCALL(NI, getdiscriminant_21520)(void* aa, TNimNode* n);
N_NIMCALL(void, scan_60602)(tcell41290* s);
N_NIMCALL(void, scanblack_60402)(tcell41290* s);
N_NIMCALL(void, collectwhite_60802)(tcell41290* s);
N_NIMCALL(NIM_BOOL, contains_42009)(tcellset41302 s, tcell41290* cell);
N_NIMCALL(tpagedesc41298*, cellsetget_41451)(tcellset41302 t, NI key);
N_NIMCALL(void, freecycliccell_59417)(tgcheap43216* gch, tcell41290* c);
N_NIMCALL(void, preparedealloc_45208)(tcell41290* cell);
N_NIMCALL(void, TMP9)(void* p, NI op);
N_NIMCALL(void, TMP10)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(void*, rawnewobj_50802)(TNimType* typ, NI size, tgcheap43216* gch);
N_NIMCALL(void, collectct_45008)(tgcheap43216* gch);
static N_INLINE(NI, getoccupiedmem_41232)(tmemregion23610* a);
N_NIMCALL(void, collectctbody_67607)(tgcheap43216* gch);
N_NOINLINE(NI, stacksize_65008)(void);
static N_INLINE(void, prepareforinteriorpointerchecking_38678)(tmemregion23610* a);
N_NIMCALL(NI, lowgauge_24614)(tavlnode23608* n);
N_NIMCALL(NI, highgauge_24637)(tavlnode23608* n);
N_CDECL(void, markstackandregisters_65238)(tgcheap43216* gch);
static N_INLINE(void, gcmark_63616)(tgcheap43216* gch, void* p);
N_NIMCALL(void*, interiorallocatedptr_38683)(tmemregion23610* a, void* p);
N_NIMCALL(tavlnode23608*, inrange_24701)(tavlnode23608* root, NI key);
N_NIMCALL(void, markthreadstacks_64204)(tgcheap43216* gch);
N_NIMCALL(NIM_BOOL, collectzct_63008)(tgcheap43216* gch);
N_NIMCALL(void, excl_42084)(tcellset41302* s, tcell41290* cell);
N_NIMCALL(void, collectcycles_63221)(tgcheap43216* gch);
N_NIMCALL(void, markroots_61003)(tgcheap43216* gch);
N_NIMCALL(void, collectroots_63201)(tgcheap43216* gch);
N_NIMCALL(void, cellsetreset_49201)(tcellset41302* s);
N_NIMCALL(void, deinit_41420)(tcellset41302* s);
N_NIMCALL(NI, getoccupiedmem_5261)(void);
N_NIMCALL(NI, gettotalmem_5265)(void);
N_NIMCALL(NI, getfreemem_5263)(void);
N_NIMCALL(void, unmarkstackandregisters_67403)(tgcheap43216* gch);
static N_INLINE(void, addnewobjtozct_50278)(tcell41290* res, tgcheap43216* gch);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
N_NIMCALL(void, raiseException)(E_Base* e, NCSTRING ename);
N_NIMCALL(void, rawwritestacktrace_14201)(NimStringDesc** s);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
static N_INLINE(NI, resize_70601)(NI old);
N_NIMCALL(void*, growobj_59410)(void* old, NI newsize);
N_NIMCALL(void*, growobj_56404)(void* old, NI newsize, tgcheap43216* gch);
N_NIMCALL(void, auxwritestacktrace_13605)(TFrame* f, NimStringDesc** s);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, mnewString)(NI len);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newlen);
N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
N_NIMCALL(void, raiseexceptionaux_14602)(E_Base* e);
static N_INLINE(void, pushCurrentException)(E_Base* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incref_47027)(tcell41290* c);
N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass);
N_NIMCALL(void, showerrormessage_13007)(NCSTRING data);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len);
N_NIMCALL(void, writetostderr_13001)(NCSTRING msg);
N_NIMCALL(void, write_10475)(FILE* f, NCSTRING c);
static N_INLINE(void, quitordebug_14419)(void);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, open_10211)(FILE** f, int filehandle, NU8 mode);
N_NIMCALL(FILE*, open_10217)(NimStringDesc* filename, NU8 mode, NI bufsize);
N_NIMCALL(void, TMP21)(void* p, NI op);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
N_NIMCALL(NIM_BOOL, reopen_10420)(FILE* f, NimStringDesc* filename, NU8 mode);
N_NIMCALL(NIM_BOOL, endoffile_10428)(FILE* f);
N_NIMCALL(NimStringDesc*, readall_10437)(FILE* file);
N_NIMCALL(NI, rawfilesize_72885)(FILE* file);
N_NIMCALL(NimStringDesc*, readallfile_72892)(FILE* file, NI len);
N_NIMCALL(NI, readbuffer_10627)(FILE* f, void* buffer, NI len);
N_NOINLINE(void, raiseeio_72205)(NimStringDesc* msg);
N_NIMCALL(NimStringDesc*, readallbuffer_72876)(FILE* file);
N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
N_NIMCALL(NimStringDesc*, readfile_10440)(NimStringDesc* filename);
static N_INLINE(void, pushSafePoint)(TSafePoint* s);
N_NIMCALL(NimStringDesc*, readallfile_72901)(FILE* file);
static N_INLINE(void, popSafePoint)(void);
static N_INLINE(void, setFrame)(TFrame* s);
N_NIMCALL(void, reraiseException)(void);
N_NIMCALL(void, TMP25)(void* p, NI op);
N_NIMCALL(void, writefile_10443)(NimStringDesc* filename, NimStringDesc* content);
N_NIMCALL(void, write_10463)(FILE* f, NimStringDesc* s);
N_NIMCALL(NI, writebuffer_10646)(FILE* f, void* buffer, NI len);
N_NIMCALL(void, write_10447)(FILE* f, NF32 r);
N_NIMCALL(void, write_10451)(FILE* f, NI i);
N_NIMCALL(void, write_10455)(FILE* f, NI64 i);
N_NIMCALL(void, write_10459)(FILE* f, NF r);
N_NIMCALL(void, write_10467)(FILE* f, NIM_BOOL b);
N_NIMCALL(void, write_10471)(FILE* f, NIM_CHAR c);
N_NIMCALL(void, write_10479)(FILE* f, NimStringDesc** a, NI aLen0);
N_NIMCALL(NimStringDesc*, readline_10484)(FILE* f);
N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line);
N_NIMCALL(NI64, getfilesize_10608)(FILE* f);
N_NIMCALL(NI64, getfilepos_10655)(FILE* f);
N_NIMCALL(void, setfilepos_10651)(FILE* f, NI64 pos);
N_NIMCALL(NI, readbytes_10611)(FILE* f, NI8* a, NI aLen0, NI start, NI len);
N_NIMCALL(NI, readchars_10619)(FILE* f, NIM_CHAR* a, NI aLen0, NI start, NI len);
N_NIMCALL(NI, writebytes_10632)(FILE* f, NI8* a, NI aLen0, NI start, NI len);
N_NIMCALL(NI, writechars_10639)(FILE* f, NIM_CHAR* a, NI aLen0, NI start, NI len);
N_NIMCALL(TY10665*, cstringarraytoseq_10661)(NCSTRING* a, NI len);
N_NIMCALL(void, TMP34)(void* p, NI op);
N_NIMCALL(void*, newSeq)(TNimType* typ, NI len);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
N_NIMCALL(void, TMP35)(void* p, NI op);
N_NIMCALL(NI, mulInt)(NI a, NI b);
N_NIMCALL(TY10665*, cstringarraytoseq_10721)(NCSTRING* a);
N_NIMCALL(NCSTRING*, alloccstringarray_10801)(NimStringDesc** a, NI aLen0);
N_NIMCALL(void, dealloccstringarray_10842)(NCSTRING* a);
static N_INLINE(NI, atomicinc_11001)(NI* memloc, NI x);
static N_INLINE(NI, atomicdec_11006)(NI* memloc, NI x);
static N_INLINE(NI, addandfetch_11201)(NI* p, NI val);
N_NIMCALL(void, setcontrolchook_12401)(TY12403 hook);
N_NIMCALL(void, writestacktrace_12406)(void);
N_NIMCALL(NimStringDesc*, getstacktrace_12601)(void);
N_NIMCALL(NimStringDesc*, getstacktrace_12603)(E_Base* e);
static N_INLINE(NI, chckIndx)(NI i, NI a, NI b);
N_NOINLINE(void, raiseIndexError)(void);
N_NIMCALL(void, TMP37)(void* p, NI op);
static N_INLINE(NI, chckRange)(NI i, NI a, NI b);
N_NOINLINE(void, raiseRangeError)(NI64 val);
N_NIMCALL(void, TMP39)(void* p, NI op);
N_NIMCALL(NimStringDesc*, nimInt64ToStr)(NI64 x);
static N_INLINE(NF, chckRangeF)(NF x, NF a, NF b);
N_NIMCALL(NimStringDesc*, nimFloatToStr)(NF x);
N_NOINLINE(void, chckNil)(void* p);
N_NIMCALL(void, TMP41)(void* p, NI op);
static N_INLINE(void, popCurrentException)(void);
N_NOCONV(void, signalHandler)(int sig);
static N_INLINE(void, gcdisable_6602)(void);
static N_INLINE(void, gcenable_6604)(void);
N_NIMCALL(void, registersignalhandler_16602)(void);
N_NOINLINE(void, raiseFieldError)(NimStringDesc* f);
N_NIMCALL(void, TMP50)(void* p, NI op);
N_NIMCALL(NI64, chckRange64)(NI64 i, NI64 a, NI64 b);
N_NIMCALL(void, chckObj)(TNimType* obj, TNimType* subclass);
N_NIMCALL(void, TMP52)(void* p, NI op);
static N_INLINE(void, chckObjAsgn)(TNimType* a, TNimType* b);
N_NIMCALL(void, TMP54)(void* p, NI op);
N_NOINLINE(void, raiseDivByZero)(void);
N_NIMCALL(void, TMP56)(void* p, NI op);
static N_INLINE(NI64, addInt64)(NI64 a, NI64 b);
static N_INLINE(NI64, subInt64)(NI64 a, NI64 b);
static N_INLINE(NI64, negInt64)(NI64 a);
static N_INLINE(NI64, absInt64)(NI64 a);
static N_INLINE(NI64, divInt64)(NI64 a, NI64 b);
static N_INLINE(NI64, modInt64)(NI64 a, NI64 b);
N_NIMCALL(NI64, mulInt64)(NI64 a, NI64 b);
static N_INLINE(NI, absInt)(NI a);
static N_INLINE(NI, subInt)(NI a, NI b);
static N_INLINE(NI, negInt)(NI a);
static N_INLINE(NI, divInt)(NI a, NI b);
static N_INLINE(NI, modInt)(NI a, NI b);
N_NOINLINE(void, raisefloatinvalidop_20221)(void);
N_NIMCALL(void, TMP58)(void* p, NI op);
static N_INLINE(void, nanCheck)(NF x);
N_NOINLINE(void, raisefloatoverflow_20424)(NF x);
N_NIMCALL(void, TMP60)(void* p, NI op);
N_NIMCALL(void, TMP62)(void* p, NI op);
static N_INLINE(void, infCheck)(NF x);
N_NIMCALL(void, rawwrite_21002)(FILE* f, NimStringDesc* s);
N_NOINLINE(void, nimLoadLibraryError)(NimStringDesc* path);
N_NOINLINE(void, procaddrerror_21011)(NCSTRING name);
N_NIMCALL(void, nimUnloadLibrary)(void* lib);
N_NIMCALL(void*, nimLoadLibrary)(NimStringDesc* path);
N_NIMCALL(void*, nimGetProcAddr)(void* lib, NCSTRING name);
N_NIMCALL(NI, countBits32)(NI32 n);
N_NIMCALL(NI, countBits64)(NI64 n);
N_NIMCALL(NI, cardSet)(tnimset21402 s, NI len);
N_NIMCALL(NI, getmaxmem_23850)(tmemregion23610* a);
N_NIMCALL(tavlnode23608*, find_24660)(tavlnode23608* root, NI key);
N_NIMCALL(void, lldeallocall_25091)(tmemregion23610* a);
static N_INLINE(NIM_BOOL, iscell_25418)(void* p);
N_NIMCALL(void, writefreelist_26238)(tmemregion23610* a);
N_NIMCALL(NIM_BOOL, isallocatedptr_30603)(tmemregion23610* a, void* p);
N_NIMCALL(NIM_BOOL, allocinv_30607)(tmemregion23610* a);
N_NIMCALL(void*, rawalloc0_37012)(tmemregion23610* a, NI requestedsize);
N_NIMCALL(NI, ptrsize_39614)(void* p);
N_NIMCALL(void*, realloc_41005)(tmemregion23610* allocator, void* p, NI newsize);
N_NIMCALL(void, deallocospages_41014)(tmemregion23610* a);
static N_INLINE(NI, getfreemem_41222)(tmemregion23610* a);
static N_INLINE(NI, gettotalmem_41227)(tmemregion23610* a);
static N_INLINE(NIM_BOOL, contains_41328)(tcellseq41306 s, tcell41290* c);
N_NIMCALL(void, deinit_41404)(tcellseq41306* s);
N_NIMCALL(NIM_BOOL, containsorincl_42130)(tcellset41302* s, tcell41290* cell);
N_NIMCALL(void, deallocospages_43601)(void);
N_NOCONV(void*, realloc_4631)(void* p, NI newsize);
N_NOCONV(void*, allocshared_4654)(NI size);
N_NOCONV(void*, allocshared0_4669)(NI size);
N_NOCONV(void, deallocshared_4698)(void* p);
N_NOCONV(void*, reallocshared_4684)(void* p, NI newsize);
N_NIMCALL(TNimType*, extGetCellType)(void* c);
N_NIMCALL(NI, getRefcount)(void* p);
N_NIMCALL(void, writecell_44818)(NCSTRING msg, tcell41290* c);
N_NOINLINE(NIM_BOOL, isonstack_45012)(void* p);
static N_INLINE(void, nimGCref)(void* p);
static N_INLINE(void, nimGCunref)(void* p);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NIMCALL(void, gcinvariant_50502)(void);
N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len);
N_NIMCALL(void, gcsetstrategy_6614)(NU8 strategy);
N_NIMCALL(void, gcenablemarkandsweep_6617)(void);
N_NIMCALL(void, gcdisablemarkandsweep_6619)(void);
N_NIMCALL(void, gcfullcollect_6606)(void);
N_NIMCALL(NimStringDesc*, gcgetstatistics_6621)(void);
static N_INLINE(NI, cmpStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI start_70824, NI last);
N_NIMCALL(NimStringDesc*, copyStr)(NimStringDesc* s, NI start);
N_NIMCALL(NI, hashString)(NimStringDesc* s);
static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c);
N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize);
N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen);
N_NIMCALL(NimStringDesc*, nimBoolToStr)(NIM_BOOL x);
N_NIMCALL(NimStringDesc*, nimCharToStr)(NIM_CHAR x);
N_NIMCALL(NI, binaryStrSearch)(NimStringDesc** x, NI xLen0, NimStringDesc* y);
static N_INLINE(void, rawEcho)(NimStringDesc* x);
static N_INLINE(void, rawEchoNL)(void);
N_NIMCALL(void, genericresetaux_74001)(void* dest, TNimNode* n);
N_NIMCALL(void, genericReset)(void* dest, TNimType* mt);
N_NIMCALL(void, genericassignaux_74006)(void* dest, void* src, TNimType* mt, NIM_BOOL shallow);
N_NIMCALL(void, genericassignaux_74012)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow);
N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(void, genericShallowAssign)(void* dest, void* src, TNimType* mt);
N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_74804, TNimType* mt);
N_NIMCALL(void, genericAssignOpenArray)(void* dest, void* src, NI len, TNimType* mt);
N_NIMCALL(void, objectInit)(void* dest, TNimType* typ);
N_NIMCALL(void, objectinitaux_74878)(void* dest, TNimNode* n);
N_NIMCALL(TNimNode*, selectbranch_75639)(NI discval, NI l, TNimNode** a);
N_NIMCALL(void, FieldDiscriminantCheck)(NI olddiscval, NI newdiscval, TNimNode** a, NI l);
N_NIMCALL(NimStringDesc*, reprAny)(void* p_76003, TNimType* typ);
N_NIMCALL(void, initreprclosure_76401)(treprclosure76239* cl);
N_NIMCALL(void, repraux_77224)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl);
N_NIMCALL(void, reprsetaux_76141)(NimStringDesc** result, void* p, TNimType* typ);
N_NIMCALL(void, addsetelem_76134)(NimStringDesc** result, NI elem, TNimType* typ);
N_NIMCALL(NimStringDesc*, reprEnum)(NI e_76080, TNimType* typ);
N_NIMCALL(NimStringDesc*, reprBool)(NIM_BOOL x);
N_NIMCALL(NimStringDesc*, reprChar)(NIM_CHAR x);
N_NIMCALL(NimStringDesc*, reprInt)(NI64 x);
N_NIMCALL(void, reprarray_77232)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl);
N_NIMCALL(void, reprrecord_77441)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl);
N_NIMCALL(void, reprrecordaux_77291)(NimStringDesc** result, void* p, TNimNode* n, treprclosure76239* cl);
N_NIMCALL(void, reprref_77468)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl);
N_NIMCALL(NimStringDesc*, reprPointer)(void* x);
N_NIMCALL(void, reprsequence_77261)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl);
N_NIMCALL(void, reprstraux_76033)(NimStringDesc** result, NimStringDesc* s);
N_NIMCALL(void, deinitreprclosure_76803)(treprclosure76239* cl);
N_NIMCALL(NimStringDesc*, reprFloat)(NF x);
N_NIMCALL(NimStringDesc*, HEX24_5001)(NU64 x);
N_NIMCALL(NimStringDesc*, reprStr)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, reprSet)(void* p, TNimType* typ);
N_NIMCALL(void, reprbreak_77202)(NimStringDesc** result, treprclosure76239* cl);
N_NIMCALL(NimStringDesc*, reprOpenArray)(void* p, NI length, TNimType* elemtyp);
static N_INLINE(E_Base*, getCurrentException)(void);
static N_INLINE(NimStringDesc*, getcurrentexceptionmsg_78236)(void);
N_NIMCALL(void, onraise_78258)(TY11626 action);
N_NIMCALL(void, quit_79030)(NimStringDesc* errormsg, NI errorcode);
static N_INLINE(NF, HEX2F_79038)(NI x, NI y);
static N_INLINE(NimStringDesc*, HEX5BHEX5D_79085)(NimStringDesc* s, tslice79092 x);
N_NIMCALL(NimStringDesc*, copyStrLast)(NimStringDesc* s, NI first, NI last);
N_NIMCALL(void, HEX5BHEX5DHEX3D_79100)(NimStringDesc** s, tslice79092 x, NimStringDesc* b);
N_NIMCALL(NimStringDesc*, gorge_79581)(NimStringDesc* command, NimStringDesc* input);
N_NIMCALL(NimStringDesc*, staticexec_79588)(NimStringDesc* command, NimStringDesc* input);
N_NOINLINE(void, raiseassert_79692)(NimStringDesc* msg);
N_NIMCALL(void, TMP117)(void* p, NI op);
N_NIMCALL(void, failedassertimpl_79821)(NimStringDesc* msg);
static N_INLINE(void, shallow_80420)(NimStringDesc** s_80423);
N_NIMCALL(void, insert_80801)(NimStringDesc** x, NimStringDesc* item, NI i);
N_NIMCALL(void, safeadd_81211)(NimStringDesc** x, NIM_CHAR y);
N_NIMCALL(void, safeadd_81217)(NimStringDesc** x, NimStringDesc* y);
N_NIMCALL(TNimObject, locals_81402)(void);
N_NIMCALL(void, TMP283)(void* p, NI op);
N_NIMCALL(void, TMP372)(void* p, NI op);
STRING_LITERAL(TMP2, "out of memory", 13);
STRING_LITERAL(TMP3, "rb", 2);
STRING_LITERAL(TMP4, "wb", 2);
STRING_LITERAL(TMP5, "w+b", 3);
STRING_LITERAL(TMP6, "r+b", 3);
STRING_LITERAL(TMP7, "ab", 2);
NIM_CONST TY73211 formatopen_73210 = {((NimStringDesc*) &TMP3),
((NimStringDesc*) &TMP4),
((NimStringDesc*) &TMP5),
((NimStringDesc*) &TMP6),
((NimStringDesc*) &TMP7)}
;
STRING_LITERAL(TMP11, "", 0);
STRING_LITERAL(TMP12, "No stack traceback available\012", 29);
STRING_LITERAL(TMP13, "Traceback (most recent call last)\012", 34);
STRING_LITERAL(TMP14, "(", 1);
STRING_LITERAL(TMP15, " calls omitted) ...", 19);
STRING_LITERAL(TMP16, "\012", 1);
STRING_LITERAL(TMP18, "Error: unhandled exception: ", 28);
STRING_LITERAL(TMP19, " [", 2);
STRING_LITERAL(TMP20, "]\012", 2);
STRING_LITERAL(TMP22, "cannot open: ", 13);
STRING_LITERAL(TMP23, "error while reading from file", 29);
STRING_LITERAL(TMP26, "no exception to reraise", 23);
STRING_LITERAL(TMP28, "cannot write string to file", 27);
STRING_LITERAL(TMP29, "true", 4);
STRING_LITERAL(TMP30, "false", 5);
STRING_LITERAL(TMP31, "EOF reached", 11);
STRING_LITERAL(TMP32, "cannot retrieve file position", 29);
STRING_LITERAL(TMP33, "cannot set file position", 24);
STRING_LITERAL(TMP36, "over- or underflow", 18);
STRING_LITERAL(TMP38, "index out of bounds", 19);
STRING_LITERAL(TMP40, "value out of range: ", 20);
STRING_LITERAL(TMP42, "attempt to write to a nil address", 33);
STRING_LITERAL(TMP43, "SIGINT: Interrupted by Ctrl-C.\012", 31);
STRING_LITERAL(TMP44, "SIGSEGV: Illegal storage access. (Attempt to read from nil?)\012", 61);
STRING_LITERAL(TMP45, "SIGABRT: Abnormal termination.\012", 31);
STRING_LITERAL(TMP46, "SIGFPE: Arithmetic error.\012", 26);
STRING_LITERAL(TMP47, "SIGILL: Illegal operation.\012", 27);
STRING_LITERAL(TMP48, "SIGBUS: Illegal storage access. (Attempt to read from nil?)\012", 60);
STRING_LITERAL(TMP49, "unknown signal\012", 15);
STRING_LITERAL(TMP51, " is not accessible", 18);
STRING_LITERAL(TMP53, "invalid object conversion", 25);
STRING_LITERAL(TMP55, "invalid object assignment", 25);
STRING_LITERAL(TMP57, "divison by zero", 15);
STRING_LITERAL(TMP59, "FPU operation caused a NaN result", 33);
STRING_LITERAL(TMP61, "FPU operation caused an overflow", 32);
STRING_LITERAL(TMP63, "FPU operations caused an underflow", 34);
STRING_LITERAL(TMP64, "could not load: ", 16);
STRING_LITERAL(TMP65, "could not import: ", 18);
STRING_LITERAL(TMP66, "[SYSASSERT] c.next == c", 23);
STRING_LITERAL(TMP67, "[SYSASSERT] c.size != s * MemAlign", 34);
STRING_LITERAL(TMP68, "[SYSASSERT] it.zeroField != 0", 29);
STRING_LITERAL(TMP69, "[GC] total memory: ", 19);
STRING_LITERAL(TMP70, "\012[GC] occupied memory: ", 23);
STRING_LITERAL(TMP71, "\012[GC] stack scans: ", 19);
STRING_LITERAL(TMP72, "\012[GC] stack cells: ", 19);
STRING_LITERAL(TMP73, "\012[GC] cycle collections: ", 25);
STRING_LITERAL(TMP74, "\012[GC] max threshold: ", 21);
STRING_LITERAL(TMP75, "\012[GC] zct capacity: ", 20);
STRING_LITERAL(TMP76, "\012[GC] max cycle table size: ", 28);
STRING_LITERAL(TMP77, "\012[GC] max stack size: ", 22);
STRING_LITERAL(TMP78, "\012[GC] max pause time [ms]: ", 27);
STRING_LITERAL(TMP79, "assignment to discriminant changes object branch", 48);
STRING_LITERAL(TMP80, "...", 3);
STRING_LITERAL(TMP81, "{", 1);
STRING_LITERAL(TMP82, ", ", 2);
STRING_LITERAL(TMP83, " (invalid data!)", 16);
STRING_LITERAL(TMP84, "\'", 1);
STRING_LITERAL(TMP85, "\\\"", 2);
STRING_LITERAL(TMP86, "\\\\", 2);
STRING_LITERAL(TMP87, "\\", 1);
STRING_LITERAL(TMP88, "}", 1);
STRING_LITERAL(TMP89, "[", 1);
STRING_LITERAL(TMP90, "]", 1);
STRING_LITERAL(TMP91, " = ", 3);
STRING_LITERAL(TMP92, ",\012", 2);
STRING_LITERAL(TMP93, "nil", 3);
STRING_LITERAL(TMP94, "ref ", 4);
STRING_LITERAL(TMP95, " --> ", 5);
STRING_LITERAL(TMP96, "\"", 1);
STRING_LITERAL(TMP97, "\\10\"\012\"", 6);
STRING_LITERAL(TMP98, "(invalid data!)", 15);
NI nim_program_result;
TY6815 globalraisehook_6819;
TY6820 localraisehook_6824;
TY6825 outofmemhook_6827;
TNimType strdesc_8005;
TNimType NTI2409; /* TObject */
TNimType NTI2425; /* E_Base */
TNimType NTI6816; /* ref E_Base */
TNimType NTI145; /* cstring */
TNimType NTI143; /* string */
TNimType NTI2429; /* ESynch */
TNimType NTI2431; /* ESystem */
TNimType NTI2457; /* EOutOfMemory */
TNimType NTI73401; /* ref EOutOfMemory */
TNimType NTI2433; /* EIO */
TNimType NTI10401; /* ref EIO */
TNimType NTI2467; /* ENoExceptionToReraise */
TNimType NTI15201; /* ref ENoExceptionToReraise */
TNimType NTI10665; /* seq[string] */
TNimType NTI2441; /* EArithmetic */
TNimType NTI2445; /* EOverflow */
TNimType NTI18601; /* ref EOverflow */
TY12801 errormessagewriter_12804;
TNimType NTI2459; /* EInvalidIndex */
TNimType NTI17201; /* ref EInvalidIndex */
TNimType NTI2463; /* EOutOfRange */
TNimType NTI17001; /* ref EOutOfRange */
TNimType NTI2453; /* EInvalidValue */
TNimType NTI18001; /* ref EInvalidValue */
TFrame* frameptr_13038;
TSafePoint* exchandler_13039;
E_Base* currexception_13041;
TY13601 tempframes_13604;
TNimType NTI2461; /* EInvalidField */
TNimType NTI17401; /* ref EInvalidField */
TNimType NTI2471; /* EInvalidObjectConversion */
TNimType NTI18201; /* ref EInvalidObjectConversion */
TNimType NTI2469; /* EInvalidObjectAssignment */
TNimType NTI18401; /* ref EInvalidObjectAssignment */
TNimType NTI2443; /* EDivByZero */
TNimType NTI18801; /* ref EDivByZero */
TNimType NTI2473; /* EFloatingPoint */
TNimType NTI2475; /* EFloatInvalidOp */
TNimType NTI20401; /* ref EFloatInvalidOp */
TNimType NTI2479; /* EFloatOverflow */
TNimType NTI20601; /* ref EFloatOverflow */
TNimType NTI2481; /* EFloatUnderflow */
TNimType NTI20801; /* ref EFloatUnderflow */
tavlnode23608 bottomdata_23638;
tavlnode23608* bottom_23639;
tgcheap43216 gch_43244;
TNimType NTI2449; /* EAssertionFailed */
TNimType NTI79801; /* ref EAssertionFailed */
TNimType NTI106; /* int */
TNimType NTI134; /* bool */
TNimType NTI2455; /* EInvalidKey */
TNimType NTI122042; /* ref EInvalidKey */
TNimType NTI10002; /* CFile */
TNimType NTI10004; /* TFile */
TNimType NTI10008; /* TFileHandle */
TNimType NTI4409; /* cint */
TNimType NTI2435; /* EOS */
TNimType NTI112; /* int32 */
TNimType NTI105208; /* ref EOS */

N_NIMCALL(NI, min_5449)(NI x, NI y) {
	NI result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI8, min_5456)(NI8 x, NI8 y) {
	NI8 result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI16, min_5463)(NI16 x, NI16 y) {
	NI16 result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI32, min_5470)(NI32 x, NI32 y) {
	NI32 result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI64, min_5477)(NI64 x, NI64 y) {
	NI64 result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI, max_5495)(NI x, NI y) {
	NI result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI8, max_5502)(NI8 x, NI8 y) {
	NI8 result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI16, max_5509)(NI16 x, NI16 y) {
	NI16 result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI32, max_5516)(NI32 x, NI32 y) {
	NI32 result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI64, max_5523)(NI64 x, NI64 y) {
	NI64 result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NF, abs_5541)(NF x) {
	NF result;
	result = 0;
	{
		if (!(x < 0.0)) goto LA3;
		result = -(x);
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NF, min_5548)(NF x, NF y) {
	NF result;
	result = 0;
	{
		if (!(x <= y)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NF, max_5555)(NF x, NF y) {
	NF result;
	result = 0;
	{
		if (!(y <= x)) goto LA3;
		result = x;
	}
	goto LA1;
	LA3: ;
	{
		result = y;
	}
	LA1: ;
	return result;
}

N_NIMCALL(void, add_6843)(NimStringDesc** x, NCSTRING y) {
	NI i;
	i = 0;
	while (1) {
		if (!!(((NU8)(y[i]) == (NU8)(0)))) goto LA1;
		(*x) = addChar((*x), y[i]);
		i += 1;
	} LA1: ;
}

N_NIMCALL(NI, abs_7409)(NI x) {
	NI result;
	result = 0;
	{
		if (!(x < 0)) goto LA3;
		result = ((NI32)-(x));
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI8, abs_7416)(NI8 x) {
	NI8 result;
	result = 0;
	{
		if (!(x < ((NI8) 0))) goto LA3;
		result = ((NI8)-(x));
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI16, abs_7424)(NI16 x) {
	NI16 result;
	result = 0;
	{
		if (!(x < ((NI16) 0))) goto LA3;
		result = ((NI16)-(x));
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI32, abs_7432)(NI32 x) {
	NI32 result;
	result = 0;
	{
		if (!(x < ((NI32) 0))) goto LA3;
		result = ((NI32)-(x));
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

N_NIMCALL(NI64, abs_7440)(NI64 x) {
	NI64 result;
	result = 0;
	{
		if (!(x < 0)) goto LA3;
		result = -(x);
	}
	goto LA1;
	LA3: ;
	{
		result = x;
	}
	LA1: ;
	return result;
}

static N_INLINE(void, nimFrame)(TFrame* s) {
	(*s).prev = frameptr_13038;
	frameptr_13038 = s;
}

static N_INLINE(void, popFrame)(void) {
	frameptr_13038 = (*frameptr_13038).prev;
}

static N_INLINE(void, listremove_27203)(tbigchunk22840** head_27209, tbigchunk22840* c_27212) {
	nimfr("listRemove", "alloc.nim")
	nimln(419, "alloc.nim");
	{
		nimln(419, "alloc.nim");
		if (!(c_27212 == (*head_27209))) goto LA3;
		nimln(420, "alloc.nim");
		(*head_27209) = (*c_27212).Next;
		nimln(422, "alloc.nim");
		{
			nimln(422, "alloc.nim");
			nimln(422, "alloc.nim");
			if (!!(((*head_27209) == NIM_NIL))) goto LA7;
			nimln(422, "alloc.nim");
			(*(*head_27209)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		nimln(425, "alloc.nim");
		(*(*c_27212).Prev).Next = (*c_27212).Next;
		nimln(426, "alloc.nim");
		{
			nimln(426, "alloc.nim");
			nimln(426, "alloc.nim");
			if (!!(((*c_27212).Next == NIM_NIL))) goto LA12;
			nimln(426, "alloc.nim");
			(*(*c_27212).Next).Prev = (*c_27212).Prev;
		}
		LA12: ;
	}
	LA1: ;
	nimln(427, "alloc.nim");
	(*c_27212).Next = NIM_NIL;
	nimln(428, "alloc.nim");
	(*c_27212).Prev = NIM_NIL;
	popFrame();
}

N_NIMCALL(NIM_BOOL, contains_27214)(tbigchunk22840* list_27218, tbigchunk22840* x_27220) {
	NIM_BOOL result;
	tbigchunk22840* it;
	nimfr("contains", "alloc.nim")
	result = 0;
	nimln(394, "alloc.nim");
	it = list_27218;
	nimln(395, "alloc.nim");
	while (1) {
		nimln(395, "alloc.nim");
		nimln(395, "alloc.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(396, "alloc.nim");
		{
			nimln(396, "alloc.nim");
			if (!(it == x_27220)) goto LA4;
			nimln(396, "alloc.nim");
			nimln(396, "alloc.nim");
			result = NIM_TRUE;
			goto BeforeRet;
		}
		LA4: ;
		nimln(397, "alloc.nim");
		it = (*it).Next;
	} LA1: ;
	BeforeRet: ;
	popFrame();
	return result;
}

static N_INLINE(void, listadd_28435)(tbigchunk22840** head_28441, tbigchunk22840* c_28444) {
	nimfr("listAdd", "alloc.nim")
	nimln(411, "alloc.nim");
	(*c_28444).Next = (*head_28441);
	nimln(412, "alloc.nim");
	{
		nimln(412, "alloc.nim");
		nimln(412, "alloc.nim");
		if (!!(((*head_28441) == NIM_NIL))) goto LA3;
		nimln(414, "alloc.nim");
		(*(*head_28441)).Prev = c_28444;
	}
	LA3: ;
	nimln(415, "alloc.nim");
	(*head_28441) = c_28444;
	popFrame();
}

static N_INLINE(void, listadd_31605)(tsmallchunk22838** head_31611, tsmallchunk22838* c_31614) {
	nimfr("listAdd", "alloc.nim")
	nimln(411, "alloc.nim");
	(*c_31614).Next = (*head_31611);
	nimln(412, "alloc.nim");
	{
		nimln(412, "alloc.nim");
		nimln(412, "alloc.nim");
		if (!!(((*head_31611) == NIM_NIL))) goto LA3;
		nimln(414, "alloc.nim");
		(*(*head_31611)).Prev = c_31614;
	}
	LA3: ;
	nimln(415, "alloc.nim");
	(*head_31611) = c_31614;
	popFrame();
}

N_NIMCALL(NIM_BOOL, contains_31616)(tsmallchunk22838* list_31620, tsmallchunk22838* x_31622) {
	NIM_BOOL result;
	tsmallchunk22838* it;
	nimfr("contains", "alloc.nim")
	result = 0;
	nimln(394, "alloc.nim");
	it = list_31620;
	nimln(395, "alloc.nim");
	while (1) {
		nimln(395, "alloc.nim");
		nimln(395, "alloc.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(396, "alloc.nim");
		{
			nimln(396, "alloc.nim");
			if (!(it == x_31622)) goto LA4;
			nimln(396, "alloc.nim");
			nimln(396, "alloc.nim");
			result = NIM_TRUE;
			goto BeforeRet;
		}
		LA4: ;
		nimln(397, "alloc.nim");
		it = (*it).Next;
	} LA1: ;
	BeforeRet: ;
	popFrame();
	return result;
}

static N_INLINE(void, listremove_34403)(tsmallchunk22838** head_34409, tsmallchunk22838* c_34412) {
	nimfr("listRemove", "alloc.nim")
	nimln(419, "alloc.nim");
	{
		nimln(419, "alloc.nim");
		if (!(c_34412 == (*head_34409))) goto LA3;
		nimln(420, "alloc.nim");
		(*head_34409) = (*c_34412).Next;
		nimln(422, "alloc.nim");
		{
			nimln(422, "alloc.nim");
			nimln(422, "alloc.nim");
			if (!!(((*head_34409) == NIM_NIL))) goto LA7;
			nimln(422, "alloc.nim");
			(*(*head_34409)).Prev = NIM_NIL;
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		nimln(425, "alloc.nim");
		(*(*c_34412).Prev).Next = (*c_34412).Next;
		nimln(426, "alloc.nim");
		{
			nimln(426, "alloc.nim");
			nimln(426, "alloc.nim");
			if (!!(((*c_34412).Next == NIM_NIL))) goto LA12;
			nimln(426, "alloc.nim");
			(*(*c_34412).Next).Prev = (*c_34412).Prev;
		}
		LA12: ;
	}
	LA1: ;
	nimln(427, "alloc.nim");
	(*c_34412).Next = NIM_NIL;
	nimln(428, "alloc.nim");
	(*c_34412).Prev = NIM_NIL;
	popFrame();
}

static N_INLINE(NI, roundup_22868)(NI x, NI v) {
	NI result;
	nimfr("roundup", "alloc.nim")
	result = 0;
	nimln(143, "alloc.nim");
	nimln(143, "alloc.nim");
	nimln(143, "alloc.nim");
	nimln(143, "alloc.nim");
	nimln(143, "alloc.nim");
	nimln(143, "alloc.nim");
	result = (NI)((NI32)(x + (NI32)(v - 1)) & (NI)((NU32) ~((NI32)(v - 1))));
	popFrame();
	return result;
}

N_NIMCALL(ttrunk22811*, intsetget_25116)(tintset22815* t, NI key) {
	ttrunk22811* result;
	ttrunk22811* it;
	nimfr("intSetGet", "alloc.nim")
	result = 0;
	nimln(256, "alloc.nim");
	nimln(256, "alloc.nim");
	it = (*t).Data[((NI)(key & 255))- 0];
	nimln(257, "alloc.nim");
	while (1) {
		nimln(257, "alloc.nim");
		nimln(257, "alloc.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(258, "alloc.nim");
		{
			nimln(258, "alloc.nim");
			if (!((*it).Key == key)) goto LA4;
			nimln(258, "alloc.nim");
			nimln(258, "alloc.nim");
			result = it;
			goto BeforeRet;
		}
		LA4: ;
		nimln(259, "alloc.nim");
		it = (*it).Next;
	} LA1: ;
	nimln(260, "alloc.nim");
	result = NIM_NIL;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, contains_25177)(tintset22815* s, NI key) {
	NIM_BOOL result;
	ttrunk22811* t;
	nimfr("contains", "alloc.nim")
	result = 0;
	nimln(271, "alloc.nim");
	nimln(271, "alloc.nim");
	t = intsetget_25116(s, (NI)((NU32)(key) >> (NU32)(9)));
	nimln(272, "alloc.nim");
	{
		NI u;
		nimln(272, "alloc.nim");
		nimln(272, "alloc.nim");
		if (!!((t == NIM_NIL))) goto LA3;
		nimln(273, "alloc.nim");
		nimln(273, "alloc.nim");
		u = (NI)(key & 511);
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		nimln(274, "alloc.nim");
		result = !(((NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] & (NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		nimln(276, "alloc.nim");
		result = NIM_FALSE;
	}
	LA1: ;
	popFrame();
	return result;
}

static N_INLINE(NI, pageindex_25440)(void* p) {
	NI result;
	nimfr("pageIndex", "alloc.nim")
	result = 0;
	nimln(341, "alloc.nim");
	nimln(341, "alloc.nim");
	result = (NI)((NU32)(((NI) (p))) >> (NU32)(12));
	popFrame();
	return result;
}

static N_INLINE(NIM_BOOL, isaccessible_26223)(tmemregion23610* a, void* p) {
	NIM_BOOL result;
	NI LOC1;
	nimfr("isAccessible", "alloc.nim")
	result = 0;
	nimln(391, "alloc.nim");
	nimln(391, "alloc.nim");
	LOC1 = 0;
	LOC1 = pageindex_25440(p);
	result = contains_25177(&(*a).Chunkstarts, LOC1);
	popFrame();
	return result;
}

static N_INLINE(void, updateprevsize_26280)(tmemregion23610* a, tbigchunk22840* c, NI prevsize) {
	tbasechunk22836* ri;
	nimfr("updatePrevSize", "alloc.nim")
	nimln(432, "alloc.nim");
	nimln(432, "alloc.nim");
	ri = ((tbasechunk22836*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	nimln(434, "alloc.nim");
	{
		NIM_BOOL LOC3;
		nimln(434, "alloc.nim");
		LOC3 = 0;
		LOC3 = isaccessible_26223(&(*a), ((void*) (ri)));
		if (!LOC3) goto LA4;
		nimln(435, "alloc.nim");
		(*ri).Prevsize = prevsize;
	}
	LA4: ;
	popFrame();
}

N_NOINLINE(void, raiseoutofmem_22059)(void) {
	nimfr("raiseOutOfMem", "mmdisp.nim")
	nimln(63, "mmdisp.nim");
	{
		nimln(63, "mmdisp.nim");
		nimln(63, "mmdisp.nim");
		if (!!((outofmemhook_6827 == NIM_NIL))) goto LA3;
		nimln(63, "mmdisp.nim");
		outofmemhook_6827();
	}
	LA3: ;
	nimln(64, "mmdisp.nim");
	printf("%s\012", (((NimStringDesc*) &TMP2))->data);
	nimln(65, "mmdisp.nim");
	exit(1);
	popFrame();
}

static N_INLINE(void*, osallocpages_22614)(NI size) {
	void* result;
	nimfr("osAllocPages", "alloc.nim")
	result = 0;
	nimln(44, "alloc.nim");
	nimln(45, "alloc.nim");
	result = mmap(NIM_NIL, size, ((int) 3), (NI32)(((NI32) 2) | MAP_ANONYMOUS), ((int) -1), 0);
	nimln(46, "alloc.nim");
	{
		NIM_BOOL LOC3;
		nimln(46, "alloc.nim");
		LOC3 = 0;
		nimln(46, "alloc.nim");
		LOC3 = (result == NIM_NIL);
		if (LOC3) goto LA4;
		nimln(46, "alloc.nim");
		LOC3 = (result == ((void*) -1));
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(47, "alloc.nim");
		raiseoutofmem_22059();
	}
	LA5: ;
	popFrame();
	return result;
}

static N_INLINE(void, inccurrmem_23803)(tmemregion23610* a, NI bytes) {
	nimfr("incCurrMem", "alloc.nim")
	nimln(195, "alloc.nim");
	(*a).Currmem += bytes;
	popFrame();
}

N_NIMCALL(void*, llalloc_23859)(tmemregion23610* a, NI size) {
	void* result;
	nimfr("llAlloc", "alloc.nim")
	result = 0;
	nimln(210, "alloc.nim");
	{
		NIM_BOOL LOC3;
		tllchunk23604* old;
		void* LOC7;
		nimln(210, "alloc.nim");
		LOC3 = 0;
		nimln(210, "alloc.nim");
		LOC3 = ((*a).Llmem == NIM_NIL);
		if (LOC3) goto LA4;
		nimln(210, "alloc.nim");
		LOC3 = ((*(*a).Llmem).Size < size);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(215, "alloc.nim");
		old = (*a).Llmem;
		nimln(216, "alloc.nim");
		nimln(216, "alloc.nim");
		LOC7 = 0;
		LOC7 = osallocpages_22614(4096);
		(*a).Llmem = ((tllchunk23604*) (LOC7));
		nimln(217, "alloc.nim");
		inccurrmem_23803(a, 4096);
		nimln(218, "alloc.nim");
		nimln(218, "alloc.nim");
		nimln(218, "alloc.nim");
		(*(*a).Llmem).Size = (NI32)(4096 - ((NI)sizeof(tllchunk23604)));
		nimln(219, "alloc.nim");
		nimln(219, "alloc.nim");
		(*(*a).Llmem).Acc = ((NI)sizeof(tllchunk23604));
		nimln(220, "alloc.nim");
		(*(*a).Llmem).Next = old;
	}
	LA5: ;
	nimln(221, "alloc.nim");
	nimln(221, "alloc.nim");
	result = ((void*) ((NI32)(((NI) ((*a).Llmem)) + (*(*a).Llmem).Acc)));
	nimln(222, "alloc.nim");
	(*(*a).Llmem).Size -= size;
	nimln(223, "alloc.nim");
	(*(*a).Llmem).Acc += size;
	nimln(224, "alloc.nim");
	zeroMem(result, size);
	popFrame();
	return result;
}

N_NIMCALL(ttrunk22811*, intsetput_25144)(tmemregion23610* a, tintset22815* t, NI key) {
	ttrunk22811* result;
	nimfr("intSetPut", "alloc.nim")
	result = 0;
	nimln(263, "alloc.nim");
	result = intsetget_25116(&(*t), key);
	nimln(264, "alloc.nim");
	{
		void* LOC5;
		nimln(264, "alloc.nim");
		if (!(result == NIM_NIL)) goto LA3;
		nimln(265, "alloc.nim");
		nimln(265, "alloc.nim");
		nimln(265, "alloc.nim");
		LOC5 = 0;
		LOC5 = llalloc_23859(a, ((NI)sizeof(ttrunk22811)));
		result = ((ttrunk22811*) (LOC5));
		nimln(266, "alloc.nim");
		nimln(266, "alloc.nim");
		(*result).Next = (*t).Data[((NI)(key & 255))- 0];
		nimln(267, "alloc.nim");
		nimln(267, "alloc.nim");
		(*t).Data[((NI)(key & 255))- 0] = result;
		nimln(268, "alloc.nim");
		(*result).Key = key;
	}
	LA3: ;
	popFrame();
	return result;
}

N_NIMCALL(void, incl_25204)(tmemregion23610* a, tintset22815* s, NI key) {
	ttrunk22811* t;
	NI u;
	nimfr("incl", "alloc.nim")
	nimln(279, "alloc.nim");
	nimln(279, "alloc.nim");
	t = intsetput_25144(a, s, (NI)((NU32)(key) >> (NU32)(9)));
	nimln(280, "alloc.nim");
	nimln(280, "alloc.nim");
	u = (NI)(key & 511);
	nimln(281, "alloc.nim");
	nimln(281, "alloc.nim");
	nimln(281, "alloc.nim");
	nimln(281, "alloc.nim");
	nimln(281, "alloc.nim");
	nimln(281, "alloc.nim");
	(*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] | (NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31))))));
	popFrame();
}

static N_INLINE(NI, pageindex_25434)(tbasechunk22836* c) {
	NI result;
	nimfr("pageIndex", "alloc.nim")
	result = 0;
	nimln(338, "alloc.nim");
	nimln(338, "alloc.nim");
	result = (NI)((NU32)(((NI) (c))) >> (NU32)(12));
	popFrame();
	return result;
}

N_NIMCALL(void, splitchunk_29211)(tmemregion23610* a, tbigchunk22840* c, NI size) {
	tbigchunk22840* rest;
	NI LOC1;
	nimfr("splitChunk", "alloc.nim")
	nimln(471, "alloc.nim");
	nimln(471, "alloc.nim");
	rest = ((tbigchunk22840*) ((NI)((NU32)(((NI) (c))) + (NU32)(size))));
	nimln(473, "alloc.nim");
	nimln(473, "alloc.nim");
	(*rest).Sup.Size = (NI32)((*c).Sup.Size - size);
	nimln(474, "alloc.nim");
	(*rest).Sup.Used = NIM_FALSE;
	nimln(475, "alloc.nim");
	(*rest).Next = NIM_NIL;
	nimln(476, "alloc.nim");
	(*rest).Prev = NIM_NIL;
	nimln(477, "alloc.nim");
	(*rest).Sup.Prevsize = size;
	nimln(478, "alloc.nim");
	updateprevsize_26280(a, c, (*rest).Sup.Size);
	nimln(479, "alloc.nim");
	(*c).Sup.Size = size;
	nimln(480, "alloc.nim");
	nimln(480, "alloc.nim");
	LOC1 = 0;
	LOC1 = pageindex_25434(&rest->Sup);
	incl_25204(a, &(*a).Chunkstarts, LOC1);
	nimln(481, "alloc.nim");
	listadd_28435(&(*a).Freechunkslist, rest);
	popFrame();
}

N_NIMCALL(tbigchunk22840*, requestoschunks_25454)(tmemregion23610* a, NI size) {
	tbigchunk22840* result;
	void* LOC1;
	NI nxt;
	tbasechunk22836* next;
	NI lastsize;
	NI prv;
	tbasechunk22836* prev;
	nimfr("requestOsChunks", "alloc.nim")
	result = 0;
	nimln(348, "alloc.nim");
	inccurrmem_23803(a, size);
	nimln(349, "alloc.nim");
	(*a).Freemem += size;
	nimln(350, "alloc.nim");
	nimln(350, "alloc.nim");
	LOC1 = 0;
	LOC1 = osallocpages_22614(size);
	result = ((tbigchunk22840*) (LOC1));
	nimln(353, "alloc.nim");
	(*result).Next = NIM_NIL;
	nimln(354, "alloc.nim");
	(*result).Prev = NIM_NIL;
	nimln(355, "alloc.nim");
	(*result).Sup.Used = NIM_FALSE;
	nimln(356, "alloc.nim");
	(*result).Sup.Size = size;
	nimln(358, "alloc.nim");
	nimln(358, "alloc.nim");
	nxt = (NI)((NU32)(((NI) (result))) + (NU32)(size));
	nimln(360, "alloc.nim");
	next = ((tbasechunk22836*) (nxt));
	nimln(361, "alloc.nim");
	{
		NI LOC4;
		NIM_BOOL LOC5;
		nimln(361, "alloc.nim");
		nimln(361, "alloc.nim");
		LOC4 = 0;
		LOC4 = pageindex_25434(next);
		LOC5 = 0;
		LOC5 = contains_25177(&(*a).Chunkstarts, LOC4);
		if (!LOC5) goto LA6;
		nimln(363, "alloc.nim");
		(*next).Prevsize = size;
	}
	LA6: ;
	nimln(365, "alloc.nim");
	nimln(365, "alloc.nim");
	{
		nimln(365, "alloc.nim");
		nimln(365, "alloc.nim");
		if (!!(((*a).Lastsize == 0))) goto LA10;
		lastsize = (*a).Lastsize;
	}
	goto LA8;
	LA10: ;
	{
		lastsize = 4096;
	}
	LA8: ;
	nimln(366, "alloc.nim");
	nimln(366, "alloc.nim");
	prv = (NI)((NU32)(((NI) (result))) - (NU32)(lastsize));
	nimln(368, "alloc.nim");
	prev = ((tbasechunk22836*) (prv));
	nimln(369, "alloc.nim");
	{
		NIM_BOOL LOC15;
		NI LOC16;
		nimln(369, "alloc.nim");
		LOC15 = 0;
		nimln(369, "alloc.nim");
		nimln(369, "alloc.nim");
		LOC16 = 0;
		LOC16 = pageindex_25434(prev);
		LOC15 = contains_25177(&(*a).Chunkstarts, LOC16);
		if (!(LOC15)) goto LA17;
		nimln(369, "alloc.nim");
		LOC15 = ((*prev).Size == lastsize);
		LA17: ;
		if (!LOC15) goto LA18;
		nimln(371, "alloc.nim");
		(*result).Sup.Prevsize = lastsize;
	}
	goto LA13;
	LA18: ;
	{
		nimln(373, "alloc.nim");
		(*result).Sup.Prevsize = 0;
	}
	LA13: ;
	nimln(374, "alloc.nim");
	(*a).Lastsize = size;
	popFrame();
	return result;
}

N_NIMCALL(tbigchunk22840*, getbigchunk_29418)(tmemregion23610* a, NI size) {
	tbigchunk22840* result;
	NI LOC15;
	nimfr("getBigChunk", "alloc.nim")
	result = 0;
	nimln(487, "alloc.nim");
	result = (*a).Freechunkslist;
	{
		nimln(489, "alloc.nim");
		while (1) {
			nimln(489, "alloc.nim");
			nimln(489, "alloc.nim");
			if (!!((result == NIM_NIL))) goto LA2;
			nimln(491, "alloc.nim");
			{
				nimln(491, "alloc.nim");
				if (!((*result).Sup.Size == size)) goto LA5;
				nimln(492, "alloc.nim");
				listremove_27203(&(*a).Freechunkslist, result);
				nimln(493, "alloc.nim");
				goto LA1;
			}
			goto LA3;
			LA5: ;
			{
				nimln(494, "alloc.nim");
				if (!(size < (*result).Sup.Size)) goto LA8;
				nimln(495, "alloc.nim");
				listremove_27203(&(*a).Freechunkslist, result);
				nimln(496, "alloc.nim");
				splitchunk_29211(a, result, size);
				nimln(497, "alloc.nim");
				goto LA1;
			}
			goto LA3;
			LA8: ;
			LA3: ;
			nimln(498, "alloc.nim");
			result = (*result).Next;
		} LA2: ;
		nimln(500, "alloc.nim");
		{
			nimln(500, "alloc.nim");
			if (!(size < 524288)) goto LA12;
			nimln(501, "alloc.nim");
			result = requestoschunks_25454(a, 524288);
			nimln(502, "alloc.nim");
			splitchunk_29211(a, result, size);
		}
		goto LA10;
		LA12: ;
		{
			nimln(504, "alloc.nim");
			result = requestoschunks_25454(a, size);
		}
		LA10: ;
	} LA1: ;
	nimln(505, "alloc.nim");
	(*result).Sup.Prevsize = 0;
	nimln(506, "alloc.nim");
	(*result).Sup.Used = NIM_TRUE;
	nimln(507, "alloc.nim");
	nimln(507, "alloc.nim");
	LOC15 = 0;
	LOC15 = pageindex_25434(&result->Sup);
	incl_25204(a, &(*a).Chunkstarts, LOC15);
	nimln(508, "alloc.nim");
	(*a).Freemem -= size;
	popFrame();
	return result;
}

N_NIMCALL(tsmallchunk22838*, getsmallchunk_30222)(tmemregion23610* a) {
	tsmallchunk22838* result;
	tbigchunk22840* res;
	nimfr("getSmallChunk", "alloc.nim")
	result = 0;
	nimln(511, "alloc.nim");
	res = getbigchunk_29418(a, 4096);
	nimln(514, "alloc.nim");
	result = ((tsmallchunk22838*) (res));
	popFrame();
	return result;
}

N_NIMCALL(tavlnode23608*, allocavlnode_24042)(tmemregion23610* a, NI key, NI upperbound) {
	tavlnode23608* result;
	nimfr("allocAvlNode", "alloc.nim")
	result = 0;
	nimln(227, "alloc.nim");
	{
		nimln(227, "alloc.nim");
		nimln(227, "alloc.nim");
		if (!!(((*a).Freeavlnodes == NIM_NIL))) goto LA3;
		nimln(228, "alloc.nim");
		result = (*a).Freeavlnodes;
		nimln(229, "alloc.nim");
		(*a).Freeavlnodes = (*(*a).Freeavlnodes).Link[(0)- 0];
	}
	goto LA1;
	LA3: ;
	{
		void* LOC6;
		nimln(231, "alloc.nim");
		nimln(231, "alloc.nim");
		nimln(231, "alloc.nim");
		LOC6 = 0;
		LOC6 = llalloc_23859(a, ((NI)sizeof(tavlnode23608)));
		result = ((tavlnode23608*) (LOC6));
	}
	LA1: ;
	nimln(232, "alloc.nim");
	(*result).Key = key;
	nimln(233, "alloc.nim");
	(*result).Upperbound = upperbound;
	nimln(234, "alloc.nim");
	(*result).Link[(0)- 0] = bottom_23639;
	nimln(235, "alloc.nim");
	(*result).Link[(1)- 0] = bottom_23639;
	nimln(236, "alloc.nim");
	(*result).Level = 1;
	popFrame();
	return result;
}

N_NIMCALL(void, skew_24760)(tavlnode23608** t) {
	nimfr("skew", "avltree.nim")
	nimln(40, "avltree.nim");
	{
		tavlnode23608* temp;
		nimln(40, "avltree.nim");
		if (!((*(*(*t)).Link[(0)- 0]).Level == (*(*t)).Level)) goto LA3;
		nimln(41, "avltree.nim");
		temp = (*t);
		nimln(42, "avltree.nim");
		(*t) = (*(*t)).Link[(0)- 0];
		nimln(43, "avltree.nim");
		(*temp).Link[(0)- 0] = (*(*t)).Link[(1)- 0];
		nimln(44, "avltree.nim");
		(*(*t)).Link[(1)- 0] = temp;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, split_24766)(tavlnode23608** t) {
	nimfr("split", "avltree.nim")
	nimln(47, "avltree.nim");
	{
		tavlnode23608* temp;
		nimln(47, "avltree.nim");
		if (!((*(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]).Level == (*(*t)).Level)) goto LA3;
		nimln(48, "avltree.nim");
		temp = (*t);
		nimln(49, "avltree.nim");
		(*t) = (*(*t)).Link[(1)- 0];
		nimln(50, "avltree.nim");
		(*temp).Link[(1)- 0] = (*(*t)).Link[(0)- 0];
		nimln(51, "avltree.nim");
		(*(*t)).Link[(0)- 0] = temp;
		nimln(52, "avltree.nim");
		(*(*t)).Level += 1;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, add_24788)(tmemregion23610* a, tavlnode23608** t, NI key, NI upperbound) {
	nimfr("add", "avltree.nim")
	nimln(55, "avltree.nim");
	{
		nimln(55, "avltree.nim");
		if (!((*t) == bottom_23639)) goto LA3;
		nimln(56, "avltree.nim");
		(*t) = allocavlnode_24042(a, key, upperbound);
	}
	goto LA1;
	LA3: ;
	{
		nimln(58, "avltree.nim");
		{
			nimln(58, "avltree.nim");
			if (!((NU32)(key) < (NU32)((*(*t)).Key))) goto LA8;
			nimln(59, "avltree.nim");
			add_24788(a, &(*(*t)).Link[(0)- 0], key, upperbound);
		}
		goto LA6;
		LA8: ;
		{
			nimln(60, "avltree.nim");
			if (!((NU32)((*(*t)).Key) < (NU32)(key))) goto LA11;
			nimln(61, "avltree.nim");
			add_24788(a, &(*(*t)).Link[(1)- 0], key, upperbound);
		}
		goto LA6;
		LA11: ;
		{
		}
		LA6: ;
		nimln(64, "avltree.nim");
		skew_24760(t);
		nimln(65, "avltree.nim");
		split_24766(t);
	}
	LA1: ;
	popFrame();
}

N_NIMCALL(void*, rawalloc_30704)(tmemregion23610* a, NI requestedsize) {
	void* result;
	NI size;
	nimfr("rawAlloc", "alloc.nim")
	result = 0;
	nimln(544, "alloc.nim");
	size = roundup_22868(requestedsize, 8);
	nimln(547, "alloc.nim");
	{
		NI s;
		tsmallchunk22838* c;
		nimln(547, "alloc.nim");
		nimln(547, "alloc.nim");
		nimln(547, "alloc.nim");
		nimln(547, "alloc.nim");
		if (!(size <= (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22838)) - 8)))) goto LA3;
		nimln(549, "alloc.nim");
		nimln(549, "alloc.nim");
		s = (NI32)(size / 8);
		nimln(550, "alloc.nim");
		c = (*a).Freesmallchunks[(s)- 0];
		nimln(551, "alloc.nim");
		{
			nimln(551, "alloc.nim");
			if (!(c == NIM_NIL)) goto LA7;
			nimln(552, "alloc.nim");
			c = getsmallchunk_30222(a);
			nimln(553, "alloc.nim");
			(*c).Freelist = NIM_NIL;
			nimln(555, "alloc.nim");
			(*c).Sup.Size = size;
			nimln(556, "alloc.nim");
			(*c).Acc = size;
			nimln(557, "alloc.nim");
			nimln(557, "alloc.nim");
			nimln(557, "alloc.nim");
			nimln(557, "alloc.nim");
			nimln(557, "alloc.nim");
			(*c).Free = (NI32)((NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22838)) - 8)) - size);
			nimln(558, "alloc.nim");
			(*c).Next = NIM_NIL;
			nimln(559, "alloc.nim");
			(*c).Prev = NIM_NIL;
			nimln(560, "alloc.nim");
			listadd_31605(&(*a).Freesmallchunks[(s)- 0], c);
			nimln(561, "alloc.nim");
			result = ((void*) (&(*c).Data));
		}
		goto LA5;
		LA7: ;
		{
			nimln(569, "alloc.nim");
			{
				nimln(569, "alloc.nim");
				if (!((*c).Freelist == NIM_NIL)) goto LA12;
				nimln(572, "alloc.nim");
				nimln(572, "alloc.nim");
				result = ((void*) ((NI)((NU32)(((NI) (&(*c).Data))) + (NU32)((*c).Acc))));
				nimln(573, "alloc.nim");
				(*c).Acc += size;
			}
			goto LA10;
			LA12: ;
			{
				nimln(575, "alloc.nim");
				result = ((void*) ((*c).Freelist));
				nimln(577, "alloc.nim");
				(*c).Freelist = (*(*c).Freelist).Next;
			}
			LA10: ;
			nimln(578, "alloc.nim");
			(*c).Free -= size;
		}
		LA5: ;
		nimln(582, "alloc.nim");
		{
			nimln(582, "alloc.nim");
			if (!((*c).Free < size)) goto LA17;
			nimln(584, "alloc.nim");
			listremove_34403(&(*a).Freesmallchunks[(s)- 0], c);
		}
		LA17: ;
	}
	goto LA1;
	LA3: ;
	{
		tbigchunk22840* c;
		nimln(590, "alloc.nim");
		nimln(590, "alloc.nim");
		nimln(590, "alloc.nim");
		nimln(590, "alloc.nim");
		size = roundup_22868((NI32)(requestedsize + (NI32)(((NI)sizeof(tbigchunk22840)) - 8)), 4096);
		nimln(592, "alloc.nim");
		c = getbigchunk_29418(a, size);
		nimln(596, "alloc.nim");
		result = ((void*) (&(*c).Data));
		nimln(598, "alloc.nim");
		{
			nimln(598, "alloc.nim");
			if (!((*a).Root == NIM_NIL)) goto LA22;
			nimln(598, "alloc.nim");
			(*a).Root = bottom_23639;
		}
		LA22: ;
		nimln(599, "alloc.nim");
		nimln(599, "alloc.nim");
		add_24788(a, &(*a).Root, ((NI) (result)), (NI)((NU32)(((NI) (result))) + (NU32)(size)));
	}
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(void*, alloc_39836)(tmemregion23610* allocator, NI size) {
	void* result;
	nimfr("alloc", "alloc.nim")
	result = 0;
	nimln(715, "alloc.nim");
	nimln(715, "alloc.nim");
	nimln(715, "alloc.nim");
	result = rawalloc_30704(allocator, (NI32)(size + ((NI)sizeof(tfreecell22828))));
	nimln(716, "alloc.nim");
	(*((tfreecell22828*) (result))).Zerofield = 1;
	nimln(718, "alloc.nim");
	nimln(718, "alloc.nim");
	nimln(718, "alloc.nim");
	result = ((void*) ((NI)((NU32)(((NI) (result))) + (NU32)(((NI)sizeof(tfreecell22828))))));
	popFrame();
	return result;
}

N_NIMCALL(void*, alloc0_40017)(tmemregion23610* allocator, NI size) {
	void* result;
	nimfr("alloc0", "alloc.nim")
	result = 0;
	nimln(721, "alloc.nim");
	result = alloc_39836(allocator, size);
	nimln(722, "alloc.nim");
	zeroMem(result, size);
	popFrame();
	return result;
}

N_NOCONV(void*, alloc0_4616)(NI size) {
	void* result;
	nimfr("alloc0", "alloc.nim")
	result = 0;
	nimln(781, "alloc.nim");
	result = alloc0_40017(&gch_43244.Region, size);
	popFrame();
	return result;
}

N_NIMCALL(void, init_41394)(tcellseq41306* s, NI cap) {
	void* LOC1;
	nimfr("init", "cellsets.nim")
	nimln(63, "cellsets.nim");
	(*s).Len = 0;
	nimln(64, "cellsets.nim");
	(*s).Cap = cap;
	nimln(65, "cellsets.nim");
	nimln(65, "cellsets.nim");
	nimln(65, "cellsets.nim");
	LOC1 = 0;
	LOC1 = alloc0_4616((NI32)(cap * 4));
	(*s).D = ((tcell41290**) (LOC1));
	popFrame();
}

N_NIMCALL(void, init_41411)(tcellset41302* s) {
	void* LOC1;
	nimfr("init", "cellsets.nim")
	nimln(79, "cellsets.nim");
	nimln(79, "cellsets.nim");
	LOC1 = 0;
	LOC1 = alloc0_4616(4096);
	(*s).Data = ((tpagedesc41298**) (LOC1));
	nimln(80, "cellsets.nim");
	(*s).Max = 1023;
	nimln(81, "cellsets.nim");
	(*s).Counter = 0;
	nimln(82, "cellsets.nim");
	(*s).Head = NIM_NIL;
	popFrame();
}

N_NIMCALL(void, initgc_7601)(void) {
	nimfr("initGC", "gc.nim")
	nimln(280, "gc.nim");
	gch_43244.Cyclethreshold = 4194304;
	nimln(281, "gc.nim");
	gch_43244.Stat.Stackscans = 0;
	nimln(282, "gc.nim");
	gch_43244.Stat.Cyclecollections = 0;
	nimln(283, "gc.nim");
	gch_43244.Stat.Maxthreshold = 0;
	nimln(284, "gc.nim");
	gch_43244.Stat.Maxstacksize = 0;
	nimln(285, "gc.nim");
	gch_43244.Stat.Maxstackcells = 0;
	nimln(286, "gc.nim");
	gch_43244.Stat.Cycletablesize = 0;
	nimln(288, "gc.nim");
	init_41394(&gch_43244.Zct, 1024);
	nimln(289, "gc.nim");
	init_41394(&gch_43244.Tempstack, 1024);
	nimln(290, "gc.nim");
	init_41411(&gch_43244.Cycleroots);
	nimln(291, "gc.nim");
	init_41394(&gch_43244.Decstack, 1024);
	popFrame();
}

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

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

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

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

static N_INLINE(tcell41290*, usrtocell_44643)(void* usr) {
	tcell41290* result;
	nimfr("usrToCell", "gc.nim")
	result = 0;
	nimln(118, "gc.nim");
	nimln(118, "gc.nim");
	nimln(118, "gc.nim");
	result = ((tcell41290*) ((NI)((NU32)(((NI) (usr))) - (NU32)(((NI)sizeof(tcell41290))))));
	popFrame();
	return result;
}

N_NOCONV(void*, alloc_4601)(NI size) {
	void* result;
	nimfr("alloc", "alloc.nim")
	result = 0;
	nimln(778, "alloc.nim");
	result = alloc_39836(&gch_43244.Region, size);
	popFrame();
	return result;
}

static N_INLINE(tbasechunk22836*, pageaddr_25446)(void* p) {
	tbasechunk22836* result;
	nimfr("pageAddr", "alloc.nim")
	result = 0;
	nimln(344, "alloc.nim");
	nimln(344, "alloc.nim");
	result = ((tbasechunk22836*) ((NI)(((NI) (p)) & -4096)));
	popFrame();
	return result;
}

static N_INLINE(NIM_BOOL, issmallchunk_25349)(tbasechunk22836* c) {
	NIM_BOOL result;
	nimfr("isSmallChunk", "alloc.nim")
	result = 0;
	nimln(309, "alloc.nim");
	nimln(309, "alloc.nim");
	nimln(309, "alloc.nim");
	nimln(309, "alloc.nim");
	nimln(309, "alloc.nim");
	nimln(309, "alloc.nim");
	result = ((*c).Size <= (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22838)) - 8)));
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

static N_INLINE(NIM_BOOL, chunkunused_25358)(tbasechunk22836* c) {
	NIM_BOOL result;
	nimfr("chunkUnused", "alloc.nim")
	result = 0;
	nimln(312, "alloc.nim");
	nimln(312, "alloc.nim");
	result = !((*c).Used);
	popFrame();
	return result;
}

N_NIMCALL(void, excl_25216)(tintset22815* s, NI key) {
	ttrunk22811* t;
	nimfr("excl", "alloc.nim")
	nimln(284, "alloc.nim");
	nimln(284, "alloc.nim");
	t = intsetget_25116(&(*s), (NI)((NU32)(key) >> (NU32)(9)));
	nimln(285, "alloc.nim");
	{
		NI u;
		nimln(285, "alloc.nim");
		nimln(285, "alloc.nim");
		if (!!((t == NIM_NIL))) goto LA3;
		nimln(286, "alloc.nim");
		nimln(286, "alloc.nim");
		u = (NI)(key & 511);
		nimln(287, "alloc.nim");
		nimln(287, "alloc.nim");
		nimln(287, "alloc.nim");
		nimln(287, "alloc.nim");
		nimln(287, "alloc.nim");
		nimln(288, "alloc.nim");
		nimln(288, "alloc.nim");
		(*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(((NI) (u))) >> (NU32)(5)))- 0] & (NI)((NU32) ~((NI)((NU32)(1) << (NU32)(((NI) ((NI)(((NI) (u)) & 31))))))));
	}
	LA3: ;
	popFrame();
}

static N_INLINE(void, osdeallocpages_22621)(void* p, NI size) {
	nimfr("osDeallocPages", "alloc.nim")
	nimln(50, "alloc.nim");
	munmap(p, size);
	popFrame();
}

static N_INLINE(void, deccurrmem_23825)(tmemregion23610* a, NI bytes) {
	nimfr("decCurrMem", "alloc.nim")
	nimln(198, "alloc.nim");
	nimln(198, "alloc.nim");
	(*a).Maxmem = (((*a).Maxmem >= (*a).Currmem) ? (*a).Maxmem : (*a).Currmem);
	nimln(199, "alloc.nim");
	(*a).Currmem -= bytes;
	popFrame();
}

N_NIMCALL(void, freeoschunks_26008)(tmemregion23610* a, void* p, NI size) {
	tbasechunk22836* c;
	NI nxt;
	tbasechunk22836* next;
	NI LOC7;
	nimfr("freeOsChunks", "alloc.nim")
	nimln(378, "alloc.nim");
	c = ((tbasechunk22836*) (p));
	nimln(379, "alloc.nim");
	nimln(379, "alloc.nim");
	nxt = (NI)((NU32)(((NI) (p))) + (NU32)((*c).Size));
	nimln(381, "alloc.nim");
	next = ((tbasechunk22836*) (nxt));
	nimln(382, "alloc.nim");
	{
		NI LOC3;
		NIM_BOOL LOC4;
		nimln(382, "alloc.nim");
		nimln(382, "alloc.nim");
		LOC3 = 0;
		LOC3 = pageindex_25434(next);
		LOC4 = 0;
		LOC4 = contains_25177(&(*a).Chunkstarts, LOC3);
		if (!LOC4) goto LA5;
		nimln(383, "alloc.nim");
		(*next).Prevsize = 0;
	}
	LA5: ;
	nimln(384, "alloc.nim");
	nimln(384, "alloc.nim");
	LOC7 = 0;
	LOC7 = pageindex_25440(p);
	excl_25216(&(*a).Chunkstarts, LOC7);
	nimln(385, "alloc.nim");
	osdeallocpages_22621(p, size);
	nimln(386, "alloc.nim");
	deccurrmem_23825(a, size);
	nimln(387, "alloc.nim");
	(*a).Freemem -= size;
	popFrame();
}

N_NIMCALL(void, freebigchunk_26404)(tmemregion23610* a, tbigchunk22840* c_26408) {
	tbigchunk22840* c;
	tbasechunk22836* ri;
	nimfr("freeBigChunk", "alloc.nim")
	nimln(438, "alloc.nim");
	c = c_26408;
	nimln(440, "alloc.nim");
	(*a).Freemem += (*c).Sup.Size;
	nimln(442, "alloc.nim");
	nimln(442, "alloc.nim");
	ri = ((tbasechunk22836*) ((NI)((NU32)(((NI) (c))) + (NU32)((*c).Sup.Size))));
	nimln(444, "alloc.nim");
	{
		NIM_BOOL LOC3;
		nimln(444, "alloc.nim");
		LOC3 = 0;
		nimln(444, "alloc.nim");
		LOC3 = isaccessible_26223(&(*a), ((void*) (ri)));
		if (!(LOC3)) goto LA4;
		nimln(444, "alloc.nim");
		LOC3 = chunkunused_25358(ri);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(446, "alloc.nim");
		{
			NIM_BOOL LOC9;
			NI LOC12;
			nimln(446, "alloc.nim");
			nimln(446, "alloc.nim");
			LOC9 = 0;
			LOC9 = issmallchunk_25349(ri);
			if (!!(LOC9)) goto LA10;
			nimln(447, "alloc.nim");
			listremove_27203(&(*a).Freechunkslist, ((tbigchunk22840*) (ri)));
			nimln(448, "alloc.nim");
			(*c).Sup.Size += (*ri).Size;
			nimln(449, "alloc.nim");
			nimln(449, "alloc.nim");
			LOC12 = 0;
			LOC12 = pageindex_25434(ri);
			excl_25216(&(*a).Chunkstarts, LOC12);
		}
		LA10: ;
	}
	LA5: ;
	nimln(451, "alloc.nim");
	{
		tbasechunk22836* le;
		nimln(451, "alloc.nim");
		nimln(451, "alloc.nim");
		if (!!(((*c).Sup.Prevsize == 0))) goto LA15;
		nimln(452, "alloc.nim");
		nimln(452, "alloc.nim");
		le = ((tbasechunk22836*) ((NI)((NU32)(((NI) (c))) - (NU32)((*c).Sup.Prevsize))));
		nimln(454, "alloc.nim");
		{
			NIM_BOOL LOC19;
			nimln(454, "alloc.nim");
			LOC19 = 0;
			nimln(454, "alloc.nim");
			LOC19 = isaccessible_26223(&(*a), ((void*) (le)));
			if (!(LOC19)) goto LA20;
			nimln(454, "alloc.nim");
			LOC19 = chunkunused_25358(le);
			LA20: ;
			if (!LOC19) goto LA21;
			nimln(456, "alloc.nim");
			{
				NIM_BOOL LOC25;
				NI LOC28;
				nimln(456, "alloc.nim");
				nimln(456, "alloc.nim");
				LOC25 = 0;
				LOC25 = issmallchunk_25349(le);
				if (!!(LOC25)) goto LA26;
				nimln(457, "alloc.nim");
				listremove_27203(&(*a).Freechunkslist, ((tbigchunk22840*) (le)));
				nimln(458, "alloc.nim");
				(*le).Size += (*c).Sup.Size;
				nimln(459, "alloc.nim");
				nimln(459, "alloc.nim");
				LOC28 = 0;
				LOC28 = pageindex_25434(&c->Sup);
				excl_25216(&(*a).Chunkstarts, LOC28);
				nimln(460, "alloc.nim");
				c = ((tbigchunk22840*) (le));
			}
			LA26: ;
		}
		LA21: ;
	}
	LA15: ;
	nimln(462, "alloc.nim");
	{
		NIM_BOOL LOC31;
		NI LOC35;
		nimln(462, "alloc.nim");
		LOC31 = 0;
		nimln(462, "alloc.nim");
		LOC31 = ((*c).Sup.Size < 1048576);
		if (LOC31) goto LA32;
		LOC31 = NIM_FALSE;
		LA32: ;
		if (!LOC31) goto LA33;
		nimln(463, "alloc.nim");
		nimln(463, "alloc.nim");
		LOC35 = 0;
		LOC35 = pageindex_25434(&c->Sup);
		incl_25204(a, &(*a).Chunkstarts, LOC35);
		nimln(464, "alloc.nim");
		updateprevsize_26280(a, c, (*c).Sup.Size);
		nimln(465, "alloc.nim");
		listadd_28435(&(*a).Freechunkslist, c);
		nimln(466, "alloc.nim");
		(*c).Sup.Used = NIM_FALSE;
	}
	goto LA29;
	LA33: ;
	{
		nimln(468, "alloc.nim");
		freeoschunks_26008(a, ((void*) (c)), (*c).Sup.Size);
	}
	LA29: ;
	popFrame();
}

static N_INLINE(void, deallocavlnode_24604)(tmemregion23610* a, tavlnode23608* n) {
	nimfr("deallocAvlNode", "alloc.nim")
	nimln(242, "alloc.nim");
	(*n).Link[(0)- 0] = (*a).Freeavlnodes;
	nimln(243, "alloc.nim");
	(*a).Freeavlnodes = n;
	popFrame();
}

N_NIMCALL(void, del_25002)(tmemregion23610* a, tavlnode23608** t, NI x) {
	nimfr("del", "avltree.nim")
	nimln(68, "avltree.nim");
	{
		nimln(68, "avltree.nim");
		if (!((*t) == bottom_23639)) goto LA3;
		nimln(68, "avltree.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(69, "avltree.nim");
	(*a).Last = (*t);
	nimln(70, "avltree.nim");
	{
		nimln(70, "avltree.nim");
		if (!((NU32)(x) < (NU32)((*(*t)).Key))) goto LA7;
		nimln(71, "avltree.nim");
		del_25002(a, &(*(*t)).Link[(0)- 0], x);
	}
	goto LA5;
	LA7: ;
	{
		nimln(73, "avltree.nim");
		(*a).Deleted = (*t);
		nimln(74, "avltree.nim");
		del_25002(a, &(*(*t)).Link[(1)- 0], x);
	}
	LA5: ;
	nimln(75, "avltree.nim");
	{
		NIM_BOOL LOC12;
		NIM_BOOL LOC13;
		nimln(75, "avltree.nim");
		LOC12 = 0;
		nimln(75, "avltree.nim");
		LOC13 = 0;
		nimln(75, "avltree.nim");
		LOC13 = ((*t) == (*a).Last);
		if (!(LOC13)) goto LA14;
		nimln(75, "avltree.nim");
		nimln(75, "avltree.nim");
		LOC13 = !(((*a).Deleted == bottom_23639));
		LA14: ;
		LOC12 = LOC13;
		if (!(LOC12)) goto LA15;
		nimln(75, "avltree.nim");
		LOC12 = (x == (*(*a).Deleted).Key);
		LA15: ;
		if (!LOC12) goto LA16;
		nimln(76, "avltree.nim");
		(*(*a).Deleted).Key = (*(*t)).Key;
		nimln(77, "avltree.nim");
		(*(*a).Deleted).Upperbound = (*(*t)).Upperbound;
		nimln(78, "avltree.nim");
		(*a).Deleted = bottom_23639;
		nimln(79, "avltree.nim");
		(*t) = (*(*t)).Link[(1)- 0];
		nimln(80, "avltree.nim");
		deallocavlnode_24604(a, (*a).Last);
	}
	goto LA10;
	LA16: ;
	{
		NIM_BOOL LOC19;
		nimln(81, "avltree.nim");
		LOC19 = 0;
		nimln(81, "avltree.nim");
		nimln(81, "avltree.nim");
		LOC19 = ((*(*(*t)).Link[(0)- 0]).Level < (NI32)((*(*t)).Level - 1));
		if (LOC19) goto LA20;
		nimln(82, "avltree.nim");
		nimln(82, "avltree.nim");
		LOC19 = ((*(*(*t)).Link[(1)- 0]).Level < (NI32)((*(*t)).Level - 1));
		LA20: ;
		if (!LOC19) goto LA21;
		nimln(83, "avltree.nim");
		(*(*t)).Level -= 1;
		nimln(84, "avltree.nim");
		{
			nimln(84, "avltree.nim");
			if (!((*(*t)).Level < (*(*(*t)).Link[(1)- 0]).Level)) goto LA25;
			nimln(85, "avltree.nim");
			(*(*(*t)).Link[(1)- 0]).Level = (*(*t)).Level;
		}
		LA25: ;
		nimln(86, "avltree.nim");
		skew_24760(t);
		nimln(87, "avltree.nim");
		skew_24760(&(*(*t)).Link[(1)- 0]);
		nimln(88, "avltree.nim");
		skew_24760(&(*(*(*t)).Link[(1)- 0]).Link[(1)- 0]);
		nimln(89, "avltree.nim");
		split_24766(t);
		nimln(90, "avltree.nim");
		split_24766(&(*(*t)).Link[(1)- 0]);
	}
	goto LA10;
	LA21: ;
	LA10: ;
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, rawdealloc_37019)(tmemregion23610* a, void* p) {
	tbasechunk22836* c_37201;
	nimfr("rawDealloc", "alloc.nim")
	nimln(611, "alloc.nim");
	c_37201 = pageaddr_25446(p);
	nimln(612, "alloc.nim");
	{
		NIM_BOOL LOC3;
		tsmallchunk22838* c;
		NI s;
		tfreecell22828* f;
		nimln(612, "alloc.nim");
		LOC3 = 0;
		LOC3 = issmallchunk_25349(c_37201);
		if (!LOC3) goto LA4;
		nimln(614, "alloc.nim");
		c = ((tsmallchunk22838*) (c_37201));
		nimln(615, "alloc.nim");
		s = (*c).Sup.Size;
		nimln(618, "alloc.nim");
		f = ((tfreecell22828*) (p));
		nimln(621, "alloc.nim");
		(*f).Zerofield = 0;
		nimln(622, "alloc.nim");
		(*f).Next = (*c).Freelist;
		nimln(623, "alloc.nim");
		(*c).Freelist = f;
		nimln(629, "alloc.nim");
		{
			nimln(629, "alloc.nim");
			if (!((*c).Free < s)) goto LA8;
			nimln(631, "alloc.nim");
			nimln(631, "alloc.nim");
			listadd_31605(&(*a).Freesmallchunks[((NI32)(s / 8))- 0], c);
			nimln(632, "alloc.nim");
			(*c).Free += s;
		}
		goto LA6;
		LA8: ;
		{
			nimln(634, "alloc.nim");
			(*c).Free += s;
			nimln(635, "alloc.nim");
			{
				nimln(635, "alloc.nim");
				nimln(635, "alloc.nim");
				nimln(635, "alloc.nim");
				nimln(635, "alloc.nim");
				if (!((*c).Free == (NI32)(4096 - (NI32)(((NI)sizeof(tsmallchunk22838)) - 8)))) goto LA13;
				nimln(636, "alloc.nim");
				nimln(636, "alloc.nim");
				listremove_34403(&(*a).Freesmallchunks[((NI32)(s / 8))- 0], c);
				nimln(637, "alloc.nim");
				(*c).Sup.Size = 4096;
				nimln(638, "alloc.nim");
				freebigchunk_26404(a, ((tbigchunk22840*) (c)));
			}
			LA13: ;
		}
		LA6: ;
	}
	goto LA1;
	LA4: ;
	{
		tbigchunk22840* c;
		nimln(645, "alloc.nim");
		c = ((tbigchunk22840*) (c_37201));
		nimln(646, "alloc.nim");
		(*a).Deleted = bottom_23639;
		nimln(647, "alloc.nim");
		del_25002(a, &(*a).Root, ((NI) (&(*c).Data)));
		nimln(648, "alloc.nim");
		freebigchunk_26404(a, c);
	}
	LA1: ;
	popFrame();
}

N_NIMCALL(void, dealloc_40024)(tmemregion23610* allocator, void* p) {
	void* x;
	nimfr("dealloc", "alloc.nim")
	nimln(726, "alloc.nim");
	nimln(726, "alloc.nim");
	nimln(726, "alloc.nim");
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell22828))))));
	nimln(730, "alloc.nim");
	rawdealloc_37019(allocator, x);
	popFrame();
}

N_NOCONV(void, dealloc_4645)(void* p) {
	nimfr("dealloc", "alloc.nim")
	nimln(784, "alloc.nim");
	dealloc_40024(&gch_43244.Region, p);
	popFrame();
}

static N_INLINE(void, add_41366)(tcellseq41306* s, tcell41290* c) {
	nimfr("add", "cellsets.nim")
	nimln(52, "cellsets.nim");
	{
		tcell41290** d;
		void* LOC5;
		nimln(52, "cellsets.nim");
		if (!((*s).Cap <= (*s).Len)) goto LA3;
		nimln(53, "cellsets.nim");
		nimln(53, "cellsets.nim");
		nimln(53, "cellsets.nim");
		(*s).Cap = (NI32)((NI32)((*s).Cap * 3) / 2);
		nimln(54, "cellsets.nim");
		nimln(54, "cellsets.nim");
		nimln(54, "cellsets.nim");
		LOC5 = 0;
		LOC5 = alloc_4601((NI32)((*s).Cap * 4));
		d = ((tcell41290**) (LOC5));
		nimln(55, "cellsets.nim");
		nimln(55, "cellsets.nim");
		memcpy(((void*) (d)), ((void*) ((*s).D)), (NI32)((*s).Len * 4));
		nimln(56, "cellsets.nim");
		dealloc_4645(((void*) ((*s).D)));
		nimln(57, "cellsets.nim");
		(*s).D = d;
	}
	LA3: ;
	nimln(59, "cellsets.nim");
	(*s).D[((*s).Len)- 0] = c;
	nimln(60, "cellsets.nim");
	(*s).Len += 1;
	popFrame();
}

N_NOINLINE(void, addzct_44618)(tcellseq41306* s, tcell41290* c) {
	nimfr("addZCT", "gc.nim")
	nimln(108, "gc.nim");
	{
		nimln(108, "gc.nim");
		nimln(108, "gc.nim");
		if (!((NI)((*c).Refcount & 4) == 0)) goto LA3;
		nimln(109, "gc.nim");
		nimln(109, "gc.nim");
		(*c).Refcount = (NI)((*c).Refcount | 4);
		nimln(110, "gc.nim");
		add_41366(s, c);
	}
	LA3: ;
	popFrame();
}

static N_INLINE(void, rtladdzct_46202)(tcell41290* c) {
	nimfr("rtlAddZCT", "gc.nim")
	nimln(199, "gc.nim");
	addzct_44618(&gch_43244.Zct, c);
	popFrame();
}

static N_INLINE(NIM_BOOL, canbecycleroot_44662)(tcell41290* c) {
	NIM_BOOL result;
	nimfr("canbeCycleRoot", "gc.nim")
	result = 0;
	nimln(121, "gc.nim");
	nimln(121, "gc.nim");
	nimln(121, "gc.nim");
	result = !((((*(*c).Typ).flags &(1<<((((NU8) 1))&7)))!=0));
	popFrame();
	return result;
}

static N_INLINE(NI, nexttry_41445)(NI h, NI maxhash) {
	NI result;
	nimfr("nextTry", "cellsets.nim")
	result = 0;
	nimln(96, "cellsets.nim");
	nimln(96, "cellsets.nim");
	nimln(96, "cellsets.nim");
	nimln(96, "cellsets.nim");
	result = (NI)((NI32)((NI32)(5 * h) + 1) & maxhash);
	popFrame();
	return result;
}

N_NIMCALL(void, cellsetrawinsert_41477)(tcellset41302 t, tpagedesc41298** data, tpagedesc41298* desc) {
	NI h;
	nimfr("cellSetRawInsert", "cellsets.nim")
	nimln(109, "cellsets.nim");
	nimln(109, "cellsets.nim");
	h = (NI)(((NI) ((*desc).Key)) & t.Max);
	nimln(110, "cellsets.nim");
	while (1) {
		nimln(110, "cellsets.nim");
		nimln(110, "cellsets.nim");
		if (!!((data[(h)- 0] == NIM_NIL))) goto LA1;
		nimln(112, "cellsets.nim");
		h = nexttry_41445(h, t.Max);
	} LA1: ;
	nimln(114, "cellsets.nim");
	data[(h)- 0] = desc;
	popFrame();
}

N_NIMCALL(void, cellsetenlarge_41804)(tcellset41302* t) {
	NI oldmax;
	tpagedesc41298** n;
	void* LOC1;
	NI i_41821;
	NI res_41842;
	nimfr("cellSetEnlarge", "cellsets.nim")
	nimln(117, "cellsets.nim");
	oldmax = (*t).Max;
	nimln(118, "cellsets.nim");
	nimln(118, "cellsets.nim");
	nimln(118, "cellsets.nim");
	nimln(118, "cellsets.nim");
	(*t).Max = (NI32)((NI32)((NI32)((*t).Max + 1) * 2) - 1);
	nimln(119, "cellsets.nim");
	nimln(119, "cellsets.nim");
	nimln(119, "cellsets.nim");
	nimln(119, "cellsets.nim");
	LOC1 = 0;
	LOC1 = alloc0_4616((NI32)((NI32)((*t).Max + 1) * 4));
	n = ((tpagedesc41298**) (LOC1));
	i_41821 = 0;
	nimln(1458, "system.nim");
	res_41842 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_41842 <= oldmax)) goto LA2;
		nimln(1458, "system.nim");
		i_41821 = res_41842;
		nimln(121, "cellsets.nim");
		{
			nimln(121, "cellsets.nim");
			nimln(121, "cellsets.nim");
			if (!!(((*t).Data[(i_41821)- 0] == NIM_NIL))) goto LA5;
			nimln(122, "cellsets.nim");
			cellsetrawinsert_41477((*t), n, (*t).Data[(i_41821)- 0]);
		}
		LA5: ;
		nimln(1461, "system.nim");
		res_41842 += 1;
	} LA2: ;
	nimln(123, "cellsets.nim");
	dealloc_4645(((void*) ((*t).Data)));
	nimln(124, "cellsets.nim");
	(*t).Data = n;
	popFrame();
}

N_NIMCALL(tpagedesc41298*, cellsetput_41846)(tcellset41302* t, NI key) {
	tpagedesc41298* result;
	NI h;
	void* LOC17;
	nimfr("cellSetPut", "cellsets.nim")
	result = 0;
	nimln(127, "cellsets.nim");
	nimln(127, "cellsets.nim");
	h = (NI)(((NI) (key)) & (*t).Max);
	nimln(128, "cellsets.nim");
	while (1) {
		tpagedesc41298* x;
		nimln(129, "cellsets.nim");
		x = (*t).Data[(h)- 0];
		nimln(130, "cellsets.nim");
		{
			nimln(130, "cellsets.nim");
			if (!(x == NIM_NIL)) goto LA4;
			nimln(130, "cellsets.nim");
			goto LA1;
		}
		LA4: ;
		nimln(131, "cellsets.nim");
		{
			nimln(131, "cellsets.nim");
			if (!((*x).Key == key)) goto LA8;
			nimln(131, "cellsets.nim");
			nimln(131, "cellsets.nim");
			result = x;
			goto BeforeRet;
		}
		LA8: ;
		nimln(132, "cellsets.nim");
		h = nexttry_41445(h, (*t).Max);
	} LA1: ;
	nimln(134, "cellsets.nim");
	{
		NIM_BOOL LOC12;
		nimln(134, "cellsets.nim");
		LOC12 = 0;
		nimln(134, "cellsets.nim");
		nimln(134, "cellsets.nim");
		nimln(134, "cellsets.nim");
		nimln(134, "cellsets.nim");
		LOC12 = ((NI32)((NI32)((*t).Max + 1) * 2) < (NI32)((*t).Counter * 3));
		if (LOC12) goto LA13;
		nimln(134, "cellsets.nim");
		nimln(134, "cellsets.nim");
		nimln(134, "cellsets.nim");
		LOC12 = ((NI32)((NI32)((*t).Max + 1) - (*t).Counter) < 4);
		LA13: ;
		if (!LOC12) goto LA14;
		nimln(135, "cellsets.nim");
		cellsetenlarge_41804(t);
	}
	LA14: ;
	nimln(136, "cellsets.nim");
	(*t).Counter += 1;
	nimln(137, "cellsets.nim");
	nimln(137, "cellsets.nim");
	h = (NI)(((NI) (key)) & (*t).Max);
	nimln(138, "cellsets.nim");
	while (1) {
		nimln(138, "cellsets.nim");
		nimln(138, "cellsets.nim");
		if (!!(((*t).Data[(h)- 0] == NIM_NIL))) goto LA16;
		nimln(138, "cellsets.nim");
		h = nexttry_41445(h, (*t).Max);
	} LA16: ;
	nimln(141, "cellsets.nim");
	nimln(141, "cellsets.nim");
	nimln(141, "cellsets.nim");
	LOC17 = 0;
	LOC17 = alloc0_4616(((NI)sizeof(tpagedesc41298)));
	result = ((tpagedesc41298*) (LOC17));
	nimln(142, "cellsets.nim");
	(*result).Next = (*t).Head;
	nimln(143, "cellsets.nim");
	(*result).Key = key;
	nimln(144, "cellsets.nim");
	(*t).Head = result;
	nimln(145, "cellsets.nim");
	(*t).Data[(h)- 0] = result;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NOINLINE(void, incl_42055)(tcellset41302* s, tcell41290* cell) {
	NI u;
	tpagedesc41298* t;
	nimfr("incl", "cellsets.nim")
	nimln(159, "cellsets.nim");
	u = ((NI) (cell));
	nimln(160, "cellsets.nim");
	nimln(160, "cellsets.nim");
	t = cellsetput_41846(s, (NI)((NU32)(u) >> (NU32)(12)));
	nimln(161, "cellsets.nim");
	nimln(161, "cellsets.nim");
	nimln(161, "cellsets.nim");
	u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
	nimln(162, "cellsets.nim");
	nimln(162, "cellsets.nim");
	nimln(162, "cellsets.nim");
	nimln(162, "cellsets.nim");
	nimln(162, "cellsets.nim");
	nimln(162, "cellsets.nim");
	(*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] | (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31))))));
	popFrame();
}

static N_INLINE(void, rtladdcycleroot_45435)(tcell41290* c) {
	nimfr("rtlAddCycleRoot", "gc.nim")
	nimln(189, "gc.nim");
	{
		nimln(189, "gc.nim");
		nimln(189, "gc.nim");
		nimln(189, "gc.nim");
		if (!!((((NI) ((NI)((*c).Refcount & 3))) == 3))) goto LA3;
		nimln(139, "gc.nim");
		nimln(139, "gc.nim");
		nimln(139, "gc.nim");
		(*c).Refcount = (NI)((NI)((*c).Refcount & -4) | 3);
		nimln(191, "gc.nim");
		incl_42055(&gch_43244.Cycleroots, c);
	}
	LA3: ;
	popFrame();
}

static N_INLINE(void, decref_46602)(tcell41290* c) {
	nimfr("decRef", "gc.nim")
	nimln(206, "gc.nim");
	{
		nimln(167, "gc.nim");
		(*c).Refcount -= 8;
		nimln(168, "gc.nim");
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		nimln(207, "gc.nim");
		rtladdzct_46202(c);
	}
	goto LA1;
	LA3: ;
	{
		NIM_BOOL LOC6;
		nimln(208, "gc.nim");
		LOC6 = 0;
		LOC6 = canbecycleroot_44662(c);
		if (!LOC6) goto LA7;
		nimln(211, "gc.nim");
		rtladdcycleroot_45435(c);
	}
	goto LA1;
	LA7: ;
	LA1: ;
	popFrame();
}

static N_INLINE(void*, celltousr_44624)(tcell41290* cell) {
	void* result;
	nimfr("cellToUsr", "gc.nim")
	result = 0;
	nimln(114, "gc.nim");
	nimln(114, "gc.nim");
	nimln(114, "gc.nim");
	result = ((void*) ((NI)((NU32)(((NI) (cell))) + (NU32)(((NI)sizeof(tcell41290))))));
	popFrame();
	return result;
}

N_NIMCALL(NI, getdiscriminant_21520)(void* aa, TNimNode* n) {
	NI result;
	NI d;
	NI a;
	nimfr("getDiscriminant", "system.nim")
	result = 0;
	d = 0;
	nimln(2373, "system.nim");
	a = ((NI) (aa));
	nimln(2374, "system.nim");
	switch ((*(*n).typ).size) {
	case 1:
	{
		nimln(2375, "system.nim");
		nimln(2375, "system.nim");
		nimln(2375, "system.nim");
		d = ((NI)(NU)(NU8)((*((NI8*) ((NI)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	case 2:
	{
		nimln(2376, "system.nim");
		nimln(2376, "system.nim");
		nimln(2376, "system.nim");
		d = ((NI)(NU)(NU16)((*((NI16*) ((NI)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	case 4:
	{
		nimln(2377, "system.nim");
		nimln(2377, "system.nim");
		d = ((NI) ((*((NI32*) ((NI)((NU32)(a) + (NU32)((*n).offset)))))));
	}
	break;
	default:
	{
	}
	break;
	}
	nimln(2379, "system.nim");
	nimln(2379, "system.nim");
	result = d;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(TNimNode*, selectbranch_21808)(void* aa, TNimNode* n) {
	TNimNode* result;
	NI discr;
	nimfr("selectBranch", "system.nim")
	result = 0;
	nimln(2382, "system.nim");
	discr = getdiscriminant_21520(aa, n);
	nimln(2383, "system.nim");
	{
		nimln(2383, "system.nim");
		if (!((NU32)(discr) < (NU32)((*n).len))) goto LA3;
		nimln(2384, "system.nim");
		result = (*n).sons[(discr)- 0];
		nimln(2385, "system.nim");
		{
			nimln(2385, "system.nim");
			if (!(result == NIM_NIL)) goto LA7;
			nimln(2385, "system.nim");
			result = (*n).sons[((*n).len)- 0];
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		nimln(2388, "system.nim");
		result = (*n).sons[((*n).len)- 0];
	}
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(void, forallslotsaux_49206)(void* dest, TNimNode* n, NU8 op) {
	NI d;
	nimfr("forAllSlotsAux", "gc.nim")
	nimln(315, "gc.nim");
	d = ((NI) (dest));
	nimln(316, "gc.nim");
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		nimln(317, "gc.nim");
		nimln(317, "gc.nim");
		forallchildrenaux_45023(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((NU8) 2):
	{
		NI i_49232;
		NI HEX3Atmp_49405;
		NI res_49407;
		i_49232 = 0;
		HEX3Atmp_49405 = 0;
		nimln(319, "gc.nim");
		nimln(319, "gc.nim");
		HEX3Atmp_49405 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_49407 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_49407 <= HEX3Atmp_49405)) goto LA3;
			nimln(1458, "system.nim");
			i_49232 = res_49407;
			nimln(321, "gc.nim");
			{
				nimln(321, "gc.nim");
				if (!((*(*n).sons[(i_49232)- 0]).kind == ((NU8) 1))) goto LA6;
				nimln(322, "gc.nim");
				{
					nimln(322, "gc.nim");
					if (!((*(*(*n).sons[(i_49232)- 0]).typ).kind == ((NU8) 22) || (*(*(*n).sons[(i_49232)- 0]).typ).kind == ((NU8) 28) || (*(*(*n).sons[(i_49232)- 0]).typ).kind == ((NU8) 24))) goto LA10;
					nimln(323, "gc.nim");
					nimln(323, "gc.nim");
					dooperation_45019((*((void**) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_49232)- 0]).offset))))), op);
				}
				goto LA8;
				LA10: ;
				{
					nimln(325, "gc.nim");
					nimln(325, "gc.nim");
					forallchildrenaux_45023(((void*) ((NI)((NU32)(d) + (NU32)((*(*n).sons[(i_49232)- 0]).offset)))), (*(*n).sons[(i_49232)- 0]).typ, op);
				}
				LA8: ;
			}
			goto LA4;
			LA6: ;
			{
				nimln(328, "gc.nim");
				forallslotsaux_49206(dest, (*n).sons[(i_49232)- 0], op);
			}
			LA4: ;
			nimln(1461, "system.nim");
			res_49407 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		nimln(330, "gc.nim");
		m = selectbranch_21808(dest, n);
		nimln(331, "gc.nim");
		{
			nimln(331, "gc.nim");
			nimln(331, "gc.nim");
			if (!!((m == NIM_NIL))) goto LA17;
			nimln(331, "gc.nim");
			forallslotsaux_49206(dest, m, op);
		}
		LA17: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, forallchildrenaux_45023)(void* dest, TNimType* mt, NU8 op) {
	NI d;
	nimfr("forAllChildrenAux", "gc.nim")
	nimln(335, "gc.nim");
	d = ((NI) (dest));
	nimln(336, "gc.nim");
	{
		nimln(336, "gc.nim");
		if (!(dest == NIM_NIL)) goto LA3;
		nimln(336, "gc.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(337, "gc.nim");
	{
		nimln(337, "gc.nim");
		nimln(337, "gc.nim");
		if (!!((((*mt).flags &(1<<((((NU8) 0))&7)))!=0))) goto LA7;
		nimln(338, "gc.nim");
		switch ((*mt).kind) {
		case ((NU8) 22):
		case ((NU8) 28):
		case ((NU8) 24):
		{
			nimln(340, "gc.nim");
			dooperation_45019((*((void**) (d))), op);
		}
		break;
		case ((NU8) 17):
		case ((NU8) 18):
		{
			nimln(342, "gc.nim");
			forallslotsaux_49206(dest, (*mt).node, op);
		}
		break;
		case ((NU8) 16):
		case ((NU8) 4):
		case ((NU8) 27):
		{
			NI i_49440;
			NI HEX3Atmp_49462;
			NI res_49464;
			i_49440 = 0;
			HEX3Atmp_49462 = 0;
			nimln(344, "gc.nim");
			nimln(344, "gc.nim");
			nimln(344, "gc.nim");
			HEX3Atmp_49462 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
			nimln(1458, "system.nim");
			res_49464 = 0;
			nimln(1459, "system.nim");
			while (1) {
				nimln(1459, "system.nim");
				if (!(res_49464 <= HEX3Atmp_49462)) goto LA12;
				nimln(1458, "system.nim");
				i_49440 = res_49464;
				nimln(345, "gc.nim");
				nimln(345, "gc.nim");
				nimln(345, "gc.nim");
				forallchildrenaux_45023(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_49440) * (NU32)((*(*mt).base).size)))))), (*mt).base, op);
				nimln(1461, "system.nim");
				res_49464 += 1;
			} LA12: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7: ;
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, forallchildren_45015)(tcell41290* cell, NU8 op) {
	TY2289 marker;
	nimfr("forAllChildren", "gc.nim")
	nimln(353, "gc.nim");
	marker = (*(*cell).Typ).marker;
	nimln(354, "gc.nim");
	{
		void* LOC5;
		nimln(354, "gc.nim");
		nimln(354, "gc.nim");
		if (!!((marker == NIM_NIL))) goto LA3;
		nimln(355, "gc.nim");
		nimln(355, "gc.nim");
		LOC5 = 0;
		LOC5 = celltousr_44624(cell);
		marker(LOC5, ((NI) (op)));
	}
	goto LA1;
	LA3: ;
	{
		nimln(357, "gc.nim");
		switch ((*(*cell).Typ).kind) {
		case ((NU8) 22):
		{
			void* LOC8;
			nimln(359, "gc.nim");
			nimln(359, "gc.nim");
			LOC8 = 0;
			LOC8 = celltousr_44624(cell);
			forallchildrenaux_45023(LOC8, (*(*cell).Typ).base, op);
		}
		break;
		case ((NU8) 24):
		{
			NI d;
			void* LOC10;
			TGenericSeq* s;
			nimln(361, "gc.nim");
			nimln(361, "gc.nim");
			LOC10 = 0;
			LOC10 = celltousr_44624(cell);
			d = ((NI) (LOC10));
			nimln(362, "gc.nim");
			s = ((TGenericSeq*) (d));
			nimln(363, "gc.nim");
			{
				NI i_50240;
				NI HEX3Atmp_50272;
				NI res_50274;
				nimln(363, "gc.nim");
				nimln(363, "gc.nim");
				if (!!((s == NIM_NIL))) goto LA13;
				i_50240 = 0;
				HEX3Atmp_50272 = 0;
				nimln(364, "gc.nim");
				nimln(364, "gc.nim");
				HEX3Atmp_50272 = (NI32)((*s).len - 1);
				nimln(1458, "system.nim");
				res_50274 = 0;
				nimln(1459, "system.nim");
				while (1) {
					nimln(1459, "system.nim");
					if (!(res_50274 <= HEX3Atmp_50272)) goto LA15;
					nimln(1458, "system.nim");
					i_50240 = res_50274;
					nimln(365, "gc.nim");
					nimln(365, "gc.nim");
					nimln(365, "gc.nim");
					nimln(365, "gc.nim");
					forallchildrenaux_45023(((void*) ((NI)((NU32)((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_50240) * (NU32)((*(*(*cell).Typ).base).size))))) + (NU32)(8)))), (*(*cell).Typ).base, op);
					nimln(1461, "system.nim");
					res_50274 += 1;
				} LA15: ;
			}
			LA13: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1: ;
	popFrame();
}

N_NIMCALL(void, markgray_60203)(tcell41290* s) {
	nimfr("markGray", "gc.nim")
	nimln(569, "gc.nim");
	{
		nimln(569, "gc.nim");
		nimln(569, "gc.nim");
		nimln(569, "gc.nim");
		if (!!((((NI) ((NI)((*s).Refcount & 3))) == 1))) goto LA3;
		nimln(139, "gc.nim");
		nimln(139, "gc.nim");
		nimln(139, "gc.nim");
		(*s).Refcount = (NI)((NI)((*s).Refcount & -4) | 1);
		nimln(571, "gc.nim");
		forallchildren_45015(s, ((NU8) 5));
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, scanblack_60402)(tcell41290* s) {
	nimfr("scanBlack", "gc.nim")
	nimln(137, "gc.nim");
	nimln(137, "gc.nim");
	(*s).Refcount = (NI)((*s).Refcount & -4);
	nimln(575, "gc.nim");
	forallchildren_45015(s, ((NU8) 7));
	popFrame();
}

N_NIMCALL(void, scan_60602)(tcell41290* s) {
	nimfr("scan", "gc.nim")
	nimln(578, "gc.nim");
	{
		nimln(578, "gc.nim");
		nimln(578, "gc.nim");
		if (!(((NI) ((NI)((*s).Refcount & 3))) == 1)) goto LA3;
		nimln(579, "gc.nim");
		{
			nimln(579, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*s).Refcount))) goto LA7;
			nimln(580, "gc.nim");
			scanblack_60402(s);
		}
		goto LA5;
		LA7: ;
		{
			nimln(139, "gc.nim");
			nimln(139, "gc.nim");
			nimln(139, "gc.nim");
			(*s).Refcount = (NI)((NI)((*s).Refcount & -4) | 2);
			nimln(583, "gc.nim");
			forallchildren_45015(s, ((NU8) 6));
		}
		LA5: ;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(tpagedesc41298*, cellsetget_41451)(tcellset41302 t, NI key) {
	tpagedesc41298* result;
	NI h;
	nimfr("cellSetGet", "cellsets.nim")
	result = 0;
	nimln(102, "cellsets.nim");
	nimln(102, "cellsets.nim");
	h = (NI)(((NI) (key)) & t.Max);
	nimln(103, "cellsets.nim");
	while (1) {
		nimln(103, "cellsets.nim");
		nimln(103, "cellsets.nim");
		if (!!((t.Data[(h)- 0] == NIM_NIL))) goto LA1;
		nimln(104, "cellsets.nim");
		{
			nimln(104, "cellsets.nim");
			if (!((*t.Data[(h)- 0]).Key == key)) goto LA4;
			nimln(104, "cellsets.nim");
			nimln(104, "cellsets.nim");
			result = t.Data[(h)- 0];
			goto BeforeRet;
		}
		LA4: ;
		nimln(105, "cellsets.nim");
		h = nexttry_41445(h, t.Max);
	} LA1: ;
	nimln(106, "cellsets.nim");
	nimln(106, "cellsets.nim");
	result = NIM_NIL;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, contains_42009)(tcellset41302 s, tcell41290* cell) {
	NIM_BOOL result;
	NI u;
	tpagedesc41298* t;
	nimfr("contains", "cellsets.nim")
	result = 0;
	nimln(150, "cellsets.nim");
	u = ((NI) (cell));
	nimln(151, "cellsets.nim");
	nimln(151, "cellsets.nim");
	t = cellsetget_41451(s, (NI)((NU32)(u) >> (NU32)(12)));
	nimln(152, "cellsets.nim");
	{
		nimln(152, "cellsets.nim");
		nimln(152, "cellsets.nim");
		if (!!((t == NIM_NIL))) goto LA3;
		nimln(153, "cellsets.nim");
		nimln(153, "cellsets.nim");
		nimln(153, "cellsets.nim");
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		nimln(154, "cellsets.nim");
		result = !(((NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] & (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31)))))) == 0));
	}
	goto LA1;
	LA3: ;
	{
		nimln(156, "cellsets.nim");
		result = NIM_FALSE;
	}
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(void, preparedealloc_45208)(tcell41290* cell) {
	nimfr("prepareDealloc", "gc.nim")
	nimln(174, "gc.nim");
	{
		void* LOC5;
		nimln(174, "gc.nim");
		nimln(174, "gc.nim");
		if (!!(((*(*cell).Typ).finalizer == NIM_NIL))) goto LA3;
		nimln(180, "gc.nim");
		gch_43244.Recgclock += 1;
		nimln(181, "gc.nim");
		nimln(181, "gc.nim");
		LOC5 = 0;
		LOC5 = celltousr_44624(cell);
		((TFinalizer) ((*(*cell).Typ).finalizer))(LOC5);
		nimln(182, "gc.nim");
		gch_43244.Recgclock -= 1;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, freecycliccell_59417)(tgcheap43216* gch, tcell41290* c) {
	nimfr("freeCyclicCell", "gc.nim")
	nimln(558, "gc.nim");
	preparedealloc_45208(c);
	nimln(563, "gc.nim");
	rawdealloc_37019(&(*gch).Region, ((void*) (c)));
	popFrame();
}

N_NIMCALL(void, collectwhite_60802)(tcell41290* s) {
	nimfr("collectWhite", "gc.nim")
	nimln(586, "gc.nim");
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC5;
		nimln(586, "gc.nim");
		LOC3 = 0;
		nimln(586, "gc.nim");
		nimln(586, "gc.nim");
		LOC3 = (((NI) ((NI)((*s).Refcount & 3))) == 2);
		if (!(LOC3)) goto LA4;
		nimln(586, "gc.nim");
		nimln(586, "gc.nim");
		LOC5 = 0;
		LOC5 = contains_42009(gch_43244.Cycleroots, s);
		LOC3 = !(LOC5);
		LA4: ;
		if (!LOC3) goto LA6;
		nimln(137, "gc.nim");
		nimln(137, "gc.nim");
		(*s).Refcount = (NI)((*s).Refcount & -4);
		nimln(588, "gc.nim");
		forallchildren_45015(s, ((NU8) 8));
		nimln(589, "gc.nim");
		freecycliccell_59417(&gch_43244, s);
	}
	LA6: ;
	popFrame();
}

N_NIMCALL(void, dooperation_45019)(void* p, NU8 op) {
	tcell41290* c;
	nimfr("doOperation", "gc.nim")
	nimln(638, "gc.nim");
	{
		nimln(638, "gc.nim");
		if (!(p == NIM_NIL)) goto LA3;
		nimln(638, "gc.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(639, "gc.nim");
	c = usrtocell_44643(p);
	nimln(643, "gc.nim");
	switch (op) {
	case ((NU8) 2):
	{
		nimln(651, "gc.nim");
		decref_46602(c);
	}
	break;
	case ((NU8) 3):
	{
		nimln(654, "gc.nim");
		add_41366(&gch_43244.Tempstack, c);
	}
	break;
	case ((NU8) 4):
	{
		nimln(657, "gc.nim");
		nimln(657, "gc.nim");
		(*c).Refcount = (NI)((NU32)((*c).Refcount) - (NU32)(8));
	}
	break;
	case ((NU8) 5):
	{
		nimln(660, "gc.nim");
		nimln(660, "gc.nim");
		(*c).Refcount = (NI)((NU32)((*c).Refcount) - (NU32)(8));
		nimln(661, "gc.nim");
		markgray_60203(c);
	}
	break;
	case ((NU8) 6):
	{
		nimln(662, "gc.nim");
		scan_60602(c);
	}
	break;
	case ((NU8) 7):
	{
		nimln(664, "gc.nim");
		nimln(664, "gc.nim");
		(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
		nimln(665, "gc.nim");
		{
			nimln(665, "gc.nim");
			nimln(665, "gc.nim");
			nimln(665, "gc.nim");
			if (!!((((NI) ((NI)((*c).Refcount & 3))) == 0))) goto LA13;
			nimln(666, "gc.nim");
			scanblack_60402(c);
		}
		LA13: ;
	}
	break;
	case ((NU8) 8):
	{
		nimln(667, "gc.nim");
		collectwhite_60802(c);
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, nimGCvisit)(void* d, NI op) {
	nimfr("nimGCvisit", "gc.nim")
	nimln(681, "gc.nim");
	dooperation_45019(d, ((NU8) (op)));
	popFrame();
}
N_NIMCALL(void, TMP9)(void* p, NI op) {
	E_Base* a;
	a = (E_Base*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
}
N_NIMCALL(void, TMP10)(void* p, NI op) {
	eoutofmemory2457* a;
	a = (eoutofmemory2457*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

static N_INLINE(NI, getoccupiedmem_41232)(tmemregion23610* a) {
	NI result;
	nimfr("getOccupiedMem", "alloc.nim")
	result = 0;
	nimln(762, "alloc.nim");
	nimln(762, "alloc.nim");
	result = (NI32)((*a).Currmem - (*a).Freemem);
	popFrame();
	return result;
}

N_NOINLINE(NI, stacksize_65008)(void) {
	NI result;
	void* volatile stacktop;
	nimfr("stackSize", "gc.nim")
	result = 0;
	stacktop = 0;
	nimln(792, "gc.nim");
	nimln(792, "gc.nim");
	nimln(792, "gc.nim");
	result = (NI32)abs((NI32)(((NI) (&stacktop)) - ((NI) (gch_43244.Stackbottom))));
	popFrame();
	return result;
}

N_NIMCALL(NI, lowgauge_24614)(tavlnode23608* n) {
	NI result;
	tavlnode23608* it;
	nimfr("lowGauge", "avltree.nim")
	result = 0;
	nimln(15, "avltree.nim");
	it = n;
	nimln(16, "avltree.nim");
	while (1) {
		nimln(16, "avltree.nim");
		nimln(16, "avltree.nim");
		if (!!((it == bottom_23639))) goto LA1;
		nimln(17, "avltree.nim");
		result = (*it).Key;
		nimln(18, "avltree.nim");
		it = (*it).Link[(0)- 0];
	} LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NI, highgauge_24637)(tavlnode23608* n) {
	NI result;
	tavlnode23608* it;
	nimfr("highGauge", "avltree.nim")
	result = 0;
	nimln(21, "avltree.nim");
	result = -1;
	nimln(22, "avltree.nim");
	it = n;
	nimln(23, "avltree.nim");
	while (1) {
		nimln(23, "avltree.nim");
		nimln(23, "avltree.nim");
		if (!!((it == bottom_23639))) goto LA1;
		nimln(24, "avltree.nim");
		result = (*it).Upperbound;
		nimln(25, "avltree.nim");
		it = (*it).Link[(1)- 0];
	} LA1: ;
	popFrame();
	return result;
}

static N_INLINE(void, prepareforinteriorpointerchecking_38678)(tmemregion23610* a) {
	nimfr("prepareForInteriorPointerChecking", "alloc.nim")
	nimln(667, "alloc.nim");
	(*a).Minlargeobj = lowgauge_24614((*a).Root);
	nimln(668, "alloc.nim");
	(*a).Maxlargeobj = highgauge_24637((*a).Root);
	popFrame();
}

N_NIMCALL(tavlnode23608*, inrange_24701)(tavlnode23608* root, NI key) {
	tavlnode23608* result;
	tavlnode23608* it;
	nimfr("inRange", "avltree.nim")
	result = 0;
	nimln(34, "avltree.nim");
	it = root;
	nimln(35, "avltree.nim");
	while (1) {
		nimln(35, "avltree.nim");
		nimln(35, "avltree.nim");
		if (!!((it == bottom_23639))) goto LA1;
		nimln(36, "avltree.nim");
		{
			NIM_BOOL LOC4;
			nimln(36, "avltree.nim");
			LOC4 = 0;
			nimln(36, "avltree.nim");
			LOC4 = ((NU32)((*it).Key) <= (NU32)(key));
			if (!(LOC4)) goto LA5;
			nimln(36, "avltree.nim");
			LOC4 = ((NU32)(key) < (NU32)((*it).Upperbound));
			LA5: ;
			if (!LOC4) goto LA6;
			nimln(36, "avltree.nim");
			nimln(36, "avltree.nim");
			result = it;
			goto BeforeRet;
		}
		LA6: ;
		nimln(37, "avltree.nim");
		nimln(37, "avltree.nim");
		nimln(37, "avltree.nim");
		it = (*it).Link[(((NU32)((*it).Key) < (NU32)(key)))- 0];
	} LA1: ;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void*, interiorallocatedptr_38683)(tmemregion23610* a, void* p) {
	void* result;
	nimfr("interiorAllocatedPtr", "alloc.nim")
	result = 0;
	nimln(671, "alloc.nim");
	{
		NIM_BOOL LOC3;
		tbasechunk22836* c_38688;
		nimln(671, "alloc.nim");
		LOC3 = 0;
		LOC3 = isaccessible_26223(a, p);
		if (!LOC3) goto LA4;
		nimln(672, "alloc.nim");
		c_38688 = pageaddr_25446(p);
		nimln(673, "alloc.nim");
		{
			NIM_BOOL LOC8;
			nimln(673, "alloc.nim");
			nimln(673, "alloc.nim");
			LOC8 = 0;
			LOC8 = chunkunused_25358(c_38688);
			if (!!(LOC8)) goto LA9;
			nimln(674, "alloc.nim");
			{
				NIM_BOOL LOC13;
				tsmallchunk22838* c;
				NI offset;
				nimln(674, "alloc.nim");
				LOC13 = 0;
				LOC13 = issmallchunk_25349(c_38688);
				if (!LOC13) goto LA14;
				nimln(675, "alloc.nim");
				c = ((tsmallchunk22838*) (c_38688));
				nimln(676, "alloc.nim");
				nimln(676, "alloc.nim");
				nimln(676, "alloc.nim");
				nimln(677, "alloc.nim");
				nimln(677, "alloc.nim");
				offset = (NI)((NU32)((NI)(((NI) (p)) & 4095)) - (NU32)((NI32)(((NI)sizeof(tsmallchunk22838)) - 8)));
				nimln(678, "alloc.nim");
				{
					tfreecell22828* d;
					nimln(678, "alloc.nim");
					if (!((NU32)(offset) < (NU32)((*c).Acc))) goto LA18;
					nimln(681, "alloc.nim");
					nimln(682, "alloc.nim");
					nimln(681, "alloc.nim");
					nimln(682, "alloc.nim");
					d = ((tfreecell22828*) ((NI)((NU32)((NI)((NU32)(((NI) (&(*c).Data))) + (NU32)(offset))) - (NU32)((NI)((NU32)(offset) % (NU32)((*c).Sup.Size))))));
					nimln(683, "alloc.nim");
					{
						nimln(683, "alloc.nim");
						if (!((NU32)(1) < (NU32)((*d).Zerofield))) goto LA22;
						nimln(684, "alloc.nim");
						result = ((void*) (d));
					}
					LA22: ;
				}
				LA18: ;
			}
			goto LA11;
			LA14: ;
			{
				tbigchunk22840* c;
				NF* d;
				nimln(687, "alloc.nim");
				c = ((tbigchunk22840*) (c_38688));
				nimln(688, "alloc.nim");
				d = &(*c).Data;
				nimln(689, "alloc.nim");
				{
					NIM_BOOL LOC27;
					nimln(689, "alloc.nim");
					LOC27 = 0;
					nimln(689, "alloc.nim");
					LOC27 = (((void*) (d)) <= p);
					if (!(LOC27)) goto LA28;
					nimln(689, "alloc.nim");
					LOC27 = ((NU32)(1) < (NU32)((*((tfreecell22828*) (d))).Zerofield));
					LA28: ;
					if (!LOC27) goto LA29;
					nimln(690, "alloc.nim");
					result = ((void*) (d));
				}
				LA29: ;
			}
			LA11: ;
		}
		LA9: ;
	}
	goto LA1;
	LA4: ;
	{
		NI q;
		nimln(693, "alloc.nim");
		q = ((NI) (p));
		nimln(694, "alloc.nim");
		{
			NIM_BOOL LOC34;
			tavlnode23608* avlnode;
			nimln(694, "alloc.nim");
			LOC34 = 0;
			nimln(694, "alloc.nim");
			LOC34 = ((NU32)((*a).Minlargeobj) <= (NU32)(q));
			if (!(LOC34)) goto LA35;
			nimln(694, "alloc.nim");
			LOC34 = ((NU32)(q) <= (NU32)((*a).Maxlargeobj));
			LA35: ;
			if (!LOC34) goto LA36;
			nimln(697, "alloc.nim");
			avlnode = inrange_24701((*a).Root, q);
			nimln(698, "alloc.nim");
			{
				void* k;
				tbigchunk22840* c;
				tbasechunk22836* LOC42;
				nimln(698, "alloc.nim");
				nimln(698, "alloc.nim");
				if (!!((avlnode == NIM_NIL))) goto LA40;
				nimln(699, "alloc.nim");
				k = ((void*) ((*avlnode).Key));
				nimln(700, "alloc.nim");
				nimln(700, "alloc.nim");
				LOC42 = 0;
				LOC42 = pageaddr_25446(k);
				c = ((tbigchunk22840*) (LOC42));
				nimln(702, "alloc.nim");
				{
					nimln(702, "alloc.nim");
					if (!((NU32)(1) < (NU32)((*((tfreecell22828*) (k))).Zerofield))) goto LA45;
					nimln(703, "alloc.nim");
					result = k;
				}
				LA45: ;
			}
			LA40: ;
		}
		LA36: ;
	}
	LA1: ;
	popFrame();
	return result;
}

static N_INLINE(void, gcmark_63616)(tgcheap43216* gch, void* p) {
	tcell41290* cell;
	NI c;
	nimfr("gcMark", "gc.nim")
	nimln(730, "gc.nim");
	cell = usrtocell_44643(p);
	nimln(731, "gc.nim");
	c = ((NI) (cell));
	nimln(732, "gc.nim");
	{
		tcell41290* objstart;
		void* LOC5;
		nimln(732, "gc.nim");
		if (!((NU32)(4096) < (NU32)(c))) goto LA3;
		nimln(734, "gc.nim");
		nimln(734, "gc.nim");
		LOC5 = 0;
		LOC5 = interiorallocatedptr_38683(&(*gch).Region, ((void*) (cell)));
		objstart = ((tcell41290*) (LOC5));
		nimln(735, "gc.nim");
		{
			nimln(735, "gc.nim");
			nimln(735, "gc.nim");
			if (!!((objstart == NIM_NIL))) goto LA8;
			nimln(737, "gc.nim");
			nimln(737, "gc.nim");
			(*objstart).Refcount = (NI)((NU32)((*objstart).Refcount) + (NU32)(8));
			nimln(738, "gc.nim");
			add_41366(&(*gch).Decstack, objstart);
		}
		LA8: ;
	}
	LA3: ;
	popFrame();
}

N_CDECL(void, markstackandregisters_65238)(tgcheap43216* gch) {
	jmp_buf registers;
	nimfr("markStackAndRegisters", "gc.nim")
	nimln(868, "gc.nim");
	{
		int LOC3;
		NI max;
		NI sp;
		nimln(868, "gc.nim");
		nimln(868, "gc.nim");
		LOC3 = 0;
		LOC3 = setjmp(registers);
		if (!(LOC3 == ((NI32) 0))) goto LA4;
		nimln(869, "gc.nim");
		max = ((NI) ((*gch).Stackbottom));
		nimln(870, "gc.nim");
		sp = ((NI) (&registers));
		nimln(872, "gc.nim");
		while (1) {
			nimln(872, "gc.nim");
			nimln(872, "gc.nim");
			if (!((NU32)(sp) < (NU32)((NI32)(max - 32)))) goto LA6;
			nimln(873, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(0)- 0]);
			nimln(874, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(1)- 0]);
			nimln(875, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(2)- 0]);
			nimln(876, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(3)- 0]);
			nimln(877, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(4)- 0]);
			nimln(878, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(5)- 0]);
			nimln(879, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(6)- 0]);
			nimln(880, "gc.nim");
			gcmark_63616(gch, ((void**) (sp))[(7)- 0]);
			nimln(881, "gc.nim");
			nimln(881, "gc.nim");
			sp = (NI)((NU32)(sp) + (NU32)(32));
		} LA6: ;
		nimln(883, "gc.nim");
		while (1) {
			nimln(883, "gc.nim");
			if (!((NU32)(sp) <= (NU32)(max))) goto LA7;
			nimln(884, "gc.nim");
			gcmark_63616(gch, (*((void**) (sp))));
			nimln(885, "gc.nim");
			nimln(885, "gc.nim");
			sp = (NI)((NU32)(sp) + (NU32)(4));
		} LA7: ;
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(void, markthreadstacks_64204)(tgcheap43216* gch) {
	nimfr("markThreadStacks", "gc.nim")
	popFrame();
}

N_NIMCALL(void, excl_42084)(tcellset41302* s, tcell41290* cell) {
	NI u;
	tpagedesc41298* t;
	nimfr("excl", "cellsets.nim")
	nimln(165, "cellsets.nim");
	u = ((NI) (cell));
	nimln(166, "cellsets.nim");
	nimln(166, "cellsets.nim");
	t = cellsetget_41451((*s), (NI)((NU32)(u) >> (NU32)(12)));
	nimln(167, "cellsets.nim");
	{
		nimln(167, "cellsets.nim");
		nimln(167, "cellsets.nim");
		if (!!((t == NIM_NIL))) goto LA3;
		nimln(168, "cellsets.nim");
		nimln(168, "cellsets.nim");
		nimln(168, "cellsets.nim");
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
		nimln(169, "cellsets.nim");
		nimln(169, "cellsets.nim");
		nimln(169, "cellsets.nim");
		nimln(169, "cellsets.nim");
		nimln(170, "cellsets.nim");
		nimln(170, "cellsets.nim");
		nimln(170, "cellsets.nim");
		(*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] & (NI)((NU32) ~((NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31))))))));
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(NIM_BOOL, collectzct_63008)(tgcheap43216* gch) {
	NIM_BOOL result;
	NI* l;
	nimfr("collectZCT", "gc.nim")
	result = 0;
	nimln(904, "gc.nim");
	l = &(*gch).Zct.Len;
	nimln(910, "gc.nim");
	while (1) {
		tcell41290* c;
		nimln(910, "gc.nim");
		if (!(0 < (*l))) goto LA1;
		nimln(911, "gc.nim");
		c = (*gch).Zct.D[(0)- 0];
		nimln(916, "gc.nim");
		nimln(916, "gc.nim");
		(*c).Refcount = (NI)((*c).Refcount & -5);
		nimln(917, "gc.nim");
		nimln(917, "gc.nim");
		(*gch).Zct.D[(0)- 0] = (*gch).Zct.D[((NI32)((*l) - 1))- 0];
		nimln(918, "gc.nim");
		(*l) -= 1;
		nimln(920, "gc.nim");
		{
			nimln(920, "gc.nim");
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA4;
			nimln(928, "gc.nim");
			{
				NIM_BOOL LOC8;
				nimln(928, "gc.nim");
				LOC8 = 0;
				LOC8 = canbecycleroot_44662(c);
				if (!LOC8) goto LA9;
				nimln(928, "gc.nim");
				excl_42084(&(*gch).Cycleroots, c);
			}
			LA9: ;
			nimln(934, "gc.nim");
			preparedealloc_45208(c);
			nimln(935, "gc.nim");
			forallchildren_45015(c, ((NU8) 2));
			nimln(938, "gc.nim");
			rawdealloc_37019(&(*gch).Region, ((void*) (c)));
		}
		LA4: ;
	} LA1: ;
	nimln(952, "gc.nim");
	result = NIM_TRUE;
	popFrame();
	return result;
}

N_NIMCALL(void, markroots_61003)(tgcheap43216* gch) {
	NI tabsize;
	tcell41290* s_61008;
	tcellset41302 HEX3Atmp_61040;
	tpagedesc41298* r_61042;
	nimfr("markRoots", "gc.nim")
	nimln(592, "gc.nim");
	tabsize = 0;
	s_61008 = 0;
	memset((void*)&HEX3Atmp_61040, 0, sizeof(HEX3Atmp_61040));
	nimln(593, "gc.nim");
	HEX3Atmp_61040 = (*gch).Cycleroots;
	nimln(187, "cellsets.nim");
	r_61042 = HEX3Atmp_61040.Head;
	nimln(188, "cellsets.nim");
	while (1) {
		NI i_61044;
		nimln(188, "cellsets.nim");
		nimln(188, "cellsets.nim");
		if (!!((r_61042 == NIM_NIL))) goto LA1;
		nimln(189, "cellsets.nim");
		i_61044 = 0;
		nimln(190, "cellsets.nim");
		while (1) {
			NI w_61046;
			NI j_61048;
			nimln(190, "cellsets.nim");
			if (!(i_61044 <= 15)) goto LA2;
			nimln(191, "cellsets.nim");
			w_61046 = (*r_61042).Bits[(i_61044)- 0];
			nimln(193, "cellsets.nim");
			j_61048 = 0;
			nimln(194, "cellsets.nim");
			while (1) {
				nimln(194, "cellsets.nim");
				nimln(194, "cellsets.nim");
				if (!!((w_61046 == 0))) goto LA3;
				nimln(195, "cellsets.nim");
				{
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					if (!!((((NI) ((NI)(w_61046 & 1))) == 0))) goto LA6;
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					s_61008 = ((tcell41290*) ((NI)((NI)((NU32)((*r_61042).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_61044) << (NU32)(5))) + (NU32)(j_61048))) * (NU32)(8)))));
					nimln(595, "gc.nim");
					tabsize += 1;
					nimln(596, "gc.nim");
					{
						NIM_BOOL LOC10;
						nimln(596, "gc.nim");
						LOC10 = 0;
						nimln(596, "gc.nim");
						nimln(596, "gc.nim");
						LOC10 = (((NI) ((NI)((*s_61008).Refcount & 3))) == 3);
						if (!(LOC10)) goto LA11;
						nimln(596, "gc.nim");
						LOC10 = ((NU32)(8) <= (NU32)((*s_61008).Refcount));
						LA11: ;
						if (!LOC10) goto LA12;
						nimln(597, "gc.nim");
						markgray_60203(s_61008);
					}
					goto LA8;
					LA12: ;
					{
						nimln(599, "gc.nim");
						excl_42084(&(*gch).Cycleroots, s_61008);
						nimln(601, "gc.nim");
						{
							nimln(601, "gc.nim");
							if (!((*s_61008).Refcount == 0)) goto LA17;
							nimln(602, "gc.nim");
							freecycliccell_59417(gch, s_61008);
						}
						LA17: ;
					}
					LA8: ;
				}
				LA6: ;
				nimln(198, "cellsets.nim");
				j_61048 += 1;
				nimln(199, "cellsets.nim");
				nimln(199, "cellsets.nim");
				w_61046 = (NI)((NU32)(w_61046) >> (NU32)(1));
			} LA3: ;
			nimln(200, "cellsets.nim");
			i_61044 += 1;
		} LA2: ;
		nimln(201, "cellsets.nim");
		r_61042 = (*r_61042).Next;
	} LA1: ;
	nimln(603, "gc.nim");
	nimln(603, "gc.nim");
	(*gch).Stat.Cycletablesize = (((*gch).Stat.Cycletablesize >= tabsize) ? (*gch).Stat.Cycletablesize : tabsize);
	popFrame();
}

N_NIMCALL(void, collectroots_63201)(tgcheap43216* gch) {
	tcell41290* s_63205;
	tcellset41302 HEX3Atmp_63207;
	tpagedesc41298* r_63209;
	nimfr("collectRoots", "gc.nim")
	s_63205 = 0;
	memset((void*)&HEX3Atmp_63207, 0, sizeof(HEX3Atmp_63207));
	nimln(690, "gc.nim");
	HEX3Atmp_63207 = (*gch).Cycleroots;
	nimln(187, "cellsets.nim");
	r_63209 = HEX3Atmp_63207.Head;
	nimln(188, "cellsets.nim");
	while (1) {
		NI i_63211;
		nimln(188, "cellsets.nim");
		nimln(188, "cellsets.nim");
		if (!!((r_63209 == NIM_NIL))) goto LA1;
		nimln(189, "cellsets.nim");
		i_63211 = 0;
		nimln(190, "cellsets.nim");
		while (1) {
			NI w_63213;
			NI j_63215;
			nimln(190, "cellsets.nim");
			if (!(i_63211 <= 15)) goto LA2;
			nimln(191, "cellsets.nim");
			w_63213 = (*r_63209).Bits[(i_63211)- 0];
			nimln(193, "cellsets.nim");
			j_63215 = 0;
			nimln(194, "cellsets.nim");
			while (1) {
				nimln(194, "cellsets.nim");
				nimln(194, "cellsets.nim");
				if (!!((w_63213 == 0))) goto LA3;
				nimln(195, "cellsets.nim");
				{
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					if (!!((((NI) ((NI)(w_63213 & 1))) == 0))) goto LA6;
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					s_63205 = ((tcell41290*) ((NI)((NI)((NU32)((*r_63209).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_63211) << (NU32)(5))) + (NU32)(j_63215))) * (NU32)(8)))));
					nimln(691, "gc.nim");
					excl_42084(&(*gch).Cycleroots, s_63205);
					nimln(692, "gc.nim");
					collectwhite_60802(s_63205);
				}
				LA6: ;
				nimln(198, "cellsets.nim");
				j_63215 += 1;
				nimln(199, "cellsets.nim");
				nimln(199, "cellsets.nim");
				w_63213 = (NI)((NU32)(w_63213) >> (NU32)(1));
			} LA3: ;
			nimln(200, "cellsets.nim");
			i_63211 += 1;
		} LA2: ;
		nimln(201, "cellsets.nim");
		r_63209 = (*r_63209).Next;
	} LA1: ;
	popFrame();
}

N_NIMCALL(void, deinit_41420)(tcellset41302* s) {
	tpagedesc41298* it;
	nimfr("deinit", "cellsets.nim")
	nimln(85, "cellsets.nim");
	it = (*s).Head;
	nimln(86, "cellsets.nim");
	while (1) {
		tpagedesc41298* n;
		nimln(86, "cellsets.nim");
		nimln(86, "cellsets.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(87, "cellsets.nim");
		n = (*it).Next;
		nimln(88, "cellsets.nim");
		dealloc_4645(((void*) (it)));
		nimln(89, "cellsets.nim");
		it = n;
	} LA1: ;
	nimln(90, "cellsets.nim");
	(*s).Head = NIM_NIL;
	nimln(91, "cellsets.nim");
	dealloc_4645(((void*) ((*s).Data)));
	nimln(92, "cellsets.nim");
	(*s).Data = NIM_NIL;
	nimln(93, "cellsets.nim");
	(*s).Counter = 0;
	popFrame();
}

N_NIMCALL(void, cellsetreset_49201)(tcellset41302* s) {
	nimfr("cellsetReset", "gc.nim")
	nimln(311, "gc.nim");
	deinit_41420(s);
	nimln(312, "gc.nim");
	init_41411(s);
	popFrame();
}

N_NIMCALL(void, collectcycles_63221)(tgcheap43216* gch) {
	tcell41290* s_63401;
	tcellset41302 HEX3Atmp_63601;
	tpagedesc41298* r_63603;
	nimfr("collectCycles", "gc.nim")
	nimln(696, "gc.nim");
	while (1) {
		NIM_BOOL LOC2;
		nimln(696, "gc.nim");
		if (!(0 < (*gch).Zct.Len)) goto LA1;
		nimln(696, "gc.nim");
		nimln(696, "gc.nim");
		LOC2 = 0;
		LOC2 = collectzct_63008(gch);
	} LA1: ;
	nimln(703, "gc.nim");
	markroots_61003(gch);
	s_63401 = 0;
	memset((void*)&HEX3Atmp_63601, 0, sizeof(HEX3Atmp_63601));
	nimln(705, "gc.nim");
	HEX3Atmp_63601 = (*gch).Cycleroots;
	nimln(187, "cellsets.nim");
	r_63603 = HEX3Atmp_63601.Head;
	nimln(188, "cellsets.nim");
	while (1) {
		NI i_63605;
		nimln(188, "cellsets.nim");
		nimln(188, "cellsets.nim");
		if (!!((r_63603 == NIM_NIL))) goto LA3;
		nimln(189, "cellsets.nim");
		i_63605 = 0;
		nimln(190, "cellsets.nim");
		while (1) {
			NI w_63607;
			NI j_63609;
			nimln(190, "cellsets.nim");
			if (!(i_63605 <= 15)) goto LA4;
			nimln(191, "cellsets.nim");
			w_63607 = (*r_63603).Bits[(i_63605)- 0];
			nimln(193, "cellsets.nim");
			j_63609 = 0;
			nimln(194, "cellsets.nim");
			while (1) {
				nimln(194, "cellsets.nim");
				nimln(194, "cellsets.nim");
				if (!!((w_63607 == 0))) goto LA5;
				nimln(195, "cellsets.nim");
				{
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					nimln(195, "cellsets.nim");
					if (!!((((NI) ((NI)(w_63607 & 1))) == 0))) goto LA8;
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(196, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					nimln(197, "cellsets.nim");
					s_63401 = ((tcell41290*) ((NI)((NI)((NU32)((*r_63603).Key) << (NU32)(12)) | (NI)((NU32)((NI)((NU32)((NI)((NU32)(i_63605) << (NU32)(5))) + (NU32)(j_63609))) * (NU32)(8)))));
					nimln(705, "gc.nim");
					scan_60602(s_63401);
				}
				LA8: ;
				nimln(198, "cellsets.nim");
				j_63609 += 1;
				nimln(199, "cellsets.nim");
				nimln(199, "cellsets.nim");
				w_63607 = (NI)((NU32)(w_63607) >> (NU32)(1));
			} LA5: ;
			nimln(200, "cellsets.nim");
			i_63605 += 1;
		} LA4: ;
		nimln(201, "cellsets.nim");
		r_63603 = (*r_63603).Next;
	} LA3: ;
	nimln(706, "gc.nim");
	collectroots_63201(gch);
	nimln(708, "gc.nim");
	cellsetreset_49201(&(*gch).Cycleroots);
	popFrame();
}

N_NIMCALL(NI, gettotalmem_5265)(void) {
	NI result;
	nimfr("getTotalMem", "alloc.nim")
	result = 0;
	nimln(801, "alloc.nim");
	nimln(801, "alloc.nim");
	result = gch_43244.Region.Currmem;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NI, getfreemem_5263)(void) {
	NI result;
	nimfr("getFreeMem", "alloc.nim")
	result = 0;
	nimln(798, "alloc.nim");
	result = gch_43244.Region.Freemem;
	popFrame();
	return result;
}

N_NIMCALL(NI, getoccupiedmem_5261)(void) {
	NI result;
	NI LOC1;
	NI LOC2;
	nimfr("getOccupiedMem", "alloc.nim")
	result = 0;
	nimln(802, "alloc.nim");
	nimln(802, "alloc.nim");
	nimln(802, "alloc.nim");
	nimln(802, "alloc.nim");
	LOC1 = 0;
	LOC1 = gettotalmem_5265();
	nimln(802, "alloc.nim");
	LOC2 = 0;
	LOC2 = getfreemem_5263();
	result = (NI32)(LOC1 - LOC2);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, unmarkstackandregisters_67403)(tgcheap43216* gch) {
	tcell41290** d;
	NI i_67418;
	NI HEX3Atmp_67601;
	NI res_67603;
	nimfr("unmarkStackAndRegisters", "gc.nim")
	nimln(955, "gc.nim");
	d = (*gch).Decstack.D;
	i_67418 = 0;
	HEX3Atmp_67601 = 0;
	nimln(956, "gc.nim");
	nimln(956, "gc.nim");
	HEX3Atmp_67601 = (NI32)((*gch).Decstack.Len - 1);
	nimln(1458, "system.nim");
	res_67603 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_67603 <= HEX3Atmp_67601)) goto LA1;
		nimln(1458, "system.nim");
		i_67418 = res_67603;
		nimln(958, "gc.nim");
		decref_46602(d[(i_67418)- 0]);
		nimln(1461, "system.nim");
		res_67603 += 1;
	} LA1: ;
	nimln(964, "gc.nim");
	(*gch).Decstack.Len = 0;
	popFrame();
}

N_NIMCALL(void, collectctbody_67607)(tgcheap43216* gch) {
	NI LOC1;
	nimfr("collectCTBody", "gc.nim")
	nimln(971, "gc.nim");
	nimln(971, "gc.nim");
	nimln(971, "gc.nim");
	LOC1 = 0;
	LOC1 = stacksize_65008();
	(*gch).Stat.Maxstacksize = (((*gch).Stat.Maxstacksize >= LOC1) ? (*gch).Stat.Maxstacksize : LOC1);
	nimln(973, "gc.nim");
	prepareforinteriorpointerchecking_38678(&(*gch).Region);
	nimln(974, "gc.nim");
	markstackandregisters_65238(gch);
	nimln(975, "gc.nim");
	markthreadstacks_64204(gch);
	nimln(976, "gc.nim");
	nimln(976, "gc.nim");
	(*gch).Stat.Maxstackcells = (((*gch).Stat.Maxstackcells >= (*gch).Decstack.Len) ? (*gch).Stat.Maxstackcells : (*gch).Decstack.Len);
	nimln(977, "gc.nim");
	(*gch).Stat.Stackscans += 1;
	nimln(978, "gc.nim");
	{
		NIM_BOOL LOC4;
		nimln(978, "gc.nim");
		LOC4 = 0;
		LOC4 = collectzct_63008(gch);
		if (!LOC4) goto LA5;
		nimln(980, "gc.nim");
		{
			NIM_BOOL LOC9;
			NI LOC10;
			NI LOC14;
			nimln(980, "gc.nim");
			LOC9 = 0;
			nimln(980, "gc.nim");
			nimln(980, "gc.nim");
			LOC10 = 0;
			LOC10 = getoccupiedmem_41232(&(*gch).Region);
			LOC9 = ((*gch).Cyclethreshold <= LOC10);
			if (LOC9) goto LA11;
			LOC9 = NIM_FALSE;
			LA11: ;
			if (!LOC9) goto LA12;
			nimln(981, "gc.nim");
			collectcycles_63221(gch);
			nimln(983, "gc.nim");
			(*gch).Stat.Cyclecollections += 1;
			nimln(984, "gc.nim");
			nimln(984, "gc.nim");
			nimln(984, "gc.nim");
			nimln(984, "gc.nim");
			LOC14 = 0;
			LOC14 = getoccupiedmem_5261();
			(*gch).Cyclethreshold = ((4194304 >= (NI32)(LOC14 * 2)) ? 4194304 : (NI32)(LOC14 * 2));
			nimln(986, "gc.nim");
			nimln(986, "gc.nim");
			(*gch).Stat.Maxthreshold = (((*gch).Stat.Maxthreshold >= (*gch).Cyclethreshold) ? (*gch).Stat.Maxthreshold : (*gch).Cyclethreshold);
		}
		LA12: ;
	}
	LA5: ;
	nimln(987, "gc.nim");
	unmarkstackandregisters_67403(gch);
	popFrame();
}

N_NIMCALL(void, collectct_45008)(tgcheap43216* gch) {
	nimfr("collectCT", "gc.nim")
	nimln(1003, "gc.nim");
	{
		NIM_BOOL LOC3;
		NIM_BOOL LOC4;
		NIM_BOOL LOC5;
		NIM_BOOL LOC7;
		NI LOC9;
		nimln(1004, "gc.nim");
		LOC3 = 0;
		nimln(1004, "gc.nim");
		LOC4 = 0;
		nimln(1003, "gc.nim");
		LOC5 = 0;
		nimln(1003, "gc.nim");
		LOC5 = (500 <= (*gch).Zct.Len);
		if (LOC5) goto LA6;
		nimln(1003, "gc.nim");
		LOC7 = 0;
		LOC7 = NIM_TRUE;
		if (!(LOC7)) goto LA8;
		nimln(1004, "gc.nim");
		nimln(1004, "gc.nim");
		LOC9 = 0;
		LOC9 = getoccupiedmem_41232(&(*gch).Region);
		LOC7 = ((*gch).Cyclethreshold <= LOC9);
		LA8: ;
		LOC5 = LOC7;
		LA6: ;
		LOC4 = LOC5;
		if (LOC4) goto LA10;
		LOC4 = NIM_FALSE;
		LA10: ;
		LOC3 = LOC4;
		if (!(LOC3)) goto LA11;
		nimln(1005, "gc.nim");
		LOC3 = ((*gch).Recgclock == 0);
		LA11: ;
		if (!LOC3) goto LA12;
		nimln(1010, "gc.nim");
		collectctbody_67607(gch);
	}
	LA12: ;
	popFrame();
}

static N_INLINE(void, addnewobjtozct_50278)(tcell41290* res, tgcheap43216* gch) {
	NI l;
	tcell41290** d;
	nimfr("addNewObjToZCT", "gc.nim")
	nimln(380, "gc.nim");
	l = (*gch).Zct.Len;
	nimln(381, "gc.nim");
	d = (*gch).Zct.D;
	nimln(390, "gc.nim");
	{
		tcell41290* c;
		nimln(390, "gc.nim");
		if (!(8 < l)) goto LA3;
		c = 0;
		nimln(385, "gc.nim");
		nimln(392, "gc.nim");
		c = d[((NI32)(l - 1))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA7;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(392, "gc.nim");
			d[((NI32)(l - 1))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA7: ;
		nimln(385, "gc.nim");
		nimln(393, "gc.nim");
		c = d[((NI32)(l - 2))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA11;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(393, "gc.nim");
			d[((NI32)(l - 2))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA11: ;
		nimln(385, "gc.nim");
		nimln(394, "gc.nim");
		c = d[((NI32)(l - 3))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA15;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(394, "gc.nim");
			d[((NI32)(l - 3))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA15: ;
		nimln(385, "gc.nim");
		nimln(395, "gc.nim");
		c = d[((NI32)(l - 4))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA19;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(395, "gc.nim");
			d[((NI32)(l - 4))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA19: ;
		nimln(385, "gc.nim");
		nimln(396, "gc.nim");
		c = d[((NI32)(l - 5))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA23;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(396, "gc.nim");
			d[((NI32)(l - 5))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA23: ;
		nimln(385, "gc.nim");
		nimln(397, "gc.nim");
		c = d[((NI32)(l - 6))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA27;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(397, "gc.nim");
			d[((NI32)(l - 6))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA27: ;
		nimln(385, "gc.nim");
		nimln(398, "gc.nim");
		c = d[((NI32)(l - 7))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA31;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(398, "gc.nim");
			d[((NI32)(l - 7))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA31: ;
		nimln(385, "gc.nim");
		nimln(399, "gc.nim");
		c = d[((NI32)(l - 8))- 0];
		nimln(386, "gc.nim");
		{
			nimln(386, "gc.nim");
			if (!((NU32)(8) <= (NU32)((*c).Refcount))) goto LA35;
			nimln(387, "gc.nim");
			nimln(387, "gc.nim");
			(*c).Refcount = (NI)((*c).Refcount & -5);
			nimln(388, "gc.nim");
			nimln(399, "gc.nim");
			d[((NI32)(l - 8))- 0] = res;
			nimln(389, "gc.nim");
			goto BeforeRet;
		}
		LA35: ;
		nimln(400, "gc.nim");
		add_41366(&(*gch).Zct, res);
	}
	goto LA1;
	LA3: ;
	{
		nimln(402, "gc.nim");
		d[(l)- 0] = res;
		nimln(403, "gc.nim");
		(*gch).Zct.Len += 1;
	}
	LA1: ;
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void*, rawnewobj_50802)(TNimType* typ, NI size, tgcheap43216* gch) {
	void* result;
	tcell41290* res;
	void* LOC1;
	nimfr("rawNewObj", "gc.nim")
	result = 0;
	nimln(425, "gc.nim");
	collectct_45008(gch);
	nimln(426, "gc.nim");
	nimln(426, "gc.nim");
	nimln(426, "gc.nim");
	nimln(426, "gc.nim");
	LOC1 = 0;
	LOC1 = rawalloc_30704(&(*gch).Region, (NI32)(size + ((NI)sizeof(tcell41290))));
	res = ((tcell41290*) (LOC1));
	nimln(429, "gc.nim");
	(*res).Typ = typ;
	nimln(435, "gc.nim");
	(*res).Refcount = 4;
	nimln(438, "gc.nim");
	addnewobjtozct_50278(res, gch);
	nimln(445, "gc.nim");
	result = celltousr_44624(res);
	popFrame();
	return result;
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	nimfr("newObj", "gc.nim")
	result = 0;
	nimln(451, "gc.nim");
	result = rawnewobj_50802(typ, size, &gch_43244);
	nimln(452, "gc.nim");
	zeroMem(result, size);
	popFrame();
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	tcell41290* res;
	void* LOC1;
	nimfr("newObjRC1", "gc.nim")
	result = 0;
	nimln(468, "gc.nim");
	collectct_45008(&gch_43244);
	nimln(471, "gc.nim");
	nimln(471, "gc.nim");
	nimln(471, "gc.nim");
	nimln(471, "gc.nim");
	LOC1 = 0;
	LOC1 = rawalloc_30704(&gch_43244.Region, (NI32)(size + ((NI)sizeof(tcell41290))));
	res = ((tcell41290*) (LOC1));
	nimln(475, "gc.nim");
	(*res).Typ = typ;
	nimln(480, "gc.nim");
	(*res).Refcount = 8;
	nimln(488, "gc.nim");
	result = celltousr_44624(res);
	nimln(489, "gc.nim");
	zeroMem(result, size);
	popFrame();
	return result;
}

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

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tcell41290* c;
	nimfr("nimGCunrefNoCycle", "gc.nim")
	nimln(233, "gc.nim");
	c = usrtocell_44643(p);
	nimln(235, "gc.nim");
	{
		nimln(167, "gc.nim");
		(*c).Refcount -= 8;
		nimln(168, "gc.nim");
		if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA3;
		nimln(236, "gc.nim");
		rtladdzct_46202(c);
	}
	LA3: ;
	popFrame();
}

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

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

N_NIMCALL(void*, growobj_56404)(void* old, NI newsize, tgcheap43216* gch) {
	void* result;
	tcell41290* ol;
	tcell41290* res;
	void* LOC1;
	NI elemsize;
	NI oldsize;
	nimfr("growObj", "gc.nim")
	result = 0;
	nimln(502, "gc.nim");
	collectct_45008(gch);
	nimln(503, "gc.nim");
	ol = usrtocell_44643(old);
	nimln(508, "gc.nim");
	nimln(508, "gc.nim");
	nimln(508, "gc.nim");
	nimln(508, "gc.nim");
	LOC1 = 0;
	LOC1 = rawalloc_30704(&(*gch).Region, (NI32)(newsize + ((NI)sizeof(tcell41290))));
	res = ((tcell41290*) (LOC1));
	nimln(509, "gc.nim");
	elemsize = 1;
	nimln(510, "gc.nim");
	{
		nimln(510, "gc.nim");
		nimln(510, "gc.nim");
		if (!!(((*(*ol).Typ).kind == ((NU8) 28)))) goto LA4;
		nimln(510, "gc.nim");
		elemsize = (*(*(*ol).Typ).base).size;
	}
	LA4: ;
	nimln(512, "gc.nim");
	nimln(512, "gc.nim");
	nimln(512, "gc.nim");
	oldsize = (NI32)((NI32)((*((TGenericSeq*) (old))).len * elemsize) + 8);
	nimln(513, "gc.nim");
	nimln(513, "gc.nim");
	nimln(513, "gc.nim");
	memcpy(((void*) (res)), ((void*) (ol)), (NI32)(oldsize + ((NI)sizeof(tcell41290))));
	nimln(514, "gc.nim");
	nimln(514, "gc.nim");
	nimln(514, "gc.nim");
	nimln(514, "gc.nim");
	nimln(515, "gc.nim");
	zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (res))) + (NU32)(oldsize))) + (NU32)(((NI)sizeof(tcell41290)))))), (NI32)(newsize - oldsize));
	nimln(522, "gc.nim");
	{
		NI j;
		tcell41290** d;
		nimln(522, "gc.nim");
		nimln(522, "gc.nim");
		nimln(522, "gc.nim");
		if (!!(((NI)((*ol).Refcount & 4) == 0))) goto LA8;
		nimln(523, "gc.nim");
		nimln(523, "gc.nim");
		j = (NI32)((*gch).Zct.Len - 1);
		nimln(524, "gc.nim");
		d = (*gch).Zct.D;
		nimln(525, "gc.nim");
		while (1) {
			nimln(525, "gc.nim");
			if (!(0 <= j)) goto LA10;
			nimln(526, "gc.nim");
			{
				nimln(526, "gc.nim");
				if (!(d[(j)- 0] == ol)) goto LA13;
				nimln(527, "gc.nim");
				d[(j)- 0] = res;
				nimln(528, "gc.nim");
				goto LA10;
			}
			LA13: ;
			nimln(529, "gc.nim");
			j -= 1;
		} LA10: ;
	}
	LA8: ;
	nimln(530, "gc.nim");
	{
		NIM_BOOL LOC17;
		nimln(530, "gc.nim");
		LOC17 = 0;
		LOC17 = canbecycleroot_44662(ol);
		if (!LOC17) goto LA18;
		nimln(530, "gc.nim");
		excl_42084(&(*gch).Cycleroots, ol);
	}
	LA18: ;
	nimln(538, "gc.nim");
	rawdealloc_37019(&(*gch).Region, ((void*) (ol)));
	nimln(546, "gc.nim");
	result = celltousr_44624(res);
	popFrame();
	return result;
}

N_NIMCALL(void*, growobj_59410)(void* old, NI newsize) {
	void* result;
	nimfr("growObj", "gc.nim")
	result = 0;
	nimln(551, "gc.nim");
	result = growobj_56404(old, newsize, &gch_43244);
	popFrame();
	return result;
}

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

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

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

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

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

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

N_NIMCALL(void, auxwritestacktrace_13605)(TFrame* f, NimStringDesc** s) {
	TFrame* it;
	NI i;
	NI total;
	TFrame* b;
	NI skipped;
	NI j_14014;
	NI HEX3Atmp_14058;
	NI res_14060;
	it = f;
	i = 0;
	total = 0;
	while (1) {
		NIM_BOOL LOC2;
		LOC2 = 0;
		LOC2 = !((it == NIM_NIL));
		if (!(LOC2)) goto LA3;
		LOC2 = (i <= 95);
		LA3: ;
		if (!LOC2) goto LA1;
		tempframes_13604[(i)- 0] = it;
		i += 1;
		total += 1;
		it = (*it).prev;
	} LA1: ;
	b = it;
	while (1) {
		if (!!((it == NIM_NIL))) goto LA4;
		total += 1;
		it = (*it).prev;
	} LA4: ;
	skipped = 0;
	{
		NI j_13916;
		NI res_14051;
		if (!(128 < total)) goto LA7;
		skipped = (NI32)((NI32)((NI32)(total - i) - 32) + 1);
		j_13916 = 0;
		res_14051 = 1;
		while (1) {
			if (!(res_14051 <= skipped)) goto LA9;
			j_13916 = res_14051;
			{
				if (!!((b == NIM_NIL))) goto LA12;
				b = (*b).prev;
			}
			LA12: ;
			res_14051 += 1;
		} LA9: ;
		tempframes_13604[(i)- 0] = NIM_NIL;
		i += 1;
	}
	LA7: ;
	while (1) {
		NIM_BOOL LOC15;
		LOC15 = 0;
		LOC15 = !((b == NIM_NIL));
		if (!(LOC15)) goto LA16;
		LOC15 = (i <= 127);
		LA16: ;
		if (!LOC15) goto LA14;
		tempframes_13604[(i)- 0] = b;
		i += 1;
		b = (*b).prev;
	} LA14: ;
	j_14014 = 0;
	HEX3Atmp_14058 = 0;
	HEX3Atmp_14058 = (NI32)(i - 1);
	res_14060 = HEX3Atmp_14058;
	while (1) {
		if (!(0 <= res_14060)) goto LA17;
		j_14014 = res_14060;
		{
			NimStringDesc* LOC22;
			if (!(tempframes_13604[(j_14014)- 0] == NIM_NIL)) goto LA20;
			(*s) = resizeString((*s), 1);
appendString((*s), ((NimStringDesc*) &TMP14));
			LOC22 = 0;
			LOC22 = nimIntToStr(skipped);
			(*s) = resizeString((*s), LOC22->Sup.len + 0);
appendString((*s), LOC22);
			(*s) = resizeString((*s), 19);
appendString((*s), ((NimStringDesc*) &TMP15));
		}
		goto LA18;
		LA20: ;
		{
			NI oldlen;
			NI k_14048;
			NI HEX3Atmp_14054;
			NI res_14056;
			oldlen = (*s)->Sup.len;
			add_6843(s, (*tempframes_13604[(j_14014)- 0]).filename);
			{
				NimStringDesc* LOC28;
				if (!(0 < (*tempframes_13604[(j_14014)- 0]).line)) goto LA26;
				(*s) = addChar((*s), 40);
				LOC28 = 0;
				LOC28 = nimIntToStr((*tempframes_13604[(j_14014)- 0]).line);
				(*s) = resizeString((*s), LOC28->Sup.len + 0);
appendString((*s), LOC28);
				(*s) = addChar((*s), 41);
			}
			LA26: ;
			k_14048 = 0;
			HEX3Atmp_14054 = 0;
			HEX3Atmp_14054 = ((1 >= (NI32)(25 - (NI32)((*s)->Sup.len - oldlen))) ? 1 : (NI32)(25 - (NI32)((*s)->Sup.len - oldlen)));
			res_14056 = 1;
			while (1) {
				if (!(res_14056 <= HEX3Atmp_14054)) goto LA29;
				k_14048 = res_14056;
				(*s) = addChar((*s), 32);
				res_14056 += 1;
			} LA29: ;
			add_6843(s, (*tempframes_13604[(j_14014)- 0]).procname);
		}
		LA18: ;
		(*s) = resizeString((*s), 1);
appendString((*s), ((NimStringDesc*) &TMP16));
		res_14060 -= 1;
	} LA17: ;
}

N_NIMCALL(void, rawwritestacktrace_14201)(NimStringDesc** s) {
	{
		if (!(frameptr_13038 == NIM_NIL)) goto LA3;
		(*s) = resizeString((*s), 29);
appendString((*s), ((NimStringDesc*) &TMP12));
	}
	goto LA1;
	LA3: ;
	{
		(*s) = resizeString((*s), 34);
appendString((*s), ((NimStringDesc*) &TMP13));
		auxwritestacktrace_13605(frameptr_13038, s);
	}
	LA1: ;
}

static N_INLINE(void, incref_47027)(tcell41290* c) {
	nimfr("incRef", "gc.nim")
	nimln(216, "gc.nim");
	nimln(216, "gc.nim");
	(*c).Refcount = (NI)((NU32)((*c).Refcount) + (NU32)(8));
	nimln(219, "gc.nim");
	{
		NIM_BOOL LOC3;
		nimln(219, "gc.nim");
		LOC3 = 0;
		LOC3 = canbecycleroot_44662(c);
		if (!LOC3) goto LA4;
		nimln(220, "gc.nim");
		rtladdcycleroot_45435(c);
	}
	LA4: ;
	popFrame();
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	nimfr("asgnRef", "gc.nim")
	nimln(244, "gc.nim");
	{
		tcell41290* LOC5;
		nimln(244, "gc.nim");
		nimln(244, "gc.nim");
		if (!!((src == NIM_NIL))) goto LA3;
		nimln(244, "gc.nim");
		nimln(244, "gc.nim");
		LOC5 = 0;
		LOC5 = usrtocell_44643(src);
		incref_47027(LOC5);
	}
	LA3: ;
	nimln(245, "gc.nim");
	{
		tcell41290* LOC10;
		nimln(245, "gc.nim");
		nimln(245, "gc.nim");
		if (!!(((*dest) == NIM_NIL))) goto LA8;
		nimln(245, "gc.nim");
		nimln(245, "gc.nim");
		LOC10 = 0;
		LOC10 = usrtocell_44643((*dest));
		decref_46602(LOC10);
	}
	LA8: ;
	nimln(246, "gc.nim");
	(*dest) = src;
	popFrame();
}

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

N_NIMCALL(NIM_BOOL, isObj)(TNimType* obj, TNimType* subclass) {
	NIM_BOOL result;
	TNimType* x;
	result = 0;
	x = obj;
	{
		if (!(x == subclass)) goto LA3;
		result = NIM_TRUE;
		goto BeforeRet;
	}
	LA3: ;
	while (1) {
		if (!!((x == subclass))) goto LA5;
		{
			if (!(x == NIM_NIL)) goto LA8;
			result = NIM_FALSE;
			goto BeforeRet;
		}
		LA8: ;
		x = (*x).base;
	} LA5: ;
	result = NIM_TRUE;
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

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

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

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

N_NIMCALL(void, showerrormessage_13007)(NCSTRING data) {
	{
		NimStringDesc* LOC5;
		if (!!((errormessagewriter_12804 == NIM_NIL))) goto LA3;
		LOC5 = 0;
		LOC5 = cstrToNimstr(data);
		errormessagewriter_12804(LOC5);
	}
	goto LA1;
	LA3: ;
	{
		writetostderr_13001(data);
	}
	LA1: ;
}

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

N_NIMCALL(void, raiseexceptionaux_14602)(E_Base* e) {
	{
		if (!!((localraisehook_6824 == NIM_NIL))) goto LA3;
		{
			NIM_BOOL LOC7;
			LOC7 = 0;
			LOC7 = localraisehook_6824(e);
			if (!!(LOC7)) goto LA8;
			goto BeforeRet;
		}
		LA8: ;
	}
	LA3: ;
	{
		if (!!((globalraisehook_6819 == NIM_NIL))) goto LA12;
		{
			NIM_BOOL LOC16;
			LOC16 = 0;
			LOC16 = globalraisehook_6819(e);
			if (!!(LOC16)) goto LA17;
			goto BeforeRet;
		}
		LA17: ;
	}
	LA12: ;
	{
		if (!!((exchandler_13039 == NIM_NIL))) goto LA21;
		{
			NIM_BOOL LOC25;
			LOC25 = 0;
			LOC25 = !((*exchandler_13039).hasRaiseAction);
			if (LOC25) goto LA26;
			LOC25 = (*exchandler_13039).raiseAction.ClEnv? (*exchandler_13039).raiseAction.ClPrc(e, (*exchandler_13039).raiseAction.ClEnv):((TMP17)((*exchandler_13039).raiseAction.ClPrc))(e);
			LA26: ;
			if (!LOC25) goto LA27;
			pushCurrentException(e);
			longjmp((*exchandler_13039).context, ((int) 1));
		}
		LA27: ;
	}
	goto LA19;
	LA21: ;
	{
		if (!isObj((*e).Sup.m_type, (&NTI2457))) goto LA30;
		showerrormessage_13007((*e).name);
		quitordebug_14419();
	}
	goto LA19;
	LA30: ;
	{
		NimStringDesc* buf;
		NimStringDesc* LOC42;
		buf = rawNewString(2000);
		{
			if (!(*e).trace == 0) goto LA35;
			rawwritestacktrace_14201(&buf);
		}
		goto LA33;
		LA35: ;
		{
			buf = resizeString(buf, (*e).trace->Sup.len + 0);
appendString(buf, (*e).trace);
		}
		LA33: ;
		buf = resizeString(buf, 28);
appendString(buf, ((NimStringDesc*) &TMP18));
		{
			if (!!((*e).message == 0)) goto LA40;
			buf = resizeString(buf, (*e).message->Sup.len + 0);
appendString(buf, (*e).message);
		}
		LA40: ;
		buf = resizeString(buf, 2);
appendString(buf, ((NimStringDesc*) &TMP19));
		LOC42 = 0;
		LOC42 = cstrToNimstr((*e).name);
		buf = resizeString(buf, LOC42->Sup.len + 0);
appendString(buf, LOC42);
		buf = resizeString(buf, 2);
appendString(buf, ((NimStringDesc*) &TMP20));
		showerrormessage_13007(buf->data);
		quitordebug_14419();
	}
	LA19: ;
	BeforeRet: ;
}

N_NIMCALL(void, raiseException)(E_Base* e, NCSTRING ename) {
	NimStringDesc* LOC1;
	(*e).name = ename;
	LOC1 = 0;
	LOC1 = (*e).trace; (*e).trace = copyStringRC1(((NimStringDesc*) &TMP11));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	rawwritestacktrace_14201(&(*e).trace);
	raiseexceptionaux_14602(e);
}

N_NIMCALL(NIM_BOOL, open_10203)(FILE** f, NimStringDesc* filename, NU8 mode, NI bufsize) {
	NIM_BOOL result;
	void* p;
	nimfr("open", "sysio.nim")
	result = 0;
	nimln(213, "sysio.nim");
	p = fopen(filename->data, formatopen_73210[(mode)- 0]->data);
	nimln(214, "sysio.nim");
	nimln(214, "sysio.nim");
	nimln(214, "sysio.nim");
	result = !((p == NIM_NIL));
	nimln(215, "sysio.nim");
	(*f) = ((FILE*) (p));
	nimln(216, "sysio.nim");
	{
		NIM_BOOL LOC3;
		nimln(216, "sysio.nim");
		LOC3 = 0;
		nimln(216, "sysio.nim");
		LOC3 = (0 < bufsize);
		if (!(LOC3)) goto LA4;
		nimln(216, "sysio.nim");
		LOC3 = (bufsize <= 2147483647);
		LA4: ;
		if (!LOC3) goto LA5;
		nimln(217, "sysio.nim");
		{
			int LOC9;
			eoutofmemory2457* e_73230;
			NimStringDesc* LOC12;
			nimln(217, "sysio.nim");
			nimln(217, "sysio.nim");
			nimln(217, "sysio.nim");
			LOC9 = 0;
			LOC9 = setvbuf((*f), NIM_NIL, _IOFBF, ((int) (bufsize)));
			if (!!((LOC9 == ((NI32) 0)))) goto LA10;
			e_73230 = 0;
			nimln(2005, "system.nim");
			e_73230 = (eoutofmemory2457*) newObj((&NTI73401), sizeof(eoutofmemory2457));
			(*e_73230).Sup.Sup.Sup.Sup.m_type = (&NTI2457);
			nimln(2006, "system.nim");
			LOC12 = 0;
			LOC12 = (*e_73230).Sup.Sup.Sup.message; (*e_73230).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP2));
			if (LOC12) nimGCunrefNoCycle(LOC12);
			nimln(2007, "system.nim");
			raiseException((E_Base*)e_73230, "EOutOfMemory");
		}
		LA10: ;
	}
	goto LA1;
	LA5: ;
	{
		int LOC16;
		nimln(219, "sysio.nim");
		if (!(bufsize == 0)) goto LA14;
		nimln(220, "sysio.nim");
		nimln(220, "sysio.nim");
		LOC16 = 0;
		LOC16 = setvbuf((*f), NIM_NIL, _IONBF, ((int) 0));
	}
	goto LA1;
	LA14: ;
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, open_10211)(FILE** f, int filehandle, NU8 mode) {
	NIM_BOOL result;
	nimfr("open", "sysio.nim")
	result = 0;
	nimln(230, "sysio.nim");
	(*f) = fdopen(filehandle, formatopen_73210[(mode)- 0]->data);
	nimln(231, "sysio.nim");
	nimln(231, "sysio.nim");
	nimln(231, "sysio.nim");
	result = !(((*f) == NIM_NIL));
	popFrame();
	return result;
}
N_NIMCALL(void, TMP21)(void* p, NI op) {
	eio2433* a;
	a = (eio2433*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	nimfr("asgnRefNoCycle", "gc.nim")
	nimln(251, "gc.nim");
	{
		tcell41290* c;
		nimln(251, "gc.nim");
		nimln(251, "gc.nim");
		if (!!((src == NIM_NIL))) goto LA3;
		nimln(252, "gc.nim");
		c = usrtocell_44643(src);
		nimln(169, "gc.nim");
		(*c).Refcount += 8;
	}
	LA3: ;
	nimln(254, "gc.nim");
	{
		tcell41290* c;
		nimln(254, "gc.nim");
		nimln(254, "gc.nim");
		if (!!(((*dest) == NIM_NIL))) goto LA7;
		nimln(255, "gc.nim");
		c = usrtocell_44643((*dest));
		nimln(256, "gc.nim");
		{
			nimln(167, "gc.nim");
			(*c).Refcount -= 8;
			nimln(168, "gc.nim");
			if (!((NU32)((*c).Refcount) < (NU32)(8))) goto LA11;
			nimln(257, "gc.nim");
			rtladdzct_46202(c);
		}
		LA11: ;
	}
	LA7: ;
	nimln(258, "gc.nim");
	(*dest) = src;
	popFrame();
}

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

N_NIMCALL(NIM_BOOL, reopen_10420)(FILE* f, NimStringDesc* filename, NU8 mode) {
	NIM_BOOL result;
	void* p;
	FILE* LOC1;
	nimfr("reopen", "sysio.nim")
	result = 0;
	nimln(223, "sysio.nim");
	nimln(223, "sysio.nim");
	LOC1 = 0;
	LOC1 = freopen(filename->data, formatopen_73210[(mode)- 0]->data, f);
	p = ((void*) (LOC1));
	nimln(224, "sysio.nim");
	nimln(224, "sysio.nim");
	nimln(224, "sysio.nim");
	result = !((p == NIM_NIL));
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, endoffile_10428)(FILE* f) {
	NIM_BOOL result;
	int c;
	nimfr("endOfFile", "sysio.nim")
	result = 0;
	nimln(166, "sysio.nim");
	c = fgetc(f);
	nimln(167, "sysio.nim");
	ungetc(c, f);
	nimln(168, "sysio.nim");
	nimln(168, "sysio.nim");
	nimln(168, "sysio.nim");
	result = (c < ((NI32) 0));
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NI, rawfilesize_72885)(FILE* file) {
	NI result;
	NI oldpos;
	NI LOC1;
	NI LOC2;
	nimfr("rawFileSize", "sysio.nim")
	result = 0;
	nimln(125, "sysio.nim");
	oldpos = ftell(file);
	nimln(126, "sysio.nim");
	nimln(126, "sysio.nim");
	LOC1 = 0;
	LOC1 = fseek(file, 0, 2);
	nimln(127, "sysio.nim");
	result = ftell(file);
	nimln(128, "sysio.nim");
	nimln(128, "sysio.nim");
	LOC2 = 0;
	LOC2 = fseek(file, oldpos, 0);
	popFrame();
	return result;
}

N_NIMCALL(NI, readbuffer_10627)(FILE* f, void* buffer, NI len) {
	NI result;
	nimfr("readBuffer", "sysio.nim")
	result = 0;
	nimln(237, "sysio.nim");
	result = fread(buffer, 1, len, f);
	popFrame();
	return result;
}

N_NOINLINE(void, raiseeio_72205)(NimStringDesc* msg) {
	eio2433* e_72210;
	NimStringDesc* LOC1;
	nimfr("raiseEIO", "sysio.nim")
	e_72210 = 0;
	nimln(2005, "system.nim");
	e_72210 = (eio2433*) newObj((&NTI10401), sizeof(eio2433));
	(*e_72210).Sup.Sup.Sup.Sup.m_type = (&NTI2433);
	nimln(2006, "system.nim");
	LOC1 = 0;
	LOC1 = (*e_72210).Sup.Sup.Sup.message; (*e_72210).Sup.Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(2007, "system.nim");
	raiseException((E_Base*)e_72210, "EIO");
	popFrame();
}

N_NIMCALL(NimStringDesc*, readallfile_72892)(FILE* file, NI len) {
	NimStringDesc* result;
	nimfr("readAllFile", "sysio.nim")
	result = 0;
	nimln(133, "sysio.nim");
	nimln(133, "sysio.nim");
	result = mnewString(len);
	nimln(134, "sysio.nim");
	{
		NI LOC3;
		nimln(134, "sysio.nim");
		nimln(134, "sysio.nim");
		nimln(134, "sysio.nim");
		LOC3 = 0;
		LOC3 = readbuffer_10627(file, ((void*) (&result->data[0])), len);
		if (!!((LOC3 == len))) goto LA4;
		nimln(135, "sysio.nim");
		raiseeio_72205(((NimStringDesc*) &TMP23));
	}
	LA4: ;
	popFrame();
	return result;
}

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

N_NIMCALL(NimStringDesc*, readallbuffer_72876)(FILE* file) {
	NimStringDesc* result;
	NimStringDesc* buffer;
	NI bytesread;
	nimfr("readAllBuffer", "sysio.nim")
	result = 0;
	nimln(116, "sysio.nim");
	result = copyString(((NimStringDesc*) &TMP11));
	nimln(117, "sysio.nim");
	nimln(117, "sysio.nim");
	buffer = mnewString(4000);
	nimln(118, "sysio.nim");
	bytesread = 4000;
	nimln(119, "sysio.nim");
	while (1) {
		nimln(119, "sysio.nim");
		if (!(bytesread == 4000)) goto LA1;
		nimln(120, "sysio.nim");
		bytesread = readbuffer_10627(file, ((void*) (&buffer->data[0])), 4000);
		nimln(121, "sysio.nim");
		result = resizeString(result, buffer->Sup.len + 0);
appendString(result, buffer);
	} LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, readall_10437)(FILE* file) {
	NimStringDesc* result;
	NI len;
	nimfr("readAll", "sysio.nim")
	result = 0;
	nimln(144, "sysio.nim");
	len = rawfilesize_72885(file);
	nimln(145, "sysio.nim");
	{
		nimln(145, "sysio.nim");
		if (!(0 <= len)) goto LA3;
		nimln(146, "sysio.nim");
		nimln(146, "sysio.nim");
		result = readallfile_72892(file, len);
	}
	goto LA1;
	LA3: ;
	{
		nimln(148, "sysio.nim");
		nimln(148, "sysio.nim");
		result = readallbuffer_72876(file);
	}
	LA1: ;
	popFrame();
	return result;
}

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

N_NIMCALL(NimStringDesc*, readallfile_72901)(FILE* file) {
	NimStringDesc* result;
	NI len;
	nimfr("readAllFile", "sysio.nim")
	result = 0;
	nimln(138, "sysio.nim");
	len = rawfilesize_72885(file);
	nimln(139, "sysio.nim");
	result = readallfile_72892(file, len);
	popFrame();
	return result;
}

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

static N_INLINE(void, setFrame)(TFrame* s) {
	frameptr_13038 = s;
}
N_NIMCALL(void, TMP25)(void* p, NI op) {
	enoexceptiontoreraise2467* a;
	a = (enoexceptiontoreraise2467*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

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

N_NIMCALL(NimStringDesc*, readfile_10440)(NimStringDesc* filename) {
	NimStringDesc* result;
	FILE* f;
	TSafePoint TMP24;
	nimfr("readFile", "sysio.nim")
	result = 0;
	nimln(151, "sysio.nim");
	f = open_10217(filename, ((NU8) 0), -1);
	nimln(152, "sysio.nim");
	pushSafePoint(&TMP24);
	TMP24.status = setjmp(TMP24.context);
	if (TMP24.status == 0) {
		nimln(153, "sysio.nim");
		nimln(153, "sysio.nim");
		result = readallfile_72901(f);
		popSafePoint();
	}
	else {
		popSafePoint();
		setFrame((TFrame*)&F);
	}
	{
		nimln(155, "sysio.nim");
		fclose(f);
	}
	if (TMP24.status != 0) reraiseException();
	popFrame();
	return result;
}

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

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

N_NIMCALL(void, writefile_10443)(NimStringDesc* filename, NimStringDesc* content) {
	FILE* f;
	TSafePoint TMP27;
	nimfr("writeFile", "sysio.nim")
	nimln(158, "sysio.nim");
	f = open_10217(filename, ((NU8) 1), -1);
	nimln(159, "sysio.nim");
	pushSafePoint(&TMP27);
	TMP27.status = setjmp(TMP27.context);
	if (TMP27.status == 0) {
		nimln(160, "sysio.nim");
		write_10463(f, content);
		popSafePoint();
	}
	else {
		popSafePoint();
		setFrame((TFrame*)&F);
	}
	{
		nimln(162, "sysio.nim");
		fclose(f);
	}
	if (TMP27.status != 0) reraiseException();
	popFrame();
}

N_NIMCALL(void, write_10447)(FILE* f, NF32 r) {
	nimfr("write", "sysio.nim")
	nimln(106, "sysio.nim");
	fprintf(f, "%g", r);
	popFrame();
}

N_NIMCALL(void, write_10451)(FILE* f, NI i) {
	nimfr("write", "sysio.nim")
	nimln(95, "sysio.nim");
	fprintf(f, "%ld", i);
	popFrame();
}

N_NIMCALL(void, write_10455)(FILE* f, NI64 i) {
	nimfr("write", "sysio.nim")
	nimln(99, "sysio.nim");
	fprintf(f, "%lld", i);
	popFrame();
}

N_NIMCALL(void, write_10459)(FILE* f, NF r) {
	nimfr("write", "sysio.nim")
	nimln(107, "sysio.nim");
	fprintf(f, "%g", r);
	popFrame();
}

N_NIMCALL(void, write_10467)(FILE* f, NIM_BOOL b) {
	nimfr("write", "sysio.nim")
	nimln(104, "sysio.nim");
	{
		if (!b) goto LA3;
		nimln(104, "sysio.nim");
		write_10463(f, ((NimStringDesc*) &TMP29));
	}
	goto LA1;
	LA3: ;
	{
		nimln(105, "sysio.nim");
		write_10463(f, ((NimStringDesc*) &TMP30));
	}
	LA1: ;
	popFrame();
}

N_NIMCALL(void, write_10471)(FILE* f, NIM_CHAR c) {
	nimfr("write", "sysio.nim")
	nimln(109, "sysio.nim");
	putc(c, f);
	popFrame();
}

N_NIMCALL(void, write_10479)(FILE* f, NimStringDesc** a, NI aLen0) {
	NimStringDesc* x_72869;
	NI i_72873;
	nimfr("write", "sysio.nim")
	x_72869 = 0;
	nimln(1531, "system.nim");
	i_72873 = 0;
	nimln(1532, "system.nim");
	while (1) {
		nimln(1532, "system.nim");
		nimln(1532, "system.nim");
		if (!(i_72873 < aLen0)) goto LA1;
		nimln(1533, "system.nim");
		x_72869 = a[i_72873];
		nimln(111, "sysio.nim");
		write_10463(f, x_72869);
		nimln(1534, "system.nim");
		i_72873 += 1;
	} LA1: ;
	popFrame();
}

N_NIMCALL(NIM_BOOL, readline_10487)(FILE* f, NimStringDesc** line) {
	NIM_BOOL result;
	nimfr("readLine", "sysio.nim")
	result = 0;
	nimln(73, "sysio.nim");
	(*line) = setLengthStr((*line), 0);
	nimln(74, "sysio.nim");
	while (1) {
		int c;
		nimln(75, "sysio.nim");
		c = fgetc(f);
		nimln(76, "sysio.nim");
		{
			nimln(76, "sysio.nim");
			if (!(c < ((NI32) 0))) goto LA4;
			nimln(77, "sysio.nim");
			{
				nimln(77, "sysio.nim");
				nimln(77, "sysio.nim");
				if (!(0 < (*line)->Sup.len)) goto LA8;
				nimln(77, "sysio.nim");
				goto LA1;
			}
			goto LA6;
			LA8: ;
			{
				nimln(78, "sysio.nim");
				nimln(78, "sysio.nim");
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA6: ;
		}
		LA4: ;
		nimln(79, "sysio.nim");
		{
			nimln(79, "sysio.nim");
			if (!(c == ((NI32) 10))) goto LA13;
			nimln(79, "sysio.nim");
			goto LA1;
		}
		LA13: ;
		nimln(80, "sysio.nim");
		{
			nimln(80, "sysio.nim");
			if (!(c == ((NI32) 13))) goto LA17;
			nimln(81, "sysio.nim");
			c = fgetc(f);
			nimln(82, "sysio.nim");
			{
				nimln(82, "sysio.nim");
				nimln(82, "sysio.nim");
				if (!!((c == ((NI32) 10)))) goto LA21;
				nimln(82, "sysio.nim");
				ungetc(c, f);
			}
			LA21: ;
			nimln(83, "sysio.nim");
			goto LA1;
		}
		LA17: ;
		nimln(84, "sysio.nim");
		nimln(84, "sysio.nim");
		(*line) = addChar((*line), ((NIM_CHAR) (((NI) (((NI) (c)))))));
	} LA1: ;
	nimln(85, "sysio.nim");
	result = NIM_TRUE;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, readline_10484)(FILE* f) {
	NimStringDesc* result;
	nimfr("readLine", "sysio.nim")
	result = 0;
	nimln(88, "sysio.nim");
	nimln(88, "sysio.nim");
	result = rawNewString(80);
	nimln(89, "sysio.nim");
	{
		NIM_BOOL LOC3;
		nimln(89, "sysio.nim");
		nimln(89, "sysio.nim");
		LOC3 = 0;
		LOC3 = readline_10487(f, &result);
		if (!!(LOC3)) goto LA4;
		nimln(89, "sysio.nim");
		raiseeio_72205(((NimStringDesc*) &TMP31));
	}
	LA4: ;
	popFrame();
	return result;
}

N_NIMCALL(NI64, getfilepos_10655)(FILE* f) {
	NI64 result;
	NI LOC1;
	nimfr("getFilePos", "sysio.nim")
	result = 0;
	nimln(265, "sysio.nim");
	nimln(265, "sysio.nim");
	LOC1 = 0;
	LOC1 = ftell(f);
	result = ((NI64) (LOC1));
	nimln(266, "sysio.nim");
	{
		nimln(266, "sysio.nim");
		if (!(result < 0)) goto LA4;
		nimln(266, "sysio.nim");
		raiseeio_72205(((NimStringDesc*) &TMP32));
	}
	LA4: ;
	popFrame();
	return result;
}

N_NIMCALL(void, setfilepos_10651)(FILE* f, NI64 pos) {
	nimfr("setFilePos", "sysio.nim")
	nimln(261, "sysio.nim");
	{
		NI LOC3;
		nimln(261, "sysio.nim");
		nimln(261, "sysio.nim");
		nimln(261, "sysio.nim");
		LOC3 = 0;
		LOC3 = fseek(f, ((long) (pos)), 0);
		if (!!((LOC3 == 0))) goto LA4;
		nimln(262, "sysio.nim");
		raiseeio_72205(((NimStringDesc*) &TMP33));
	}
	LA4: ;
	popFrame();
}

N_NIMCALL(NI64, getfilesize_10608)(FILE* f) {
	NI64 result;
	NI64 oldpos;
	NI LOC1;
	nimfr("getFileSize", "sysio.nim")
	result = 0;
	nimln(269, "sysio.nim");
	oldpos = getfilepos_10655(f);
	nimln(270, "sysio.nim");
	nimln(270, "sysio.nim");
	LOC1 = 0;
	LOC1 = fseek(f, 0, 2);
	nimln(271, "sysio.nim");
	result = getfilepos_10655(f);
	nimln(272, "sysio.nim");
	setfilepos_10651(f, oldpos);
	popFrame();
	return result;
}

N_NIMCALL(NI, readbytes_10611)(FILE* f, NI8* a, NI aLen0, NI start, NI len) {
	NI result;
	nimfr("readBytes", "sysio.nim")
	result = 0;
	nimln(240, "sysio.nim");
	result = readbuffer_10627(f, ((void*) (&a[start])), len);
	popFrame();
	return result;
}

N_NIMCALL(NI, readchars_10619)(FILE* f, NIM_CHAR* a, NI aLen0, NI start, NI len) {
	NI result;
	nimfr("readChars", "sysio.nim")
	result = 0;
	nimln(243, "sysio.nim");
	result = readbuffer_10627(f, ((void*) (&a[start])), len);
	popFrame();
	return result;
}

N_NIMCALL(NI, writebytes_10632)(FILE* f, NI8* a, NI aLen0, NI start, NI len) {
	NI result;
	NI8* x;
	result = 0;
	x = ((NI8*) (a));
	result = writebuffer_10646(f, ((void*) (&x[(start)- 0])), len);
	return result;
}

N_NIMCALL(NI, writechars_10639)(FILE* f, NIM_CHAR* a, NI aLen0, NI start, NI len) {
	NI result;
	NI8* x;
	result = 0;
	x = ((NI8*) (a));
	result = writebuffer_10646(f, ((void*) (&x[(start)- 0])), len);
	return result;
}
N_NIMCALL(void, TMP34)(void* p, NI op) {
	TY10665* a;
	NI LOC1;
	a = (TY10665*)p;
	LOC1 = 0;
	for (LOC1 = 0; LOC1 < a->Sup.len; LOC1++) {
	nimGCvisit((void*)a->data[LOC1], op);
	}
}
N_NIMCALL(void, TMP35)(void* p, NI op) {
	EOverflow* a;
	a = (EOverflow*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

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

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

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

N_NIMCALL(void*, newSeq)(TNimType* typ, NI len) {
	void* result;
	NI size;
	NI LOC1;
	nimfr("newSeq", "gc.nim")
	result = 0;
	nimln(457, "gc.nim");
	nimln(457, "gc.nim");
	LOC1 = 0;
	LOC1 = mulInt(len, (*(*typ).base).size);
	size = addInt(LOC1, 8);
	nimln(458, "gc.nim");
	result = newObj(typ, size);
	nimln(459, "gc.nim");
	(*((TGenericSeq*) (result))).len = len;
	nimln(460, "gc.nim");
	(*((TGenericSeq*) (result))).reserved = len;
	popFrame();
	return result;
}

N_NIMCALL(TY10665*, cstringarraytoseq_10661)(NCSTRING* a, NI len) {
	TY10665* result;
	NI i_10714;
	NI HEX3Atmp_10715;
	NI res_10717;
	result = 0;
	result = (TY10665*) newSeq((&NTI10665), len);
	i_10714 = 0;
	HEX3Atmp_10715 = 0;
	HEX3Atmp_10715 = (NI32)(len - 1);
	res_10717 = 0;
	while (1) {
		if (!(res_10717 <= HEX3Atmp_10715)) goto LA1;
		i_10714 = res_10717;
		asgnRefNoCycle((void**) &result->data[i_10714], cstrToNimstr(a[(i_10714)- 0]));
		res_10717 += 1;
	} LA1: ;
	return result;
}

N_NIMCALL(TY10665*, cstringarraytoseq_10721)(NCSTRING* a) {
	TY10665* result;
	NI l;
	result = 0;
	l = 0;
	while (1) {
		if (!!((a[(l)- 0] == NIM_NIL))) goto LA1;
		l += 1;
	} LA1: ;
	result = cstringarraytoseq_10661(a, l);
	return result;
}

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

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

static N_INLINE(NI, atomicinc_11001)(NI* memloc, NI x) {
	NI result;
	result = 0;
	(*memloc) += x;
	result = (*memloc);
	return result;
}

static N_INLINE(NI, atomicdec_11006)(NI* memloc, NI x) {
	NI result;
	result = 0;
	(*memloc) -= x;
	result = (*memloc);
	return result;
}

static N_INLINE(NI, addandfetch_11201)(NI* p, NI val) {
	NI result;
	result = 0;
	(*p) += val;
	result = (*p);
	return result;
}

N_NIMCALL(void, setcontrolchook_12401)(TY12403 hook) {
	signal(SIGINT, ((tsignalhandler16611) (hook)));
}

N_NIMCALL(void, writestacktrace_12406)(void) {
	NimStringDesc* s;
	s = copyString(((NimStringDesc*) &TMP11));
	rawwritestacktrace_14201(&s);
	showerrormessage_13007(s->data);
}

N_NIMCALL(NimStringDesc*, getstacktrace_12601)(void) {
	NimStringDesc* result;
	result = 0;
	result = copyString(((NimStringDesc*) &TMP11));
	rawwritestacktrace_14201(&result);
	return result;
}

N_NIMCALL(NimStringDesc*, getstacktrace_12603)(E_Base* e) {
	NimStringDesc* result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !(e == 0);
		if (!(LOC3)) goto LA4;
		LOC3 = !((*e).trace == 0);
		LA4: ;
		if (!LOC3) goto LA5;
		result = copyString((*e).trace);
	}
	goto LA1;
	LA5: ;
	{
		result = copyString(((NimStringDesc*) &TMP11));
	}
	LA1: ;
	return result;
}
N_NIMCALL(void, TMP37)(void* p, NI op) {
	einvalidindex2459* a;
	a = (einvalidindex2459*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NOINLINE(void, raiseIndexError)(void) {
	einvalidindex2459* e_17024;
	NimStringDesc* LOC1;
	e_17024 = 0;
	e_17024 = (einvalidindex2459*) newObj((&NTI17201), sizeof(einvalidindex2459));
	(*e_17024).Sup.Sup.Sup.m_type = (&NTI2459);
	LOC1 = 0;
	LOC1 = (*e_17024).Sup.Sup.message; (*e_17024).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP38));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_17024, "EInvalidIndex");
}

static N_INLINE(NI, chckIndx)(NI i, NI a, NI b) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (a <= i);
		if (!(LOC3)) goto LA4;
		LOC3 = (i <= b);
		LA4: ;
		if (!LOC3) goto LA5;
		result = i;
		goto BeforeRet;
	}
	goto LA1;
	LA5: ;
	{
		raiseIndexError();
	}
	LA1: ;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP39)(void* p, NI op) {
	eoutofrange2463* a;
	a = (eoutofrange2463*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

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

N_NOINLINE(void, raiseRangeError)(NI64 val) {
	eoutofrange2463* e_16803;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	e_16803 = 0;
	e_16803 = (eoutofrange2463*) newObj((&NTI17001), sizeof(eoutofrange2463));
	(*e_16803).Sup.Sup.Sup.m_type = (&NTI2463);
	LOC1 = 0;
	LOC2 = 0;
	LOC2 = nimInt64ToStr(val);
	LOC1 = rawNewString(LOC2->Sup.len + 20);
appendString(LOC1, ((NimStringDesc*) &TMP40));
appendString(LOC1, LOC2);
	asgnRefNoCycle((void**) &(*e_16803).Sup.Sup.message, LOC1);
	raiseException((E_Base*)e_16803, "EOutOfRange");
}

static N_INLINE(NI, chckRange)(NI i, NI a, NI b) {
	NI result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (a <= i);
		if (!(LOC3)) goto LA4;
		LOC3 = (i <= b);
		LA4: ;
		if (!LOC3) goto LA5;
		result = i;
		goto BeforeRet;
	}
	goto LA1;
	LA5: ;
	{
		raiseRangeError(((NI64) (i)));
	}
	LA1: ;
	BeforeRet: ;
	return result;
}

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

static N_INLINE(NF, chckRangeF)(NF x, NF a, NF b) {
	NF result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (a <= x);
		if (!(LOC3)) goto LA4;
		LOC3 = (x <= b);
		LA4: ;
		if (!LOC3) goto LA5;
		result = x;
		goto BeforeRet;
	}
	goto LA1;
	LA5: ;
	{
		eoutofrange2463* e_17603;
		NimStringDesc* LOC8;
		NimStringDesc* LOC9;
		e_17603 = 0;
		e_17603 = (eoutofrange2463*) newObj((&NTI17001), sizeof(eoutofrange2463));
		(*e_17603).Sup.Sup.Sup.m_type = (&NTI2463);
		LOC8 = 0;
		LOC9 = 0;
		LOC9 = nimFloatToStr(x);
		LOC8 = rawNewString(LOC9->Sup.len + 20);
appendString(LOC8, ((NimStringDesc*) &TMP40));
appendString(LOC8, LOC9);
		asgnRefNoCycle((void**) &(*e_17603).Sup.Sup.message, LOC8);
		raiseException((E_Base*)e_17603, "EOutOfRange");
	}
	LA1: ;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP41)(void* p, NI op) {
	einvalidvalue2453* a;
	a = (einvalidvalue2453*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NOINLINE(void, chckNil)(void* p) {
	{
		einvalidvalue2453* e_17825;
		NimStringDesc* LOC5;
		if (!(p == NIM_NIL)) goto LA3;
		e_17825 = 0;
		e_17825 = (einvalidvalue2453*) newObj((&NTI18001), sizeof(einvalidvalue2453));
		(*e_17825).Sup.Sup.Sup.m_type = (&NTI2453);
		LOC5 = 0;
		LOC5 = (*e_17825).Sup.Sup.message; (*e_17825).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP42));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((E_Base*)e_17825, "EInvalidValue");
	}
	LA3: ;
}

static N_INLINE(void, popCurrentException)(void) {
	asgnRef((void**) &currexception_13041, (*currexception_13041).parent);
}

static N_INLINE(void, gcdisable_6602)(void) {
	nimfr("GC_disable", "gc.nim")
	nimln(1035, "gc.nim");
	gch_43244.Recgclock += 1;
	popFrame();
}

static N_INLINE(void, gcenable_6604)(void) {
	nimfr("GC_enable", "gc.nim")
	nimln(1037, "gc.nim");
	{
		nimln(1037, "gc.nim");
		if (!(0 < gch_43244.Recgclock)) goto LA3;
		nimln(1041, "gc.nim");
		gch_43244.Recgclock -= 1;
	}
	LA3: ;
	popFrame();
}

N_NOCONV(void, signalHandler)(int sig) {
	NimStringDesc* buf;
	gcdisable_6602();
	buf = rawNewString(2000);
	rawwritestacktrace_14201(&buf);
	{
		if (!(sig == SIGINT)) goto LA3;
		buf = resizeString(buf, 31);
appendString(buf, ((NimStringDesc*) &TMP43));
	}
	goto LA1;
	LA3: ;
	{
		if (!(sig == SIGSEGV)) goto LA6;
		buf = resizeString(buf, 61);
appendString(buf, ((NimStringDesc*) &TMP44));
	}
	goto LA1;
	LA6: ;
	{
		if (!(sig == SIGABRT)) goto LA9;
		buf = resizeString(buf, 31);
appendString(buf, ((NimStringDesc*) &TMP45));
	}
	goto LA1;
	LA9: ;
	{
		if (!(sig == SIGFPE)) goto LA12;
		buf = resizeString(buf, 26);
appendString(buf, ((NimStringDesc*) &TMP46));
	}
	goto LA1;
	LA12: ;
	{
		if (!(sig == SIGILL)) goto LA15;
		buf = resizeString(buf, 27);
appendString(buf, ((NimStringDesc*) &TMP47));
	}
	goto LA1;
	LA15: ;
	{
		if (!(sig == SIGSEGV)) goto LA18;
		buf = resizeString(buf, 60);
appendString(buf, ((NimStringDesc*) &TMP48));
	}
	goto LA1;
	LA18: ;
	{
		buf = resizeString(buf, 15);
appendString(buf, ((NimStringDesc*) &TMP49));
	}
	LA1: ;
	showerrormessage_13007(buf->data);
	gcenable_6604();
	exit(1);
}

N_NIMCALL(void, registersignalhandler_16602)(void) {
	signal(SIGINT, signalHandler);
	signal(SIGSEGV, signalHandler);
	signal(SIGABRT, signalHandler);
	signal(SIGFPE, signalHandler);
	signal(SIGILL, signalHandler);
	signal(SIGSEGV, signalHandler);
}
N_NIMCALL(void, TMP50)(void* p, NI op) {
	einvalidfield2461* a;
	a = (einvalidfield2461*)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, raiseFieldError)(NimStringDesc* f) {
	einvalidfield2461* e_17225;
	NimStringDesc* LOC1;
	e_17225 = 0;
	e_17225 = (einvalidfield2461*) newObj((&NTI17401), sizeof(einvalidfield2461));
	(*e_17225).Sup.Sup.Sup.m_type = (&NTI2461);
	LOC1 = 0;
	LOC1 = rawNewString(f->Sup.len + 18);
appendString(LOC1, f);
appendString(LOC1, ((NimStringDesc*) &TMP51));
	asgnRefNoCycle((void**) &(*e_17225).Sup.Sup.message, LOC1);
	raiseException((E_Base*)e_17225, "EInvalidField");
}

N_NIMCALL(NI64, chckRange64)(NI64 i, NI64 a, NI64 b) {
	NI64 result;
	result = 0;
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (a <= i);
		if (!(LOC3)) goto LA4;
		LOC3 = (i <= b);
		LA4: ;
		if (!LOC3) goto LA5;
		result = i;
		goto BeforeRet;
	}
	goto LA1;
	LA5: ;
	{
		raiseRangeError(i);
	}
	LA1: ;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP52)(void* p, NI op) {
	einvalidobjectconversion2471* a;
	a = (einvalidobjectconversion2471*)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, chckObj)(TNimType* obj, TNimType* subclass) {
	TNimType* x;
	x = obj;
	{
		if (!(x == subclass)) goto LA3;
		goto BeforeRet;
	}
	LA3: ;
	while (1) {
		if (!!((x == subclass))) goto LA5;
		{
			einvalidobjectconversion2471* e_18076;
			NimStringDesc* LOC10;
			if (!(x == NIM_NIL)) goto LA8;
			e_18076 = 0;
			e_18076 = (einvalidobjectconversion2471*) newObj((&NTI18201), sizeof(einvalidobjectconversion2471));
			(*e_18076).Sup.Sup.Sup.m_type = (&NTI2471);
			LOC10 = 0;
			LOC10 = (*e_18076).Sup.Sup.message; (*e_18076).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP53));
			if (LOC10) nimGCunrefNoCycle(LOC10);
			raiseException((E_Base*)e_18076, "EInvalidObjectConversion");
			goto LA5;
		}
		LA8: ;
		x = (*x).base;
	} LA5: ;
	BeforeRet: ;
}
N_NIMCALL(void, TMP54)(void* p, NI op) {
	einvalidobjectassignment2469* a;
	a = (einvalidobjectassignment2469*)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, chckObjAsgn)(TNimType* a, TNimType* b) {
	{
		einvalidobjectassignment2469* e_18243;
		NimStringDesc* LOC5;
		if (!!((a == b))) goto LA3;
		e_18243 = 0;
		e_18243 = (einvalidobjectassignment2469*) newObj((&NTI18401), sizeof(einvalidobjectassignment2469));
		(*e_18243).Sup.Sup.Sup.m_type = (&NTI2469);
		LOC5 = 0;
		LOC5 = (*e_18243).Sup.Sup.message; (*e_18243).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP55));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((E_Base*)e_18243, "EInvalidObjectAssignment");
	}
	LA3: ;
}
N_NIMCALL(void, TMP56)(void* p, NI op) {
	EDivByZero* a;
	a = (EDivByZero*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NOINLINE(void, raiseDivByZero)(void) {
	EDivByZero* e_18624;
	NimStringDesc* LOC1;
	e_18624 = 0;
	e_18624 = (EDivByZero*) newObj((&NTI18801), sizeof(EDivByZero));
	(*e_18624).Sup.Sup.Sup.Sup.m_type = (&NTI2443);
	LOC1 = 0;
	LOC1 = (*e_18624).Sup.Sup.Sup.message; (*e_18624).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP57));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_18624, "EDivByZero");
}

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

static N_INLINE(NI64, subInt64)(NI64 a, NI64 b) {
	NI64 result;
	result = 0;
	result = (NI64)((NU64)(a) - (NU64)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 <= (NI64)(result ^ a));
		if (LOC3) goto LA4;
		LOC3 = (0 <= (NI64)(result ^ (NI64)((NU64) ~(b))));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI64, negInt64)(NI64 a) {
	NI64 result;
	result = 0;
	{
		if (!!((a == (IL64(-9223372036854775807) - IL64(1))))) goto LA3;
		result = -(a);
		goto BeforeRet;
	}
	LA3: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI64, absInt64)(NI64 a) {
	NI64 result;
	result = 0;
	{
		if (!!((a == (IL64(-9223372036854775807) - IL64(1))))) goto LA3;
		{
			if (!(0 <= a)) goto LA7;
			result = a;
			goto BeforeRet;
		}
		goto LA5;
		LA7: ;
		{
			result = -(a);
			goto BeforeRet;
		}
		LA5: ;
	}
	LA3: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI64, divInt64)(NI64 a, NI64 b) {
	NI64 result;
	result = 0;
	{
		if (!(b == 0)) goto LA3;
		raiseDivByZero();
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == (IL64(-9223372036854775807) - IL64(1)));
		if (!(LOC7)) goto LA8;
		LOC7 = (b == -1);
		LA8: ;
		if (!LOC7) goto LA9;
		raiseOverflow();
	}
	LA9: ;
	result = (NI64)(a / b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI64, modInt64)(NI64 a, NI64 b) {
	NI64 result;
	result = 0;
	{
		if (!(b == 0)) goto LA3;
		raiseDivByZero();
	}
	LA3: ;
	result = (NI64)(a % b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

static N_INLINE(NI, absInt)(NI a) {
	NI result;
	result = 0;
	{
		if (!!((a == (-2147483647 -1)))) goto LA3;
		{
			if (!(0 <= a)) goto LA7;
			result = a;
			goto BeforeRet;
		}
		goto LA5;
		LA7: ;
		{
			result = ((NI32)-(a));
			goto BeforeRet;
		}
		LA5: ;
	}
	LA3: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, subInt)(NI a, NI b) {
	NI result;
	result = 0;
	result = (NI)((NU32)(a) - (NU32)(b));
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = (0 <= (NI)(result ^ a));
		if (LOC3) goto LA4;
		LOC3 = (0 <= (NI)(result ^ (NI)((NU32) ~(b))));
		LA4: ;
		if (!LOC3) goto LA5;
		goto BeforeRet;
	}
	LA5: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, negInt)(NI a) {
	NI result;
	result = 0;
	{
		if (!!((a == (-2147483647 -1)))) goto LA3;
		result = ((NI32)-(a));
		goto BeforeRet;
	}
	LA3: ;
	raiseOverflow();
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, divInt)(NI a, NI b) {
	NI result;
	result = 0;
	{
		if (!(b == 0)) goto LA3;
		raiseDivByZero();
	}
	LA3: ;
	{
		NIM_BOOL LOC7;
		LOC7 = 0;
		LOC7 = (a == (-2147483647 -1));
		if (!(LOC7)) goto LA8;
		LOC7 = (b == -1);
		LA8: ;
		if (!LOC7) goto LA9;
		raiseOverflow();
	}
	LA9: ;
	result = (NI32)(a / b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

static N_INLINE(NI, modInt)(NI a, NI b) {
	NI result;
	result = 0;
	{
		if (!(b == 0)) goto LA3;
		raiseDivByZero();
	}
	LA3: ;
	result = (NI32)(a % b);
	goto BeforeRet;
	BeforeRet: ;
	return result;
}
N_NIMCALL(void, TMP58)(void* p, NI op) {
	EFloatInvalidOp* a;
	a = (EFloatInvalidOp*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NOINLINE(void, raisefloatinvalidop_20221)(void) {
	EFloatInvalidOp* e_20225;
	NimStringDesc* LOC1;
	e_20225 = 0;
	e_20225 = (EFloatInvalidOp*) newObj((&NTI20401), sizeof(EFloatInvalidOp));
	(*e_20225).Sup.Sup.Sup.Sup.m_type = (&NTI2475);
	LOC1 = 0;
	LOC1 = (*e_20225).Sup.Sup.Sup.message; (*e_20225).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP59));
	if (LOC1) nimGCunrefNoCycle(LOC1);
	raiseException((E_Base*)e_20225, "EFloatInvalidOp");
}

static N_INLINE(void, nanCheck)(NF x) {
	{
		if (!!((x == x))) goto LA3;
		raisefloatinvalidop_20221();
	}
	LA3: ;
}
N_NIMCALL(void, TMP60)(void* p, NI op) {
	EFloatOverflow* a;
	a = (EFloatOverflow*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}
N_NIMCALL(void, TMP62)(void* p, NI op) {
	EFloatUnderflow* a;
	a = (EFloatUnderflow*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NOINLINE(void, raisefloatoverflow_20424)(NF x) {
	{
		EFloatOverflow* e_20430;
		NimStringDesc* LOC5;
		if (!(0.0 < x)) goto LA3;
		e_20430 = 0;
		e_20430 = (EFloatOverflow*) newObj((&NTI20601), sizeof(EFloatOverflow));
		(*e_20430).Sup.Sup.Sup.Sup.m_type = (&NTI2479);
		LOC5 = 0;
		LOC5 = (*e_20430).Sup.Sup.Sup.message; (*e_20430).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP61));
		if (LOC5) nimGCunrefNoCycle(LOC5);
		raiseException((E_Base*)e_20430, "EFloatOverflow");
	}
	goto LA1;
	LA3: ;
	{
		EFloatUnderflow* e_20620;
		NimStringDesc* LOC7;
		e_20620 = 0;
		e_20620 = (EFloatUnderflow*) newObj((&NTI20801), sizeof(EFloatUnderflow));
		(*e_20620).Sup.Sup.Sup.Sup.m_type = (&NTI2481);
		LOC7 = 0;
		LOC7 = (*e_20620).Sup.Sup.Sup.message; (*e_20620).Sup.Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP63));
		if (LOC7) nimGCunrefNoCycle(LOC7);
		raiseException((E_Base*)e_20620, "EFloatUnderflow");
	}
	LA1: ;
}

static N_INLINE(void, infCheck)(NF x) {
	{
		NIM_BOOL LOC3;
		LOC3 = 0;
		LOC3 = !((x == 0.0));
		if (!(LOC3)) goto LA4;
		LOC3 = (((NF)(x) * (NF)(5.0000000000000000e-01)) == x);
		LA4: ;
		if (!LOC3) goto LA5;
		raisefloatoverflow_20424(x);
	}
	LA5: ;
}

N_NIMCALL(void, rawwrite_21002)(FILE* f, NimStringDesc* s) {
	NI LOC1;
	LOC1 = 0;
	LOC1 = writebuffer_10646(f, ((void*) (s->data)), s->Sup.len);
}

N_NOINLINE(void, nimLoadLibraryError)(NimStringDesc* path) {
	rawwrite_21002(stdout, ((NimStringDesc*) &TMP64));
	rawwrite_21002(stdout, path);
	rawwrite_21002(stdout, ((NimStringDesc*) &TMP16));
	exit(1);
}

N_NOINLINE(void, procaddrerror_21011)(NCSTRING name) {
	rawwrite_21002(stdout, ((NimStringDesc*) &TMP65));
	write_10475(stdout, name);
	rawwrite_21002(stdout, ((NimStringDesc*) &TMP16));
	exit(1);
}

N_NIMCALL(void, nimUnloadLibrary)(void* lib) {
	dlclose(lib);
}

N_NIMCALL(void*, nimLoadLibrary)(NimStringDesc* path) {
	void* result;
	result = 0;
	result = dlopen(path->data, RTLD_NOW);
	return result;
}

N_NIMCALL(void*, nimGetProcAddr)(void* lib, NCSTRING name) {
	void* result;
	result = 0;
	result = dlsym(lib, name);
	{
		if (!(result == NIM_NIL)) goto LA3;
		procaddrerror_21011(name);
	}
	LA3: ;
	return result;
}

N_NIMCALL(NI, countBits32)(NI32 n) {
	NI result;
	NI32 v;
	nimfr("countBits32", "sets.nim")
	result = 0;
	nimln(16, "sets.nim");
	v = n;
	nimln(17, "sets.nim");
	nimln(17, "sets.nim");
	nimln(17, "sets.nim");
	nimln(17, "sets.nim");
	v = (NI32)((NU32)(v) - (NU32)((NI32)((NI32)((NU32)(v) >> (NU32)(((NI32) 1))) & ((NI32) 1431655765))));
	nimln(18, "sets.nim");
	nimln(18, "sets.nim");
	nimln(18, "sets.nim");
	nimln(18, "sets.nim");
	nimln(18, "sets.nim");
	v = (NI32)((NU32)((NI32)(v & ((NI32) 858993459))) + (NU32)((NI32)((NI32)((NU32)(v) >> (NU32)(((NI32) 2))) & ((NI32) 858993459))));
	nimln(19, "sets.nim");
	nimln(19, "sets.nim");
	nimln(19, "sets.nim");
	nimln(19, "sets.nim");
	nimln(19, "sets.nim");
	nimln(19, "sets.nim");
	result = ((NI) ((NI32)((NU32)((NI32)((NU32)((NI32)((NI32)((NU32)(v) + (NU32)((NI32)((NU32)(v) >> (NU32)(((NI32) 4))))) & ((NI32) 252645135))) * (NU32)(((NI32) 16843009)))) >> (NU32)(((NI32) 24)))));
	popFrame();
	return result;
}

N_NIMCALL(NI, countBits64)(NI64 n) {
	NI result;
	NI LOC1;
	NI LOC2;
	nimfr("countBits64", "sets.nim")
	result = 0;
	nimln(22, "sets.nim");
	nimln(22, "sets.nim");
	nimln(22, "sets.nim");
	nimln(22, "sets.nim");
	nimln(22, "sets.nim");
	LOC1 = 0;
	LOC1 = countBits32(((NI32)(NU32)(NU64)(((NI64) ((NI64)(n & 65535))))));
	nimln(23, "sets.nim");
	nimln(23, "sets.nim");
	nimln(23, "sets.nim");
	LOC2 = 0;
	LOC2 = countBits32(((NI32)(NU32)(NU64)((NI64)((NU64)(n) >> (NU64)(16)))));
	result = (NI32)(LOC1 + LOC2);
	popFrame();
	return result;
}

N_NIMCALL(NI, cardSet)(tnimset21402 s, NI len) {
	NI result;
	NI i_21493;
	NI HEX3Atmp_21511;
	NI res_21513;
	nimfr("cardSet", "sets.nim")
	result = 0;
	nimln(26, "sets.nim");
	result = 0;
	i_21493 = 0;
	HEX3Atmp_21511 = 0;
	nimln(27, "sets.nim");
	nimln(27, "sets.nim");
	HEX3Atmp_21511 = (NI32)(len - 1);
	nimln(1451, "system.nim");
	res_21513 = 0;
	nimln(1452, "system.nim");
	while (1) {
		NI LOC2;
		nimln(1452, "system.nim");
		if (!(res_21513 <= HEX3Atmp_21511)) goto LA1;
		nimln(1451, "system.nim");
		i_21493 = res_21513;
		nimln(28, "sets.nim");
		nimln(28, "sets.nim");
		nimln(28, "sets.nim");
		LOC2 = 0;
		LOC2 = countBits32(((NI32) (((NI)(NU)(NU8)(s[(i_21493)- 0])))));
		result += LOC2;
		nimln(1454, "system.nim");
		res_21513 += 1;
	} LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NI, getmaxmem_23850)(tmemregion23610* a) {
	NI result;
	nimfr("getMaxMem", "alloc.nim")
	result = 0;
	nimln(205, "alloc.nim");
	nimln(205, "alloc.nim");
	result = (((*a).Currmem >= (*a).Maxmem) ? (*a).Currmem : (*a).Maxmem);
	popFrame();
	return result;
}

N_NIMCALL(tavlnode23608*, find_24660)(tavlnode23608* root, NI key) {
	tavlnode23608* result;
	tavlnode23608* it;
	nimfr("find", "avltree.nim")
	result = 0;
	nimln(28, "avltree.nim");
	it = root;
	nimln(29, "avltree.nim");
	while (1) {
		nimln(29, "avltree.nim");
		nimln(29, "avltree.nim");
		if (!!((it == bottom_23639))) goto LA1;
		nimln(30, "avltree.nim");
		{
			nimln(30, "avltree.nim");
			if (!((*it).Key == key)) goto LA4;
			nimln(30, "avltree.nim");
			nimln(30, "avltree.nim");
			result = it;
			goto BeforeRet;
		}
		LA4: ;
		nimln(31, "avltree.nim");
		nimln(31, "avltree.nim");
		nimln(31, "avltree.nim");
		it = (*it).Link[(((NU32)((*it).Key) < (NU32)(key)))- 0];
	} LA1: ;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, lldeallocall_25091)(tmemregion23610* a) {
	tllchunk23604* it;
	nimfr("llDeallocAll", "alloc.nim")
	nimln(248, "alloc.nim");
	it = (*a).Llmem;
	nimln(249, "alloc.nim");
	while (1) {
		tllchunk23604* next;
		nimln(249, "alloc.nim");
		nimln(249, "alloc.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(251, "alloc.nim");
		next = (*it).Next;
		nimln(252, "alloc.nim");
		osdeallocpages_22621(((void*) (it)), 4096);
		nimln(253, "alloc.nim");
		it = next;
	} LA1: ;
	popFrame();
}

static N_INLINE(NIM_BOOL, iscell_25418)(void* p) {
	NIM_BOOL result;
	nimfr("isCell", "alloc.nim")
	result = 0;
	nimln(334, "alloc.nim");
	nimln(334, "alloc.nim");
	result = ((NU32)(1) < (NU32)((*((tfreecell22828*) (p))).Zerofield));
	popFrame();
	return result;
}

N_NIMCALL(void, writefreelist_26238)(tmemregion23610* a) {
	tbigchunk22840* it;
	nimfr("writeFreeList", "alloc.nim")
	nimln(400, "alloc.nim");
	it = (*a).Freechunkslist;
	nimln(401, "alloc.nim");
	fprintf(stdout, "freeChunksList: %p\012", it);
	nimln(402, "alloc.nim");
	while (1) {
		nimln(402, "alloc.nim");
		nimln(402, "alloc.nim");
		if (!!((it == NIM_NIL))) goto LA1;
		nimln(403, "alloc.nim");
		fprintf(stdout, "it: %p, next: %p, prev: %p\012", it, (*it).Next, (*it).Prev);
		nimln(405, "alloc.nim");
		it = (*it).Next;
	} LA1: ;
	popFrame();
}

N_NIMCALL(NIM_BOOL, isallocatedptr_30603)(tmemregion23610* a, void* p) {
	NIM_BOOL result;
	nimfr("isAllocatedPtr", "alloc.nim")
	result = 0;
	nimln(653, "alloc.nim");
	{
		NIM_BOOL LOC3;
		tbasechunk22836* c_38614;
		nimln(653, "alloc.nim");
		LOC3 = 0;
		LOC3 = isaccessible_26223(a, p);
		if (!LOC3) goto LA4;
		nimln(654, "alloc.nim");
		c_38614 = pageaddr_25446(p);
		nimln(655, "alloc.nim");
		{
			NIM_BOOL LOC8;
			nimln(655, "alloc.nim");
			nimln(655, "alloc.nim");
			LOC8 = 0;
			LOC8 = chunkunused_25358(c_38614);
			if (!!(LOC8)) goto LA9;
			nimln(656, "alloc.nim");
			{
				NIM_BOOL LOC13;
				tsmallchunk22838* c;
				NI offset;
				NIM_BOOL LOC16;
				NIM_BOOL LOC17;
				nimln(656, "alloc.nim");
				LOC13 = 0;
				LOC13 = issmallchunk_25349(c_38614);
				if (!LOC13) goto LA14;
				nimln(657, "alloc.nim");
				c = ((tsmallchunk22838*) (c_38614));
				nimln(658, "alloc.nim");
				nimln(658, "alloc.nim");
				nimln(658, "alloc.nim");
				nimln(659, "alloc.nim");
				nimln(659, "alloc.nim");
				offset = (NI)((NU32)((NI)(((NI) (p)) & 4095)) - (NU32)((NI32)(((NI)sizeof(tsmallchunk22838)) - 8)));
				nimln(660, "alloc.nim");
				nimln(660, "alloc.nim");
				LOC16 = 0;
				nimln(660, "alloc.nim");
				LOC17 = 0;
				nimln(660, "alloc.nim");
				LOC17 = ((NU32)(offset) < (NU32)((*c).Acc));
				if (!(LOC17)) goto LA18;
				nimln(660, "alloc.nim");
				nimln(660, "alloc.nim");
				LOC17 = ((NI)((NU32)(offset) % (NU32)((*c).Sup.Size)) == 0);
				LA18: ;
				LOC16 = LOC17;
				if (!(LOC16)) goto LA19;
				nimln(661, "alloc.nim");
				LOC16 = ((NU32)(1) < (NU32)((*((tfreecell22828*) (p))).Zerofield));
				LA19: ;
				result = LOC16;
			}
			goto LA11;
			LA14: ;
			{
				tbigchunk22840* c;
				NIM_BOOL LOC21;
				nimln(663, "alloc.nim");
				c = ((tbigchunk22840*) (c_38614));
				nimln(664, "alloc.nim");
				nimln(664, "alloc.nim");
				LOC21 = 0;
				nimln(664, "alloc.nim");
				LOC21 = (p == ((void*) (&(*c).Data)));
				if (!(LOC21)) goto LA22;
				nimln(664, "alloc.nim");
				LOC21 = ((NU32)(1) < (NU32)((*((tfreecell22828*) (p))).Zerofield));
				LA22: ;
				result = LOC21;
			}
			LA11: ;
		}
		LA9: ;
	}
	LA4: ;
	popFrame();
	return result;
}

N_NIMCALL(NIM_BOOL, allocinv_30607)(tmemregion23610* a) {
	NIM_BOOL result;
	NI s_30642;
	NI res_30698;
	nimfr("allocInv", "alloc.nim")
	result = 0;
	s_30642 = 0;
	nimln(1458, "system.nim");
	res_30698 = 0;
	nimln(1459, "system.nim");
	while (1) {
		tsmallchunk22838* c;
		nimln(1459, "system.nim");
		if (!(((NI) (res_30698)) <= 511)) goto LA1;
		nimln(1458, "system.nim");
		s_30642 = res_30698;
		nimln(522, "alloc.nim");
		c = (*a).Freesmallchunks[(s_30642)- 0];
		nimln(523, "alloc.nim");
		while (1) {
			tfreecell22828* it;
			nimln(523, "alloc.nim");
			nimln(523, "alloc.nim");
			if (!!((c == NIM_NIL))) goto LA2;
			nimln(524, "alloc.nim");
			{
				nimln(524, "alloc.nim");
				if (!((*c).Next == c)) goto LA5;
				nimln(525, "alloc.nim");
				printf("%s\012", (((NimStringDesc*) &TMP66))->data);
				nimln(526, "alloc.nim");
				nimln(526, "alloc.nim");
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA5: ;
			nimln(527, "alloc.nim");
			{
				nimln(527, "alloc.nim");
				nimln(527, "alloc.nim");
				nimln(527, "alloc.nim");
				if (!!(((*c).Sup.Size == ((NI) ((NI32)(((NI) (s_30642)) * 8)))))) goto LA9;
				nimln(528, "alloc.nim");
				printf("%s\012", (((NimStringDesc*) &TMP67))->data);
				nimln(529, "alloc.nim");
				nimln(529, "alloc.nim");
				result = NIM_FALSE;
				goto BeforeRet;
			}
			LA9: ;
			nimln(530, "alloc.nim");
			it = (*c).Freelist;
			nimln(531, "alloc.nim");
			while (1) {
				nimln(531, "alloc.nim");
				nimln(531, "alloc.nim");
				if (!!((it == NIM_NIL))) goto LA11;
				nimln(532, "alloc.nim");
				{
					nimln(532, "alloc.nim");
					nimln(532, "alloc.nim");
					if (!!(((*it).Zerofield == 0))) goto LA14;
					nimln(533, "alloc.nim");
					printf("%s\012", (((NimStringDesc*) &TMP68))->data);
					nimln(534, "alloc.nim");
					printf("%ld %p\012", (*it).Zerofield, it);
					nimln(535, "alloc.nim");
					nimln(535, "alloc.nim");
					result = NIM_FALSE;
					goto BeforeRet;
				}
				LA14: ;
				nimln(536, "alloc.nim");
				it = (*it).Next;
			} LA11: ;
			nimln(537, "alloc.nim");
			c = (*c).Next;
		} LA2: ;
		nimln(1461, "system.nim");
		res_30698 += 1;
	} LA1: ;
	nimln(538, "alloc.nim");
	result = NIM_TRUE;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void*, rawalloc0_37012)(tmemregion23610* a, NI requestedsize) {
	void* result;
	nimfr("rawAlloc0", "alloc.nim")
	result = 0;
	nimln(605, "alloc.nim");
	result = rawalloc_30704(a, requestedsize);
	nimln(606, "alloc.nim");
	zeroMem(result, requestedsize);
	popFrame();
	return result;
}

N_NIMCALL(NI, ptrsize_39614)(void* p) {
	NI result;
	void* x;
	tbasechunk22836* c;
	nimfr("ptrSize", "alloc.nim")
	result = 0;
	nimln(707, "alloc.nim");
	nimln(707, "alloc.nim");
	nimln(707, "alloc.nim");
	x = ((void*) ((NI)((NU32)(((NI) (p))) - (NU32)(((NI)sizeof(tfreecell22828))))));
	nimln(708, "alloc.nim");
	c = pageaddr_25446(p);
	nimln(710, "alloc.nim");
	nimln(710, "alloc.nim");
	nimln(710, "alloc.nim");
	result = (NI)((NU32)((*c).Size) - (NU32)(((NI)sizeof(tfreecell22828))));
	nimln(711, "alloc.nim");
	{
		NIM_BOOL LOC3;
		nimln(711, "alloc.nim");
		nimln(711, "alloc.nim");
		LOC3 = 0;
		LOC3 = issmallchunk_25349(c);
		if (!!(LOC3)) goto LA4;
		nimln(712, "alloc.nim");
		nimln(712, "alloc.nim");
		nimln(712, "alloc.nim");
		result -= (NI32)(((NI)sizeof(tbigchunk22840)) - 8);
	}
	LA4: ;
	popFrame();
	return result;
}

N_NIMCALL(void*, realloc_41005)(tmemregion23610* allocator, void* p, NI newsize) {
	void* result;
	nimfr("realloc", "alloc.nim")
	result = 0;
	nimln(734, "alloc.nim");
	{
		nimln(734, "alloc.nim");
		if (!(0 < newsize)) goto LA3;
		nimln(735, "alloc.nim");
		result = alloc0_40017(allocator, newsize);
		nimln(736, "alloc.nim");
		{
			NI LOC9;
			nimln(736, "alloc.nim");
			nimln(736, "alloc.nim");
			if (!!((p == NIM_NIL))) goto LA7;
			nimln(737, "alloc.nim");
			nimln(737, "alloc.nim");
			LOC9 = 0;
			LOC9 = ptrsize_39614(p);
			memcpy(result, p, LOC9);
			nimln(738, "alloc.nim");
			dealloc_40024(allocator, p);
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		nimln(739, "alloc.nim");
		nimln(739, "alloc.nim");
		if (!!((p == NIM_NIL))) goto LA11;
		nimln(740, "alloc.nim");
		dealloc_40024(allocator, p);
	}
	goto LA1;
	LA11: ;
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(void, deallocospages_41014)(tmemregion23610* a) {
	NI p_41018;
	tintset22815 HEX3Atmp_41204;
	NI h_41206;
	NI res_41208;
	nimfr("deallocOsPages", "alloc.nim")
	p_41018 = 0;
	memset((void*)&HEX3Atmp_41204, 0, sizeof(HEX3Atmp_41204));
	nimln(744, "alloc.nim");
	HEX3Atmp_41204 = (*a).Chunkstarts;
	h_41206 = 0;
	nimln(1458, "system.nim");
	res_41208 = 0;
	nimln(1459, "system.nim");
	while (1) {
		ttrunk22811* r_41210;
		nimln(1459, "system.nim");
		if (!(((NI) (res_41208)) <= 255)) goto LA1;
		nimln(1458, "system.nim");
		h_41206 = res_41208;
		nimln(293, "alloc.nim");
		r_41210 = HEX3Atmp_41204.Data[(h_41206)- 0];
		nimln(294, "alloc.nim");
		while (1) {
			NI i_41212;
			nimln(294, "alloc.nim");
			nimln(294, "alloc.nim");
			if (!!((r_41210 == NIM_NIL))) goto LA2;
			nimln(295, "alloc.nim");
			i_41212 = 0;
			nimln(296, "alloc.nim");
			while (1) {
				NI w_41214;
				NI j_41216;
				nimln(296, "alloc.nim");
				if (!(i_41212 <= 15)) goto LA3;
				nimln(297, "alloc.nim");
				w_41214 = (*r_41210).Bits[(i_41212)- 0];
				nimln(299, "alloc.nim");
				j_41216 = 0;
				nimln(300, "alloc.nim");
				while (1) {
					nimln(300, "alloc.nim");
					nimln(300, "alloc.nim");
					if (!!((w_41214 == 0))) goto LA4;
					nimln(301, "alloc.nim");
					{
						tbasechunk22836* page;
						NI size;
						nimln(301, "alloc.nim");
						nimln(301, "alloc.nim");
						nimln(301, "alloc.nim");
						if (!!((((NI) ((NI)(w_41214 & 1))) == 0))) goto LA7;
						nimln(302, "alloc.nim");
						nimln(302, "alloc.nim");
						nimln(302, "alloc.nim");
						nimln(302, "alloc.nim");
						nimln(302, "alloc.nim");
						p_41018 = (NI)((NI)((NU32)((*r_41210).Key) << (NU32)(9)) | (NI)((NU32)((NI)((NU32)(i_41212) << (NU32)(5))) + (NU32)(j_41216)));
						nimln(745, "alloc.nim");
						nimln(745, "alloc.nim");
						page = ((tbasechunk22836*) ((NI)((NU32)(p_41018) << (NU32)(12))));
						nimln(747, "alloc.nim");
						nimln(747, "alloc.nim");
						{
							nimln(747, "alloc.nim");
							if (!((*page).Size < 4096)) goto LA11;
							size = 4096;
						}
						goto LA9;
						LA11: ;
						{
							size = (*page).Size;
						}
						LA9: ;
						nimln(748, "alloc.nim");
						osdeallocpages_22621(((void*) (page)), size);
					}
					LA7: ;
					nimln(303, "alloc.nim");
					j_41216 += 1;
					nimln(304, "alloc.nim");
					nimln(304, "alloc.nim");
					w_41214 = (NI)((NU32)(w_41214) >> (NU32)(1));
				} LA4: ;
				nimln(305, "alloc.nim");
				i_41212 += 1;
			} LA3: ;
			nimln(306, "alloc.nim");
			r_41210 = (*r_41210).Next;
		} LA2: ;
		nimln(1461, "system.nim");
		res_41208 += 1;
	} LA1: ;
	nimln(757, "alloc.nim");
	lldeallocall_25091(a);
	popFrame();
}

static N_INLINE(NI, getfreemem_41222)(tmemregion23610* a) {
	NI result;
	nimfr("getFreeMem", "alloc.nim")
	result = 0;
	nimln(759, "alloc.nim");
	result = (*a).Freemem;
	popFrame();
	return result;
}

static N_INLINE(NI, gettotalmem_41227)(tmemregion23610* a) {
	NI result;
	nimfr("getTotalMem", "alloc.nim")
	result = 0;
	nimln(760, "alloc.nim");
	result = (*a).Currmem;
	popFrame();
	return result;
}

static N_INLINE(NIM_BOOL, contains_41328)(tcellseq41306 s, tcell41290* c) {
	NIM_BOOL result;
	NI i_41343;
	NI HEX3Atmp_41360;
	NI res_41362;
	nimfr("contains", "cellsets.nim")
	result = 0;
	i_41343 = 0;
	HEX3Atmp_41360 = 0;
	nimln(47, "cellsets.nim");
	nimln(47, "cellsets.nim");
	HEX3Atmp_41360 = (NI32)(s.Len - 1);
	nimln(1458, "system.nim");
	res_41362 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_41362 <= HEX3Atmp_41360)) goto LA1;
		nimln(1458, "system.nim");
		i_41343 = res_41362;
		nimln(48, "cellsets.nim");
		{
			nimln(48, "cellsets.nim");
			if (!(s.D[(i_41343)- 0] == c)) goto LA4;
			nimln(48, "cellsets.nim");
			nimln(48, "cellsets.nim");
			result = NIM_TRUE;
			goto BeforeRet;
		}
		LA4: ;
		nimln(1461, "system.nim");
		res_41362 += 1;
	} LA1: ;
	nimln(49, "cellsets.nim");
	nimln(49, "cellsets.nim");
	result = NIM_FALSE;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, deinit_41404)(tcellseq41306* s) {
	nimfr("deinit", "cellsets.nim")
	nimln(68, "cellsets.nim");
	dealloc_4645(((void*) ((*s).D)));
	nimln(69, "cellsets.nim");
	(*s).D = NIM_NIL;
	nimln(70, "cellsets.nim");
	(*s).Len = 0;
	nimln(71, "cellsets.nim");
	(*s).Cap = 0;
	popFrame();
}

N_NIMCALL(NIM_BOOL, containsorincl_42130)(tcellset41302* s, tcell41290* cell) {
	NIM_BOOL result;
	NI u;
	tpagedesc41298* t;
	nimfr("containsOrIncl", "cellsets.nim")
	result = 0;
	nimln(173, "cellsets.nim");
	u = ((NI) (cell));
	nimln(174, "cellsets.nim");
	nimln(174, "cellsets.nim");
	t = cellsetget_41451((*s), (NI)((NU32)(u) >> (NU32)(12)));
	nimln(175, "cellsets.nim");
	{
		nimln(175, "cellsets.nim");
		nimln(175, "cellsets.nim");
		if (!!((t == NIM_NIL))) goto LA3;
		nimln(176, "cellsets.nim");
		nimln(176, "cellsets.nim");
		nimln(176, "cellsets.nim");
		u = (NI)((NU32)((NI)((NU32)(u) % (NU32)(4096))) / (NU32)(8));
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		nimln(177, "cellsets.nim");
		result = !(((NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] & (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31)))))) == 0));
		nimln(178, "cellsets.nim");
		{
			nimln(178, "cellsets.nim");
			if (!!(result)) goto LA7;
			nimln(179, "cellsets.nim");
			nimln(179, "cellsets.nim");
			nimln(179, "cellsets.nim");
			nimln(179, "cellsets.nim");
			nimln(180, "cellsets.nim");
			nimln(180, "cellsets.nim");
			(*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] = (NI)((*t).Bits[((NI)((NU32)(u) >> (NU32)(5)))- 0] | (NI)((NU32)(1) << (NU32)(((NI) ((NI)(u & 31))))));
		}
		LA7: ;
	}
	goto LA1;
	LA3: ;
	{
		nimln(182, "cellsets.nim");
		incl_42055(s, cell);
		nimln(183, "cellsets.nim");
		result = NIM_FALSE;
	}
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(void, deallocospages_43601)(void) {
	nimfr("deallocOsPages", "alloc.nim")
	nimln(775, "alloc.nim");
	deallocospages_41014(&gch_43244.Region);
	popFrame();
}

N_NOCONV(void*, realloc_4631)(void* p, NI newsize) {
	void* result;
	nimfr("realloc", "alloc.nim")
	result = 0;
	nimln(787, "alloc.nim");
	result = realloc_41005(&gch_43244.Region, p, newsize);
	popFrame();
	return result;
}

N_NOCONV(void*, allocshared_4654)(NI size) {
	void* result;
	nimfr("allocShared", "alloc.nim")
	result = 0;
	nimln(816, "alloc.nim");
	result = alloc_4601(size);
	popFrame();
	return result;
}

N_NOCONV(void*, allocshared0_4669)(NI size) {
	void* result;
	nimfr("allocShared0", "alloc.nim")
	result = 0;
	nimln(819, "alloc.nim");
	result = allocshared_4654(size);
	nimln(820, "alloc.nim");
	zeroMem(result, size);
	popFrame();
	return result;
}

N_NOCONV(void, deallocshared_4698)(void* p) {
	nimfr("deallocShared", "alloc.nim")
	nimln(828, "alloc.nim");
	dealloc_4645(p);
	popFrame();
}

N_NOCONV(void*, reallocshared_4684)(void* p, NI newsize) {
	void* result;
	nimfr("reallocShared", "alloc.nim")
	result = 0;
	nimln(836, "alloc.nim");
	result = realloc_4631(p, newsize);
	popFrame();
	return result;
}

N_NIMCALL(TNimType*, extGetCellType)(void* c) {
	TNimType* result;
	tcell41290* LOC1;
	nimfr("extGetCellType", "gc.nim")
	result = 0;
	nimln(125, "gc.nim");
	nimln(125, "gc.nim");
	LOC1 = 0;
	LOC1 = usrtocell_44643(c);
	result = (*LOC1).Typ;
	popFrame();
	return result;
}

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	tcell41290* LOC1;
	nimfr("internRefcount", "gc.nim")
	result = 0;
	nimln(128, "gc.nim");
	nimln(128, "gc.nim");
	nimln(128, "gc.nim");
	LOC1 = 0;
	LOC1 = usrtocell_44643(p);
	result = (NI)((NU32)((*LOC1).Refcount) >> (NU32)(3));
	popFrame();
	return result;
}

N_NIMCALL(void, writecell_44818)(NCSTRING msg, tcell41290* c) {
	NI kind;
	nimfr("writeCell", "gc.nim")
	nimln(142, "gc.nim");
	kind = -1;
	nimln(143, "gc.nim");
	{
		nimln(143, "gc.nim");
		nimln(143, "gc.nim");
		if (!!(((*c).Typ == NIM_NIL))) goto LA3;
		nimln(143, "gc.nim");
		nimln(143, "gc.nim");
		kind = ((NI) ((*(*c).Typ).kind));
	}
	LA3: ;
	nimln(148, "gc.nim");
	nimln(149, "gc.nim");
	nimln(149, "gc.nim");
	fprintf(stdout, "[GC] %s: %p %d rc=%ld; color=%ld\012", msg, c, kind, (NI)((NU32)((*c).Refcount) >> (NU32)(3)), (NI)((*c).Refcount & 3));
	popFrame();
}

N_NOINLINE(NIM_BOOL, isonstack_45012)(void* p) {
	NIM_BOOL result;
	void* volatile stacktop;
	NI b;
	NI a;
	NI x;
	NIM_BOOL LOC1;
	nimfr("isOnStack", "gc.nim")
	result = 0;
	stacktop = 0;
	nimln(856, "gc.nim");
	stacktop = ((void*) (&stacktop));
	nimln(857, "gc.nim");
	b = ((NI) (gch_43244.Stackbottom));
	nimln(858, "gc.nim");
	a = ((NI) (stacktop));
	nimln(859, "gc.nim");
	x = ((NI) (p));
	nimln(860, "gc.nim");
	nimln(860, "gc.nim");
	LOC1 = 0;
	nimln(860, "gc.nim");
	LOC1 = ((NU32)(a) <= (NU32)(x));
	if (!(LOC1)) goto LA2;
	nimln(860, "gc.nim");
	LOC1 = ((NU32)(x) <= (NU32)(b));
	LA2: ;
	result = LOC1;
	popFrame();
	return result;
}

static N_INLINE(void, nimGCref)(void* p) {
	tcell41290* LOC1;
	nimfr("nimGCref", "gc.nim")
	nimln(222, "gc.nim");
	nimln(222, "gc.nim");
	LOC1 = 0;
	LOC1 = usrtocell_44643(p);
	incref_47027(LOC1);
	popFrame();
}

static N_INLINE(void, nimGCunref)(void* p) {
	tcell41290* LOC1;
	nimfr("nimGCunref", "gc.nim")
	nimln(223, "gc.nim");
	nimln(223, "gc.nim");
	LOC1 = 0;
	LOC1 = usrtocell_44643(p);
	decref_46602(LOC1);
	popFrame();
}

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	nimfr("unsureAsgnRef", "gc.nim")
	nimln(264, "gc.nim");
	{
		NIM_BOOL LOC3;
		nimln(264, "gc.nim");
		nimln(264, "gc.nim");
		LOC3 = 0;
		LOC3 = isonstack_45012(((void*) (dest)));
		if (!!(LOC3)) goto LA4;
		nimln(265, "gc.nim");
		{
			tcell41290* LOC10;
			nimln(265, "gc.nim");
			nimln(265, "gc.nim");
			if (!!((src == NIM_NIL))) goto LA8;
			nimln(265, "gc.nim");
			nimln(265, "gc.nim");
			LOC10 = 0;
			LOC10 = usrtocell_44643(src);
			incref_47027(LOC10);
		}
		LA8: ;
		nimln(269, "gc.nim");
		{
			tcell41290* LOC15;
			nimln(269, "gc.nim");
			if (!((NU32)(4096) <= (NU32)(((NI) ((*dest)))))) goto LA13;
			nimln(269, "gc.nim");
			nimln(269, "gc.nim");
			LOC15 = 0;
			LOC15 = usrtocell_44643((*dest));
			decref_46602(LOC15);
		}
		LA13: ;
	}
	goto LA1;
	LA4: ;
	{
	}
	LA1: ;
	nimln(274, "gc.nim");
	(*dest) = src;
	popFrame();
}

N_NIMCALL(void, gcinvariant_50502)(void) {
}

N_NIMCALL(void*, newSeqRC1)(TNimType* typ, NI len) {
	void* result;
	NI size;
	NI LOC1;
	nimfr("newSeqRC1", "gc.nim")
	result = 0;
	nimln(494, "gc.nim");
	nimln(494, "gc.nim");
	LOC1 = 0;
	LOC1 = mulInt(len, (*(*typ).base).size);
	size = addInt(LOC1, 8);
	nimln(495, "gc.nim");
	result = newObjRC1(typ, size);
	nimln(496, "gc.nim");
	(*((TGenericSeq*) (result))).len = len;
	nimln(497, "gc.nim");
	(*((TGenericSeq*) (result))).reserved = len;
	popFrame();
	return result;
}

N_NIMCALL(void, gcsetstrategy_6614)(NU8 strategy) {
	nimfr("GC_setStrategy", "gc.nim")
	popFrame();
}

N_NIMCALL(void, gcenablemarkandsweep_6617)(void) {
	nimfr("GC_enableMarkAndSweep", "gc.nim")
	nimln(1047, "gc.nim");
	gch_43244.Cyclethreshold = 4194304;
	popFrame();
}

N_NIMCALL(void, gcdisablemarkandsweep_6619)(void) {
	nimfr("GC_disableMarkAndSweep", "gc.nim")
	nimln(1050, "gc.nim");
	gch_43244.Cyclethreshold = 2147483646;
	popFrame();
}

N_NIMCALL(void, gcfullcollect_6606)(void) {
	NI oldthreshold;
	nimfr("GC_fullCollect", "gc.nim")
	nimln(1055, "gc.nim");
	oldthreshold = gch_43244.Cyclethreshold;
	nimln(1056, "gc.nim");
	gch_43244.Cyclethreshold = 0;
	nimln(1057, "gc.nim");
	collectct_45008(&gch_43244);
	nimln(1058, "gc.nim");
	gch_43244.Cyclethreshold = oldthreshold;
	popFrame();
}

N_NIMCALL(NimStringDesc*, gcgetstatistics_6621)(void) {
	NimStringDesc* result;
	NimStringDesc* LOC1;
	NI LOC2;
	NimStringDesc* LOC3;
	NI LOC4;
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	NimStringDesc* LOC7;
	NimStringDesc* LOC8;
	NimStringDesc* LOC9;
	NimStringDesc* LOC10;
	NimStringDesc* LOC11;
	NimStringDesc* LOC12;
	NimStringDesc* LOC13;
	nimfr("GC_getStatistics", "gc.nim")
	result = 0;
	nimln(1062, "gc.nim");
	gcdisable_6602();
	nimln(1063, "gc.nim");
	nimln(1072, "gc.nim");
	LOC1 = 0;
	nimln(1063, "gc.nim");
	nimln(1063, "gc.nim");
	LOC2 = 0;
	LOC2 = gettotalmem_5265();
	LOC3 = 0;
	LOC3 = nimIntToStr(LOC2);
	nimln(1064, "gc.nim");
	nimln(1064, "gc.nim");
	LOC4 = 0;
	LOC4 = getoccupiedmem_5261();
	LOC5 = 0;
	LOC5 = nimIntToStr(LOC4);
	nimln(1065, "gc.nim");
	LOC6 = 0;
	LOC6 = nimIntToStr(gch_43244.Stat.Stackscans);
	nimln(1066, "gc.nim");
	LOC7 = 0;
	LOC7 = nimIntToStr(gch_43244.Stat.Maxstackcells);
	nimln(1067, "gc.nim");
	LOC8 = 0;
	LOC8 = nimIntToStr(gch_43244.Stat.Cyclecollections);
	nimln(1068, "gc.nim");
	LOC9 = 0;
	LOC9 = nimIntToStr(gch_43244.Stat.Maxthreshold);
	nimln(1069, "gc.nim");
	LOC10 = 0;
	LOC10 = nimIntToStr(gch_43244.Zct.Cap);
	nimln(1070, "gc.nim");
	LOC11 = 0;
	LOC11 = nimIntToStr(gch_43244.Stat.Cycletablesize);
	nimln(1071, "gc.nim");
	LOC12 = 0;
	LOC12 = nimIntToStr(gch_43244.Stat.Maxstacksize);
	nimln(1072, "gc.nim");
	nimln(1072, "gc.nim");
	LOC13 = 0;
	LOC13 = nimInt64ToStr((NI64)(gch_43244.Stat.Maxpause / 1000000));
	LOC1 = rawNewString(LOC3->Sup.len + LOC5->Sup.len + LOC6->Sup.len + LOC7->Sup.len + LOC8->Sup.len + LOC9->Sup.len + LOC10->Sup.len + LOC11->Sup.len + LOC12->Sup.len + LOC13->Sup.len + 223);
appendString(LOC1, ((NimStringDesc*) &TMP69));
appendString(LOC1, LOC3);
appendString(LOC1, ((NimStringDesc*) &TMP70));
appendString(LOC1, LOC5);
appendString(LOC1, ((NimStringDesc*) &TMP71));
appendString(LOC1, LOC6);
appendString(LOC1, ((NimStringDesc*) &TMP72));
appendString(LOC1, LOC7);
appendString(LOC1, ((NimStringDesc*) &TMP73));
appendString(LOC1, LOC8);
appendString(LOC1, ((NimStringDesc*) &TMP74));
appendString(LOC1, LOC9);
appendString(LOC1, ((NimStringDesc*) &TMP75));
appendString(LOC1, LOC10);
appendString(LOC1, ((NimStringDesc*) &TMP76));
appendString(LOC1, LOC11);
appendString(LOC1, ((NimStringDesc*) &TMP77));
appendString(LOC1, LOC12);
appendString(LOC1, ((NimStringDesc*) &TMP78));
appendString(LOC1, LOC13);
	result = LOC1;
	nimln(1073, "gc.nim");
	gcenable_6604();
	popFrame();
	return result;
}

static N_INLINE(NI, cmpStrings)(NimStringDesc* a, NimStringDesc* b) {
	NI result;
	int LOC13;
	result = 0;
	{
		if (!(a == b)) goto LA3;
		result = 0;
		goto BeforeRet;
	}
	LA3: ;
	{
		if (!(a == NIM_NIL)) goto LA7;
		result = -1;
		goto BeforeRet;
	}
	LA7: ;
	{
		if (!(b == NIM_NIL)) goto LA11;
		result = 1;
		goto BeforeRet;
	}
	LA11: ;
	LOC13 = 0;
	LOC13 = strcmp(((NCSTRING) ((*a).data)), ((NCSTRING) ((*b).data)));
	result = ((NI) (LOC13));
	goto BeforeRet;
	BeforeRet: ;
	return result;
}

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

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

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

N_NIMCALL(NI, hashString)(NimStringDesc* s) {
	NI result;
	NI h;
	NI i_71021;
	NI HEX3Atmp_71068;
	NI res_71070;
	result = 0;
	h = 0;
	i_71021 = 0;
	HEX3Atmp_71068 = 0;
	HEX3Atmp_71068 = (NI32)(s->Sup.len - 1);
	res_71070 = 0;
	while (1) {
		if (!(res_71070 <= HEX3Atmp_71068)) goto LA1;
		i_71021 = res_71070;
		h = (NI)((NU32)(h) + (NU32)(((NI) (((NU8)(s->data[i_71021]))))));
		h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(10))));
		h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(6)));
		res_71070 += 1;
	} LA1: ;
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(3))));
	h = (NI)(h ^ (NI)((NU32)(h) >> (NU32)(11)));
	h = (NI)((NU32)(h) + (NU32)((NI)((NU32)(h) << (NU32)(15))));
	result = h;
	return result;
}

static N_INLINE(void, appendChar)(NimStringDesc* dest, NIM_CHAR c) {
	(*dest).data[((*dest).Sup.len)- 0] = c;
	(*dest).data[((NI32)((*dest).Sup.len + 1))- 0] = 0;
	(*dest).Sup.len += 1;
}

N_NIMCALL(TGenericSeq*, incrSeq)(TGenericSeq* seq, NI elemsize) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		void* LOC5;
		if (!(((NI) ((NI)((*result).reserved & 2147483647))) <= (*result).len)) goto LA3;
		(*result).reserved = resize_70601(((NI) ((NI)((*result).reserved & 2147483647))));
		LOC5 = 0;
		LOC5 = growobj_59410(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC5));
	}
	LA3: ;
	(*result).len += 1;
	return result;
}

N_NIMCALL(TGenericSeq*, setLengthSeq)(TGenericSeq* seq, NI elemsize, NI newlen) {
	TGenericSeq* result;
	result = 0;
	result = seq;
	{
		NI LOC5;
		void* LOC6;
		if (!(((NI) ((NI)((*result).reserved & 2147483647))) < newlen)) goto LA3;
		LOC5 = 0;
		LOC5 = resize_70601(((NI) ((NI)((*result).reserved & 2147483647))));
		(*result).reserved = ((LOC5 >= newlen) ? LOC5 : newlen);
		LOC6 = 0;
		LOC6 = growobj_59410(((void*) (result)), (NI32)((NI32)(elemsize * (*result).reserved) + 8));
		result = ((TGenericSeq*) (LOC6));
	}
	goto LA1;
	LA3: ;
	{
		NI i_71611;
		NI HEX3Atmp_71687;
		NI res_71689;
		if (!(newlen < (*result).len)) goto LA8;
		i_71611 = 0;
		HEX3Atmp_71687 = 0;
		HEX3Atmp_71687 = (NI32)((*result).len - 1);
		res_71689 = newlen;
		while (1) {
			TNimType* LOC11;
			if (!(res_71689 <= HEX3Atmp_71687)) goto LA10;
			i_71611 = res_71689;
			LOC11 = 0;
			LOC11 = extGetCellType(((void*) (result)));
			forallchildrenaux_45023(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(8))) + (NU32)((NI)((NU32)(i_71611) * (NU32)(elemsize)))))), (*LOC11).base, ((NU8) 2));
			res_71689 += 1;
		} LA10: ;
		zeroMem(((void*) ((NI)((NU32)((NI)((NU32)(((NI) (result))) + (NU32)(8))) + (NU32)((NI)((NU32)(newlen) * (NU32)(elemsize)))))), (NI)((NU32)((NI)((NU32)((*result).len) - (NU32)(newlen))) * (NU32)(elemsize)));
	}
	goto LA1;
	LA8: ;
	LA1: ;
	(*result).len = newlen;
	return result;
}

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

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

N_NIMCALL(NI, binaryStrSearch)(NimStringDesc** x, NI xLen0, NimStringDesc* y) {
	NI result;
	NI a;
	NI b;
	result = 0;
	a = 0;
	b = xLen0;
	while (1) {
		NI mid;
		if (!(a < b)) goto LA1;
		mid = (NI32)((NI32)(a + b) / 2);
		{
			if (!(cmpStrings(x[mid], y) < 0)) goto LA4;
			a = (NI32)(mid + 1);
		}
		goto LA2;
		LA4: ;
		{
			b = mid;
		}
		LA2: ;
	} LA1: ;
	{
		NIM_BOOL LOC9;
		LOC9 = 0;
		LOC9 = (a < xLen0);
		if (!(LOC9)) goto LA10;
		LOC9 = eqStrings(x[a], y);
		LA10: ;
		if (!LOC9) goto LA11;
		result = a;
	}
	goto LA7;
	LA11: ;
	{
		result = -1;
	}
	LA7: ;
	return result;
}

static N_INLINE(void, rawEcho)(NimStringDesc* x) {
	nimfr("rawEcho", "sysio.nim")
	nimln(174, "sysio.nim");
	write_10463(stdout, x);
	popFrame();
}

static N_INLINE(void, rawEchoNL)(void) {
	nimfr("rawEchoNL", "sysio.nim")
	nimln(175, "sysio.nim");
	write_10463(stdout, ((NimStringDesc*) &TMP16));
	popFrame();
}

N_NIMCALL(void, genericReset)(void* dest, TNimType* mt) {
	NI d;
	nimfr("genericReset", "assign.nim")
	nimln(202, "assign.nim");
	d = ((NI) (dest));
	nimln(204, "assign.nim");
	switch ((*mt).kind) {
	case ((NU8) 28):
	case ((NU8) 22):
	case ((NU8) 24):
	{
		nimln(206, "assign.nim");
		unsureAsgnRef(((void**) (dest)), NIM_NIL);
	}
	break;
	case ((NU8) 17):
	case ((NU8) 18):
	{
		nimln(209, "assign.nim");
		genericresetaux_74001(dest, (*mt).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_75611;
		NI HEX3Atmp_75633;
		NI res_75635;
		i_75611 = 0;
		HEX3Atmp_75633 = 0;
		nimln(211, "assign.nim");
		nimln(211, "assign.nim");
		nimln(211, "assign.nim");
		HEX3Atmp_75633 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
		nimln(1458, "system.nim");
		res_75635 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_75635 <= HEX3Atmp_75633)) goto LA4;
			nimln(1458, "system.nim");
			i_75611 = res_75635;
			nimln(212, "assign.nim");
			nimln(212, "assign.nim");
			nimln(212, "assign.nim");
			genericReset(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_75611) * (NU32)((*(*mt).base).size)))))), (*mt).base);
			nimln(1461, "system.nim");
			res_75635 += 1;
		} LA4: ;
	}
	break;
	default:
	{
		nimln(214, "assign.nim");
		zeroMem(dest, (*mt).size);
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, genericresetaux_74001)(void* dest, TNimNode* n) {
	NI d;
	nimfr("genericResetAux", "assign.nim")
	nimln(190, "assign.nim");
	d = ((NI) (dest));
	nimln(191, "assign.nim");
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		nimln(193, "assign.nim");
		nimln(193, "assign.nim");
		genericReset(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		NI i_75420;
		NI HEX3Atmp_75450;
		NI res_75452;
		i_75420 = 0;
		HEX3Atmp_75450 = 0;
		nimln(195, "assign.nim");
		nimln(195, "assign.nim");
		HEX3Atmp_75450 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_75452 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_75452 <= HEX3Atmp_75450)) goto LA4;
			nimln(1458, "system.nim");
			i_75420 = res_75452;
			nimln(195, "assign.nim");
			genericresetaux_74001(dest, (*n).sons[(i_75420)- 0]);
			nimln(1461, "system.nim");
			res_75452 += 1;
		} LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		nimln(197, "assign.nim");
		m = selectbranch_21808(dest, n);
		nimln(198, "assign.nim");
		{
			nimln(198, "assign.nim");
			nimln(198, "assign.nim");
			if (!!((m == NIM_NIL))) goto LA8;
			nimln(198, "assign.nim");
			genericresetaux_74001(dest, m);
		}
		LA8: ;
		nimln(199, "assign.nim");
		nimln(199, "assign.nim");
		zeroMem(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*(*n).typ).size);
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, genericassignaux_74012)(void* dest, void* src, TNimNode* n, NIM_BOOL shallow) {
	NI d;
	NI s;
	nimfr("genericAssignAux", "assign.nim")
	nimln(16, "assign.nim");
	d = ((NI) (dest));
	nimln(17, "assign.nim");
	s = ((NI) (src));
	nimln(18, "assign.nim");
	switch ((*n).kind) {
	case ((NU8) 1):
	{
		nimln(20, "assign.nim");
		nimln(20, "assign.nim");
		nimln(21, "assign.nim");
		genericassignaux_74006(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*n).typ, shallow);
	}
	break;
	case ((NU8) 2):
	{
		NI i_74049;
		NI HEX3Atmp_74205;
		NI res_74207;
		i_74049 = 0;
		HEX3Atmp_74205 = 0;
		nimln(23, "assign.nim");
		nimln(23, "assign.nim");
		HEX3Atmp_74205 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_74207 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_74207 <= HEX3Atmp_74205)) goto LA3;
			nimln(1458, "system.nim");
			i_74049 = res_74207;
			nimln(24, "assign.nim");
			genericassignaux_74012(dest, src, (*n).sons[(i_74049)- 0], shallow);
			nimln(1461, "system.nim");
			res_74207 += 1;
		} LA3: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* dd;
		TNimNode* m;
		nimln(26, "assign.nim");
		dd = selectbranch_21808(dest, n);
		nimln(27, "assign.nim");
		m = selectbranch_21808(src, n);
		nimln(30, "assign.nim");
		{
			NIM_BOOL LOC7;
			nimln(30, "assign.nim");
			LOC7 = 0;
			nimln(30, "assign.nim");
			nimln(30, "assign.nim");
			LOC7 = !((m == dd));
			if (!(LOC7)) goto LA8;
			nimln(30, "assign.nim");
			nimln(30, "assign.nim");
			LOC7 = !((dd == NIM_NIL));
			LA8: ;
			if (!LOC7) goto LA9;
			nimln(31, "assign.nim");
			genericresetaux_74001(dest, dd);
		}
		LA9: ;
		nimln(32, "assign.nim");
		nimln(32, "assign.nim");
		nimln(32, "assign.nim");
		memcpy(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), ((void*) ((NI)((NU32)(s) + (NU32)((*n).offset)))), (*(*n).typ).size);
		nimln(34, "assign.nim");
		{
			nimln(34, "assign.nim");
			nimln(34, "assign.nim");
			if (!!((m == NIM_NIL))) goto LA13;
			nimln(35, "assign.nim");
			genericassignaux_74012(dest, src, m, shallow);
		}
		LA13: ;
	}
	break;
	case ((NU8) 0):
	{
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, genericassignaux_74006)(void* dest, void* src, TNimType* mt, NIM_BOOL shallow) {
	NI d;
	NI s;
	nimfr("genericAssignAux", "assign.nim")
	nimln(43, "assign.nim");
	d = ((NI) (dest));
	nimln(44, "assign.nim");
	s = ((NI) (src));
	nimln(46, "assign.nim");
	switch ((*mt).kind) {
	case ((NU8) 28):
	{
		void** x;
		void* s2;
		nimln(48, "assign.nim");
		x = ((void**) (dest));
		nimln(49, "assign.nim");
		s2 = (*((void**) (s)));
		nimln(50, "assign.nim");
		{
			NIM_BOOL LOC4;
			NIM_BOOL LOC5;
			nimln(50, "assign.nim");
			LOC4 = 0;
			nimln(50, "assign.nim");
			LOC5 = 0;
			nimln(50, "assign.nim");
			LOC5 = (s2 == NIM_NIL);
			if (LOC5) goto LA6;
			LOC5 = shallow;
			LA6: ;
			LOC4 = LOC5;
			if (LOC4) goto LA7;
			nimln(51, "assign.nim");
			nimln(51, "assign.nim");
			nimln(51, "assign.nim");
			LOC4 = !(((NI)((*((TGenericSeq*) (s2))).reserved & (-2147483647 -1)) == 0));
			LA7: ;
			if (!LOC4) goto LA8;
			nimln(52, "assign.nim");
			unsureAsgnRef(x, s2);
		}
		goto LA2;
		LA8: ;
		{
			NimStringDesc* LOC11;
			nimln(54, "assign.nim");
			nimln(54, "assign.nim");
			LOC11 = 0;
			LOC11 = copyString(((NimStringDesc*) (s2)));
			unsureAsgnRef(x, ((void*) (LOC11)));
		}
		LA2: ;
	}
	break;
	case ((NU8) 24):
	{
		void* s2;
		TGenericSeq* seq;
		void** x;
		void* LOC21;
		NI dst;
		NI i_74612;
		NI HEX3Atmp_74748;
		NI res_74750;
		nimln(56, "assign.nim");
		s2 = (*((void**) (src)));
		nimln(57, "assign.nim");
		seq = ((TGenericSeq*) (s2));
		nimln(58, "assign.nim");
		x = ((void**) (dest));
		nimln(59, "assign.nim");
		{
			NIM_BOOL LOC15;
			NIM_BOOL LOC16;
			nimln(59, "assign.nim");
			LOC15 = 0;
			nimln(59, "assign.nim");
			LOC16 = 0;
			nimln(59, "assign.nim");
			LOC16 = (s2 == NIM_NIL);
			if (LOC16) goto LA17;
			LOC16 = shallow;
			LA17: ;
			LOC15 = LOC16;
			if (LOC15) goto LA18;
			nimln(59, "assign.nim");
			nimln(59, "assign.nim");
			nimln(59, "assign.nim");
			LOC15 = !(((NI)((*seq).reserved & (-2147483647 -1)) == 0));
			LA18: ;
			if (!LOC15) goto LA19;
			nimln(61, "assign.nim");
			unsureAsgnRef(x, s2);
			nimln(62, "assign.nim");
			goto BeforeRet;
		}
		LA19: ;
		nimln(64, "assign.nim");
		nimln(64, "assign.nim");
		LOC21 = 0;
		LOC21 = newSeq(mt, (*seq).len);
		unsureAsgnRef(x, LOC21);
		nimln(65, "assign.nim");
		dst = ((NI) ((*((void**) (dest)))));
		i_74612 = 0;
		HEX3Atmp_74748 = 0;
		nimln(66, "assign.nim");
		nimln(66, "assign.nim");
		HEX3Atmp_74748 = (NI32)((*seq).len - 1);
		nimln(1458, "system.nim");
		res_74750 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_74750 <= HEX3Atmp_74748)) goto LA22;
			nimln(1458, "system.nim");
			i_74612 = res_74750;
			nimln(67, "assign.nim");
			nimln(68, "assign.nim");
			nimln(68, "assign.nim");
			nimln(68, "assign.nim");
			nimln(69, "assign.nim");
			nimln(69, "assign.nim");
			nimln(69, "assign.nim");
			genericassignaux_74006(((void*) ((NI)((NU32)((NI)((NU32)(dst) + (NU32)((NI)((NU32)(i_74612) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), ((void*) ((NI)((NU32)((NI)((NU32)(((NI) (s2))) + (NU32)((NI)((NU32)(i_74612) * (NU32)((*(*mt).base).size))))) + (NU32)(8)))), (*mt).base, shallow);
			nimln(1461, "system.nim");
			res_74750 += 1;
		} LA22: ;
	}
	break;
	case ((NU8) 17):
	{
		TNimType** pint;
		nimln(75, "assign.nim");
		pint = ((TNimType**) (dest));
		nimln(76, "assign.nim");
		(*pint) = (*((TNimType**) (src)));
		nimln(77, "assign.nim");
		{
			nimln(77, "assign.nim");
			nimln(77, "assign.nim");
			if (!!(((*mt).base == NIM_NIL))) goto LA26;
			nimln(78, "assign.nim");
			genericassignaux_74006(dest, src, (*mt).base, shallow);
		}
		LA26: ;
		nimln(79, "assign.nim");
		genericassignaux_74012(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 18):
	{
		nimln(81, "assign.nim");
		genericassignaux_74012(dest, src, (*mt).node, shallow);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_74697;
		NI HEX3Atmp_74756;
		NI res_74758;
		i_74697 = 0;
		HEX3Atmp_74756 = 0;
		nimln(83, "assign.nim");
		nimln(83, "assign.nim");
		nimln(83, "assign.nim");
		HEX3Atmp_74756 = (NI32)((NI32)((*mt).size / (*(*mt).base).size) - 1);
		nimln(1458, "system.nim");
		res_74758 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_74758 <= HEX3Atmp_74756)) goto LA30;
			nimln(1458, "system.nim");
			i_74697 = res_74758;
			nimln(84, "assign.nim");
			nimln(84, "assign.nim");
			nimln(84, "assign.nim");
			nimln(85, "assign.nim");
			nimln(85, "assign.nim");
			genericassignaux_74006(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_74697) * (NU32)((*(*mt).base).size)))))), ((void*) ((NI)((NU32)(s) + (NU32)((NI)((NU32)(i_74697) * (NU32)((*(*mt).base).size)))))), (*mt).base, shallow);
			nimln(1461, "system.nim");
			res_74758 += 1;
		} LA30: ;
	}
	break;
	case ((NU8) 22):
	{
		nimln(87, "assign.nim");
		unsureAsgnRef(((void**) (dest)), (*((void**) (s))));
	}
	break;
	default:
	{
		nimln(89, "assign.nim");
		memcpy(dest, src, (*mt).size);
	}
	break;
	}
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, genericAssign)(void* dest, void* src, TNimType* mt) {
	nimfr("genericAssign", "assign.nim")
	nimln(92, "assign.nim");
	gcdisable_6602();
	nimln(93, "assign.nim");
	genericassignaux_74006(dest, src, mt, NIM_FALSE);
	nimln(94, "assign.nim");
	gcenable_6604();
	popFrame();
}

N_NIMCALL(void, genericShallowAssign)(void* dest, void* src, TNimType* mt) {
	nimfr("genericShallowAssign", "assign.nim")
	nimln(97, "assign.nim");
	gcdisable_6602();
	nimln(98, "assign.nim");
	genericassignaux_74006(dest, src, mt, NIM_TRUE);
	nimln(99, "assign.nim");
	gcenable_6604();
	popFrame();
}

N_NIMCALL(void, genericSeqAssign)(void* dest, void* src_74804, TNimType* mt) {
	void* src;
	nimfr("genericSeqAssign", "assign.nim")
	nimln(131, "assign.nim");
	src = src_74804;
	nimln(132, "assign.nim");
	genericAssign(dest, ((void*) (&src)), mt);
	popFrame();
}

N_NIMCALL(void, genericAssignOpenArray)(void* dest, void* src, NI len, TNimType* mt) {
	NI d;
	NI s;
	NI i_74827;
	NI HEX3Atmp_74868;
	NI res_74870;
	nimfr("genericAssignOpenArray", "assign.nim")
	nimln(137, "assign.nim");
	d = ((NI) (dest));
	nimln(138, "assign.nim");
	s = ((NI) (src));
	i_74827 = 0;
	HEX3Atmp_74868 = 0;
	nimln(139, "assign.nim");
	nimln(139, "assign.nim");
	HEX3Atmp_74868 = (NI32)(len - 1);
	nimln(1458, "system.nim");
	res_74870 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_74870 <= HEX3Atmp_74868)) goto LA1;
		nimln(1458, "system.nim");
		i_74827 = res_74870;
		nimln(140, "assign.nim");
		nimln(140, "assign.nim");
		nimln(140, "assign.nim");
		nimln(141, "assign.nim");
		nimln(141, "assign.nim");
		genericAssign(((void*) ((NI)((NU32)(d) + (NU32)((NI)((NU32)(i_74827) * (NU32)((*(*mt).base).size)))))), ((void*) ((NI)((NU32)(s) + (NU32)((NI)((NU32)(i_74827) * (NU32)((*(*mt).base).size)))))), (*mt).base);
		nimln(1461, "system.nim");
		res_74870 += 1;
	} LA1: ;
	popFrame();
}

N_NIMCALL(void, objectinitaux_74878)(void* dest, TNimNode* n) {
	NI d;
	nimfr("objectInitAux", "assign.nim")
	nimln(145, "assign.nim");
	d = ((NI) (dest));
	nimln(146, "assign.nim");
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		nimln(148, "assign.nim");
		nimln(148, "assign.nim");
		objectInit(((void*) ((NI)((NU32)(d) + (NU32)((*n).offset)))), (*n).typ);
	}
	break;
	case ((NU8) 2):
	{
		NI i_75020;
		NI HEX3Atmp_75041;
		NI res_75043;
		i_75020 = 0;
		HEX3Atmp_75041 = 0;
		nimln(150, "assign.nim");
		nimln(150, "assign.nim");
		HEX3Atmp_75041 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_75043 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_75043 <= HEX3Atmp_75041)) goto LA4;
			nimln(1458, "system.nim");
			i_75020 = res_75043;
			nimln(151, "assign.nim");
			objectinitaux_74878(dest, (*n).sons[(i_75020)- 0]);
			nimln(1461, "system.nim");
			res_75043 += 1;
		} LA4: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		nimln(153, "assign.nim");
		m = selectbranch_21808(dest, n);
		nimln(154, "assign.nim");
		{
			nimln(154, "assign.nim");
			nimln(154, "assign.nim");
			if (!!((m == NIM_NIL))) goto LA8;
			nimln(154, "assign.nim");
			objectinitaux_74878(dest, m);
		}
		LA8: ;
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, objectInit)(void* dest, TNimType* typ) {
	NI d;
	nimfr("objectInit", "assign.nim")
	nimln(159, "assign.nim");
	d = ((NI) (dest));
	nimln(160, "assign.nim");
	switch ((*typ).kind) {
	case ((NU8) 17):
	{
		TNimType** pint;
		nimln(164, "assign.nim");
		pint = ((TNimType**) (dest));
		nimln(165, "assign.nim");
		(*pint) = typ;
		nimln(166, "assign.nim");
		objectinitaux_74878(dest, (*typ).node);
	}
	break;
	case ((NU8) 18):
	{
		nimln(168, "assign.nim");
		objectinitaux_74878(dest, (*typ).node);
	}
	break;
	case ((NU8) 16):
	case ((NU8) 4):
	{
		NI i_75064;
		NI HEX3Atmp_75077;
		NI res_75079;
		i_75064 = 0;
		HEX3Atmp_75077 = 0;
		nimln(170, "assign.nim");
		nimln(170, "assign.nim");
		nimln(170, "assign.nim");
		HEX3Atmp_75077 = (NI32)((NI32)((*typ).size / (*(*typ).base).size) - 1);
		nimln(1458, "system.nim");
		res_75079 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_75079 <= HEX3Atmp_75077)) goto LA4;
			nimln(1458, "system.nim");
			i_75064 = res_75079;
			nimln(171, "assign.nim");
			nimln(171, "assign.nim");
			nimln(171, "assign.nim");
			objectInit(((void*) ((NI)((NU32)(d) + (NU32)((NI32)(i_75064 * (*(*typ).base).size))))), (*typ).base);
			nimln(1461, "system.nim");
			res_75079 += 1;
		} LA4: ;
	}
	break;
	default:
	{
	}
	break;
	}
	popFrame();
}

N_NIMCALL(TNimNode*, selectbranch_75639)(NI discval, NI l, TNimNode** a) {
	TNimNode* result;
	nimfr("selectBranch", "assign.nim")
	result = 0;
	nimln(218, "assign.nim");
	result = a[(l)- 0];
	nimln(219, "assign.nim");
	{
		TNimNode* x;
		nimln(219, "assign.nim");
		if (!((NU32)(discval) < (NU32)(l))) goto LA3;
		nimln(220, "assign.nim");
		x = a[(discval)- 0];
		nimln(221, "assign.nim");
		{
			nimln(221, "assign.nim");
			nimln(221, "assign.nim");
			if (!!((x == NIM_NIL))) goto LA7;
			nimln(221, "assign.nim");
			result = x;
		}
		LA7: ;
	}
	LA3: ;
	popFrame();
	return result;
}

N_NIMCALL(void, FieldDiscriminantCheck)(NI olddiscval, NI newdiscval, TNimNode** a, NI l) {
	TNimNode* oldbranch;
	TNimNode* newbranch;
	nimfr("FieldDiscriminantCheck", "assign.nim")
	nimln(226, "assign.nim");
	oldbranch = selectbranch_75639(olddiscval, l, a);
	nimln(227, "assign.nim");
	newbranch = selectbranch_75639(newdiscval, l, a);
	nimln(228, "assign.nim");
	{
		NIM_BOOL LOC3;
		einvalidfield2461* e_75710;
		NimStringDesc* LOC7;
		nimln(228, "assign.nim");
		LOC3 = 0;
		nimln(228, "assign.nim");
		nimln(228, "assign.nim");
		LOC3 = !((newbranch == oldbranch));
		if (!(LOC3)) goto LA4;
		nimln(228, "assign.nim");
		nimln(228, "assign.nim");
		LOC3 = !((olddiscval == 0));
		LA4: ;
		if (!LOC3) goto LA5;
		e_75710 = 0;
		nimln(2005, "system.nim");
		e_75710 = (einvalidfield2461*) newObj((&NTI17401), sizeof(einvalidfield2461));
		(*e_75710).Sup.Sup.Sup.m_type = (&NTI2461);
		nimln(2006, "system.nim");
		LOC7 = 0;
		LOC7 = (*e_75710).Sup.Sup.message; (*e_75710).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TMP79));
		if (LOC7) nimGCunrefNoCycle(LOC7);
		nimln(2007, "system.nim");
		raiseException((E_Base*)e_75710, "EInvalidField");
	}
	LA5: ;
	popFrame();
}

N_NIMCALL(void, initreprclosure_76401)(treprclosure76239* cl) {
	nimfr("initReprClosure", "repr.nim")
	nimln(136, "repr.nim");
	init_41411(&(*cl).Marked);
	nimln(137, "repr.nim");
	(*cl).Recdepth = -1;
	nimln(138, "repr.nim");
	(*cl).Indent = 0;
	popFrame();
}

N_NIMCALL(NimStringDesc*, reprEnum)(NI e_76080, TNimType* typ) {
	NimStringDesc* result;
	NI e;
	NimStringDesc* LOC23;
	NimStringDesc* LOC24;
	nimfr("reprEnum", "repr.nim")
	result = 0;
	nimln(62, "repr.nim");
	nimln(62, "repr.nim");
	{
		nimln(62, "repr.nim");
		if (!((*typ).size == 1)) goto LA3;
		nimln(62, "repr.nim");
		e = ((NI) ((NI)(e_76080 & 255)));
	}
	goto LA1;
	LA3: ;
	{
		nimln(63, "repr.nim");
		if (!((*typ).size == 2)) goto LA6;
		nimln(63, "repr.nim");
		e = ((NI) ((NI)(e_76080 & 65535)));
	}
	goto LA1;
	LA6: ;
	{
		e = e_76080;
	}
	LA1: ;
	nimln(67, "repr.nim");
	{
		nimln(67, "repr.nim");
		nimln(67, "repr.nim");
		if (!!((((*typ).flags &(1<<((((NU8) 2))&7)))!=0))) goto LA11;
		nimln(68, "repr.nim");
		{
			nimln(68, "repr.nim");
			if (!((NU32)(e) < (NU32)((*(*typ).node).len))) goto LA15;
			nimln(69, "repr.nim");
			nimln(69, "repr.nim");
			nimln(69, "repr.nim");
			result = cstrToNimstr((*(*(*typ).node).sons[(e)- 0]).name);
			goto BeforeRet;
		}
		LA15: ;
	}
	goto LA9;
	LA11: ;
	{
		TNimNode* n;
		TNimNode** s;
		NI i_76122;
		NI HEX3Atmp_76123;
		NI res_76125;
		nimln(72, "repr.nim");
		n = (*typ).node;
		nimln(73, "repr.nim");
		s = (*n).sons;
		i_76122 = 0;
		HEX3Atmp_76123 = 0;
		nimln(74, "repr.nim");
		nimln(74, "repr.nim");
		HEX3Atmp_76123 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_76125 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_76125 <= HEX3Atmp_76123)) goto LA18;
			nimln(1458, "system.nim");
			i_76122 = res_76125;
			nimln(75, "repr.nim");
			{
				nimln(75, "repr.nim");
				if (!((*s[(i_76122)- 0]).offset == e)) goto LA21;
				nimln(75, "repr.nim");
				nimln(75, "repr.nim");
				nimln(75, "repr.nim");
				result = cstrToNimstr((*s[(i_76122)- 0]).name);
				goto BeforeRet;
			}
			LA21: ;
			nimln(1461, "system.nim");
			res_76125 += 1;
		} LA18: ;
	}
	LA9: ;
	nimln(76, "repr.nim");
	nimln(76, "repr.nim");
	LOC23 = 0;
	nimln(76, "repr.nim");
	LOC24 = 0;
	LOC24 = nimIntToStr(e);
	LOC23 = rawNewString(LOC24->Sup.len + 16);
appendString(LOC23, LOC24);
appendString(LOC23, ((NimStringDesc*) &TMP83));
	result = LOC23;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprBool)(NIM_BOOL x) {
	NimStringDesc* result;
	nimfr("reprBool", "repr.nim")
	result = 0;
	nimln(48, "repr.nim");
	{
		if (!x) goto LA3;
		nimln(48, "repr.nim");
		result = copyString(((NimStringDesc*) &TMP29));
	}
	goto LA1;
	LA3: ;
	{
		nimln(49, "repr.nim");
		result = copyString(((NimStringDesc*) &TMP30));
	}
	LA1: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprInt)(NI64 x) {
	NimStringDesc* result;
	nimfr("reprInt", "repr.nim")
	result = 0;
	nimln(15, "repr.nim");
	nimln(15, "repr.nim");
	nimln(15, "repr.nim");
	result = nimInt64ToStr(x);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprChar)(NIM_CHAR x) {
	NimStringDesc* result;
	nimfr("reprChar", "repr.nim")
	result = 0;
	nimln(52, "repr.nim");
	result = copyString(((NimStringDesc*) &TMP84));
	nimln(53, "repr.nim");
	switch (((NU8)(x))) {
	case 34:
	{
		nimln(54, "repr.nim");
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP85));
	}
	break;
	case 92:
	{
		nimln(55, "repr.nim");
		result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP86));
	}
	break;
	case 128 ... 255:
	case 0 ... 31:
	{
		NimStringDesc* LOC4;
		NimStringDesc* LOC5;
		nimln(56, "repr.nim");
		nimln(56, "repr.nim");
		LOC4 = 0;
		nimln(56, "repr.nim");
		nimln(56, "repr.nim");
		LOC5 = 0;
		LOC5 = reprInt(((NI64) (((NU8)(x)))));
		LOC4 = rawNewString(LOC5->Sup.len + 1);
appendString(LOC4, ((NimStringDesc*) &TMP87));
appendString(LOC4, LOC5);
		result = resizeString(result, LOC4->Sup.len + 0);
appendString(result, LOC4);
	}
	break;
	default:
	{
		nimln(57, "repr.nim");
		result = addChar(result, x);
	}
	break;
	}
	nimln(58, "repr.nim");
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP84));
	popFrame();
	return result;
}

N_NIMCALL(void, addsetelem_76134)(NimStringDesc** result, NI elem, TNimType* typ) {
	nimfr("addSetElem", "repr.nim")
	nimln(82, "repr.nim");
	switch ((*typ).kind) {
	case ((NU8) 14):
	{
		NimStringDesc* LOC2;
		nimln(83, "repr.nim");
		nimln(83, "repr.nim");
		LOC2 = 0;
		LOC2 = reprEnum(elem, typ);
		(*result) = resizeString((*result), LOC2->Sup.len + 0);
appendString((*result), LOC2);
	}
	break;
	case ((NU8) 1):
	{
		NimStringDesc* LOC4;
		nimln(84, "repr.nim");
		nimln(84, "repr.nim");
		LOC4 = 0;
		LOC4 = reprBool(((NIM_BOOL) (elem)));
		(*result) = resizeString((*result), LOC4->Sup.len + 0);
appendString((*result), LOC4);
	}
	break;
	case ((NU8) 2):
	{
		NimStringDesc* LOC6;
		nimln(85, "repr.nim");
		nimln(85, "repr.nim");
		nimln(85, "repr.nim");
		LOC6 = 0;
		LOC6 = reprChar(((NIM_CHAR) (((NI) (elem)))));
		(*result) = resizeString((*result), LOC6->Sup.len + 0);
appendString((*result), LOC6);
	}
	break;
	case ((NU8) 20):
	{
		nimln(86, "repr.nim");
		addsetelem_76134(result, elem, (*typ).base);
	}
	break;
	case ((NU8) 31) ... ((NU8) 35):
	case ((NU8) 41):
	case ((NU8) 42):
	{
		NimStringDesc* LOC9;
		nimln(87, "repr.nim");
		nimln(87, "repr.nim");
		LOC9 = 0;
		LOC9 = reprInt(((NI64) (elem)));
		(*result) = resizeString((*result), LOC9->Sup.len + 0);
appendString((*result), LOC9);
	}
	break;
	default:
	{
		nimln(89, "repr.nim");
		(*result) = resizeString((*result), 16);
appendString((*result), ((NimStringDesc*) &TMP83));
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, reprsetaux_76141)(NimStringDesc** result, void* p, TNimType* typ) {
	NI elemcounter;
	NI64 u;
	nimfr("reprSetAux", "repr.nim")
	nimln(93, "repr.nim");
	elemcounter = 0;
	nimln(95, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP81));
	u = 0;
	nimln(97, "repr.nim");
	switch ((*typ).size) {
	case 1:
	{
		nimln(98, "repr.nim");
		nimln(98, "repr.nim");
		u = ((NI64)(NU64)(NU8)((*((NI8*) (p)))));
	}
	break;
	case 2:
	{
		nimln(99, "repr.nim");
		nimln(99, "repr.nim");
		u = ((NI64)(NU64)(NU16)((*((NI16*) (p)))));
	}
	break;
	case 4:
	{
		nimln(100, "repr.nim");
		nimln(100, "repr.nim");
		u = ((NI64)(NU64)(NU32)((*((NI32*) (p)))));
	}
	break;
	case 8:
	{
		nimln(101, "repr.nim");
		u = (*((NI64*) (p)));
	}
	break;
	default:
	{
		NI8* a;
		NI i_76164;
		NI HEX3Atmp_76220;
		NI res_76222;
		nimln(103, "repr.nim");
		a = ((NI8*) (p));
		i_76164 = 0;
		HEX3Atmp_76220 = 0;
		nimln(104, "repr.nim");
		nimln(104, "repr.nim");
		nimln(104, "repr.nim");
		HEX3Atmp_76220 = (NI32)((NI32)((*typ).size * 8) - 1);
		nimln(1458, "system.nim");
		res_76222 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_76222 <= HEX3Atmp_76220)) goto LA6;
			nimln(1458, "system.nim");
			i_76164 = res_76222;
			nimln(105, "repr.nim");
			{
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				nimln(105, "repr.nim");
				if (!!(((NI)(((NI)(NU)(NU8)(a[((NI32)(i_76164 / 8))- 0])) & (NI)((NU32)(1) << (NU32)(((NI) ((NI32)(i_76164 % 8)))))) == 0))) goto LA9;
				nimln(106, "repr.nim");
				{
					nimln(106, "repr.nim");
					if (!(0 < elemcounter)) goto LA13;
					nimln(106, "repr.nim");
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP82));
				}
				LA13: ;
				nimln(107, "repr.nim");
				nimln(107, "repr.nim");
				addsetelem_76134(result, (NI32)(i_76164 + (*(*typ).node).len), (*typ).base);
				nimln(108, "repr.nim");
				elemcounter += 1;
			}
			LA9: ;
			nimln(1461, "system.nim");
			res_76222 += 1;
		} LA6: ;
	}
	break;
	}
	nimln(109, "repr.nim");
	{
		NI i_76196;
		NI res_76226;
		nimln(109, "repr.nim");
		if (!((*typ).size <= 8)) goto LA17;
		i_76196 = 0;
		nimln(1458, "system.nim");
		res_76226 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_76226 <= 63)) goto LA19;
			nimln(1458, "system.nim");
			i_76196 = res_76226;
			nimln(111, "repr.nim");
			{
				nimln(111, "repr.nim");
				nimln(111, "repr.nim");
				nimln(111, "repr.nim");
				nimln(111, "repr.nim");
				if (!!(((NI64)(u & (NI64)((NU64)(1) << (NU64)(((NI64) (i_76196))))) == 0))) goto LA22;
				nimln(112, "repr.nim");
				{
					nimln(112, "repr.nim");
					if (!(0 < elemcounter)) goto LA26;
					nimln(112, "repr.nim");
					(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP82));
				}
				LA26: ;
				nimln(113, "repr.nim");
				nimln(113, "repr.nim");
				addsetelem_76134(result, (NI32)(i_76196 + (*(*typ).node).len), (*typ).base);
				nimln(114, "repr.nim");
				elemcounter += 1;
			}
			LA22: ;
			nimln(1461, "system.nim");
			res_76226 += 1;
		} LA19: ;
	}
	LA17: ;
	nimln(115, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP88));
	popFrame();
}

N_NIMCALL(void, reprarray_77232)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl) {
	NI bs;
	NI i_77251;
	NI HEX3Atmp_77255;
	NI res_77257;
	nimfr("reprArray", "repr.nim")
	nimln(154, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP89));
	nimln(155, "repr.nim");
	bs = (*(*typ).base).size;
	i_77251 = 0;
	HEX3Atmp_77255 = 0;
	nimln(156, "repr.nim");
	nimln(156, "repr.nim");
	nimln(156, "repr.nim");
	HEX3Atmp_77255 = (NI32)((NI32)((*typ).size / bs) - 1);
	nimln(1458, "system.nim");
	res_77257 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_77257 <= HEX3Atmp_77255)) goto LA1;
		nimln(1458, "system.nim");
		i_77251 = res_77257;
		nimln(157, "repr.nim");
		{
			nimln(157, "repr.nim");
			if (!(0 < i_77251)) goto LA4;
			nimln(157, "repr.nim");
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP82));
		}
		LA4: ;
		nimln(158, "repr.nim");
		nimln(158, "repr.nim");
		nimln(158, "repr.nim");
		repraux_77224(result, ((void*) ((NI32)(((NI) (p)) + (NI32)(i_77251 * bs)))), (*typ).base, cl);
		nimln(1461, "system.nim");
		res_77257 += 1;
	} LA1: ;
	nimln(159, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP90));
	popFrame();
}

N_NIMCALL(void, reprrecordaux_77291)(NimStringDesc** result, void* p, TNimNode* n, treprclosure76239* cl) {
	nimfr("reprRecordAux", "repr.nim")
	nimln(176, "repr.nim");
	switch ((*n).kind) {
	case ((NU8) 0):
	{
	}
	break;
	case ((NU8) 1):
	{
		NimStringDesc* LOC3;
		nimln(179, "repr.nim");
		nimln(179, "repr.nim");
		LOC3 = 0;
		LOC3 = cstrToNimstr((*n).name);
		(*result) = resizeString((*result), LOC3->Sup.len + 0);
appendString((*result), LOC3);
		nimln(180, "repr.nim");
		(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP91));
		nimln(181, "repr.nim");
		nimln(181, "repr.nim");
		repraux_77224(result, ((void*) ((NI32)(((NI) (p)) + (*n).offset))), (*n).typ, cl);
	}
	break;
	case ((NU8) 2):
	{
		NI i_77411;
		NI HEX3Atmp_77433;
		NI res_77435;
		i_77411 = 0;
		HEX3Atmp_77433 = 0;
		nimln(183, "repr.nim");
		nimln(183, "repr.nim");
		HEX3Atmp_77433 = (NI32)((*n).len - 1);
		nimln(1458, "system.nim");
		res_77435 = 0;
		nimln(1459, "system.nim");
		while (1) {
			nimln(1459, "system.nim");
			if (!(res_77435 <= HEX3Atmp_77433)) goto LA5;
			nimln(1458, "system.nim");
			i_77411 = res_77435;
			nimln(184, "repr.nim");
			{
				nimln(184, "repr.nim");
				if (!(0 < i_77411)) goto LA8;
				nimln(184, "repr.nim");
				(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP92));
			}
			LA8: ;
			nimln(185, "repr.nim");
			reprrecordaux_77291(result, p, (*n).sons[(i_77411)- 0], cl);
			nimln(1461, "system.nim");
			res_77435 += 1;
		} LA5: ;
	}
	break;
	case ((NU8) 3):
	{
		TNimNode* m;
		nimln(187, "repr.nim");
		m = selectbranch_21808(p, n);
		nimln(188, "repr.nim");
		nimln(188, "repr.nim");
		repraux_77224(result, ((void*) ((NI32)(((NI) (p)) + (*n).offset))), (*n).typ, cl);
		nimln(189, "repr.nim");
		{
			nimln(189, "repr.nim");
			nimln(189, "repr.nim");
			if (!!((m == NIM_NIL))) goto LA13;
			nimln(189, "repr.nim");
			reprrecordaux_77291(result, p, m, cl);
		}
		LA13: ;
	}
	break;
	}
	popFrame();
}

N_NIMCALL(void, reprrecord_77441)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl) {
	NI oldlen;
	nimfr("reprRecord", "repr.nim")
	nimln(193, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP89));
	nimln(194, "repr.nim");
	nimln(194, "repr.nim");
	oldlen = (*result)->Sup.len;
	nimln(195, "repr.nim");
	reprrecordaux_77291(result, p, (*typ).node, cl);
	nimln(196, "repr.nim");
	{
		nimln(196, "repr.nim");
		nimln(196, "repr.nim");
		if (!!(((*typ).base == NIM_NIL))) goto LA3;
		nimln(197, "repr.nim");
		{
			nimln(197, "repr.nim");
			nimln(197, "repr.nim");
			nimln(197, "repr.nim");
			if (!!((oldlen == (*result)->Sup.len))) goto LA7;
			nimln(197, "repr.nim");
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP92));
		}
		LA7: ;
		nimln(198, "repr.nim");
		reprrecordaux_77291(result, p, (*(*typ).base).node, cl);
	}
	LA3: ;
	nimln(199, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP90));
	popFrame();
}

N_NIMCALL(NimStringDesc*, reprPointer)(void* x) {
	NimStringDesc* result;
	TY71782 buf;
	nimfr("reprPointer", "repr.nim")
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	nimln(20, "repr.nim");
	sprintf(((NCSTRING) (buf)), "%p", x);
	nimln(21, "repr.nim");
	nimln(21, "repr.nim");
	nimln(21, "repr.nim");
	result = cstrToNimstr(((NCSTRING) (buf)));
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, reprref_77468)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl) {
	tcell41290* cell;
	NimStringDesc* LOC1;
	NimStringDesc* LOC2;
	nimfr("reprRef", "repr.nim")
	nimln(208, "repr.nim");
	cell = usrtocell_44643(p);
	nimln(209, "repr.nim");
	nimln(209, "repr.nim");
	LOC1 = 0;
	nimln(209, "repr.nim");
	LOC2 = 0;
	LOC2 = reprPointer(p);
	LOC1 = rawNewString(LOC2->Sup.len + 4);
appendString(LOC1, ((NimStringDesc*) &TMP94));
appendString(LOC1, LOC2);
	(*result) = resizeString((*result), LOC1->Sup.len + 0);
appendString((*result), LOC1);
	nimln(210, "repr.nim");
	{
		NIM_BOOL LOC5;
		nimln(210, "repr.nim");
		nimln(210, "repr.nim");
		LOC5 = 0;
		LOC5 = contains_42009((*cl).Marked, cell);
		if (!!(LOC5)) goto LA6;
		nimln(212, "repr.nim");
		incl_42055(&(*cl).Marked, cell);
		nimln(213, "repr.nim");
		(*result) = resizeString((*result), 5);
appendString((*result), ((NimStringDesc*) &TMP95));
		nimln(214, "repr.nim");
		repraux_77224(result, p, (*typ).base, cl);
	}
	LA6: ;
	popFrame();
}

N_NIMCALL(void, reprsequence_77261)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl) {
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	NI bs;
	NI i_77280;
	NI HEX3Atmp_77285;
	NI res_77287;
	nimfr("reprSequence", "repr.nim")
	nimln(163, "repr.nim");
	{
		nimln(163, "repr.nim");
		if (!(p == NIM_NIL)) goto LA3;
		nimln(164, "repr.nim");
		(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP93));
		nimln(165, "repr.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(166, "repr.nim");
	nimln(166, "repr.nim");
	LOC5 = 0;
	nimln(166, "repr.nim");
	LOC6 = 0;
	LOC6 = reprPointer(p);
	LOC5 = rawNewString(LOC6->Sup.len + 1);
appendString(LOC5, LOC6);
appendString(LOC5, ((NimStringDesc*) &TMP89));
	(*result) = resizeString((*result), LOC5->Sup.len + 0);
appendString((*result), LOC5);
	nimln(167, "repr.nim");
	bs = (*(*typ).base).size;
	i_77280 = 0;
	HEX3Atmp_77285 = 0;
	nimln(168, "repr.nim");
	nimln(168, "repr.nim");
	HEX3Atmp_77285 = (NI32)((*((TGenericSeq*) (p))).len - 1);
	nimln(1458, "system.nim");
	res_77287 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_77287 <= HEX3Atmp_77285)) goto LA7;
		nimln(1458, "system.nim");
		i_77280 = res_77287;
		nimln(169, "repr.nim");
		{
			nimln(169, "repr.nim");
			if (!(0 < i_77280)) goto LA10;
			nimln(169, "repr.nim");
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP82));
		}
		LA10: ;
		nimln(170, "repr.nim");
		nimln(170, "repr.nim");
		nimln(170, "repr.nim");
		nimln(170, "repr.nim");
		repraux_77224(result, ((void*) ((NI32)((NI32)(((NI) (p)) + 8) + (NI32)(i_77280 * bs)))), (*typ).base, cl);
		nimln(1461, "system.nim");
		res_77287 += 1;
	} LA7: ;
	nimln(172, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP90));
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, reprstraux_76033)(NimStringDesc** result, NimStringDesc* s) {
	NimStringDesc* LOC5;
	NimStringDesc* LOC6;
	NIM_CHAR c_76038;
	NCSTRING HEX3Atmp_76049;
	NI i_76051;
	nimfr("reprStrAux", "repr.nim")
	nimln(29, "repr.nim");
	{
		nimln(29, "repr.nim");
		if (!(((void*) (s)) == NIM_NIL)) goto LA3;
		nimln(30, "repr.nim");
		(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP93));
		nimln(31, "repr.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(32, "repr.nim");
	nimln(32, "repr.nim");
	LOC5 = 0;
	nimln(32, "repr.nim");
	LOC6 = 0;
	LOC6 = reprPointer(((void*) (s)));
	LOC5 = rawNewString(LOC6->Sup.len + 1);
appendString(LOC5, LOC6);
appendString(LOC5, ((NimStringDesc*) &TMP96));
	(*result) = resizeString((*result), LOC5->Sup.len + 0);
appendString((*result), LOC5);
	c_76038 = 0;
	HEX3Atmp_76049 = 0;
	nimln(33, "repr.nim");
	HEX3Atmp_76049 = s->data;
	nimln(1558, "system.nim");
	i_76051 = 0;
	nimln(1559, "system.nim");
	while (1) {
		nimln(1559, "system.nim");
		nimln(1559, "system.nim");
		if (!!(((NU8)(HEX3Atmp_76049[i_76051]) == (NU8)(0)))) goto LA7;
		nimln(1560, "system.nim");
		c_76038 = HEX3Atmp_76049[i_76051];
		nimln(34, "repr.nim");
		switch (((NU8)(c_76038))) {
		case 34:
		{
			nimln(35, "repr.nim");
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP85));
		}
		break;
		case 92:
		{
			nimln(36, "repr.nim");
			(*result) = resizeString((*result), 2);
appendString((*result), ((NimStringDesc*) &TMP86));
		}
		break;
		case 10:
		{
			nimln(37, "repr.nim");
			(*result) = resizeString((*result), 6);
appendString((*result), ((NimStringDesc*) &TMP97));
		}
		break;
		case 128 ... 255:
		case 0 ... 9:
		case 11 ... 31:
		{
			NimStringDesc* LOC12;
			NimStringDesc* LOC13;
			nimln(39, "repr.nim");
			nimln(39, "repr.nim");
			LOC12 = 0;
			nimln(39, "repr.nim");
			nimln(39, "repr.nim");
			LOC13 = 0;
			LOC13 = reprInt(((NI64) (((NU8)(c_76038)))));
			LOC12 = rawNewString(LOC13->Sup.len + 1);
appendString(LOC12, ((NimStringDesc*) &TMP87));
appendString(LOC12, LOC13);
			(*result) = resizeString((*result), LOC12->Sup.len + 0);
appendString((*result), LOC12);
		}
		break;
		default:
		{
			nimln(40, "repr.nim");
			(*result) = addChar((*result), c_76038);
		}
		break;
		}
		nimln(1561, "system.nim");
		i_76051 += 1;
	} LA7: ;
	nimln(41, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP96));
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, repraux_77224)(NimStringDesc** result, void* p, TNimType* typ, treprclosure76239* cl) {
	nimfr("reprAux", "repr.nim")
	nimln(218, "repr.nim");
	{
		nimln(218, "repr.nim");
		if (!((*cl).Recdepth == 0)) goto LA3;
		nimln(219, "repr.nim");
		(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP80));
		nimln(220, "repr.nim");
		goto BeforeRet;
	}
	LA3: ;
	nimln(221, "repr.nim");
	(*cl).Recdepth -= 1;
	nimln(222, "repr.nim");
	switch ((*typ).kind) {
	case ((NU8) 19):
	{
		nimln(223, "repr.nim");
		reprsetaux_76141(result, p, typ);
	}
	break;
	case ((NU8) 16):
	{
		nimln(224, "repr.nim");
		reprarray_77232(result, p, typ, cl);
	}
	break;
	case ((NU8) 18):
	{
		nimln(225, "repr.nim");
		reprrecord_77441(result, p, typ, cl);
	}
	break;
	case ((NU8) 17):
	{
		TNimType* t;
		nimln(227, "repr.nim");
		t = (*((TNimType**) (p)));
		nimln(228, "repr.nim");
		reprrecord_77441(result, p, t, cl);
	}
	break;
	case ((NU8) 22):
	case ((NU8) 21):
	{
		nimln(231, "repr.nim");
		{
			nimln(231, "repr.nim");
			if (!((*((void**) (p))) == NIM_NIL)) goto LA12;
			nimln(231, "repr.nim");
			(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP93));
		}
		goto LA10;
		LA12: ;
		{
			nimln(232, "repr.nim");
			reprref_77468(result, (*((void**) (p))), typ, cl);
		}
		LA10: ;
	}
	break;
	case ((NU8) 24):
	{
		nimln(234, "repr.nim");
		reprsequence_77261(result, (*((void**) (p))), typ, cl);
	}
	break;
	case ((NU8) 31):
	{
		NimStringDesc* LOC17;
		nimln(235, "repr.nim");
		nimln(235, "repr.nim");
		LOC17 = 0;
		LOC17 = nimIntToStr((*((NI*) (p))));
		(*result) = resizeString((*result), LOC17->Sup.len + 0);
appendString((*result), LOC17);
	}
	break;
	case ((NU8) 32):
	{
		NimStringDesc* LOC19;
		nimln(236, "repr.nim");
		nimln(236, "repr.nim");
		LOC19 = 0;
		LOC19 = nimIntToStr(((NI) ((*((NI8*) (p))))));
		(*result) = resizeString((*result), LOC19->Sup.len + 0);
appendString((*result), LOC19);
	}
	break;
	case ((NU8) 33):
	{
		NimStringDesc* LOC21;
		nimln(237, "repr.nim");
		nimln(237, "repr.nim");
		LOC21 = 0;
		LOC21 = nimIntToStr(((NI) ((*((NI16*) (p))))));
		(*result) = resizeString((*result), LOC21->Sup.len + 0);
appendString((*result), LOC21);
	}
	break;
	case ((NU8) 34):
	{
		NimStringDesc* LOC23;
		nimln(238, "repr.nim");
		nimln(238, "repr.nim");
		LOC23 = 0;
		LOC23 = nimIntToStr(((NI) ((*((NI32*) (p))))));
		(*result) = resizeString((*result), LOC23->Sup.len + 0);
appendString((*result), LOC23);
	}
	break;
	case ((NU8) 35):
	{
		NimStringDesc* LOC25;
		nimln(239, "repr.nim");
		nimln(239, "repr.nim");
		LOC25 = 0;
		LOC25 = nimInt64ToStr((*((NI64*) (p))));
		(*result) = resizeString((*result), LOC25->Sup.len + 0);
appendString((*result), LOC25);
	}
	break;
	case ((NU8) 41):
	{
		NimStringDesc* LOC27;
		nimln(240, "repr.nim");
		nimln(240, "repr.nim");
		nimln(240, "repr.nim");
		LOC27 = 0;
		LOC27 = nimIntToStr(((NI)(NU)(NU8)((*((NI8*) (p))))));
		(*result) = resizeString((*result), LOC27->Sup.len + 0);
appendString((*result), LOC27);
	}
	break;
	case ((NU8) 42):
	{
		NimStringDesc* LOC29;
		nimln(241, "repr.nim");
		nimln(241, "repr.nim");
		nimln(241, "repr.nim");
		LOC29 = 0;
		LOC29 = nimIntToStr(((NI)(NU)(NU16)((*((NI16*) (p))))));
		(*result) = resizeString((*result), LOC29->Sup.len + 0);
appendString((*result), LOC29);
	}
	break;
	case ((NU8) 36):
	{
		NimStringDesc* LOC31;
		nimln(243, "repr.nim");
		nimln(243, "repr.nim");
		LOC31 = 0;
		LOC31 = nimFloatToStr((*((NF*) (p))));
		(*result) = resizeString((*result), LOC31->Sup.len + 0);
appendString((*result), LOC31);
	}
	break;
	case ((NU8) 37):
	{
		NimStringDesc* LOC33;
		nimln(244, "repr.nim");
		nimln(244, "repr.nim");
		LOC33 = 0;
		LOC33 = nimFloatToStr(((NF) ((*((NF32*) (p))))));
		(*result) = resizeString((*result), LOC33->Sup.len + 0);
appendString((*result), LOC33);
	}
	break;
	case ((NU8) 38):
	{
		NimStringDesc* LOC35;
		nimln(245, "repr.nim");
		nimln(245, "repr.nim");
		LOC35 = 0;
		LOC35 = nimFloatToStr((*((NF*) (p))));
		(*result) = resizeString((*result), LOC35->Sup.len + 0);
appendString((*result), LOC35);
	}
	break;
	case ((NU8) 14):
	{
		NimStringDesc* LOC37;
		nimln(246, "repr.nim");
		nimln(246, "repr.nim");
		LOC37 = 0;
		LOC37 = reprEnum((*((NI*) (p))), typ);
		(*result) = resizeString((*result), LOC37->Sup.len + 0);
appendString((*result), LOC37);
	}
	break;
	case ((NU8) 1):
	{
		NimStringDesc* LOC39;
		nimln(247, "repr.nim");
		nimln(247, "repr.nim");
		LOC39 = 0;
		LOC39 = reprBool((*((NIM_BOOL*) (p))));
		(*result) = resizeString((*result), LOC39->Sup.len + 0);
appendString((*result), LOC39);
	}
	break;
	case ((NU8) 2):
	{
		NimStringDesc* LOC41;
		nimln(248, "repr.nim");
		nimln(248, "repr.nim");
		LOC41 = 0;
		LOC41 = reprChar((*((NIM_CHAR*) (p))));
		(*result) = resizeString((*result), LOC41->Sup.len + 0);
appendString((*result), LOC41);
	}
	break;
	case ((NU8) 28):
	{
		nimln(249, "repr.nim");
		reprstraux_76033(result, (*((NimStringDesc**) (p))));
	}
	break;
	case ((NU8) 29):
	{
		NimStringDesc* LOC44;
		nimln(250, "repr.nim");
		nimln(250, "repr.nim");
		LOC44 = 0;
		LOC44 = cstrToNimstr((*((NCSTRING*) (p))));
		reprstraux_76033(result, LOC44);
	}
	break;
	case ((NU8) 20):
	{
		nimln(251, "repr.nim");
		repraux_77224(result, p, (*typ).base, cl);
	}
	break;
	case ((NU8) 25):
	case ((NU8) 26):
	{
		nimln(253, "repr.nim");
		{
			nimln(253, "repr.nim");
			if (!((*((void**) (p))) == NIM_NIL)) goto LA49;
			nimln(253, "repr.nim");
			(*result) = resizeString((*result), 3);
appendString((*result), ((NimStringDesc*) &TMP93));
		}
		goto LA47;
		LA49: ;
		{
			NimStringDesc* LOC52;
			nimln(254, "repr.nim");
			nimln(254, "repr.nim");
			LOC52 = 0;
			LOC52 = reprPointer((*((void**) (p))));
			(*result) = resizeString((*result), LOC52->Sup.len + 0);
appendString((*result), LOC52);
		}
		LA47: ;
	}
	break;
	default:
	{
		nimln(256, "repr.nim");
		(*result) = resizeString((*result), 15);
appendString((*result), ((NimStringDesc*) &TMP98));
	}
	break;
	}
	nimln(257, "repr.nim");
	(*cl).Recdepth += 1;
	BeforeRet: ;
	popFrame();
}

N_NIMCALL(void, deinitreprclosure_76803)(treprclosure76239* cl) {
	nimfr("deinitReprClosure", "repr.nim")
	nimln(141, "repr.nim");
	deinit_41420(&(*cl).Marked);
	popFrame();
}

N_NIMCALL(NimStringDesc*, reprAny)(void* p_76003, TNimType* typ) {
	NimStringDesc* result;
	treprclosure76239 cl;
	nimfr("reprAny", "repr.nim")
	result = 0;
	memset((void*)&cl, 0, sizeof(cl));
	nimln(276, "repr.nim");
	initreprclosure_76401(&cl);
	nimln(277, "repr.nim");
	result = copyString(((NimStringDesc*) &TMP11));
	nimln(278, "repr.nim");
	{
		nimln(278, "repr.nim");
		if (!((*typ).kind == ((NU8) 17) || (*typ).kind == ((NU8) 18) || (*typ).kind == ((NU8) 16) || (*typ).kind == ((NU8) 19))) goto LA3;
		nimln(279, "repr.nim");
		repraux_77224(&result, p_76003, typ, &cl);
	}
	goto LA1;
	LA3: ;
	{
		void* p;
		nimln(281, "repr.nim");
		p = p_76003;
		nimln(282, "repr.nim");
		repraux_77224(&result, ((void*) (&p)), typ, &cl);
	}
	LA1: ;
	nimln(283, "repr.nim");
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP16));
	nimln(284, "repr.nim");
	deinitreprclosure_76803(&cl);
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprFloat)(NF x) {
	NimStringDesc* result;
	nimfr("reprFloat", "repr.nim")
	result = 0;
	nimln(16, "repr.nim");
	nimln(16, "repr.nim");
	nimln(16, "repr.nim");
	result = nimFloatToStr(x);
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, HEX24_5001)(NU64 x) {
	NimStringDesc* result;
	TY71782 buf;
	nimfr("$", "repr.nim")
	result = 0;
	memset((void*)buf, 0, sizeof(buf));
	nimln(25, "repr.nim");
	sprintf(((NCSTRING) (buf)), "%llu", x);
	nimln(26, "repr.nim");
	nimln(26, "repr.nim");
	nimln(26, "repr.nim");
	result = cstrToNimstr(((NCSTRING) (buf)));
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprStr)(NimStringDesc* s) {
	NimStringDesc* result;
	nimfr("reprStr", "repr.nim")
	result = 0;
	nimln(44, "repr.nim");
	result = copyString(((NimStringDesc*) &TMP11));
	nimln(45, "repr.nim");
	reprstraux_76033(&result, s);
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, reprSet)(void* p, TNimType* typ) {
	NimStringDesc* result;
	nimfr("reprSet", "repr.nim")
	result = 0;
	nimln(118, "repr.nim");
	result = copyString(((NimStringDesc*) &TMP11));
	nimln(119, "repr.nim");
	reprsetaux_76141(&result, p, typ);
	popFrame();
	return result;
}

N_NIMCALL(void, reprbreak_77202)(NimStringDesc** result, treprclosure76239* cl) {
	NI i_77217;
	NI HEX3Atmp_77218;
	NI res_77220;
	nimfr("reprBreak", "repr.nim")
	nimln(146, "repr.nim");
	(*result) = resizeString((*result), 1);
appendString((*result), ((NimStringDesc*) &TMP16));
	i_77217 = 0;
	HEX3Atmp_77218 = 0;
	nimln(147, "repr.nim");
	nimln(147, "repr.nim");
	HEX3Atmp_77218 = (NI32)((*cl).Indent - 1);
	nimln(1458, "system.nim");
	res_77220 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_77220 <= HEX3Atmp_77218)) goto LA1;
		nimln(1458, "system.nim");
		i_77217 = res_77220;
		nimln(147, "repr.nim");
		(*result) = addChar((*result), 32);
		nimln(1461, "system.nim");
		res_77220 += 1;
	} LA1: ;
	popFrame();
}

N_NIMCALL(NimStringDesc*, reprOpenArray)(void* p, NI length, TNimType* elemtyp) {
	NimStringDesc* result;
	treprclosure76239 cl;
	NI bs;
	NI i_78076;
	NI HEX3Atmp_78084;
	NI res_78086;
	nimfr("reprOpenArray", "repr.nim")
	result = 0;
	memset((void*)&cl, 0, sizeof(cl));
	nimln(263, "repr.nim");
	initreprclosure_76401(&cl);
	nimln(264, "repr.nim");
	result = copyString(((NimStringDesc*) &TMP89));
	nimln(265, "repr.nim");
	bs = (*elemtyp).size;
	i_78076 = 0;
	HEX3Atmp_78084 = 0;
	nimln(266, "repr.nim");
	nimln(266, "repr.nim");
	HEX3Atmp_78084 = (NI32)(length - 1);
	nimln(1458, "system.nim");
	res_78086 = 0;
	nimln(1459, "system.nim");
	while (1) {
		nimln(1459, "system.nim");
		if (!(res_78086 <= HEX3Atmp_78084)) goto LA1;
		nimln(1458, "system.nim");
		i_78076 = res_78086;
		nimln(267, "repr.nim");
		{
			nimln(267, "repr.nim");
			if (!(0 < i_78076)) goto LA4;
			nimln(267, "repr.nim");
			result = resizeString(result, 2);
appendString(result, ((NimStringDesc*) &TMP82));
		}
		LA4: ;
		nimln(268, "repr.nim");
		nimln(268, "repr.nim");
		nimln(268, "repr.nim");
		repraux_77224(&result, ((void*) ((NI32)(((NI) (p)) + (NI32)(i_78076 * bs)))), elemtyp, &cl);
		nimln(1461, "system.nim");
		res_78086 += 1;
	} LA1: ;
	nimln(269, "repr.nim");
	result = resizeString(result, 1);
appendString(result, ((NimStringDesc*) &TMP90));
	nimln(270, "repr.nim");
	deinitreprclosure_76803(&cl);
	popFrame();
	return result;
}

static N_INLINE(E_Base*, getCurrentException)(void) {
	E_Base* result;
	nimfr("getCurrentException", "system.nim")
	result = 0;
	nimln(2443, "system.nim");
	result = currexception_13041;
	popFrame();
	return result;
}

static N_INLINE(NimStringDesc*, getcurrentexceptionmsg_78236)(void) {
	NimStringDesc* result;
	E_Base* e;
	nimfr("getCurrentExceptionMsg", "system.nim")
	result = 0;
	nimln(2448, "system.nim");
	e = getCurrentException();
	nimln(2449, "system.nim");
	nimln(2449, "system.nim");
	nimln(2449, "system.nim");
	{
		nimln(2449, "system.nim");
		if (!(e == NIM_NIL)) goto LA3;
		result = copyString(((NimStringDesc*) &TMP11));
	}
	goto LA1;
	LA3: ;
	{
		result = copyString((*e).message);
	}
	LA1: ;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}

N_NIMCALL(void, onraise_78258)(TY11626 action) {
	nimfr("onRaise", "system.nim")
	nimln(2457, "system.nim");
	{
		nimln(2457, "system.nim");
		nimln(2457, "system.nim");
		if (!!(exchandler_13039 == 0)) goto LA3;
		nimln(2458, "system.nim");
		(*exchandler_13039).hasRaiseAction = NIM_TRUE;
		nimln(2459, "system.nim");
		unsureAsgnRef((void**) &(*exchandler_13039).raiseAction.ClEnv, action.ClEnv);
		(*exchandler_13039).raiseAction.ClPrc = action.ClPrc;
	}
	LA3: ;
	popFrame();
}

N_NIMCALL(void, quit_79030)(NimStringDesc* errormsg, NI errorcode) {
	nimfr("quit", "system.nim")
	nimln(2559, "system.nim");
	printf("%s\012", (errormsg)->data);
	nimln(2560, "system.nim");
	exit(errorcode);
	popFrame();
}

static N_INLINE(NF, HEX2F_79038)(NI x, NI y) {
	NF result;
	nimfr("/", "system.nim")
	result = 0;
	nimln(2567, "system.nim");
	nimln(2567, "system.nim");
	nimln(2567, "system.nim");
	nimln(2567, "system.nim");
	result = ((NF)(((double) (x))) / (NF)(((double) (y))));
	popFrame();
	return result;
}

static N_INLINE(NimStringDesc*, HEX5BHEX5D_79085)(NimStringDesc* s, tslice79092 x) {
	NimStringDesc* result;
	NI LOC1;
	NI LOC7;
	nimfr("[]", "system.nim")
	result = 0;
	nimln(2591, "system.nim");
	nimln(2591, "system.nim");
	LOC1 = 0;
	nimln(2570, "system.nim");
	{
		nimln(2570, "system.nim");
		if (!(0 <= x.A)) goto LA4;
		LOC1 = x.A;
	}
	goto LA2;
	LA4: ;
	{
		NI TMP99;
		nimln(2570, "system.nim");
		nimln(2570, "system.nim");
		TMP99 = addInt(s->Sup.len, x.A);
		LOC1 = (NI32)(TMP99);
	}
	LA2: ;
	LOC7 = 0;
	nimln(2570, "system.nim");
	{
		nimln(2570, "system.nim");
		if (!(0 <= x.B)) goto LA10;
		LOC7 = x.B;
	}
	goto LA8;
	LA10: ;
	{
		NI TMP100;
		nimln(2570, "system.nim");
		nimln(2570, "system.nim");
		TMP100 = addInt(s->Sup.len, x.B);
		LOC7 = (NI32)(TMP100);
	}
	LA8: ;
	result = copyStrLast(s, LOC1, LOC7);
	popFrame();
	return result;
}

N_NIMCALL(void, HEX5BHEX5DHEX3D_79100)(NimStringDesc** s, tslice79092 x, NimStringDesc* b) {
	NI a;
	NI l;
	NI LOC6;
	NI TMP103;
	NI TMP104;
	nimfr("[]=", "system.nim")
	nimln(2602, "system.nim");
	nimln(2570, "system.nim");
	{
		nimln(2570, "system.nim");
		if (!(0 <= x.A)) goto LA3;
		a = x.A;
	}
	goto LA1;
	LA3: ;
	{
		NI TMP101;
		nimln(2570, "system.nim");
		nimln(2570, "system.nim");
		TMP101 = addInt((*s)->Sup.len, x.A);
		a = (NI32)(TMP101);
	}
	LA1: ;
	nimln(2603, "system.nim");
	nimln(2603, "system.nim");
	nimln(2603, "system.nim");
	LOC6 = 0;
	nimln(2570, "system.nim");
	{
		nimln(2570, "system.nim");
		if (!(0 <= x.B)) goto LA9;
		LOC6 = x.B;
	}
	goto LA7;
	LA9: ;
	{
		NI TMP102;
		nimln(2570, "system.nim");
		nimln(2570, "system.nim");
		TMP102 = addInt((*s)->Sup.len, x.B);
		LOC6 = (NI32)(TMP102);
	}
	LA7: ;
	TMP103 = subInt(LOC6, a);
	TMP104 = addInt((NI32)(TMP103), 1);
	l = (NI32)(TMP104);
	nimln(2604, "system.nim");
	{
		NI i_79131;
		NI HEX3Atmp_79189;
		NI res_79191;
		nimln(2604, "system.nim");
		nimln(2604, "system.nim");
		if (!(l == b->Sup.len)) goto LA14;
		i_79131 = 0;
		HEX3Atmp_79189 = 0;
		nimln(2605, "system.nim");
		nimln(2605, "system.nim");
		HEX3Atmp_79189 = subInt(l, 1);
		nimln(1458, "system.nim");
		res_79191 = 0;
		nimln(1459, "system.nim");
		while (1) {
			NI TMP105;
			nimln(1459, "system.nim");
			if (!(res_79191 <= HEX3Atmp_79189)) goto LA16;
			nimln(1458, "system.nim");
			i_79131 = res_79191;
			nimln(2605, "system.nim");
			nimln(2605, "system.nim");
			TMP105 = addInt(i_79131, a);
			if ((NU)((NI32)(TMP105)) > (NU)((*s)->Sup.len)) raiseIndexError();
			if ((NU)(i_79131) > (NU)(b->Sup.len)) raiseIndexError();
			(*s)->data[(NI32)(TMP105)] = b->data[i_79131];
			nimln(1461, "system.nim");
			res_79191 = addInt(res_79191, 1);
		} LA16: ;
	}
	goto LA12;
	LA14: ;
	{
		NI slen_79133;
		NI shift_79135;
		NI TMP106;
		NI newlen_79137;
		NI TMP107;
		NI i_79143;
		NI HEX3Atmp_79202;
		NI res_79204;
		nimln(2574, "system.nim");
		nimln(2574, "system.nim");
		slen_79133 = (*s)->Sup.len;
		nimln(2575, "system.nim");
		nimln(2575, "system.nim");
		nimln(2575, "system.nim");
		TMP106 = subInt(b->Sup.len, l);
		shift_79135 = (NI32)(TMP106);
		nimln(2576, "system.nim");
		nimln(2576, "system.nim");
		TMP107 = addInt(slen_79133, shift_79135);
		newlen_79137 = (NI32)(TMP107);
		nimln(2577, "system.nim");
		{
			NI i_79139;
			NI HEX3Atmp_79193;
			NI HEX3Atmp_79194;
			NI TMP108;
			NI TMP109;
			NI TMP110;
			NI res_79196;
			nimln(2577, "system.nim");
			if (!(0 < shift_79135)) goto LA20;
			nimln(2579, "system.nim");
			(*s) = setLengthStr((*s), newlen_79137);
			i_79139 = 0;
			HEX3Atmp_79193 = 0;
			HEX3Atmp_79194 = 0;
			nimln(2580, "system.nim");
			nimln(2580, "system.nim");
			TMP108 = subInt(newlen_79137, 1);
			HEX3Atmp_79193 = (NI32)(TMP108);
			nimln(2580, "system.nim");
			nimln(2580, "system.nim");
			nimln(2580, "system.nim");
			TMP109 = addInt(a, shift_79135);
			TMP110 = addInt((NI32)(TMP109), 1);
			HEX3Atmp_79194 = (NI32)(TMP110);
			nimln(1442, "system.nim");
			res_79196 = HEX3Atmp_79193;
			nimln(1443, "system.nim");
			while (1) {
				NI TMP111;
				nimln(1443, "system.nim");
				if (!(HEX3Atmp_79194 <= res_79196)) goto LA22;
				nimln(1442, "system.nim");
				i_79139 = res_79196;
				nimln(2580, "system.nim");
				if ((NU)(i_79139) > (NU)((*s)->Sup.len)) raiseIndexError();
				nimln(2580, "system.nim");
				TMP111 = subInt(i_79139, shift_79135);
				if ((NU)((NI32)(TMP111)) > (NU)((*s)->Sup.len)) raiseIndexError();
				(*s)->data[i_79139] = (*s)->data[(NI32)(TMP111)];
				nimln(1445, "system.nim");
				res_79196 = subInt(res_79196, 1);
			} LA22: ;
		}
		goto LA18;
		LA20: ;
		{
			NI i_79141;
			NI HEX3Atmp_79197;
			NI HEX3Atmp_79198;
			NI TMP112;
			NI TMP113;
			NI TMP114;
			NI res_79200;
			i_79141 = 0;
			HEX3Atmp_79197 = 0;
			HEX3Atmp_79198 = 0;
			nimln(2582, "system.nim");
			nimln(2582, "system.nim");
			nimln(2582, "system.nim");
			TMP112 = addInt(a, b->Sup.len);
			HEX3Atmp_79197 = (NI32)(TMP112);
			nimln(2582, "system.nim");
			nimln(2582, "system.nim");
			nimln(2582, "system.nim");
			nimln(2582, "system.nim");
			TMP113 = subInt((*s)->Sup.len, 1);
			TMP114 = addInt((NI32)(TMP113), shift_79135);
			HEX3Atmp_79198 = (NI32)(TMP114);
			nimln(1451, "system.nim");
			res_79200 = HEX3Atmp_79197;
			nimln(1452, "system.nim");
			while (1) {
				NI TMP115;
				nimln(1452, "system.nim");
				if (!(res_79200 <= HEX3Atmp_79198)) goto LA24;
				nimln(1451, "system.nim");
				i_79141 = res_79200;
				nimln(2582, "system.nim");
				if ((NU)(i_79141) > (NU)((*s)->Sup.len)) raiseIndexError();
				nimln(2582, "system.nim");
				TMP115 = subInt(i_79141, shift_79135);
				if ((NU)((NI32)(TMP115)) > (NU)((*s)->Sup.len)) raiseIndexError();
				(*s)->data[i_79141] = (*s)->data[(NI32)(TMP115)];
				nimln(1454, "system.nim");
				res_79200 = addInt(res_79200, 1);
			} LA24: ;
			nimln(2584, "system.nim");
			(*s) = setLengthStr((*s), newlen_79137);
		}
		LA18: ;
		i_79143 = 0;
		HEX3Atmp_79202 = 0;
		nimln(2586, "system.nim");
		nimln(2586, "system.nim");
		nimln(2586, "system.nim");
		HEX3Atmp_79202 = subInt(b->Sup.len, 1);
		nimln(1458, "system.nim");
		res_79204 = 0;
		nimln(1459, "system.nim");
		while (1) {
			NI TMP116;
			nimln(1459, "system.nim");
			if (!(res_79204 <= HEX3Atmp_79202)) goto LA25;
			nimln(1458, "system.nim");
			i_79143 = res_79204;
			nimln(2586, "system.nim");
			nimln(2586, "system.nim");
			TMP116 = addInt(i_79143, a);
			if ((NU)((NI32)(TMP116)) > (NU)((*s)->Sup.len)) raiseIndexError();
			if ((NU)(i_79143) > (NU)(b->Sup.len)) raiseIndexError();
			(*s)->data[(NI32)(TMP116)] = b->data[i_79143];
			nimln(1461, "system.nim");
			res_79204 = addInt(res_79204, 1);
		} LA25: ;
	}
	LA12: ;
	popFrame();
}

N_NIMCALL(NimStringDesc*, gorge_79581)(NimStringDesc* command, NimStringDesc* input) {
	NimStringDesc* result;
	nimfr("gorge", "system.nim")
	result = 0;
	popFrame();
	return result;
}

N_NIMCALL(NimStringDesc*, staticexec_79588)(NimStringDesc* command, NimStringDesc* input) {
	NimStringDesc* result;
	nimfr("staticExec", "system.nim")
	result = 0;
	popFrame();
	return result;
}
N_NIMCALL(void, TMP117)(void* p, NI op) {
	EAssertionFailed* a;
	a = (EAssertionFailed*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
}

N_NOINLINE(void, raiseassert_79692)(NimStringDesc* msg) {
	EAssertionFailed* e_79697;
	NimStringDesc* LOC1;
	nimfr("raiseAssert", "system.nim")
	e_79697 = 0;
	nimln(2005, "system.nim");
	e_79697 = (EAssertionFailed*) newObj((&NTI79801), sizeof(EAssertionFailed));
	(*e_79697).Sup.Sup.Sup.m_type = (&NTI2449);
	nimln(2006, "system.nim");
	LOC1 = 0;
	LOC1 = (*e_79697).Sup.Sup.message; (*e_79697).Sup.Sup.message = copyStringRC1(msg);
	if (LOC1) nimGCunrefNoCycle(LOC1);
	nimln(2007, "system.nim");
	raiseException((E_Base*)e_79697, "EAssertionFailed");
	popFrame();
}

N_NIMCALL(void, failedassertimpl_79821)(NimStringDesc* msg) {
	nimfr("failedAssertImpl", "system.nim")
	nimln(2772, "system.nim");
	raiseassert_79692(msg);
	popFrame();
}

static N_INLINE(void, shallow_80420)(NimStringDesc** s_80423) {
	TGenericSeq* s;
	nimfr("shallow", "system.nim")
	nimln(2851, "system.nim");
	s = ((TGenericSeq*) ((*s_80423)));
	nimln(2852, "system.nim");
	nimln(2852, "system.nim");
	(*s).reserved = (NI)((*s).reserved | (-2147483647 -1));
	popFrame();
}

N_NIMCALL(void, insert_80801)(NimStringDesc** x, NimStringDesc* item, NI i) {
	NI xl;
	NI TMP118;
	NI j;
	NI TMP119;
	nimfr("insert", "system.nim")
	nimln(2870, "system.nim");
	nimln(2870, "system.nim");
	xl = (*x)->Sup.len;
	nimln(2871, "system.nim");
	nimln(2871, "system.nim");
	nimln(2871, "system.nim");
	TMP118 = addInt(xl, item->Sup.len);
	(*x) = setLengthStr((*x), (NI32)(TMP118));
	nimln(2872, "system.nim");
	nimln(2872, "system.nim");
	TMP119 = subInt(xl, 1);
	j = (NI32)(TMP119);
	nimln(2873, "system.nim");
	while (1) {
		NI TMP120;
		nimln(2873, "system.nim");
		if (!(i <= j)) goto LA1;
		nimln(2874, "system.nim");
		nimln(2874, "system.nim");
		nimln(2874, "system.nim");
		TMP120 = addInt(j, item->Sup.len);
		if ((NU)((NI32)(TMP120)) > (NU)((*x)->Sup.len)) raiseIndexError();
		if ((NU)(j) > (NU)((*x)->Sup.len)) raiseIndexError();
		(*x)->data[(NI32)(TMP120)] = (*x)->data[j];
		nimln(2875, "system.nim");
		j = subInt(j, 1);
	} LA1: ;
	nimln(2876, "system.nim");
	j = 0;
	nimln(2877, "system.nim");
	while (1) {
		NI TMP121;
		nimln(2877, "system.nim");
		nimln(2877, "system.nim");
		if (!(j < item->Sup.len)) goto LA2;
		nimln(2878, "system.nim");
		nimln(2878, "system.nim");
		TMP121 = addInt(j, i);
		if ((NU)((NI32)(TMP121)) > (NU)((*x)->Sup.len)) raiseIndexError();
		if ((NU)(j) > (NU)(item->Sup.len)) raiseIndexError();
		(*x)->data[(NI32)(TMP121)] = item->data[j];
		nimln(2879, "system.nim");
		j = addInt(j, 1);
	} LA2: ;
	popFrame();
}

N_NIMCALL(void, safeadd_81211)(NimStringDesc** x, NIM_CHAR y) {
	nimfr("safeAdd", "system.nim")
	nimln(2901, "system.nim");
	{
		nimln(2901, "system.nim");
		if (!((*x) == NIM_NIL)) goto LA3;
		nimln(2901, "system.nim");
		unsureAsgnRef((void**) &(*x), copyString(((NimStringDesc*) &TMP11)));
	}
	LA3: ;
	nimln(2902, "system.nim");
	(*x) = addChar((*x), y);
	popFrame();
}

N_NIMCALL(void, safeadd_81217)(NimStringDesc** x, NimStringDesc* y) {
	nimfr("safeAdd", "system.nim")
	nimln(2905, "system.nim");
	{
		nimln(2905, "system.nim");
		if (!((*x) == NIM_NIL)) goto LA3;
		nimln(2905, "system.nim");
		unsureAsgnRef((void**) &(*x), copyString(y));
	}
	goto LA1;
	LA3: ;
	{
		nimln(2906, "system.nim");
		(*x) = resizeString((*x), y->Sup.len + 0);
appendString((*x), y);
	}
	LA1: ;
	popFrame();
}

N_NIMCALL(TNimObject, locals_81402)(void) {
	TNimObject result;
	nimfr("locals", "system.nim")
	memset((void*)&result, 0, sizeof(result));
	result.m_type = (&NTI2409);
	popFrame();
	return result;
}
N_NIMCALL(void, TMP283)(void* p, NI op) {
	einvalidkey2455* a;
	a = (einvalidkey2455*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}

N_NIMCALL(NI, clamp_124247)(NI x_124251, NI a_124253, NI b_124255) {
	NI result;
	nimfr("clamp", "system.nim")
	result = 0;
	nimln(1525, "system.nim");
	{
		nimln(1525, "system.nim");
		if (!(x_124251 < a_124253)) goto LA3;
		nimln(1525, "system.nim");
		nimln(1525, "system.nim");
		result = a_124253;
		goto BeforeRet;
	}
	LA3: ;
	nimln(1526, "system.nim");
	{
		nimln(1526, "system.nim");
		if (!(b_124255 < x_124251)) goto LA7;
		nimln(1526, "system.nim");
		nimln(1526, "system.nim");
		result = b_124255;
		goto BeforeRet;
	}
	LA7: ;
	nimln(1527, "system.nim");
	nimln(1527, "system.nim");
	result = x_124251;
	goto BeforeRet;
	BeforeRet: ;
	popFrame();
	return result;
}
N_NIMCALL(void, TMP372)(void* p, NI op) {
	eos2435* a;
	a = (eos2435*)p;
	nimGCvisit((void*)(*a).Sup.Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.trace, op);
}
N_NOINLINE(void, systemInit)(void) {
	strdesc_8005.size = 4;
	strdesc_8005.kind = ((NU8) 28);
	strdesc_8005.flags = 2;
	initallocator_7801();
	initStackBottom();
	initgc_7601();
	registersignalhandler_16602();
}

N_NOINLINE(void, systemDatInit)(void) {
static TNimNode* TMP8[4];
static TNimNode TMP0[28];
NTI2409.size = sizeof(TNimObject);
NTI2409.kind = 17;
NTI2409.base = 0;
NTI2409.flags = 1;
TMP0[0].len = 0; TMP0[0].kind = 2;
NTI2409.node = &TMP0[0];
NTI2425.size = sizeof(E_Base);
NTI2425.kind = 17;
NTI2425.base = (&NTI2409);
TMP8[0] = &TMP0[2];
NTI6816.size = sizeof(E_Base*);
NTI6816.kind = 22;
NTI6816.base = (&NTI2425);
NTI6816.marker = TMP9;
TMP0[2].kind = 1;
TMP0[2].offset = offsetof(E_Base, parent);
TMP0[2].typ = (&NTI6816);
TMP0[2].name = "parent";
TMP8[1] = &TMP0[3];
NTI145.size = sizeof(NCSTRING);
NTI145.kind = 29;
NTI145.base = 0;
NTI145.flags = 3;
TMP0[3].kind = 1;
TMP0[3].offset = offsetof(E_Base, name);
TMP0[3].typ = (&NTI145);
TMP0[3].name = "name";
TMP8[2] = &TMP0[4];
NTI143.size = sizeof(NimStringDesc*);
NTI143.kind = 28;
NTI143.base = 0;
NTI143.flags = 2;
TMP0[4].kind = 1;
TMP0[4].offset = offsetof(E_Base, message);
TMP0[4].typ = (&NTI143);
TMP0[4].name = "msg";
TMP8[3] = &TMP0[5];
TMP0[5].kind = 1;
TMP0[5].offset = offsetof(E_Base, trace);
TMP0[5].typ = (&NTI143);
TMP0[5].name = "trace";
TMP0[1].len = 4; TMP0[1].kind = 2; TMP0[1].sons = &TMP8[0];
NTI2425.node = &TMP0[1];
NTI2429.size = sizeof(esynch2429);
NTI2429.kind = 17;
NTI2429.base = (&NTI2425);
TMP0[6].len = 0; TMP0[6].kind = 2;
NTI2429.node = &TMP0[6];
NTI2431.size = sizeof(esystem2431);
NTI2431.kind = 17;
NTI2431.base = (&NTI2429);
TMP0[7].len = 0; TMP0[7].kind = 2;
NTI2431.node = &TMP0[7];
NTI2457.size = sizeof(eoutofmemory2457);
NTI2457.kind = 17;
NTI2457.base = (&NTI2431);
TMP0[8].len = 0; TMP0[8].kind = 2;
NTI2457.node = &TMP0[8];
NTI73401.size = sizeof(eoutofmemory2457*);
NTI73401.kind = 22;
NTI73401.base = (&NTI2457);
NTI73401.marker = TMP10;
NTI2433.size = sizeof(eio2433);
NTI2433.kind = 17;
NTI2433.base = (&NTI2431);
TMP0[9].len = 0; TMP0[9].kind = 2;
NTI2433.node = &TMP0[9];
NTI10401.size = sizeof(eio2433*);
NTI10401.kind = 22;
NTI10401.base = (&NTI2433);
NTI10401.marker = TMP21;
NTI2467.size = sizeof(enoexceptiontoreraise2467);
NTI2467.kind = 17;
NTI2467.base = (&NTI2429);
TMP0[10].len = 0; TMP0[10].kind = 2;
NTI2467.node = &TMP0[10];
NTI15201.size = sizeof(enoexceptiontoreraise2467*);
NTI15201.kind = 22;
NTI15201.base = (&NTI2467);
NTI15201.marker = TMP25;
NTI10665.size = sizeof(TY10665*);
NTI10665.kind = 24;
NTI10665.base = (&NTI143);
NTI10665.flags = 2;
NTI10665.marker = TMP34;
NTI2441.size = sizeof(earithmetic2441);
NTI2441.kind = 17;
NTI2441.base = (&NTI2429);
TMP0[11].len = 0; TMP0[11].kind = 2;
NTI2441.node = &TMP0[11];
NTI2445.size = sizeof(EOverflow);
NTI2445.kind = 17;
NTI2445.base = (&NTI2441);
TMP0[12].len = 0; TMP0[12].kind = 2;
NTI2445.node = &TMP0[12];
NTI18601.size = sizeof(EOverflow*);
NTI18601.kind = 22;
NTI18601.base = (&NTI2445);
NTI18601.marker = TMP35;
NTI2459.size = sizeof(einvalidindex2459);
NTI2459.kind = 17;
NTI2459.base = (&NTI2429);
TMP0[13].len = 0; TMP0[13].kind = 2;
NTI2459.node = &TMP0[13];
NTI17201.size = sizeof(einvalidindex2459*);
NTI17201.kind = 22;
NTI17201.base = (&NTI2459);
NTI17201.marker = TMP37;
NTI2463.size = sizeof(eoutofrange2463);
NTI2463.kind = 17;
NTI2463.base = (&NTI2429);
TMP0[14].len = 0; TMP0[14].kind = 2;
NTI2463.node = &TMP0[14];
NTI17001.size = sizeof(eoutofrange2463*);
NTI17001.kind = 22;
NTI17001.base = (&NTI2463);
NTI17001.marker = TMP39;
NTI2453.size = sizeof(einvalidvalue2453);
NTI2453.kind = 17;
NTI2453.base = (&NTI2429);
TMP0[15].len = 0; TMP0[15].kind = 2;
NTI2453.node = &TMP0[15];
NTI18001.size = sizeof(einvalidvalue2453*);
NTI18001.kind = 22;
NTI18001.base = (&NTI2453);
NTI18001.marker = TMP41;
NTI2461.size = sizeof(einvalidfield2461);
NTI2461.kind = 17;
NTI2461.base = (&NTI2429);
TMP0[16].len = 0; TMP0[16].kind = 2;
NTI2461.node = &TMP0[16];
NTI17401.size = sizeof(einvalidfield2461*);
NTI17401.kind = 22;
NTI17401.base = (&NTI2461);
NTI17401.marker = TMP50;
NTI2471.size = sizeof(einvalidobjectconversion2471);
NTI2471.kind = 17;
NTI2471.base = (&NTI2429);
TMP0[17].len = 0; TMP0[17].kind = 2;
NTI2471.node = &TMP0[17];
NTI18201.size = sizeof(einvalidobjectconversion2471*);
NTI18201.kind = 22;
NTI18201.base = (&NTI2471);
NTI18201.marker = TMP52;
NTI2469.size = sizeof(einvalidobjectassignment2469);
NTI2469.kind = 17;
NTI2469.base = (&NTI2429);
TMP0[18].len = 0; TMP0[18].kind = 2;
NTI2469.node = &TMP0[18];
NTI18401.size = sizeof(einvalidobjectassignment2469*);
NTI18401.kind = 22;
NTI18401.base = (&NTI2469);
NTI18401.marker = TMP54;
NTI2443.size = sizeof(EDivByZero);
NTI2443.kind = 17;
NTI2443.base = (&NTI2441);
TMP0[19].len = 0; TMP0[19].kind = 2;
NTI2443.node = &TMP0[19];
NTI18801.size = sizeof(EDivByZero*);
NTI18801.kind = 22;
NTI18801.base = (&NTI2443);
NTI18801.marker = TMP56;
NTI2473.size = sizeof(efloatingpoint2473);
NTI2473.kind = 17;
NTI2473.base = (&NTI2429);
TMP0[20].len = 0; TMP0[20].kind = 2;
NTI2473.node = &TMP0[20];
NTI2475.size = sizeof(EFloatInvalidOp);
NTI2475.kind = 17;
NTI2475.base = (&NTI2473);
TMP0[21].len = 0; TMP0[21].kind = 2;
NTI2475.node = &TMP0[21];
NTI20401.size = sizeof(EFloatInvalidOp*);
NTI20401.kind = 22;
NTI20401.base = (&NTI2475);
NTI20401.marker = TMP58;
NTI2479.size = sizeof(EFloatOverflow);
NTI2479.kind = 17;
NTI2479.base = (&NTI2473);
TMP0[22].len = 0; TMP0[22].kind = 2;
NTI2479.node = &TMP0[22];
NTI20601.size = sizeof(EFloatOverflow*);
NTI20601.kind = 22;
NTI20601.base = (&NTI2479);
NTI20601.marker = TMP60;
NTI2481.size = sizeof(EFloatUnderflow);
NTI2481.kind = 17;
NTI2481.base = (&NTI2473);
TMP0[23].len = 0; TMP0[23].kind = 2;
NTI2481.node = &TMP0[23];
NTI20801.size = sizeof(EFloatUnderflow*);
NTI20801.kind = 22;
NTI20801.base = (&NTI2481);
NTI20801.marker = TMP62;
NTI2449.size = sizeof(EAssertionFailed);
NTI2449.kind = 17;
NTI2449.base = (&NTI2429);
TMP0[24].len = 0; TMP0[24].kind = 2;
NTI2449.node = &TMP0[24];
NTI79801.size = sizeof(EAssertionFailed*);
NTI79801.kind = 22;
NTI79801.base = (&NTI2449);
NTI79801.marker = TMP117;
NTI106.size = sizeof(NI);
NTI106.kind = 31;
NTI106.base = 0;
NTI106.flags = 3;
NTI134.size = sizeof(NIM_BOOL);
NTI134.kind = 1;
NTI134.base = 0;
NTI134.flags = 3;
NTI2455.size = sizeof(einvalidkey2455);
NTI2455.kind = 17;
NTI2455.base = (&NTI2453);
TMP0[25].len = 0; TMP0[25].kind = 2;
NTI2455.node = &TMP0[25];
NTI122042.size = sizeof(einvalidkey2455*);
NTI122042.kind = 22;
NTI122042.base = (&NTI2455);
NTI122042.marker = TMP283;
NTI10002.size = sizeof(void*);
NTI10002.kind = 18;
NTI10002.base = 0;
NTI10002.flags = 3;
TMP0[26].len = 0; TMP0[26].kind = 2;
NTI10002.node = &TMP0[26];
NTI10004.size = sizeof(FILE*);
NTI10004.kind = 21;
NTI10004.base = (&NTI10002);
NTI10004.flags = 3;
NTI10008.size = sizeof(int);
NTI10008.kind = 34;
NTI10008.base = 0;
NTI10008.flags = 3;
NTI4409.size = sizeof(int);
NTI4409.kind = 34;
NTI4409.base = 0;
NTI4409.flags = 3;
NTI2435.size = sizeof(eos2435);
NTI2435.kind = 17;
NTI2435.base = (&NTI2431);
NTI112.size = sizeof(NI32);
NTI112.kind = 34;
NTI112.base = 0;
NTI112.flags = 3;
TMP0[27].kind = 1;
TMP0[27].offset = offsetof(eos2435, Errorcode);
TMP0[27].typ = (&NTI112);
TMP0[27].name = "errorCode";
NTI2435.node = &TMP0[27];
NTI105208.size = sizeof(eos2435*);
NTI105208.kind = 22;
NTI105208.base = (&NTI2435);
NTI105208.marker = TMP372;
}

