/* Generated by Nim Compiler v1.4.0 */
/*   (c) 2020 Andreas Rumpf */
/* The generated code is subject to the original license. */
#define NIM_INTBITS 64

/* section: NIM_merge_HEADERS */

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

/* section: NIM_merge_FRAME_DEFINES */
#define nimfr_(x, y)
#define nimln_(x, y)

/* section: NIM_merge_FORWARD_TYPES */
typedef struct tyObject_Int128__9a9axPfb75jdWY25AamJewkA tyObject_Int128__9a9axPfb75jdWY25AamJewkA;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
typedef struct tyTuple__0titlMXgFgzRLN6v28f9azA tyTuple__0titlMXgFgzRLN6v28f9azA;

/* section: NIM_merge_TYPES */
typedef NU32 tyArray__FleBT9cC2nxhgiXmSYYnEKA[4];
struct tyObject_Int128__9a9axPfb75jdWY25AamJewkA {
tyArray__FleBT9cC2nxhgiXmSYYnEKA udata;
};
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
  TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
struct tyTuple__0titlMXgFgzRLN6v28f9azA {
tyObject_Int128__9a9axPfb75jdWY25AamJewkA Field0;
tyObject_Int128__9a9axPfb75jdWY25AamJewkA Field1;
};

/* section: NIM_merge_PROC_HEADERS */
static N_INLINE(void, nimZeroMem)(void* p, NI size);
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size);
N_LIB_PRIVATE N_NIMCALL(NI, cmp__aTFQcoQMnofdh4pk1uYwhA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(NI, cmp__3PzpNkpGPYcOZGLQgQC9c2g)(NI32 x, NI32 y);
N_LIB_PRIVATE N_NIMCALL(NI, cmp__xx9bb4cI6NNgduU6C6csc2Q)(NU32 x, NU32 y);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__ZBiVpGjOydV7ZjeElrE9cFQ)(NI64 arg);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___7c5Zw7H31uJfWmmhZe9aEqw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, plus___Sp7OcCEIFoBYolB6PB1fAg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, minus___mAwxaUUL6Ssa3kRZvdXw3A)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitnot__mAwxaUUL6Ssa3kRZvdXw3A_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
N_LIB_PRIVATE N_NIMCALL(void, inc__Glh2geFlMs9aE78UZ1JZGAA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, NU32 y);
N_LIB_PRIVATE N_NIMCALL(void, failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A)(NimStringDesc* msg);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, minus___Sp7OcCEIFoBYolB6PB1fAg_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(NU64, bitconcat__Pmez7IavBczO9c5TgNUZEqA)(NU32 a, NU32 b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, star___7wuHNcCvKLyDgc23Ca9cBDA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NU32 b);
N_LIB_PRIVATE N_NIMCALL(NI, abs__xskwOeOf5WlKyAfG87R5DA)(NI32 a);
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt8__A9amB1kh7ZrPWAOSYUalKWQint128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg);
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt16__A9amB1kh7ZrPWAOSYUalKWQ_2int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg);
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt32__A9amB1kh7ZrPWAOSYUalKWQ_3int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg);
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt64__A9amB1kh7ZrPWAOSYUalKWQ_4int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, makeInt128__Hjx539cGmNc1sRJqnuVI2iw)(NU64 high, NU64 low);
N_LIB_PRIVATE N_NIMCALL(NU64, high64__I5PvReDoxFJAuJBwWACbVA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
N_LIB_PRIVATE N_NIMCALL(NU64, low64__I5PvReDoxFJAuJBwWACbVA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
N_LIB_PRIVATE N_NIMCALL(void, pluseq___9bKV7SFHb7pJ2i2tfsBPcBA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, shl__al6Zjboz2CA0pIDMg9a9cJFw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__TDVoY1DSlNtMNULcUFRJzA)(NU64 arg);
N_LIB_PRIVATE N_NIMCALL(tyTuple__0titlMXgFgzRLN6v28f9azA, divMod__hJyv3l2B2Q9cPG2G6osz9cmA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA dividend, tyObject_Int128__9a9axPfb75jdWY25AamJewkA divisor);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, abs__mAwxaUUL6Ssa3kRZvdXw3A_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___7c5Zw7H31uJfWmmhZe9aEqw_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(NI, fastLog2__B89cYHjezMujo53G7iZ9aTUg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a);
static N_INLINE(NI, fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops)(NU32 x);
N_CDECL(int, __builtin_clz)(unsigned int x);
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___7c5Zw7H31uJfWmmhZe9aEqw_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(void, minuseq___9bKV7SFHb7pJ2i2tfsBPcBA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitor__Sp7OcCEIFoBYolB6PB1fAg_4)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b);
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, shr__al6Zjboz2CA0pIDMg9a9cJFw_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI b);
N_LIB_PRIVATE N_NIMCALL(void, addInt128__IvecK4CF4vhXBu6XHFt6sg)(NimStringDesc** result, tyObject_Int128__9a9axPfb75jdWY25AamJewkA value);
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src);
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size);
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, resizeString)(NimStringDesc* dest, NI addlen);
N_LIB_PRIVATE N_NIMCALL(void, unsureAsgnRef)(void** dest, void* src);
N_LIB_PRIVATE N_NIMCALL(NI64, toInt64__1szweXXq3RBN50owrYu2Xw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, addChar)(NimStringDesc* s, NIM_CHAR c);
static N_INLINE(NF, abs__BRaAqinz6OWTHkALb4oj6Qsystem)(NF x);

/* section: NIM_merge_DATA */
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA Zero__1ed0M9aQUqqSQVhLxSQO9bCw = {{((NU32) 0),
((NU32) 0),
((NU32) 0),
((NU32) 0)}
}
;
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA Max__zlJMNfqX7LwCYj0PF6ncWQ = {{((NU32) IL64(4294967295)),
((NU32) IL64(4294967295)),
((NU32) IL64(4294967295)),
((NU32) 2147483647)}
}
;
STRING_LITERAL(TM__nQVdjfHleOuOqvMTepKJUw_2, "int128.nim(187, 17) `a.sdata(3) != low(int32)` overflow", 55);
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA One__asIdv19bIr70QgMTVvq2zyQ = {{((NU32) 1),
((NU32) 0),
((NU32) 0),
((NU32) 0)}
}
;
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA NegOne__d9bDUxsqvMi69cXPELCoXEuA = {{((NU32) IL64(4294967295)),
((NU32) IL64(4294967295)),
((NU32) IL64(4294967295)),
((NU32) IL64(4294967295))}
}
;
STRING_LITERAL(TM__nQVdjfHleOuOqvMTepKJUw_3, "0", 1);
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA Min__tcYPiLl9bZLJNUEW2vfzVFQ = {{((NU32) 0),
((NU32) 0),
((NU32) 0),
((NU32) IL64(2147483648))}
}
;
STRING_LITERAL(TM__nQVdjfHleOuOqvMTepKJUw_4, "-170141183460469231731687303715884105728", 40);
N_LIB_PRIVATE NIM_CONST tyObject_Int128__9a9axPfb75jdWY25AamJewkA Ten__ENw4PZGy8j7vPVc9ar760nA = {{((NU32) 10),
((NU32) 0),
((NU32) 0),
((NU32) 0)}
}
;
STRING_LITERAL(TM__nQVdjfHleOuOqvMTepKJUw_5, "0123456789", 10);

/* section: NIM_merge_PROCS */
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___7c5Zw7H31uJfWmmhZe9aEqw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
{	result = (NIM_BOOL)0;
	{
		if (!!((a.udata[(((NI) 0))- 0] == b.udata[(((NI) 0))- 0]))) goto LA3_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA3_: ;
	{
		if (!!((a.udata[(((NI) 1))- 0] == b.udata[(((NI) 1))- 0]))) goto LA7_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA7_: ;
	{
		if (!!((a.udata[(((NI) 2))- 0] == b.udata[(((NI) 2))- 0]))) goto LA11_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA11_: ;
	{
		if (!!((a.udata[(((NI) 3))- 0] == b.udata[(((NI) 3))- 0]))) goto LA15_;
		result = NIM_FALSE;
		goto BeforeRet_;
	}
	LA15_: ;
	result = NIM_TRUE;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
static N_INLINE(void, nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory)(void* a, int v, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memset(a, v, ((size_t) (size)));
}
static N_INLINE(void, nimZeroMem)(void* p, NI size) {
	nimSetMem__zxfKBYntu9cBapkhrCOk1fgmemory(p, ((int) 0), size);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__TDVoY1DSlNtMNULcUFRJzA)(NU64 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = ((NU32) ((NU64)(arg & 4294967295ULL)));
	result.udata[(((NI) 1))- 0] = ((NU32) ((NU64)((NU64)(arg) >> (NU64)(((NI) 32)))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__ZBiVpGjOydV7ZjeElrE9cFQ)(NI64 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NI64 tmp;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	tmp = arg;
	result.udata[(((NI) 0))- 0] = ((NU32) ((NI64)(tmp & IL64(4294967295))));
	(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) ((NI64)((NI64)(tmp) >> (NU64)(((NI) 32)))));
	{
		if (!(arg < IL64(0))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
	}
	LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__161i7kexvUAISxPtGBRWYw)(NI arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NI64 tmp;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	tmp = ((NI64) (arg));
	result.udata[(((NI) 0))- 0] = ((NU32) ((NI64)(tmp & IL64(4294967295))));
	(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) ((NI64)((NI64)(tmp) >> (NU64)(((NI) 32)))));
	{
		if (!(arg < ((NI) 0))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
	}
	LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__swbZX3ptkqZbxXBHXbSVwg)(NU arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = ((NU32) ((NU)(arg & ((NU) IL64(4294967295)))));
	result.udata[(((NI) 1))- 0] = ((NU32) ((NU)((NU64)(arg) >> (NU64)(((NI) 32)))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, cmp__aTFQcoQMnofdh4pk1uYwhA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NI result;
	NI tmp1;
	NI32 T1_;
	NI tmp2;
	NI tmp3;
	NI tmp4;
{	result = (NI)0;
	T1_ = (NI32)0;
	T1_ = (*((NI32*) ((&a.udata[(((NI) 3))- 0]))));
	tmp1 = cmp__3PzpNkpGPYcOZGLQgQC9c2g(T1_, (*((NI32*) ((&b.udata[(((NI) 3))- 0])))));
	{
		if (!!((tmp1 == ((NI) 0)))) goto LA4_;
		result = tmp1;
		goto BeforeRet_;
	}
	LA4_: ;
	tmp2 = cmp__xx9bb4cI6NNgduU6C6csc2Q(a.udata[(((NI) 2))- 0], b.udata[(((NI) 2))- 0]);
	{
		if (!!((tmp2 == ((NI) 0)))) goto LA8_;
		result = tmp2;
		goto BeforeRet_;
	}
	LA8_: ;
	tmp3 = cmp__xx9bb4cI6NNgduU6C6csc2Q(a.udata[(((NI) 1))- 0], b.udata[(((NI) 1))- 0]);
	{
		if (!!((tmp3 == ((NI) 0)))) goto LA12_;
		result = tmp3;
		goto BeforeRet_;
	}
	LA12_: ;
	tmp4 = cmp__xx9bb4cI6NNgduU6C6csc2Q(a.udata[(((NI) 0))- 0], b.udata[(((NI) 0))- 0]);
	result = tmp4;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___7c5Zw7H31uJfWmmhZe9aEqw_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
	NI T1_;
	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = cmp__aTFQcoQMnofdh4pk1uYwhA(a, b);
	result = (T1_ <= ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___nr9cP9b0OL9cabygV9bo19cJgZA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI64 b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	NI T2_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(b);
	T2_ = (NI)0;
	T2_ = cmp__aTFQcoQMnofdh4pk1uYwhA(a, T1_);
	result = (T2_ <= ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lteq___xL5gyZrjbGMarSdRAXOo9ag)(NI64 a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	NI T2_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(a);
	T2_ = (NI)0;
	T2_ = cmp__aTFQcoQMnofdh4pk1uYwhA(T1_, b);
	result = (T2_ <= ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___nr9cP9b0OL9cabygV9bo19cJgZA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI64 b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(b);
	result = eqeq___7c5Zw7H31uJfWmmhZe9aEqw(a, T1_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, plus___Sp7OcCEIFoBYolB6PB1fAg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NU64 tmp0;
	NU64 tmp1;
	NU64 tmp2;
	NU64 tmp3;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	tmp0 = (NU64)((NU64)(((NU64) (a.udata[(((NI) 0))- 0]))) + (NU64)(((NU64) (b.udata[(((NI) 0))- 0]))));
	result.udata[(((NI) 0))- 0] = ((NU32) (tmp0));
	tmp1 = (NU64)((NU64)((NU64)((NU64)(((NU64) (a.udata[(((NI) 1))- 0]))) + (NU64)(((NU64) (b.udata[(((NI) 1))- 0]))))) + (NU64)((NU64)((NU64)(tmp0) >> (NU64)(((NI) 32)))));
	result.udata[(((NI) 1))- 0] = ((NU32) (tmp1));
	tmp2 = (NU64)((NU64)((NU64)((NU64)(((NU64) (a.udata[(((NI) 2))- 0]))) + (NU64)(((NU64) (b.udata[(((NI) 2))- 0]))))) + (NU64)((NU64)((NU64)(tmp1) >> (NU64)(((NI) 32)))));
	result.udata[(((NI) 2))- 0] = ((NU32) (tmp2));
	tmp3 = (NU64)((NU64)((NU64)((NU64)(((NU64) (a.udata[(((NI) 3))- 0]))) + (NU64)(((NU64) (b.udata[(((NI) 3))- 0]))))) + (NU64)((NU64)((NU64)(tmp2) >> (NU64)(((NI) 32)))));
	result.udata[(((NI) 3))- 0] = ((NU32) (tmp3));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitnot__mAwxaUUL6Ssa3kRZvdXw3A_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = (NU32)((NU32) ~(a.udata[(((NI) 0))- 0]));
	result.udata[(((NI) 1))- 0] = (NU32)((NU32) ~(a.udata[(((NI) 1))- 0]));
	result.udata[(((NI) 2))- 0] = (NU32)((NU32) ~(a.udata[(((NI) 2))- 0]));
	result.udata[(((NI) 3))- 0] = (NU32)((NU32) ~(a.udata[(((NI) 3))- 0]));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, inc__Glh2geFlMs9aE78UZ1JZGAA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, NU32 y) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA input;
	input = (*a);
	(*a).udata[(((NI) 0))- 0] += y;
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = NIM_UNLIKELY(((NU32)((*a).udata[(((NI) 0))- 0]) < (NU32)(y)));
		if (!T3_) goto LA4_;
		(*a).udata[(((NI) 1))- 0] += ((NI) 1);
		{
			NIM_BOOL T8_;
			T8_ = (NIM_BOOL)0;
			T8_ = NIM_UNLIKELY(((*a).udata[(((NI) 1))- 0] == ((NU32) 0)));
			if (!T8_) goto LA9_;
			(*a).udata[(((NI) 2))- 0] += ((NI) 1);
			{
				NIM_BOOL T13_;
				T13_ = (NIM_BOOL)0;
				T13_ = NIM_UNLIKELY(((*a).udata[(((NI) 2))- 0] == ((NU32) 0)));
				if (!T13_) goto LA14_;
				(*a).udata[(((NI) 3))- 0] += ((NI) 1);
				{
					if (!!(!(((*((NI32*) ((&(*a).udata[(((NI) 3))- 0])))) == ((NI32) (-2147483647 -1)))))) goto LA18_;
					failedAssertImpl__W9cjVocn1tjhW7p7xohJj6A(((NimStringDesc*) &TM__nQVdjfHleOuOqvMTepKJUw_2));
				}
				LA18_: ;
			}
			LA14_: ;
		}
		LA9_: ;
	}
	LA4_: ;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, minus___mAwxaUUL6Ssa3kRZvdXw3A)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result = bitnot__mAwxaUUL6Ssa3kRZvdXw3A_2(a);
	inc__Glh2geFlMs9aE78UZ1JZGAA((&result), ((NU32) 1));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, minus___Sp7OcCEIFoBYolB6PB1fAg_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = minus___mAwxaUUL6Ssa3kRZvdXw3A(b);
	result = plus___Sp7OcCEIFoBYolB6PB1fAg(a, T1_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, minus___hiijuMqvH9aC9aKmwIYuqUAA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI64 b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(b);
	result = minus___Sp7OcCEIFoBYolB6PB1fAg_2(a, T1_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, plus___hiijuMqvH9aC9aKmwIYuqUAA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI64 b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(b);
	result = plus___Sp7OcCEIFoBYolB6PB1fAg(a, T1_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU64, bitconcat__Pmez7IavBczO9c5TgNUZEqA)(NU32 a, NU32 b) {
	NU64 result;
	result = (NU64)0;
	result = (NU64)((NU64)((NU64)(((NU64) (a))) << (NU64)(((NI) 32))) | ((NU64) (b)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, toInt64__1szweXXq3RBN50owrYu2Xw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI64 result;
	NU64 T6_;
	result = (NI64)0;
	{
		if (!((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
	}
	goto LA1_;
	LA3_: ;
	{
	}
	LA1_: ;
	T6_ = (NU64)0;
	T6_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg.udata[(((NI) 1))- 0], arg.udata[(((NI) 0))- 0]);
	result = ((NI64) (T6_));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, castToInt64__1szweXXq3RBN50owrYu2Xw_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI64 result;
	NU64 T1_;
	result = (NI64)0;
	T1_ = (NU64)0;
	T1_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg.udata[(((NI) 1))- 0], arg.udata[(((NI) 0))- 0]);
	result = ((NI64) (T1_));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI64, toInt64Checked__AbU1iGhTiLlXhe9a0gSwe2Q)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg, NI64 onError) {
	NI64 result;
	NU64 T18_;
{	result = (NI64)0;
	{
		if (!((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
		{
			NIM_BOOL T7_;
			T7_ = (NIM_BOOL)0;
			T7_ = !(((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) == ((NI32) -1)));
			if (T7_) goto LA8_;
			T7_ = !(((*((NI32*) ((&arg.udata[(((NI) 2))- 0])))) == ((NI32) -1)));
			LA8_: ;
			if (!T7_) goto LA9_;
			result = onError;
			goto BeforeRet_;
		}
		LA9_: ;
	}
	goto LA1_;
	LA3_: ;
	{
		{
			NIM_BOOL T14_;
			T14_ = (NIM_BOOL)0;
			T14_ = !(((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) == ((NI32) 0)));
			if (T14_) goto LA15_;
			T14_ = !(((*((NI32*) ((&arg.udata[(((NI) 2))- 0])))) == ((NI32) 0)));
			LA15_: ;
			if (!T14_) goto LA16_;
			result = onError;
			goto BeforeRet_;
		}
		LA16_: ;
	}
	LA1_: ;
	T18_ = (NU64)0;
	T18_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg.udata[(((NI) 1))- 0], arg.udata[(((NI) 0))- 0]);
	result = ((NI64) (T18_));
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, star___7wuHNcCvKLyDgc23Ca9cBDA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NU32 b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NU64 tmp0;
	NU64 tmp1;
	NU64 tmp2;
	NU64 tmp3;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	tmp0 = (NU64)((NU64)(((NU64) (a.udata[(((NI) 0))- 0]))) * (NU64)(((NU64) (b))));
	tmp1 = (NU64)((NU64)(((NU64) (a.udata[(((NI) 1))- 0]))) * (NU64)(((NU64) (b))));
	tmp2 = (NU64)((NU64)(((NU64) (a.udata[(((NI) 2))- 0]))) * (NU64)(((NU64) (b))));
	tmp3 = (NU64)((NU64)(((NU64) (a.udata[(((NI) 3))- 0]))) * (NU64)(((NU64) (b))));
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = NIM_UNLIKELY(((NU64)(2147483647ULL) < (NU64)(tmp3)));
		if (!T3_) goto LA4_;
	}
	LA4_: ;
	result.udata[(((NI) 0))- 0] = ((NU32) (tmp0));
	result.udata[(((NI) 1))- 0] = (NU32)((NU32)(((NU32) (tmp1))) + (NU32)(((NU32) ((NU64)((NU64)(tmp0) >> (NU64)(((NI) 32)))))));
	result.udata[(((NI) 2))- 0] = (NU32)((NU32)(((NU32) (tmp2))) + (NU32)(((NU32) ((NU64)((NU64)(tmp1) >> (NU64)(((NI) 32)))))));
	result.udata[(((NI) 3))- 0] = (NU32)((NU32)(((NU32) (tmp3))) + (NU32)(((NU32) ((NU64)((NU64)(tmp2) >> (NU64)(((NI) 32)))))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, abs__xskwOeOf5WlKyAfG87R5DA)(NI32 a) {
	NI result;
	NI32 T1_;
	result = (NI)0;
	T1_ = (NI32)0;
	{
		if (!(a < ((NI32) 0))) goto LA4_;
		T1_ = ((NI32)-(a));
	}
	goto LA2_;
	LA4_: ;
	{
		T1_ = a;
	}
	LA2_: ;
	result = ((NI) (T1_));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, star___byxnZkntUVTm6OMjYcCmJw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI32 b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NI T1_;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = (NI)0;
	T1_ = abs__xskwOeOf5WlKyAfG87R5DA(b);
	result = star___7wuHNcCvKLyDgc23Ca9cBDA(a, ((NU32) (T1_)));
	{
		if (!(b < ((NI32) 0))) goto LA4_;
		result = minus___mAwxaUUL6Ssa3kRZvdXw3A(result);
	}
	LA4_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___7c5Zw7H31uJfWmmhZe9aEqw_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
	NI T1_;
	result = (NIM_BOOL)0;
	T1_ = (NI)0;
	T1_ = cmp__aTFQcoQMnofdh4pk1uYwhA(a, b);
	result = (T1_ < ((NI) 0));
	return result;
}
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt8__A9amB1kh7ZrPWAOSYUalKWQint128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	result.udata[(((NI) 0))- 0] = (NU32)(arg.udata[(((NI) 0))- 0] & ((NU32) 255));
	result.udata[(((NI) 1))- 0] = ((NU32) 0);
	result.udata[(((NI) 2))- 0] = ((NU32) 0);
	result.udata[(((NI) 3))- 0] = ((NU32) 0);
	return result;
}
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt16__A9amB1kh7ZrPWAOSYUalKWQ_2int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	result.udata[(((NI) 0))- 0] = (NU32)(arg.udata[(((NI) 0))- 0] & ((NU32) 65535));
	result.udata[(((NI) 1))- 0] = ((NU32) 0);
	result.udata[(((NI) 2))- 0] = ((NU32) 0);
	result.udata[(((NI) 3))- 0] = ((NU32) 0);
	return result;
}
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt32__A9amB1kh7ZrPWAOSYUalKWQ_3int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	result.udata[(((NI) 0))- 0] = arg.udata[(((NI) 0))- 0];
	result.udata[(((NI) 1))- 0] = ((NU32) 0);
	result.udata[(((NI) 2))- 0] = ((NU32) 0);
	result.udata[(((NI) 3))- 0] = ((NU32) 0);
	return result;
}
static N_INLINE(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskUInt64__A9amB1kh7ZrPWAOSYUalKWQ_4int128)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	result.udata[(((NI) 0))- 0] = arg.udata[(((NI) 0))- 0];
	result.udata[(((NI) 1))- 0] = arg.udata[(((NI) 1))- 0];
	result.udata[(((NI) 2))- 0] = ((NU32) 0);
	result.udata[(((NI) 3))- 0] = ((NU32) 0);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, maskBytes__mCeI1aTUCq0DR4c0npiCOg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg, NI numbytes) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
{	switch (numbytes) {
	case ((NI) 1):
	{
		result = maskUInt8__A9amB1kh7ZrPWAOSYUalKWQint128(arg);
		goto BeforeRet_;
	}
	break;
	case ((NI) 2):
	{
		result = maskUInt16__A9amB1kh7ZrPWAOSYUalKWQ_2int128(arg);
		goto BeforeRet_;
	}
	break;
	case ((NI) 4):
	{
		result = maskUInt32__A9amB1kh7ZrPWAOSYUalKWQ_3int128(arg);
		goto BeforeRet_;
	}
	break;
	case ((NI) 8):
	{
		result = maskUInt64__A9amB1kh7ZrPWAOSYUalKWQ_4int128(arg);
		goto BeforeRet_;
	}
	break;
	default:
	{
	}
	break;
	}
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, abs__mAwxaUUL6Ssa3kRZvdXw3A_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	{
		if (!((*((NI32*) ((&a.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
		result = minus___mAwxaUUL6Ssa3kRZvdXw3A(a);
	}
	goto LA1_;
	LA3_: ;
	{
		result = a;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, makeInt128__Hjx539cGmNc1sRJqnuVI2iw)(NU64 high, NU64 low) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = ((NU32) (low));
	result.udata[(((NI) 1))- 0] = ((NU32) ((NU64)((NU64)(low) >> (NU64)(((NI) 32)))));
	result.udata[(((NI) 2))- 0] = ((NU32) (high));
	result.udata[(((NI) 3))- 0] = ((NU32) ((NU64)((NU64)(high) >> (NU64)(((NI) 32)))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU64, high64__I5PvReDoxFJAuJBwWACbVA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	NU64 result;
	result = (NU64)0;
	result = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 3))- 0], a.udata[(((NI) 2))- 0]);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU64, low64__I5PvReDoxFJAuJBwWACbVA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	NU64 result;
	result = (NU64)0;
	result = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 1))- 0], a.udata[(((NI) 0))- 0]);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, pluseq___9bKV7SFHb7pJ2i2tfsBPcBA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	(*a) = plus___Sp7OcCEIFoBYolB6PB1fAg((*a), b);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, shl__al6Zjboz2CA0pIDMg9a9cJFw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NI b_2;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	b_2 = (NI)(b & ((NI) 127));
	{
		NU64 T5_;
		NU64 T6_;
		NU64 T7_;
		if (!(b_2 < ((NI) 32))) goto LA3_;
		result.udata[(((NI) 0))- 0] = (NU32)((NU64)(a.udata[(((NI) 0))- 0]) << (NU64)(b_2));
		T5_ = (NU64)0;
		T5_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 1))- 0], a.udata[(((NI) 0))- 0]);
		result.udata[(((NI) 1))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T5_) << (NU64)(b_2))) >> (NU64)(((NI) 32)))));
		T6_ = (NU64)0;
		T6_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 2))- 0], a.udata[(((NI) 1))- 0]);
		result.udata[(((NI) 2))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T6_) << (NU64)(b_2))) >> (NU64)(((NI) 32)))));
		T7_ = (NU64)0;
		T7_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 3))- 0], a.udata[(((NI) 2))- 0]);
		result.udata[(((NI) 3))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T7_) << (NU64)(b_2))) >> (NU64)(((NI) 32)))));
	}
	goto LA1_;
	LA3_: ;
	{
		NU64 T11_;
		NU64 T12_;
		if (!(b_2 < ((NI) 64))) goto LA9_;
		result.udata[(((NI) 0))- 0] = ((NU32) 0);
		result.udata[(((NI) 1))- 0] = (NU32)((NU64)(a.udata[(((NI) 0))- 0]) << (NU64)((NI)(b_2 & ((NI) 31))));
		T11_ = (NU64)0;
		T11_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 1))- 0], a.udata[(((NI) 0))- 0]);
		result.udata[(((NI) 2))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T11_) << (NU64)((NI)(b_2 & ((NI) 31))))) >> (NU64)(((NI) 32)))));
		T12_ = (NU64)0;
		T12_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 2))- 0], a.udata[(((NI) 1))- 0]);
		result.udata[(((NI) 3))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T12_) << (NU64)((NI)(b_2 & ((NI) 31))))) >> (NU64)(((NI) 32)))));
	}
	goto LA1_;
	LA9_: ;
	{
		NU64 T16_;
		if (!(b_2 < ((NI) 96))) goto LA14_;
		result.udata[(((NI) 0))- 0] = ((NU32) 0);
		result.udata[(((NI) 1))- 0] = ((NU32) 0);
		result.udata[(((NI) 2))- 0] = (NU32)((NU64)(a.udata[(((NI) 0))- 0]) << (NU64)((NI)(b_2 & ((NI) 31))));
		T16_ = (NU64)0;
		T16_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 1))- 0], a.udata[(((NI) 0))- 0]);
		result.udata[(((NI) 3))- 0] = ((NU32) ((NU64)((NU64)((NU64)((NU64)(T16_) << (NU64)((NI)(b_2 & ((NI) 31))))) >> (NU64)(((NI) 32)))));
	}
	goto LA1_;
	LA14_: ;
	{
		result.udata[(((NI) 0))- 0] = ((NU32) 0);
		result.udata[(((NI) 1))- 0] = ((NU32) 0);
		result.udata[(((NI) 2))- 0] = ((NU32) 0);
		result.udata[(((NI) 3))- 0] = (NU32)((NU64)(a.udata[(((NI) 0))- 0]) << (NU64)((NI)(b_2 & ((NI) 31))));
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, star___Kt56c9bv0oafdrZNxf9cKpNg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA lhs, tyObject_Int128__9a9axPfb75jdWY25AamJewkA rhs) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NU64 a;
	NU64 b;
	NU64 c;
	NU64 d;
	NU64 e;
	NU64 f;
	NU64 g;
	NU64 h;
	NU64 a32;
	NU64 a00;
	NU64 b32;
	NU64 b00;
	NU64 T1_;
	NU64 T2_;
	NU64 T3_;
	NU64 T4_;
	NU64 T5_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T6_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T7_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T8_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T9_;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	a = ((NU64) (lhs.udata[(((NI) 0))- 0]));
	b = ((NU64) (lhs.udata[(((NI) 1))- 0]));
	c = ((NU64) (lhs.udata[(((NI) 2))- 0]));
	d = ((NU64) (lhs.udata[(((NI) 3))- 0]));
	e = ((NU64) (rhs.udata[(((NI) 0))- 0]));
	f = ((NU64) (rhs.udata[(((NI) 1))- 0]));
	g = ((NU64) (rhs.udata[(((NI) 2))- 0]));
	h = ((NU64) (rhs.udata[(((NI) 3))- 0]));
	a32 = ((NU64) (lhs.udata[(((NI) 1))- 0]));
	a00 = ((NU64) (lhs.udata[(((NI) 0))- 0]));
	b32 = ((NU64) (rhs.udata[(((NI) 1))- 0]));
	b00 = ((NU64) (rhs.udata[(((NI) 0))- 0]));
	T1_ = (NU64)0;
	T1_ = high64__I5PvReDoxFJAuJBwWACbVA(lhs);
	T2_ = (NU64)0;
	T2_ = low64__I5PvReDoxFJAuJBwWACbVA_2(rhs);
	T3_ = (NU64)0;
	T3_ = low64__I5PvReDoxFJAuJBwWACbVA_2(lhs);
	T4_ = (NU64)0;
	T4_ = high64__I5PvReDoxFJAuJBwWACbVA(rhs);
	T5_ = (NU64)0;
	T5_ = (NU64)((NU64)((NU64)((NU64)((NU64)((NU64)(T1_) * (NU64)(T2_))) + (NU64)((NU64)((NU64)(T3_) * (NU64)(T4_))))) + (NU64)((NU64)((NU64)(a32) * (NU64)(b32))));
	result = makeInt128__Hjx539cGmNc1sRJqnuVI2iw(T5_, (NU64)((NU64)(a00) * (NU64)(b00)));
	T6_ = toInt128__TDVoY1DSlNtMNULcUFRJzA((NU64)((NU64)(a32) * (NU64)(b00)));
	T7_ = shl__al6Zjboz2CA0pIDMg9a9cJFw(T6_, ((NI) 32));
	pluseq___9bKV7SFHb7pJ2i2tfsBPcBA((&result), T7_);
	T8_ = toInt128__TDVoY1DSlNtMNULcUFRJzA((NU64)((NU64)(a00) * (NU64)(b32)));
	T9_ = shl__al6Zjboz2CA0pIDMg9a9cJFw(T8_, ((NI) 32));
	pluseq___9bKV7SFHb7pJ2i2tfsBPcBA((&result), T9_);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__eu59anK1RU2Rk1MDZxLqq9ag)(NI8 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	(*((NI32*) ((&result.udata[(((NI) 0))- 0])))) = ((NI32) (arg));
	{
		if (!(arg < ((NI8) 0))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
	}
	LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI8, toInt8__6cQbCFpX4H8O19aEOrsPYrw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI8 result;
	result = (NI8)0;
	{
		if (!((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
	}
	goto LA1_;
	LA3_: ;
	{
	}
	LA1_: ;
	result = ((NI8) ((*((NI32*) ((&arg.udata[(((NI) 0))- 0]))))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__bA9cKzDjr9aTHOeg7zwjs6cw)(NI16 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	(*((NI32*) ((&result.udata[(((NI) 0))- 0])))) = ((NI32) (arg));
	{
		if (!(arg < ((NI16) 0))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
	}
	LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI16, toInt16__79as9b2pi2JJfykcqECr9ch7w)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI16 result;
	result = (NI16)0;
	{
		if (!((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
	}
	goto LA1_;
	LA3_: ;
	{
	}
	LA1_: ;
	result = ((NI16) ((*((NI32*) ((&arg.udata[(((NI) 0))- 0]))))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__hTMQ3QGzeZAKnBAJ4tvqqA)(NI32 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	(*((NI32*) ((&result.udata[(((NI) 0))- 0])))) = arg;
	{
		if (!(arg < ((NI32) 0))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
	}
	LA3_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI32, toInt32__6rExDXcEPWSTMgIhAkSSEg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI32 result;
	result = (NI32)0;
	{
		if (!((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA3_;
	}
	goto LA1_;
	LA3_: ;
	{
	}
	LA1_: ;
	result = (*((NI32*) ((&arg.udata[(((NI) 0))- 0]))));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__wP9c9a79bp9aIubg2xUNp1Mcxw)(NU8 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = ((NU32) (arg));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU8, toUInt8__E8LsZ2FZdbNGEBWOogFqvA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NU8 result;
	result = (NU8)0;
	result = ((NU8) (arg.udata[(((NI) 0))- 0]));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__3Thi9cL5j9aXHbydU7kR8Czw)(NU16 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = ((NU32) (arg));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU16, toUInt16__hjUYKwZ2UG0FJDQ3iCDmeg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NU16 result;
	result = (NU16)0;
	result = ((NU16) (arg.udata[(((NI) 0))- 0]));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__YpxIye9cNDLmo81kNcCyWqA)(NU32 arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = arg;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU32, toUInt32__7WRBGD756FORxqb7aY1Z0w)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NU32 result;
	result = (NU32)0;
	result = arg.udata[(((NI) 0))- 0];
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NU64, toUInt64__eSidVZnVWqCQ9ctpa3OHXuA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NU64 result;
	result = (NU64)0;
	result = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg.udata[(((NI) 1))- 0], arg.udata[(((NI) 0))- 0]);
	return result;
}
static N_INLINE(NI, fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops)(NU32 x) {
	NI result;
	int T1_;
	result = (NI)0;
	T1_ = (int)0;
	T1_ = __builtin_clz(x);
	result = (NI)(((NI) 31) - ((NI) (T1_)));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, fastLog2__B89cYHjezMujo53G7iZ9aTUg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	NI result;
{	result = (NI)0;
	{
		NI T5_;
		if (!!((a.udata[(((NI) 3))- 0] == ((NU32) 0)))) goto LA3_;
		T5_ = (NI)0;
		T5_ = fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops(a.udata[(((NI) 3))- 0]);
		result = (NI)(((NI) 96) + T5_);
		goto BeforeRet_;
	}
	LA3_: ;
	{
		NI T10_;
		if (!!((a.udata[(((NI) 2))- 0] == ((NU32) 0)))) goto LA8_;
		T10_ = (NI)0;
		T10_ = fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops(a.udata[(((NI) 2))- 0]);
		result = (NI)(((NI) 64) + T10_);
		goto BeforeRet_;
	}
	LA8_: ;
	{
		NI T15_;
		if (!!((a.udata[(((NI) 1))- 0] == ((NU32) 0)))) goto LA13_;
		T15_ = (NI)0;
		T15_ = fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops(a.udata[(((NI) 1))- 0]);
		result = (NI)(((NI) 32) + T15_);
		goto BeforeRet_;
	}
	LA13_: ;
	{
		if (!!((a.udata[(((NI) 0))- 0] == ((NU32) 0)))) goto LA18_;
		result = fastLog2__VDVe46ziNkM8kjqmh3lkqAbitops(a.udata[(((NI) 0))- 0]);
		goto BeforeRet_;
	}
	LA18_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(void, minuseq___9bKV7SFHb7pJ2i2tfsBPcBA_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA* a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	(*a) = minus___Sp7OcCEIFoBYolB6PB1fAg_2((*a), b);
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitor__Sp7OcCEIFoBYolB6PB1fAg_4)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = (NU32)(a.udata[(((NI) 0))- 0] | b.udata[(((NI) 0))- 0]);
	result.udata[(((NI) 1))- 0] = (NU32)(a.udata[(((NI) 1))- 0] | b.udata[(((NI) 1))- 0]);
	result.udata[(((NI) 2))- 0] = (NU32)(a.udata[(((NI) 2))- 0] | b.udata[(((NI) 2))- 0]);
	result.udata[(((NI) 3))- 0] = (NU32)(a.udata[(((NI) 3))- 0] | b.udata[(((NI) 3))- 0]);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, shr__al6Zjboz2CA0pIDMg9a9cJFw_2)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NI b_2;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	b_2 = (NI)(b & ((NI) 127));
	{
		NU64 T5_;
		NU64 T6_;
		NU64 T7_;
		if (!(b_2 < ((NI) 32))) goto LA3_;
		(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = (NI32)((NI64)((*((NI32*) ((&a.udata[(((NI) 3))- 0]))))) >> (NU64)(b_2));
		T5_ = (NU64)0;
		T5_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 3))- 0], a.udata[(((NI) 2))- 0]);
		result.udata[(((NI) 2))- 0] = ((NU32) ((NU64)((NU64)(T5_) >> (NU64)(b_2))));
		T6_ = (NU64)0;
		T6_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 2))- 0], a.udata[(((NI) 1))- 0]);
		result.udata[(((NI) 1))- 0] = ((NU32) ((NU64)((NU64)(T6_) >> (NU64)(b_2))));
		T7_ = (NU64)0;
		T7_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 1))- 0], a.udata[(((NI) 0))- 0]);
		result.udata[(((NI) 0))- 0] = ((NU32) ((NU64)((NU64)(T7_) >> (NU64)(b_2))));
	}
	goto LA1_;
	LA3_: ;
	{
		NU64 T15_;
		NU64 T16_;
		if (!(b_2 < ((NI) 64))) goto LA9_;
		{
			if (!((*((NI32*) ((&a.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA13_;
			(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
		}
		LA13_: ;
		(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = (NI32)((NI64)((*((NI32*) ((&a.udata[(((NI) 3))- 0]))))) >> (NU64)((NI)(b_2 & ((NI) 31))));
		T15_ = (NU64)0;
		T15_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 3))- 0], a.udata[(((NI) 2))- 0]);
		result.udata[(((NI) 1))- 0] = ((NU32) ((NU64)((NU64)(T15_) >> (NU64)((NI)(b_2 & ((NI) 31))))));
		T16_ = (NU64)0;
		T16_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 2))- 0], a.udata[(((NI) 1))- 0]);
		result.udata[(((NI) 0))- 0] = ((NU32) ((NU64)((NU64)(T16_) >> (NU64)((NI)(b_2 & ((NI) 31))))));
	}
	goto LA1_;
	LA9_: ;
	{
		NU64 T24_;
		if (!(b_2 < ((NI) 96))) goto LA18_;
		{
			if (!((*((NI32*) ((&a.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA22_;
			(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
			(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
		}
		LA22_: ;
		(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = (NI32)((NI64)((*((NI32*) ((&a.udata[(((NI) 3))- 0]))))) >> (NU64)((NI)(b_2 & ((NI) 31))));
		T24_ = (NU64)0;
		T24_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(a.udata[(((NI) 3))- 0], a.udata[(((NI) 2))- 0]);
		result.udata[(((NI) 0))- 0] = ((NU32) ((NU64)((NU64)(T24_) >> (NU64)((NI)(b_2 & ((NI) 31))))));
	}
	goto LA1_;
	LA18_: ;
	{
		{
			if (!((*((NI32*) ((&a.udata[(((NI) 3))- 0])))) < ((NI32) 0))) goto LA28_;
			(*((NI32*) ((&result.udata[(((NI) 3))- 0])))) = ((NI32) -1);
			(*((NI32*) ((&result.udata[(((NI) 2))- 0])))) = ((NI32) -1);
			(*((NI32*) ((&result.udata[(((NI) 1))- 0])))) = ((NI32) -1);
		}
		LA28_: ;
		(*((NI32*) ((&result.udata[(((NI) 0))- 0])))) = (NI32)((NI64)((*((NI32*) ((&a.udata[(((NI) 3))- 0]))))) >> (NU64)((NI)(b_2 & ((NI) 31))));
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyTuple__0titlMXgFgzRLN6v28f9azA, divMod__hJyv3l2B2Q9cPG2G6osz9cmA)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA dividend, tyObject_Int128__9a9axPfb75jdWY25AamJewkA divisor) {
	tyTuple__0titlMXgFgzRLN6v28f9azA result;
	NIM_BOOL isNegativeA;
	NIM_BOOL isNegativeB;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA dividend_2;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA divisor_2;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA denominator;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA quotient;
	NI shift;
	NI T21_;
	NI T22_;
{	nimZeroMem((void*)(&result), sizeof(tyTuple__0titlMXgFgzRLN6v28f9azA));
	isNegativeA = ((*((NI32*) ((&dividend.udata[(((NI) 3))- 0])))) < ((NI32) 0));
	isNegativeB = ((*((NI32*) ((&divisor.udata[(((NI) 3))- 0])))) < ((NI32) 0));
	dividend_2 = abs__mAwxaUUL6Ssa3kRZvdXw3A_3(dividend);
	divisor_2 = abs__mAwxaUUL6Ssa3kRZvdXw3A_3(divisor);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = lt___7c5Zw7H31uJfWmmhZe9aEqw_3(dividend_2, divisor_2);
		if (!T3_) goto LA4_;
		result.Field0 = Zero__1ed0M9aQUqqSQVhLxSQO9bCw;
		{
			if (!isNegativeA) goto LA8_;
			result.Field1 = minus___mAwxaUUL6Ssa3kRZvdXw3A(dividend_2);
		}
		goto LA6_;
		LA8_: ;
		{
			result.Field1 = dividend_2;
		}
		LA6_: ;
		goto BeforeRet_;
	}
	LA4_: ;
	{
		NIM_BOOL T13_;
		T13_ = (NIM_BOOL)0;
		T13_ = eqeq___7c5Zw7H31uJfWmmhZe9aEqw(divisor_2, dividend_2);
		if (!T13_) goto LA14_;
		{
			if (!(isNegativeA != isNegativeB)) goto LA18_;
			result.Field0 = NegOne__d9bDUxsqvMi69cXPELCoXEuA;
		}
		goto LA16_;
		LA18_: ;
		{
			result.Field0 = One__asIdv19bIr70QgMTVvq2zyQ;
		}
		LA16_: ;
		result.Field1 = Zero__1ed0M9aQUqqSQVhLxSQO9bCw;
		goto BeforeRet_;
	}
	LA14_: ;
	denominator = divisor_2;
	quotient = Zero__1ed0M9aQUqqSQVhLxSQO9bCw;
	T21_ = (NI)0;
	T21_ = fastLog2__B89cYHjezMujo53G7iZ9aTUg(dividend_2);
	T22_ = (NI)0;
	T22_ = fastLog2__B89cYHjezMujo53G7iZ9aTUg(denominator);
	shift = (NI)(T21_ - T22_);
	denominator = shl__al6Zjboz2CA0pIDMg9a9cJFw(denominator, shift);
	{
		NI i;
		NI res;
		i = (NI)0;
		res = ((NI) 0);
		{
			while (1) {
				if (!(res <= shift)) goto LA25;
				i = res;
				quotient = shl__al6Zjboz2CA0pIDMg9a9cJFw(quotient, ((NI) 1));
				{
					NIM_BOOL T28_;
					T28_ = (NIM_BOOL)0;
					T28_ = lteq___7c5Zw7H31uJfWmmhZe9aEqw_2(denominator, dividend_2);
					if (!T28_) goto LA29_;
					minuseq___9bKV7SFHb7pJ2i2tfsBPcBA_2((&dividend_2), denominator);
					quotient = bitor__Sp7OcCEIFoBYolB6PB1fAg_4(quotient, One__asIdv19bIr70QgMTVvq2zyQ);
				}
				LA29_: ;
				denominator = shr__al6Zjboz2CA0pIDMg9a9cJFw_2(denominator, ((NI) 1));
				res += ((NI) 1);
			} LA25: ;
		}
	}
	{
		if (!(isNegativeA != isNegativeB)) goto LA33_;
		result.Field0 = minus___mAwxaUUL6Ssa3kRZvdXw3A(quotient);
	}
	goto LA31_;
	LA33_: ;
	{
		result.Field0 = quotient;
	}
	LA31_: ;
	{
		if (!isNegativeA) goto LA38_;
		result.Field1 = minus___mAwxaUUL6Ssa3kRZvdXw3A(dividend_2);
	}
	goto LA36_;
	LA38_: ;
	{
		result.Field1 = dividend_2;
	}
	LA36_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, div__Sp7OcCEIFoBYolB6PB1fAg_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	tyTuple__0titlMXgFgzRLN6v28f9azA T1_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA a_2;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA b_2;
{	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = divMod__hJyv3l2B2Q9cPG2G6osz9cmA(a, b);
	a_2 = T1_.Field0;
	b_2 = T1_.Field1;
	result = a_2;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, mod__Sp7OcCEIFoBYolB6PB1fAg_5)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	tyTuple__0titlMXgFgzRLN6v28f9azA T1_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA a_2;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA b_2;
{	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	T1_ = divMod__hJyv3l2B2Q9cPG2G6osz9cmA(a, b);
	a_2 = T1_.Field0;
	b_2 = T1_.Field1;
	result = b_2;
	goto BeforeRet_;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitand__Sp7OcCEIFoBYolB6PB1fAg_6)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = (NU32)(a.udata[(((NI) 0))- 0] & b.udata[(((NI) 0))- 0]);
	result.udata[(((NI) 1))- 0] = (NU32)(a.udata[(((NI) 1))- 0] & b.udata[(((NI) 1))- 0]);
	result.udata[(((NI) 2))- 0] = (NU32)(a.udata[(((NI) 2))- 0] & b.udata[(((NI) 2))- 0]);
	result.udata[(((NI) 3))- 0] = (NU32)(a.udata[(((NI) 3))- 0] & b.udata[(((NI) 3))- 0]);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, bitxor__Sp7OcCEIFoBYolB6PB1fAg_7)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	result.udata[(((NI) 0))- 0] = (NU32)(a.udata[(((NI) 0))- 0] ^ b.udata[(((NI) 0))- 0]);
	result.udata[(((NI) 1))- 0] = (NU32)(a.udata[(((NI) 1))- 0] ^ b.udata[(((NI) 1))- 0]);
	result.udata[(((NI) 2))- 0] = (NU32)(a.udata[(((NI) 2))- 0] ^ b.udata[(((NI) 2))- 0]);
	result.udata[(((NI) 3))- 0] = (NU32)(a.udata[(((NI) 3))- 0] ^ b.udata[(((NI) 3))- 0]);
	return result;
}
static N_INLINE(void, nimCopyMem)(void* dest, void* source, NI size) {
	void* T1_;
	T1_ = (void*)0;
	T1_ = memcpy(dest, source, ((size_t) (size)));
}
static N_INLINE(void, copyMem__i80o3k0SgEI5gTRCzYdyWAsystem)(void* dest, void* source, NI size) {
	nimCopyMem(dest, source, size);
}
static N_INLINE(void, appendString)(NimStringDesc* dest, NimStringDesc* src) {
	{
		void* T5_;
		void* T6_;
		if (!!((src == NIM_NIL))) goto LA3_;
		T5_ = (void*)0;
		T5_ = ((void*) ((&(*dest).data[(*dest).Sup.len])));
		T6_ = (void*)0;
		T6_ = ((void*) ((*src).data));
		copyMem__i80o3k0SgEI5gTRCzYdyWAsystem(T5_, T6_, ((NI) ((NI)((*src).Sup.len + ((NI) 1)))));
		(*dest).Sup.len += (*src).Sup.len;
	}
	LA3_: ;
}
N_LIB_PRIVATE N_NIMCALL(void, addInt128__IvecK4CF4vhXBu6XHFt6sg)(NimStringDesc** result, tyObject_Int128__9a9axPfb75jdWY25AamJewkA value) {
	NI initialSize;
	initialSize = ((*result) ? (*result)->Sup.len : 0);
	{
		NIM_BOOL T3_;
		T3_ = (NIM_BOOL)0;
		T3_ = eqeq___7c5Zw7H31uJfWmmhZe9aEqw(value, Zero__1ed0M9aQUqqSQVhLxSQO9bCw);
		if (!T3_) goto LA4_;
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 1));
appendString((*result), ((NimStringDesc*) &TM__nQVdjfHleOuOqvMTepKJUw_3));
	}
	goto LA1_;
	LA4_: ;
	{
		NIM_BOOL T7_;
		T7_ = (NIM_BOOL)0;
		T7_ = eqeq___7c5Zw7H31uJfWmmhZe9aEqw(value, Min__tcYPiLl9bZLJNUEW2vfzVFQ);
		if (!T7_) goto LA8_;
		unsureAsgnRef((void**) (&(*result)), resizeString((*result), 40));
appendString((*result), ((NimStringDesc*) &TM__nQVdjfHleOuOqvMTepKJUw_4));
	}
	goto LA1_;
	LA8_: ;
	{
		NIM_BOOL isNegative;
		tyObject_Int128__9a9axPfb75jdWY25AamJewkA value_2;
		NI i;
		NI j;
		isNegative = ((*((NI32*) ((&value.udata[(((NI) 3))- 0])))) < ((NI32) 0));
		value_2 = abs__mAwxaUUL6Ssa3kRZvdXw3A_3(value);
		{
			while (1) {
				NIM_BOOL T13_;
				tyTuple__0titlMXgFgzRLN6v28f9azA T14_;
				tyObject_Int128__9a9axPfb75jdWY25AamJewkA quot;
				tyObject_Int128__9a9axPfb75jdWY25AamJewkA rem;
				NI64 T15_;
				T13_ = (NIM_BOOL)0;
				T13_ = lt___7c5Zw7H31uJfWmmhZe9aEqw_3(Zero__1ed0M9aQUqqSQVhLxSQO9bCw, value_2);
				if (!T13_) goto LA12;
				T14_ = divMod__hJyv3l2B2Q9cPG2G6osz9cmA(value_2, Ten__ENw4PZGy8j7vPVc9ar760nA);
				quot = T14_.Field0;
				rem = T14_.Field1;
				T15_ = (NI64)0;
				T15_ = toInt64__1szweXXq3RBN50owrYu2Xw(rem);
				unsureAsgnRef((void**) (&(*result)), addChar((*result), ((NimStringDesc*) &TM__nQVdjfHleOuOqvMTepKJUw_5)->data[T15_]));
				value_2 = quot;
			} LA12: ;
		}
		{
			if (!isNegative) goto LA18_;
			unsureAsgnRef((void**) (&(*result)), addChar((*result), 45));
		}
		LA18_: ;
		i = initialSize;
		j = (((*result) ? (*result)->Sup.len : 0)-1);
		{
			while (1) {
				NIM_CHAR T22_;
				if (!(i < j)) goto LA21;
				T22_ = (NIM_CHAR)0;
				T22_ = (*result)->data[i];
				(*result)->data[i] = (*result)->data[j];
				(*result)->data[j] = T22_;
				i += ((NI) 1);
				j -= ((NI) 1);
			} LA21: ;
		}
	}
	LA1_: ;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, dollar___W2wbDjPGDCaBwLQM6yLUQg)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a) {
	NimStringDesc* result;
	result = (NimStringDesc*)0;
	addInt128__IvecK4CF4vhXBu6XHFt6sg((&result), a);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___xL5gyZrjbGMarSdRAXOo9ag_2)(NI64 a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(a);
	result = eqeq___7c5Zw7H31uJfWmmhZe9aEqw(T1_, b);
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NF, toFloat64__PDwVTbOO2Rlwlg5dKjIRyQ)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NF result;
	NIM_BOOL isNegative;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg_2;
	NF a;
	NU64 T1_;
	NF b;
	NU64 T2_;
	result = (NF)0;
	isNegative = ((*((NI32*) ((&arg.udata[(((NI) 3))- 0])))) < ((NI32) 0));
	arg_2 = abs__mAwxaUUL6Ssa3kRZvdXw3A_3(arg);
	T1_ = (NU64)0;
	T1_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg_2.udata[(((NI) 1))- 0], arg_2.udata[(((NI) 0))- 0]);
	a = ((NF) (T1_));
	T2_ = (NU64)0;
	T2_ = bitconcat__Pmez7IavBczO9c5TgNUZEqA(arg_2.udata[(((NI) 3))- 0], arg_2.udata[(((NI) 2))- 0]);
	b = ((NF) (T2_));
	result = ((NF)(a) + (NF)(((NF)(1.8446744073709552e+19) * (NF)(b))));
	{
		if (!isNegative) goto LA5_;
		result = -(result);
	}
	LA5_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__HaskCaz5YmXySs9c9c3vJN8A)(NIM_BOOL arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	(*((NI32*) ((&result.udata[(((NI) 0))- 0])))) = ((NI32) (arg));
	return result;
}
static N_INLINE(NF, abs__BRaAqinz6OWTHkALb4oj6Qsystem)(NF x) {
	NF result;
	result = (NF)0;
	{
		if (!(x < 0.0)) goto LA3_;
		result = -(x);
	}
	goto LA1_;
	LA3_: ;
	{
		result = x;
	}
	LA1_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(tyObject_Int128__9a9axPfb75jdWY25AamJewkA, toInt128__Ds1OEQoxqjWJ62lsdr6soA)(NF arg) {
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA result;
	NIM_BOOL isNegative;
	NF v0;
	NF T1_;
	NU64 w0;
	NF T2_;
	NF v1;
	NU64 w1;
	NF T3_;
	NF v2;
	NU64 w2;
	NF T4_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA res;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T5_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T6_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T7_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T8_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T9_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T10_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T11_;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T12_;
{	nimZeroMem((void*)(&result), sizeof(tyObject_Int128__9a9axPfb75jdWY25AamJewkA));
	isNegative = (arg < 0.0);
	T1_ = (NF)0;
	T1_ = abs__BRaAqinz6OWTHkALb4oj6Qsystem(arg);
	v0 = ldexp(T1_, ((int) -100));
	T2_ = (NF)0;
	T2_ = trunc(v0);
	w0 = ((NU64) (T2_));
	v1 = ldexp(((NF)(v0) - (NF)(((NF) (w0)))), ((int) 50));
	T3_ = (NF)0;
	T3_ = trunc(v1);
	w1 = ((NU64) (T3_));
	v2 = ldexp(((NF)(v1) - (NF)(((NF) (w1)))), ((int) 50));
	T4_ = (NF)0;
	T4_ = trunc(v2);
	w2 = ((NU64) (T4_));
	T5_ = toInt128__TDVoY1DSlNtMNULcUFRJzA(w0);
	T6_ = shl__al6Zjboz2CA0pIDMg9a9cJFw(T5_, ((NI) 100));
	T7_ = T6_;
	T8_ = toInt128__TDVoY1DSlNtMNULcUFRJzA(w1);
	T9_ = shl__al6Zjboz2CA0pIDMg9a9cJFw(T8_, ((NI) 50));
	T10_ = bitor__Sp7OcCEIFoBYolB6PB1fAg_4(T7_, T9_);
	T11_ = T10_;
	T12_ = toInt128__TDVoY1DSlNtMNULcUFRJzA(w2);
	res = bitor__Sp7OcCEIFoBYolB6PB1fAg_4(T11_, T12_);
	{
		if (!isNegative) goto LA15_;
		result = minus___mAwxaUUL6Ssa3kRZvdXw3A(res);
		goto BeforeRet_;
	}
	goto LA13_;
	LA15_: ;
	{
		result = res;
		goto BeforeRet_;
	}
	LA13_: ;
	}BeforeRet_: ;
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, toInt__TIX0sFuRf3uBpOBltYp7bw)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA arg) {
	NI result;
	NI64 T1_;
	result = (NI)0;
	T1_ = (NI64)0;
	T1_ = toInt64__1szweXXq3RBN50owrYu2Xw(arg);
	result = ((NI) (T1_));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___xL5gyZrjbGMarSdRAXOo9ag_3)(NI64 a, tyObject_Int128__9a9axPfb75jdWY25AamJewkA b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	NI T2_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(a);
	T2_ = (NI)0;
	T2_ = cmp__aTFQcoQMnofdh4pk1uYwhA(T1_, b);
	result = (T2_ < ((NI) 0));
	return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, lt___nr9cP9b0OL9cabygV9bo19cJgZA_3)(tyObject_Int128__9a9axPfb75jdWY25AamJewkA a, NI64 b) {
	NIM_BOOL result;
	tyObject_Int128__9a9axPfb75jdWY25AamJewkA T1_;
	NI T2_;
	result = (NIM_BOOL)0;
	T1_ = toInt128__ZBiVpGjOydV7ZjeElrE9cFQ(b);
	T2_ = (NI)0;
	T2_ = cmp__aTFQcoQMnofdh4pk1uYwhA(a, T1_);
	result = (T2_ < ((NI) 0));
	return result;
}
