LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/tests/number.c
// Function: test_mersenne
void test_mersenne(void)
{
	/* Mersenne number: 2^N - 1 */
	#define N	521
	const int n = N + 1;
	int sz = (n + _tt_word_bits - 1) / _tt_word_bits;
	_tt_word m[sz+1];
	m[sz] = 0;
	for (int i = 0; i < sz-1; i++)
		m[i] = ~_tt_word_top_bit;
	m[sz-1] = (1 << (n - _tt_word_bits*(sz-1) - 1)) - 1;
	if (m[sz-1] == 0)
		sz--;
	struct tt_int ti = _TT_INT_DECL(sz, m);

	if (tt_int_isprime(&ti))
		printf("Prime: ");
	else
		printf("Composite: ");
	printf("2^%d - 1\n", N);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl $0x20a, -0x4(%rbp)      # imm = 0x20A
movl $0x9, -0x8(%rbp)
movl -0x8(%rbp), %eax
incl %eax
movl %eax, %ecx
movq %rsp, %rax
movq %rax, -0x10(%rbp)
leaq 0xf(,%rcx,8), %rdx
andq $-0x10, %rdx
movq %rsp, %rax
subq %rdx, %rax
movq %rax, -0x40(%rbp)
movq %rax, %rsp
movq %rcx, -0x18(%rbp)
movslq -0x8(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x14e2
movq -0x40(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
movq %rdx, (%rax,%rcx,8)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x14b4
movq -0x40(%rbp), %rax
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
imull $0x3f, %ecx, %edx
movl $0x20a, %ecx            # imm = 0x20A
subl %edx, %ecx
subl $0x1, %ecx
movl $0x1, %edx
shll %cl, %edx
movl %edx, %ecx
subl $0x1, %ecx
movslq %ecx, %rdx
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x8(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x152e
movl -0x8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x8(%rbp)
movq -0x40(%rbp), %rax
movl $0x0, -0x38(%rbp)
movl -0x8(%rbp), %ecx
movl %ecx, -0x34(%rbp)
movl -0x8(%rbp), %ecx
movl %ecx, -0x30(%rbp)
movq %rax, -0x28(%rbp)
leaq -0x38(%rbp), %rdi
callq 0xd5c0
testb $0x1, %al
jne 0x1558
jmp 0x1568
leaq 0x10ac9(%rip), %rdi     # 0x12028
movb $0x0, %al
callq 0x10c0
jmp 0x1576
leaq 0x10ac1(%rip), %rdi     # 0x12030
movb $0x0, %al
callq 0x10c0
leaq 0x10ad0(%rip), %rdi     # 0x1204d
movl $0x209, %esi            # imm = 0x209
movb $0x0, %al
callq 0x10c0
movq -0x10(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/tests/number.c
// Function: prime_distribute
void prime_distribute(void)
{
	printf("Testing prime distribution...\n");

	#define NN	8

	_tt_word r[NN];
	struct tt_int ti = _TT_INT_DECL(NN, r);

	/* In theory, there're about 100 primes in pcnt100 tries  */
	uint pcnt100 = (uint)(log(2.0) * _tt_word_bits * NN * 100.0);
	uint pcnt = 0;

	for (int i = 0; i < pcnt100; i++) {
		/* Generate random integer with 1 ~ N words */
		for (int j = 0; j < NN; j++) {
			r[j] = _tt_rand() & ~BIT(31);
#ifdef _TT_LP64_
			r[j] <<= 32;
			r[j] |= _tt_rand();
#endif
		}
		ti.msb = _tt_int_get_msb(r, NN);

		if (tt_int_isprime(&ti))
			pcnt++;
	}

	printf("%d primes found\n", pcnt);
}

// Assembly:
subq $0x78, %rsp
leaq 0x10aac(%rip), %rdi     # 0x12057
xorl %eax, %eax
callq 0x10c0
movl $0x0, 0x18(%rsp)
movl $0x8, 0x1c(%rsp)
movl $0x8, 0x20(%rsp)
leaq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movsd 0x10a2c(%rip), %xmm0    # 0x12008
callq 0x1100
movsd 0x10a27(%rip), %xmm1    # 0x12010
mulsd %xmm1, %xmm0
movsd 0x10a23(%rip), %xmm1    # 0x12018
mulsd %xmm1, %xmm0
movsd 0x10a1f(%rip), %xmm1    # 0x12020
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
cmpl 0x14(%rsp), %eax
jae 0x16cb
movl $0x0, 0x8(%rsp)
cmpl $0x8, 0x8(%rsp)
jge 0x168b
callq 0xeb40
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %ecx
movslq 0x8(%rsp), %rax
movq %rcx, 0x30(%rsp,%rax,8)
movslq 0x8(%rsp), %rax
movq 0x30(%rsp,%rax,8), %rcx
shlq $0x20, %rcx
movq %rcx, 0x30(%rsp,%rax,8)
callq 0xeb40
movl %eax, %eax
movl %eax, %ecx
movslq 0x8(%rsp), %rax
orq 0x30(%rsp,%rax,8), %rcx
movq %rcx, 0x30(%rsp,%rax,8)
movl 0x8(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x8(%rsp)
jmp 0x1634
leaq 0x30(%rsp), %rdi
movl $0x8, %esi
callq 0x8b90
movl %eax, 0x20(%rsp)
leaq 0x18(%rsp), %rdi
callq 0xd5c0
testb $0x1, %al
jne 0x16ae
jmp 0x16b9
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x16bb
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x161e
movl 0x10(%rsp), %esi
leaq 0x109a0(%rip), %rdi     # 0x12076
movb $0x0, %al
callq 0x10c0
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/tests/number.c
// Function: rand_int
struct tt_int *rand_int(int msb)
{
	struct tt_int *ti = tt_int_alloc();
	if (_tt_int_realloc(ti, msb))
		return NULL;

	ti->msb = msb;
#ifdef _TT_LP64_
	for (int i = 0; i < msb-1; i++) {
		ti->buf[i] = _tt_rand() & ~(1<<31);
		ti->buf[i] <<= 32;
		ti->buf[i] |= _tt_rand();
	}
	do {
		ti->buf[msb-1] = _tt_rand() & ~(1<<31);
	} while (ti->buf[msb-1] == 0);
	ti->buf[msb-1] <<= 32;
	ti->buf[msb-1] |= _tt_rand();
#else
	for (int i = 0; i < msb-1; i++)
		ti->buf[i] = _tt_rand() & ~(1<<31);
	do {
		ti->buf[msb-1] = _tt_rand() & ~(1<<31);
	} while (ti->buf[msb-1] == 0);
#endif

	return ti;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x1c(%rsp)
callq 0x6800
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movl 0x1c(%rsp), %esi
callq 0x68d0
cmpl $0x0, %eax
je 0x1723
movq $0x0, 0x20(%rsp)
jmp 0x183a
movl 0x1c(%rsp), %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, 0xc(%rsp)
movl 0xc(%rsp), %eax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0x17ac
callq 0xeb40
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
callq 0xeb40
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0xc(%rsp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movl 0xc(%rsp), %eax
addl $0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x1737
jmp 0x17ae
callq 0xeb40
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x17ae
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
callq 0xeb40
movl %eax, %eax
movl %eax, %edx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movl 0x1c(%rsp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/tests/number.c
// Function: test_gcd
void test_gcd(void)
{
#if 1
	printf("Testing GCD...\n");

	struct tt_int *u = tt_int_alloc();
	struct tt_int *v = tt_int_alloc();
	struct tt_int *g = tt_int_alloc();

#define GCD_MAX_MSB	100
#define GCD_COUNT	1000
	for (int i = 0; i < GCD_COUNT; i++) {
		struct tt_int *a = rand_int(_tt_rand() % GCD_MAX_MSB + 1);
		struct tt_int *b = rand_int(_tt_rand() % GCD_MAX_MSB + 1);

		tt_int_extgcd(g, u, v, a, b);

		tt_int_mul(u, a, u);
		tt_int_mul(v, b, v);
		tt_int_add(u, u, v);

		if (tt_int_cmp(g, u)) {
			tt_error("GCD test failed!");
			_tt_int_print(a);
			_tt_int_print(b);
			break;
		}

		tt_int_free(a);
		tt_int_free(b);
	}

	tt_int_free(u);
	tt_int_free(v);
	tt_int_free(g);

	printf("Done\n");
#else
	const char *a = "9903824712476097189547457927456428897123434496";
	const char *b = "7417779112426492492240709295800320";

	struct tt_int *tia = tt_int_alloc();
	struct tt_int *tib = tt_int_alloc();
	struct tt_int *tig = tt_int_alloc();
	struct tt_int *tiu = tt_int_alloc();
	struct tt_int *tiv = tt_int_alloc();

	tt_int_from_string(tia, a);
	tt_int_from_string(tib, b);

	tt_int_extgcd(tig, tiu, tiv, tia, tib);

	char *g = NULL, *u = NULL, *v = NULL;
	tt_int_to_string(tig, &g, 10);
	tt_int_to_string(tiu, &u, 10);
	tt_int_to_string(tiv, &v, 10);
	printf("%s = ", g);
	printf("%s * %s %s %s * %s\n", u, a, tiv->sign?"\b":"+", v, b);

	free(g);
	free(u);
	free(v);
	tt_int_free(tia);
	tt_int_free(tib);
	tt_int_free(tig);
	tt_int_free(tiu);
	tt_int_free(tiv);
#endif
}

// Assembly:
subq $0x38, %rsp
leaq 0x1082c(%rip), %rdi     # 0x12087
movb $0x0, %al
callq 0x10c0
callq 0x6800
movq %rax, 0x30(%rsp)
callq 0x6800
movq %rax, 0x28(%rsp)
callq 0x6800
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
cmpl $0x3e8, 0x1c(%rsp)      # imm = 0x3E8
jge 0x198f
callq 0xeb40
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %edi
addl $0x1, %edi
callq 0x16f0
movq %rax, 0x10(%rsp)
callq 0xeb40
movl $0x64, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %edi
addl $0x1, %edi
callq 0x16f0
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0xc140
movq 0x30(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0xa8c0
movq 0x28(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xa8c0
movq 0x30(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0xa750
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xb020
cmpl $0x0, %eax
je 0x196b
xorl %edi, %edi
leaq 0x10750(%rip), %rsi     # 0x12097
leaq 0x10752(%rip), %rdx     # 0x120a0
movb $0x0, %al
callq 0xe010
movq 0x10(%rsp), %rdi
callq 0x6c80
movq 0x8(%rsp), %rdi
callq 0x6c80
jmp 0x198f
movq 0x10(%rsp), %rdi
callq 0x68b0
movq 0x8(%rsp), %rdi
callq 0x68b0
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x1888
movq 0x30(%rsp), %rdi
callq 0x68b0
movq 0x28(%rsp), %rdi
callq 0x68b0
movq 0x20(%rsp), %rdi
callq 0x68b0
leaq 0x106fd(%rip), %rdi     # 0x120b1
movb $0x0, %al
callq 0x10c0
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_alloc
struct tt_dec *tt_dec_alloc(uint prec)
{
	if (prec == 0) {
		prec = CONFIG_DEC_DIGITS;
	} else if (prec < 20) {
		prec = 20;	/* int64:20, double:17 */
	} else if (prec > CONFIG_DEC_DIGITS_MAX) {
		tt_error("Unsupported precision!");
		return NULL;
	}

	/* Check digit buffer size */
	int prec_full = prec;
        prec_full += TT_DEC_PREC_RND;	/* Rounding guard */
	prec_full += TT_DEC_PREC_CRY;	/* Carry digit */
	prec_full += TT_DEC_PREC_ALN;	/* Align-9 shifting */

	/* 9 digits -> 4 bytes */
	int digsz = prec_full;
	digsz += 8;
	digsz /= 9;

	/* Create decimal */
	struct tt_dec *dec = calloc(1, sizeof(struct tt_dec));
	dec->_dig32 = calloc(digsz, 4);
	if (dec->_dig32 == NULL) {
		tt_error("Out of memory");
		free(dec);
		return NULL;
	}
	*(int*)&dec->_prec = prec;
	*(int*)&dec->_prec_full = prec_full;
	*(uint*)&dec->_digsz = digsz * 4;
	dec->_msb = 1;
	tt_debug("Decimal created: %u bytes", dec->_digsz);

	return dec;
}

// Assembly:
subq $0x28, %rsp
movl %edi, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x1f19
movl $0x3c, 0x1c(%rsp)
jmp 0x1f5d
cmpl $0x14, 0x1c(%rsp)
jae 0x1f2a
movl $0x14, 0x1c(%rsp)
jmp 0x1f5b
cmpl $0x5f5e100, 0x1c(%rsp)  # imm = 0x5F5E100
jbe 0x1f59
xorl %edi, %edi
leaq 0x1c703(%rip), %rsi     # 0x1e640
leaq 0x1c709(%rip), %rdx     # 0x1e64d
movb $0x0, %al
callq 0xe010
movq $0x0, 0x20(%rsp)
jmp 0x206f
jmp 0x1f5b
jmp 0x1f5d
movl 0x1c(%rsp), %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl $0x9, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
addl $0x8, %eax
movl %eax, 0x18(%rsp)
movl 0x18(%rsp), %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
addl $0x8, %eax
movl %eax, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, 0x14(%rsp)
movl $0x1, %edi
movl $0x20, %esi
callq 0x1110
movq %rax, 0x8(%rsp)
movslq 0x14(%rsp), %rdi
movl $0x4, %esi
callq 0x1110
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x18(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x2010
xorl %edi, %edi
leaq 0x1c653(%rip), %rsi     # 0x1e640
leaq 0x1c670(%rip), %rdx     # 0x1e664
movb $0x0, %al
callq 0xe010
movq 0x8(%rsp), %rdi
callq 0x1030
movq $0x0, 0x20(%rsp)
jmp 0x206f
movl 0x1c(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movl 0x18(%rsp), %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0xc(%rax)
movl 0x14(%rsp), %ecx
shll $0x2, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x10(%rax)
movq 0x8(%rsp), %rax
movl $0x1, 0x14(%rax)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %ecx
movl $0x3, %edi
leaq 0x1c5e9(%rip), %rsi     # 0x1e640
leaq 0x1c614(%rip), %rdx     # 0x1e672
movb $0x0, %al
callq 0xe010
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_zero
void _tt_dec_zero(struct tt_dec *dec)
{
	dec->_sign = 0;
	dec->_inf_nan = 0;
	dec->_exp = 0;
	dec->_msb = 1;
	memset(dec->_dig32, 0, dec->_digsz);
}

// Assembly:
pushq %rax
movq %rdi, (%rsp)
movq (%rsp), %rax
movw $0x0, (%rax)
movq (%rsp), %rax
movw $0x0, 0x2(%rax)
movq (%rsp), %rax
movl $0x0, 0x4(%rax)
movq (%rsp), %rax
movl $0x1, 0x14(%rax)
movq (%rsp), %rax
movq 0x18(%rax), %rdi
movq (%rsp), %rax
movl 0x10(%rax), %eax
movl %eax, %edx
xorl %esi, %esi
callq 0x10e0
popq %rax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_sanity
int _tt_dec_sanity(const struct tt_dec *dec)
{
	if (dec->_msb <= 0 || dec->_msb > dec->_prec)
		return TT_APN_ESANITY;

	int i, last_dig_idx = (dec->_msb + 8) / 9 - 1;

	/* Check carry guard bits */
	for (i = 0; i <= last_dig_idx; i++)
		if ((dec->_dig32[i] & (BIT(30) | BIT(31))))
			return TT_APN_ESANITY;

	/* Check remaining uints */
	for (; i < dec->_digsz / 4; i++)
		if (dec->_dig32[i])
			return TT_APN_ESANITY;

	/* Check last valid uint */
	int last_dig_cnt = (dec->_msb - 1) % 9 + 1;
        uchar d[9];
	_tt_dec_to_d9(dec->_dig32[last_dig_idx], d);
	for (i = 8; i > last_dig_cnt - 1; i--)
		if (d[i])
			return TT_APN_ESANITY;
	if (d[i] == 0 && i != 0)	/* Don't blame on "0" */
		return TT_APN_ESANITY;

	/* Check zero */
	if (_tt_dec_is_zero(dec) && dec->_exp > 0)
		return TT_APN_ESANITY;

	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpl $0x0, 0x14(%rax)
jle 0x2116
movq 0x18(%rsp), %rax
movl 0x14(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x2123
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
movq 0x18(%rsp), %rax
movl 0x14(%rax), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
subl $0x1, %eax
movl %eax, 0x10(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x10(%rsp), %eax
jg 0x2186
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
andl $0xc0000000, %eax       # imm = 0xC0000000
cmpl $0x0, %eax
je 0x2177
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
jmp 0x2179
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2145
jmp 0x2188
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
movl 0x10(%rcx), %ecx
shrl $0x2, %ecx
cmpl %ecx, %eax
jae 0x21cb
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x14(%rsp), %rcx
cmpl $0x0, (%rax,%rcx,4)
je 0x21bc
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
jmp 0x21be
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2188
movq 0x18(%rsp), %rax
movl 0x14(%rax), %eax
subl $0x1, %eax
movl $0x9, %ecx
cltd
idivl %ecx
addl $0x1, %edx
movl %edx, 0xc(%rsp)
movq 0x18(%rsp), %rax
movq 0x18(%rax), %rax
movslq 0x10(%rsp), %rcx
movl (%rax,%rcx,4), %edi
leaq 0x3(%rsp), %rsi
callq 0x22a0
movl $0x8, 0x14(%rsp)
movl 0x14(%rsp), %eax
movl 0xc(%rsp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x223c
movslq 0x14(%rsp), %rax
cmpb $0x0, 0x3(%rsp,%rax)
je 0x222d
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
jmp 0x222f
movl 0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x2208
movslq 0x14(%rsp), %rax
movzbl 0x3(%rsp,%rax), %eax
cmpl $0x0, %eax
jne 0x225c
cmpl $0x0, 0x14(%rsp)
je 0x225c
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
movq 0x18(%rsp), %rdi
callq 0x2300
testb $0x1, %al
jne 0x226c
jmp 0x2281
movq 0x18(%rsp), %rax
cmpl $0x0, 0x4(%rax)
jle 0x2281
movl $0xffffff31, 0x24(%rsp) # imm = 0xFFFFFF31
jmp 0x2289
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_get_dig
uint _tt_dec_get_dig(const uint *dig, int pos)
{
	uint dig32 = dig[pos / 9];
	pos %= 9;

	while (pos--)
		dig32 /= 10;

	return dig32 % 10;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movq -0x8(%rsp), %rax
movq %rax, -0x18(%rsp)
movl -0xc(%rsp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x18(%rsp), %rax
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rsp)
movl -0xc(%rsp), %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %edx, -0xc(%rsp)
movl -0xc(%rsp), %eax
movl %eax, %ecx
addl $-0x1, %ecx
movl %ecx, -0xc(%rsp)
cmpl $0x0, %eax
je 0x23b5
movl -0x10(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x10(%rsp)
jmp 0x2390
movl -0x10(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %edx, %eax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_uint_to_dec
int _tt_dec_uint_to_dec(uint *dig32, uint64_t num)
{
	int msb = 1;
	if (num)
		msb = 0;	/* Compensate "0" */

	while (num) {
		/* Get 9 decimals */
		uint dec9 = num % 1000000000;
		num /= 1000000000;

		*dig32++ = dec9;

		/* Increment significand */
		if (num)
			msb += 9;
		else
			do {
				msb++;
				dec9 /= 10;
			} while (dec9);
	}

	return msb;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movl $0x1, -0x14(%rsp)
cmpq $0x0, -0x10(%rsp)
je 0x23f2
movl $0x0, -0x14(%rsp)
jmp 0x23f4
cmpq $0x0, -0x10(%rsp)
je 0x2481
movq -0x10(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movl %edx, %eax
movl %eax, -0x18(%rsp)
movq -0x10(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, -0x10(%rsp)
movl -0x18(%rsp), %ecx
movq -0x8(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x8(%rsp)
movl %ecx, (%rax)
cmpq $0x0, -0x10(%rsp)
je 0x2455
movl -0x14(%rsp), %eax
addl $0x9, %eax
movl %eax, -0x14(%rsp)
jmp 0x247c
jmp 0x2457
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
movl -0x18(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x18(%rsp)
cmpl $0x0, -0x18(%rsp)
jne 0x2457
jmp 0x247c
jmp 0x23f4
movl -0x14(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/decimal.c
// Function: tt_dec_uint128_to_dec
int _tt_dec_uint128_to_dec(uint *dig32, __uint128_t num)
{
	int msb = 1;
	if (num)
		msb = 0;	/* Compensate "0" */

	while (num) {
		/* Get 9 decimals */
		uint dec9 = num % 1000000000;
		num /= 1000000000;

		*dig32++ = dec9;

		/* Increment significand */
		if (num)
			msb += 9;
		else
			do {
				msb++;
				dec9 /= 10;
			} while (dec9);
	}

	return msb;
}

// Assembly:
subq $0x58, %rsp
movq %rsi, 0x40(%rsp)
movq %rdx, 0x48(%rsp)
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
movq %rdi, 0x38(%rsp)
movq %rcx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movl $0x1, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
orq %rcx, %rax
je 0x24d8
jmp 0x24d0
movl $0x0, 0x1c(%rsp)
jmp 0x24da
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
orq %rcx, %rax
je 0x2599
jmp 0x24ef
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, 0x10(%rsp)
movl $0x3b9aca00, %edx       # imm = 0x3B9ACA00
movq %rdx, 0x8(%rsp)
callq 0x11b80
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movl %eax, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0x11a80
movq %rdx, 0x28(%rsp)
movq %rax, 0x20(%rsp)
movl 0x18(%rsp), %ecx
movq 0x38(%rsp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, 0x38(%rsp)
movl %ecx, (%rax)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
orq %rcx, %rax
je 0x256d
jmp 0x2560
movl 0x1c(%rsp), %eax
addl $0x9, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2594
jmp 0x256f
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
movl 0x18(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, 0x18(%rsp)
cmpl $0x0, 0x18(%rsp)
jne 0x256f
jmp 0x2594
jmp 0x24da
movl 0x1c(%rsp), %eax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/mach.c
// Function: tt_dec_from_uint
int tt_dec_from_uint(struct tt_dec *dec, uint64_t num)
{
	tt_assert(dec->_prec >= 20);

	_tt_dec_zero(dec);
	dec->_msb = _tt_dec_uint_to_dec(dec->_dig32, num);

	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpl $0x14, 0x8(%rax)
setge %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2606
xorl %edi, %edi
leaq 0x1c0a6(%rip), %rsi     # 0x1e68c
leaq 0xfaf1(%rip), %rdx      # 0x120de
leaq 0x1c0a9(%rip), %rcx     # 0x1e69d
movl $0x3b, %r8d
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0x2608
movq 0x10(%rsp), %rdi
callq 0x20a0
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rdi
movq 0x8(%rsp), %rsi
callq 0x23d0
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x14(%rax)
xorl %eax, %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/mach.c
// Function: tt_dec_from_sint
int tt_dec_from_sint(struct tt_dec *dec, int64_t num)
{
	short sign;
	uint64_t unum;

	if (num < 0) {
		sign = 1;
		unum = -num;
	} else {
		sign = 0;
		unum = num;
	}

	int ret = tt_dec_from_uint(dec, unum);
	dec->_sign = sign;

	return ret;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jge 0x266b
movw $0x1, 0x16(%rsp)
xorl %eax, %eax
subq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
jmp 0x267c
movw $0x0, 0x16(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x25b0
movl %eax, 0x4(%rsp)
movw 0x16(%rsp), %cx
movq 0x20(%rsp), %rax
movw %cx, (%rax)
movl 0x4(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/mach.c
// Function: tt_dec_from_float
int tt_dec_from_float(struct tt_dec *dec, double num)
{
	tt_assert(dec->_prec >= 20);

	_tt_dec_zero(dec);

	int sign = !!signbit(num);
	switch (fpclassify(num)) {
	case FP_NAN:
		dec->_inf_nan = TT_DEC_NAN;
		return 0;
	case FP_INFINITE:
		dec->_inf_nan = TT_DEC_INF;
		return 0;
	case FP_ZERO:
		return 0;
	default:
		break;
	}

	if (sign)
		num = -num;

	/* Convert to [10^18, 10^19). 19 significands is enough to keep
	 * precision of a double float number.
	 */
	uint64_t ui64;
	int adjexp = norm_fp_to_i64(num, &ui64);
	tt_dec_from_uint(dec, ui64);
	dec->_exp = adjexp;
	dec->_sign = sign;

	return 0;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movsd %xmm0, 0x30(%rsp)
movq 0x38(%rsp), %rax
cmpl $0x14, 0x8(%rax)
setge %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x2707
xorl %edi, %edi
leaq 0x1bfcd(%rip), %rsi     # 0x1e6b4
leaq 0xf9f0(%rip), %rdx      # 0x120de
leaq 0x1bfa8(%rip), %rcx     # 0x1e69d
movl $0x58, %r8d
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0x2709
movq 0x38(%rsp), %rdi
callq 0x20a0
movsd 0x30(%rsp), %xmm0
movq %xmm0, %rax
cmpq $0x0, %rax
setl %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x2c(%rsp)
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movl $0x2, %eax
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
movl %eax, 0x18(%rsp)
jne 0x2785
jp 0x2785
movl 0x18(%rsp), %eax
movl %eax, 0xc(%rsp)
testl %eax, %eax
je 0x27ef
jmp 0x2764
movl 0xc(%rsp), %eax
subl $0x1, %eax
je 0x2807
jmp 0x2773
movl 0xc(%rsp), %eax
subl $0x2, %eax
je 0x281c
jmp 0x2826
movsd 0x10(%rsp), %xmm0
xorl %eax, %eax
ucomisd %xmm0, %xmm0
movl %eax, 0x18(%rsp)
jp 0x2752
movsd 0x10(%rsp), %xmm0
movaps 0x1c1fc(%rip), %xmm1    # 0x1e9a0
pand %xmm1, %xmm0
movsd %xmm0, (%rsp)
movl $0x1, %eax
movsd 0x1c19e(%rip), %xmm1    # 0x1e958
ucomisd %xmm1, %xmm0
movl %eax, 0x18(%rsp)
jne 0x27c8
jp 0x27c8
jmp 0x2752
movsd (%rsp), %xmm1
movsd 0x1c18b(%rip), %xmm0    # 0x1e960
movl $0x3, %eax
movl $0x4, %ecx
ucomisd %xmm1, %xmm0
cmovbel %ecx, %eax
movl %eax, 0x18(%rsp)
jmp 0x2752
movq 0x38(%rsp), %rax
movw $0x2, 0x2(%rax)
movl $0x0, 0x44(%rsp)
jmp 0x2898
movq 0x38(%rsp), %rax
movw $0x1, 0x2(%rax)
movl $0x0, 0x44(%rsp)
jmp 0x2898
movl $0x0, 0x44(%rsp)
jmp 0x2898
jmp 0x2828
cmpl $0x0, 0x2c(%rsp)
je 0x2852
movsd 0x30(%rsp), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
movsd %xmm0, 0x30(%rsp)
movsd 0x30(%rsp), %xmm0
leaq 0x20(%rsp), %rdi
callq 0x28b0
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x25b0
movl 0x1c(%rsp), %ecx
movq 0x38(%rsp), %rax
movl %ecx, 0x4(%rax)
movl 0x2c(%rsp), %eax
movw %ax, %cx
movq 0x38(%rsp), %rax
movw %cx, (%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: cmp_digs
static int cmp_digs(const uint *dig1, const int msb1,
		const uint *dig2, const int msb2)
{
	if (msb1 <= 0 && msb2 <= 0)
		return 0;
	if (msb1 < msb2)
		return -1;
	if (msb1 > msb2)
		return 1;

	/* Compare digits: msb1 = msb2 > 0 */
	const int uints = (msb1 + 8) / 9;
	for (int i = uints - 1; i >= 0; i--) {
		if (dig1[i] > dig2[i])
			return 1;
		else if (dig1[i] < dig2[i])
			return -1;
	}
	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl %esi, -0x14(%rsp)
movq %rdx, -0x20(%rsp)
movl %ecx, -0x24(%rsp)
cmpl $0x0, -0x14(%rsp)
jg 0x603d
cmpl $0x0, -0x24(%rsp)
jg 0x603d
movl $0x0, -0x4(%rsp)
jmp 0x60f5
movl -0x14(%rsp), %eax
cmpl -0x24(%rsp), %eax
jge 0x6054
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x60f5
movl -0x14(%rsp), %eax
cmpl -0x24(%rsp), %eax
jle 0x606b
movl $0x1, -0x4(%rsp)
jmp 0x60f5
movl -0x14(%rsp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rsp)
movl -0x28(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rsp)
cmpl $0x0, -0x2c(%rsp)
jl 0x60ed
movq -0x10(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x20(%rsp), %rcx
movslq -0x2c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jbe 0x60b6
movl $0x1, -0x4(%rsp)
jmp 0x60f5
movq -0x10(%rsp), %rax
movslq -0x2c(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movq -0x20(%rsp), %rcx
movslq -0x2c(%rsp), %rdx
cmpl (%rcx,%rdx,4), %eax
jae 0x60dc
movl $0xffffffff, -0x4(%rsp) # imm = 0xFFFFFFFF
jmp 0x60f5
jmp 0x60de
jmp 0x60e0
movl -0x2c(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x2c(%rsp)
jmp 0x6089
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: sub_digs
static int sub_digs(uint *dig, const uint *dig1, const int msb1,
		const uint *dig2, const int msb2)
{
	tt_assert_fa(msb1 >= msb2);

	int i;
	char carry = 0;

	/* dig1 - dig2 */
	const int uints2 = (msb2 + 8) / 9;
	for (i = 0; i < uints2; i++)
		dig[i] = sub_dig(dig1[i], dig2[i], &carry);

	/* Process remaining high digits in dig1 */
	const int uints1 = (msb1 + 8) / 9;
	for (; i < uints1; i++)
		dig[i] = sub_dig(dig1[i], 0, &carry);
	tt_assert_fa(carry == 0);

	/* Check new MSB */
	int msbr = get_msb(dig, uints1);
	tt_assert_fa((msbr <= msb1 || msb1 <= 0) && msbr >= 1);

	return msbr;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movl %edx, 0x34(%rsp)
movq %rcx, 0x28(%rsp)
movl %r8d, 0x24(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x24(%rsp), %eax
setge %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x6163
xorl %edi, %edi
leaq 0x18694(%rip), %rsi     # 0x1e7d7
leaq 0xbf94(%rip), %rdx      # 0x120de
leaq 0x1862b(%rip), %rcx     # 0x1e77c
movl $0x87, %r8d
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0x6165
movb $0x0, 0x1f(%rsp)
movl 0x24(%rsp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, 0x18(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x18(%rsp), %eax
jge 0x61cf
movq 0x38(%rsp), %rax
movslq 0x20(%rsp), %rcx
movl (%rax,%rcx,4), %edi
movq 0x28(%rsp), %rax
movslq 0x20(%rsp), %rcx
movl (%rax,%rcx,4), %esi
leaq 0x1f(%rsp), %rdx
callq 0x6730
movl %eax, %edx
movq 0x40(%rsp), %rax
movslq 0x20(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x6185
movl 0x34(%rsp), %eax
addl $0x8, %eax
movl $0x9, %ecx
cltd
idivl %ecx
movl %eax, 0x14(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x14(%rsp), %eax
jge 0x6221
movq 0x38(%rsp), %rax
movslq 0x20(%rsp), %rcx
movl (%rax,%rcx,4), %edi
xorl %esi, %esi
leaq 0x1f(%rsp), %rdx
callq 0x6730
movl %eax, %edx
movq 0x40(%rsp), %rax
movslq 0x20(%rsp), %rcx
movl %edx, (%rax,%rcx,4)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x61e2
jmp 0x6223
movsbl 0x1f(%rsp), %eax
cmpl $0x0, %eax
sete %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x626a
xorl %edi, %edi
leaq 0x1858d(%rip), %rsi     # 0x1e7d7
leaq 0xbe8d(%rip), %rdx      # 0x120de
leaq 0x18524(%rip), %rcx     # 0x1e77c
movl $0x95, %r8d
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0x626c
movq 0x40(%rsp), %rdi
movl 0x14(%rsp), %esi
callq 0x6780
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
cmpl 0x34(%rsp), %eax
jle 0x6295
xorl %eax, %eax
cmpl $0x0, 0x34(%rsp)
movb %al, 0xf(%rsp)
jg 0x62a1
cmpl $0x1, 0x10(%rsp)
setge %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0x62e1
xorl %edi, %edi
leaq 0x18516(%rip), %rsi     # 0x1e7d7
leaq 0xbe16(%rip), %rdx      # 0x120de
leaq 0x184ad(%rip), %rcx     # 0x1e77c
movl $0x99, %r8d
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0x62e3
movl 0x10(%rsp), %eax
addq $0x48, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: tt_dec_cmp
int tt_dec_cmp(const struct tt_dec *src1, const struct tt_dec *src2)
{
	int ret;

	if (src1->_sign != src2->_sign) {
		if (_tt_dec_is_zero(src1) && _tt_dec_is_zero(src2))
			return 0;
		ret = src2->_sign - src1->_sign;
	} else {
		ret = tt_dec_cmp_abs(src1, src2);
		if (src1->_sign)
			ret = -ret;
	}

	return ret;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movswl (%rax), %eax
movq 0x10(%rsp), %rcx
movswl (%rcx), %ecx
cmpl %ecx, %eax
je 0x6554
movq 0x18(%rsp), %rdi
callq 0x48a0
testb $0x1, %al
jne 0x6522
jmp 0x653c
movq 0x10(%rsp), %rdi
callq 0x48a0
testb $0x1, %al
jne 0x6532
jmp 0x653c
movl $0x0, 0x24(%rsp)
jmp 0x6586
movq 0x10(%rsp), %rax
movswl (%rax), %eax
movq 0x18(%rsp), %rcx
movswl (%rcx), %ecx
subl %ecx, %eax
movl %eax, 0xc(%rsp)
jmp 0x657e
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x62f0
movl %eax, 0xc(%rsp)
movq 0x18(%rsp), %rax
cmpw $0x0, (%rax)
je 0x657c
xorl %eax, %eax
subl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
jmp 0x657e
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: add_dig
static uint add_dig(uint dig, uint dig2, char *carry)
{
	dig += (dig2 + *carry);

	/* Check overflow */
	if (dig >= 1000000000) {
		dig -= 1000000000;
		*carry = 1;
	} else {
		*carry = 0;
	}

	return dig;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movq %rdx, -0x10(%rsp)
movl -0x8(%rsp), %eax
movq -0x10(%rsp), %rcx
movsbl (%rcx), %ecx
addl %ecx, %eax
addl -0x4(%rsp), %eax
movl %eax, -0x4(%rsp)
cmpl $0x3b9aca00, -0x4(%rsp) # imm = 0x3B9ACA00
jb 0x6714
movl -0x4(%rsp), %eax
subl $0x3b9aca00, %eax       # imm = 0x3B9ACA00
movl %eax, -0x4(%rsp)
movq -0x10(%rsp), %rax
movb $0x1, (%rax)
jmp 0x671c
movq -0x10(%rsp), %rax
movb $0x0, (%rax)
movl -0x4(%rsp), %eax
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: sub_dig
static uint sub_dig(uint dig, uint dig2, char *carry)
{
	int sub = dig - dig2 - *carry;
	if (sub < 0) {
		sub += 1000000000;
		*carry = 1;
	} else {
		*carry = 0;
	}

	return sub;
}

// Assembly:
movl %edi, -0x4(%rsp)
movl %esi, -0x8(%rsp)
movq %rdx, -0x10(%rsp)
movl -0x4(%rsp), %eax
subl -0x8(%rsp), %eax
movq -0x10(%rsp), %rcx
movsbl (%rcx), %ecx
subl %ecx, %eax
movl %eax, -0x14(%rsp)
cmpl $0x0, -0x14(%rsp)
jge 0x6771
movl -0x14(%rsp), %eax
addl $0x3b9aca00, %eax       # imm = 0x3B9ACA00
movl %eax, -0x14(%rsp)
movq -0x10(%rsp), %rax
movb $0x1, (%rax)
jmp 0x6779
movq -0x10(%rsp), %rax
movb $0x0, (%rax)
movl -0x14(%rsp), %eax
retq
nop
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: get_msb
static int get_msb(const uint *dig, const int uints)
{
	int msb = 1;

	for (int i = uints - 1; i >= 0; i--) {
		uint u = dig[i];
		if (u) {
			msb = i * 9;
			do {
				msb++;
				u /= 10;
			} while (u);

			break;
		}
	}

	return msb;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movl %esi, -0xc(%rsp)
movl $0x1, -0x10(%rsp)
movl -0xc(%rsp), %eax
subl $0x1, %eax
movl %eax, -0x14(%rsp)
cmpl $0x0, -0x14(%rsp)
jl 0x67f8
movq -0x8(%rsp), %rax
movslq -0x14(%rsp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x18(%rsp)
cmpl $0x0, -0x18(%rsp)
je 0x67e9
imull $0x9, -0x14(%rsp), %eax
movl %eax, -0x10(%rsp)
movl -0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rsp)
movl -0x18(%rsp), %eax
movl $0xa, %ecx
xorl %edx, %edx
divl %ecx
movl %eax, -0x18(%rsp)
cmpl $0x0, -0x18(%rsp)
jne 0x67c4
jmp 0x67f8
jmp 0x67eb
movl -0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x679c
movl -0x10(%rsp), %eax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_alloc
struct tt_int *tt_int_alloc(void)
{
	struct tt_int *ti = malloc(sizeof(struct tt_int));
	ti->sign = 0;
	ti->_max = TT_INT_DEF;
	ti->msb = 1;
	ti->buf = calloc(ti->_max, sizeof(_tt_word));
	if (ti->buf == NULL) {
		tt_error("Out of memory");
		free(ti);
		return NULL;
	}
	return ti;
}

// Assembly:
subq $0x18, %rsp
movl $0x18, %edi
callq 0x1160
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movl $0x0, (%rax)
movq 0x8(%rsp), %rax
movl $0x22, 0x4(%rax)
movq 0x8(%rsp), %rax
movl $0x1, 0x8(%rax)
movq 0x8(%rsp), %rax
movslq 0x4(%rax), %rdi
movl $0x8, %esi
callq 0x1110
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x688d
xorl %edi, %edi
leaq 0x17f76(%rip), %rsi     # 0x1e7e0
leaq 0x17df3(%rip), %rdx     # 0x1e664
movb $0x0, %al
callq 0xe010
movq 0x8(%rsp), %rdi
callq 0x1030
movq $0x0, 0x10(%rsp)
jmp 0x6897
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_realloc
int _tt_int_realloc(struct tt_int *ti, int msb)
{
	if (msb <= ti->_max)
		return 0;

	/* Double the buffer */
	if (msb < ti->_max * 2)
		msb = ti->_max * 2;
	_tt_word *buf = realloc(ti->buf, msb * _tt_word_sz);
	if (!buf) {
		tt_error("Out of memory");
		return TT_ENOMEM;
	}
	memset(buf + ti->_max, 0, (msb - ti->_max) * _tt_word_sz);
	ti->buf = buf;
	ti->_max = msb;
	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movl %esi, 0x14(%rsp)
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jg 0x68f8
movl $0x0, 0x24(%rsp)
jmp 0x69ae
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
movl 0x4(%rcx), %ecx
shll %ecx
cmpl %ecx, %eax
jge 0x6918
movq 0x18(%rsp), %rax
movl 0x4(%rax), %eax
shll %eax
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movl 0x14(%rsp), %eax
shll $0x3, %eax
movslq %eax, %rsi
callq 0x1170
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jne 0x695e
xorl %edi, %edi
leaq 0x17ea7(%rip), %rsi     # 0x1e7ed
leaq 0x17d17(%rip), %rdx     # 0x1e664
movb $0x0, %al
callq 0xe010
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
jmp 0x69ae
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rax
movslq 0x4(%rax), %rax
shlq $0x3, %rax
addq %rax, %rdi
movl 0x14(%rsp), %eax
movq 0x18(%rsp), %rcx
subl 0x4(%rcx), %eax
shll $0x3, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq 0x8(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x10(%rax)
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x4(%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_copy
int _tt_int_copy(struct tt_int *dst, const struct tt_int *src)
{
	_tt_int_zero(dst);

	int ret = _tt_int_realloc(dst, src->msb);
	if (ret)
		return ret;

	dst->sign = src->sign;
	dst->msb = src->msb;
	memcpy(dst->buf, src->buf, src->msb * _tt_word_sz);
	return 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
callq 0x6a60
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rax
movl 0x8(%rax), %esi
callq 0x68d0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x69ff
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x6a4a
movq 0x10(%rsp), %rax
movl (%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, (%rax)
movq 0x10(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0x18(%rsp), %rax
movl %ecx, 0x8(%rax)
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rsp), %rax
movl 0x8(%rax), %eax
shll $0x3, %eax
movslq %eax, %rdx
callq 0x1140
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_word_bits
int _tt_int_word_bits(_tt_word w)
{
	w <<= 1;
	for (int i = _tt_word_bits; i > 0; i--) {
		if (w & _tt_word_top_bit)
			return i;
		w <<= 1;
	}

	tt_assert(1);
	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
shlq %rax
movq %rax, -0x10(%rsp)
movl $0x3f, -0x14(%rsp)
cmpl $0x0, -0x14(%rsp)
jle 0x6afa
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq -0x10(%rsp), %rax
cmpq $0x0, %rax
je 0x6ae0
movl -0x14(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x6b06
movq -0x10(%rsp), %rax
shlq %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6aba
jmp 0x6afc
jmp 0x6afe
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_word_ctz
int _tt_int_word_ctz(_tt_word w)
{
	for (int i = 0; i < _tt_word_bits; i++) {
		if (w & 0x1)
			return i;
		w >>= 1;
	}

	tt_assert(1);
	return _tt_word_bits;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movl $0x0, -0x14(%rsp)
cmpl $0x3f, -0x14(%rsp)
jge 0x6b57
movq -0x10(%rsp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x6b3d
movl -0x14(%rsp), %eax
movl %eax, -0x4(%rsp)
jmp 0x6b63
movq -0x10(%rsp), %rax
shrq %rax
movq %rax, -0x10(%rsp)
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6b1d
jmp 0x6b59
jmp 0x6b5b
movl $0x3f, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_sanity
int _tt_int_sanity(const struct tt_int *ti)
{
	if (ti->msb == 0 || ti->msb > ti->_max)
		return TT_APN_ESANITY;

	/* Check significands */
	if (ti->msb > 1 && ti->buf[ti->msb-1] == 0)
		return TT_APN_ESANITY;

	/* Check carry guard bit */
	for (int i = 0; i < ti->msb; i++)
		if ((ti->buf[i] & _tt_word_top_bit))
			return TT_APN_ESANITY;

	/* Check unused high words */
	for (int i = ti->msb; i < ti->_max; i++)
		if (ti->buf[i])
			return TT_APN_ESANITY;

	return 0;
}

// Assembly:
movq %rdi, -0x10(%rsp)
movq -0x10(%rsp), %rax
cmpl $0x0, 0x8(%rax)
je 0x6b92
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
movq -0x10(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jle 0x6b9f
movl $0xffffff31, -0x4(%rsp) # imm = 0xFFFFFF31
jmp 0x6c76
movq -0x10(%rsp), %rax
cmpl $0x1, 0x8(%rax)
jle 0x6bd5
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq -0x10(%rsp), %rcx
movl 0x8(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x6bd5
movl $0xffffff31, -0x4(%rsp) # imm = 0xFFFFFF31
jmp 0x6c76
movl $0x0, -0x14(%rsp)
movl -0x14(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x6c26
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rcx
movslq -0x14(%rsp), %rdx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
andq (%rcx,%rdx,8), %rax
cmpq $0x0, %rax
je 0x6c17
movl $0xffffff31, -0x4(%rsp) # imm = 0xFFFFFF31
jmp 0x6c76
jmp 0x6c19
movl -0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rsp)
jmp 0x6bdd
movq -0x10(%rsp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x18(%rsp)
movl -0x18(%rsp), %eax
movq -0x10(%rsp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x6c6e
movq -0x10(%rsp), %rax
movq 0x10(%rax), %rax
movslq -0x18(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0x6c5f
movl $0xffffff31, -0x4(%rsp) # imm = 0xFFFFFF31
jmp 0x6c76
jmp 0x6c61
movl -0x18(%rsp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rsp)
jmp 0x6c32
movl $0x0, -0x4(%rsp)
movl -0x4(%rsp), %eax
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_print
void _tt_int_print(const struct tt_int *ti)
{
	char *s = NULL;
	tt_int_to_string(ti, &s, 10);
	printf("%s\n", s);
	free(s);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0xa, %edx
callq 0x78e0
movq 0x8(%rsp), %rsi
leaq 0x17db6(%rip), %rdi     # 0x1ea68
movb $0x0, %al
callq 0x10c0
movq 0x8(%rsp), %rdi
callq 0x1030
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/integer.c
// Function: tt_int_shift
int tt_int_shift(struct tt_int *ti, int shift)
{
	if (shift > 0) {
		int ret = _tt_int_realloc(ti, ti->msb +
				(shift+_tt_word_bits-1)/_tt_word_bits);
		if (ret)
			return ret;
	}

	ti->msb = _tt_int_shift_buf(ti->buf, ti->msb, shift);
	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x8(%rsp)
movl %esi, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
jle 0x704e
movq 0x8(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl 0x4(%rsp), %eax
addl $0x3f, %eax
subl $0x1, %eax
movl $0x3f, %ecx
cltd
idivl %ecx
addl %eax, %esi
callq 0x68d0
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
je 0x704c
movl (%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x707a
jmp 0x704e
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x8(%rsp), %rax
movl 0x8(%rax), %esi
movl 0x4(%rsp), %edx
callq 0x6d10
movl %eax, %ecx
movq 0x8(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/str.c
// Function: div_dec9
static uint div_dec9(const _tt_word *dividend, _tt_word *quo, int *len)
{
	const int words = *len;
	const _tt_word *ddptr = dividend + words - 1;
	uint64_t rem = 0;

	/* First quotient digit */
	if (*ddptr < 1000000000) {
		rem = *ddptr;
		ddptr--;
		(*len)--;
	}

	/* Other quotient digits */
	for (int i = *len-1; i >= 0; i--) {
		_tt_word dd = *ddptr--;
#ifdef _TT_LP64_
		/* Split 63 bits into 2 uint. 64 bit division is much faster
		 * than 128 bit division.
		 */
		rem <<= 31;
		rem |= (dd >> 32);
		quo[i] = rem / 1000000000;
		rem %= 1000000000;
		quo[i] <<= 32;

		rem <<= 32;
		rem |= (uint)dd;
		quo[i] |= rem / 1000000000;
		rem %= 1000000000;
#else
		rem <<= 31;
		rem |= dd;
		quo[i] = rem / 1000000000;
		rem %= 1000000000;
#endif
	}
	return rem;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq %rsi, -0x10(%rsp)
movq %rdx, -0x18(%rsp)
movq -0x18(%rsp), %rax
movl (%rax), %eax
movl %eax, -0x1c(%rsp)
movq -0x8(%rsp), %rax
movslq -0x1c(%rsp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
addq $-0x8, %rax
movq %rax, -0x28(%rsp)
movq $0x0, -0x30(%rsp)
movq -0x28(%rsp), %rax
cmpq $0x3b9aca00, (%rax)     # imm = 0x3B9ACA00
jae 0x85b2
movq -0x28(%rsp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rsp)
movq -0x28(%rsp), %rax
addq $-0x8, %rax
movq %rax, -0x28(%rsp)
movq -0x18(%rsp), %rax
movl (%rax), %ecx
addl $-0x1, %ecx
movl %ecx, (%rax)
movq -0x18(%rsp), %rax
movl (%rax), %eax
subl $0x1, %eax
movl %eax, -0x34(%rsp)
cmpl $0x0, -0x34(%rsp)
jl 0x86b6
movq -0x28(%rsp), %rax
movq %rax, %rcx
addq $-0x8, %rcx
movq %rcx, -0x28(%rsp)
movq (%rax), %rax
movq %rax, -0x40(%rsp)
movq -0x30(%rsp), %rax
shlq $0x1f, %rax
movq %rax, -0x30(%rsp)
movq -0x40(%rsp), %rax
shrq $0x20, %rax
orq -0x30(%rsp), %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x30(%rsp)
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
shlq $0x20, %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rsp), %rax
shlq $0x20, %rax
movq %rax, -0x30(%rsp)
movq -0x40(%rsp), %rax
movl %eax, %eax
orq -0x30(%rsp), %rax
movq %rax, -0x30(%rsp)
movq -0x30(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rax, %rdx
movq -0x10(%rsp), %rax
movslq -0x34(%rsp), %rcx
orq (%rax,%rcx,8), %rdx
movq %rdx, (%rax,%rcx,8)
movq -0x30(%rsp), %rax
movl $0x3b9aca00, %ecx       # imm = 0x3B9ACA00
xorl %edx, %edx
divq %rcx
movq %rdx, -0x30(%rsp)
movl -0x34(%rsp), %eax
addl $-0x1, %eax
movl %eax, -0x34(%rsp)
jmp 0x85c0
movq -0x30(%rsp), %rax
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/mach.c
// Function: tt_int_from_uint
int tt_int_from_uint(struct tt_int *ti, uint64_t num)
{
	_tt_int_zero(ti);

	ti->buf[0] = num & ~_tt_word_top_bit;
	num >>= _tt_word_bits;
	if (num) {
		ti->buf[ti->msb++] = num & ~_tt_word_top_bit;
		num >>= _tt_word_bits;
		if (num)
			ti->buf[ti->msb++] = num;
	}

	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x6a60
movabsq $0x7fffffffffffffff, %rcx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x8(%rsp), %rcx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq %rcx, (%rax)
movq 0x8(%rsp), %rax
shrq $0x3f, %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x8775
movabsq $0x7fffffffffffffff, %rdx # imm = 0x7FFFFFFFFFFFFFFF
andq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x8(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x8(%rsp), %rax
shrq $0x3f, %rax
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x8773
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rsp), %rsi
movl 0x8(%rsi), %ecx
movl %ecx, %edi
addl $0x1, %edi
movl %edi, 0x8(%rsi)
movslq %ecx, %rcx
movq %rdx, (%rax,%rcx,8)
jmp 0x8775
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/mach.c
// Function: tt_int_from_sint
int tt_int_from_sint(struct tt_int *ti, int64_t num)
{
	if (num < 0) {
		tt_int_from_uint(ti, -num);
		ti->sign = 1;
	} else {
		tt_int_from_uint(ti, num);
	}

	return 0;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
jge 0x87b6
movq 0x10(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
subq 0x8(%rsp), %rsi
callq 0x86c0
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
jmp 0x87c5
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x86c0
xorl %eax, %eax
addq $0x18, %rsp
retq
nopl (%rax)