Problem:
Score : 100 points

Problem Statement

We have an N \times N square grid.

We will paint each square in the grid either black or white.

If we paint exactly A squares white, how many squares will be painted black?

Constraints

1 \leq N \leq 100

0 \leq A \leq N^2

Inputs

Input is given from Standard Input in the following format:

N
A

Outputs

Print the number of squares that will be painted black.

Sample Input 1

3
4

Sample Output 1

5

There are nine squares in a 3 \times 3 square grid.
Four of them will be painted white, so the remaining five squares will be painted black.

Sample Input 2

19
100

Sample Output 2

261

Sample Input 3

10
0

Sample Output 3

100

As zero squares will be painted white, all the squares will be painted black.

Solution in C (GCC 5.4.1) (judge verdict: Accepted)

#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64
/*

            Nim's Runtime Library
        (c) Copyright 2015 Andreas Rumpf

    See the file "copying.txt", included in this
    distribution, for details about the copyright.
*/

/* compiler symbols:
__BORLANDC__
_MSC_VER
__WATCOMC__
__LCC__
__GNUC__
__DMC__
__POCC__
__TINYC__
__clang__
*/


#ifndef NIMBASE_H
#define NIMBASE_H

/*------------ declaring a custom attribute to support using LLVM's Address Sanitizer ------------ */

/*
   This definition exists to provide support for using the LLVM ASAN (Address SANitizer) tooling with Nim. This
   should only be used to mark implementations of the GC system that raise false flags with the ASAN tooling, or
   for functions that are hot and need to be disabled for performance reasons. Based on the official ASAN
   documentation, both the clang and gcc compilers are supported. In addition to that, a check is performed to
   verify that the necessary attribute is supported by the compiler.

   To flag a proc as ignored, append the following code pragma to the proc declaration:
      {.codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".}

   For further information, please refer to the official documentation:
     https://github.com/google/sanitizers/wiki/AddressSanitizer
 */
#define CLANG_NO_SANITIZE_ADDRESS
#if defined(__clang__)
#  if __has_attribute(no_sanitize_address)
#    undef CLANG_NO_SANITIZE_ADDRESS
#    define CLANG_NO_SANITIZE_ADDRESS __attribute__((no_sanitize_address))
#  endif
#endif


/* ------------ ignore typical warnings in Nim-generated files ------------- */
#if defined(__GNUC__) || defined(__clang__)
#  pragma GCC diagnostic ignored "-Wpragmas"
#  pragma GCC diagnostic ignored "-Wwritable-strings"
#  pragma GCC diagnostic ignored "-Winvalid-noreturn"
#  pragma GCC diagnostic ignored "-Wformat"
#  pragma GCC diagnostic ignored "-Wlogical-not-parentheses"
#  pragma GCC diagnostic ignored "-Wlogical-op-parentheses"
#  pragma GCC diagnostic ignored "-Wshadow"
#  pragma GCC diagnostic ignored "-Wunused-function"
#  pragma GCC diagnostic ignored "-Wunused-variable"
#  pragma GCC diagnostic ignored "-Winvalid-offsetof"
#  pragma GCC diagnostic ignored "-Wtautological-compare"
#  pragma GCC diagnostic ignored "-Wswitch-bool"
#  pragma GCC diagnostic ignored "-Wmacro-redefined"
#  pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
#  pragma GCC diagnostic ignored "-Wpointer-bool-conversion"
#  pragma GCC diagnostic ignored "-Wconstant-conversion"
#endif

#if defined(_MSC_VER)
#  pragma warning(disable: 4005 4100 4101 4189 4191 4200 4244 4293 4296 4309)
#  pragma warning(disable: 4310 4365 4456 4477 4514 4574 4611 4668 4702 4706)
#  pragma warning(disable: 4710 4711 4774 4800 4820 4996 4090)
#endif
/* ------------------------------------------------------------------------- */

#if defined(__GNUC__)
#  define _GNU_SOURCE 1
#endif

#if defined(__TINYC__)
/*#  define __GNUC__ 3
#  define GCC_MAJOR 4
#  define __GNUC_MINOR__ 4
#  define __GNUC_PATCHLEVEL__ 5 */
#  define __DECLSPEC_SUPPORTED 1
#endif

/* calling convention mess ----------------------------------------------- */
#if defined(__GNUC__) || defined(__LCC__) || defined(__POCC__) \
                      || defined(__TINYC__)
  /* these should support C99's inline */
  /* the test for __POCC__ has to come before the test for _MSC_VER,
     because PellesC defines _MSC_VER too. This is brain-dead. */
#  define N_INLINE(rettype, name) inline rettype name
#elif defined(__BORLANDC__) || defined(_MSC_VER)
/* Borland's compiler is really STRANGE here; note that the __fastcall
   keyword cannot be before the return type, but __inline cannot be after
   the return type, so we do not handle this mess in the code generator
   but rather here. */
#  define N_INLINE(rettype, name) __inline rettype name
#elif defined(__DMC__)
#  define N_INLINE(rettype, name) inline rettype name
#elif defined(__WATCOMC__)
#  define N_INLINE(rettype, name) __inline rettype name
#else /* others are less picky: */
#  define N_INLINE(rettype, name) rettype __inline name
#endif

#if defined(__POCC__)
#  define NIM_CONST /* PCC is really picky with const modifiers */
#  undef _MSC_VER /* Yeah, right PCC defines _MSC_VER even if it is
                     not that compatible. Well done. */
#elif defined(__cplusplus)
#  define NIM_CONST /* C++ is picky with const modifiers */
#else
#  define NIM_CONST  const
#endif

/*
  NIM_THREADVAR declaration based on
  http://stackoverflow.com/questions/18298280/how-to-declare-a-variable-as-thread-local-portably
*/
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112 && !defined __STDC_NO_THREADS__
#  define NIM_THREADVAR _Thread_local
#elif defined _WIN32 && ( \
       defined _MSC_VER || \
       defined __ICL || \
       defined __DMC__ || \
       defined __BORLANDC__ )
#  define NIM_THREADVAR __declspec(thread)
/* note that ICC (linux) and Clang are covered by __GNUC__ */
#elif defined __GNUC__ || \
       defined __SUNPRO_C || \
       defined __xlC__
#  define NIM_THREADVAR __thread
#elif defined __TINYC__
#  define NIM_THREADVAR
#else
#  error "Cannot define NIM_THREADVAR"
#endif

/* --------------- how int64 constants should be declared: ----------- */
#if defined(__GNUC__) || defined(__LCC__) || \
    defined(__POCC__) || defined(__DMC__) || defined(_MSC_VER)
#  define IL64(x) x##LL
#else /* works only without LL */
#  define IL64(x) ((NI64)x)
#endif

/* ---------------- casting without correct aliasing rules ----------- */

#if defined(__GNUC__)
#  define NIM_CAST(type, ptr) (((union{type __x__;}*)(ptr))->__x__)
#else
#  define NIM_CAST(type, ptr) ((type)(ptr))
#endif

/* ------------------------------------------------------------------- */

#if defined(WIN32) || defined(_WIN32) /* only Windows has this mess... */
#  define N_CDECL(rettype, name) rettype __cdecl name
#  define N_STDCALL(rettype, name) rettype __stdcall name
#  define N_SYSCALL(rettype, name) rettype __syscall name
#  define N_FASTCALL(rettype, name) rettype __fastcall name
#  define N_SAFECALL(rettype, name) rettype __safecall name
/* function pointers with calling convention: */
#  define N_CDECL_PTR(rettype, name) rettype (__cdecl *name)
#  define N_STDCALL_PTR(rettype, name) rettype (__stdcall *name)
#  define N_SYSCALL_PTR(rettype, name) rettype (__syscall *name)
#  define N_FASTCALL_PTR(rettype, name) rettype (__fastcall *name)
#  define N_SAFECALL_PTR(rettype, name) rettype (__safecall *name)

#  ifdef __cplusplus
#    define N_LIB_EXPORT  extern "C" __declspec(dllexport)
#  else
#    define N_LIB_EXPORT  extern __declspec(dllexport)
#  endif
#  define N_LIB_IMPORT  extern __declspec(dllimport)
#else
#  if defined(__GNUC__)
#    define N_CDECL(rettype, name) rettype name
#    define N_STDCALL(rettype, name) rettype name
#    define N_SYSCALL(rettype, name) rettype name
#    define N_FASTCALL(rettype, name) __attribute__((fastcall)) rettype name
#    define N_SAFECALL(rettype, name) rettype name
/*   function pointers with calling convention: */
#    define N_CDECL_PTR(rettype, name) rettype (*name)
#    define N_STDCALL_PTR(rettype, name) rettype (*name)
#    define N_SYSCALL_PTR(rettype, name) rettype (*name)
#    define N_FASTCALL_PTR(rettype, name) __attribute__((fastcall)) rettype (*name)
#    define N_SAFECALL_PTR(rettype, name) rettype (*name)
#  else
#    define N_CDECL(rettype, name) rettype name
#    define N_STDCALL(rettype, name) rettype name
#    define N_SYSCALL(rettype, name) rettype name
#    define N_FASTCALL(rettype, name) rettype name
#    define N_SAFECALL(rettype, name) rettype name
/*   function pointers with calling convention: */
#    define N_CDECL_PTR(rettype, name) rettype (*name)
#    define N_STDCALL_PTR(rettype, name) rettype (*name)
#    define N_SYSCALL_PTR(rettype, name) rettype (*name)
#    define N_FASTCALL_PTR(rettype, name) rettype (*name)
#    define N_SAFECALL_PTR(rettype, name) rettype (*name)
#  endif
#  ifdef __cplusplus
#    define N_LIB_EXPORT  extern "C"
#  else
#    define N_LIB_EXPORT  extern
#  endif
#  define N_LIB_IMPORT  extern
#endif

#define N_NOCONV(rettype, name) rettype name
/* specify no calling convention */
#define N_NOCONV_PTR(rettype, name) rettype (*name)

#if defined(__GNUC__) || defined(__ICC__)
#  define N_NOINLINE(rettype, name) rettype __attribute__((noinline)) name
#elif defined(_MSC_VER)
#  define N_NOINLINE(rettype, name) __declspec(noinline) rettype name
#else
#  define N_NOINLINE(rettype, name) rettype name
#endif

#define N_NOINLINE_PTR(rettype, name) rettype (*name)

#if defined(__BORLANDC__) || defined(__WATCOMC__) || \
    defined(__POCC__) || defined(_MSC_VER) || defined(WIN32) || defined(_WIN32)
/* these compilers have a fastcall so use it: */
#  ifdef __TINYC__
#    define N_NIMCALL(rettype, name) rettype __attribute((__fastcall)) name
#    define N_NIMCALL_PTR(rettype, name) rettype (__attribute((__fastcall)) *name)
#    define N_RAW_NIMCALL __attribute((__fastcall))
#  else
#    define N_NIMCALL(rettype, name) rettype __fastcall name
#    define N_NIMCALL_PTR(rettype, name) rettype (__fastcall *name)
#    define N_RAW_NIMCALL __fastcall
#  endif
#else
#  define N_NIMCALL(rettype, name) rettype name /* no modifier */
#  define N_NIMCALL_PTR(rettype, name) rettype (*name)
#  define N_RAW_NIMCALL
#endif

#define N_CLOSURE(rettype, name) N_NIMCALL(rettype, name)
#define N_CLOSURE_PTR(rettype, name) N_NIMCALL_PTR(rettype, name)

/* ----------------------------------------------------------------------- */

#define COMMA ,

#include <limits.h>
#include <stddef.h>

/* C99 compiler? */
#if (defined(__STD_VERSION__) && (__STD_VERSION__ >= 199901))
#  define HAVE_STDINT_H
#endif

#if defined(__LCC__) || defined(__DMC__) || defined(__POCC__)
#  define HAVE_STDINT_H
#endif

/* bool types (C++ has it): */
#ifdef __cplusplus
#  ifndef NIM_TRUE
#    define NIM_TRUE true
#  endif
#  ifndef NIM_FALSE
#    define NIM_FALSE false
#  endif
#  define NIM_BOOL bool
#  define NIM_NIL 0
struct NimException
{
  NimException(struct Exception* exp, const char* msg): exp(exp), msg(msg) {}

  struct Exception* exp;
  const char* msg;
};
#else
#  ifdef bool
#    define NIM_BOOL bool
#  else
  typedef unsigned char NIM_BOOL;
#  endif
#  ifndef NIM_TRUE
#    define NIM_TRUE ((NIM_BOOL) 1)
#  endif
#  ifndef NIM_FALSE
#    define NIM_FALSE ((NIM_BOOL) 0)
#  endif
#  define NIM_NIL ((void*)0) /* C's NULL is fucked up in some C compilers, so
                              the generated code does not rely on it anymore */
#endif

#if defined(__BORLANDC__) || defined(__DMC__) \
   || defined(__WATCOMC__) || defined(_MSC_VER)
typedef signed char NI8;
typedef signed short int NI16;
typedef signed int NI32;
/* XXX: Float128? */
typedef unsigned char NU8;
typedef unsigned short int NU16;
typedef unsigned __int64 NU64;
typedef __int64 NI64;
typedef unsigned int NU32;
#elif defined(HAVE_STDINT_H)
#  include <stdint.h>
typedef int8_t NI8;
typedef int16_t NI16;
typedef int32_t NI32;
typedef int64_t NI64;
typedef uint64_t NU64;
typedef uint8_t NU8;
typedef uint16_t NU16;
typedef uint32_t NU32;
#else
typedef signed char NI8;
typedef signed short int NI16;
typedef signed int NI32;
/* XXX: Float128? */
typedef unsigned char NU8;
typedef unsigned short int NU16;
typedef unsigned long long int NU64;
typedef long long int NI64;
typedef unsigned int NU32;
#endif

#ifdef NIM_INTBITS
#  if NIM_INTBITS == 64
typedef NI64 NI;
typedef NU64 NU;
#  elif NIM_INTBITS == 32
typedef NI32 NI;
typedef NU32 NU;
#  elif NIM_INTBITS == 16
typedef NI16 NI;
typedef NU16 NU;
#  elif NIM_INTBITS == 8
typedef NI8 NI;
typedef NU8 NU;
#  else
#    error "invalid bit width for int"
#  endif
#endif

extern NI nim_program_result;

typedef float NF32;
typedef double NF64;
typedef double NF;

typedef char NIM_CHAR;
typedef char* NCSTRING;

#ifdef NIM_BIG_ENDIAN
#  define NIM_IMAN 1
#else
#  define NIM_IMAN 0
#endif

static N_INLINE(NI, float64ToInt32)(double x) {
  /* nowadays no hack necessary anymore */
  return x >= 0 ? (NI)(x+0.5) : (NI)(x-0.5);
}

static N_INLINE(NI32, float32ToInt32)(float x) {
  /* nowadays no hack necessary anymore */
  return x >= 0 ? (NI32)(x+0.5) : (NI32)(x-0.5);
}

#define float64ToInt64(x) ((NI64) (x))

#define STRING_LITERAL(name, str, length) \
  static const struct {                   \
    TGenericSeq Sup;                      \
    NIM_CHAR data[(length) + 1];          \
  } name = {{length, length}, str}

typedef struct TStringDesc* string;

/* declared size of a sequence/variable length array: */
#if defined(__GNUC__) || defined(__clang__) || defined(_MSC_VER)
#  define SEQ_DECL_SIZE /* empty is correct! */
#else
#  define SEQ_DECL_SIZE 1000000
#endif

#define ALLOC_0(size)  calloc(1, size)
#define DL_ALLOC_0(size) dlcalloc(1, size)

#define GenericSeqSize sizeof(TGenericSeq)
#define paramCount() cmdCount

#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__i386__)
#  ifndef NAN
static unsigned long nimNaN[2]={0xffffffff, 0x7fffffff};
#    define NAN (*(double*) nimNaN)
#  endif
#endif

#ifndef NAN
#  define NAN (0.0 / 0.0)
#endif

#ifndef INF
#  ifdef INFINITY
#    define INF INFINITY
#  elif defined(HUGE_VAL)
#    define INF  HUGE_VAL
#  elif defined(_MSC_VER)
#    include <float.h>
#    define INF (DBL_MAX+DBL_MAX)
#  else
#    define INF (1.0 / 0.0)
#  endif
#endif

typedef struct TFrame TFrame;
struct TFrame {
  TFrame* prev;
  NCSTRING procname;
  NI line;
  NCSTRING filename;
  NI16 len;
  NI16 calldepth;
};

#ifdef NIM_NEW_MANGLING_RULES
  #define nimfr_(proc, file) \
    TFrame FR_; \
    FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);

  #define nimfrs_(proc, file, slots, length) \
    struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
    FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);

  #define nimln_(n, file) \
    FR_.line = n; FR_.filename = file;
#else
  #define nimfr(proc, file) \
    TFrame FR; \
    FR.procname = proc; FR.filename = file; FR.line = 0; FR.len = 0; nimFrame(&FR);

  #define nimfrs(proc, file, slots, length) \
    struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR; \
    FR.procname = proc; FR.filename = file; FR.line = 0; FR.len = length; nimFrame((TFrame*)&FR);

  #define nimln(n, file) \
    FR.line = n; FR.filename = file;
#endif

#define NIM_POSIX_INIT  __attribute__((constructor))

#ifdef __GNUC__
#  define likely(x) __builtin_expect(x, 1)
#  define unlikely(x) __builtin_expect(x, 0)
/* We need the following for the posix wrapper. In particular it will give us
   POSIX_SPAWN_USEVFORK: */
#  ifndef _GNU_SOURCE
#    define _GNU_SOURCE
#  endif
#else
#  define likely(x) (x)
#  define unlikely(x) (x)
#endif

#if 0 // defined(__GNUC__) || defined(__clang__)
// not needed anymore because the stack marking cares about
// interior pointers now
static inline void GCGuard (void *ptr) { asm volatile ("" :: "X" (ptr)); }
#  define GC_GUARD __attribute__ ((cleanup(GCGuard)))
#else
#  define GC_GUARD
#endif

/* Test to see if Nim and the C compiler agree on the size of a pointer.
   On disagreement, your C compiler will say something like:
   "error: 'Nim_and_C_compiler_disagree_on_target_architecture' declared as an array with a negative size" */
typedef int Nim_and_C_compiler_disagree_on_target_architecture[sizeof(NI) == sizeof(void*) && NIM_INTBITS == sizeof(NI)*8 ? 1 : -1];
#endif

#ifdef  __cplusplus
#  define NIM_EXTERNC extern "C"
#else
#  define NIM_EXTERNC
#endif

/* ---------------- platform specific includes ----------------------- */

/* VxWorks related includes */
#if defined(__VXWORKS__)
#  include <sys/types.h>
#  include <types/vxWind.h>
#  include <tool/gnu/toolMacros.h>
#elif defined(__FreeBSD__)
#  include <sys/types.h>
#endif

#if defined(__GENODE__)
#include <libc/component.h>
extern Libc::Env *genodeEnv;
#endif

/* Compile with -d:checkAbi and a sufficiently C11:ish compiler to enable */
#define NIM_CHECK_SIZE(typ, sz) \
  _Static_assert(sizeof(typ) == sz, "Nim & C disagree on type size")

/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#include <stdio.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s);
N_NIMCALL(NimStringDesc*, readLine_fPRnXwDTqtynUYGl4OixAg)(FILE* f);
N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x);
static N_INLINE(void, initStackBottomWith)(void* locals);
N_NOINLINE(void, setStackBottom)(void* theStackBottom);
NIM_EXTERNC N_NOINLINE(void, systemInit000)(void);
NIM_EXTERNC N_NOINLINE(void, systemDatInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_parseutilsInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_parseutilsDatInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_mathInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_mathDatInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_algorithmInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_algorithmDatInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsInit000)(void);
NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsDatInit000)(void);
NIM_EXTERNC N_NOINLINE(void, NimMainModule)(void);
NIM_EXTERNC N_NOINLINE(void, abc074_ADatInit000)(void);
NI n_oD9cBSTPamJKQG0S9c04xqNA;
NI a_9ceSqQtzR7k4jK25vChJbAw;

static N_INLINE(void, initStackBottomWith)(void* locals) {
	setStackBottom(locals);
}
void PreMainInner(void) {
	systemInit000();
	stdlib_parseutilsDatInit000();
	stdlib_mathDatInit000();
	stdlib_algorithmDatInit000();
	stdlib_strutilsDatInit000();
	abc074_ADatInit000();
	stdlib_parseutilsInit000();
	stdlib_mathInit000();
	stdlib_algorithmInit000();
	stdlib_strutilsInit000();
}

void PreMain(void) {
	void (*volatile inner)(void);
	systemDatInit000();
	inner = PreMainInner;
	initStackBottomWith((void *)&inner);
	(*inner)();
}

int cmdCount;
char** cmdLine;
char** gEnv;
N_CDECL(void, NimMainInner)(void) {
	NimMainModule();
}

N_CDECL(void, NimMain)(void) {
	void (*volatile inner)(void);
	PreMain();
	inner = NimMainInner;
	initStackBottomWith((void *)&inner);
	(*inner)();
}

int main(int argc, char** args, char** env) {
	cmdLine = args;
	cmdCount = argc;
	gEnv = env;
	NimMain();
	return nim_program_result;
}

NIM_EXTERNC N_NOINLINE(void, NimMainModule)(void) {
	NimStringDesc* T1_;
	NimStringDesc* T2_;
	NimStringDesc* T3_;
	T1_ = (NimStringDesc*)0;
	T1_ = readLine_fPRnXwDTqtynUYGl4OixAg(stdin);
	n_oD9cBSTPamJKQG0S9c04xqNA = nsuParseInt(T1_);
	T2_ = (NimStringDesc*)0;
	T2_ = readLine_fPRnXwDTqtynUYGl4OixAg(stdin);
	a_9ceSqQtzR7k4jK25vChJbAw = nsuParseInt(T2_);
	T3_ = (NimStringDesc*)0;
	T3_ = nimIntToStr((NI)((NI)(n_oD9cBSTPamJKQG0S9c04xqNA * n_oD9cBSTPamJKQG0S9c04xqNA) - a_9ceSqQtzR7k4jK25vChJbAw));
	printf("%s\012", T3_? (T3_)->data:"nil");
	fflush(stdout);
}

NIM_EXTERNC N_NOINLINE(void, abc074_ADatInit000)(void) {
}


/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#include <string.h>
#include <sys/mman.h>
#include <stdio.h>
#include <stdlib.h>
#include <setjmp.h>
#include <signal.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix
typedef struct Exception Exception;
typedef struct TNimType TNimType;
typedef struct TNimNode TNimNode;
typedef struct tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ;
typedef struct tyObject_GcStack_7fytPA5bBsob6See21YMRA tyObject_GcStack_7fytPA5bBsob6See21YMRA;
typedef struct tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w;
typedef struct tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g;
typedef struct tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg;
typedef struct tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ;
typedef struct tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw;
typedef struct tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg;
typedef struct tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA;
typedef struct tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw;
typedef struct tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw;
typedef struct tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg;
typedef struct tyTuple_ujsjpB2O9cjj3uDHsXbnSzg tyTuple_ujsjpB2O9cjj3uDHsXbnSzg;
typedef struct tyObject_GcStat_0RwLoVBHZPfUAcLczmfQAg tyObject_GcStat_0RwLoVBHZPfUAcLczmfQAg;
typedef struct tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ;
typedef struct tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg;
typedef struct tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w;
typedef struct tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ;


typedef struct TSafePoint TSafePoint;
typedef struct RootObj RootObj;
typedef struct tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ;
typedef struct tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg;
typedef struct tyObject_OutOfMemError_NrupLB36t9bV7iFDHtrF69aw tyObject_OutOfMemError_NrupLB36t9bV7iFDHtrF69aw;
typedef struct tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q;
typedef struct tyObject_ArithmeticError_QcJsjWXxMFpjHfkCIK5ExA tyObject_ArithmeticError_QcJsjWXxMFpjHfkCIK5ExA;
typedef struct tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA;
typedef struct tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q;
typedef N_NIMCALL_PTR(NIM_BOOL, tyProc_hgOQFBQi19biNdOUUkFOOxA) (Exception* e);
typedef N_NIMCALL_PTR(void, tyProc_T4eqaYlFJYZUv9aG9b1TV0bQ) (void);
typedef NU8 tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc_ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc_WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
struct TNimType {
NI size;
tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A kind;
tySet_tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ flags;
TNimType* base;
TNimNode* node;
void* finalizer;
tyProc_ojoeKfW4VYIm36I9cpDTQIg marker;
tyProc_WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
};
struct tyObject_GcStack_7fytPA5bBsob6See21YMRA {
void* bottom;
};
struct tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w {
NI len;
NI cap;
tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
};
typedef tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* tyArray_SiRwrEKZdLgxqz9a9aoVBglg[512];
typedef tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* tyArray_lh2A89ahMmYg9bCmpVaplLbA[256];
struct tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA {
tyArray_lh2A89ahMmYg9bCmpVaplLbA data;
};
typedef tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* tyArray_0aOLqZchNi8nWtMTi8ND8w[2];
struct tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw {
tyArray_0aOLqZchNi8nWtMTi8ND8w link;
NI key;
NI upperBound;
NI level;
};
struct tyTuple_ujsjpB2O9cjj3uDHsXbnSzg {
tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* Field0;
NI Field1;
};
typedef tyTuple_ujsjpB2O9cjj3uDHsXbnSzg tyArray_LzOv2eCDGiceMKQstCLmhw[30];
struct tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg {
NI len;
tyArray_LzOv2eCDGiceMKQstCLmhw chunks;
tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg* next;
};
struct tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg {
NI minLargeObj;
NI maxLargeObj;
tyArray_SiRwrEKZdLgxqz9a9aoVBglg freeSmallChunks;
tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw* llmem;
NI currMem;
NI maxMem;
NI freeMem;
NI lastSize;
tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* freeChunksList;
tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* root;
tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* deleted;
tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* last;
tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
NIM_BOOL locked;
NIM_BOOL blockChunkSizeIncrease;
NI nextChunkSize;
tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw bottomData;
tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
};
struct tyObject_GcStat_0RwLoVBHZPfUAcLczmfQAg {
NI stackScans;
NI cycleCollections;
NI maxThreshold;
NI maxStackSize;
NI maxStackCells;
NI cycleTableSize;
NI64 maxPause;
};
struct tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ {
NI counter;
NI max;
tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* head;
tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg** data;
};
struct tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ {
tyObject_GcStack_7fytPA5bBsob6See21YMRA stack;
NI cycleThreshold;
tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w zct;
tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w decStack;
tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w tempStack;
NI recGcLock;
tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg region;
tyObject_GcStat_0RwLoVBHZPfUAcLczmfQAg stat;
tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ marked;
tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w additionalRoots;
};
struct tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w {
NI prevSize;
NI size;
};
struct tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ {
  tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w Sup;
tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* next;
tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* prev;
tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ* freeList;
NI free;
NI acc;
NF data;
};
struct tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg {
  tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w Sup;
tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* next;
tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* prev;
NF data;
};
typedef NI tyArray_9a8QARi5WsUggNU9bom7kzTQ[8];
struct tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw {
tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* next;
NI key;
tyArray_9a8QARi5WsUggNU9bom7kzTQ bits;
};
struct tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw {
NI size;
NI acc;
tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw* next;
};


struct tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ {
tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ* next;
NI zeroField;
};
typedef N_NIMCALL_PTR(void, tyProc_W6IXMh2CA4X1rFYGjUb4yg) (NimStringDesc* msg);
struct RootObj {
TNimType* m_type;
};
struct Exception {
  RootObj Sup;
Exception* parent;
NCSTRING name;
NimStringDesc* message;
NimStringDesc* trace;
Exception* up;
};
typedef NU8 tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ;
struct tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g {
NI refcount;
TNimType* typ;
};
struct tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg {
tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* next;
NI key;
tyArray_9a8QARi5WsUggNU9bom7kzTQ bits;
};
typedef NU8 tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ;
typedef NU8 tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ;
struct TNimNode {
tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ kind;
NI offset;
TNimType* typ;
NCSTRING name;
NI len;
TNimNode** sons;
};
typedef TFrame* tyArray_pFdcUVk36Xt0LD9bLg3YaIQ[128];
typedef long tyArray_TcvIiMAJvcwzNLsZkfnFnQ[25];
typedef N_NIMCALL_PTR(void, Finalizer) (void* self);
struct tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg {
  Exception Sup;
};
struct tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ {
  tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg Sup;
};
typedef struct {
N_NIMCALL_PTR(NIM_BOOL, ClP_0) (Exception* e, void* ClE_0);
void* ClE_0;
} tyProc_KeeAOYBd84Ofsw6Y7LizaQ;
struct TSafePoint {
TSafePoint* prev;
NI status;
jmp_buf context;
NIM_BOOL hasRaiseAction;
tyProc_KeeAOYBd84Ofsw6Y7LizaQ raiseAction;
};
typedef N_CLOSURE_PTR(NIM_BOOL, TM_Q5wkpxktOdTGvlSRo9bzt9aw_6) (Exception* e);
struct tyObject_OutOfMemError_NrupLB36t9bV7iFDHtrF69aw {
  tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg Sup;
};
typedef NIM_CHAR tyArray_gpc2RrLEcWgv7ONpLYNHOw[2001];
typedef N_NOCONV_PTR(void, tyProc_lfH2drpqP9aSEAAjWgrYv8Q) (int a);
typedef tyProc_T4eqaYlFJYZUv9aG9b1TV0bQ tyArray_r9aAb9cuhoh9cb9a123KVuMchQ[7001];
struct tyObject_ArithmeticError_QcJsjWXxMFpjHfkCIK5ExA {
  Exception Sup;
};
struct tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q {
  tyObject_ArithmeticError_QcJsjWXxMFpjHfkCIK5ExA Sup;
};
struct tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA {
  Exception Sup;
};
struct tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q {
  tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ Sup;
};
static N_INLINE(void, initAllocator_IZ2oOmqdsYQ7vixQGKSDcAsystem)(void);
static N_INLINE(void, initStackBottom)(void);
N_NOINLINE(void, setStackBottom)(void* theStackBottom);
N_NIMCALL(void, setPosition_plJQLEbXvFqZv6Phpo1t1w)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack, void* position);
N_NIMCALL(void, initGC_njssp69aa7hvxte9bJ8uuDcg)(void);
N_NIMCALL(void, init_E1QNZGuo0DGFXyt4Y3MfqA)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, NI cap);
N_NOCONV(void*, alloc0_sVm4rDImKK2ZDdylByayiA)(NI size);
N_NIMCALL(void*, alloc0_1iQ1Xo9cXsxq509b5gmDHLoQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, NI size);
N_NIMCALL(void*, alloc_1iQ1Xo9cXsxq509b5gmDHLoQ_2)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, NI size);
N_NIMCALL(void*, rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI requestedSize);
static N_INLINE(NI, roundup_HS4HdHHFZPftyB49cpIyo7Asystem)(NI x, NI v);
N_NIMCALL(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*, getSmallChunk_h6cvXbfQjxIdThM5GthosA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a);
N_NIMCALL(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*, getBigChunk_z9bCNjXTYllZ3pI24nEsw2g)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size);
static N_INLINE(void, listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem)(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg** head, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c);
N_NIMCALL(void, splitChunk_8QXhiy717OAl8WNA2X27EA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c, NI size);
static N_INLINE(void, updatePrevSize_3G5wKZdFZhblebPYdFnpxQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c, NI prevSize);
static N_INLINE(NIM_BOOL, isAccessible_5nqar3kL9acJcissrFLDdkwsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p);
N_NIMCALL(NIM_BOOL, contains_tGsWrN4DY41H9btt3FhjrNA)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key);
N_NIMCALL(tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*, intSetGet_FhOZKj4Gih3qQ5OimZYOrg)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* t, NI key);
static N_INLINE(NI, pageIndex_bDTXHqSShXKux9bZH4tvkVgsystem)(void* p);
N_NIMCALL(void, incl_Iz1GYiOVKwItgr5CdCm0dQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key);
N_NIMCALL(tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*, intSetPut_KWgRM9bUk6rwhAaHSiuK9aYA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* t, NI key);
N_NIMCALL(void*, llAlloc_fTkVQ4Gj2glm9btLqR9bdQDQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size);
static N_INLINE(void*, osAllocPages_fxkHg9ajpjxOfBTuIyrgEfwsystem)(NI size);
N_NOINLINE(void, raiseOutOfMem_II46IjNZztN9bmbxUD8dt8g)(void);
static N_INLINE(void, incCurrMem_rxjvSU4wRoPOjezLtDzm3Qsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI bytes);
static N_INLINE(void, zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem)(void* p, NI size);
static N_INLINE(NI, pageIndex_vFgXFo13iF61HsEG6epuwgsystem)(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c);
static N_INLINE(void, listAdd_ZRIe9cFnHOrfvS8VmLduoXQ_2system)(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg** head, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c);
N_NIMCALL(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*, requestOsChunks_z9bCNjXTYllZ3pI24nEsw2g_2)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size);
static N_INLINE(void*, osTryAllocPages_ID9csc9aYiEnjrqnnJOXH2OQsystem)(NI size);
N_NIMCALL(void, addHeapLink_fJbggoVEhxEYh2HdNULF3Q)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* p, NI size);
static N_INLINE(void, listAdd_DqXPtLsRUwQp3iwLtHEdIgsystem)(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ** head, tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c);
static N_INLINE(void, listRemove_DqXPtLsRUwQp3iwLtHEdIg_2system)(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ** head, tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c);
N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, getBottom_QXg9anCfFuhk3avAkOOKNhQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a);
N_NIMCALL(void, add_Xuf47u3imOz8BOk5HURLWQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t, NI key, NI upperBound);
N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, allocAvlNode_neSuioWH6NDTp8E9cNgBmjg)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI key, NI upperBound);
N_NIMCALL(void, skew_Cfx7NvEVZIhBjBm7i89boSg)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t);
N_NIMCALL(void, split_Cfx7NvEVZIhBjBm7i89boSg_2)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t);
N_NIMCALL(void, init_WHgd5C59bkXWDz3vnAxfzXQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s);
N_NIMCALL(void, nimGCvisit)(void* d, NI op);
N_NIMCALL(void, doOperation_3F8QeaTyYrJJF2gjBr6b8A)(void* p, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op);
static N_INLINE(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem)(void* usr);
static N_INLINE(void, decRef_MV4BBk6J1qu70IbBxwEn4wsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NOINLINE(void, addZCT_fCDI7oO1NNVXXURtxSzsRw)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NOCONV(void*, alloc_sVm4rDImKK2ZDdylByayiA_2)(NI size);
static N_INLINE(void, copyMem_E1xtACub5WcDa3vbrIXbwgsystem)(void* dest, void* source, NI size);
N_NOCONV(void, dealloc_RCjNtRnHdRYntrcE7YtwWw)(void* p);
N_NIMCALL(void, dealloc_jqYVOi4APb9cRx3G9a57AkRw)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, void* p);
N_NIMCALL(void, rawDealloc_DA62HrGC5sdfCED505KyyQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p);
static N_INLINE(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*, pageAddr_4uti7hTxTUDxUPqFMgMvHAsystem)(void* p);
static N_INLINE(NIM_BOOL, isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem)(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c);
N_NIMCALL(void, freeBigChunk_CAqFS1jFL1RxG80t9bOGmAA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c);
static N_INLINE(NIM_BOOL, chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system)(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c);
N_NIMCALL(void, excl_Z9cZKmN1jjRFCzU0lgW9a1XA)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key);
N_NIMCALL(void, del_C66us4UEWCXp84lHW4tDLA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t, NI x);
static N_INLINE(void, deallocAvlNode_E5Kui5a9artJoR6jEn007Vgsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* n);
N_NIMCALL(void, markS_NZr5o3Ubzrci4OmK29cHBJA)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NOINLINE(void, incl_m4q9b16kJJcoKe9c4ERtlpCg)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell);
N_NIMCALL(tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*, cellSetPut_mFUFZ7eVLRT9bMaHzrsxFrQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, NI key);
static N_INLINE(NI, nextTry_GRX2KbRyW3mlDDFEU50uhwsystem)(NI h, NI maxHash);
N_NIMCALL(void, cellSetEnlarge_ZCqaZEiX9aUtDCRoknrJ9bpQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t);
N_NIMCALL(void, cellSetRawInsert_wqizyapnzNjHA3SIFqE8ow)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg** data, tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* desc);
N_NIMCALL(void, forAllChildren_yHFnLgI7q81iFxRlb3Iqlw)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op);
static N_INLINE(void*, cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell);
N_NIMCALL(void, forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA)(void* dest, TNimType* mt, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op);
N_NIMCALL(void, forAllSlotsAux_g4QpsZWzXQMKa0ugIze5Kw)(void* dest, TNimNode* n, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op);
N_NIMCALL(TNimNode*, selectBranch_MvIsyjoRI1g7VY9cXrLB1dQ)(void* aa, TNimNode* n);
N_NIMCALL(NI, getDiscriminant_wq1GP7ZPZ7P1uZUypfc9ciA)(void* aa, TNimNode* n);
N_NIMCALL(NIM_BOOL, containsOrIncl_CbGEjIBKJIi7knlaDzUluA)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell);
N_NIMCALL(tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*, cellSetGet_X4WTfs0wkld8wp8XcE9b8BA)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, NI key);
static N_NIMCALL(void, Marker_tyRef_oUKtBcKRdK6usj8RWrlp6A)(void* p, NI op);
static N_NIMCALL(void, TM_Q5wkpxktOdTGvlSRo9bzt9aw_4)(void);
N_NIMCALL(void, nimRegisterGlobalMarker)(tyProc_T4eqaYlFJYZUv9aG9b1TV0bQ markerProc);
N_NOCONV(void, signalHandler)(int sign);
N_NIMCALL(void, showErrorMessage_rsUJ87b89bH0GlWKYL9c8wUQ)(NCSTRING data);
N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str);
N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len);
N_NIMCALL(NimStringDesc*, rawNewStringNoInit)(NI space);
N_NIMCALL(void*, newObjNoInit)(TNimType* typ, NI size);
N_NIMCALL(void*, rawNewObj_QBPo5VW2O56Eeh8hPbQ7Pg)(TNimType* typ, NI size, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, collectCT_zoTIuavlrCHyw3B8MBaLJA)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NOINLINE(NI, stackSize_IV9bgfYkinlae0WZ2NZi5JA)(void);
N_NOINLINE(NI, stackSize_61foY5fGmU9c2fC9c6wRIsrA)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack);
static N_INLINE(NI, getOccupiedMem_61WxanWSOmDDV2uI7O10dQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a);
N_NIMCALL(void, collectCTBody_zoTIuavlrCHyw3B8MBaLJA_2)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
static N_INLINE(void, prepareForInteriorPointerChecking_Zqr3EQAAcehIfp3uSECEuQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a);
N_NIMCALL(NI, lowGauge_3mwQtFaBTgevFrybZdgUNw)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* n);
N_NIMCALL(NI, highGauge_3mwQtFaBTgevFrybZdgUNw_2)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* n);
CLANG_NO_SANITIZE_ADDRESS void markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, setPosition_kuKlONPws1O0vpPB9adzcQw)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack, void* position);
N_NIMCALL(tyObject_GcStack_7fytPA5bBsob6See21YMRA*, getActiveStack_2XtoPjgvlHPkHLitAW2flw)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(NIM_BOOL, isActiveStack_deIRQymTVHcVwfHBKDbqEA)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack);
static N_INLINE(void, gcMark_JLiT51Zk6OLnaexGSTHHEQsystem)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, void* p);
N_NIMCALL(void*, interiorAllocatedPtr_N7XNyRgfMLnCjS9bVeVc3bA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p);
N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, inRange_Bc4Ua6HOMCIDGx9b15HSY4g)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* root, NI key);
N_NIMCALL(NIM_BOOL, collectZCT_evVbQ9bNF7LYMhoG9aWXu9bKw)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, prepareDealloc_0Ao1u9cpV0dTuUB5G9cEQ8eQ)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell);
N_NIMCALL(void, collectCycles_zoTIuavlrCHyw3B8MBaLJA_3)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, cellsetReset_WHgd5C59bkXWDz3vnAxfzXQ_2)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s);
N_NIMCALL(void, deinit_WHgd5C59bkXWDz3vnAxfzXQ_3)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s);
N_NIMCALL(void, markGlobals_zoTIuavlrCHyw3B8MBaLJA_4)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, sweep_zoTIuavlrCHyw3B8MBaLJA_5)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
static N_INLINE(NIM_BOOL, isCell_CkuKXXC4hAqaVj8vwjANDAsystem)(void* p);
N_NIMCALL(NIM_BOOL, contains_9c4TZ2Zl3sU4TUeK9bR8E9ciw)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell);
N_NIMCALL(void, freeCyclicCell_NZr5o3Ubzrci4OmK29cHBJA_2)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NIMCALL(NI, getOccupiedMem_9bFvoxSITMVCg7RY8KIar1Q)(void);
N_NIMCALL(NI, getTotalMem_9bFvoxSITMVCg7RY8KIar1Q_2)(void);
N_NIMCALL(NI, getFreeMem_9bFvoxSITMVCg7RY8KIar1Q_3)(void);
N_NIMCALL(void, unmarkStackAndRegisters_zoTIuavlrCHyw3B8MBaLJA_6)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
static N_INLINE(void, addNewObjToZCT_Ga5iPZj9bPFJIiW7GQdxs7gsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* res, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NIMCALL(void, writeToStdErr_7HRVfGfZT2rSmBdcLxl8TA)(NCSTRING msg);
N_NIMCALL(void, write_ADGLlEJAOtGNWWur8rrJfg)(FILE* f, NCSTRING c);
N_NIMCALL(void, checkErr_BWnr8V7RERYno9bIdPmw8Hw)(FILE* f);
N_NOINLINE(void, raiseEIO_PpfSiTIeNpMAb9a5o6SglJw)(NimStringDesc* msg) __attribute__((noreturn));
static N_INLINE(void, sysFatal_orK8PicRB9bj8BG69bF8HQbwsystem)(NimStringDesc* message) __attribute__((noreturn));
static N_NIMCALL(void, Marker_tyRef_HX2M9cQhE3jaovp9aYJDdslA)(void* p, NI op);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
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)(Exception* e, NCSTRING ename);
N_NIMCALL(void, raiseExceptionAux_L880PIUOf9bVlJWqarG4H9cw)(Exception* e);
static N_INLINE(void, pushCurrentException)(Exception* e);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef_9cAA5YuQAAC3MVbnGeV86swsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache);
N_NOINLINE(NIM_BOOL, isObjSlowPath_k9bdq9bQE075AR7scLFt5wIg)(TNimType* obj, TNimType* subclass, TNimType** cache);
static N_INLINE(void, quitOrDebug_IZ2oOmqdsYQ7vixQGKSDcA_2system)(void);
N_NIMCALL(void, registerSignalHandler_njssp69aa7hvxte9bJ8uuDcg_2)(void);
N_NIMCALL(NI, getRefcount)(void* p);
static N_INLINE(void, sysFatal_cjY6dGD4PiJNY9cmtw6Ay8Qsystem)(NimStringDesc* message) __attribute__((noreturn));
static N_NIMCALL(void, Marker_tyRef_6woiEp3hwhYMr1p5tjkZvA)(void* p, NI op);
N_NOINLINE(void, raiseOverflow)(void);
static N_NIMCALL(void, Marker_tyRef_yCEN9anxCD6mzBxGjuaRBdg)(void* p, NI op);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
N_NIMCALL(NimStringDesc*, rawNewString)(NI cap);
N_NIMCALL(NIM_BOOL, readLine_sO1bQXVRA6RP9cdYJXNKeSw)(FILE* f, NimStringDesc** line);
N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_NOINLINE(NIM_BOOL, isOnStack_dJJW59cIgsBmT59aZrOM71Mg)(void* p);
N_NIMCALL(NimStringDesc*, setLengthStr)(NimStringDesc* s, NI newLen);
N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
static N_INLINE(NI, resize_bzF9a0JivP3Z4njqaxuLc5wsystem)(NI old);
N_NIMCALL(void*, growObj_AVYny8c0GTk28gxjmat1MA)(void* old, NI newsize);
N_NIMCALL(void*, growObj_FZeyQYjWPcE9c06y1gNqZxw)(void* old, NI newsize, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch);
N_NOINLINE(void, raiseEOF_9b10LwJKWsyrZIEKTB9b6PGQ)(void) __attribute__((noreturn));
static N_INLINE(void, sysFatal_3HvfrCYXZqO25G8oEg4MjQsystem)(NimStringDesc* message) __attribute__((noreturn));
static N_NIMCALL(void, Marker_tyRef_e7vzYS7Z29amCrBOEA9aYFbQ)(void* p, NI op);
N_NIMCALL(void, add_IbYQ9cTcoQ89aIwM2IEYGMng)(NimStringDesc** result, NI64 x);
NIM_BOOL nimvm_IAxmsqnME4Jmed24hOgrFQ;
NI nim_program_result;
tyProc_hgOQFBQi19biNdOUUkFOOxA globalRaiseHook_JbO1ti4ULxrw54m4zNPbpA;
tyProc_hgOQFBQi19biNdOUUkFOOxA localRaiseHook_EIvMhANBvB9cp2Ezvt29cADg;
tyProc_T4eqaYlFJYZUv9aG9b1TV0bQ outOfMemHook_kZNaA7u1MfSW5ZeoGvw8xg;
TNimType strDesc_D0UzA4zsDu5tgpJQ9a9clXPg;
tyProc_W6IXMh2CA4X1rFYGjUb4yg errorMessageWriter_ZXnv0JyrWe3HTd07wpSr7A;
TFrame* framePtr_HRfVMH3jYeBJz6Q6X9b6Ptw;
TSafePoint* excHandler_rqLlY5bs9atDw2OXYqJEn5g;
Exception* currException_9bVPeDJlYTi9bQApZpfH8wjg;
TNimType NTI_13RNkKqUOX1TtorOUlKtqA_;
TNimType NTI_bAvOj2UcojKN87yAQLs0aw_;
TNimType NTI_S9agCYBinaYZnGWcjTdxclg_;
TNimType NTI_77mFvmsOLKik79ci2hXkHEg_;
TNimType NTI_oUKtBcKRdK6usj8RWrlp6A_;
tyArray_pFdcUVk36Xt0LD9bLg3YaIQ tempFrames_7nBYIr2UsDREpYylZK4fug;
tyProc_W6IXMh2CA4X1rFYGjUb4yg onUnhandledException_bFrawQlTKZhLweDD36j9b8g;
TNimType NTI_Fjf9b9b2IlzRO2tspHxG3tgg_;
TNimType NTI_9czoZw3pzPyrBmb5zTHY1OQ_;
TNimType NTI_HX2M9cQhE3jaovp9aYJDdslA_;
TNimType NTI_NrupLB36t9bV7iFDHtrF69aw_;
static TNimType* Nim_OfCheck_CACHE8[2];
tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
NI globalMarkersLen_hgEFy3UCOBoalBh29asu5MA;
tyArray_r9aAb9cuhoh9cb9a123KVuMchQ globalMarkers_5ghwSgpo9cT9bT7YStQDJHVQ;
TNimType NTI_QcJsjWXxMFpjHfkCIK5ExA_;
TNimType NTI_I3Jtn27626sFBOls6BBQ2Q_;
TNimType NTI_6woiEp3hwhYMr1p5tjkZvA_;
TNimType NTI_Gi06FkNeykJn7mrqRZYrkA_;
TNimType NTI_yCEN9anxCD6mzBxGjuaRBdg_;
TNimType NTI_yzVtHjbKd39bygEUDLqI18Q_;
TNimType NTI_e7vzYS7Z29amCrBOEA9aYFbQ_;
STRING_LITERAL(TM_Q5wkpxktOdTGvlSRo9bzt9aw_2, "out of memory", 13);
STRING_LITERAL(TM_Q5wkpxktOdTGvlSRo9bzt9aw_5, "[GC] cannot register global variable; too many global variables", 63);
STRING_LITERAL(TM_Q5wkpxktOdTGvlSRo9bzt9aw_8, "Unknown IO Error", 16);
STRING_LITERAL(TM_Q5wkpxktOdTGvlSRo9bzt9aw_9, "over- or underflow", 18);
STRING_LITERAL(TM_Q5wkpxktOdTGvlSRo9bzt9aw_10, "EOF reached", 11);

static N_INLINE(void, initAllocator_IZ2oOmqdsYQ7vixQGKSDcAsystem)(void) {
}

N_NIMCALL(void, setPosition_plJQLEbXvFqZv6Phpo1t1w)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack, void* position) {
}

N_NOINLINE(void, setStackBottom)(void* theStackBottom) {
	{
		if (!(gch_IcYaEuuWivYAS86vFMTS3Q.stack.bottom == NIM_NIL)) goto LA3_;
		gch_IcYaEuuWivYAS86vFMTS3Q.stack.bottom = theStackBottom;
	}
	goto LA1_;
	LA3_: ;
	{
		NI a;
		NI b;
		if (!!((theStackBottom == gch_IcYaEuuWivYAS86vFMTS3Q.stack.bottom))) goto LA6_;
		a = ((NI) (theStackBottom));
		b = ((NI) (gch_IcYaEuuWivYAS86vFMTS3Q.stack.bottom));
		gch_IcYaEuuWivYAS86vFMTS3Q.stack.bottom = ((void*) (((a >= b) ? a : b)));
	}
	goto LA1_;
	LA6_: ;
	LA1_: ;
	setPosition_plJQLEbXvFqZv6Phpo1t1w((&gch_IcYaEuuWivYAS86vFMTS3Q.stack), theStackBottom);
}

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

static N_INLINE(NI, roundup_HS4HdHHFZPftyB49cpIyo7Asystem)(NI x, NI v) {
	NI result;
	result = (NI)0;
	result = (NI)((NI)(x + (NI)(v - ((NI) 1))) & (NI)((NU64) ~((NI)(v - ((NI) 1)))));
	return result;
}

static N_INLINE(void, listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem)(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg** head, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c) {
	{
		if (!(c == (*head))) goto LA3_;
		(*head) = (*c).next;
		{
			if (!!(((*head) == NIM_NIL))) goto LA7_;
			(*(*head)).prev = NIM_NIL;
		}
		LA7_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		(*(*c).prev).next = (*c).next;
		{
			if (!!(((*c).next == NIM_NIL))) goto LA12_;
			(*(*c).next).prev = (*c).prev;
		}
		LA12_: ;
	}
	LA1_: ;
	(*c).next = NIM_NIL;
	(*c).prev = NIM_NIL;
}

N_NIMCALL(tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*, intSetGet_FhOZKj4Gih3qQ5OimZYOrg)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* t, NI key) {
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* result;
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* it;
{	result = (tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*)0;
	it = (*t).data[((NI)(key & ((NI) 255)))- 0];
	{
		while (1) {
			if (!!((it == NIM_NIL))) goto LA2;
			{
				if (!((*it).key == key)) goto LA5_;
				result = it;
				goto BeforeRet_;
			}
			LA5_: ;
			it = (*it).next;
		} LA2: ;
	}
	result = NIM_NIL;
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(NIM_BOOL, contains_tGsWrN4DY41H9btt3FhjrNA)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key) {
	NIM_BOOL result;
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* t;
	result = (NIM_BOOL)0;
	t = intSetGet_FhOZKj4Gih3qQ5OimZYOrg(s, (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3_;
		u = (NI)(key & ((NI) 511));
		result = !(((NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63))))))) == ((NI) 0)));
	}
	goto LA1_;
	LA3_: ;
	{
		result = NIM_FALSE;
	}
	LA1_: ;
	return result;
}

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

static N_INLINE(NIM_BOOL, isAccessible_5nqar3kL9acJcissrFLDdkwsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p) {
	NIM_BOOL result;
	NI T1_;
	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = pageIndex_bDTXHqSShXKux9bZH4tvkVgsystem(p);
	result = contains_tGsWrN4DY41H9btt3FhjrNA((&(*a).chunkStarts), T1_);
	return result;
}

static N_INLINE(void, updatePrevSize_3G5wKZdFZhblebPYdFnpxQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c, NI prevSize) {
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* ri;
	ri = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) ((NI)((NU64)(((NI) (c))) + (NU64)((*c).Sup.size))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = isAccessible_5nqar3kL9acJcissrFLDdkwsystem((&(*a)), ((void*) (ri)));
		if (!T3_) goto LA4_;
		(*ri).prevSize = (NI)(prevSize | ((NI) ((NI)((*ri).prevSize & ((NI) 1)))));
	}
	LA4_: ;
}

N_NOINLINE(void, raiseOutOfMem_II46IjNZztN9bmbxUD8dt8g)(void) {
	{
		if (!!((outOfMemHook_kZNaA7u1MfSW5ZeoGvw8xg == NIM_NIL))) goto LA3_;
		outOfMemHook_kZNaA7u1MfSW5ZeoGvw8xg();
	}
	LA3_: ;
	printf("%s\012", ((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_2)? (((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_2))->data:"nil");
	fflush(stdout);
	exit(((NI) 1));
}

static N_INLINE(void*, osAllocPages_fxkHg9ajpjxOfBTuIyrgEfwsystem)(NI size) {
	void* result;
	result = (void*)0;
	result = mmap(NIM_NIL, size, ((int) 3), ((int) 34), ((int) -1), ((NI) 0));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (result == NIM_NIL);
		if (T3_) goto LA4_;
		T3_ = (result == ((void*) -1));
		LA4_: ;
		if (!T3_) goto LA5_;
		raiseOutOfMem_II46IjNZztN9bmbxUD8dt8g();
	}
	LA5_: ;
	return result;
}

static N_INLINE(void, incCurrMem_rxjvSU4wRoPOjezLtDzm3Qsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI bytes) {
	(*a).currMem += bytes;
}

static N_INLINE(void, zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem)(void* p, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(p, ((int) 0), ((size_t) (size)));
}

N_NIMCALL(void*, llAlloc_fTkVQ4Gj2glm9btLqR9bdQDQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size) {
	void* result;
	result = (void*)0;
	{
		NIM_BOOL T3_;
		tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw* old;
		void* T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = ((*a).llmem == NIM_NIL);
		if (T3_) goto LA4_;
		T3_ = ((*(*a).llmem).size < size);
		LA4_: ;
		if (!T3_) goto LA5_;
		old = (*a).llmem;
		T7_ = (void*)0;
		T7_ = osAllocPages_fxkHg9ajpjxOfBTuIyrgEfwsystem(((NI) 4096));
		(*a).llmem = ((tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw*) (T7_));
		incCurrMem_rxjvSU4wRoPOjezLtDzm3Qsystem(a, ((NI) 4096));
		(*(*a).llmem).size = (NI)(((NI) 4096) - ((NI)sizeof(tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw)));
		(*(*a).llmem).acc = ((NI)sizeof(tyObject_LLChunk_XsENErzHIZV9bhvyJx56wGw));
		(*(*a).llmem).next = old;
	}
	LA5_: ;
	result = ((void*) ((NI)(((NI) ((*a).llmem)) + (*(*a).llmem).acc)));
	(*(*a).llmem).size -= size;
	(*(*a).llmem).acc += size;
	zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem(result, ((NI) (size)));
	return result;
}

N_NIMCALL(tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*, intSetPut_KWgRM9bUk6rwhAaHSiuK9aYA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* t, NI key) {
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* result;
	result = (tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*)0;
	result = intSetGet_FhOZKj4Gih3qQ5OimZYOrg((&(*t)), key);
	{
		void* T5_;
		if (!(result == NIM_NIL)) goto LA3_;
		T5_ = (void*)0;
		T5_ = llAlloc_fTkVQ4Gj2glm9btLqR9bdQDQ(a, ((NI)sizeof(tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw)));
		result = ((tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw*) (T5_));
		(*result).next = (*t).data[((NI)(key & ((NI) 255)))- 0];
		(*t).data[((NI)(key & ((NI) 255)))- 0] = result;
		(*result).key = key;
	}
	LA3_: ;
	return result;
}

N_NIMCALL(void, incl_Iz1GYiOVKwItgr5CdCm0dQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key) {
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* t;
	NI u;
	t = intSetPut_KWgRM9bUk6rwhAaHSiuK9aYA(a, s, (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	u = (NI)(key & ((NI) 511));
	(*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] | (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63)))))));
}

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

static N_INLINE(void, listAdd_ZRIe9cFnHOrfvS8VmLduoXQ_2system)(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg** head, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c) {
	(*c).next = (*head);
	{
		if (!!(((*head) == NIM_NIL))) goto LA3_;
		(*(*head)).prev = c;
	}
	LA3_: ;
	(*head) = c;
}

N_NIMCALL(void, splitChunk_8QXhiy717OAl8WNA2X27EA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c, NI size) {
	tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* rest;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* T1_;
	NI T2_;
	rest = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) ((NI)((NU64)(((NI) (c))) + (NU64)(size))));
	(*rest).Sup.size = (NI)((*c).Sup.size - size);
	(*rest).next = NIM_NIL;
	(*rest).prev = NIM_NIL;
	(*rest).Sup.prevSize = size;
	updatePrevSize_3G5wKZdFZhblebPYdFnpxQsystem(a, c, (*rest).Sup.size);
	(*c).Sup.size = size;
	T1_ = (tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*)0;
	T1_ = &rest->Sup;
	T2_ = (NI)0;
	T2_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(T1_);
	incl_Iz1GYiOVKwItgr5CdCm0dQ(a, (&(*a).chunkStarts), T2_);
	listAdd_ZRIe9cFnHOrfvS8VmLduoXQ_2system(&(*a).freeChunksList, rest);
}

static N_INLINE(void*, osTryAllocPages_ID9csc9aYiEnjrqnnJOXH2OQsystem)(NI size) {
	void* result;
	result = (void*)0;
	result = mmap(NIM_NIL, size, ((int) 3), ((int) 34), ((int) -1), ((NI) 0));
	{
		if (!(result == ((void*) -1))) goto LA3_;
		result = NIM_NIL;
	}
	LA3_: ;
	return result;
}

N_NIMCALL(void, addHeapLink_fJbggoVEhxEYh2HdNULF3Q)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* p, NI size) {
	tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg* it;
	it = (&(*a).heapLinks);
	{
		while (1) {
			NIM_BOOL T3_;
			T3_ = (NIM_BOOL)0;
			T3_ = !((it == NIM_NIL));
			if (!(T3_)) goto LA4_;
			T3_ = (((NI) 30) <= (*it).len);
			LA4_: ;
			if (!T3_) goto LA2;
			it = (*it).next;
		} LA2: ;
	}
	{
		tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg* n;
		void* T9_;
		if (!(it == NIM_NIL)) goto LA7_;
		T9_ = (void*)0;
		T9_ = llAlloc_fTkVQ4Gj2glm9btLqR9bdQDQ(a, ((NI)sizeof(tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg)));
		n = ((tyObject_HeapLinks_PDV1HBZ8CQSQJC9aOBFNRSg*) (T9_));
		(*n).next = (*a).heapLinks.next;
		(*a).heapLinks.next = n;
		(*n).chunks[(((NI) 0))- 0].Field0 = p;
		(*n).chunks[(((NI) 0))- 0].Field1 = size;
		(*n).len = ((NI) 1);
	}
	goto LA5_;
	LA7_: ;
	{
		NI L;
		L = (*it).len;
		(*it).chunks[(L)- 0].Field0 = p;
		(*it).chunks[(L)- 0].Field1 = size;
		(*it).len += ((NI) 1);
	}
	LA5_: ;
}

N_NIMCALL(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*, requestOsChunks_z9bCNjXTYllZ3pI24nEsw2g_2)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size) {
	tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* result;
	NI size_2;
	NI nxt;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* next;
	NI lastSize;
	NI prv;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* prev;
	result = (tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*)0;
	{
		NI usedMem;
		if (!!((*a).blockChunkSizeIncrease)) goto LA3_;
		usedMem = (*a).currMem;
		{
			if (!(usedMem < ((NI) 65536))) goto LA7_;
			(*a).nextChunkSize = ((NI) 16384);
		}
		goto LA5_;
		LA7_: ;
		{
			NI T10_;
			T10_ = (NI)0;
			T10_ = roundup_HS4HdHHFZPftyB49cpIyo7Asystem((NI)((NU64)(usedMem) >> (NU64)(((NI) 2))), ((NI) 4096));
			(*a).nextChunkSize = ((T10_ <= (NI)((*a).nextChunkSize * ((NI) 2))) ? T10_ : (NI)((*a).nextChunkSize * ((NI) 2)));
		}
		LA5_: ;
	}
	LA3_: ;
	size_2 = size;
	{
		void* T15_;
		if (!((*a).nextChunkSize < size_2)) goto LA13_;
		T15_ = (void*)0;
		T15_ = osAllocPages_fxkHg9ajpjxOfBTuIyrgEfwsystem(size_2);
		result = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (T15_));
	}
	goto LA11_;
	LA13_: ;
	{
		void* T17_;
		T17_ = (void*)0;
		T17_ = osTryAllocPages_ID9csc9aYiEnjrqnnJOXH2OQsystem((*a).nextChunkSize);
		result = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (T17_));
		{
			void* T22_;
			if (!(result == NIM_NIL)) goto LA20_;
			T22_ = (void*)0;
			T22_ = osAllocPages_fxkHg9ajpjxOfBTuIyrgEfwsystem(size_2);
			result = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (T22_));
			(*a).blockChunkSizeIncrease = NIM_TRUE;
		}
		goto LA18_;
		LA20_: ;
		{
			size_2 = (*a).nextChunkSize;
		}
		LA18_: ;
	}
	LA11_: ;
	incCurrMem_rxjvSU4wRoPOjezLtDzm3Qsystem(a, size_2);
	(*a).freeMem += size_2;
	addHeapLink_fJbggoVEhxEYh2HdNULF3Q(a, result, size_2);
	(*result).next = NIM_NIL;
	(*result).prev = NIM_NIL;
	(*result).Sup.size = size_2;
	nxt = (NI)((NU64)(((NI) (result))) + (NU64)(size_2));
	next = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) (nxt));
	{
		NI T26_;
		NIM_BOOL T27_;
		T26_ = (NI)0;
		T26_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(next);
		T27_ = (NIM_BOOL)0;
		T27_ = contains_tGsWrN4DY41H9btt3FhjrNA((&(*a).chunkStarts), T26_);
		if (!T27_) goto LA28_;
		(*next).prevSize = (NI)(size_2 | ((NI) ((NI)((*next).prevSize & ((NI) 1)))));
	}
	LA28_: ;
	{
		if (!!(((*a).lastSize == ((NI) 0)))) goto LA32_;
		lastSize = (*a).lastSize;
	}
	goto LA30_;
	LA32_: ;
	{
		lastSize = ((NI) 4096);
	}
	LA30_: ;
	prv = (NI)((NU64)(((NI) (result))) - (NU64)(lastSize));
	prev = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) (prv));
	{
		NIM_BOOL T37_;
		NI T38_;
		T37_ = (NIM_BOOL)0;
		T38_ = (NI)0;
		T38_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(prev);
		T37_ = contains_tGsWrN4DY41H9btt3FhjrNA((&(*a).chunkStarts), T38_);
		if (!(T37_)) goto LA39_;
		T37_ = ((*prev).size == lastSize);
		LA39_: ;
		if (!T37_) goto LA40_;
		(*result).Sup.prevSize = (NI)(lastSize | ((NI) ((NI)((*result).Sup.prevSize & ((NI) 1)))));
	}
	goto LA35_;
	LA40_: ;
	{
		(*result).Sup.prevSize = (NI)(((NI) 0) | ((NI) ((NI)((*result).Sup.prevSize & ((NI) 1)))));
	}
	LA35_: ;
	(*a).lastSize = size_2;
	return result;
}

N_NIMCALL(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*, getBigChunk_z9bCNjXTYllZ3pI24nEsw2g)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI size) {
	tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* result;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* T20_;
	NI T21_;
	result = (tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*)0;
	result = (*a).freeChunksList;
	{
		{
			while (1) {
				if (!!((result == NIM_NIL))) goto LA3;
				{
					if (!((*result).Sup.size == size)) goto LA6_;
					listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem(&(*a).freeChunksList, result);
					goto LA1;
				}
				goto LA4_;
				LA6_: ;
				{
					if (!(size < (*result).Sup.size)) goto LA9_;
					listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem(&(*a).freeChunksList, result);
					splitChunk_8QXhiy717OAl8WNA2X27EA(a, result, size);
					goto LA1;
				}
				goto LA4_;
				LA9_: ;
				LA4_: ;
				result = (*result).next;
			} LA3: ;
		}
		{
			if (!(size < ((NI) 524288))) goto LA13_;
			result = requestOsChunks_z9bCNjXTYllZ3pI24nEsw2g_2(a, ((NI) 524288));
			splitChunk_8QXhiy717OAl8WNA2X27EA(a, result, size);
		}
		goto LA11_;
		LA13_: ;
		{
			result = requestOsChunks_z9bCNjXTYllZ3pI24nEsw2g_2(a, size);
			{
				if (!(size < (*result).Sup.size)) goto LA18_;
				splitChunk_8QXhiy717OAl8WNA2X27EA(a, result, size);
			}
			LA18_: ;
		}
		LA11_: ;
	} LA1: ;
	(*result).Sup.prevSize = ((NI) 1);
	T20_ = (tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*)0;
	T20_ = &result->Sup;
	T21_ = (NI)0;
	T21_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(T20_);
	incl_Iz1GYiOVKwItgr5CdCm0dQ(a, (&(*a).chunkStarts), T21_);
	(*a).freeMem -= size;
	return result;
}

N_NIMCALL(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*, getSmallChunk_h6cvXbfQjxIdThM5GthosA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a) {
	tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* result;
	tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* res;
	result = (tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*)0;
	res = getBigChunk_z9bCNjXTYllZ3pI24nEsw2g(a, ((NI) 4096));
	result = ((tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*) (res));
	return result;
}

static N_INLINE(void, listAdd_DqXPtLsRUwQp3iwLtHEdIgsystem)(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ** head, tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c) {
	(*c).next = (*head);
	{
		if (!!(((*head) == NIM_NIL))) goto LA3_;
		(*(*head)).prev = c;
	}
	LA3_: ;
	(*head) = c;
}

static N_INLINE(void, listRemove_DqXPtLsRUwQp3iwLtHEdIg_2system)(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ** head, tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c) {
	{
		if (!(c == (*head))) goto LA3_;
		(*head) = (*c).next;
		{
			if (!!(((*head) == NIM_NIL))) goto LA7_;
			(*(*head)).prev = NIM_NIL;
		}
		LA7_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		(*(*c).prev).next = (*c).next;
		{
			if (!!(((*c).next == NIM_NIL))) goto LA12_;
			(*(*c).next).prev = (*c).prev;
		}
		LA12_: ;
	}
	LA1_: ;
	(*c).next = NIM_NIL;
	(*c).prev = NIM_NIL;
}

N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, getBottom_QXg9anCfFuhk3avAkOOKNhQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a) {
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* result;
	result = (tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*)0;
	result = (&(*a).bottomData);
	{
		if (!((*result).link[(((NI) 0))- 0] == NIM_NIL)) goto LA3_;
		(*result).link[(((NI) 0))- 0] = result;
		(*result).link[(((NI) 1))- 0] = result;
	}
	LA3_: ;
	return result;
}

N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, allocAvlNode_neSuioWH6NDTp8E9cNgBmjg)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI key, NI upperBound) {
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* result;
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* bottom;
	result = (tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*)0;
	{
		if (!!(((*a).freeAvlNodes == NIM_NIL))) goto LA3_;
		result = (*a).freeAvlNodes;
		(*a).freeAvlNodes = (*(*a).freeAvlNodes).link[(((NI) 0))- 0];
	}
	goto LA1_;
	LA3_: ;
	{
		void* T6_;
		T6_ = (void*)0;
		T6_ = llAlloc_fTkVQ4Gj2glm9btLqR9bdQDQ(a, ((NI)sizeof(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw)));
		result = ((tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*) (T6_));
	}
	LA1_: ;
	(*result).key = key;
	(*result).upperBound = upperBound;
	bottom = getBottom_QXg9anCfFuhk3avAkOOKNhQ(a);
	(*result).link[(((NI) 0))- 0] = bottom;
	(*result).link[(((NI) 1))- 0] = bottom;
	(*result).level = ((NI) 1);
	return result;
}

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

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

N_NIMCALL(void, add_Xuf47u3imOz8BOk5HURLWQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t, NI key, NI upperBound) {
	{
		if (!((*(*t)).link[(((NI) 0))- 0] == (*t))) goto LA3_;
		(*t) = allocAvlNode_neSuioWH6NDTp8E9cNgBmjg(a, key, upperBound);
	}
	goto LA1_;
	LA3_: ;
	{
		{
			if (!((NU64)(key) < (NU64)((*(*t)).key))) goto LA8_;
			add_Xuf47u3imOz8BOk5HURLWQ(a, &(*(*t)).link[(((NI) 0))- 0], key, upperBound);
		}
		goto LA6_;
		LA8_: ;
		{
			if (!((NU64)((*(*t)).key) < (NU64)(key))) goto LA11_;
			add_Xuf47u3imOz8BOk5HURLWQ(a, &(*(*t)).link[(((NI) 1))- 0], key, upperBound);
		}
		goto LA6_;
		LA11_: ;
		{
		}
		LA6_: ;
		skew_Cfx7NvEVZIhBjBm7i89boSg(t);
		split_Cfx7NvEVZIhBjBm7i89boSg_2(t);
	}
	LA1_: ;
}

N_NIMCALL(void*, rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, NI requestedSize) {
	void* result;
	NI size;
	result = (void*)0;
	size = roundup_HS4HdHHFZPftyB49cpIyo7Asystem(requestedSize, ((NI) 8));
	{
		NI s;
		tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c;
		if (!(size <= (NI)(((NI) 4096) - (NI)(((NI)sizeof(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ)) - ((NI) 8))))) goto LA3_;
		s = (NI)(size / ((NI) 8));
		c = (*a).freeSmallChunks[(s)- 0];
		{
			if (!(c == NIM_NIL)) goto LA7_;
			c = getSmallChunk_h6cvXbfQjxIdThM5GthosA(a);
			(*c).freeList = NIM_NIL;
			(*c).Sup.size = size;
			(*c).acc = size;
			(*c).free = (NI)((NI)(((NI) 4096) - (NI)(((NI)sizeof(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ)) - ((NI) 8))) - size);
			(*c).next = NIM_NIL;
			(*c).prev = NIM_NIL;
			listAdd_DqXPtLsRUwQp3iwLtHEdIgsystem(&(*a).freeSmallChunks[(s)- 0], c);
			result = ((void*) ((&(*c).data)));
		}
		goto LA5_;
		LA7_: ;
		{
			{
				if (!((*c).freeList == NIM_NIL)) goto LA12_;
				result = ((void*) ((NI)((NU64)(((NI) ((&(*c).data)))) + (NU64)((*c).acc))));
				(*c).acc += size;
			}
			goto LA10_;
			LA12_: ;
			{
				result = ((void*) ((*c).freeList));
				(*c).freeList = (*(*c).freeList).next;
			}
			LA10_: ;
			(*c).free -= size;
		}
		LA5_: ;
		{
			if (!((*c).free < size)) goto LA17_;
			listRemove_DqXPtLsRUwQp3iwLtHEdIg_2system(&(*a).freeSmallChunks[(s)- 0], c);
		}
		LA17_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_2;
		size = roundup_HS4HdHHFZPftyB49cpIyo7Asystem((NI)(requestedSize + (NI)(((NI)sizeof(tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg)) - ((NI) 8))), ((NI) 4096));
		c_2 = getBigChunk_z9bCNjXTYllZ3pI24nEsw2g(a, size);
		result = ((void*) ((&(*c_2).data)));
		{
			if (!((*a).root == NIM_NIL)) goto LA22_;
			(*a).root = getBottom_QXg9anCfFuhk3avAkOOKNhQ(a);
		}
		LA22_: ;
		add_Xuf47u3imOz8BOk5HURLWQ(a, &(*a).root, ((NI) (result)), (NI)((NU64)(((NI) (result))) + (NU64)(size)));
	}
	LA1_: ;
	return result;
}

N_NIMCALL(void*, alloc_1iQ1Xo9cXsxq509b5gmDHLoQ_2)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, NI size) {
	void* result;
	result = (void*)0;
	result = rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg(allocator, (NI)(((NI) (size)) + ((NI)sizeof(tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ))));
	(*((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) (result))).zeroField = ((NI) 1);
	result = ((void*) ((NI)((NU64)(((NI) (result))) + (NU64)(((NI)sizeof(tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ))))));
	return result;
}

N_NIMCALL(void*, alloc0_1iQ1Xo9cXsxq509b5gmDHLoQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, NI size) {
	void* result;
	result = (void*)0;
	result = alloc_1iQ1Xo9cXsxq509b5gmDHLoQ_2(allocator, size);
	zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem(result, size);
	return result;
}

N_NOCONV(void*, alloc0_sVm4rDImKK2ZDdylByayiA)(NI size) {
	void* result;
	result = (void*)0;
	result = alloc0_1iQ1Xo9cXsxq509b5gmDHLoQ((&gch_IcYaEuuWivYAS86vFMTS3Q.region), size);
	return result;
}

N_NIMCALL(void, init_E1QNZGuo0DGFXyt4Y3MfqA)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, NI cap) {
	void* T1_;
	(*s).len = ((NI) 0);
	(*s).cap = cap;
	T1_ = (void*)0;
	T1_ = alloc0_sVm4rDImKK2ZDdylByayiA(((NI) ((NI)(cap * ((NI) 8)))));
	(*s).d = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g**) (T1_));
}

N_NIMCALL(void, init_WHgd5C59bkXWDz3vnAxfzXQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = alloc0_sVm4rDImKK2ZDdylByayiA(((NI) 8192));
	(*s).data = ((tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg**) (T1_));
	(*s).max = ((NI) 1023);
	(*s).counter = ((NI) 0);
	(*s).head = NIM_NIL;
}

N_NIMCALL(void, initGC_njssp69aa7hvxte9bJ8uuDcg)(void) {
	gch_IcYaEuuWivYAS86vFMTS3Q.cycleThreshold = ((NI) 4194304);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.stackScans = ((NI) 0);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.cycleCollections = ((NI) 0);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.maxThreshold = ((NI) 0);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.maxStackSize = ((NI) 0);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.maxStackCells = ((NI) 0);
	gch_IcYaEuuWivYAS86vFMTS3Q.stat.cycleTableSize = ((NI) 0);
	init_E1QNZGuo0DGFXyt4Y3MfqA((&gch_IcYaEuuWivYAS86vFMTS3Q.zct), ((NI) 1024));
	init_E1QNZGuo0DGFXyt4Y3MfqA((&gch_IcYaEuuWivYAS86vFMTS3Q.tempStack), ((NI) 1024));
	init_E1QNZGuo0DGFXyt4Y3MfqA((&gch_IcYaEuuWivYAS86vFMTS3Q.decStack), ((NI) 1024));
	init_WHgd5C59bkXWDz3vnAxfzXQ((&gch_IcYaEuuWivYAS86vFMTS3Q.marked));
	init_E1QNZGuo0DGFXyt4Y3MfqA((&gch_IcYaEuuWivYAS86vFMTS3Q.additionalRoots), ((NI) 1024));
}

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

N_NOCONV(void*, alloc_sVm4rDImKK2ZDdylByayiA_2)(NI size) {
	void* result;
	result = (void*)0;
	result = alloc_1iQ1Xo9cXsxq509b5gmDHLoQ_2((&gch_IcYaEuuWivYAS86vFMTS3Q.region), size);
	return result;
}

static N_INLINE(void, copyMem_E1xtACub5WcDa3vbrIXbwgsystem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}

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

static N_INLINE(NIM_BOOL, isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem)(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	result = ((*c).size <= (NI)(((NI) 4096) - (NI)(((NI)sizeof(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ)) - ((NI) 8))));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NIM_BOOL, chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system)(tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = (((NI) ((NI)((*c).prevSize & ((NI) 1)))) == ((NI) 0));
	return result;
}

N_NIMCALL(void, excl_Z9cZKmN1jjRFCzU0lgW9a1XA)(tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA* s, NI key) {
	tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* t;
	t = intSetGet_FhOZKj4Gih3qQ5OimZYOrg((&(*s)), (NI)((NU64)(key) >> (NU64)(((NI) 9))));
	{
		NI u;
		if (!!((t == NIM_NIL))) goto LA3_;
		u = (NI)(key & ((NI) 511));
		(*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(((NI) (u))) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64) ~((NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(((NI) (u)) & ((NI) 63)))))))));
	}
	LA3_: ;
}

N_NIMCALL(void, freeBigChunk_CAqFS1jFL1RxG80t9bOGmAA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c) {
	tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_2;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* ri;
	NI prevSize;
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* T30_;
	NI T31_;
	c_2 = c;
	(*a).freeMem += (*c_2).Sup.size;
	ri = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) ((NI)((NU64)(((NI) (c_2))) + (NU64)((*c_2).Sup.size))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = isAccessible_5nqar3kL9acJcissrFLDdkwsystem((&(*a)), ((void*) (ri)));
		if (!(T3_)) goto LA4_;
		T3_ = chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system(ri);
		LA4_: ;
		if (!T3_) goto LA5_;
		{
			NIM_BOOL T9_;
			NI T12_;
			T9_ = (NIM_BOOL)0;
			T9_ = isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem(ri);
			if (!!(T9_)) goto LA10_;
			listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem(&(*a).freeChunksList, ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (ri)));
			(*c_2).Sup.size += (*ri).size;
			T12_ = (NI)0;
			T12_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(ri);
			excl_Z9cZKmN1jjRFCzU0lgW9a1XA((&(*a).chunkStarts), T12_);
		}
		LA10_: ;
	}
	LA5_: ;
	prevSize = (NI)((*c_2).Sup.prevSize & ((NI) -2));
	{
		tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* le;
		if (!!((prevSize == ((NI) 0)))) goto LA15_;
		le = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) ((NI)((NU64)(((NI) (c_2))) - (NU64)(prevSize))));
		{
			NIM_BOOL T19_;
			T19_ = (NIM_BOOL)0;
			T19_ = isAccessible_5nqar3kL9acJcissrFLDdkwsystem((&(*a)), ((void*) (le)));
			if (!(T19_)) goto LA20_;
			T19_ = chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system(le);
			LA20_: ;
			if (!T19_) goto LA21_;
			{
				NIM_BOOL T25_;
				tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* T28_;
				NI T29_;
				T25_ = (NIM_BOOL)0;
				T25_ = isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem(le);
				if (!!(T25_)) goto LA26_;
				listRemove_ZRIe9cFnHOrfvS8VmLduoXQsystem(&(*a).freeChunksList, ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (le)));
				(*le).size += (*c_2).Sup.size;
				T28_ = (tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*)0;
				T28_ = &c_2->Sup;
				T29_ = (NI)0;
				T29_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(T28_);
				excl_Z9cZKmN1jjRFCzU0lgW9a1XA((&(*a).chunkStarts), T29_);
				c_2 = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (le));
			}
			LA26_: ;
		}
		LA21_: ;
	}
	LA15_: ;
	T30_ = (tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*)0;
	T30_ = &c_2->Sup;
	T31_ = (NI)0;
	T31_ = pageIndex_vFgXFo13iF61HsEG6epuwgsystem(T30_);
	incl_Iz1GYiOVKwItgr5CdCm0dQ(a, (&(*a).chunkStarts), T31_);
	updatePrevSize_3G5wKZdFZhblebPYdFnpxQsystem(a, c_2, (*c_2).Sup.size);
	listAdd_ZRIe9cFnHOrfvS8VmLduoXQ_2system(&(*a).freeChunksList, c_2);
	(*c_2).Sup.prevSize = (NI)((*c_2).Sup.prevSize & ((NI) -2));
}

static N_INLINE(void, deallocAvlNode_E5Kui5a9artJoR6jEn007Vgsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* n) {
	(*n).link[(((NI) 0))- 0] = (*a).freeAvlNodes;
	(*a).freeAvlNodes = n;
}

N_NIMCALL(void, del_C66us4UEWCXp84lHW4tDLA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw** t, NI x) {
{	{
		if (!((*(*t)).link[(((NI) 0))- 0] == (*t))) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	(*a).last = (*t);
	{
		if (!((NU64)(x) < (NU64)((*(*t)).key))) goto LA7_;
		del_C66us4UEWCXp84lHW4tDLA(a, &(*(*t)).link[(((NI) 0))- 0], x);
	}
	goto LA5_;
	LA7_: ;
	{
		(*a).deleted = (*t);
		del_C66us4UEWCXp84lHW4tDLA(a, &(*(*t)).link[(((NI) 1))- 0], x);
	}
	LA5_: ;
	{
		NIM_BOOL T12_;
		NIM_BOOL T13_;
		T12_ = (NIM_BOOL)0;
		T13_ = (NIM_BOOL)0;
		T13_ = ((*t) == (*a).last);
		if (!(T13_)) goto LA14_;
		T13_ = !(((*(*a).deleted).link[(((NI) 0))- 0] == (*a).deleted));
		LA14_: ;
		T12_ = T13_;
		if (!(T12_)) goto LA15_;
		T12_ = (x == (*(*a).deleted).key);
		LA15_: ;
		if (!T12_) goto LA16_;
		(*(*a).deleted).key = (*(*t)).key;
		(*(*a).deleted).upperBound = (*(*t)).upperBound;
		(*a).deleted = getBottom_QXg9anCfFuhk3avAkOOKNhQ(a);
		(*t) = (*(*t)).link[(((NI) 1))- 0];
		deallocAvlNode_E5Kui5a9artJoR6jEn007Vgsystem(a, (*a).last);
	}
	goto LA10_;
	LA16_: ;
	{
		NIM_BOOL T19_;
		T19_ = (NIM_BOOL)0;
		T19_ = ((*(*(*t)).link[(((NI) 0))- 0]).level < (NI)((*(*t)).level - ((NI) 1)));
		if (T19_) goto LA20_;
		T19_ = ((*(*(*t)).link[(((NI) 1))- 0]).level < (NI)((*(*t)).level - ((NI) 1)));
		LA20_: ;
		if (!T19_) goto LA21_;
		(*(*t)).level -= ((NI) 1);
		{
			if (!((*(*t)).level < (*(*(*t)).link[(((NI) 1))- 0]).level)) goto LA25_;
			(*(*(*t)).link[(((NI) 1))- 0]).level = (*(*t)).level;
		}
		LA25_: ;
		skew_Cfx7NvEVZIhBjBm7i89boSg(t);
		skew_Cfx7NvEVZIhBjBm7i89boSg(&(*(*t)).link[(((NI) 1))- 0]);
		skew_Cfx7NvEVZIhBjBm7i89boSg(&(*(*(*t)).link[(((NI) 1))- 0]).link[(((NI) 1))- 0]);
		split_Cfx7NvEVZIhBjBm7i89boSg_2(t);
		split_Cfx7NvEVZIhBjBm7i89boSg_2(&(*(*t)).link[(((NI) 1))- 0]);
	}
	goto LA10_;
	LA21_: ;
	LA10_: ;
	}BeforeRet_: ;
}

N_NIMCALL(void, rawDealloc_DA62HrGC5sdfCED505KyyQ)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p) {
	tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c;
	c = pageAddr_4uti7hTxTUDxUPqFMgMvHAsystem(p);
	{
		NIM_BOOL T3_;
		tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c_2;
		NI s;
		tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ* f;
		T3_ = (NIM_BOOL)0;
		T3_ = isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem(c);
		if (!T3_) goto LA4_;
		c_2 = ((tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*) (c));
		s = (*c_2).Sup.size;
		f = ((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) (p));
		(*f).zeroField = ((NI) 0);
		(*f).next = (*c_2).freeList;
		(*c_2).freeList = f;
		{
			if (!((*c_2).free < s)) goto LA8_;
			listAdd_DqXPtLsRUwQp3iwLtHEdIgsystem(&(*a).freeSmallChunks[((NI)(s / ((NI) 8)))- 0], c_2);
			(*c_2).free += s;
		}
		goto LA6_;
		LA8_: ;
		{
			(*c_2).free += s;
			{
				if (!((*c_2).free == (NI)(((NI) 4096) - (NI)(((NI)sizeof(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ)) - ((NI) 8))))) goto LA13_;
				listRemove_DqXPtLsRUwQp3iwLtHEdIg_2system(&(*a).freeSmallChunks[((NI)(s / ((NI) 8)))- 0], c_2);
				(*c_2).Sup.size = ((NI) 4096);
				freeBigChunk_CAqFS1jFL1RxG80t9bOGmAA(a, ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (c_2)));
			}
			LA13_: ;
		}
		LA6_: ;
	}
	goto LA1_;
	LA4_: ;
	{
		tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_3;
		c_3 = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (c));
		(*a).deleted = getBottom_QXg9anCfFuhk3avAkOOKNhQ(a);
		del_C66us4UEWCXp84lHW4tDLA(a, &(*a).root, ((NI) ((&(*c_3).data))));
		freeBigChunk_CAqFS1jFL1RxG80t9bOGmAA(a, c_3);
	}
	LA1_: ;
}

N_NIMCALL(void, dealloc_jqYVOi4APb9cRx3G9a57AkRw)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* allocator, void* p) {
	void* x;
	x = ((void*) ((NI)((NU64)(((NI) (p))) - (NU64)(((NI)sizeof(tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ))))));
	rawDealloc_DA62HrGC5sdfCED505KyyQ(allocator, x);
}

N_NOCONV(void, dealloc_RCjNtRnHdRYntrcE7YtwWw)(void* p) {
	dealloc_jqYVOi4APb9cRx3G9a57AkRw((&gch_IcYaEuuWivYAS86vFMTS3Q.region), p);
}

static N_INLINE(void, add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
		void* T5_;
		if (!((*s).cap <= (*s).len)) goto LA3_;
		(*s).cap = (NI)((NI)((*s).cap * ((NI) 3)) / ((NI) 2));
		T5_ = (void*)0;
		T5_ = alloc_sVm4rDImKK2ZDdylByayiA_2(((NI) ((NI)((*s).cap * ((NI) 8)))));
		d = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g**) (T5_));
		copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) (d)), ((void*) ((*s).d)), ((NI) ((NI)((*s).len * ((NI) 8)))));
		dealloc_RCjNtRnHdRYntrcE7YtwWw(((void*) ((*s).d)));
		(*s).d = d;
	}
	LA3_: ;
	(*s).d[((*s).len)- 0] = c;
	(*s).len += ((NI) 1);
}

N_NOINLINE(void, addZCT_fCDI7oO1NNVXXURtxSzsRw)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	{
		if (!((NI)((*c).refcount & ((NI) 4)) == ((NI) 0))) goto LA3_;
		(*c).refcount = (NI)((*c).refcount | ((NI) 4));
		add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem(s, c);
	}
	LA3_: ;
}

static N_INLINE(void, rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	addZCT_fCDI7oO1NNVXXURtxSzsRw((&gch_IcYaEuuWivYAS86vFMTS3Q.zct), c);
}

static N_INLINE(void, decRef_MV4BBk6J1qu70IbBxwEn4wsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3_;
		rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system(c);
	}
	LA3_: ;
}

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

N_NIMCALL(void, cellSetRawInsert_wqizyapnzNjHA3SIFqE8ow)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg** data, tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* desc) {
	NI h;
	h = (NI)(((NI) ((*desc).key)) & (*t).max);
	{
		while (1) {
			if (!!((data[(h)- 0] == NIM_NIL))) goto LA2;
			h = nextTry_GRX2KbRyW3mlDDFEU50uhwsystem(h, (*t).max);
		} LA2: ;
	}
	data[(h)- 0] = desc;
}

N_NIMCALL(void, cellSetEnlarge_ZCqaZEiX9aUtDCRoknrJ9bpQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t) {
	NI oldMax;
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg** n;
	void* T1_;
	oldMax = (*t).max;
	(*t).max = (NI)((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 2)) - ((NI) 1));
	T1_ = (void*)0;
	T1_ = alloc0_sVm4rDImKK2ZDdylByayiA(((NI) ((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 8)))));
	n = ((tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg**) (T1_));
	{
		NI i;
		NI res;
		i = (NI)0;
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= oldMax)) goto LA4;
				i = res;
				{
					if (!!(((*t).data[(i)- 0] == NIM_NIL))) goto LA7_;
					cellSetRawInsert_wqizyapnzNjHA3SIFqE8ow((&(*t)), n, (*t).data[(i)- 0]);
				}
				LA7_: ;
				res += ((NI) 1);
			} LA4: ;
		}
	}
	dealloc_RCjNtRnHdRYntrcE7YtwWw(((void*) ((*t).data)));
	(*t).data = n;
}

N_NIMCALL(tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*, cellSetPut_mFUFZ7eVLRT9bMaHzrsxFrQ)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, NI key) {
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* result;
	NI h;
	void* T19_;
{	result = (tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*)0;
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* x;
			x = (*t).data[(h)- 0];
			{
				if (!(x == NIM_NIL)) goto LA5_;
				goto LA1;
			}
			LA5_: ;
			{
				if (!((*x).key == key)) goto LA9_;
				result = x;
				goto BeforeRet_;
			}
			LA9_: ;
			h = nextTry_GRX2KbRyW3mlDDFEU50uhwsystem(h, (*t).max);
		}
	} LA1: ;
	{
		NIM_BOOL T13_;
		T13_ = (NIM_BOOL)0;
		T13_ = ((NI)((NI)((*t).max + ((NI) 1)) * ((NI) 2)) < (NI)((*t).counter * ((NI) 3)));
		if (T13_) goto LA14_;
		T13_ = ((NI)((NI)((*t).max + ((NI) 1)) - (*t).counter) < ((NI) 4));
		LA14_: ;
		if (!T13_) goto LA15_;
		cellSetEnlarge_ZCqaZEiX9aUtDCRoknrJ9bpQ(t);
	}
	LA15_: ;
	(*t).counter += ((NI) 1);
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			if (!!(((*t).data[(h)- 0] == NIM_NIL))) goto LA18;
			h = nextTry_GRX2KbRyW3mlDDFEU50uhwsystem(h, (*t).max);
		} LA18: ;
	}
	T19_ = (void*)0;
	T19_ = alloc0_sVm4rDImKK2ZDdylByayiA(((NI) (((NI)sizeof(tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg)))));
	result = ((tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*) (T19_));
	(*result).next = (*t).head;
	(*result).key = key;
	(*t).head = result;
	(*t).data[(h)- 0] = result;
	}BeforeRet_: ;
	return result;
}

N_NOINLINE(void, incl_m4q9b16kJJcoKe9c4ERtlpCg)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell) {
	NI u;
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* t;
	u = ((NI) (cell));
	t = cellSetPut_mFUFZ7eVLRT9bMaHzrsxFrQ(s, (NI)((NU64)(u) >> (NU64)(((NI) 12))));
	u = ((NI) ((NI)((NU64)(((NI) ((NI)((NU64)(u) % (NU64)(((NI) 4096)))))) / (NU64)(((NI) 8)))));
	(*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] | (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63)))))));
}

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

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

N_NIMCALL(TNimNode*, selectBranch_MvIsyjoRI1g7VY9cXrLB1dQ)(void* aa, TNimNode* n) {
	TNimNode* result;
	NI discr;
	result = (TNimNode*)0;
	discr = getDiscriminant_wq1GP7ZPZ7P1uZUypfc9ciA(aa, n);
	{
		if (!((NU64)(discr) < (NU64)((*n).len))) goto LA3_;
		result = (*n).sons[(discr)- 0];
		{
			if (!(result == NIM_NIL)) goto LA7_;
			result = (*n).sons[((*n).len)- 0];
		}
		LA7_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		result = (*n).sons[((*n).len)- 0];
	}
	LA1_: ;
	return result;
}

N_NIMCALL(void, forAllSlotsAux_g4QpsZWzXQMKa0ugIze5Kw)(void* dest, TNimNode* n, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op) {
	NI d;
	d = ((NI) (dest));
	switch ((*n).kind) {
	case ((tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ) 1):
	{
		forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA(((void*) ((NI)((NU64)(d) + (NU64)((*n).offset)))), (*n).typ, op);
	}
	break;
	case ((tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ) 2):
	{
		{
			NI i;
			NI colontmp_;
			NI res;
			i = (NI)0;
			colontmp_ = (NI)0;
			colontmp_ = (NI)((*n).len - ((NI) 1));
			res = ((NI) 0);
			{
				while (1) {
					if (!(res <= colontmp_)) goto LA5;
					i = res;
					{
						if (!((*(*n).sons[(i)- 0]).kind == ((tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ) 1))) goto LA8_;
						{
							if (!((289406976 &((NU64)1<<((NU)((*(*(*n).sons[(i)- 0]).typ).kind)&63U)))!=0)) goto LA12_;
							doOperation_3F8QeaTyYrJJF2gjBr6b8A((*((void**) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i)- 0]).offset))))), op);
						}
						goto LA10_;
						LA12_: ;
						{
							forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA(((void*) ((NI)((NU64)(d) + (NU64)((*(*n).sons[(i)- 0]).offset)))), (*(*n).sons[(i)- 0]).typ, op);
						}
						LA10_: ;
					}
					goto LA6_;
					LA8_: ;
					{
						forAllSlotsAux_g4QpsZWzXQMKa0ugIze5Kw(dest, (*n).sons[(i)- 0], op);
					}
					LA6_: ;
					res += ((NI) 1);
				} LA5: ;
			}
		}
	}
	break;
	case ((tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ) 3):
	{
		TNimNode* m;
		m = selectBranch_MvIsyjoRI1g7VY9cXrLB1dQ(dest, n);
		{
			if (!!((m == NIM_NIL))) goto LA19_;
			forAllSlotsAux_g4QpsZWzXQMKa0ugIze5Kw(dest, m, op);
		}
		LA19_: ;
	}
	break;
	case ((tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ) 0):
	{
	}
	break;
	}
}

N_NIMCALL(void, forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA)(void* dest, TNimType* mt, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op) {
	NI d;
{	d = ((NI) (dest));
	{
		if (!(dest == NIM_NIL)) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!!((((*mt).flags &(1U<<((NU)(((tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ) 0))&7U)))!=0))) goto LA7_;
		switch ((*mt).kind) {
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 22):
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 28):
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 24):
		{
			doOperation_3F8QeaTyYrJJF2gjBr6b8A((*((void**) (d))), op);
		}
		break;
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 17):
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 18):
		{
			forAllSlotsAux_g4QpsZWzXQMKa0ugIze5Kw(dest, (*mt).node, op);
		}
		break;
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 16):
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 4):
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 27):
		{
			{
				NI i;
				NI colontmp_;
				NI res;
				i = (NI)0;
				colontmp_ = (NI)0;
				colontmp_ = (NI)((NI)((*mt).size / (*(*mt).base).size) - ((NI) 1));
				res = ((NI) 0);
				{
					while (1) {
						if (!(res <= colontmp_)) goto LA14;
						i = res;
						forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA(((void*) ((NI)((NU64)(d) + (NU64)((NI)((NU64)(i) * (NU64)((*(*mt).base).size)))))), (*mt).base, op);
						res += ((NI) 1);
					} LA14: ;
				}
			}
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA7_: ;
	}BeforeRet_: ;
}

N_NIMCALL(void, forAllChildren_yHFnLgI7q81iFxRlb3Iqlw)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op) {
	tyProc_ojoeKfW4VYIm36I9cpDTQIg marker;
	marker = (*(*cell).typ).marker;
	{
		void* T5_;
		if (!!((marker == NIM_NIL))) goto LA3_;
		T5_ = (void*)0;
		T5_ = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(cell);
		marker(T5_, ((NI) (op)));
	}
	goto LA1_;
	LA3_: ;
	{
		switch ((*(*cell).typ).kind) {
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 22):
		{
			void* T8_;
			T8_ = (void*)0;
			T8_ = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(cell);
			forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA(T8_, (*(*cell).typ).base, op);
		}
		break;
		case ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 24):
		{
			NI d;
			void* T10_;
			TGenericSeq* s;
			T10_ = (void*)0;
			T10_ = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(cell);
			d = ((NI) (T10_));
			s = ((TGenericSeq*) (d));
			{
				if (!!((s == NIM_NIL))) goto LA13_;
				{
					NI i;
					NI colontmp_;
					NI res;
					i = (NI)0;
					colontmp_ = (NI)0;
					colontmp_ = (NI)((*s).len - ((NI) 1));
					res = ((NI) 0);
					{
						while (1) {
							if (!(res <= colontmp_)) goto LA17;
							i = res;
							forAllChildrenAux_YOI1Uo54H9aas13WthjhsfA(((void*) ((NI)((NU64)((NI)((NU64)(d) + (NU64)((NI)((NU64)(i) * (NU64)((*(*(*cell).typ).base).size))))) + (NU64)(((NI) 16))))), (*(*cell).typ).base, op);
							res += ((NI) 1);
						} LA17: ;
					}
				}
			}
			LA13_: ;
		}
		break;
		default:
		{
		}
		break;
		}
	}
	LA1_: ;
}

N_NIMCALL(tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*, cellSetGet_X4WTfs0wkld8wp8XcE9b8BA)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* t, NI key) {
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* result;
	NI h;
{	result = (tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg*)0;
	h = (NI)(((NI) (key)) & (*t).max);
	{
		while (1) {
			if (!!(((*t).data[(h)- 0] == NIM_NIL))) goto LA2;
			{
				if (!((*(*t).data[(h)- 0]).key == key)) goto LA5_;
				result = (*t).data[(h)- 0];
				goto BeforeRet_;
			}
			LA5_: ;
			h = nextTry_GRX2KbRyW3mlDDFEU50uhwsystem(h, (*t).max);
		} LA2: ;
	}
	result = NIM_NIL;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(NIM_BOOL, containsOrIncl_CbGEjIBKJIi7knlaDzUluA)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell) {
	NIM_BOOL result;
	NI u;
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* t;
	result = (NIM_BOOL)0;
	u = ((NI) (cell));
	t = cellSetGet_X4WTfs0wkld8wp8XcE9b8BA((&(*s)), (NI)((NU64)(u) >> (NU64)(((NI) 12))));
	{
		if (!!((t == NIM_NIL))) goto LA3_;
		u = ((NI) ((NI)((NU64)(((NI) ((NI)((NU64)(u) % (NU64)(((NI) 4096)))))) / (NU64)(((NI) 8)))));
		result = !(((NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63))))))) == ((NI) 0)));
		{
			if (!!(result)) goto LA7_;
			(*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] = (NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] | (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63)))))));
		}
		LA7_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		incl_m4q9b16kJJcoKe9c4ERtlpCg(s, cell);
		result = NIM_FALSE;
	}
	LA1_: ;
	return result;
}

N_NIMCALL(void, markS_NZr5o3Ubzrci4OmK29cHBJA)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	incl_m4q9b16kJJcoKe9c4ERtlpCg((&(*gch).marked), c);
	forAllChildren_yHFnLgI7q81iFxRlb3Iqlw(c, ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 1));
	{
		while (1) {
			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* d;
			if (!(((NI) 0) < (*gch).tempStack.len)) goto LA2;
			(*gch).tempStack.len -= ((NI) 1);
			d = (*gch).tempStack.d[((*gch).tempStack.len)- 0];
			{
				NIM_BOOL T5_;
				T5_ = (NIM_BOOL)0;
				T5_ = containsOrIncl_CbGEjIBKJIi7knlaDzUluA((&(*gch).marked), d);
				if (!!(T5_)) goto LA6_;
				forAllChildren_yHFnLgI7q81iFxRlb3Iqlw(d, ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 1));
			}
			LA6_: ;
		} LA2: ;
	}
}

N_NIMCALL(void, doOperation_3F8QeaTyYrJJF2gjBr6b8A)(void* p, tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ op) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c;
{	{
		if (!(p == NIM_NIL)) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	c = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(p);
	switch (op) {
	case ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 2):
	{
		decRef_MV4BBk6J1qu70IbBxwEn4wsystem(c);
	}
	break;
	case ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 3):
	{
		add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem((&gch_IcYaEuuWivYAS86vFMTS3Q.tempStack), c);
	}
	break;
	case ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 0):
	{
		markS_NZr5o3Ubzrci4OmK29cHBJA((&gch_IcYaEuuWivYAS86vFMTS3Q), c);
	}
	break;
	case ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 1):
	{
		add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem((&gch_IcYaEuuWivYAS86vFMTS3Q.tempStack), c);
	}
	break;
	}
	}BeforeRet_: ;
}

N_NIMCALL(void, nimGCvisit)(void* d, NI op) {
	doOperation_3F8QeaTyYrJJF2gjBr6b8A(d, ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) (op)));
}
static N_NIMCALL(void, Marker_tyRef_oUKtBcKRdK6usj8RWrlp6A)(void* p, NI op) {
	Exception* a;
	a = (Exception*)p;
	nimGCvisit((void*)(*a).parent, op);
	nimGCvisit((void*)(*a).message, op);
	nimGCvisit((void*)(*a).trace, op);
	nimGCvisit((void*)(*a).up, op);
}
static N_NIMCALL(void, TM_Q5wkpxktOdTGvlSRo9bzt9aw_4)(void) {
	nimGCvisit((void*)currException_9bVPeDJlYTi9bQApZpfH8wjg, 0);
}

N_NIMCALL(void, nimRegisterGlobalMarker)(tyProc_T4eqaYlFJYZUv9aG9b1TV0bQ markerProc) {
	{
		if (!(globalMarkersLen_hgEFy3UCOBoalBh29asu5MA <= ((NI) 7000))) goto LA3_;
		globalMarkers_5ghwSgpo9cT9bT7YStQDJHVQ[(globalMarkersLen_hgEFy3UCOBoalBh29asu5MA)- 0] = markerProc;
		globalMarkersLen_hgEFy3UCOBoalBh29asu5MA += ((NI) 1);
	}
	goto LA1_;
	LA3_: ;
	{
		printf("%s\012", ((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_5)? (((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_5))->data:"nil");
		fflush(stdout);
		exit(((NI) 1));
	}
	LA1_: ;
}

N_NOINLINE(NI, stackSize_61foY5fGmU9c2fC9c6wRIsrA)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack) {
	NI result;
	void* volatile pos;
	result = (NI)0;
	pos = (void*)0;
	pos = ((void*) ((&pos)));
	{
		if (!!((pos == NIM_NIL))) goto LA3_;
		result = (NI)((NU64)(((NI) ((*stack).bottom))) - (NU64)(((NI) (pos))));
	}
	goto LA1_;
	LA3_: ;
	{
		result = ((NI) 0);
	}
	LA1_: ;
	return result;
}

N_NOINLINE(NI, stackSize_IV9bgfYkinlae0WZ2NZi5JA)(void) {
	NI result;
	result = (NI)0;
	{
		tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack;
		NI T2_;
		stack = (tyObject_GcStack_7fytPA5bBsob6See21YMRA*)0;
		stack = (&gch_IcYaEuuWivYAS86vFMTS3Q.stack);
		T2_ = (NI)0;
		T2_ = stackSize_61foY5fGmU9c2fC9c6wRIsrA(stack);
		result = (NI)(result + T2_);
	}
	return result;
}

static N_INLINE(NI, getOccupiedMem_61WxanWSOmDDV2uI7O10dQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a) {
	NI result;
	result = (NI)0;
	result = (NI)((*a).currMem - (*a).freeMem);
	return result;
}

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

N_NIMCALL(NI, highGauge_3mwQtFaBTgevFrybZdgUNw_2)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* n) {
	NI result;
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* it;
	result = (NI)0;
	result = ((NI) -1);
	it = n;
	{
		while (1) {
			if (!!(((*it).link[(((NI) 0))- 0] == it))) goto LA2;
			result = (*it).upperBound;
			it = (*it).link[(((NI) 1))- 0];
		} LA2: ;
	}
	return result;
}

static N_INLINE(void, prepareForInteriorPointerChecking_Zqr3EQAAcehIfp3uSECEuQsystem)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a) {
	(*a).minLargeObj = lowGauge_3mwQtFaBTgevFrybZdgUNw((*a).root);
	(*a).maxLargeObj = highGauge_3mwQtFaBTgevFrybZdgUNw_2((*a).root);
}

N_NIMCALL(void, setPosition_kuKlONPws1O0vpPB9adzcQw)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack, void* position) {
}

N_NIMCALL(tyObject_GcStack_7fytPA5bBsob6See21YMRA*, getActiveStack_2XtoPjgvlHPkHLitAW2flw)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	tyObject_GcStack_7fytPA5bBsob6See21YMRA* result;
	result = (tyObject_GcStack_7fytPA5bBsob6See21YMRA*)0;
	result = (&(*gch).stack);
	return result;
}

N_NIMCALL(NIM_BOOL, isActiveStack_deIRQymTVHcVwfHBKDbqEA)(tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*, inRange_Bc4Ua6HOMCIDGx9b15HSY4g)(tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* root, NI key) {
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* result;
	tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* it;
{	result = (tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw*)0;
	it = root;
	{
		while (1) {
			if (!!(((*it).link[(((NI) 0))- 0] == it))) goto LA2;
			{
				NIM_BOOL T5_;
				T5_ = (NIM_BOOL)0;
				T5_ = ((NU64)((*it).key) <= (NU64)(key));
				if (!(T5_)) goto LA6_;
				T5_ = ((NU64)(key) < (NU64)((*it).upperBound));
				LA6_: ;
				if (!T5_) goto LA7_;
				result = it;
				goto BeforeRet_;
			}
			LA7_: ;
			it = (*it).link[(((NU64)((*it).key) < (NU64)(key)))- 0];
		} LA2: ;
	}
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(void*, interiorAllocatedPtr_N7XNyRgfMLnCjS9bVeVc3bA)(tyObject_MemRegion_x81NhDv59b8ercDZ9bi85jyg* a, void* p) {
	void* result;
	result = (void*)0;
	{
		NIM_BOOL T3_;
		tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c;
		T3_ = (NIM_BOOL)0;
		T3_ = isAccessible_5nqar3kL9acJcissrFLDdkwsystem(a, p);
		if (!T3_) goto LA4_;
		c = pageAddr_4uti7hTxTUDxUPqFMgMvHAsystem(p);
		{
			NIM_BOOL T8_;
			T8_ = (NIM_BOOL)0;
			T8_ = chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system(c);
			if (!!(T8_)) goto LA9_;
			{
				NIM_BOOL T13_;
				tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c_2;
				NI offset;
				T13_ = (NIM_BOOL)0;
				T13_ = isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem(c);
				if (!T13_) goto LA14_;
				c_2 = ((tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*) (c));
				offset = (NI)((NU64)(((NI) ((NI)(((NI) (p)) & ((NI) 4095))))) - (NU64)((NI)(((NI)sizeof(tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ)) - ((NI) 8))));
				{
					tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ* d;
					if (!((NU64)(offset) < (NU64)((*c_2).acc))) goto LA18_;
					d = ((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) ((NI)((NU64)((NI)((NU64)(((NI) ((&(*c_2).data)))) + (NU64)(offset))) - (NU64)((NI)((NU64)(offset) % (NU64)((*c_2).Sup.size))))));
					{
						if (!((NU64)(((NI) 1)) < (NU64)((*d).zeroField))) goto LA22_;
						result = ((void*) (d));
					}
					LA22_: ;
				}
				LA18_: ;
			}
			goto LA11_;
			LA14_: ;
			{
				tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_3;
				NF* d_2;
				c_3 = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (c));
				d_2 = (&(*c_3).data);
				{
					NIM_BOOL T27_;
					T27_ = (NIM_BOOL)0;
					T27_ = (((void*) (d_2)) <= p);
					if (!(T27_)) goto LA28_;
					T27_ = ((NU64)(((NI) 1)) < (NU64)((*((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) (d_2))).zeroField));
					LA28_: ;
					if (!T27_) goto LA29_;
					result = ((void*) (d_2));
				}
				LA29_: ;
			}
			LA11_: ;
		}
		LA9_: ;
	}
	goto LA1_;
	LA4_: ;
	{
		NI q;
		q = ((NI) (p));
		{
			NIM_BOOL T34_;
			tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* avlNode;
			T34_ = (NIM_BOOL)0;
			T34_ = ((NU64)((*a).minLargeObj) <= (NU64)(q));
			if (!(T34_)) goto LA35_;
			T34_ = ((NU64)(q) <= (NU64)((*a).maxLargeObj));
			LA35_: ;
			if (!T34_) goto LA36_;
			avlNode = inRange_Bc4Ua6HOMCIDGx9b15HSY4g((*a).root, q);
			{
				void* k;
				tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_4;
				tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* T42_;
				if (!!((avlNode == NIM_NIL))) goto LA40_;
				k = ((void*) ((*avlNode).key));
				T42_ = (tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*)0;
				T42_ = pageAddr_4uti7hTxTUDxUPqFMgMvHAsystem(k);
				c_4 = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (T42_));
				{
					if (!((NU64)(((NI) 1)) < (NU64)((*((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) (k))).zeroField))) goto LA45_;
					result = k;
				}
				LA45_: ;
			}
			LA40_: ;
		}
		LA36_: ;
	}
	LA1_: ;
	return result;
}

static N_INLINE(void, gcMark_JLiT51Zk6OLnaexGSTHHEQsystem)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, void* p) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell;
	NI c;
	cell = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(p);
	c = ((NI) (cell));
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* objStart;
		void* T5_;
		if (!((NU64)(((NI) 4096)) < (NU64)(c))) goto LA3_;
		T5_ = (void*)0;
		T5_ = interiorAllocatedPtr_N7XNyRgfMLnCjS9bVeVc3bA((&(*gch).region), ((void*) (cell)));
		objStart = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (T5_));
		{
			if (!!((objStart == NIM_NIL))) goto LA8_;
			(*objStart).refcount = (NI)((NU64)((*objStart).refcount) + (NU64)(((NI) 8)));
			add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem((&(*gch).decStack), objStart);
		}
		LA8_: ;
	}
	LA3_: ;
}

CLANG_NO_SANITIZE_ADDRESS void markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	jmp_buf registers;
	tyObject_GcStack_7fytPA5bBsob6See21YMRA* T1_;
	T1_ = (tyObject_GcStack_7fytPA5bBsob6See21YMRA*)0;
	T1_ = getActiveStack_2XtoPjgvlHPkHLitAW2flw(gch);
	setPosition_kuKlONPws1O0vpPB9adzcQw(T1_, ((void*) ((&registers))));
	{
		int T4_;
		T4_ = (int)0;
		T4_ = setjmp(registers);
		if (!(T4_ == ((NI32) 0))) goto LA5_;
		{
			tyObject_GcStack_7fytPA5bBsob6See21YMRA* stack;
			NI max;
			NI sp;
			stack = (tyObject_GcStack_7fytPA5bBsob6See21YMRA*)0;
			stack = (&(*gch).stack);
			max = ((NI) ((*stack).bottom));
			sp = ((NI) ((&registers)));
			{
				NIM_BOOL T10_;
				NI regEnd;
				T10_ = (NIM_BOOL)0;
				T10_ = isActiveStack_deIRQymTVHcVwfHBKDbqEA(stack);
				if (!T10_) goto LA11_;
				regEnd = (NI)((NU64)(sp) + (NU64)(((NI)sizeof(jmp_buf))));
				{
					while (1) {
						if (!((NU64)(sp) < (NU64)(regEnd))) goto LA14;
						gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, (*((void**) (sp))));
						gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, (*((void**) ((NI)((NU64)(sp) + (NU64)(((NI) 4)))))));
						sp = (NI)((NU64)(sp) + (NU64)(((NI) 8)));
					} LA14: ;
				}
			}
			LA11_: ;
			sp = (NI)(sp & ((NI) -8));
			{
				while (1) {
					if (!((NU64)(sp) < (NU64)((NI)(max - ((NI) 64))))) goto LA16;
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 0))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 1))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 2))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 3))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 4))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 5))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 6))- 0]);
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, ((void**) (sp))[(((NI) 7))- 0]);
					sp = (NI)((NU64)(sp) + (NU64)(((NI) 64)));
				} LA16: ;
			}
			{
				while (1) {
					if (!((NU64)(sp) <= (NU64)(max))) goto LA18;
					gcMark_JLiT51Zk6OLnaexGSTHHEQsystem(gch, (*((void**) (sp))));
					sp = (NI)((NU64)(sp) + (NU64)(((NI) 8)));
				} LA18: ;
			}
		}
	}
	LA5_: ;
}

N_NIMCALL(void, prepareDealloc_0Ao1u9cpV0dTuUB5G9cEQ8eQ)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell) {
	TNimType* t;
	t = (*cell).typ;
	{
		void* T5_;
		if (!!(((*t).finalizer == NIM_NIL))) goto LA3_;
		gch_IcYaEuuWivYAS86vFMTS3Q.recGcLock += ((NI) 1);
		T5_ = (void*)0;
		T5_ = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(cell);
		((Finalizer) ((*t).finalizer))(T5_);
		gch_IcYaEuuWivYAS86vFMTS3Q.recGcLock -= ((NI) 1);
	}
	LA3_: ;
}

N_NIMCALL(NIM_BOOL, collectZCT_evVbQ9bNF7LYMhoG9aWXu9bKw)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	NIM_BOOL result;
	NI* L;
	result = (NIM_BOOL)0;
	L = (&(*gch).zct.len);
	{
		while (1) {
			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c;
			if (!(((NI) 0) < (*L))) goto LA2;
			c = (*gch).zct.d[(((NI) 0))- 0];
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			(*gch).zct.d[(((NI) 0))- 0] = (*gch).zct.d[((NI)((*L) - ((NI) 1)))- 0];
			(*L) -= ((NI) 1);
			{
				if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA5_;
				prepareDealloc_0Ao1u9cpV0dTuUB5G9cEQ8eQ(c);
				forAllChildren_yHFnLgI7q81iFxRlb3Iqlw(c, ((tyEnum_WalkOp_Wfy7gT5VQ8B3aJBxqU8D9cQ) 2));
				rawDealloc_DA62HrGC5sdfCED505KyyQ((&(*gch).region), ((void*) (c)));
			}
			LA5_: ;
		} LA2: ;
	}
	result = NIM_TRUE;
	return result;
}

N_NIMCALL(void, deinit_WHgd5C59bkXWDz3vnAxfzXQ_3)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s) {
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* it;
	it = (*s).head;
	{
		while (1) {
			tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* n;
			if (!!((it == NIM_NIL))) goto LA2;
			n = (*it).next;
			dealloc_RCjNtRnHdRYntrcE7YtwWw(((void*) (it)));
			it = n;
		} LA2: ;
	}
	(*s).head = NIM_NIL;
	dealloc_RCjNtRnHdRYntrcE7YtwWw(((void*) ((*s).data)));
	(*s).data = NIM_NIL;
	(*s).counter = ((NI) 0);
}

N_NIMCALL(void, cellsetReset_WHgd5C59bkXWDz3vnAxfzXQ_2)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s) {
	deinit_WHgd5C59bkXWDz3vnAxfzXQ_3(s);
	init_WHgd5C59bkXWDz3vnAxfzXQ(s);
}

N_NIMCALL(void, markGlobals_zoTIuavlrCHyw3B8MBaLJA_4)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (globalMarkersLen_hgEFy3UCOBoalBh29asu5MA - 1);
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				globalMarkers_5ghwSgpo9cT9bT7YStQDJHVQ[(i)- 0]();
				res += ((NI) 1);
			} LA3: ;
		}
	}
	d = (*gch).additionalRoots.d;
	{
		NI i_2;
		NI colontmp__2;
		NI res_2;
		i_2 = (NI)0;
		colontmp__2 = (NI)0;
		colontmp__2 = ((*gch).additionalRoots.len - 1);
		res_2 = ((NI) 0);
		{
			while (1) {
				if (!(res_2 <= colontmp__2)) goto LA6;
				i_2 = res_2;
				markS_NZr5o3Ubzrci4OmK29cHBJA(gch, d[(i_2)- 0]);
				res_2 += ((NI) 1);
			} LA6: ;
		}
	}
}

static N_INLINE(NIM_BOOL, isCell_CkuKXXC4hAqaVj8vwjANDAsystem)(void* p) {
	NIM_BOOL result;
	result = (NIM_BOOL)0;
	result = ((NU64)(((NI) 1)) < (NU64)((*((tyObject_FreeCell_u6M5LHprqzkn9axr04yg9bGQ*) (p))).zeroField));
	return result;
}

N_NIMCALL(NIM_BOOL, contains_9c4TZ2Zl3sU4TUeK9bR8E9ciw)(tyObject_CellSet_jG87P0AI9aZtss9ccTYBIISQ* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* cell) {
	NIM_BOOL result;
	NI u;
	tyObject_PageDesc_fublkgIY4LG3mT51LU2WHg* t;
	result = (NIM_BOOL)0;
	u = ((NI) (cell));
	t = cellSetGet_X4WTfs0wkld8wp8XcE9b8BA(s, (NI)((NU64)(u) >> (NU64)(((NI) 12))));
	{
		if (!!((t == NIM_NIL))) goto LA3_;
		u = ((NI) ((NI)((NU64)(((NI) ((NI)((NU64)(u) % (NU64)(((NI) 4096)))))) / (NU64)(((NI) 8)))));
		result = !(((NI)((*t).bits[((NI)((NU64)(u) >> (NU64)(((NI) 6))))- 0] & (NI)((NU64)(((NI) 1)) << (NU64)(((NI) ((NI)(u & ((NI) 63))))))) == ((NI) 0)));
	}
	goto LA1_;
	LA3_: ;
	{
		result = NIM_FALSE;
	}
	LA1_: ;
	return result;
}

N_NIMCALL(void, freeCyclicCell_NZr5o3Ubzrci4OmK29cHBJA_2)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	prepareDealloc_0Ao1u9cpV0dTuUB5G9cEQ8eQ(c);
	rawDealloc_DA62HrGC5sdfCED505KyyQ((&(*gch).region), ((void*) (c)));
}

N_NIMCALL(void, sweep_zoTIuavlrCHyw3B8MBaLJA_5)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	{
		void* x;
		x = (void*)0;
		(*gch).region.locked = NIM_TRUE;
		{
			NI s;
			tyObject_IntSet_EZObFrE3NC9bIb3YMkY9crZA colontmp_;
			s = (NI)0;
			memset((void*)(&colontmp_), 0, sizeof(colontmp_));
			colontmp_ = (*gch).region.chunkStarts;
			{
				NI h;
				NI res;
				h = (NI)0;
				res = ((NI) 0);
				{
					while (1) {
						tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* r;
						if (!(res <= ((NI) 255))) goto LA5;
						h = ((NI) (res));
						r = colontmp_.data[(h)- 0];
						{
							while (1) {
								NI i;
								if (!!((r == NIM_NIL))) goto LA7;
								i = ((NI) 0);
								{
									while (1) {
										NI w;
										NI j;
										if (!(i <= ((NI) 7))) goto LA9;
										w = (*r).bits[(i)- 0];
										j = ((NI) 0);
										{
											while (1) {
												if (!!((w == ((NI) 0)))) goto LA11;
												{
													if (!!((((NI) ((NI)(w & ((NI) 1)))) == ((NI) 0)))) goto LA14_;
													s = (NI)((NI)((NU64)((*r).key) << (NU64)(((NI) 9))) | (NI)((NU64)((NI)((NU64)(i) << (NU64)(((NI) 6)))) + (NU64)(j)));
													{
														NIM_BOOL T18_;
														tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w* c;
														T18_ = (NIM_BOOL)0;
														T18_ = contains_tGsWrN4DY41H9btt3FhjrNA((&(*gch).region.chunkStarts), s);
														if (!T18_) goto LA19_;
														c = ((tyObject_BaseChunk_Sdq7WpT6qAH858F5ZEdG3w*) ((NI)((NU64)(s) << (NU64)(((NI) 12)))));
														{
															NIM_BOOL T23_;
															T23_ = (NIM_BOOL)0;
															T23_ = chunkUnused_xxNWShoyEPMUVN7FvfpDjw_2system(c);
															if (!!(T23_)) goto LA24_;
															{
																NIM_BOOL T28_;
																tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* c_2;
																NI size;
																NI a;
																NI limit;
																T28_ = (NIM_BOOL)0;
																T28_ = isSmallChunk_xxNWShoyEPMUVN7FvfpDjwsystem(c);
																if (!T28_) goto LA29_;
																c_2 = ((tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ*) (c));
																size = (*c_2).Sup.size;
																a = ((NI) ((&(*c_2).data)));
																limit = (NI)(a + (*c_2).acc);
																{
																	while (1) {
																		if (!((NU64)(a) < (NU64)(limit))) goto LA32;
																		x = ((void*) (a));
																		{
																			NIM_BOOL T35_;
																			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c_3;
																			T35_ = (NIM_BOOL)0;
																			T35_ = isCell_CkuKXXC4hAqaVj8vwjANDAsystem(x);
																			if (!T35_) goto LA36_;
																			c_3 = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (x));
																			{
																				NIM_BOOL T40_;
																				T40_ = (NIM_BOOL)0;
																				T40_ = contains_9c4TZ2Zl3sU4TUeK9bR8E9ciw((&(*gch).marked), c_3);
																				if (!!(T40_)) goto LA41_;
																				freeCyclicCell_NZr5o3Ubzrci4OmK29cHBJA_2(gch, c_3);
																			}
																			LA41_: ;
																		}
																		LA36_: ;
																		a = (NI)((NU64)(a) + (NU64)(size));
																	} LA32: ;
																}
															}
															goto LA26_;
															LA29_: ;
															{
																tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg* c_4;
																c_4 = ((tyObject_BigChunk_Rv9c70Uhp2TytkX7eH78qEg*) (c));
																x = ((void*) ((&(*c_4).data)));
																{
																	NIM_BOOL T46_;
																	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c_5;
																	T46_ = (NIM_BOOL)0;
																	T46_ = isCell_CkuKXXC4hAqaVj8vwjANDAsystem(x);
																	if (!T46_) goto LA47_;
																	c_5 = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (x));
																	{
																		NIM_BOOL T51_;
																		T51_ = (NIM_BOOL)0;
																		T51_ = contains_9c4TZ2Zl3sU4TUeK9bR8E9ciw((&(*gch).marked), c_5);
																		if (!!(T51_)) goto LA52_;
																		freeCyclicCell_NZr5o3Ubzrci4OmK29cHBJA_2(gch, c_5);
																	}
																	LA52_: ;
																}
																LA47_: ;
															}
															LA26_: ;
														}
														LA24_: ;
													}
													LA19_: ;
												}
												LA14_: ;
												j += ((NI) 1);
												w = (NI)((NU64)(w) >> (NU64)(((NI) 1)));
											} LA11: ;
										}
										i += ((NI) 1);
									} LA9: ;
								}
								r = (*r).next;
							} LA7: ;
						}
						res += ((NI) 1);
					} LA5: ;
				}
			}
		}
		(*gch).region.locked = NIM_FALSE;
	}
}

N_NIMCALL(void, collectCycles_zoTIuavlrCHyw3B8MBaLJA_3)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
	{
		while (1) {
			NIM_BOOL T3_;
			if (!(((NI) 0) < (*gch).zct.len)) goto LA2;
			T3_ = (NIM_BOOL)0;
			T3_ = collectZCT_evVbQ9bNF7LYMhoG9aWXu9bKw(gch);
			T3_;
		} LA2: ;
	}
	cellsetReset_WHgd5C59bkXWDz3vnAxfzXQ_2((&(*gch).marked));
	d = (*gch).decStack.d;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((*gch).decStack.len - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA6;
				i = res;
				markS_NZr5o3Ubzrci4OmK29cHBJA(gch, d[(i)- 0]);
				res += ((NI) 1);
			} LA6: ;
		}
	}
	markGlobals_zoTIuavlrCHyw3B8MBaLJA_4(gch);
	sweep_zoTIuavlrCHyw3B8MBaLJA_5(gch);
}

N_NIMCALL(NI, getTotalMem_9bFvoxSITMVCg7RY8KIar1Q_2)(void) {
	NI result;
{	result = (NI)0;
	result = gch_IcYaEuuWivYAS86vFMTS3Q.region.currMem;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(NI, getFreeMem_9bFvoxSITMVCg7RY8KIar1Q_3)(void) {
	NI result;
	result = (NI)0;
	result = gch_IcYaEuuWivYAS86vFMTS3Q.region.freeMem;
	return result;
}

N_NIMCALL(NI, getOccupiedMem_9bFvoxSITMVCg7RY8KIar1Q)(void) {
	NI result;
	NI T1_;
	NI T2_;
{	result = (NI)0;
	T1_ = (NI)0;
	T1_ = getTotalMem_9bFvoxSITMVCg7RY8KIar1Q_2();
	T2_ = (NI)0;
	T2_ = getFreeMem_9bFvoxSITMVCg7RY8KIar1Q_3();
	result = (NI)(T1_ - T2_);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(void, unmarkStackAndRegisters_zoTIuavlrCHyw3B8MBaLJA_6)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
	d = (*gch).decStack.d;
	{
		NI i;
		NI colontmp_;
		NI res;
		i = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((*gch).decStack.len - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= colontmp_)) goto LA3;
				i = res;
				decRef_MV4BBk6J1qu70IbBxwEn4wsystem(d[(i)- 0]);
				res += ((NI) 1);
			} LA3: ;
		}
	}
	(*gch).decStack.len = ((NI) 0);
}

N_NIMCALL(void, collectCTBody_zoTIuavlrCHyw3B8MBaLJA_2)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	NI T1_;
	T1_ = (NI)0;
	T1_ = stackSize_IV9bgfYkinlae0WZ2NZi5JA();
	(*gch).stat.maxStackSize = (((*gch).stat.maxStackSize >= T1_) ? (*gch).stat.maxStackSize : T1_);
	prepareForInteriorPointerChecking_Zqr3EQAAcehIfp3uSECEuQsystem((&(*gch).region));
	markStackAndRegisters_LdwvBL9bC9c0lik7K9bau9bX0Q(gch);
	(*gch).stat.maxStackCells = (((*gch).stat.maxStackCells >= (*gch).decStack.len) ? (*gch).stat.maxStackCells : (*gch).decStack.len);
	(*gch).stat.stackScans += ((NI) 1);
	{
		NIM_BOOL T4_;
		T4_ = (NIM_BOOL)0;
		T4_ = collectZCT_evVbQ9bNF7LYMhoG9aWXu9bKw(gch);
		if (!T4_) goto LA5_;
		{
			NIM_BOOL T9_;
			NI T10_;
			NI T14_;
			T9_ = (NIM_BOOL)0;
			T10_ = (NI)0;
			T10_ = getOccupiedMem_61WxanWSOmDDV2uI7O10dQsystem((&(*gch).region));
			T9_ = ((*gch).cycleThreshold <= T10_);
			if (T9_) goto LA11_;
			T9_ = NIM_FALSE;
			LA11_: ;
			if (!T9_) goto LA12_;
			collectCycles_zoTIuavlrCHyw3B8MBaLJA_3(gch);
			(*gch).stat.cycleCollections += ((NI) 1);
			T14_ = (NI)0;
			T14_ = getOccupiedMem_9bFvoxSITMVCg7RY8KIar1Q();
			(*gch).cycleThreshold = ((((NI) 4194304) >= (NI)(T14_ * ((NI) 2))) ? ((NI) 4194304) : (NI)(T14_ * ((NI) 2)));
			(*gch).stat.maxThreshold = (((*gch).stat.maxThreshold >= (*gch).cycleThreshold) ? (*gch).stat.maxThreshold : (*gch).cycleThreshold);
		}
		LA12_: ;
	}
	LA5_: ;
	unmarkStackAndRegisters_zoTIuavlrCHyw3B8MBaLJA_6(gch);
}

N_NIMCALL(void, collectCT_zoTIuavlrCHyw3B8MBaLJA)(tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	NI stackMarkCosts;
	NI T1_;
	T1_ = (NI)0;
	T1_ = stackSize_IV9bgfYkinlae0WZ2NZi5JA();
	stackMarkCosts = (((NI)(T1_ / ((NI) 128)) >= ((NI) 500)) ? (NI)(T1_ / ((NI) 128)) : ((NI) 500));
	{
		NIM_BOOL T4_;
		NIM_BOOL T5_;
		NIM_BOOL T6_;
		NIM_BOOL T8_;
		NI T10_;
		T4_ = (NIM_BOOL)0;
		T5_ = (NIM_BOOL)0;
		T6_ = (NIM_BOOL)0;
		T6_ = (stackMarkCosts <= (*gch).zct.len);
		if (T6_) goto LA7_;
		T8_ = (NIM_BOOL)0;
		T8_ = NIM_TRUE;
		if (!(T8_)) goto LA9_;
		T10_ = (NI)0;
		T10_ = getOccupiedMem_61WxanWSOmDDV2uI7O10dQsystem((&(*gch).region));
		T8_ = ((*gch).cycleThreshold <= T10_);
		LA9_: ;
		T6_ = T8_;
		LA7_: ;
		T5_ = T6_;
		if (T5_) goto LA11_;
		T5_ = NIM_FALSE;
		LA11_: ;
		T4_ = T5_;
		if (!(T4_)) goto LA12_;
		T4_ = ((*gch).recGcLock == ((NI) 0));
		LA12_: ;
		if (!T4_) goto LA13_;
		collectCTBody_zoTIuavlrCHyw3B8MBaLJA_2(gch);
	}
	LA13_: ;
}

static N_INLINE(void, addNewObjToZCT_Ga5iPZj9bPFJIiW7GQdxs7gsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* res, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	NI L;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
{	L = (*gch).zct.len;
	d = (*gch).zct.d;
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c;
		if (!(((NI) 8) < L)) goto LA3_;
		c = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
		c = d[((NI)(L - ((NI) 1)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA7_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 1)))- 0] = res;
			goto BeforeRet_;
		}
		LA7_: ;
		c = d[((NI)(L - ((NI) 2)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA11_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 2)))- 0] = res;
			goto BeforeRet_;
		}
		LA11_: ;
		c = d[((NI)(L - ((NI) 3)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA15_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 3)))- 0] = res;
			goto BeforeRet_;
		}
		LA15_: ;
		c = d[((NI)(L - ((NI) 4)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA19_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 4)))- 0] = res;
			goto BeforeRet_;
		}
		LA19_: ;
		c = d[((NI)(L - ((NI) 5)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA23_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 5)))- 0] = res;
			goto BeforeRet_;
		}
		LA23_: ;
		c = d[((NI)(L - ((NI) 6)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA27_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 6)))- 0] = res;
			goto BeforeRet_;
		}
		LA27_: ;
		c = d[((NI)(L - ((NI) 7)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA31_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 7)))- 0] = res;
			goto BeforeRet_;
		}
		LA31_: ;
		c = d[((NI)(L - ((NI) 8)))- 0];
		{
			if (!((NU64)(((NI) 8)) <= (NU64)((*c).refcount))) goto LA35_;
			(*c).refcount = (NI)((*c).refcount & ((NI) -5));
			d[((NI)(L - ((NI) 8)))- 0] = res;
			goto BeforeRet_;
		}
		LA35_: ;
		add_Wcf8r6MCjrJeJ3HSYwSp0Qsystem((&(*gch).zct), res);
	}
	goto LA1_;
	LA3_: ;
	{
		d[(L)- 0] = res;
		(*gch).zct.len += ((NI) 1);
	}
	LA1_: ;
	}BeforeRet_: ;
}

N_NIMCALL(void*, rawNewObj_QBPo5VW2O56Eeh8hPbQ7Pg)(TNimType* typ, NI size, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	void* result;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* res;
	void* T1_;
	result = (void*)0;
	collectCT_zoTIuavlrCHyw3B8MBaLJA(gch);
	T1_ = (void*)0;
	T1_ = rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg((&(*gch).region), (NI)(size + ((NI)sizeof(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g))));
	res = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
	(*res).typ = typ;
	(*res).refcount = ((NI) 4);
	addNewObjToZCT_Ga5iPZj9bPFJIiW7GQdxs7gsystem(res, gch);
	result = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(res);
	return result;
}

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

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

N_NIMCALL(NimStringDesc*, toNimStr)(NCSTRING str, NI len) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = rawNewStringNoInit(len);
	(*result).Sup.len = len;
	copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((*result).data)), ((void*) (str)), ((NI) ((NI)(len + ((NI) 1)))));
	return result;
}

N_NIMCALL(NimStringDesc*, cstrToNimstr)(NCSTRING str) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	{
		if (!(((void*) (str)) == NIM_NIL)) goto LA3_;
		result = NIM_NIL;
	}
	goto LA1_;
	LA3_: ;
	{
		result = toNimStr(str, (str ? strlen(str) : 0));
	}
	LA1_: ;
	return result;
}
static N_NIMCALL(void, Marker_tyRef_HX2M9cQhE3jaovp9aYJDdslA)(void* p, NI op) {
	tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ* a;
	a = (tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
	nimGCvisit((void*)(*a).Sup.Sup.up, op);
}

N_NIMCALL(void*, newObj)(TNimType* typ, NI size) {
	void* result;
	result = (void*)0;
	result = rawNewObj_QBPo5VW2O56Eeh8hPbQ7Pg(typ, size, (&gch_IcYaEuuWivYAS86vFMTS3Q));
	zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem(result, ((NI) (size)));
	return result;
}

N_NIMCALL(void*, newObjRC1)(TNimType* typ, NI size) {
	void* result;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* res;
	void* T1_;
	result = (void*)0;
	collectCT_zoTIuavlrCHyw3B8MBaLJA((&gch_IcYaEuuWivYAS86vFMTS3Q));
	T1_ = (void*)0;
	T1_ = rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg((&gch_IcYaEuuWivYAS86vFMTS3Q.region), (NI)(size + ((NI)sizeof(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g))));
	res = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
	(*res).typ = typ;
	(*res).refcount = ((NI) 8);
	result = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(res);
	zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem(result, ((NI) (size)));
	return result;
}

N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	{
		NI s;
		void* T9_;
		if (!!((src == NIM_NIL))) goto LA3_;
		s = (*src).Sup.len;
		{
			if (!(s < ((NI) 7))) goto LA7_;
			s = ((NI) 7);
		}
		LA7_: ;
		T9_ = (void*)0;
		T9_ = newObjRC1((&strDesc_D0UzA4zsDu5tgpJQ9a9clXPg), (NI)((NI)(((NI)sizeof(TGenericSeq)) + s) + ((NI) 1)));
		result = ((NimStringDesc*) (T9_));
		(*result).Sup.reserved = s;
		(*result).Sup.len = (*src).Sup.len;
		copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((*result).data)), ((void*) ((*src).data)), ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
	}
	LA3_: ;
	return result;
}

static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c;
	c = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(p);
	{
		(*c).refcount -= ((NI) 8);
		if (!((NU64)((*c).refcount) < (NU64)(((NI) 8)))) goto LA3_;
		rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system(c);
	}
	LA3_: ;
}

static N_INLINE(void, incRef_9cAA5YuQAAC3MVbnGeV86swsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c) {
	(*c).refcount = (NI)((NU64)((*c).refcount) + (NU64)(((NI) 8)));
}

static N_INLINE(void, asgnRef)(void** dest, void* src) {
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T5_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T5_ = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(src);
		incRef_9cAA5YuQAAC3MVbnGeV86swsystem(T5_);
	}
	LA3_: ;
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T10_;
		if (!!(((*dest) == NIM_NIL))) goto LA8_;
		T10_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
		T10_ = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem((*dest));
		decRef_MV4BBk6J1qu70IbBxwEn4wsystem(T10_);
	}
	LA8_: ;
	(*dest) = src;
}

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

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

static N_INLINE(NIM_BOOL, isObjWithCache)(TNimType* obj, TNimType* subclass, TNimType** cache) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		if (!(obj == subclass)) goto LA3_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!((*obj).base == subclass)) goto LA7_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
	LA7_: ;
	{
		if (!(cache[(((NI) 0))- 0] == obj)) goto LA11_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA11_: ;
	{
		if (!(cache[(((NI) 1))- 0] == obj)) goto LA15_;
		result = NIM_TRUE;
		goto BeforeRet_;
	}
	LA15_: ;
	result = isObjSlowPath_k9bdq9bQE075AR7scLFt5wIg(obj, subclass, cache);
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}

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

N_NIMCALL(void, raiseExceptionAux_L880PIUOf9bVlJWqarG4H9cw)(Exception* e) {
{	{
		if (!!((localRaiseHook_EIvMhANBvB9cp2Ezvt29cADg == NIM_NIL))) goto LA3_;
		{
			NIM_BOOL T7_;
			T7_ = (NIM_BOOL)0;
			T7_ = localRaiseHook_EIvMhANBvB9cp2Ezvt29cADg(e);
			if (!!(T7_)) goto LA8_;
			goto BeforeRet_;
		}
		LA8_: ;
	}
	LA3_: ;
	{
		if (!!((globalRaiseHook_JbO1ti4ULxrw54m4zNPbpA == NIM_NIL))) goto LA12_;
		{
			NIM_BOOL T16_;
			T16_ = (NIM_BOOL)0;
			T16_ = globalRaiseHook_JbO1ti4ULxrw54m4zNPbpA(e);
			if (!!(T16_)) goto LA17_;
			goto BeforeRet_;
		}
		LA17_: ;
	}
	LA12_: ;
	{
		if (!!((excHandler_rqLlY5bs9atDw2OXYqJEn5g == NIM_NIL))) goto LA21_;
		{
			NIM_BOOL T25_;
			T25_ = (NIM_BOOL)0;
			T25_ = !((*excHandler_rqLlY5bs9atDw2OXYqJEn5g).hasRaiseAction);
			if (T25_) goto LA26_;
			T25_ = (*excHandler_rqLlY5bs9atDw2OXYqJEn5g).raiseAction.ClE_0? (*excHandler_rqLlY5bs9atDw2OXYqJEn5g).raiseAction.ClP_0(e, (*excHandler_rqLlY5bs9atDw2OXYqJEn5g).raiseAction.ClE_0):((TM_Q5wkpxktOdTGvlSRo9bzt9aw_6)((*excHandler_rqLlY5bs9atDw2OXYqJEn5g).raiseAction.ClP_0))(e);
			LA26_: ;
			if (!T25_) goto LA27_;
			pushCurrentException(e);
			longjmp((*excHandler_rqLlY5bs9atDw2OXYqJEn5g).context, ((int) 1));
		}
		LA27_: ;
	}
	goto LA19_;
	LA21_: ;
	{
		if (!(isObjWithCache((*e).Sup.m_type, (&NTI_NrupLB36t9bV7iFDHtrF69aw_), Nim_OfCheck_CACHE8))) goto LA30_;
		showErrorMessage_rsUJ87b89bH0GlWKYL9c8wUQ((*e).name);
		quitOrDebug_IZ2oOmqdsYQ7vixQGKSDcA_2system();
	}
	goto LA19_;
	LA30_: ;
	{
		tyArray_gpc2RrLEcWgv7ONpLYNHOw buf;
		NI L;
		memset((void*)buf, 0, sizeof(buf));
		L = ((NI) 0);
		{
			if (!((NI)(L + ((NI) 28)) < ((NI) 2000))) goto LA35_;
			copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((&buf[(L)- 0]))), "Error: unhandled exception: ", ((NI) 28));
			L += ((NI) 28);
		}
		LA35_: ;
		{
			if (!!(((*e).message == 0))) goto LA39_;
			{
				if (!((NI)(L + ((*e).message ? (*e).message->Sup.len : 0)) < ((NI) 2000))) goto LA43_;
				copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((&buf[(L)- 0]))), ((void*) ((*e).message->data)), ((NI) (((*e).message ? (*e).message->Sup.len : 0))));
				L += ((*e).message ? (*e).message->Sup.len : 0);
			}
			LA43_: ;
		}
		LA39_: ;
		{
			if (!((NI)(L + ((NI) 2)) < ((NI) 2000))) goto LA47_;
			copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((&buf[(L)- 0]))), " [", ((NI) 2));
			L += ((NI) 2);
		}
		LA47_: ;
		{
			if (!((NI)(L + ((*e).name ? strlen((*e).name) : 0)) < ((NI) 2000))) goto LA51_;
			copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((&buf[(L)- 0]))), ((void*) ((*e).name)), ((NI) (((*e).name ? strlen((*e).name) : 0))));
			L += ((*e).name ? strlen((*e).name) : 0);
		}
		LA51_: ;
		{
			if (!((NI)(L + ((NI) 2)) < ((NI) 2000))) goto LA55_;
			copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) ((&buf[(L)- 0]))), "]\012", ((NI) 2));
			L += ((NI) 2);
		}
		LA55_: ;
		{
			NimStringDesc* T61_;
			if (!!((onUnhandledException_bFrawQlTKZhLweDD36j9b8g == NIM_NIL))) goto LA59_;
			T61_ = (NimStringDesc*)0;
			T61_ = cstrToNimstr(((NCSTRING) (buf)));
			onUnhandledException_bFrawQlTKZhLweDD36j9b8g(T61_);
		}
		goto LA57_;
		LA59_: ;
		{
			showErrorMessage_rsUJ87b89bH0GlWKYL9c8wUQ(((NCSTRING) (buf)));
			quitOrDebug_IZ2oOmqdsYQ7vixQGKSDcA_2system();
		}
		LA57_: ;
	}
	LA19_: ;
	}BeforeRet_: ;
}

N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename) {
	{
		if (!((*e).name == 0)) goto LA3_;
		(*e).name = ename;
	}
	LA3_: ;
	raiseExceptionAux_L880PIUOf9bVlJWqarG4H9cw(e);
}

static N_INLINE(void, sysFatal_orK8PicRB9bj8BG69bF8HQbwsystem)(NimStringDesc* message) {
	tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ* e;
	NimStringDesc* T1_;
	e = (tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ*)0;
	e = (tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ*) newObj((&NTI_HX2M9cQhE3jaovp9aYJDdslA_), sizeof(tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ));
	(*e).Sup.Sup.Sup.m_type = (&NTI_9czoZw3pzPyrBmb5zTHY1OQ_);
	T1_ = (NimStringDesc*)0;
	T1_ = (*e).Sup.Sup.message; (*e).Sup.Sup.message = copyStringRC1(message);
	if (T1_) nimGCunrefNoCycle(T1_);
	raiseException((Exception*)e, "IOError");
}

N_NOINLINE(void, raiseEIO_PpfSiTIeNpMAb9a5o6SglJw)(NimStringDesc* msg) {
	sysFatal_orK8PicRB9bj8BG69bF8HQbwsystem(msg);
}

N_NIMCALL(void, checkErr_BWnr8V7RERYno9bIdPmw8Hw)(FILE* f) {
	{
		int T3_;
		T3_ = (int)0;
		T3_ = ferror(f);
		if (!!((T3_ == ((NI32) 0)))) goto LA4_;
		clearerr(f);
		raiseEIO_PpfSiTIeNpMAb9a5o6SglJw(((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_8));
	}
	LA4_: ;
}

N_NIMCALL(void, write_ADGLlEJAOtGNWWur8rrJfg)(FILE* f, NCSTRING c) {
	int T1_;
	T1_ = (int)0;
	T1_ = fputs(c, f);
	T1_;
	checkErr_BWnr8V7RERYno9bIdPmw8Hw(f);
}

N_NIMCALL(void, writeToStdErr_7HRVfGfZT2rSmBdcLxl8TA)(NCSTRING msg) {
	write_ADGLlEJAOtGNWWur8rrJfg(stderr, msg);
}

N_NIMCALL(void, showErrorMessage_rsUJ87b89bH0GlWKYL9c8wUQ)(NCSTRING data) {
	{
		NimStringDesc* T5_;
		if (!!((errorMessageWriter_ZXnv0JyrWe3HTd07wpSr7A == NIM_NIL))) goto LA3_;
		T5_ = (NimStringDesc*)0;
		T5_ = cstrToNimstr(data);
		errorMessageWriter_ZXnv0JyrWe3HTd07wpSr7A(T5_);
	}
	goto LA1_;
	LA3_: ;
	{
		writeToStdErr_7HRVfGfZT2rSmBdcLxl8TA(data);
	}
	LA1_: ;
}

N_NOCONV(void, signalHandler)(int sign) {
	NCSTRING msg;
	msg = (NCSTRING)0;
	{
		if (!(sign == ((int) 2))) goto LA3_;
		msg = "SIGINT: Interrupted by Ctrl-C.\012";
	}
	goto LA1_;
	LA3_: ;
	{
		if (!(sign == ((int) 11))) goto LA6_;
		msg = "SIGSEGV: Illegal storage access. (Attempt to read from nil\?)\012";
	}
	goto LA1_;
	LA6_: ;
	{
		if (!(sign == ((int) 6))) goto LA9_;
		msg = "SIGABRT: Abnormal termination.\012";
	}
	goto LA1_;
	LA9_: ;
	{
		if (!(sign == ((int) 8))) goto LA12_;
		msg = "SIGFPE: Arithmetic error.\012";
	}
	goto LA1_;
	LA12_: ;
	{
		if (!(sign == ((int) 4))) goto LA15_;
		msg = "SIGILL: Illegal operation.\012";
	}
	goto LA1_;
	LA15_: ;
	{
		if (!(sign == ((int) 11))) goto LA18_;
		msg = "SIGBUS: Illegal storage access. (Attempt to read from nil\?)\012";
	}
	goto LA1_;
	LA18_: ;
	{
		{
			{
				if (!(sign == ((int) 13))) goto LA24_;
				msg = "SIGPIPE: Pipe closed.\012";
				goto LA21;
			}
			LA24_: ;
			msg = "unknown signal\012";
		} LA21: ;
	}
	LA1_: ;
	showErrorMessage_rsUJ87b89bH0GlWKYL9c8wUQ(msg);
	exit(((NI) 1));
}

N_NIMCALL(void, registerSignalHandler_njssp69aa7hvxte9bJ8uuDcg_2)(void) {
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T1_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T2_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T3_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T4_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T5_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T6_;
	tyProc_lfH2drpqP9aSEAAjWgrYv8Q T7_;
	T1_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T1_ = signal(((int) 2), signalHandler);
	T2_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T2_ = signal(((int) 11), signalHandler);
	T3_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T3_ = signal(((int) 6), signalHandler);
	T4_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T4_ = signal(((int) 8), signalHandler);
	T5_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T5_ = signal(((int) 4), signalHandler);
	T6_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T6_ = signal(((int) 11), signalHandler);
	T7_ = (tyProc_lfH2drpqP9aSEAAjWgrYv8Q)0;
	T7_ = signal(((int) 13), signalHandler);
}

N_NIMCALL(NI, getRefcount)(void* p) {
	NI result;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T1_;
	result = (NI)0;
	T1_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
	T1_ = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(p);
	result = (NI)((NU64)((*T1_).refcount) >> (NU64)(((NI) 3)));
	return result;
}
static N_NIMCALL(void, Marker_tyRef_6woiEp3hwhYMr1p5tjkZvA)(void* p, NI op) {
	tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q* a;
	a = (tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*)p;
	nimGCvisit((void*)(*a).Sup.Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.Sup.message, op);
	nimGCvisit((void*)(*a).Sup.Sup.trace, op);
	nimGCvisit((void*)(*a).Sup.Sup.up, op);
}

static N_INLINE(void, sysFatal_cjY6dGD4PiJNY9cmtw6Ay8Qsystem)(NimStringDesc* message) {
	tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q* e;
	NimStringDesc* T1_;
	e = (tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*)0;
	e = (tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*) newObj((&NTI_6woiEp3hwhYMr1p5tjkZvA_), sizeof(tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q));
	(*e).Sup.Sup.Sup.m_type = (&NTI_I3Jtn27626sFBOls6BBQ2Q_);
	T1_ = (NimStringDesc*)0;
	T1_ = (*e).Sup.Sup.message; (*e).Sup.Sup.message = copyStringRC1(message);
	if (T1_) nimGCunrefNoCycle(T1_);
	raiseException((Exception*)e, "OverflowError");
}

N_NOINLINE(void, raiseOverflow)(void) {
	sysFatal_cjY6dGD4PiJNY9cmtw6Ay8Qsystem(((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_9));
}

N_NIMCALL(NI64, mulInt64)(NI64 a, NI64 b) {
	NI64 result;
	NF resAsFloat;
	NF floatProd;
{	result = (NI64)0;
	resAsFloat = (NF)0;
	floatProd = (NF)0;
	result = (NI64)((NU64)(a) * (NU64)(b));
	floatProd = ((double) (a));
	floatProd = ((NF)(floatProd) * (NF)(((double) (b))));
	resAsFloat = ((double) (result));
	{
		if (!(resAsFloat == floatProd)) goto LA3_;
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!(((NF)(3.2000000000000000e+001) * (NF)((((NF)(resAsFloat) - (NF)(floatProd)) < 0? -(((NF)(resAsFloat) - (NF)(floatProd))) : (((NF)(resAsFloat) - (NF)(floatProd)))))) <= (floatProd < 0? -(floatProd) : (floatProd)))) goto LA7_;
		goto BeforeRet_;
	}
	LA7_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}
static N_NIMCALL(void, Marker_tyRef_yCEN9anxCD6mzBxGjuaRBdg)(void* p, NI op) {
	tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA* a;
	a = (tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA*)p;
	nimGCvisit((void*)(*a).Sup.parent, op);
	nimGCvisit((void*)(*a).Sup.message, op);
	nimGCvisit((void*)(*a).Sup.trace, op);
	nimGCvisit((void*)(*a).Sup.up, op);
}

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

N_NOINLINE(NIM_BOOL, isOnStack_dJJW59cIgsBmT59aZrOM71Mg)(void* p) {
	NIM_BOOL result;
	void* volatile stackTop;
	NI a;
	tyObject_GcStack_7fytPA5bBsob6See21YMRA* T1_;
	NI b;
	NI T2_;
	NI x;
	NIM_BOOL T3_;
	result = (NIM_BOOL)0;
	stackTop = (void*)0;
	stackTop = ((void*) ((&stackTop)));
	T1_ = (tyObject_GcStack_7fytPA5bBsob6See21YMRA*)0;
	T1_ = getActiveStack_2XtoPjgvlHPkHLitAW2flw((&gch_IcYaEuuWivYAS86vFMTS3Q));
	a = ((NI) ((*T1_).bottom));
	b = ((NI) (stackTop));
	T2_ = (NI)0;
	T2_ = a;
	a = b;
	b = T2_;
	x = ((NI) (p));
	T3_ = (NIM_BOOL)0;
	T3_ = ((NU64)(a) <= (NU64)(x));
	if (!(T3_)) goto LA4_;
	T3_ = ((NU64)(x) <= (NU64)(b));
	LA4_: ;
	result = T3_;
	return result;
}

N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src) {
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = isOnStack_dJJW59cIgsBmT59aZrOM71Mg(((void*) (dest)));
		if (!!(T3_)) goto LA4_;
		{
			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T10_;
			if (!!((src == NIM_NIL))) goto LA8_;
			T10_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
			T10_ = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(src);
			incRef_9cAA5YuQAAC3MVbnGeV86swsystem(T10_);
		}
		LA8_: ;
		{
			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* T15_;
			if (!((NU64)(((NI) 4096)) <= (NU64)(((NI) ((*dest)))))) goto LA13_;
			T15_ = (tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*)0;
			T15_ = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem((*dest));
			decRef_MV4BBk6J1qu70IbBxwEn4wsystem(T15_);
		}
		LA13_: ;
	}
	goto LA1_;
	LA4_: ;
	{
	}
	LA1_: ;
	(*dest) = src;
}

static N_INLINE(NI, resize_bzF9a0JivP3Z4njqaxuLc5wsystem)(NI old) {
	NI result;
	result = (NI)0;
	{
		if (!(old <= ((NI) 0))) goto LA3_;
		result = ((NI) 4);
	}
	goto LA1_;
	LA3_: ;
	{
		if (!(old < ((NI) 65536))) goto LA6_;
		result = (NI)(old * ((NI) 2));
	}
	goto LA1_;
	LA6_: ;
	{
		result = (NI)((NI)(old * ((NI) 3)) / ((NI) 2));
	}
	LA1_: ;
	return result;
}

N_NIMCALL(void*, growObj_FZeyQYjWPcE9c06y1gNqZxw)(void* old, NI newsize, tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ* gch) {
	void* result;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* ol;
	tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* res;
	void* T1_;
	NI elemSize;
	NI oldsize;
	result = (void*)0;
	collectCT_zoTIuavlrCHyw3B8MBaLJA(gch);
	ol = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(old);
	T1_ = (void*)0;
	T1_ = rawAlloc_yn9c8RLaS8vgVBeMBfmkdUg((&(*gch).region), (NI)(newsize + ((NI)sizeof(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g))));
	res = ((tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
	elemSize = ((NI) 1);
	{
		if (!!(((*(*ol).typ).kind == ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 28)))) goto LA4_;
		elemSize = (*(*(*ol).typ).base).size;
	}
	LA4_: ;
	oldsize = (NI)((NI)((*((TGenericSeq*) (old))).len * elemSize) + ((NI) 16));
	copyMem_E1xtACub5WcDa3vbrIXbwgsystem(((void*) (res)), ((void*) (ol)), ((NI) ((NI)(oldsize + ((NI)sizeof(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g))))));
	zeroMem_t0o5XqKanO5QJfXMGEzp2Asystem(((void*) ((NI)((NU64)((NI)((NU64)(((NI) (res))) + (NU64)(oldsize))) + (NU64)(((NI)sizeof(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g)))))), ((NI) ((NI)(newsize - oldsize))));
	{
		if (!((NU64)((NI)((NU64)((*ol).refcount) >> (NU64)(((NI) 3)))) <= (NU64)(((NI) 1)))) goto LA8_;
		{
			NI j;
			tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g** d;
			if (!!(((NI)((*ol).refcount & ((NI) 4)) == ((NI) 0)))) goto LA12_;
			j = (NI)((*gch).zct.len - ((NI) 1));
			d = (*gch).zct.d;
			{
				while (1) {
					if (!(((NI) 0) <= j)) goto LA15;
					{
						if (!(d[(j)- 0] == ol)) goto LA18_;
						d[(j)- 0] = res;
						goto LA14;
					}
					LA18_: ;
					j -= ((NI) 1);
				} LA15: ;
			} LA14: ;
		}
		LA12_: ;
		rawDealloc_DA62HrGC5sdfCED505KyyQ((&(*gch).region), ((void*) (ol)));
	}
	goto LA6_;
	LA8_: ;
	{
		(*res).refcount = ((NI) 8);
		decRef_MV4BBk6J1qu70IbBxwEn4wsystem(ol);
	}
	LA6_: ;
	result = cellToUsr_vA0UG8JLZvpzP1Xf3vkPgwsystem(res);
	return result;
}

N_NIMCALL(void*, growObj_AVYny8c0GTk28gxjmat1MA)(void* old, NI newsize) {
	void* result;
	result = (void*)0;
	result = growObj_FZeyQYjWPcE9c06y1gNqZxw(old, newsize, (&gch_IcYaEuuWivYAS86vFMTS3Q));
	return result;
}

N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	{
		if (!((NI)((*dest).Sup.len + addlen) <= (NI)((*dest).Sup.reserved & ((NI) IL64(9223372036854775807))))) goto LA3_;
		result = dest;
	}
	goto LA1_;
	LA3_: ;
	{
		NI sp;
		NI T6_;
		void* T7_;
		T6_ = (NI)0;
		T6_ = resize_bzF9a0JivP3Z4njqaxuLc5wsystem((NI)((*dest).Sup.reserved & ((NI) IL64(9223372036854775807))));
		sp = ((T6_ >= (NI)((*dest).Sup.len + addlen)) ? T6_ : (NI)((*dest).Sup.len + addlen));
		T7_ = (void*)0;
		T7_ = growObj_AVYny8c0GTk28gxjmat1MA(((void*) (dest)), (NI)((NI)(((NI)sizeof(TGenericSeq)) + sp) + ((NI) 1)));
		result = ((NimStringDesc*) (T7_));
		(*result).Sup.reserved = sp;
	}
	LA1_: ;
	return result;
}

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

N_NIMCALL(NIM_BOOL, readLine_sO1bQXVRA6RP9cdYJXNKeSw)(FILE* f, NimStringDesc** line) {
	NIM_BOOL result;
	NI pos;
	int sp;
{	result = (NIM_BOOL)0;
	pos = ((NI) 0);
	sp = ((int) 80);
	{
		if (!((*line) == 0)) goto LA3_;
		unsureAsgnRef((void**) (&(*line)), rawNewString(((NI) 80)));
	}
	goto LA1_;
	LA3_: ;
	{
		sp = ((int) ((NI)((*((TGenericSeq*) ((*line)))).reserved & ((NI) IL64(9223372036854775807)))));
		(*line) = setLengthStr((*line), ((NI) (sp)));
	}
	LA1_: ;
	{
		while (1) {
			void* T8_;
			NIM_BOOL fgetsSuccess;
			NCSTRING T9_;
			void* m;
			T8_ = (void*)0;
			T8_ = memset(((void*) ((&(*line)->data[pos]))), ((int) 10), ((size_t) (sp)));
			T9_ = (NCSTRING)0;
			T9_ = fgets(((NCSTRING) ((&(*line)->data[pos]))), sp, f);
			fgetsSuccess = !((((void*) (T9_)) == NIM_NIL));
			{
				if (!!(fgetsSuccess)) goto LA12_;
				checkErr_BWnr8V7RERYno9bIdPmw8Hw(f);
			}
			LA12_: ;
			m = memchr(((void*) ((&(*line)->data[pos]))), ((int) 10), ((size_t) (sp)));
			{
				NI last;
				if (!!((m == NIM_NIL))) goto LA16_;
				last = (NI)(((NI) (m)) - ((NI) ((&(*line)->data[((NI) 0)]))));
				{
					NIM_BOOL T20_;
					T20_ = (NIM_BOOL)0;
					T20_ = (((NI) 0) < last);
					if (!(T20_)) goto LA21_;
					T20_ = ((NU8)((*line)->data[(NI)(last - ((NI) 1))]) == (NU8)(13));
					LA21_: ;
					if (!T20_) goto LA22_;
					(*line) = setLengthStr((*line), ((NI) ((NI)(last - ((NI) 1)))));
					result = fgetsSuccess;
					goto BeforeRet_;
				}
				goto LA18_;
				LA22_: ;
				{
					NIM_BOOL T25_;
					T25_ = (NIM_BOOL)0;
					T25_ = (((NI) 0) < last);
					if (!(T25_)) goto LA26_;
					T25_ = ((NU8)((*line)->data[(NI)(last - ((NI) 1))]) == (NU8)(0));
					LA26_: ;
					if (!T25_) goto LA27_;
					{
						NIM_BOOL T31_;
						T31_ = (NIM_BOOL)0;
						T31_ = (last < (NI)((NI)(pos + ((NI) (sp))) - ((NI) 1)));
						if (!(T31_)) goto LA32_;
						T31_ = !(((NU8)((*line)->data[(NI)(last + ((NI) 1))]) == (NU8)(0)));
						LA32_: ;
						if (!T31_) goto LA33_;
						last -= ((NI) 1);
					}
					LA33_: ;
				}
				goto LA18_;
				LA27_: ;
				LA18_: ;
				(*line) = setLengthStr((*line), ((NI) (last)));
				result = fgetsSuccess;
				goto BeforeRet_;
			}
			goto LA14_;
			LA16_: ;
			{
				sp -= ((NI) 1);
			}
			LA14_: ;
			pos += ((NI) (sp));
			sp = ((int) 128);
			(*line) = setLengthStr((*line), ((NI) ((NI)(pos + ((NI) (sp))))));
		}
	}
	}BeforeRet_: ;
	return result;
}
static N_NIMCALL(void, Marker_tyRef_e7vzYS7Z29amCrBOEA9aYFbQ)(void* p, NI op) {
	tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q* a;
	a = (tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q*)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);
	nimGCvisit((void*)(*a).Sup.Sup.Sup.up, op);
}

static N_INLINE(void, sysFatal_3HvfrCYXZqO25G8oEg4MjQsystem)(NimStringDesc* message) {
	tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q* e;
	NimStringDesc* T1_;
	e = (tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q*)0;
	e = (tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q*) newObj((&NTI_e7vzYS7Z29amCrBOEA9aYFbQ_), sizeof(tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q));
	(*e).Sup.Sup.Sup.Sup.m_type = (&NTI_yzVtHjbKd39bygEUDLqI18Q_);
	T1_ = (NimStringDesc*)0;
	T1_ = (*e).Sup.Sup.Sup.message; (*e).Sup.Sup.Sup.message = copyStringRC1(message);
	if (T1_) nimGCunrefNoCycle(T1_);
	raiseException((Exception*)e, "EOFError");
}

N_NOINLINE(void, raiseEOF_9b10LwJKWsyrZIEKTB9b6PGQ)(void) {
	sysFatal_3HvfrCYXZqO25G8oEg4MjQsystem(((NimStringDesc*) &TM_Q5wkpxktOdTGvlSRo9bzt9aw_10));
}

N_NIMCALL(NimStringDesc*, readLine_fPRnXwDTqtynUYGl4OixAg)(FILE* f) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = rawNewString(((NI) 80));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = readLine_sO1bQXVRA6RP9cdYJXNKeSw(f, (&result));
		if (!!(T3_)) goto LA4_;
		raiseEOF_9b10LwJKWsyrZIEKTB9b6PGQ();
	}
	LA4_: ;
	return result;
}

N_NIMCALL(void, add_IbYQ9cTcoQ89aIwM2IEYGMng)(NimStringDesc** result, NI64 x) {
	NI base;
	NI i;
	NI64 y;
	base = ((*result) ? (*result)->Sup.len : 0);
	(*result) = setLengthStr((*result), ((NI) ((NI)(base + ((NI) 32)))));
	i = ((NI) 0);
	y = x;
	{
		while (1) {
			NI64 d;
			d = (NI64)(y / IL64(10));
			(*result)->data[(NI)(base + i)] = ((NIM_CHAR) (((NI) ((NI)((((NI) ((NI64)(y - (NI64)(d * IL64(10))))) > 0? (((NI) ((NI64)(y - (NI64)(d * IL64(10)))))) : -(((NI) ((NI64)(y - (NI64)(d * IL64(10))))))) + ((NI) 48))))));
			i += ((NI) 1);
			y = d;
			{
				if (!(y == IL64(0))) goto LA5_;
				goto LA1;
			}
			LA5_: ;
		}
	} LA1: ;
	{
		if (!(x < IL64(0))) goto LA9_;
		(*result)->data[(NI)(base + i)] = 45;
		i += ((NI) 1);
	}
	LA9_: ;
	(*result) = setLengthStr((*result), ((NI) ((NI)(base + i))));
	{
		NI j;
		NI colontmp_;
		NI res;
		j = (NI)0;
		colontmp_ = (NI)0;
		colontmp_ = (NI)((NI)(i / ((NI) 2)) - ((NI) 1));
		res = ((NI) 0);
		{
			while (1) {
				NIM_CHAR T14_;
				if (!(res <= colontmp_)) goto LA13;
				j = res;
				T14_ = (NIM_CHAR)0;
				T14_ = (*result)->data[(NI)(base + j)];
				(*result)->data[(NI)(base + j)] = (*result)->data[(NI)((NI)((NI)(base + i) - j) - ((NI) 1))];
				(*result)->data[(NI)((NI)((NI)(base + i) - j) - ((NI) 1))] = T14_;
				res += ((NI) 1);
			} LA13: ;
		}
	}
}

N_NIMCALL(NimStringDesc*, nimIntToStr)(NI x) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	result = rawNewString(((NI) 32));
	add_IbYQ9cTcoQ89aIwM2IEYGMng((&result), ((NI64) (x)));
	return result;
}
NIM_EXTERNC N_NOINLINE(void, systemInit000)(void) {
	TNimType T1_;
nimRegisterGlobalMarker(TM_Q5wkpxktOdTGvlSRo9bzt9aw_4);
	nimvm_IAxmsqnME4Jmed24hOgrFQ = NIM_FALSE;
	memset((void*)(&T1_), 0, sizeof(T1_));
	T1_.size = ((NI) 8);
	T1_.kind = ((tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A) 28);
	T1_.flags = 2;
	strDesc_D0UzA4zsDu5tgpJQ9a9clXPg = T1_;
	initAllocator_IZ2oOmqdsYQ7vixQGKSDcAsystem();
	initStackBottom();
	initGC_njssp69aa7hvxte9bJ8uuDcg();
	registerSignalHandler_njssp69aa7hvxte9bJ8uuDcg_2();
}

NIM_EXTERNC N_NOINLINE(void, systemDatInit000)(void) {
static TNimNode* TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[5];
static TNimNode TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[14];
NTI_13RNkKqUOX1TtorOUlKtqA_.size = sizeof(RootObj);
NTI_13RNkKqUOX1TtorOUlKtqA_.kind = 17;
NTI_13RNkKqUOX1TtorOUlKtqA_.base = 0;
NTI_13RNkKqUOX1TtorOUlKtqA_.flags = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[0].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[0].kind = 2;
NTI_13RNkKqUOX1TtorOUlKtqA_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[0];
NTI_bAvOj2UcojKN87yAQLs0aw_.size = sizeof(Exception);
NTI_bAvOj2UcojKN87yAQLs0aw_.kind = 17;
NTI_bAvOj2UcojKN87yAQLs0aw_.base = (&NTI_13RNkKqUOX1TtorOUlKtqA_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[0] = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[2];
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[2].kind = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[2].offset = offsetof(Exception, parent);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[2].typ = (&NTI_oUKtBcKRdK6usj8RWrlp6A_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[2].name = "parent";
TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[1] = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[3];
NTI_S9agCYBinaYZnGWcjTdxclg_.size = sizeof(NCSTRING);
NTI_S9agCYBinaYZnGWcjTdxclg_.kind = 29;
NTI_S9agCYBinaYZnGWcjTdxclg_.base = 0;
NTI_S9agCYBinaYZnGWcjTdxclg_.flags = 3;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[3].kind = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[3].offset = offsetof(Exception, name);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[3].typ = (&NTI_S9agCYBinaYZnGWcjTdxclg_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[3].name = "name";
TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[2] = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[4];
NTI_77mFvmsOLKik79ci2hXkHEg_.size = sizeof(NimStringDesc*);
NTI_77mFvmsOLKik79ci2hXkHEg_.kind = 28;
NTI_77mFvmsOLKik79ci2hXkHEg_.base = 0;
NTI_77mFvmsOLKik79ci2hXkHEg_.flags = 2;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[4].kind = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[4].offset = offsetof(Exception, message);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[4].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[4].name = "msg";
TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[3] = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[5];
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[5].kind = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[5].offset = offsetof(Exception, trace);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[5].typ = (&NTI_77mFvmsOLKik79ci2hXkHEg_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[5].name = "trace";
TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[4] = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[6];
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[6].kind = 1;
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[6].offset = offsetof(Exception, up);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[6].typ = (&NTI_oUKtBcKRdK6usj8RWrlp6A_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[6].name = "up";
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[1].len = 5; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[1].kind = 2; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[1].sons = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_3[0];
NTI_bAvOj2UcojKN87yAQLs0aw_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[1];
NTI_oUKtBcKRdK6usj8RWrlp6A_.size = sizeof(Exception*);
NTI_oUKtBcKRdK6usj8RWrlp6A_.kind = 22;
NTI_oUKtBcKRdK6usj8RWrlp6A_.base = (&NTI_bAvOj2UcojKN87yAQLs0aw_);
NTI_oUKtBcKRdK6usj8RWrlp6A_.marker = Marker_tyRef_oUKtBcKRdK6usj8RWrlp6A;
NTI_Fjf9b9b2IlzRO2tspHxG3tgg_.size = sizeof(tyObject_SystemError_Fjf9b9b2IlzRO2tspHxG3tgg);
NTI_Fjf9b9b2IlzRO2tspHxG3tgg_.kind = 17;
NTI_Fjf9b9b2IlzRO2tspHxG3tgg_.base = (&NTI_bAvOj2UcojKN87yAQLs0aw_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[7].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[7].kind = 2;
NTI_Fjf9b9b2IlzRO2tspHxG3tgg_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[7];
NTI_9czoZw3pzPyrBmb5zTHY1OQ_.size = sizeof(tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ);
NTI_9czoZw3pzPyrBmb5zTHY1OQ_.kind = 17;
NTI_9czoZw3pzPyrBmb5zTHY1OQ_.base = (&NTI_Fjf9b9b2IlzRO2tspHxG3tgg_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[8].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[8].kind = 2;
NTI_9czoZw3pzPyrBmb5zTHY1OQ_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[8];
NTI_HX2M9cQhE3jaovp9aYJDdslA_.size = sizeof(tyObject_IOError_9czoZw3pzPyrBmb5zTHY1OQ*);
NTI_HX2M9cQhE3jaovp9aYJDdslA_.kind = 22;
NTI_HX2M9cQhE3jaovp9aYJDdslA_.base = (&NTI_9czoZw3pzPyrBmb5zTHY1OQ_);
NTI_HX2M9cQhE3jaovp9aYJDdslA_.marker = Marker_tyRef_HX2M9cQhE3jaovp9aYJDdslA;
NTI_NrupLB36t9bV7iFDHtrF69aw_.size = sizeof(tyObject_OutOfMemError_NrupLB36t9bV7iFDHtrF69aw);
NTI_NrupLB36t9bV7iFDHtrF69aw_.kind = 17;
NTI_NrupLB36t9bV7iFDHtrF69aw_.base = (&NTI_Fjf9b9b2IlzRO2tspHxG3tgg_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[9].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[9].kind = 2;
NTI_NrupLB36t9bV7iFDHtrF69aw_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[9];
NTI_QcJsjWXxMFpjHfkCIK5ExA_.size = sizeof(tyObject_ArithmeticError_QcJsjWXxMFpjHfkCIK5ExA);
NTI_QcJsjWXxMFpjHfkCIK5ExA_.kind = 17;
NTI_QcJsjWXxMFpjHfkCIK5ExA_.base = (&NTI_bAvOj2UcojKN87yAQLs0aw_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[10].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[10].kind = 2;
NTI_QcJsjWXxMFpjHfkCIK5ExA_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[10];
NTI_I3Jtn27626sFBOls6BBQ2Q_.size = sizeof(tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q);
NTI_I3Jtn27626sFBOls6BBQ2Q_.kind = 17;
NTI_I3Jtn27626sFBOls6BBQ2Q_.base = (&NTI_QcJsjWXxMFpjHfkCIK5ExA_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[11].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[11].kind = 2;
NTI_I3Jtn27626sFBOls6BBQ2Q_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[11];
NTI_6woiEp3hwhYMr1p5tjkZvA_.size = sizeof(tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*);
NTI_6woiEp3hwhYMr1p5tjkZvA_.kind = 22;
NTI_6woiEp3hwhYMr1p5tjkZvA_.base = (&NTI_I3Jtn27626sFBOls6BBQ2Q_);
NTI_6woiEp3hwhYMr1p5tjkZvA_.marker = Marker_tyRef_6woiEp3hwhYMr1p5tjkZvA;
NTI_Gi06FkNeykJn7mrqRZYrkA_.size = sizeof(tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA);
NTI_Gi06FkNeykJn7mrqRZYrkA_.kind = 17;
NTI_Gi06FkNeykJn7mrqRZYrkA_.base = (&NTI_bAvOj2UcojKN87yAQLs0aw_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[12].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[12].kind = 2;
NTI_Gi06FkNeykJn7mrqRZYrkA_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[12];
NTI_yCEN9anxCD6mzBxGjuaRBdg_.size = sizeof(tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA*);
NTI_yCEN9anxCD6mzBxGjuaRBdg_.kind = 22;
NTI_yCEN9anxCD6mzBxGjuaRBdg_.base = (&NTI_Gi06FkNeykJn7mrqRZYrkA_);
NTI_yCEN9anxCD6mzBxGjuaRBdg_.marker = Marker_tyRef_yCEN9anxCD6mzBxGjuaRBdg;
NTI_yzVtHjbKd39bygEUDLqI18Q_.size = sizeof(tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q);
NTI_yzVtHjbKd39bygEUDLqI18Q_.kind = 17;
NTI_yzVtHjbKd39bygEUDLqI18Q_.base = (&NTI_9czoZw3pzPyrBmb5zTHY1OQ_);
TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[13].len = 0; TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[13].kind = 2;
NTI_yzVtHjbKd39bygEUDLqI18Q_.node = &TM_Q5wkpxktOdTGvlSRo9bzt9aw_0[13];
NTI_e7vzYS7Z29amCrBOEA9aYFbQ_.size = sizeof(tyObject_EOFError_yzVtHjbKd39bygEUDLqI18Q*);
NTI_e7vzYS7Z29amCrBOEA9aYFbQ_.kind = 22;
NTI_e7vzYS7Z29amCrBOEA9aYFbQ_.base = (&NTI_yzVtHjbKd39bygEUDLqI18Q_);
NTI_e7vzYS7Z29amCrBOEA9aYFbQ_.marker = Marker_tyRef_e7vzYS7Z29amCrBOEA9aYFbQ;
}


/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#include <string.h>
#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix



























typedef NU8 tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc_ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc_WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);




typedef NU8 tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ;




typedef tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* tyArray_SiRwrEKZdLgxqz9a9aoVBglg[512];
typedef tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* tyArray_lh2A89ahMmYg9bCmpVaplLbA[256];

typedef tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* tyArray_0aOLqZchNi8nWtMTi8ND8w[2];


typedef tyTuple_ujsjpB2O9cjj3uDHsXbnSzg tyArray_LzOv2eCDGiceMKQstCLmhw[30];









typedef NI tyArray_9a8QARi5WsUggNU9bom7kzTQ[8];



N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem_E1xtACub5WcDa3vbrIXbwgsystem)(void* dest, void* source, NI size);
N_NIMCALL(NimStringDesc*, rawNewString)(NI space);
static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src);
static N_INLINE(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem)(void* usr);
static N_INLINE(void, rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NOINLINE(void, addZCT_fCDI7oO1NNVXXURtxSzsRw)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef_9cAA5YuQAAC3MVbnGeV86swsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, decRef_MV4BBk6J1qu70IbBxwEn4wsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
extern TNimType NTI_yCEN9anxCD6mzBxGjuaRBdg_;
extern TNimType NTI_Gi06FkNeykJn7mrqRZYrkA_;
extern tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
STRING_LITERAL(TM_JGc9b9bh2D3nTdUR7TGyq8aA_2, "invalid integer: ", 17);



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





static N_INLINE(void, asgnRefNoCycle)(void** dest, void* src) {
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c;
		if (!!((src == NIM_NIL))) goto LA3_;
		c = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem(src);
		(*c).refcount += ((NI) 8);
	}
	LA3_: ;
	{
		tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c_2;
		if (!!(((*dest) == NIM_NIL))) goto LA7_;
		c_2 = usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem((*dest));
		{
			(*c_2).refcount -= ((NI) 8);
			if (!((NU64)((*c_2).refcount) < (NU64)(((NI) 8)))) goto LA11_;
			rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system(c_2);
		}
		LA11_: ;
	}
	LA7_: ;
	(*dest) = src;
}







N_NIMCALL(NI, nsuParseInt)(NimStringDesc* s) {
	NI result;
	NI L;
	result = (NI)0;
	L = npuParseInt(s, (&result), ((NI) 0));
	{
		NIM_BOOL T3_;
		tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA* e;
		NimStringDesc* T7_;
		T3_ = (NIM_BOOL)0;
		T3_ = !((L == (s ? s->Sup.len : 0)));
		if (T3_) goto LA4_;
		T3_ = (L == ((NI) 0));
		LA4_: ;
		if (!T3_) goto LA5_;
		e = (tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA*)0;
		e = (tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA*) newObj((&NTI_yCEN9anxCD6mzBxGjuaRBdg_), sizeof(tyObject_ValueError_Gi06FkNeykJn7mrqRZYrkA));
		(*e).Sup.Sup.m_type = (&NTI_Gi06FkNeykJn7mrqRZYrkA_);
		T7_ = (NimStringDesc*)0;
		T7_ = rawNewString(s->Sup.len + 17);
appendString(T7_, ((NimStringDesc*) &TM_JGc9b9bh2D3nTdUR7TGyq8aA_2));
appendString(T7_, s);
		asgnRefNoCycle((void**) (&(*e).Sup.message), T7_);
		asgnRef((void**) (&(*e).Sup.parent), NIM_NIL);
		raiseException((Exception*)e, "ValueError");
	}
	LA5_: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_strutilsDatInit000)(void) {
}


/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix




























typedef NU8 tyEnum_TNimKind_jIBKr1ejBgsfM33Kxw4j7A;
typedef NU8 tySet_tyEnum_TNimTypeFlag_v8QUszD1sWlSIWZz7mC4bQ;
typedef N_NIMCALL_PTR(void, tyProc_ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
typedef N_NIMCALL_PTR(void*, tyProc_WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);





typedef NU8 tyEnum_TNimNodeKind_unfNsxrcATrufDZmpBq4HQ;




typedef tyObject_SmallChunk_tXn60W2f8h3jgAYdEmy5NQ* tyArray_SiRwrEKZdLgxqz9a9aoVBglg[512];
typedef tyObject_Trunk_W0r8S0Y3UGke6T9bIUWnnuw* tyArray_lh2A89ahMmYg9bCmpVaplLbA[256];

typedef tyObject_AvlNode_IaqjtwKhxLEpvDS9bct9blEw* tyArray_0aOLqZchNi8nWtMTi8ND8w[2];


typedef tyTuple_ujsjpB2O9cjj3uDHsXbnSzg tyArray_LzOv2eCDGiceMKQstCLmhw[30];









typedef NI tyArray_9a8QARi5WsUggNU9bom7kzTQ[8];



N_NIMCALL(NI, npuParseBiggestInt)(NimStringDesc* s, NI64* number, NI start);
N_NIMCALL(NI, rawParseInt_ZzngwN3GXlI9aVYNxHLGOXQ)(NimStringDesc* s, NI64* b, NI start);
static N_INLINE(NI, addInt)(NI a, NI b);
N_NOINLINE(void, raiseOverflow)(void);
N_NIMCALL(NI64, mulInt64)(NI64 a, NI64 b);
static N_INLINE(NI, subInt)(NI a, NI b);
static N_INLINE(NI64, subInt64)(NI64 a, NI64 b);
N_NIMCALL(void*, newObj)(TNimType* typ, NI size);
N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
static N_INLINE(void, nimGCunrefNoCycle)(void* p);
static N_INLINE(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell_yB9aH5WIlwd0xkYrcdPeXrQsystem)(void* usr);
static N_INLINE(void, rtlAddZCT_MV4BBk6J1qu70IbBxwEn4w_2system)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NOINLINE(void, addZCT_fCDI7oO1NNVXXURtxSzsRw)(tyObject_CellSeq_Axo1XVm9aaQueTOldv8le5w* s, tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, asgnRef)(void** dest, void* src);
static N_INLINE(void, incRef_9cAA5YuQAAC3MVbnGeV86swsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
static N_INLINE(void, decRef_MV4BBk6J1qu70IbBxwEn4wsystem)(tyObject_Cell_1zcF9cV8XIAtbN8h5HRUB8g* c);
N_NIMCALL(void, raiseException)(Exception* e, NCSTRING ename);
extern TNimType NTI_6woiEp3hwhYMr1p5tjkZvA_;
extern TNimType NTI_I3Jtn27626sFBOls6BBQ2Q_;
extern tyObject_GcHeap_1TRH1TZMaVZTnLNcIHuNFQ gch_IcYaEuuWivYAS86vFMTS3Q;
STRING_LITERAL(TM_vI9aZNKIcImom6dDyKXW1ZA_11, "overflow", 8);

static N_INLINE(NI, addInt)(NI a, NI b) {
	NI result;
{	result = (NI)0;
	result = (NI)((NU64)(a) + (NU64)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ b));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI, subInt)(NI a, NI b) {
	NI result;
{	result = (NI)0;
	result = (NI)((NU64)(a) - (NU64)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (((NI) 0) <= (NI)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (((NI) 0) <= (NI)(result ^ (NI)((NU64) ~(b))));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

static N_INLINE(NI64, subInt64)(NI64 a, NI64 b) {
	NI64 result;
{	result = (NI64)0;
	result = (NI64)((NU64)(a) - (NU64)(b));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = (IL64(0) <= (NI64)(result ^ a));
		if (T3_) goto LA4_;
		T3_ = (IL64(0) <= (NI64)(result ^ (NI64)((NU64) ~(b))));
		LA4_: ;
		if (!T3_) goto LA5_;
		goto BeforeRet_;
	}
	LA5_: ;
	raiseOverflow();
	}BeforeRet_: ;
	return result;
}

N_NIMCALL(NI, rawParseInt_ZzngwN3GXlI9aVYNxHLGOXQ)(NimStringDesc* s, NI64* b, NI start) {
	NI result;
	NI64 sign;
	NI i;
	result = (NI)0;
	sign = IL64(-1);
	i = start;
	{
		NI TM_vI9aZNKIcImom6dDyKXW1ZA_2;
		if (!((NU8)(s->data[i]) == (NU8)(43))) goto LA3_;
		TM_vI9aZNKIcImom6dDyKXW1ZA_2 = addInt(i, ((NI) 1));
		i = (NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_2);
	}
	goto LA1_;
	LA3_: ;
	{
		NI TM_vI9aZNKIcImom6dDyKXW1ZA_3;
		if (!((NU8)(s->data[i]) == (NU8)(45))) goto LA6_;
		TM_vI9aZNKIcImom6dDyKXW1ZA_3 = addInt(i, ((NI) 1));
		i = (NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_3);
		sign = IL64(1);
	}
	goto LA1_;
	LA6_: ;
	LA1_: ;
	{
		NI64 TM_vI9aZNKIcImom6dDyKXW1ZA_9;
		NI TM_vI9aZNKIcImom6dDyKXW1ZA_10;
		if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA10_;
		(*b) = IL64(0);
		{
			while (1) {
				NI64 TM_vI9aZNKIcImom6dDyKXW1ZA_4;
				NI TM_vI9aZNKIcImom6dDyKXW1ZA_5;
				NI64 TM_vI9aZNKIcImom6dDyKXW1ZA_6;
				NI TM_vI9aZNKIcImom6dDyKXW1ZA_7;
				if (!(((NU8)(s->data[i])) >= ((NU8)(48)) && ((NU8)(s->data[i])) <= ((NU8)(57)))) goto LA13;
				TM_vI9aZNKIcImom6dDyKXW1ZA_4 = mulInt64((*b), IL64(10));
				TM_vI9aZNKIcImom6dDyKXW1ZA_5 = subInt(((NI) (((NU8)(s->data[i])))), ((NI) 48));
				TM_vI9aZNKIcImom6dDyKXW1ZA_6 = subInt64((NI64)(TM_vI9aZNKIcImom6dDyKXW1ZA_4), ((NI64) ((NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_5))));
				(*b) = (NI64)(TM_vI9aZNKIcImom6dDyKXW1ZA_6);
				TM_vI9aZNKIcImom6dDyKXW1ZA_7 = addInt(i, ((NI) 1));
				i = (NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_7);
				{
					while (1) {
						NI TM_vI9aZNKIcImom6dDyKXW1ZA_8;
						if (!((NU8)(s->data[i]) == (NU8)(95))) goto LA15;
						TM_vI9aZNKIcImom6dDyKXW1ZA_8 = addInt(i, ((NI) 1));
						i = (NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_8);
					} LA15: ;
				}
			} LA13: ;
		}
		TM_vI9aZNKIcImom6dDyKXW1ZA_9 = mulInt64((*b), sign);
		(*b) = (NI64)(TM_vI9aZNKIcImom6dDyKXW1ZA_9);
		TM_vI9aZNKIcImom6dDyKXW1ZA_10 = subInt(i, start);
		result = (NI)(TM_vI9aZNKIcImom6dDyKXW1ZA_10);
	}
	LA10_: ;
	return result;
}

N_NIMCALL(NI, npuParseBiggestInt)(NimStringDesc* s, NI64* number, NI start) {
	NI result;
	NI64 res;
	result = (NI)0;
	res = (NI64)0;
	result = rawParseInt_ZzngwN3GXlI9aVYNxHLGOXQ(s, (&res), start);
	(*number) = res;
	return result;
}













N_NIMCALL(NI, npuParseInt)(NimStringDesc* s, NI* number, NI start) {
	NI result;
	NI64 res;
	result = (NI)0;
	res = (NI64)0;
	result = npuParseBiggestInt(s, (&res), start);
	{
		NIM_BOOL T3_;
		NIM_BOOL T5_;
		tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q* e;
		NimStringDesc* T9_;
		T3_ = (NIM_BOOL)0;
		T3_ = NIM_FALSE;
		if (!(T3_)) goto LA4_;
		T5_ = (NIM_BOOL)0;
		T5_ = (res < (IL64(-9223372036854775807) - IL64(1)));
		if (T5_) goto LA6_;
		T5_ = (IL64(9223372036854775807) < res);
		LA6_: ;
		T3_ = T5_;
		LA4_: ;
		if (!T3_) goto LA7_;
		e = (tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*)0;
		e = (tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q*) newObj((&NTI_6woiEp3hwhYMr1p5tjkZvA_), sizeof(tyObject_OverflowError_I3Jtn27626sFBOls6BBQ2Q));
		(*e).Sup.Sup.Sup.m_type = (&NTI_I3Jtn27626sFBOls6BBQ2Q_);
		T9_ = (NimStringDesc*)0;
		T9_ = (*e).Sup.Sup.message; (*e).Sup.Sup.message = copyStringRC1(((NimStringDesc*) &TM_vI9aZNKIcImom6dDyKXW1ZA_11));
		if (T9_) nimGCunrefNoCycle(T9_);
		asgnRef((void**) (&(*e).Sup.Sup.parent), NIM_NIL);
		raiseException((Exception*)e, "OverflowError");
	}
	goto LA1_;
	LA7_: ;
	{
		if (!!((result == ((NI) 0)))) goto LA11_;
		(*number) = ((NI) (res));
	}
	goto LA1_;
	LA11_: ;
	LA1_: ;
	return result;
}
NIM_EXTERNC N_NOINLINE(void, stdlib_parseutilsInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_parseutilsDatInit000)(void) {
}


/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix
NIM_EXTERNC N_NOINLINE(void, stdlib_mathInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_mathDatInit000)(void) {
}


/* Generated by Nim Compiler v0.17.3 */
/*   (c) 2017 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_NEW_MANGLING_RULES
#define NIM_INTBITS 64


#undef LANGUAGE_C
#undef MIPSEB
#undef MIPSEL
#undef PPC
#undef R3000
#undef R4000
#undef i386
#undef linux
#undef mips
#undef near
#undef powerpc
#undef unix
NIM_EXTERNC N_NOINLINE(void, stdlib_algorithmInit000)(void) {
}

NIM_EXTERNC N_NOINLINE(void, stdlib_algorithmDatInit000)(void) {
}