Skip to content

Instantly share code, notes, and snippets.

@Yardanico

Yardanico/hello_comb.c Secret

Created Mar 19, 2021
Embed
What would you like to do?
/* Generated by CIL v. 1.7.8 */
/* print_CIL_Input is true */
typedef unsigned long size_t;
typedef long __int64_t;
typedef unsigned long __uint64_t;
typedef long __off_t;
typedef long __off64_t;
typedef __int64_t int64_t;
typedef __uint64_t uint64_t;
typedef int64_t NI64;
typedef uint64_t NU64;
typedef NI64 NI;
typedef NU64 NU;
typedef char NIM_CHAR;
typedef char *NCSTRING;
typedef __builtin_va_list __gnuc_va_list;
struct _IO_FILE ;
typedef struct _IO_FILE FILE;
struct _IO_marker ;
struct _IO_codecvt ;
struct _IO_wide_data ;
typedef void _IO_lock_t;
struct _IO_FILE {
int _flags ;
char *_IO_read_ptr ;
char *_IO_read_end ;
char *_IO_read_base ;
char *_IO_write_base ;
char *_IO_write_ptr ;
char *_IO_write_end ;
char *_IO_buf_base ;
char *_IO_buf_end ;
char *_IO_save_base ;
char *_IO_backup_base ;
char *_IO_save_end ;
struct _IO_marker *_markers ;
struct _IO_FILE *_chain ;
int _fileno ;
int _flags2 ;
__off_t _old_offset ;
unsigned short _cur_column ;
signed char _vtable_offset ;
char _shortbuf[1] ;
_IO_lock_t *_lock ;
__off64_t _offset ;
struct _IO_codecvt *_codecvt ;
struct _IO_wide_data *_wide_data ;
struct _IO_FILE *_freeres_list ;
void *_freeres_buf ;
size_t __pad5 ;
int _mode ;
char _unused2[(15UL * sizeof(int ) - 4UL * sizeof(void *)) - sizeof(size_t )] ;
};
struct NimStrPayload ;
typedef struct NimStrPayload NimStrPayload;
struct NimStringV2 ;
typedef struct NimStringV2 NimStringV2;
struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw ;
typedef struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw;
struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA ;
typedef struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
struct Exception ;
typedef struct Exception Exception;
struct RootObj ;
typedef struct RootObj RootObj;
struct TNimTypeV2 ;
typedef struct TNimTypeV2 TNimTypeV2;
struct tySequence__uB9b75OUPRENsBAu4AnoePA ;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA tySequence__uB9b75OUPRENsBAu4AnoePA;
struct tySequence__uB9b75OUPRENsBAu4AnoePA_Content ;
typedef struct tySequence__uB9b75OUPRENsBAu4AnoePA_Content tySequence__uB9b75OUPRENsBAu4AnoePA_Content;
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA ;
typedef struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
struct NimStrPayload {
NI cap ;
NIM_CHAR data[] ;
};
struct NimStringV2 {
NI len ;
NimStrPayload *p ;
};
struct TNimTypeV2 {
void *destructor ;
NI size ;
NI align ;
NCSTRING name ;
void *traceImpl ;
void *disposeImpl ;
void *typeInfoV1 ;
};
struct RootObj {
TNimTypeV2 *m_type ;
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA {
NI len ;
tySequence__uB9b75OUPRENsBAu4AnoePA_Content *p ;
};
struct Exception {
RootObj Sup ;
Exception *parent ;
NCSTRING name ;
NimStringV2 message ;
tySequence__uB9b75OUPRENsBAu4AnoePA trace ;
Exception *up ;
};
struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
Exception Sup ;
};
struct tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw {
tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA Sup ;
};
struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
NCSTRING procname ;
NI line ;
NCSTRING filename ;
};
struct tySequence__uB9b75OUPRENsBAu4AnoePA_Content {
NI cap ;
tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[] ;
};
struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_2_60456539 {
NI cap ;
NIM_CHAR data[8] ;
};
struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_4_60456540 {
NI cap ;
NIM_CHAR data[3] ;
};
struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_6_60456541 {
NI cap ;
NIM_CHAR data[2] ;
};
typedef long ptrdiff_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef __int16_t int16_t;
typedef __uint8_t uint8_t;
typedef __uint16_t uint16_t;
typedef int16_t NI16;
typedef uint8_t NU8;
typedef uint16_t NU16;
struct TFrame_ ;
typedef struct TFrame_ TFrame;
struct TFrame_ {
TFrame *prev ;
NCSTRING procname ;
NI line ;
NCSTRING filename ;
NI16 len ;
NI16 calldepth ;
NI frameMsgLen ;
};
typedef void (*__sighandler_t)(int );
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w ;
typedef struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
struct tyTuple__0F3Kz25HWtRatQmCDVHWEA ;
typedef struct tyTuple__0F3Kz25HWtRatQmCDVHWEA tyTuple__0F3Kz25HWtRatQmCDVHWEA;
struct TSafePoint ;
typedef struct TSafePoint TSafePoint;
struct GcFrameHeader ;
typedef struct GcFrameHeader GcFrameHeader;
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A ;
typedef struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A;
struct tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ ;
typedef struct tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ;
struct tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w ;
typedef struct tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w;
struct tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ ;
typedef struct tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ;
struct tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw ;
typedef struct tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw;
struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
NI len ;
NI cap ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA *d ;
};
struct tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A {
NI rc ;
NI rootIdx ;
};
struct tyTuple__0F3Kz25HWtRatQmCDVHWEA {
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *Field0 ;
TNimTypeV2 *Field1 ;
};
struct tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ {
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w traceStack ;
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w toFree ;
NI freed ;
NI touched ;
NI edges ;
NI rcSum ;
_Bool keepThreshold ;
};
struct tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w {
NI len ;
tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ *p ;
};
struct tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ {
NI cap ;
tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[] ;
};
struct tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw {
NI cap ;
};
typedef NIM_CHAR tyArray__gpc2RrLEcWgv7ONpLYNHOw[2001];
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_2_60456539 {
NI cap ;
NIM_CHAR data[201] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_7_60456540 {
NI cap ;
NIM_CHAR data[18] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_9_60456541 {
NI cap ;
NIM_CHAR data[4] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_11_60456542 {
NI cap ;
NIM_CHAR data[2] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_13_60456543 {
NI cap ;
NIM_CHAR data[3] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_15_60456544 {
NI cap ;
NIM_CHAR data[2] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_17_60456545 {
NI cap ;
NIM_CHAR data[2] ;
};
struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_19_60456546 {
NI cap ;
NIM_CHAR data[2] ;
};
struct __anonstruct_TM__xLHv575t3PG1lB5wK05Xqg_3_60456539 {
NI cap ;
NIM_CHAR data[21] ;
};
/* compiler builtin:
long __builtin_expect(long , long ) ; */
#pragma merger("0","/tmp/cil-W0ANBGum.i","-w,-fmax-errors=3,-O3,-fno-strict-aliasing,-fno-ident")
#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"
extern FILE *stdin ;
extern FILE *stdout ;
extern int fflush(FILE *__stream ) ;
extern int vfprintf(FILE * __restrict __s , char const * __restrict __format ,
__gnuc_va_list __arg ) ;
__inline extern int ( __attribute__((__gnu_inline__)) vprintf)(char const * __restrict __fmt ,
__gnuc_va_list __arg ) ;
extern int getc(FILE *__stream ) ;
__inline extern int ( __attribute__((__gnu_inline__)) getchar)(void) ;
__inline extern int ( __attribute__((__gnu_inline__)) getc_unlocked)(FILE *__fp ) ;
__inline extern int ( __attribute__((__gnu_inline__)) getchar_unlocked)(void) ;
__inline extern int ( __attribute__((__gnu_inline__)) fgetc_unlocked)(FILE *__fp ) ;
extern int putc(int __c , FILE *__stream ) ;
__inline extern int ( __attribute__((__gnu_inline__)) putchar)(int __c ) ;
__inline extern int ( __attribute__((__gnu_inline__)) fputc_unlocked)(int __c , FILE *__stream ) ;
__inline extern int ( __attribute__((__gnu_inline__)) putc_unlocked)(int __c , FILE *__stream ) ;
__inline extern int ( __attribute__((__gnu_inline__)) putchar_unlocked)(int __c ) ;
extern size_t fwrite(void const * __restrict __ptr , size_t __size , size_t __n ,
FILE * __restrict __s ) ;
extern __attribute__((__nothrow__)) void ( __attribute__((__leaf__)) clearerr)(FILE *__stream ) ;
extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__)) ferror)(FILE *__stream ) ;
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__, __gnu_inline__)) feof_unlocked)(FILE *__stream ) ;
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__, __gnu_inline__)) ferror_unlocked)(FILE *__stream ) ;
extern __attribute__((__nothrow__)) void ( __attribute__((__leaf__)) flockfile)(FILE *__stream ) ;
extern __attribute__((__nothrow__)) void ( __attribute__((__leaf__)) funlockfile)(FILE *__stream ) ;
extern int __uflow(FILE * ) ;
extern int __overflow(FILE * , int ) ;
__inline extern int ( __attribute__((__gnu_inline__)) vprintf)(char const * __restrict __fmt ,
__gnuc_va_list __arg )
{
int tmp ;
{
tmp = vfprintf((FILE * __restrict )stdout, __fmt, __arg);
return (tmp);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) getchar)(void)
{
int tmp ;
{
tmp = getc(stdin);
return (tmp);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) fgetc_unlocked)(FILE *__fp )
{
int tmp___0 ;
char *tmp___1 ;
int tmp___2 ;
long tmp___3 ;
{
tmp___3 = __builtin_expect((long )((unsigned long )__fp->_IO_read_ptr >= (unsigned long )__fp->_IO_read_end),
0L);
if (tmp___3) {
tmp___0 = __uflow(__fp);
tmp___2 = tmp___0;
} else {
tmp___1 = __fp->_IO_read_ptr;
(__fp->_IO_read_ptr) ++;
tmp___2 = (int )*((unsigned char *)tmp___1);
}
return (tmp___2);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) getchar_unlocked)(void)
{
int tmp___0 ;
char *tmp___1 ;
int tmp___2 ;
long tmp___3 ;
{
tmp___3 = __builtin_expect((long )((unsigned long )stdin->_IO_read_ptr >= (unsigned long )stdin->_IO_read_end),
0L);
if (tmp___3) {
tmp___0 = __uflow(stdin);
tmp___2 = tmp___0;
} else {
tmp___1 = stdin->_IO_read_ptr;
(stdin->_IO_read_ptr) ++;
tmp___2 = (int )*((unsigned char *)tmp___1);
}
return (tmp___2);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) putchar)(int __c )
{
int tmp ;
{
tmp = putc(__c, stdout);
return (tmp);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) fputc_unlocked)(int __c , FILE *__stream )
{
int tmp___0 ;
char *tmp___1 ;
char tmp___2 ;
int tmp___3 ;
long tmp___4 ;
{
tmp___4 = __builtin_expect((long )((unsigned long )__stream->_IO_write_ptr >= (unsigned long )__stream->_IO_write_end),
0L);
if (tmp___4) {
tmp___0 = __overflow(__stream, (int )((unsigned char )__c));
tmp___3 = tmp___0;
} else {
tmp___1 = __stream->_IO_write_ptr;
(__stream->_IO_write_ptr) ++;
tmp___2 = (char )__c;
*tmp___1 = tmp___2;
tmp___3 = (int )((unsigned char )tmp___2);
}
return (tmp___3);
}
}
__inline extern int ( __attribute__((__gnu_inline__)) putchar_unlocked)(int __c )
{
int tmp___0 ;
char *tmp___1 ;
char tmp___2 ;
int tmp___3 ;
long tmp___4 ;
{
tmp___4 = __builtin_expect((long )((unsigned long )stdout->_IO_write_ptr >= (unsigned long )stdout->_IO_write_end),
0L);
if (tmp___4) {
tmp___0 = __overflow(stdout, (int )((unsigned char )__c));
tmp___3 = tmp___0;
} else {
tmp___1 = stdout->_IO_write_ptr;
(stdout->_IO_write_ptr) ++;
tmp___2 = (char )__c;
*tmp___1 = tmp___2;
tmp___3 = (int )((unsigned char )tmp___2);
}
return (tmp___3);
}
}
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__, __gnu_inline__)) feof_unlocked)(FILE *__stream ) ;
__inline extern int ( __attribute__((__leaf__, __gnu_inline__)) feof_unlocked)(FILE *__stream )
{
{
return ((__stream->_flags & 16) != 0);
}
}
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__, __gnu_inline__)) ferror_unlocked)(FILE *__stream ) ;
__inline extern int ( __attribute__((__leaf__, __gnu_inline__)) ferror_unlocked)(FILE *__stream )
{
{
return ((__stream->_flags & 32) != 0);
}
}
extern __attribute__((__nothrow__)) void *( __attribute__((__nonnull__(1,2), __leaf__)) memcpy)(void * __restrict __dest ,
void const * __restrict __src ,
size_t __n ) ;
extern __attribute__((__nothrow__)) char *( __attribute__((__leaf__)) strerror)(int __errnum ) ;
extern __attribute__((__nothrow__)) int *( __attribute__((__leaf__)) __errno_location)(void) __attribute__((__const__)) ;
__inline static NCSTRING nimToCStringConv(NimStringV2 s ) ;
void checkErr__fU6ZlJAtQ9bre04EDZLdGsA(FILE *f ) ;
__inline static void appendString(NimStringV2 *dest , NimStringV2 src ) ;
__inline static void copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(void *dest , void *source ,
NI size ) ;
__inline static void nimCopyMem(void *dest , void *source , NI size ) ;
NimStringV2 nimIntToStr(NI x ) ;
NimStringV2 cstrToNimstr(NCSTRING str ) ;
NimStringV2 rawNewString(NI space ) ;
void ( __attribute__((__noinline__)) raiseEIO__ZYk14k3sVNZUIjJjtqzFZQ)(NimStringV2 msg ) ;
void *nimNewObj(NI size , NI alignment ) ;
void raiseExceptionEx(Exception *e , NCSTRING ename , NCSTRING procname , NCSTRING filename ,
NI line ) ;
void eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(NimStringV2 *dest ) ;
__inline static _Bool *nimErrorFlag(void) ;
static struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_2_60456539 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_2 = {(NI )(7UL | (1UL << 62)),
{(NIM_CHAR )'e', (NIM_CHAR )'r', (NIM_CHAR )'r', (NIM_CHAR )'n', (NIM_CHAR )'o',
(NIM_CHAR )':', (NIM_CHAR )' ', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_3 = {(NI )7, (NimStrPayload *)(& TM__MnCJ0VAmeZ9aTATUB39cx60Q_2)};
static struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_4_60456540 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_4 = {(NI )(2UL | (1UL << 62)),
{(NIM_CHAR )' ', (NIM_CHAR )'`', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_5 = {(NI )2, (NimStrPayload *)(& TM__MnCJ0VAmeZ9aTATUB39cx60Q_4)};
static struct __anonstruct_TM__MnCJ0VAmeZ9aTATUB39cx60Q_6_60456541 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_6 = {(NI )(1UL | (1UL << 62)),
{(NIM_CHAR )'`', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__MnCJ0VAmeZ9aTATUB39cx60Q_7 = {(NI )1, (NimStrPayload *)(& TM__MnCJ0VAmeZ9aTATUB39cx60Q_6)};
TNimTypeV2 NTIv2__iLZrPn9anoh9ad1MmO0RczFw_ ;
_Bool nimInErrorMode__759bT87luu8XGcbkw13FUjA ;
__inline static NCSTRING nimToCStringConv(NimStringV2 s )
{
NCSTRING result ;
{
result = (NCSTRING )0;
if (! (s.len == 0L)) {
goto LA3_;
}
result = (NCSTRING )"";
goto LA1_;
LA3_:
result = (s.p)->data;
LA1_: ;
return (result);
}
}
__inline static void nimCopyMem(void *dest , void *source , NI size )
{
void *T1_ ;
{
T1_ = (void *)0;
T1_ = memcpy((void * __restrict )dest, (void const * __restrict )source, (size_t )size);
return;
}
}
__inline static void copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(void *dest , void *source ,
NI size )
{
{
nimCopyMem(dest, source, size);
return;
}
}
__inline static void appendString(NimStringV2 *dest , NimStringV2 src )
{
void *T5_ ;
void *T6_ ;
{
if (! (0L < src.len)) {
goto LA3_;
}
T5_ = (void *)0;
T5_ = (void *)(& (dest->p)->data[dest->len]);
T6_ = (void *)0;
T6_ = (void *)(& (src.p)->data[(NI )0]);
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T5_, T6_, src.len + 1L);
dest->len += src.len;
LA3_: ;
return;
}
}
__inline static _Bool *nimErrorFlag(void)
{
_Bool *result ;
{
result = (_Bool *)0;
result = & nimInErrorMode__759bT87luu8XGcbkw13FUjA;
return (result);
}
}
void ( __attribute__((__noinline__)) raiseEIO__ZYk14k3sVNZUIjJjtqzFZQ)(NimStringV2 msg )
{
tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *T2_ ;
NimStringV2 blitTmp ;
_Bool *nimErr_ ;
void *tmp ;
long tmp___0 ;
{
nimErr_ = nimErrorFlag();
T2_ = (tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *)0;
tmp = nimNewObj((NI )sizeof(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw ), (NI )__alignof__(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw ));
T2_ = (tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *)tmp;
T2_->Sup.Sup.Sup.m_type = & NTIv2__iLZrPn9anoh9ad1MmO0RczFw_;
T2_->Sup.Sup.name = (NCSTRING )"IOError";
blitTmp = msg;
msg.len = (NI )0;
msg.p = (NimStrPayload *)((void *)0);
T2_->Sup.Sup.message = blitTmp;
T2_->Sup.Sup.parent = (Exception *)((void *)0);
raiseExceptionEx((Exception *)T2_, (NCSTRING )"IOError", (NCSTRING )"raiseEIO",
(NCSTRING )"io.nim", (NI )139);
goto LA1_;
LA1_:
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& msg);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
}
return;
}
}
void checkErr__fU6ZlJAtQ9bre04EDZLdGsA(FILE *f )
{
_Bool *nimErr_ ;
int T3_ ;
NimStringV2 msg ;
NimStringV2 colontmpD_ ;
NimStringV2 colontmpD__2 ;
NimStringV2 T7_ ;
NCSTRING T8_ ;
NimStringV2 blitTmp ;
int *tmp ;
int *tmp___0 ;
long tmp___1 ;
long tmp___2 ;
{
nimErr_ = nimErrorFlag();
T3_ = 0;
T3_ = ferror(f);
if (! (! (T3_ == 0))) {
goto LA4_;
}
msg.len = (NI )0;
msg.p = (NimStrPayload *)((void *)0);
colontmpD_.len = (NI )0;
colontmpD_.p = (NimStrPayload *)((void *)0);
colontmpD__2.len = (NI )0;
colontmpD__2.p = (NimStrPayload *)((void *)0);
T7_.len = (NI )0;
T7_.p = (NimStrPayload *)((void *)0);
tmp = __errno_location();
colontmpD_ = nimIntToStr((NI )*tmp);
T8_ = (NCSTRING )0;
tmp___0 = __errno_location();
T8_ = strerror(*tmp___0);
colontmpD__2 = cstrToNimstr(T8_);
T7_ = rawNewString((colontmpD_.len + colontmpD__2.len) + 10L);
appendString(& T7_, (NimStringV2 )TM__MnCJ0VAmeZ9aTATUB39cx60Q_3);
appendString(& T7_, colontmpD_);
appendString(& T7_, (NimStringV2 )TM__MnCJ0VAmeZ9aTATUB39cx60Q_5);
appendString(& T7_, colontmpD__2);
appendString(& T7_, (NimStringV2 )TM__MnCJ0VAmeZ9aTATUB39cx60Q_7);
msg = T7_;
clearerr(f);
blitTmp = msg;
msg.len = (NI )0;
msg.p = (NimStrPayload *)((void *)0);
raiseEIO__ZYk14k3sVNZUIjJjtqzFZQ(blitTmp);
tmp___1 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___1) {
}
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& colontmpD__2);
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& colontmpD_);
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& msg);
tmp___2 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___2) {
goto BeforeRet_;
}
LA4_: ;
BeforeRet_: ;
return;
}
}
void echoBinSafe(NimStringV2 *args , NI argsLen_0 )
{
_Bool *nimErr_ ;
NimStringV2 *s ;
NI i ;
void *T7_ ;
int T8_ ;
NCSTRING tmp ;
size_t tmp___0 ;
long tmp___1 ;
int T13_ ;
size_t tmp___2 ;
long tmp___3 ;
int T18_ ;
long tmp___4 ;
long tmp___5 ;
{
nimErr_ = nimErrorFlag();
flockfile(stdout);
s = (NimStringV2 *)0;
i = (NI )0;
while (1) {
if (! (i < argsLen_0)) {
goto LA4;
}
s = args + i;
T7_ = (void *)0;
tmp = nimToCStringConv(*s);
T7_ = (void *)tmp;
T8_ = 0;
tmp___0 = fwrite((void const * __restrict )T7_, (size_t )s->len, (size_t )1,
(FILE * __restrict )stdout);
T8_ = (int )tmp___0;
if (! (! ((NI )T8_ == s->len))) {
goto LA9_;
}
checkErr__fU6ZlJAtQ9bre04EDZLdGsA(stdout);
tmp___1 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___1) {
goto LA1_;
}
LA9_:
i ++;
}
LA4:
T13_ = 0;
tmp___2 = fwrite((void const * __restrict )((void *)"\n"), (size_t )1, (size_t )1,
(FILE * __restrict )stdout);
T13_ = (int )tmp___2;
if (! (! (T13_ == 1))) {
goto LA14_;
}
checkErr__fU6ZlJAtQ9bre04EDZLdGsA(stdout);
tmp___3 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___3) {
goto LA1_;
}
LA14_:
T18_ = 0;
T18_ = fflush(stdout);
if (! (! (T18_ == 0))) {
goto LA19_;
}
checkErr__fU6ZlJAtQ9bre04EDZLdGsA(stdout);
tmp___4 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___4) {
goto LA1_;
}
LA19_: ;
LA1_:
funlockfile(stdout);
tmp___5 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___5) {
}
return;
}
}
#pragma merger("0","/tmp/cil-0YjYf8EG.i","-w,-fmax-errors=3,-O3,-fno-strict-aliasing,-fno-ident")
#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"
NI nim_program_result ;
extern __attribute__((__nothrow__)) void *( __attribute__((__nonnull__(1), __leaf__)) memset)(void *__s ,
int __c ,
size_t __n ) ;
extern __attribute__((__nothrow__)) size_t ( __attribute__((__nonnull__(1), __leaf__)) strlen)(char const *__s ) __attribute__((__pure__)) ;
__inline extern __attribute__((__nothrow__)) double ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atof)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atoi)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern __attribute__((__nothrow__)) long ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atol)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern __attribute__((__nothrow__)) long long ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atoll)(char const *__nptr ) __attribute__((__pure__)) ;
extern __attribute__((__nothrow__)) double ( __attribute__((__nonnull__(1), __leaf__)) strtod)(char const * __restrict __nptr ,
char ** __restrict __endptr ) ;
extern __attribute__((__nothrow__)) long ( __attribute__((__nonnull__(1), __leaf__)) strtol)(char const * __restrict __nptr ,
char ** __restrict __endptr ,
int __base ) ;
extern __attribute__((__nothrow__)) long long ( __attribute__((__nonnull__(1), __leaf__)) strtoll)(char const * __restrict __nptr ,
char ** __restrict __endptr ,
int __base ) ;
__inline extern __attribute__((__nothrow__)) int ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atoi)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern int ( __attribute__((__nonnull__(1), __leaf__, __gnu_inline__)) atoi)(char const *__nptr )
{
long tmp ;
{
tmp = strtol((char const * __restrict )__nptr, (char ** __restrict )((char **)((void *)0)),
10);
return ((int )tmp);
}
}
__inline extern __attribute__((__nothrow__)) long ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atol)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern long ( __attribute__((__nonnull__(1), __leaf__, __gnu_inline__)) atol)(char const *__nptr )
{
long tmp ;
{
tmp = strtol((char const * __restrict )__nptr, (char ** __restrict )((char **)((void *)0)),
10);
return (tmp);
}
}
__inline extern __attribute__((__nothrow__)) long long ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atoll)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern long long ( __attribute__((__nonnull__(1), __leaf__, __gnu_inline__)) atoll)(char const *__nptr )
{
long long tmp ;
{
tmp = strtoll((char const * __restrict )__nptr, (char ** __restrict )((char **)((void *)0)),
10);
return (tmp);
}
}
extern __attribute__((__nothrow__)) void *( __attribute__((__leaf__)) malloc)(size_t __size ) __attribute__((__malloc__,
__alloc_size__(1))) ;
extern __attribute__((__nothrow__)) void *( __attribute__((__leaf__)) calloc)(size_t __nmemb ,
size_t __size ) __attribute__((__malloc__,
__alloc_size__(1,2))) ;
extern __attribute__((__nothrow__)) void *( __attribute__((__warn_unused_result__,
__leaf__)) realloc)(void *__ptr , size_t __size ) __attribute__((__alloc_size__(2))) ;
extern __attribute__((__nothrow__)) void ( __attribute__((__leaf__)) free)(void *__ptr ) ;
extern __attribute__((__nothrow__, __noreturn__)) void ( __attribute__((__leaf__)) exit)(int __status ) ;
__inline extern void *( __attribute__((__nonnull__(1,2,5), __gnu_inline__)) bsearch)(void const *__key ,
void const *__base ,
size_t __nmemb ,
size_t __size ,
int (*__compar)(void const * ,
void const * ) ) ;
__inline extern void *( __attribute__((__nonnull__(1,2,5), __gnu_inline__)) bsearch)(void const *__key ,
void const *__base ,
size_t __nmemb ,
size_t __size ,
int (*__compar)(void const * ,
void const * ) )
{
size_t __l ;
size_t __u ;
size_t __idx ;
void const *__p ;
int __comparison ;
{
__l = (size_t )0;
__u = __nmemb;
while (__l < __u) {
__idx = (__l + __u) / 2UL;
__p = (void const *)((void *)((char const *)__base + __idx * __size));
__comparison = (*__compar)(__key, __p);
if (__comparison < 0) {
__u = __idx;
} else
if (__comparison > 0) {
__l = __idx + 1UL;
} else {
return ((void *)__p);
}
}
return ((void *)0);
}
}
__inline extern __attribute__((__nothrow__)) double ( __attribute__((__nonnull__(1),
__leaf__, __gnu_inline__)) atof)(char const *__nptr ) __attribute__((__pure__)) ;
__inline extern double ( __attribute__((__nonnull__(1), __leaf__, __gnu_inline__)) atof)(char const *__nptr )
{
double tmp ;
{
tmp = strtod((char const * __restrict )__nptr, (char ** __restrict )((char **)((void *)0)));
return (tmp);
}
}
extern FILE *stderr ;
extern __attribute__((__nothrow__)) __sighandler_t ( __attribute__((__leaf__)) signal)(int __sig ,
void (*__handler)(int ) ) ;
extern __attribute__((__nothrow__)) int ( __attribute__((__leaf__)) raise)(int __sig ) ;
__inline static void initStackBottom(void) ;
void signalHandler(int sign ) ;
void showErrorMessage__T9b42zC1n39bfjypEaUpct0g(NCSTRING data , NI length ) ;
__inline static void nimZeroMem(void *p , NI size ) ;
__inline static void nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(void *a , int v , NI size ) ;
__inline static _Bool *nimErrorFlag(void) ;
NimStringV2 toNimStr(NCSTRING str , NI len ) ;
void *alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg(NI size ) ;
__inline static void copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(void *dest , void *source ,
NI size ) ;
__inline static void nimCopyMem(void *dest , void *source , NI size ) ;
__inline static NI nimCStrLen(NCSTRING a ) ;
void dealloc(void *p ) ;
void deallocImpl__SAtZpVrJ3o5FJvSdLQe9auA(void *p ) ;
__inline static void popCurrentException(void) ;
void eqcopy___T4HCXq9b9bmRBkztIGW1WmXw(Exception **dest , Exception *src , _Bool cyclic ) ;
__inline static void nimIncRefCyclic(void *p , _Bool cyclic ) ;
__inline static NI minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(NI x , NI y ) ;
__inline static _Bool nimDecRefIsLastCyclicDyn(void *p ) ;
void ( __attribute__((__noinline__)) rememberCycle__LoYD9cYK9aJvrcDizBN64qaQ)(_Bool isDestroyAction ,
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc ) ;
void unregisterCycle__rR8fldvW9aUfvKydORzL1RA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ) ;
void registerCycle__W1emNvKsDKJ8tfxEiEnOvg(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc ) ;
void init__wKM37ZoL6WtPOU9bn6Ug18A(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ,
NI cap ) ;
void *allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(NI size ) ;
__inline static void add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ,
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *c ,
TNimTypeV2 *t ) ;
void collectCycles__amVlU9ajqZ06ujoesRBHcDg(void) ;
void collectCyclesBacon__cKo5xgNSZEVlhzdcplUDNA(tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ,
NI lowMark ) ;
void markGray__t5JPtD1AT5y7bGV1vv4KJA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ) ;
__inline static void trace__Pgw8McKUNuhxTelmFLa61gsystem(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ) ;
__inline static NI pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system(NI x , NI y ) ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA pop__9bpeBAtt9aCP5OFUArCn3DJg(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ) ;
void scan__t5JPtD1AT5y7bGV1vv4KJA_2(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ) ;
void scanBlack__t5JPtD1AT5y7bGV1vv4KJA_3(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ) ;
void collectColor__kzUmIxtf9aW5aryQ9cs2r0vA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , NI col , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ) ;
__inline static void free__w63mdtqWwp9aJ3R0H3korhgsystem(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc ) ;
void nimRawDispose(void *p , NI alignment ) ;
NI align__vzThvqZajaR9ct9cQ7SOy1tQ(NI address , NI alignment ) ;
void alignedDealloc(void *p , NI align ) ;
void deinit__oft1PYVJXbZgUjpiFAeaqg(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ) ;
void nimDestroyAndDispose(void *p ) ;
void writeToStdErr__7LQulNmLFN9auOCHBWBPKMw(NCSTRING msg , NI length ) ;
__inline static void rawWriteString(FILE *f , NCSTRING s , NI length ) ;
void registerSignalHandler__amVlU9ajqZ06ujoesRBHcDg_2(void) ;
void addInt__mftMOxbyu0h4yByfs3sqjA(NimStringV2 *result , NI64 x ) ;
NI ( __attribute__((__noinline__)) digits10__duY57oPUFW9aU9aeyQ9cREIjg)(NU64 num ) ;
void setLengthStrV2(NimStringV2 *s , NI newLen ) ;
void prepareAdd(NimStringV2 *s , NI addlen ) ;
__inline static NI resize__cOCDWr16YD4j3dBrbbH3yQsystem(NI old ) ;
void *realloc0Impl__CRabJkeE1THyovTYlxjdVw(void *p , NI oldSize , NI newSize ) ;
void *reallocImpl__aVKf1wTLXmon0P1kdfx69aw(void *p , NI newSize ) ;
__inline static void zeroMem__FsvhfMqbswETmyMWtamDewsystem(void *p , NI size ) ;
__inline static void nimPrepareStrMutationV2(NimStringV2 *s ) ;
void nimPrepareStrMutationImpl__C0YoABEefTaYbWLv9aVOzZA(NimStringV2 *s ) ;
void *alignedAlloc0__tDURxGxuLs0hKEDbtrBxug(NI size , NI align ) ;
void eqdestroy___SYSukaUCM8gzz0Sv57LsMA(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest ) ;
void eqdestroy___4fQQqvAqifkWGVa4g39cI5A(tySequence__uB9b75OUPRENsBAu4AnoePA *dest ) ;
void eqtrace___kt5U9cg2uLmsGJJLbv82xUA(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest ,
void *env ) ;
__inline static void nimTraceRefDyn(void *q , void *env ) ;
void eqtrace___kDvIcrGphqE2lmGa3RNr5A(NimStringV2 *dest , void *env ) ;
void eqtrace___9cqRrToT354sdOysDOB1O2A(tySequence__uB9b75OUPRENsBAu4AnoePA *dest ,
void *env ) ;
void eqdispose___SYSukaUCM8gzz0Sv57LsMA_2(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest ) ;
void eqdispose___dS1BF3Vxjg9aJMmmhVJKSpQ_2(NimStringV2 *dest ) ;
void eqdispose___4fQQqvAqifkWGVa4g39cI5A_2(tySequence__uB9b75OUPRENsBAu4AnoePA *dest ) ;
void add__VHIeeMfqavFfKtbV1Wal0Q(tySequence__uB9b75OUPRENsBAu4AnoePA *x , tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA value ) ;
void *prepareSeqAdd(NI len , void *p , NI addlen , NI elemSize , NI elemAlign ) ;
void *newSeqPayload(NI cap , NI elemSize , NI elemAlign ) ;
void *alignedRealloc0__RCSc9brnnLyF1fOxNrJWWwA(void *p , NI oldSize , NI newSize ,
NI align ) ;
void *alignedAlloc__tDURxGxuLs0hKEDbtrBxug_2(NI size , NI align ) ;
void raiseExceptionAux__na8C8pUZ9cLQWVwk35l5vfw(Exception *e ) ;
__inline static void pushCurrentException(Exception *e ) ;
void eqsink___rR9boD7urcxl7uyUtE46AOA(Exception **dest , Exception *src ) ;
void reportUnhandledError__na8C8pUZ9cLQWVwk35l5vfw_2(Exception *e ) ;
void reportUnhandledErrorAux__na8C8pUZ9cLQWVwk35l5vfw_3(Exception *e ) ;
NimStringV2 dollar___liwwu6qv5HyRiFI58oBO0g(tySequence__uB9b75OUPRENsBAu4AnoePA stackTraceEntries ) ;
__inline static void appendString(NimStringV2 *dest , NimStringV2 src ) ;
void add__8FwY5enLGB0dFerO6Ny9caw(NimStringV2 *x , NCSTRING y ) ;
__inline static void nimAddCharV1(NimStringV2 *s , NIM_CHAR c ) ;
__inline static NCSTRING nimToCStringConv(NimStringV2 s ) ;
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_2_60456539 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_2 = {(NI )(200UL | (1UL << 62)),
{(NIM_CHAR )'0', (NIM_CHAR )'0', (NIM_CHAR )'0', (NIM_CHAR )'1', (NIM_CHAR )'0',
(NIM_CHAR )'2', (NIM_CHAR )'0', (NIM_CHAR )'3', (NIM_CHAR )'0', (NIM_CHAR )'4',
(NIM_CHAR )'0', (NIM_CHAR )'5', (NIM_CHAR )'0', (NIM_CHAR )'6', (NIM_CHAR )'0',
(NIM_CHAR )'7', (NIM_CHAR )'0', (NIM_CHAR )'8', (NIM_CHAR )'0', (NIM_CHAR )'9',
(NIM_CHAR )'1', (NIM_CHAR )'0', (NIM_CHAR )'1', (NIM_CHAR )'1', (NIM_CHAR )'1',
(NIM_CHAR )'2', (NIM_CHAR )'1', (NIM_CHAR )'3', (NIM_CHAR )'1', (NIM_CHAR )'4',
(NIM_CHAR )'1', (NIM_CHAR )'5', (NIM_CHAR )'1', (NIM_CHAR )'6', (NIM_CHAR )'1',
(NIM_CHAR )'7', (NIM_CHAR )'1', (NIM_CHAR )'8', (NIM_CHAR )'1', (NIM_CHAR )'9',
(NIM_CHAR )'2', (NIM_CHAR )'0', (NIM_CHAR )'2', (NIM_CHAR )'1', (NIM_CHAR )'2',
(NIM_CHAR )'2', (NIM_CHAR )'2', (NIM_CHAR )'3', (NIM_CHAR )'2', (NIM_CHAR )'4',
(NIM_CHAR )'2', (NIM_CHAR )'5', (NIM_CHAR )'2', (NIM_CHAR )'6', (NIM_CHAR )'2',
(NIM_CHAR )'7', (NIM_CHAR )'2', (NIM_CHAR )'8', (NIM_CHAR )'2', (NIM_CHAR )'9',
(NIM_CHAR )'3', (NIM_CHAR )'0', (NIM_CHAR )'3', (NIM_CHAR )'1', (NIM_CHAR )'3',
(NIM_CHAR )'2', (NIM_CHAR )'3', (NIM_CHAR )'3', (NIM_CHAR )'3', (NIM_CHAR )'4',
(NIM_CHAR )'3', (NIM_CHAR )'5', (NIM_CHAR )'3', (NIM_CHAR )'6', (NIM_CHAR )'3',
(NIM_CHAR )'7', (NIM_CHAR )'3', (NIM_CHAR )'8', (NIM_CHAR )'3', (NIM_CHAR )'9',
(NIM_CHAR )'4', (NIM_CHAR )'0', (NIM_CHAR )'4', (NIM_CHAR )'1', (NIM_CHAR )'4',
(NIM_CHAR )'2', (NIM_CHAR )'4', (NIM_CHAR )'3', (NIM_CHAR )'4', (NIM_CHAR )'4',
(NIM_CHAR )'4', (NIM_CHAR )'5', (NIM_CHAR )'4', (NIM_CHAR )'6', (NIM_CHAR )'4',
(NIM_CHAR )'7', (NIM_CHAR )'4', (NIM_CHAR )'8', (NIM_CHAR )'4', (NIM_CHAR )'9',
(NIM_CHAR )'5', (NIM_CHAR )'0', (NIM_CHAR )'5', (NIM_CHAR )'1', (NIM_CHAR )'5',
(NIM_CHAR )'2', (NIM_CHAR )'5', (NIM_CHAR )'3', (NIM_CHAR )'5', (NIM_CHAR )'4',
(NIM_CHAR )'5', (NIM_CHAR )'5', (NIM_CHAR )'5', (NIM_CHAR )'6', (NIM_CHAR )'5',
(NIM_CHAR )'7', (NIM_CHAR )'5', (NIM_CHAR )'8', (NIM_CHAR )'5', (NIM_CHAR )'9',
(NIM_CHAR )'6', (NIM_CHAR )'0', (NIM_CHAR )'6', (NIM_CHAR )'1', (NIM_CHAR )'6',
(NIM_CHAR )'2', (NIM_CHAR )'6', (NIM_CHAR )'3', (NIM_CHAR )'6', (NIM_CHAR )'4',
(NIM_CHAR )'6', (NIM_CHAR )'5', (NIM_CHAR )'6', (NIM_CHAR )'6', (NIM_CHAR )'6',
(NIM_CHAR )'7', (NIM_CHAR )'6', (NIM_CHAR )'8', (NIM_CHAR )'6', (NIM_CHAR )'9',
(NIM_CHAR )'7', (NIM_CHAR )'0', (NIM_CHAR )'7', (NIM_CHAR )'1', (NIM_CHAR )'7',
(NIM_CHAR )'2', (NIM_CHAR )'7', (NIM_CHAR )'3', (NIM_CHAR )'7', (NIM_CHAR )'4',
(NIM_CHAR )'7', (NIM_CHAR )'5', (NIM_CHAR )'7', (NIM_CHAR )'6', (NIM_CHAR )'7',
(NIM_CHAR )'7', (NIM_CHAR )'7', (NIM_CHAR )'8', (NIM_CHAR )'7', (NIM_CHAR )'9',
(NIM_CHAR )'8', (NIM_CHAR )'0', (NIM_CHAR )'8', (NIM_CHAR )'1', (NIM_CHAR )'8',
(NIM_CHAR )'2', (NIM_CHAR )'8', (NIM_CHAR )'3', (NIM_CHAR )'8', (NIM_CHAR )'4',
(NIM_CHAR )'8', (NIM_CHAR )'5', (NIM_CHAR )'8', (NIM_CHAR )'6', (NIM_CHAR )'8',
(NIM_CHAR )'7', (NIM_CHAR )'8', (NIM_CHAR )'8', (NIM_CHAR )'8', (NIM_CHAR )'9',
(NIM_CHAR )'9', (NIM_CHAR )'0', (NIM_CHAR )'9', (NIM_CHAR )'1', (NIM_CHAR )'9',
(NIM_CHAR )'2', (NIM_CHAR )'9', (NIM_CHAR )'3', (NIM_CHAR )'9', (NIM_CHAR )'4',
(NIM_CHAR )'9', (NIM_CHAR )'5', (NIM_CHAR )'9', (NIM_CHAR )'6', (NIM_CHAR )'9',
(NIM_CHAR )'7', (NIM_CHAR )'9', (NIM_CHAR )'8', (NIM_CHAR )'9', (NIM_CHAR )'9',
(NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_3 = {(NI )200, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_2)};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_4 = {(NI )200, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_2)};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_5 = {(NI )200, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_2)};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_6 = {(NI )200, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_2)};
TNimTypeV2 NTIv2__iLZrPn9anoh9ad1MmO0RczFw_ ;
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_7_60456540 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_7 = {(NI )(17UL | (1UL << 62)),
{(NIM_CHAR )'[', (NIM_CHAR )'[', (NIM_CHAR )'r', (NIM_CHAR )'e', (NIM_CHAR )'r',
(NIM_CHAR )'a', (NIM_CHAR )'i', (NIM_CHAR )'s', (NIM_CHAR )'e', (NIM_CHAR )'d',
(NIM_CHAR )' ', (NIM_CHAR )'f', (NIM_CHAR )'r', (NIM_CHAR )'o', (NIM_CHAR )'m',
(NIM_CHAR )':', (NIM_CHAR )'\n', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_8 = {(NI )17, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_7)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_9_60456541 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_9 = {(NI )(3UL | (1UL << 62)),
{(NIM_CHAR )']', (NIM_CHAR )']', (NIM_CHAR )'\n', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_10 = {(NI )3, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_9)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_11_60456542 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_11 = {(NI )(1UL | (1UL << 62)),
{(NIM_CHAR )'(', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_12 = {(NI )1, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_11)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_13_60456543 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_13 = {(NI )(2UL | (1UL << 62)),
{(NIM_CHAR )',', (NIM_CHAR )' ', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_14 = {(NI )2, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_13)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_15_60456544 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_15 = {(NI )(1UL | (1UL << 62)),
{(NIM_CHAR )'0', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_16 = {(NI )1, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_15)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_17_60456545 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_17 = {(NI )(1UL | (1UL << 62)),
{(NIM_CHAR )')', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_18 = {(NI )1, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_17)};
static struct __anonstruct_TM__Q5wkpxktOdTGvlSRo9bzt9aw_19_60456546 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_19 = {(NI )(1UL | (1UL << 62)),
{(NIM_CHAR )'\n', (NIM_CHAR )'\000'}};
static struct NimStringV2 const TM__Q5wkpxktOdTGvlSRo9bzt9aw_20 = {(NI )1, (NimStrPayload *)(& TM__Q5wkpxktOdTGvlSRo9bzt9aw_19)};
tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w roots__XgPCChSejeKL9a47kDcmJZA ;
NI rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA = (NI )128;
_Bool (*globalRaiseHook__JbO1ti4ULxrw54m4zNPbpA)(Exception *e ) ;
_Bool (*localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg)(Exception *e ) ;
void (*outOfMemHook__kZNaA7u1MfSW5ZeoGvw8xg)(void) ;
void (*unhandledExceptionHook__RJpSsXsRUH8ochbXTEhRIw)(Exception *e ) ;
Exception *currException__9bVPeDJlYTi9bQApZpfH8wjg ;
void (*errorMessageWriter__ZXnv0JyrWe3HTd07wpSr7A)(NimStringV2 msg ) ;
TFrame *framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw ;
TSafePoint *excHandler__rqLlY5bs9atDw2OXYqJEn5g ;
GcFrameHeader *gcFramePtr__ot48iojqko9aFxGhyjjjVaA ;
void (*onUnhandledException__bFrawQlTKZhLweDD36j9b8g)(NimStringV2 msg ) ;
_Bool nimInErrorMode__759bT87luu8XGcbkw13FUjA ;
__inline static void initStackBottom(void)
{
{
return;
}
}
__inline static void nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(void *a , int v , NI size )
{
void *T1_ ;
{
T1_ = (void *)0;
T1_ = memset(a, v, (size_t )size);
return;
}
}
__inline static void nimZeroMem(void *p , NI size )
{
_Bool *nimErr_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, 0, size);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
}
return;
}
}
void *alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg(NI size )
{
void *result ;
{
result = (void *)0;
result = calloc((size_t )size, (size_t )1);
return (result);
}
}
NimStringV2 toNimStr(NCSTRING str , NI len )
{
NimStringV2 result ;
NI colontmpD_ ;
NimStrPayload *p ;
void *T6_ ;
{
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
if (! (len <= 0L)) {
goto LA3_;
}
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
result.len = (NI )0;
result.p = (NimStrPayload *)((void *)0);
goto LA1_;
LA3_:
colontmpD_ = (NI )0;
T6_ = (void *)0;
T6_ = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg((len + 1L) + 8L);
p = (NimStrPayload *)T6_;
p->cap = len;
if (! (0L < len)) {
goto LA9_;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& p->data[(NI )0]), (void *)str,
len);
LA9_:
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
colontmpD_ = len;
result.len = colontmpD_;
result.p = p;
LA1_: ;
return (result);
}
}
__inline static NI nimCStrLen(NCSTRING a )
{
NI result ;
size_t T1_ ;
{
result = (NI )0;
T1_ = (size_t )0;
T1_ = strlen((char const *)a);
result = (NI )T1_;
return (result);
}
}
NimStringV2 cstrToNimstr(NCSTRING str )
{
NimStringV2 result ;
NimStringV2 colontmpD_ ;
NimStringV2 colontmpD__2 ;
NCSTRING T6_ ;
NI tmp ;
NI tmp___0 ;
{
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
nimZeroMem((void *)(& colontmpD_), (NI )sizeof(NimStringV2 ));
nimZeroMem((void *)(& colontmpD__2), (NI )sizeof(NimStringV2 ));
if (! ((unsigned long )((void *)str) == (unsigned long )((void *)0))) {
goto LA3_;
}
colontmpD_ = toNimStr(str, (NI )0);
result = colontmpD_;
goto LA1_;
LA3_:
T6_ = (NCSTRING )0;
T6_ = str;
if (str) {
tmp = nimCStrLen(str);
tmp___0 = tmp;
} else {
tmp___0 = (NI )0;
}
colontmpD__2 = toNimStr(T6_, tmp___0);
result = colontmpD__2;
LA1_: ;
return (result);
}
}
void deallocImpl__SAtZpVrJ3o5FJvSdLQe9auA(void *p )
{
{
free(p);
return;
}
}
void dealloc(void *p )
{
{
deallocImpl__SAtZpVrJ3o5FJvSdLQe9auA(p);
return;
}
}
void eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(NimStringV2 *dest )
{
{
if (dest->p) {
if (! ((unsigned long )(dest->p)->cap & (1UL << 62))) {
dealloc((void *)dest->p);
}
}
return;
}
}
__inline static NI minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem(NI x , NI y )
{
NI result ;
{
result = (NI )0;
result = (NI )((NU )x - (NU )y);
return (result);
}
}
__inline static void nimIncRefCyclic(void *p , _Bool cyclic )
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *h ;
NI T1_ ;
{
T1_ = (NI )0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )p, (NI )16);
h = (tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *)T1_;
h->rc += 16L;
return;
}
}
void unregisterCycle__rR8fldvW9aUfvKydORzL1RA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s )
{
NI idx ;
{
idx = s->rootIdx - 1L;
*(roots__XgPCChSejeKL9a47kDcmJZA.d + idx) = *(roots__XgPCChSejeKL9a47kDcmJZA.d + (roots__XgPCChSejeKL9a47kDcmJZA.len - 1L));
((roots__XgPCChSejeKL9a47kDcmJZA.d + idx)->Field0)->rootIdx = idx + 1L;
(roots__XgPCChSejeKL9a47kDcmJZA.len) --;
s->rootIdx = (NI )0;
return;
}
}
void *allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(NI size )
{
void *result ;
{
result = (void *)0;
result = malloc((size_t )size);
return (result);
}
}
void init__wKM37ZoL6WtPOU9bn6Ug18A(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ,
NI cap )
{
void *T1_ ;
{
s->len = (NI )0;
s->cap = cap;
T1_ = (void *)0;
T1_ = allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(s->cap * 16L);
s->d = (tyTuple__0F3Kz25HWtRatQmCDVHWEA *)T1_;
return;
}
}
__inline static void add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s ,
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *c ,
TNimTypeV2 *t )
{
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *colontmp_ ;
TNimTypeV2 *colontmp__2 ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA *d ;
void *T5_ ;
void *T6_ ;
{
if (! (s->cap <= s->len)) {
goto LA3_;
}
s->cap = (s->cap * 3L) / 2L;
T5_ = (void *)0;
T5_ = allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(s->cap * 16L);
d = (tyTuple__0F3Kz25HWtRatQmCDVHWEA *)T5_;
T6_ = (void *)0;
T6_ = (void *)s->d;
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)d, T6_, s->len * 16L);
dealloc((void *)s->d);
s->d = d;
LA3_:
colontmp_ = c;
colontmp__2 = t;
(s->d + s->len)->Field0 = colontmp_;
(s->d + s->len)->Field1 = colontmp__2;
(s->len) ++;
return;
}
}
__inline static NI pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system(NI x , NI y )
{
NI result ;
{
result = (NI )0;
result = (NI )((NU )x + (NU )y);
return (result);
}
}
__inline static void trace__Pgw8McKUNuhxTelmFLa61gsystem(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j )
{
_Bool *nimErr_ ;
void *p ;
NI T5_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
if (! (! ((unsigned long )desc->traceImpl == (unsigned long )((void *)0)))) {
goto LA3_;
}
T5_ = (NI )0;
T5_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )s, (NI )16);
p = (void *)T5_;
(*((void (*)(void *p , void *env ))desc->traceImpl))(p, (void *)j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA3_: ;
BeforeRet_: ;
return;
}
}
tyTuple__0F3Kz25HWtRatQmCDVHWEA pop__9bpeBAtt9aCP5OFUArCn3DJg(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s )
{
tyTuple__0F3Kz25HWtRatQmCDVHWEA result ;
{
nimZeroMem((void *)(& result), (NI )sizeof(tyTuple__0F3Kz25HWtRatQmCDVHWEA ));
result = *(s->d + (s->len - 1L));
(s->len) --;
return (result);
}
}
void markGray__t5JPtD1AT5y7bGV1vv4KJA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j )
{
_Bool *nimErr_ ;
long tmp ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA T7_ ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *t ;
TNimTypeV2 *desc_2 ;
long tmp___0 ;
{
nimErr_ = nimErrorFlag();
if (! (! ((s->rc & 3L) == 1L))) {
goto LA3_;
}
s->rc = (s->rc & -4L) | 1L;
(j->touched) ++;
j->rcSum += (s->rc >> 4UL) + 1L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(s, desc, j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
while (1) {
if (! (0L < j->traceStack.len)) {
goto LA6;
}
T7_ = pop__9bpeBAtt9aCP5OFUArCn3DJg(& j->traceStack);
t = T7_.Field0;
desc_2 = T7_.Field1;
t->rc -= 16L;
(j->edges) ++;
if (! (! ((t->rc & 3L) == 1L))) {
goto LA10_;
}
t->rc = (t->rc & -4L) | 1L;
(j->touched) ++;
j->rcSum += (t->rc >> 4UL) + 2L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(t, desc_2, j);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
LA10_: ;
}
LA6: ;
LA3_: ;
BeforeRet_: ;
return;
}
}
void scanBlack__t5JPtD1AT5y7bGV1vv4KJA_3(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j )
{
NI until ;
_Bool *nimErr_ ;
long tmp ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA T3_ ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *t ;
TNimTypeV2 *desc_2 ;
long tmp___0 ;
{
nimErr_ = nimErrorFlag();
s->rc &= -4L;
until = j->traceStack.len;
trace__Pgw8McKUNuhxTelmFLa61gsystem(s, desc, j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
while (1) {
if (! (until < j->traceStack.len)) {
goto LA2;
}
T3_ = pop__9bpeBAtt9aCP5OFUArCn3DJg(& j->traceStack);
t = T3_.Field0;
desc_2 = T3_.Field1;
t->rc += 16L;
if (! (! ((t->rc & 3L) == 0L))) {
goto LA6_;
}
t->rc &= -4L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(t, desc_2, j);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
LA6_: ;
}
LA2: ;
BeforeRet_: ;
return;
}
}
void scan__t5JPtD1AT5y7bGV1vv4KJA_2(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j )
{
_Bool *nimErr_ ;
long tmp ;
long tmp___0 ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA T12_ ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *t ;
TNimTypeV2 *desc_2 ;
long tmp___1 ;
long tmp___2 ;
{
nimErr_ = nimErrorFlag();
if (! ((s->rc & 3L) == 1L)) {
goto LA3_;
}
if (! (0L <= s->rc >> 4UL)) {
goto LA7_;
}
scanBlack__t5JPtD1AT5y7bGV1vv4KJA_3(s, desc, j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
goto LA5_;
LA7_:
s->rc = (s->rc & -4L) | 2L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(s, desc, j);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
while (1) {
if (! (0L < j->traceStack.len)) {
goto LA11;
}
T12_ = pop__9bpeBAtt9aCP5OFUArCn3DJg(& j->traceStack);
t = T12_.Field0;
desc_2 = T12_.Field1;
if (! ((t->rc & 3L) == 1L)) {
goto LA15_;
}
if (! (0L <= t->rc >> 4UL)) {
goto LA19_;
}
scanBlack__t5JPtD1AT5y7bGV1vv4KJA_3(t, desc_2, j);
tmp___1 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___1) {
goto BeforeRet_;
}
goto LA17_;
LA19_:
t->rc = (t->rc & -4L) | 2L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(t, desc_2, j);
tmp___2 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___2) {
goto BeforeRet_;
}
LA17_: ;
LA15_: ;
}
LA11: ;
LA5_: ;
LA3_: ;
BeforeRet_: ;
return;
}
}
void collectColor__kzUmIxtf9aW5aryQ9cs2r0vA(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc , NI col , tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j )
{
_Bool *nimErr_ ;
_Bool T3_ ;
long tmp ;
tyTuple__0F3Kz25HWtRatQmCDVHWEA T9_ ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *t ;
TNimTypeV2 *desc_2 ;
_Bool T12_ ;
long tmp___0 ;
{
nimErr_ = nimErrorFlag();
T3_ = (_Bool)0;
T3_ = (_Bool )((s->rc & 3L) == col);
if (! T3_) {
goto LA4_;
}
T3_ = (_Bool )(s->rootIdx == 0L);
LA4_: ;
if (! T3_) {
goto LA5_;
}
s->rc &= -4L;
add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(& j->toFree, s, desc);
trace__Pgw8McKUNuhxTelmFLa61gsystem(s, desc, j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
while (1) {
if (! (0L < j->traceStack.len)) {
goto LA8;
}
T9_ = pop__9bpeBAtt9aCP5OFUArCn3DJg(& j->traceStack);
t = T9_.Field0;
desc_2 = T9_.Field1;
T12_ = (_Bool)0;
T12_ = (_Bool )((t->rc & 3L) == col);
if (! T12_) {
goto LA13_;
}
T12_ = (_Bool )(t->rootIdx == 0L);
LA13_: ;
if (! T12_) {
goto LA14_;
}
add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(& j->toFree, t, desc_2);
t->rc &= -4L;
trace__Pgw8McKUNuhxTelmFLa61gsystem(t, desc_2, j);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
LA14_: ;
}
LA8: ;
LA5_: ;
BeforeRet_: ;
return;
}
}
NI align__vzThvqZajaR9ct9cQ7SOy1tQ(NI address , NI alignment )
{
NI result ;
{
result = (NI )0;
if (! (alignment == 0L)) {
goto LA3_;
}
result = address;
goto LA1_;
LA3_:
result = (address + (alignment - 1L)) & (NI )((NU64 )(~ (alignment - 1L)));
LA1_: ;
return (result);
}
}
void alignedDealloc(void *p , NI align )
{
NU16 offset ;
NI T6_ ;
NI T7_ ;
{
if (! (align <= 16L)) {
goto LA3_;
}
dealloc(p);
goto LA1_;
LA3_:
T6_ = (NI )0;
T6_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )p, (NI )2);
offset = *((NU16 *)((void *)T6_));
T7_ = (NI )0;
T7_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )p, (NI )offset);
dealloc((void *)T7_);
LA1_: ;
return;
}
}
void nimRawDispose(void *p , NI alignment )
{
NI hdrSize ;
NI T1_ ;
{
hdrSize = align__vzThvqZajaR9ct9cQ7SOy1tQ((NI )16, alignment);
T1_ = (NI )0;
T1_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )p, hdrSize);
alignedDealloc((void *)T1_, alignment);
return;
}
}
__inline static void free__w63mdtqWwp9aJ3R0H3korhgsystem(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc )
{
void *p ;
NI T1_ ;
_Bool *nimErr_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
T1_ = (NI )0;
T1_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )s, (NI )16);
p = (void *)T1_;
if (! (! ((unsigned long )desc->disposeImpl == (unsigned long )((void *)0)))) {
goto LA4_;
}
(*((void (*)(void *p ))desc->disposeImpl))(p);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA4_:
nimRawDispose(p, desc->align);
BeforeRet_: ;
return;
}
}
void deinit__oft1PYVJXbZgUjpiFAeaqg(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w *s )
{
{
if (! (! ((unsigned long )s->d == (unsigned long )((tyTuple__0F3Kz25HWtRatQmCDVHWEA *)((void *)0))))) {
goto LA3_;
}
dealloc((void *)s->d);
s->d = (tyTuple__0F3Kz25HWtRatQmCDVHWEA *)((void *)0);
LA3_:
s->len = (NI )0;
s->cap = (NI )0;
return;
}
}
void collectCyclesBacon__cKo5xgNSZEVlhzdcplUDNA(tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ,
NI lowMark )
{
NI last ;
NI colToCollect ;
_Bool *nimErr_ ;
NI i ;
NI res ;
long tmp ;
NI i_2 ;
NI res_2 ;
long tmp___0 ;
NI i_3 ;
NI i_4 ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ;
long tmp___1 ;
NI i_5 ;
NI i_6 ;
long tmp___2 ;
{
nimErr_ = nimErrorFlag();
last = roots__XgPCChSejeKL9a47kDcmJZA.len - 1L;
i = (NI )0;
res = last;
while (1) {
if (! (lowMark <= res)) {
goto LA3;
}
i = res;
markGray__t5JPtD1AT5y7bGV1vv4KJA((roots__XgPCChSejeKL9a47kDcmJZA.d + i)->Field0,
(roots__XgPCChSejeKL9a47kDcmJZA.d + i)->Field1,
j);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
res --;
}
LA3:
colToCollect = (NI )2;
if (! (j->rcSum == j->edges)) {
goto LA6_;
}
colToCollect = (NI )1;
j->keepThreshold = (_Bool)1;
goto LA4_;
LA6_:
i_2 = (NI )0;
res_2 = last;
while (1) {
if (! (lowMark <= res_2)) {
goto LA11;
}
i_2 = res_2;
scan__t5JPtD1AT5y7bGV1vv4KJA_2((roots__XgPCChSejeKL9a47kDcmJZA.d + i_2)->Field0,
(roots__XgPCChSejeKL9a47kDcmJZA.d + i_2)->Field1,
j);
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
res_2 --;
}
LA11: ;
LA4_:
init__wKM37ZoL6WtPOU9bn6Ug18A(& j->toFree, (NI )1024);
i_3 = (NI )0;
i_4 = (NI )0;
while (1) {
if (! (i_4 < roots__XgPCChSejeKL9a47kDcmJZA.len)) {
goto LA14;
}
i_3 = i_4;
s = (roots__XgPCChSejeKL9a47kDcmJZA.d + i_3)->Field0;
s->rootIdx = (NI )0;
collectColor__kzUmIxtf9aW5aryQ9cs2r0vA(s, (roots__XgPCChSejeKL9a47kDcmJZA.d + i_3)->Field1,
colToCollect, j);
tmp___1 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___1) {
goto BeforeRet_;
}
i_4 ++;
}
LA14:
i_5 = (NI )0;
i_6 = (NI )0;
while (1) {
if (! (i_6 < j->toFree.len)) {
goto LA17;
}
i_5 = i_6;
free__w63mdtqWwp9aJ3R0H3korhgsystem((j->toFree.d + i_5)->Field0, (j->toFree.d + i_5)->Field1);
tmp___2 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___2) {
goto BeforeRet_;
}
i_6 ++;
}
LA17:
j->freed += j->toFree.len;
deinit__oft1PYVJXbZgUjpiFAeaqg(& j->toFree);
BeforeRet_: ;
return;
}
}
void collectCycles__amVlU9ajqZ06ujoesRBHcDg(void)
{
tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ j ;
_Bool *nimErr_ ;
long tmp ;
_Bool T3_ ;
{
nimErr_ = nimErrorFlag();
nimZeroMem((void *)(& j), (NI )sizeof(tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ ));
init__wKM37ZoL6WtPOU9bn6Ug18A(& j.traceStack, (NI )1024);
collectCyclesBacon__cKo5xgNSZEVlhzdcplUDNA(& j, (NI )0);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
deinit__oft1PYVJXbZgUjpiFAeaqg(& j.traceStack);
deinit__oft1PYVJXbZgUjpiFAeaqg(& roots__XgPCChSejeKL9a47kDcmJZA);
T3_ = (_Bool)0;
T3_ = j.keepThreshold;
if (! T3_) {
goto LA4_;
}
T3_ = (_Bool )(rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA <= 128L);
LA4_: ;
if (! T3_) {
goto LA5_;
}
goto LA1_;
LA5_: ;
if (! (j.touched <= j.freed * 2L)) {
goto LA8_;
}
if ((rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA / 3L) * 2L >= 16L) {
rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA = (rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA / 3L) * 2L;
} else {
rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA = (NI )16;
}
goto LA1_;
LA8_: ;
if (! (rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA < 2305843009213693951L)) {
goto LA11_;
}
rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA = (rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA * 3L) / 2L;
goto LA1_;
LA11_: ;
LA1_: ;
BeforeRet_: ;
return;
}
}
void registerCycle__W1emNvKsDKJ8tfxEiEnOvg(tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc )
{
_Bool *nimErr_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
s->rootIdx = roots__XgPCChSejeKL9a47kDcmJZA.len + 1L;
if (! ((unsigned long )roots__XgPCChSejeKL9a47kDcmJZA.d == (unsigned long )((tyTuple__0F3Kz25HWtRatQmCDVHWEA *)((void *)0)))) {
goto LA3_;
}
init__wKM37ZoL6WtPOU9bn6Ug18A(& roots__XgPCChSejeKL9a47kDcmJZA, (NI )1024);
LA3_:
add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(& roots__XgPCChSejeKL9a47kDcmJZA, s, desc);
if (! (rootsThreshold__0rSec7pL9bBpqVkeRvHLdCA <= roots__XgPCChSejeKL9a47kDcmJZA.len)) {
goto LA7_;
}
collectCycles__amVlU9ajqZ06ujoesRBHcDg();
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA7_: ;
BeforeRet_: ;
return;
}
}
void ( __attribute__((__noinline__)) rememberCycle__LoYD9cYK9aJvrcDizBN64qaQ)(_Bool isDestroyAction ,
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *s ,
TNimTypeV2 *desc )
{
_Bool *nimErr_ ;
_Bool T12_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
if (! isDestroyAction) {
goto LA3_;
}
if (! (0L < s->rootIdx)) {
goto LA7_;
}
unregisterCycle__rR8fldvW9aUfvKydORzL1RA(s);
LA7_: ;
goto LA1_;
LA3_:
T12_ = (_Bool)0;
T12_ = (_Bool )(s->rootIdx == 0L);
if (! T12_) {
goto LA13_;
}
T12_ = (_Bool)1;
LA13_: ;
if (! T12_) {
goto LA14_;
}
s->rc &= -4L;
registerCycle__W1emNvKsDKJ8tfxEiEnOvg(s, desc);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA14_: ;
LA1_: ;
BeforeRet_: ;
return;
}
}
__inline static _Bool nimDecRefIsLastCyclicDyn(void *p )
{
_Bool result ;
_Bool *nimErr_ ;
tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *cell ;
NI T5_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
result = (_Bool)0;
if (! (! ((unsigned long )p == (unsigned long )((void *)0)))) {
goto LA3_;
}
T5_ = (NI )0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )p, (NI )16);
cell = (tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *)T5_;
if (! ((cell->rc & -16L) == 0L)) {
goto LA8_;
}
result = (_Bool)1;
goto LA6_;
LA8_:
cell->rc -= 16L;
LA6_:
rememberCycle__LoYD9cYK9aJvrcDizBN64qaQ(result, cell, *((TNimTypeV2 **)p));
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA3_: ;
BeforeRet_: ;
return (result);
}
}
void nimDestroyAndDispose(void *p )
{
TNimTypeV2 **rti ;
_Bool *nimErr_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
rti = (TNimTypeV2 **)p;
if (! (! ((unsigned long )(*rti)->destructor == (unsigned long )((void *)0)))) {
goto LA3_;
}
(*((void (*)(void *p ))(*rti)->destructor))(p);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
goto BeforeRet_;
}
LA3_:
nimRawDispose(p, (*rti)->align);
BeforeRet_: ;
return;
}
}
void eqcopy___T4HCXq9b9bmRBkztIGW1WmXw(Exception **dest , Exception *src , _Bool cyclic )
{
Exception *colontmp_ ;
_Bool T7_ ;
{
colontmp_ = *dest;
if (! src) {
goto LA3_;
}
nimIncRefCyclic((void *)src, cyclic);
LA3_:
*dest = src;
T7_ = (_Bool)0;
T7_ = nimDecRefIsLastCyclicDyn((void *)colontmp_);
if (! T7_) {
goto LA8_;
}
nimDestroyAndDispose((void *)colontmp_);
LA8_: ;
return;
}
}
__inline static void popCurrentException(void)
{
{
eqcopy___T4HCXq9b9bmRBkztIGW1WmXw(& currException__9bVPeDJlYTi9bQApZpfH8wjg, currException__9bVPeDJlYTi9bQApZpfH8wjg->up,
(_Bool)0);
return;
}
}
__inline static void rawWriteString(FILE *f , NCSTRING s , NI length )
{
int T1_ ;
int T2_ ;
size_t tmp ;
{
T1_ = 0;
tmp = fwrite((void const * __restrict )((void *)s), (size_t )1, (size_t )length,
(FILE * __restrict )f);
T1_ = (int )tmp;
T2_ = 0;
T2_ = fflush(f);
return;
}
}
void writeToStdErr__7LQulNmLFN9auOCHBWBPKMw(NCSTRING msg , NI length )
{
{
rawWriteString(stderr, msg, length);
return;
}
}
void showErrorMessage__T9b42zC1n39bfjypEaUpct0g(NCSTRING data , NI length )
{
_Bool toWrite ;
_Bool *nimErr_ ;
NimStringV2 colontmpD_ ;
long tmp ;
long tmp___0 ;
{
nimErr_ = nimErrorFlag();
toWrite = (_Bool)1;
if (! (! ((unsigned long )errorMessageWriter__ZXnv0JyrWe3HTd07wpSr7A == (unsigned long )((void *)0)))) {
goto LA3_;
}
colontmpD_.len = (NI )0;
colontmpD_.p = (NimStrPayload *)((void *)0);
colontmpD_ = cstrToNimstr(data);
(*errorMessageWriter__ZXnv0JyrWe3HTd07wpSr7A)(colontmpD_);
toWrite = (_Bool)0;
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& colontmpD_);
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
*nimErr_ = (_Bool)0;
popCurrentException();
}
tmp___0 = __builtin_expect((long )*nimErr_, 0L);
if (tmp___0) {
goto BeforeRet_;
}
LA3_: ;
if (! toWrite) {
goto LA11_;
}
writeToStdErr__7LQulNmLFN9auOCHBWBPKMw(data, length);
LA11_: ;
BeforeRet_: ;
return;
}
}
void signalHandler(int sign )
{
NCSTRING msg ;
NCSTRING T26_ ;
void (*T27_)(int a ) ;
int T28_ ;
NI tmp ;
NI tmp___0 ;
{
msg = (NCSTRING )0;
if (! (sign == 2)) {
goto LA3_;
}
msg = (NCSTRING )"SIGINT: Interrupted by Ctrl-C.\n";
goto LA1_;
LA3_: ;
if (! (sign == 11)) {
goto LA6_;
}
msg = (NCSTRING )"SIGSEGV: Illegal storage access. (Attempt to read from nil?)\n";
goto LA1_;
LA6_: ;
if (! (sign == 6)) {
goto LA9_;
}
msg = (NCSTRING )"SIGABRT: Abnormal termination.\n";
goto LA1_;
LA9_: ;
if (! (sign == 8)) {
goto LA12_;
}
msg = (NCSTRING )"SIGFPE: Arithmetic error.\n";
goto LA1_;
LA12_: ;
if (! (sign == 4)) {
goto LA15_;
}
msg = (NCSTRING )"SIGILL: Illegal operation.\n";
goto LA1_;
LA15_: ;
goto LA18_;
msg = (NCSTRING )"SIGBUS: Illegal storage access. (Attempt to read from nil?)\n";
goto LA1_;
LA18_: ;
if (! (sign == 13)) {
goto LA24_;
}
msg = (NCSTRING )"SIGPIPE: Pipe closed.\n";
goto LA21;
LA24_:
msg = (NCSTRING )"unknown signal\n";
LA21: ;
LA1_:
T26_ = (NCSTRING )0;
T26_ = msg;
if (msg) {
tmp = nimCStrLen(msg);
tmp___0 = tmp;
} else {
tmp___0 = (NI )0;
}
showErrorMessage__T9b42zC1n39bfjypEaUpct0g(T26_, tmp___0);
T27_ = (void (*)(int a ))0;
T27_ = signal(sign, (void (*)(int a ))0);
T28_ = 0;
T28_ = raise(sign);
return;
}
}
void registerSignalHandler__amVlU9ajqZ06ujoesRBHcDg_2(void)
{
void (*T1_)(int a ) ;
void (*T2_)(int a ) ;
void (*T3_)(int a ) ;
void (*T4_)(int a ) ;
void (*T5_)(int a ) ;
void (*T6_)(int a ) ;
{
T1_ = (void (*)(int a ))0;
T1_ = signal(2, & signalHandler);
T2_ = (void (*)(int a ))0;
T2_ = signal(11, & signalHandler);
T3_ = (void (*)(int a ))0;
T3_ = signal(6, & signalHandler);
T4_ = (void (*)(int a ))0;
T4_ = signal(8, & signalHandler);
T5_ = (void (*)(int a ))0;
T5_ = signal(4, & signalHandler);
T6_ = (void (*)(int a ))0;
T6_ = signal(13, & signalHandler);
return;
}
}
NimStringV2 rawNewString(NI space )
{
NimStringV2 result ;
NimStrPayload *p ;
void *T6_ ;
{
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
if (! (space <= 0L)) {
goto LA3_;
}
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
result.len = (NI )0;
result.p = (NimStrPayload *)((void *)0);
goto LA1_;
LA3_:
T6_ = (void *)0;
T6_ = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg((space + 1L) + 8L);
p = (NimStrPayload *)T6_;
p->cap = space;
nimZeroMem((void *)(& result), (NI )sizeof(NimStringV2 ));
result.len = (NI )0;
result.p = p;
LA1_: ;
return (result);
}
}
NI ( __attribute__((__noinline__)) digits10__duY57oPUFW9aU9aeyQ9cREIjg)(NU64 num )
{
NI result ;
NI T39_ ;
{
result = (NI )0;
if (! (num < 10UL)) {
goto LA3_;
}
result = (NI )1;
goto LA1_;
LA3_: ;
if (! (num < 100UL)) {
goto LA6_;
}
result = (NI )2;
goto LA1_;
LA6_: ;
if (! (num < 1000UL)) {
goto LA9_;
}
result = (NI )3;
goto LA1_;
LA9_: ;
if (! (num < 10000UL)) {
goto LA12_;
}
result = (NI )4;
goto LA1_;
LA12_: ;
if (! (num < 100000UL)) {
goto LA15_;
}
result = (NI )5;
goto LA1_;
LA15_: ;
if (! (num < 1000000UL)) {
goto LA18_;
}
result = (NI )6;
goto LA1_;
LA18_: ;
if (! (num < 10000000UL)) {
goto LA21_;
}
result = (NI )7;
goto LA1_;
LA21_: ;
if (! (num < 100000000UL)) {
goto LA24_;
}
result = (NI )8;
goto LA1_;
LA24_: ;
if (! (num < 1000000000UL)) {
goto LA27_;
}
result = (NI )9;
goto LA1_;
LA27_: ;
if (! (num < 10000000000UL)) {
goto LA30_;
}
result = (NI )10;
goto LA1_;
LA30_: ;
if (! (num < 100000000000UL)) {
goto LA33_;
}
result = (NI )11;
goto LA1_;
LA33_: ;
if (! (num < 1000000000000UL)) {
goto LA36_;
}
result = (NI )12;
goto LA1_;
LA36_:
T39_ = (NI )0;
T39_ = digits10__duY57oPUFW9aU9aeyQ9cREIjg(num / 1000000000000UL);
result = 12L + T39_;
LA1_: ;
return (result);
}
}
__inline static NI resize__cOCDWr16YD4j3dBrbbH3yQsystem(NI old )
{
NI result ;
{
result = (NI )0;
if (! (old <= 0L)) {
goto LA3_;
}
result = (NI )4;
goto LA1_;
LA3_: ;
if (! (old < 65536L)) {
goto LA6_;
}
result = old * 2L;
goto LA1_;
LA6_:
result = (old * 3L) / 2L;
LA1_: ;
return (result);
}
}
void *reallocImpl__aVKf1wTLXmon0P1kdfx69aw(void *p , NI newSize )
{
void *result ;
{
result = (void *)0;
result = realloc(p, (size_t )newSize);
return (result);
}
}
__inline static void zeroMem__FsvhfMqbswETmyMWtamDewsystem(void *p , NI size )
{
{
nimZeroMem(p, size);
return;
}
}
void *realloc0Impl__CRabJkeE1THyovTYlxjdVw(void *p , NI oldSize , NI newSize )
{
void *result ;
void *T5_ ;
{
result = (void *)0;
result = reallocImpl__aVKf1wTLXmon0P1kdfx69aw(p, (NI )((size_t )newSize));
if (! (oldSize < newSize)) {
goto LA3_;
}
T5_ = (void *)0;
T5_ = (void *)((ptrdiff_t )result + oldSize);
zeroMem__FsvhfMqbswETmyMWtamDewsystem(T5_, newSize - oldSize);
LA3_: ;
return (result);
}
}
void prepareAdd(NimStringV2 *s , NI addlen )
{
NI newLen ;
_Bool T3_ ;
NimStrPayload *oldP ;
void *T7_ ;
void *T12_ ;
NI tmp ;
NI oldCap ;
NI newCap ;
NI T18_ ;
NI T19_ ;
void *T20_ ;
{
newLen = s->len + addlen;
T3_ = (_Bool)0;
T3_ = (_Bool )((unsigned long )s->p == (unsigned long )((NimStrPayload *)((void *)0)));
if (T3_) {
goto LA4_;
}
T3_ = (_Bool )(((s->p)->cap & 4611686018427387904L) == 4611686018427387904L);
LA4_: ;
if (! T3_) {
goto LA5_;
}
oldP = s->p;
T7_ = (void *)0;
T7_ = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg((newLen + 1L) + 8L);
s->p = (NimStrPayload *)T7_;
(s->p)->cap = newLen;
if (! (0L < s->len)) {
goto LA10_;
}
T12_ = (void *)0;
T12_ = (void *)(& (s->p)->data[(NI )0]);
if (s->len <= newLen) {
tmp = s->len;
} else {
tmp = newLen;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T12_, (void *)(& oldP->data[(NI )0]), tmp);
LA10_: ;
goto LA1_;
LA5_:
oldCap = (s->p)->cap & -4611686018427387905L;
if (! (oldCap < newLen)) {
goto LA16_;
}
T18_ = (NI )0;
T18_ = resize__cOCDWr16YD4j3dBrbbH3yQsystem(oldCap);
if (newLen >= T18_) {
newCap = newLen;
} else {
newCap = T18_;
}
T19_ = (NI )0;
T19_ = (oldCap + 1L) + 8L;
T20_ = (void *)0;
T20_ = realloc0Impl__CRabJkeE1THyovTYlxjdVw((void *)s->p, T19_, (newCap + 1L) + 8L);
s->p = (NimStrPayload *)T20_;
(s->p)->cap = newCap;
LA16_: ;
LA1_: ;
return;
}
}
void setLengthStrV2(NimStringV2 *s , NI newLen )
{
_Bool T8_ ;
_Bool T10_ ;
NimStringV2 *T14_ ;
{
if (! (newLen == 0L)) {
goto LA3_;
}
goto LA1_;
LA3_:
T8_ = (_Bool)0;
T8_ = (_Bool )(s->len < newLen);
if (T8_) {
goto LA9_;
}
T10_ = (_Bool)0;
T10_ = (_Bool )((unsigned long )s->p == (unsigned long )((NimStrPayload *)((void *)0)));
if (T10_) {
goto LA11_;
}
T10_ = (_Bool )(((s->p)->cap & 4611686018427387904L) == 4611686018427387904L);
LA11_:
T8_ = T10_;
LA9_: ;
if (! T8_) {
goto LA12_;
}
T14_ = (NimStringV2 *)0;
T14_ = s;
prepareAdd(T14_, newLen - s->len);
LA12_:
(s->p)->data[newLen] = (NIM_CHAR )0;
LA1_:
s->len = newLen;
return;
}
}
void nimPrepareStrMutationImpl__C0YoABEefTaYbWLv9aVOzZA(NimStringV2 *s )
{
NimStrPayload *oldP ;
void *T1_ ;
void *T2_ ;
{
oldP = s->p;
T1_ = (void *)0;
T1_ = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg((s->len + 1L) + 8L);
s->p = (NimStrPayload *)T1_;
(s->p)->cap = s->len;
T2_ = (void *)0;
T2_ = (void *)(& (s->p)->data[(NI )0]);
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T2_, (void *)(& oldP->data[(NI )0]), s->len + 1L);
return;
}
}
__inline static void nimPrepareStrMutationV2(NimStringV2 *s )
{
_Bool T3_ ;
{
T3_ = (_Bool)0;
T3_ = (_Bool )(! ((unsigned long )s->p == (unsigned long )((NimStrPayload *)((void *)0))));
if (! T3_) {
goto LA4_;
}
T3_ = (_Bool )(((s->p)->cap & 4611686018427387904L) == 4611686018427387904L);
LA4_: ;
if (! T3_) {
goto LA5_;
}
nimPrepareStrMutationImpl__C0YoABEefTaYbWLv9aVOzZA(s);
LA5_: ;
return;
}
}
void addInt__mftMOxbyu0h4yByfs3sqjA(NimStringV2 *result , NI64 x )
{
NI base ;
NI length ;
NU64 num ;
NU64 numX60gensym247_ ;
NI nextX60gensym247_ ;
NI T10_ ;
NI T12_ ;
NU64 originNumX60gensym247_ ;
NU64 indexX60gensym247_ ;
NU64 indexX60gensym247__2 ;
{
base = result->len;
length = (NI )0;
num = (NU64 )0;
if (! ((long long )x < 0LL)) {
goto LA3_;
}
if (! ((long long )x == (-0x7FFFFFFFFFFFFFFF-1))) {
goto LA7_;
}
num = (NU64 )x;
goto LA5_;
LA7_:
num = (NU64 )(- x);
LA5_:
T10_ = (NI )0;
T10_ = digits10__duY57oPUFW9aU9aeyQ9cREIjg(num);
length = (base + T10_) + 1L;
setLengthStrV2(result, length);
nimPrepareStrMutationV2(result);
(result->p)->data[base] = (NIM_CHAR )45;
goto LA1_;
LA3_:
num = (NU64 )x;
T12_ = (NI )0;
T12_ = digits10__duY57oPUFW9aU9aeyQ9cREIjg(num);
length = base + T12_;
setLengthStrV2(result, length);
LA1_:
numX60gensym247_ = num;
nextX60gensym247_ = length - 1L;
while (1) {
if (! (100UL <= numX60gensym247_)) {
goto LA14;
}
originNumX60gensym247_ = numX60gensym247_;
numX60gensym247_ /= 100UL;
indexX60gensym247_ = (originNumX60gensym247_ - numX60gensym247_ * 100UL) << 1UL;
nimPrepareStrMutationV2(result);
(result->p)->data[nextX60gensym247_] = (TM__Q5wkpxktOdTGvlSRo9bzt9aw_3.p)->data[indexX60gensym247_ + 1UL];
nimPrepareStrMutationV2(result);
(result->p)->data[nextX60gensym247_ - 1L] = (TM__Q5wkpxktOdTGvlSRo9bzt9aw_4.p)->data[indexX60gensym247_];
nextX60gensym247_ -= 2L;
}
LA14: ;
if (! (numX60gensym247_ < 10UL)) {
goto LA17_;
}
nimPrepareStrMutationV2(result);
(result->p)->data[nextX60gensym247_] = (NIM_CHAR )((NI )(48UL + numX60gensym247_));
goto LA15_;
LA17_:
indexX60gensym247__2 = numX60gensym247_ * 2UL;
nimPrepareStrMutationV2(result);
(result->p)->data[nextX60gensym247_] = (TM__Q5wkpxktOdTGvlSRo9bzt9aw_5.p)->data[indexX60gensym247__2 + 1UL];
nimPrepareStrMutationV2(result);
(result->p)->data[nextX60gensym247_ - 1L] = (TM__Q5wkpxktOdTGvlSRo9bzt9aw_6.p)->data[indexX60gensym247__2];
LA15_: ;
return;
}
}
NimStringV2 nimIntToStr(NI x )
{
NimStringV2 result ;
{
result.len = (NI )0;
result.p = (NimStrPayload *)((void *)0);
result = rawNewString((NI )32);
addInt__mftMOxbyu0h4yByfs3sqjA(& result, x);
return (result);
}
}
void *alignedAlloc0__tDURxGxuLs0hKEDbtrBxug(NI size , NI align )
{
void *result ;
void *base ;
NI offset ;
NI T6_ ;
NI T7_ ;
{
result = (void *)0;
if (! (align <= 16L)) {
goto LA3_;
}
result = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg(size);
goto LA1_;
LA3_:
base = alloc0Impl__KzdpcuLT9aef9bsiSHlIu9aFg(((size + align) - 1L) + 2L);
offset = align - ((ptrdiff_t )base & (align - 1L));
T6_ = (NI )0;
T6_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )base, offset - 2L);
*((NU16 *)((void *)T6_)) = (NU16 )offset;
T7_ = (NI )0;
T7_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )base, offset);
result = (void *)T7_;
LA1_: ;
return (result);
}
}
void *nimNewObj(NI size , NI alignment )
{
void *result ;
NI hdrSize ;
NI s ;
void *T1_ ;
NI T2_ ;
{
result = (void *)0;
hdrSize = align__vzThvqZajaR9ct9cQ7SOy1tQ((NI )16, alignment);
s = size + hdrSize;
T1_ = (void *)0;
T1_ = alignedAlloc0__tDURxGxuLs0hKEDbtrBxug(s, alignment);
T2_ = (NI )0;
T2_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )T1_, hdrSize);
result = (void *)T2_;
return (result);
}
}
void eqdestroy___4fQQqvAqifkWGVa4g39cI5A(tySequence__uB9b75OUPRENsBAu4AnoePA *dest )
{
NI colontmp_ ;
NI T3_ ;
{
colontmp_ = (NI )0;
while (1) {
T3_ = dest->len;
if (! (colontmp_ < T3_)) {
goto LA2;
}
colontmp_ ++;
}
LA2: ;
if (dest->p) {
if (! ((unsigned long )(dest->p)->cap & (1UL << 62))) {
alignedDealloc((void *)dest->p, (NI )__alignof__(tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA ));
}
}
return;
}
}
void eqdestroy___SYSukaUCM8gzz0Sv57LsMA(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest )
{
_Bool T3_ ;
_Bool T8_ ;
{
T3_ = (_Bool)0;
T3_ = nimDecRefIsLastCyclicDyn((void *)dest->Sup.Sup.parent);
if (! T3_) {
goto LA4_;
}
nimDestroyAndDispose((void *)dest->Sup.Sup.parent);
LA4_:
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& dest->Sup.Sup.message);
eqdestroy___4fQQqvAqifkWGVa4g39cI5A(& dest->Sup.Sup.trace);
T8_ = (_Bool)0;
T8_ = nimDecRefIsLastCyclicDyn((void *)dest->Sup.Sup.up);
if (! T8_) {
goto LA9_;
}
nimDestroyAndDispose((void *)dest->Sup.Sup.up);
LA9_: ;
return;
}
}
__inline static void nimTraceRefDyn(void *q , void *env )
{
void **p ;
tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *j ;
NI T5_ ;
{
p = (void **)q;
if (! (! ((unsigned long )*p == (unsigned long )((void *)0)))) {
goto LA3_;
}
j = (tyObject_GcEnv__g0b9ao2MXcYnUpu9b4I8eP9bQ *)env;
T5_ = (NI )0;
T5_ = minuspercent___dgYAo7RfdUVVpvkfKDym8wsystem((ptrdiff_t )*p, (NI )16);
add__A2hu7ps9a7fQ6dTDoPajZ5gsystem(& j->traceStack, (tyObject_RefHeader__Gi7WQzlT1ZRToh9a2ueYb4A *)T5_,
*((TNimTypeV2 **)*p));
LA3_: ;
return;
}
}
void eqtrace___kDvIcrGphqE2lmGa3RNr5A(NimStringV2 *dest , void *env )
{
{
return;
}
}
void eqtrace___9cqRrToT354sdOysDOB1O2A(tySequence__uB9b75OUPRENsBAu4AnoePA *dest ,
void *env )
{
NI colontmp_ ;
NI T3_ ;
{
colontmp_ = (NI )0;
while (1) {
T3_ = dest->len;
if (! (colontmp_ < T3_)) {
goto LA2;
}
colontmp_ ++;
}
LA2: ;
return;
}
}
void eqtrace___kt5U9cg2uLmsGJJLbv82xUA(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest ,
void *env )
{
{
nimTraceRefDyn((void *)(& dest->Sup.Sup.parent), env);
eqtrace___kDvIcrGphqE2lmGa3RNr5A(& dest->Sup.Sup.message, env);
eqtrace___9cqRrToT354sdOysDOB1O2A(& dest->Sup.Sup.trace, env);
nimTraceRefDyn((void *)(& dest->Sup.Sup.up), env);
return;
}
}
void eqdispose___dS1BF3Vxjg9aJMmmhVJKSpQ_2(NimStringV2 *dest )
{
{
if (dest->p) {
if (! ((unsigned long )(dest->p)->cap & (1UL << 62))) {
dealloc((void *)dest->p);
}
}
return;
}
}
void eqdispose___4fQQqvAqifkWGVa4g39cI5A_2(tySequence__uB9b75OUPRENsBAu4AnoePA *dest )
{
NI colontmp_ ;
NI T3_ ;
{
colontmp_ = (NI )0;
while (1) {
T3_ = dest->len;
if (! (colontmp_ < T3_)) {
goto LA2;
}
colontmp_ ++;
}
LA2: ;
if (dest->p) {
if (! ((unsigned long )(dest->p)->cap & (1UL << 62))) {
alignedDealloc((void *)dest->p, (NI )__alignof__(tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA ));
}
}
return;
}
}
void eqdispose___SYSukaUCM8gzz0Sv57LsMA_2(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw *dest )
{
{
eqdispose___dS1BF3Vxjg9aJMmmhVJKSpQ_2(& dest->Sup.Sup.message);
eqdispose___4fQQqvAqifkWGVa4g39cI5A_2(& dest->Sup.Sup.trace);
return;
}
}
void *newSeqPayload(NI cap , NI elemSize , NI elemAlign )
{
void *result ;
tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *p ;
NI T5_ ;
void *T6_ ;
{
result = (void *)0;
if (! (0L < cap)) {
goto LA3_;
}
T5_ = (NI )0;
T5_ = align__vzThvqZajaR9ct9cQ7SOy1tQ((NI )8, elemAlign);
T6_ = (void *)0;
T6_ = alignedAlloc0__tDURxGxuLs0hKEDbtrBxug(T5_ + cap * elemSize, elemAlign);
p = (tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *)T6_;
p->cap = cap;
result = (void *)p;
goto LA1_;
LA3_:
result = (void *)0;
LA1_: ;
return (result);
}
}
void *alignedAlloc__tDURxGxuLs0hKEDbtrBxug_2(NI size , NI align )
{
void *result ;
void *base ;
NI offset ;
NI T6_ ;
NI T7_ ;
{
result = (void *)0;
if (! (align <= 16L)) {
goto LA3_;
}
result = allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(size);
goto LA1_;
LA3_:
base = allocImpl__KzdpcuLT9aef9bsiSHlIu9aFg_2(((size + align) - 1L) + 2L);
offset = align - ((ptrdiff_t )base & (align - 1L));
T6_ = (NI )0;
T6_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )base, offset - 2L);
*((NU16 *)((void *)T6_)) = (NU16 )offset;
T7_ = (NI )0;
T7_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )base, offset);
result = (void *)T7_;
LA1_: ;
return (result);
}
}
void *alignedRealloc0__RCSc9brnnLyF1fOxNrJWWwA(void *p , NI oldSize , NI newSize ,
NI align )
{
void *result ;
NI T6_ ;
void *T7_ ;
{
result = (void *)0;
if (! (align <= 16L)) {
goto LA3_;
}
result = realloc0Impl__CRabJkeE1THyovTYlxjdVw(p, oldSize, newSize);
goto LA1_;
LA3_:
result = alignedAlloc__tDURxGxuLs0hKEDbtrBxug_2(newSize, align);
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(result, p, oldSize);
T6_ = (NI )0;
T6_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )result, oldSize);
T7_ = (void *)0;
T7_ = (void *)T6_;
zeroMem__FsvhfMqbswETmyMWtamDewsystem(T7_, newSize - oldSize);
alignedDealloc(p, align);
LA1_: ;
return (result);
}
}
void *prepareSeqAdd(NI len , void *p , NI addlen , NI elemSize , NI elemAlign )
{
void *result ;
NI headerSize ;
tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *p_2 ;
NI oldCap ;
NI newCap ;
NI T9_ ;
tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *q ;
void *T14_ ;
NI T15_ ;
void *T16_ ;
NI T17_ ;
NI oldSize ;
NI newSize ;
tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *q_2 ;
void *T19_ ;
{
result = (void *)0;
headerSize = align__vzThvqZajaR9ct9cQ7SOy1tQ((NI )8, elemAlign);
if (! (addlen <= 0L)) {
goto LA3_;
}
result = p;
goto LA1_;
LA3_: ;
if (! ((unsigned long )p == (unsigned long )((void *)0))) {
goto LA6_;
}
result = newSeqPayload(len + addlen, elemSize, elemAlign);
goto LA1_;
LA6_:
p_2 = (tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *)p;
oldCap = p_2->cap & -4611686018427387905L;
T9_ = (NI )0;
T9_ = resize__cOCDWr16YD4j3dBrbbH3yQsystem(oldCap);
if (T9_ >= len + addlen) {
newCap = T9_;
} else {
newCap = len + addlen;
}
if (! ((p_2->cap & 4611686018427387904L) == 4611686018427387904L)) {
goto LA12_;
}
T14_ = (void *)0;
T14_ = alignedAlloc0__tDURxGxuLs0hKEDbtrBxug(headerSize + elemSize * newCap, elemAlign);
q = (tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *)T14_;
T15_ = (NI )0;
T15_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )q, headerSize);
T16_ = (void *)0;
T16_ = (void *)T15_;
T17_ = (NI )0;
T17_ = pluspercent___dgYAo7RfdUVVpvkfKDym8w_2system((ptrdiff_t )p_2, headerSize);
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T16_, (void *)T17_, len * elemSize);
q->cap = newCap;
result = (void *)q;
goto LA10_;
LA12_:
oldSize = headerSize + elemSize * oldCap;
newSize = headerSize + elemSize * newCap;
T19_ = (void *)0;
T19_ = alignedRealloc0__RCSc9brnnLyF1fOxNrJWWwA((void *)p_2, oldSize, newSize, elemAlign);
q_2 = (tyObject_NimSeqPayloadBase__W32WJdQK8sr3oL2BppHZqw *)T19_;
q_2->cap = newCap;
result = (void *)q_2;
LA10_: ;
LA1_: ;
return (result);
}
}
void add__VHIeeMfqavFfKtbV1Wal0Q(tySequence__uB9b75OUPRENsBAu4AnoePA *x , tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA value )
{
NI oldLen ;
NI T1_ ;
tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w *xu ;
_Bool T4_ ;
void *T8_ ;
{
T1_ = x->len;
oldLen = T1_;
xu = (tyObject_NimSeqV2__A9aaPj3Ay2mWlTU3QheYz2w *)x;
T4_ = (_Bool)0;
T4_ = (_Bool )((unsigned long )xu->p == (unsigned long )((tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ *)((void *)0)));
if (T4_) {
goto LA5_;
}
T4_ = (_Bool )((xu->p)->cap < oldLen + 1L);
LA5_: ;
if (! T4_) {
goto LA6_;
}
T8_ = (void *)0;
T8_ = prepareSeqAdd(oldLen, (void *)xu->p, (NI )1, (NI )24, (NI )8);
xu->p = (tyObject_NimSeqPayload__T3NJfV3Yh9bN9cuVRNI5QtfQ *)T8_;
LA6_:
xu->len = oldLen + 1L;
(xu->p)->data[oldLen] = value;
return;
}
}
void eqsink___rR9boD7urcxl7uyUtE46AOA(Exception **dest , Exception *src )
{
Exception *colontmp_ ;
_Bool T3_ ;
{
colontmp_ = *dest;
*dest = src;
T3_ = (_Bool)0;
T3_ = nimDecRefIsLastCyclicDyn((void *)colontmp_);
if (! T3_) {
goto LA4_;
}
nimDestroyAndDispose((void *)colontmp_);
LA4_: ;
return;
}
}
__inline static void pushCurrentException(Exception *e )
{
{
eqcopy___T4HCXq9b9bmRBkztIGW1WmXw(& e->up, currException__9bVPeDJlYTi9bQApZpfH8wjg,
(_Bool)1);
eqsink___rR9boD7urcxl7uyUtE46AOA(& currException__9bVPeDJlYTi9bQApZpfH8wjg, e);
return;
}
}
void raiseExceptionAux__na8C8pUZ9cLQWVwk35l5vfw(Exception *e )
{
_Bool T7_ ;
_Bool T16_ ;
{
if (! (! ((unsigned long )localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg == (unsigned long )((void *)0)))) {
goto LA3_;
}
T7_ = (_Bool)0;
T7_ = (*localRaiseHook__EIvMhANBvB9cp2Ezvt29cADg)(e);
if (! (! T7_)) {
goto LA8_;
}
goto BeforeRet_;
LA8_: ;
LA3_: ;
if (! (! ((unsigned long )globalRaiseHook__JbO1ti4ULxrw54m4zNPbpA == (unsigned long )((void *)0)))) {
goto LA12_;
}
T16_ = (_Bool)0;
T16_ = (*globalRaiseHook__JbO1ti4ULxrw54m4zNPbpA)(e);
if (! (! T16_)) {
goto LA17_;
}
goto BeforeRet_;
LA17_: ;
LA12_: ;
if (! (! ((unsigned long )e == (unsigned long )currException__9bVPeDJlYTi9bQApZpfH8wjg))) {
goto LA21_;
}
pushCurrentException(e);
LA21_:
nimInErrorMode__759bT87luu8XGcbkw13FUjA = (_Bool )((NI )nimInErrorMode__759bT87luu8XGcbkw13FUjA + 1L);
BeforeRet_: ;
return;
}
}
void raiseExceptionEx(Exception *e , NCSTRING ename , NCSTRING procname , NCSTRING filename ,
NI line )
{
_Bool T7_ ;
tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA T11_ ;
{
if (! ((unsigned long )e->name == (unsigned long )((NCSTRING )0))) {
goto LA3_;
}
e->name = ename;
LA3_:
T7_ = (_Bool)0;
T7_ = (_Bool )(! ((unsigned long )((void *)procname) == (unsigned long )((void *)0)));
if (! T7_) {
goto LA8_;
}
T7_ = (_Bool )(! ((unsigned long )((void *)filename) == (unsigned long )((void *)0)));
LA8_: ;
if (! T7_) {
goto LA9_;
}
nimZeroMem((void *)(& T11_), (NI )sizeof(tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA ));
T11_.procname = procname;
T11_.filename = filename;
T11_.line = line;
add__VHIeeMfqavFfKtbV1Wal0Q(& e->trace, T11_);
LA9_:
raiseExceptionAux__na8C8pUZ9cLQWVwk35l5vfw(e);
return;
}
}
__inline static void nimAddCharV1(NimStringV2 *s , NIM_CHAR c )
{
{
prepareAdd(s, (NI )1);
(s->p)->data[s->len] = c;
(s->p)->data[s->len + 1L] = (NIM_CHAR )0;
(s->len) ++;
return;
}
}
void add__8FwY5enLGB0dFerO6Ny9caw(NimStringV2 *x , NCSTRING y )
{
NI i ;
{
i = (NI )0;
if (! (! ((unsigned long )((void *)y) == (unsigned long )((void *)0)))) {
goto LA3_;
}
while (1) {
if (! (! ((int )((NU8 )*(y + i)) == 0))) {
goto LA6;
}
nimAddCharV1(x, *(y + i));
i ++;
}
LA6: ;
LA3_: ;
return;
}
}
NimStringV2 dollar___liwwu6qv5HyRiFI58oBO0g(tySequence__uB9b75OUPRENsBAu4AnoePA stackTraceEntries )
{
NimStringV2 result ;
tySequence__uB9b75OUPRENsBAu4AnoePA s ;
NI i ;
NI colontmp_ ;
NI T2_ ;
NI res ;
NI oldLenX60gensym170_ ;
NimStringV2 colontmpD_ ;
NI kX60gensym170_ ;
NI colontmp__2 ;
NI res_2 ;
{
result.len = (NI )0;
result.p = (NimStrPayload *)((void *)0);
s.len = (NI )0;
s.p = (tySequence__uB9b75OUPRENsBAu4AnoePA_Content *)((void *)0);
s = stackTraceEntries;
result = rawNewString((NI )2000);
i = (NI )0;
colontmp_ = (NI )0;
T2_ = s.len;
colontmp_ = T2_ - 1L;
res = (NI )0;
while (1) {
if (! (res <= colontmp_)) {
goto LA4;
}
i = res;
if (! ((s.p)->data[i].line == -10L)) {
goto LA7_;
}
prepareAdd(& result, (NI )17);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_8);
goto LA5_;
LA7_: ;
if (! ((s.p)->data[i].line == -100L)) {
goto LA10_;
}
prepareAdd(& result, (NI )3);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_10);
goto LA5_;
LA10_:
oldLenX60gensym170_ = result.len;
add__8FwY5enLGB0dFerO6Ny9caw(& result, (s.p)->data[i].filename);
if (! (0L < (s.p)->data[i].line)) {
goto LA15_;
}
colontmpD_.len = (NI )0;
colontmpD_.p = (NimStrPayload *)((void *)0);
prepareAdd(& result, (NI )1);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_12);
colontmpD_ = nimIntToStr((s.p)->data[i].line);
prepareAdd(& result, colontmpD_.len);
appendString(& result, colontmpD_);
goto LA19_;
prepareAdd(& result, (NI )2);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_14);
prepareAdd(& result, (NI )1);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_16);
LA19_:
prepareAdd(& result, (NI )1);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_18);
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& colontmpD_);
LA15_:
kX60gensym170_ = (NI )0;
colontmp__2 = (NI )0;
if (1L >= 25L - (result.len - oldLenX60gensym170_)) {
colontmp__2 = (NI )1;
} else {
colontmp__2 = 25L - (result.len - oldLenX60gensym170_);
}
res_2 = (NI )1;
while (1) {
if (! (res_2 <= colontmp__2)) {
goto LA23;
}
kX60gensym170_ = res_2;
nimAddCharV1(& result, (NIM_CHAR )32);
res_2 ++;
}
LA23:
add__8FwY5enLGB0dFerO6Ny9caw(& result, (s.p)->data[i].procname);
prepareAdd(& result, (NI )1);
appendString(& result, (NimStringV2 )TM__Q5wkpxktOdTGvlSRo9bzt9aw_20);
LA5_:
res ++;
}
LA4: ;
return (result);
}
}
void reportUnhandledErrorAux__na8C8pUZ9cLQWVwk35l5vfw_3(Exception *e )
{
tyArray__gpc2RrLEcWgv7ONpLYNHOw buf ;
NI L ;
NI T3_ ;
NimStringV2 trace ;
void *T10_ ;
NCSTRING tmp ;
void *T19_ ;
NCSTRING tmp___0 ;
void *T28_ ;
NI tmp___1 ;
NI tmp___2 ;
NI tmp___3 ;
NI tmp___4 ;
NI tmp___5 ;
NI tmp___6 ;
NimStringV2 T37_ ;
{
nimZeroMem((void *)(buf), (NI )sizeof(tyArray__gpc2RrLEcWgv7ONpLYNHOw ));
L = (NI )0;
T3_ = e->trace.len;
if (! (! (T3_ == 0L))) {
goto LA4_;
}
trace = dollar___liwwu6qv5HyRiFI58oBO0g(e->trace);
if (! (L + trace.len < 2000L)) {
goto LA8_;
}
T10_ = (void *)0;
tmp = nimToCStringConv(trace);
T10_ = (void *)tmp;
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), T10_, trace.len);
L += trace.len;
LA8_:
eqdestroy___dS1BF3Vxjg9aJMmmhVJKSpQ(& trace);
LA4_: ;
if (! (L + 28L < 2000L)) {
goto LA13_;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), (void *)"Error: unhandled exception: ",
(NI )28);
L += 28L;
LA13_: ;
if (! (L + e->message.len < 2000L)) {
goto LA17_;
}
T19_ = (void *)0;
tmp___0 = nimToCStringConv(e->message);
T19_ = (void *)tmp___0;
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), T19_, e->message.len);
L += e->message.len;
LA17_: ;
if (! (L + 2L < 2000L)) {
goto LA22_;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), (void *)" [", (NI )2);
L += 2L;
LA22_: ;
if (e->name) {
tmp___1 = nimCStrLen(e->name);
tmp___2 = tmp___1;
} else {
tmp___2 = (NI )0;
}
if (! (L + tmp___2 < 2000L)) {
goto LA26_;
}
T28_ = (void *)0;
T28_ = (void *)e->name;
if (e->name) {
tmp___3 = nimCStrLen(e->name);
tmp___4 = tmp___3;
} else {
tmp___4 = (NI )0;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), T28_, tmp___4);
if (e->name) {
tmp___5 = nimCStrLen(e->name);
tmp___6 = tmp___5;
} else {
tmp___6 = (NI )0;
}
L += tmp___6;
LA26_: ;
if (! (L + 2L < 2000L)) {
goto LA31_;
}
copyMem__i80o3k0SgEI5gTRCzYdyWAsystem((void *)(& buf[L]), (void *)"]\n", (NI )2);
L += 2L;
LA31_: ;
if (! (! ((unsigned long )onUnhandledException__bFrawQlTKZhLweDD36j9b8g == (unsigned long )((void *)0)))) {
goto LA35_;
}
T37_.len = (NI )0;
T37_.p = (NimStrPayload *)((void *)0);
T37_ = cstrToNimstr(buf);
(*onUnhandledException__bFrawQlTKZhLweDD36j9b8g)(T37_);
goto LA33_;
LA35_:
showErrorMessage__T9b42zC1n39bfjypEaUpct0g(buf, L);
LA33_: ;
return;
}
}
void reportUnhandledError__na8C8pUZ9cLQWVwk35l5vfw_2(Exception *e )
{
{
if (! (! ((unsigned long )unhandledExceptionHook__RJpSsXsRUH8ochbXTEhRIw == (unsigned long )((void *)0)))) {
goto LA3_;
}
(*unhandledExceptionHook__RJpSsXsRUH8ochbXTEhRIw)(e);
LA3_:
reportUnhandledErrorAux__na8C8pUZ9cLQWVwk35l5vfw_3(e);
return;
}
}
void nimTestErrorFlag(void)
{
_Bool T3_ ;
{
T3_ = (_Bool)0;
T3_ = nimInErrorMode__759bT87luu8XGcbkw13FUjA;
if (! T3_) {
goto LA4_;
}
T3_ = (_Bool )(! ((unsigned long )currException__9bVPeDJlYTi9bQApZpfH8wjg == (unsigned long )((Exception *)((void *)0))));
LA4_: ;
if (! T3_) {
goto LA5_;
}
reportUnhandledError__na8C8pUZ9cLQWVwk35l5vfw_2(currException__9bVPeDJlYTi9bQApZpfH8wjg);
eqsink___rR9boD7urcxl7uyUtE46AOA(& currException__9bVPeDJlYTi9bQApZpfH8wjg, (Exception *)((void *)0));
exit((int )((NI )1));
LA5_: ;
return;
}
}
void systemInit000(void)
{
_Bool *nimErr_ ;
long tmp ;
{
nimErr_ = nimErrorFlag();
initStackBottom();
registerSignalHandler__amVlU9ajqZ06ujoesRBHcDg_2();
tmp = __builtin_expect((long )*nimErr_, 0L);
if (tmp) {
}
return;
}
}
void systemDatInit000(void)
{
{
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.destructor = (void *)(& eqdestroy___SYSukaUCM8gzz0Sv57LsMA);
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.size = (NI )sizeof(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw );
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.align = (NI )__alignof__(tyObject_IOError__iLZrPn9anoh9ad1MmO0RczFw );
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.name = (NCSTRING )"|IOError|CatchableError|Exception|RootObj|";
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.traceImpl = (void *)(& eqtrace___kt5U9cg2uLmsGJJLbv82xUA);
NTIv2__iLZrPn9anoh9ad1MmO0RczFw_.disposeImpl = (void *)(& eqdispose___SYSukaUCM8gzz0Sv57LsMA_2);
return;
}
}
#pragma merger("0","/tmp/cil-zGBWompS.i","-w,-fmax-errors=3,-O3,-fno-strict-aliasing,-fno-ident")
#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"
__inline static void initStackBottomWith(void *locals ) ;
void NimMainModule(void) ;
static struct __anonstruct_TM__xLHv575t3PG1lB5wK05Xqg_3_60456539 const TM__xLHv575t3PG1lB5wK05Xqg_3 = {(NI )(20UL | (1UL << 62)),
{(NIM_CHAR )'H', (NIM_CHAR )'e', (NIM_CHAR )'l', (NIM_CHAR )'l', (NIM_CHAR )'o',
(NIM_CHAR )',', (NIM_CHAR )' ', (NIM_CHAR )'a', (NIM_CHAR )'m', (NIM_CHAR )'a',
(NIM_CHAR )'l', (NIM_CHAR )'g', (NIM_CHAR )'a', (NIM_CHAR )'m', (NIM_CHAR )'a',
(NIM_CHAR )'t', (NIM_CHAR )'i', (NIM_CHAR )'o', (NIM_CHAR )'n', (NIM_CHAR )'!',
(NIM_CHAR )'\000'}};
static NimStringV2 TM__xLHv575t3PG1lB5wK05Xqg_2[1] = { {(NI )20, (NimStrPayload *)(& TM__xLHv575t3PG1lB5wK05Xqg_3)}};
__inline static void initStackBottomWith(void *locals )
{
{
return;
}
}
void PreMainInner(void)
{
{
return;
}
}
int cmdCount ;
char **cmdLine ;
char **gEnv ;
void PreMain(void)
{
void (* volatile inner)(void) ;
{
inner = (void (* volatile )(void))(& PreMainInner);
systemDatInit000();
systemInit000();
(*inner)();
return;
}
}
void NimMainInner(void)
{
{
NimMainModule();
return;
}
}
void NimMain(void)
{
void (* volatile inner)(void) ;
{
PreMain();
inner = (void (* volatile )(void))(& NimMainInner);
initStackBottomWith((void *)(& inner));
(*inner)();
return;
}
}
int main(int argc , char **args , char **env )
{
{
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return ((int )nim_program_result);
}
}
void NimMainModule(void)
{
{
echoBinSafe((NimStringV2 *)(TM__xLHv575t3PG1lB5wK05Xqg_2), (NI )1);
nimTestErrorFlag();
return;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment