LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x60, %rsp
leaq 0x92ec(%rip), %rdi      # 0xb0c9
callq 0x1060
movabsq $0x800000000, %rax      # imm = 0x800000000
leaq 0x8(%rsp), %rbx
movq %rax, (%rbx)
movl $0x8, 0x8(%rbx)
leaq 0x20(%rsp), %r14
movq %r14, 0x10(%rbx)
xorl %r15d, %r15d
xorl %ebp, %ebp
xorl %r12d, %r12d
callq 0x9156
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x20, %rax
movq %rax, 0x20(%rsp,%r12,8)
callq 0x9156
movl %eax, %eax
orq %rax, 0x20(%rsp,%r12,8)
incq %r12
cmpq $0x8, %r12
jne 0x1e0c
movq %r14, %rdi
movl $0x8, %esi
callq 0x59a5
movl %eax, 0x10(%rsp)
movq %rbx, %rdi
callq 0x8bbe
movzbl %al, %eax
addl %eax, %ebp
incl %r15d
cmpl $0x8876, %r15d          # imm = 0x8876
jne 0x1e09
leaq 0x91e7(%rip), %rdi      # 0xb04c
movl %ebp, %esi
xorl %eax, %eax
callq 0x10c0
addq $0x60, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %r14d
callq 0x4910
movq %rax, %rbx
movq %rax, %rdi
movl %r14d, %esi
callq 0x4986
testl %eax, %eax
je 0x1ea0
xorl %ebx, %ebx
jmp 0x1f0f
movl %r14d, 0x8(%rbx)
leal -0x1(%r14), %ebp
cmpl $0x2, %r14d
jl 0x1ee1
movl %ebp, %r14d
xorl %r15d, %r15d
callq 0x9156
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq 0x10(%rbx), %rcx
shlq $0x20, %rax
movq %rax, (%rcx,%r15,8)
callq 0x9156
movl %eax, %eax
movq 0x10(%rbx), %rcx
orq %rax, (%rcx,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x1eb4
movslq %ebp, %r14
callq 0x9156
movq 0x10(%rbx), %rcx
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
movq %rax, (%rcx,%r14,8)
je 0x1ee4
shlq $0x20, %rax
movq %rax, (%rcx,%r14,8)
callq 0x9156
movl %eax, %eax
movq 0x10(%rbx), %rcx
orq %rax, (%rcx,%r14,8)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x91b8(%rip), %rdi      # 0xb0e7
callq 0x1060
callq 0x4910
movq %rax, %rbx
callq 0x4910
movq %rax, %r14
movl $0x3e8, %ebp            # imm = 0x3E8
callq 0x4910
movq %rax, %r15
callq 0x9156
movl %eax, %ecx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
imull $0x64, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %edi
incl %edi
callq 0x1e7b
movq %rax, %r12
callq 0x9156
movl %eax, %ecx
imulq $0x51eb851f, %rcx, %rcx # imm = 0x51EB851F
shrq $0x25, %rcx
imull $0x64, %ecx, %ecx
negl %ecx
leal (%rax,%rcx), %edi
incl %edi
callq 0x1e7b
movq %rax, %r13
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x7aad
movq %rbx, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x6fca
movq %r14, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x6fca
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6e1a
movq %r15, %rdi
movq %rbx, %rsi
callq 0x7452
testl %eax, %eax
jne 0x2000
movq %r12, %rdi
callq 0x4970
movq %r13, %rdi
callq 0x4970
decl %ebp
jne 0x1f51
jmp 0x2027
leaq 0x9056(%rip), %rsi      # 0xb05d
leaq 0x9058(%rip), %rdx      # 0xb066
xorl %edi, %edi
xorl %eax, %eax
callq 0x8cca
movq %r12, %rdi
callq 0x4b27
movq %r13, %rdi
callq 0x4b27
movq %rbx, %rdi
callq 0x4970
movq %r14, %rdi
callq 0x4970
movq %r15, %rdi
callq 0x4970
leaq 0x90b0(%rip), %rdi      # 0xb0f6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1060
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/tests/number.c
// Function: gen_prime
int gen_prime(int bits, _tt_word **pp)
{
	int msb = (bits+_tt_word_bits-1)/_tt_word_bits;
	tt_assert(msb >= 2);

	bits %= _tt_word_bits;
	*pp = malloc(msb*_tt_word_sz);
	_tt_word *p = *pp;

	while (1) {
		for (int i = 0; i < msb; i++) {
			p[i] = _tt_rand() & ~BIT(31);
#ifdef _TT_LP64_
			p[i] <<= 32;
			p[i] |= _tt_rand();
#endif
		}
		/* Set highest two bits and lowest bit */
		p[0] |= 0x1;
		if (bits == 0) {
			p[msb-1] |= (_tt_word_top_bit >> 1) |
				(_tt_word_top_bit >> 2);
		} else if (bits == 1) {
			p[msb-1] = 1;
			p[msb-2] |= _tt_word_top_bit >> 1;
		} else {
			p[msb-1] |= 0x3ULL << (bits-2);
			p[msb-1] &= (1ULL << bits) - 1;
		}

		if (_tt_int_isprime_buf(p, msb))
			break;
	}

	return msb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpl $0x3f, %edi
jle 0x23aa
movq %rsi, %r12
leal 0x3e(%rdi), %eax
cltq
imulq $-0x7df7df7d, %rax, %rax # imm = 0x82082083
shrq $0x20, %rax
leal (%rax,%rdi), %ebx
addl $0x3e, %ebx
movl %ebx, %eax
shrl $0x1f, %eax
sarl $0x5, %ebx
addl %eax, %ebx
movl %edi, %eax
imulq $0x4104105, %rax, %rax  # imm = 0x4104105
shrq $0x20, %rax
movl %edi, %r14d
subl %eax, %r14d
shrl %r14d
addl %eax, %r14d
shrl $0x5, %r14d
movl %r14d, %eax
shll $0x6, %eax
subl %eax, %r14d
addl %edi, %r14d
leal (,%rbx,8), %edi
callq 0x1140
movq %rax, %r15
leal -0x2(%r14), %ecx
movl $0x3, %eax
shlq %cl, %rax
movq %rax, 0x10(%rsp)
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
movq %r15, (%r12)
movl %ebx, %r12d
notq %rax
movq %rax, 0x8(%rsp)
cmpl $0x2, %ebx
movl $0x1, %r13d
cmovgel %ebx, %r13d
xorl %ebp, %ebp
callq 0x9156
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x20, %rax
movq %rax, (%r15,%rbp,8)
callq 0x9156
movl %eax, %eax
orq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %r13, %rbp
jne 0x2325
orb $0x1, (%r15)
testl %r14d, %r14d
je 0x236a
cmpl $0x1, %r14d
jne 0x2372
movq $0x1, -0x8(%r15,%r12,8)
orb $0x40, -0x9(%r15,%r12,8)
jmp 0x2386
orb $0x60, -0x1(%r15,%r12,8)
jmp 0x2386
movq -0x8(%r15,%r12,8), %rax
orq 0x10(%rsp), %rax
andq 0x8(%rsp), %rax
movq %rax, -0x8(%r15,%r12,8)
movq %r15, %rdi
movl %ebx, %esi
callq 0x82dc
movl $0x0, %ebp
testb %al, %al
je 0x2325
movl %ebx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x11d0
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r15
pushq %r14
pushq %rbx
testl %edi, %edi
je 0x2405
movl $0x14, %r15d
cmpl $0x14, %edi
jb 0x240b
movl %edi, %r15d
cmpl $0x5f5e101, %edi        # imm = 0x5F5E101
jb 0x240b
leaq 0x15352(%rip), %rsi     # 0x17740
leaq 0x15358(%rip), %rdx     # 0x1774d
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x8cca
jmp 0x249d
movl $0x3c, %r15d
leal 0x1a(%r15), %eax
imulq $0x38e38e39, %rax, %r14 # imm = 0x38E38E39
shrq $0x21, %r14
movl $0x1, %edi
movl $0x20, %esi
callq 0x1100
movq %rax, %rbx
movl $0x4, %esi
movq %r14, %rdi
callq 0x1100
movq %rax, 0x18(%rbx)
testq %rax, %rax
je 0x247c
movl %r15d, 0x8(%rbx)
addl $0x12, %r15d
movl %r15d, 0xc(%rbx)
shll $0x2, %r14d
movl %r14d, 0x10(%rbx)
movl $0x1, 0x14(%rbx)
leaq 0x152dc(%rip), %rsi     # 0x17740
leaq 0x15307(%rip), %rdx     # 0x17772
movl $0x3, %edi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x8cca
jmp 0x249d
leaq 0x152bd(%rip), %rsi     # 0x17740
leaq 0x152da(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8cca
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0x14(%rdi), %ecx
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
testl %ecx, %ecx
jle 0x24ec
cmpl 0x8(%rdi), %ecx
jle 0x24ed
retq
leal 0x8(%rcx), %r9d
imulq $0x38e38e39, %r9, %rsi  # imm = 0x38E38E39
shrq $0x21, %rsi
movq 0x18(%rdi), %rdx
xorl %r8d, %r8d
cmpl $0x3fffffff, (%rdx,%r8,4) # imm = 0x3FFFFFFF
ja 0x24ec
incq %r8
cmpq %r8, %rsi
jne 0x2503
movl 0x10(%rdi), %r8d
shrl $0x2, %r8d
movq 0x18(%rdi), %rdx
cmpl %r8d, %esi
jae 0x2557
movl %r9d, %r9d
imulq $0x38e38e39, %r9, %r10  # imm = 0x38E38E39
shrq $0x21, %r10
cmpl $0x2, %r10d
movl $0x1, %r9d
cmovael %r10d, %r9d
addl %r9d, %r8d
subl %esi, %r8d
cmpl $0x0, (%rdx,%r9,4)
jne 0x24ec
incq %r9
cmpq %r9, %r8
jne 0x2548
leal -0x1(%rcx), %eax
movl -0x4(%rdx,%rsi,4), %r9d
xorl %esi, %esi
movl $0xcccccccd, %r8d       # imm = 0xCCCCCCCD
movl %r9d, %r10d
imulq %r8, %r10
shrq $0x23, %r10
leal (%r10,%r10), %r11d
leal (%r11,%r11,4), %r11d
subl %r11d, %r9d
movb %r9b, -0x9(%rsp,%rsi)
incq %rsi
movl %r10d, %r9d
cmpq $0x9, %rsi
jne 0x2567
cltq
imulq $0x38e38e39, %rax, %rsi # imm = 0x38E38E39
movq %rsi, %r8
shrq $0x3f, %r8
sarq $0x21, %rsi
addl %r8d, %esi
leal (%rsi,%rsi,8), %esi
subl %esi, %eax
movl $0x8, %esi
cmpl $0x7, %eax
jg 0x25ca
cltq
movl $0x8, %esi
cmpb $0x0, -0x9(%rsp,%rsi)
jne 0x25f5
decq %rsi
cmpq %rax, %rsi
jg 0x25bb
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
testl %esi, %esi
je 0x25e1
movslq %esi, %rsi
cmpb $0x0, -0x9(%rsp,%rsi)
je 0x24ec
cmpl $0x1, %ecx
jne 0x25f2
cmpl $0x0, (%rdx)
jne 0x25f2
cmpw $0x0, 0x2(%rdi)
je 0x25fb
xorl %eax, %eax
retq
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
retq
cmpl $0x0, 0x4(%rdi)
jg 0x24ec
jmp 0x25f2
// File: /workspace/github_c_makefile_star2_O3/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:
movslq %esi, %rcx
imulq $0x38e38e39, %rcx, %rax # imm = 0x38E38E39
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x21, %rax
addl %edx, %eax
movslq %eax, %rdx
movl (%rdi,%rdx,4), %eax
leal (%rdx,%rdx,8), %edx
subl %edx, %ecx
je 0x263e
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %eax, %eax
imulq %rdx, %rax
shrq $0x23, %rax
decl %ecx
jne 0x2630
movl %eax, %ecx
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
imulq %rcx, %rdx
shrq $0x23, %rdx
addl %edx, %edx
leal (%rdx,%rdx,4), %ecx
subl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
testq %rsi, %rsi
je 0x26bd
xorl %ecx, %ecx
movabsq $0x44b82fa09b5a53, %r8  # imm = 0x44B82FA09B5A53
movl $0xcccccccd, %r9d       # imm = 0xCCCCCCCD
movq %rsi, %rax
shrq $0x9, %rax
mulq %r8
shrq $0xb, %rdx
imull $0x3b9aca00, %edx, %r10d # imm = 0x3B9ACA00
movl %esi, %eax
subl %r10d, %eax
movl %eax, (%rdi)
cmpq $0x3b9ac9ff, %rsi       # imm = 0x3B9AC9FF
ja 0x26a8
incl %ecx
movl %eax, %r10d
imulq %r9, %r10
shrq $0x23, %r10
cmpl $0x9, %eax
movl %r10d, %eax
ja 0x2691
jmp 0x26ab
addl $0x9, %ecx
addq $0x4, %rdi
cmpq $0x3b9ac9ff, %rsi       # imm = 0x3B9AC9FF
movq %rdx, %rsi
ja 0x266c
jmp 0x26c2
movl $0x1, %ecx
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rax
orq %rdx, %rax
je 0x274e
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
xorl %r15d, %r15d
movl $0x3b9ac9ff, %r13d      # imm = 0x3B9AC9FF
movl $0xcccccccd, %ebp       # imm = 0xCCCCCCCD
movl $0x3b9aca00, %edx       # imm = 0x3B9ACA00
movq %r12, %rdi
movq %r14, %rsi
xorl %ecx, %ecx
callq 0xaad0
imull $0x3b9aca00, %eax, %esi # imm = 0x3B9ACA00
movl %r12d, %ecx
subl %esi, %ecx
movl %ecx, (%rbx)
cmpq %r12, %r13
movl $0x0, %esi
sbbq %r14, %rsi
jb 0x2731
incl %r15d
movl %ecx, %esi
imulq %rbp, %rsi
shrq $0x23, %rsi
cmpl $0x9, %ecx
movl %esi, %ecx
ja 0x271b
jmp 0x2735
addl $0x9, %r15d
addq $0x4, %rbx
cmpq %r12, %r13
movl $0x0, %ecx
sbbq %r14, %rcx
movq %rax, %r12
movq %rdx, %r14
jb 0x26ef
jmp 0x2754
movl $0x1, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x13, 0x8(%rdi)
jle 0x2796
movq %rsi, %r14
movq %rdi, %rbx
callq 0x24bc
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x2655
movl %eax, 0x14(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x11fa
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: mul_digs
static int mul_digs(uint *digr, const uint *dig1, const int msb1,
		const uint *dig2, const int msb2)
{
	int msb = 1;
	const int uints1 = (msb1 + 8) / 9;
	const int uints2 = (msb2 + 8) / 9;

	for (int i = 0; i < uints1 + uints2; i++) {
		int jmax = i;
		if (jmax >= uints1)
			jmax = uints1 - 1;
		int jmin = i - uints2 + 1;
		if (jmin < 0)
			jmin = 0;

#ifdef __SIZEOF_INT128__
		/* XXX: int128 may overflow if both operands >= 10^(9*10^20) */
		__uint128_t tmp128 = 0;
		for (int j = jmax, k = i - jmax; j >= jmin; j--, k++)
			tmp128 += (uint64_t)dig1[j] * dig2[k];
		if (tmp128)
			msb = shift_add_u128(digr, msb, tmp128, i);
#else
		uint64_t tmp64 = 0;
		int cnt = 0;
		for (int j = jmax, k = i - jmax; j >= jmin; j--, k++) {
			tmp64 += (uint64_t)dig1[j] * dig2[k];
			cnt++;
			if (cnt == 10) {
				/* Consume before tmp64 overflow */
				msb = shift_add_u64(digr, msb, tmp64, i);
				tmp64 = 0;
				cnt = 0;
			}
		}
		if (cnt)
			msb = shift_add_u64(digr, msb, tmp64, i);
#endif
	}

	tt_assert_fa(msb >= msb1 && msb <= (msb1 + msb2));

	return msb;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rcx, 0x28(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdx, 0x8(%rsp)
leal 0x8(%rdx), %eax
cltq
imulq $0x38e38e39, %rax, %r11 # imm = 0x38E38E39
movq %r11, %rax
shrq $0x3f, %rax
sarq $0x21, %r11
addl %eax, %r11d
movq %r8, (%rsp)
leal 0x8(%r8), %eax
cltq
imulq $0x38e38e39, %rax, %rbx # imm = 0x38E38E39
movq %rbx, %rax
shrq $0x3f, %rax
sarq $0x21, %rbx
addl %eax, %ebx
movl %ebx, %eax
addl %r11d, %eax
jle 0x3a9d
movq %rsi, %r12
movslq %r11d, %r10
decl %r11d
movl %eax, %r13d
movl $0x1, %eax
xorl %r14d, %r14d
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movq %rbx, 0x18(%rsp)
movq %r10, 0x10(%rsp)
cmpq %r10, %r14
movl %r11d, %edx
cmovll %r14d, %edx
movl %r14d, %ecx
subl %ebx, %ecx
cmovsl %ebp, %ecx
cmpl %ecx, %edx
jle 0x3a8f
movl %edx, %r15d
movslq %ecx, %rcx
movl %r14d, %esi
subl %edx, %esi
movslq %esi, %rdx
movq 0x28(%rsp), %rsi
leaq (%rsi,%rdx,4), %rdi
xorl %esi, %esi
xorl %edx, %edx
movl (%r12,%r15,4), %r8d
movl (%rdi), %r9d
imulq %r8, %r9
addq %r9, %rsi
adcq $0x0, %rdx
decq %r15
addq $0x4, %rdi
cmpq %rcx, %r15
jg 0x3a17
movq %rsi, %rcx
orq %rdx, %rcx
je 0x3a8f
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movl $0x0, 0x40(%rsp)
leaq 0x30(%rsp), %rdi
movl %eax, %ebp
movq %r11, %rbx
callq 0x26c5
movq 0x20(%rsp), %rcx
leaq (%rcx,%r14,4), %rdi
leal (%r14,%r14,8), %r15d
subl %r15d, %ebp
movl %ebp, %esi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
leaq 0x30(%rsp), %rdx
movl %eax, %ecx
callq 0x3dca
movq %rbx, %r11
movq 0x10(%rsp), %r10
movq 0x18(%rsp), %rbx
addl %r15d, %eax
incq %r14
cmpq %r13, %r14
jne 0x39e2
jmp 0x3aa2
movl $0x1, %eax
movq 0x8(%rsp), %rcx
cmpl %ecx, %eax
jl 0x3ac4
movq (%rsp), %rdx
addl %ecx, %edx
cmpl %edx, %eax
jg 0x3ac4
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x13e8
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: add_digs
static int add_digs(uint *dig, const int msb, const uint *dig2, const int msb2)
{
	int i;
	char carry = 0;

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

	/* Process remaining high digits in dig */
	const int uints = (msb + 8) / 9;
	for (; i < uints; i++) {
		if (carry == 0) {
			i = uints;
			break;
		}
		dig[i] = add_dig(dig[i], 0, &carry);
	}

	/* Check new MSB */
	if (carry) {
		/* Carry at uint boundary */
		dig[i] = 1;
		return _tt_max(msb, msb2) + 1;
	} else {
		/* Get new msb, i => valid uints */
		tt_assert_fa(i > 0);
		uint u = dig[i-1];
		int msbr = (i - 1) * 9;
		do {
			msbr++;
			u /= 10;
		} while (u);

		const int msbs = _tt_max(msb, msb2);
		tt_assert_fa(msbr == msbs || msbr == (msbs+1));
		return msbr;
	}
}

// Assembly:
pushq %rax
testl %ecx, %ecx
jle 0x3e15
leal 0x8(%rcx), %eax
imulq $0x38e38e39, %rax, %r8  # imm = 0x38E38E39
shrq $0x21, %r8
xorl %r9d, %r9d
xorl %eax, %eax
movl (%rdx,%r9,4), %r10d
movzbl %al, %eax
addl (%rdi,%r9,4), %eax
leal (%rax,%r10), %r11d
cmpl $0x3b9aca00, %r11d      # imm = 0x3B9ACA00
leal -0x3b9aca00(%r10,%rax), %r10d
cmovbl %r11d, %r10d
setae %al
movl %r10d, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x3de2
jmp 0x3e1a
xorl %eax, %eax
xorl %r8d, %r8d
leal 0x8(%rsi), %edx
movslq %edx, %rdx
imulq $0x38e38e39, %rdx, %rdx # imm = 0x38E38E39
movq %rdx, %r9
shrq $0x3f, %r9
sarq $0x21, %rdx
addl %r9d, %edx
cmpl %edx, %r8d
jge 0x3e74
movl %r8d, %r8d
movl %edx, %r9d
testb %al, %al
je 0x3e90
movl (%rdi,%r8,4), %r10d
movzbl %al, %eax
leal (%r10,%rax), %r11d
cmpl $0x3b9aca00, %r11d      # imm = 0x3B9ACA00
leal -0x3b9aca00(%r10,%rax), %r10d
cmovbl %r11d, %r10d
setae %al
movl %r10d, (%rdi,%r8,4)
incq %r8
cmpq %r8, %r9
jne 0x3e40
movl %edx, %r8d
testb %al, %al
je 0x3e8d
movl %r8d, %eax
movl $0x1, (%rdi,%rax,4)
cmpl %ecx, %esi
cmovgl %esi, %ecx
incl %ecx
movl %ecx, %eax
jmp 0x3edb
movl %r8d, %edx
testl %edx, %edx
jle 0x3edd
leal -0x1(%rdx), %eax
movl (%rdi,%rax,4), %eax
leal (%rdx,%rdx,8), %edx
negl %edx
movl $0xcccccccd, %edi       # imm = 0xCCCCCCCD
movl %eax, %r8d
imulq %rdi, %r8
shrq $0x23, %r8
decl %edx
cmpl $0x9, %eax
movl %r8d, %eax
ja 0x3ea4
cmpl %ecx, %esi
cmovgl %esi, %ecx
movl $0xfffffff7, %esi       # imm = 0xFFFFFFF7
movl $0xfffffff6, %edi       # imm = 0xFFFFFFF6
subl %ecx, %edi
movl $0xfffffff7, %eax       # imm = 0xFFFFFFF7
subl %edx, %eax
cmpl %edx, %edi
je 0x3edb
subl %ecx, %esi
cmpl %edx, %esi
jne 0x3ee2
popq %rcx
retq
callq 0x1464
callq 0x143c
// File: /workspace/github_c_makefile_star2_O3/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:
testl %esi, %esi
setle %r8b
testl %ecx, %ecx
setle %r9b
xorl %eax, %eax
testb %r9b, %r8b
jne 0x4628
cmpl %ecx, %esi
jge 0x4629
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
jle 0x4631
movl $0x1, %eax
retq
addl $0x8, %esi
movslq %esi, %rcx
imulq $0x38e38e39, %rcx, %rcx # imm = 0x38E38E39
movq %rcx, %rsi
shrq $0x3f, %rsi
sarq $0x21, %rcx
addl %esi, %ecx
testl %ecx, %ecx
jle 0x4628
movl -0x4(%rdi,%rcx,4), %esi
movl -0x4(%rdx,%rcx,4), %r8d
cmpl %r8d, %esi
ja 0x462b
decq %rcx
cmpl %r8d, %esi
jae 0x464b
jmp 0x4623
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rax
cmpl %r8d, %edx
jl 0x4764
testl %r8d, %r8d
jle 0x46bb
addl $0x8, %r8d
imulq $0x38e38e39, %r8, %r8   # imm = 0x38E38E39
shrq $0x21, %r8
xorl %r9d, %r9d
xorl %r10d, %r10d
addl (%rsi,%r9,4), %r10d
movl %r10d, %eax
subl (%rcx,%r9,4), %eax
leal 0x3b9aca00(%rax), %r11d
movl %eax, %r10d
sarl $0x1f, %r10d
testl %eax, %eax
cmovnsl %eax, %r11d
movl %r11d, (%rdi,%r9,4)
incq %r9
cmpq %r9, %r8
jne 0x468b
shrl $0x1f, %eax
jmp 0x46c0
xorl %eax, %eax
xorl %r8d, %r8d
leal 0x8(%rdx), %ecx
movslq %ecx, %rcx
imulq $0x38e38e39, %rcx, %r9  # imm = 0x38E38E39
movq %r9, %rcx
shrq $0x3f, %rcx
sarq $0x21, %r9
addl %ecx, %r9d
movl %r9d, %ecx
cmpl %r9d, %r8d
jge 0x4718
movl %r8d, %r8d
movl (%rsi,%r8,4), %r9d
movzbl %al, %r10d
movl %r9d, %r11d
subl %r10d, %r11d
negl %r10d
movl %r11d, %eax
shrl $0x1f, %eax
testl %r11d, %r11d
leal 0x3b9aca00(%r9,%r10), %r9d
cmovnsl %r11d, %r9d
movl %r9d, (%rdi,%r8,4)
incq %r8
cmpq %r8, %rcx
jne 0x46e6
testb %al, %al
jne 0x4769
movl $0x1, %eax
movl $0xcccccccd, %esi       # imm = 0xCCCCCCCD
testl %ecx, %ecx
jle 0x475a
decq %rcx
movl %ecx, %r8d
movl (%rdi,%r8,4), %r8d
testl %r8d, %r8d
je 0x4755
leal (%rcx,%rcx,8), %eax
movl %r8d, %r9d
incl %eax
movl %r9d, %r10d
imulq %rsi, %r10
shrq $0x23, %r10
cmpl $0x9, %r9d
movl %r10d, %r9d
ja 0x473f
testl %r8d, %r8d
je 0x4726
testl %edx, %edx
jle 0x4762
cmpl %edx, %eax
jg 0x476e
popq %rcx
retq
callq 0x165a
callq 0x1606
callq 0x1630
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/decimal/basic.c
// Function: tt_dec_cmp_abs
int tt_dec_cmp_abs(const struct tt_dec *src1, const struct tt_dec *src2)
{
	int msb1 = src1->_msb, msb2 = src2->_msb;

	int ret = (msb1 + src1->_exp) - (msb2 + src2->_exp);
	if (ret)
		return ret;

	uint *dig1 = src1->_dig32, *dig2 = src2->_dig32;
	const int uints = (_tt_max(msb1, msb2) + 8) / 9 * 4;

	/* Align exponent */
	int adj = src1->_exp - src2->_exp;
	if (adj < 0) {
		dig2 = calloc(uints, 4);
		msb2 = shift_digs(dig2, 0, src2->_dig32, msb2, -adj);
	} else if (adj > 0) {
		dig1 = calloc(uints, 4);
		msb1 = shift_digs(dig1, 0, src1->_dig32, msb1, adj);
	}
	tt_assert_fa(msb1 == msb2);

	ret = cmp_digs(dig1, msb1, dig2, msb2);

	if (dig1 != src1->_dig32)
		free(dig1);
	if (dig2 != src2->_dig32)
		free(dig2);

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl 0x4(%rdi), %ebx
movl 0x14(%rdi), %ebp
movl 0x4(%rsi), %eax
movl 0x14(%rsi), %r13d
leal (%rbx,%rbp), %r14d
leal (%rax,%r13), %ecx
subl %ecx, %r14d
jne 0x48a1
movq 0x18(%rdi), %r12
movq %rsi, 0x10(%rsp)
movq 0x18(%rsi), %r15
cmpl %r13d, %ebp
movl %r13d, %ecx
cmovgl %ebp, %ecx
addl $0x8, %ecx
movslq %ecx, %rcx
imulq $0x38e38e39, %rcx, %rcx # imm = 0x38E38E39
movq %rcx, %rdx
shrq $0x3f, %rdx
shrq $0x21, %rcx
addl %edx, %ecx
shll $0x2, %ecx
subl %eax, %ebx
movq %rdi, 0x8(%rsp)
js 0x4806
je 0x4831
movslq %ecx, %rdi
movl $0x4, %esi
callq 0x1100
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r12, %rdx
movl %ebp, %ecx
movl %ebx, %r8d
callq 0x3ac9
movl %eax, %ebp
movq %r14, %r12
jmp 0x4831
movslq %ecx, %rdi
movl $0x4, %esi
callq 0x1100
movq %rax, %r14
negl %ebx
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
movl %r13d, %ecx
movl %ebx, %r8d
callq 0x3ac9
movl %eax, %r13d
movq %r14, %r15
cmpl %r13d, %ebp
jne 0x48b3
xorl %r14d, %r14d
testl %r13d, %r13d
jle 0x4873
addl $0x8, %r13d
imulq $0x38e38e39, %r13, %rax # imm = 0x38E38E39
shrq $0x21, %rax
movq 0x8(%rsp), %rsi
testl %eax, %eax
jle 0x4880
movl -0x4(%r12,%rax,4), %ecx
movl -0x4(%r15,%rax,4), %edx
cmpl %edx, %ecx
ja 0x487a
decq %rax
cmpl %edx, %ecx
jae 0x4852
movl $0xffffffff, %r14d      # imm = 0xFFFFFFFF
jmp 0x4880
movq 0x8(%rsp), %rsi
jmp 0x4880
movl $0x1, %r14d
cmpq 0x18(%rsi), %r12
je 0x488e
movq %r12, %rdi
callq 0x1030
movq 0x10(%rsp), %rax
cmpq 0x18(%rax), %r15
je 0x48a1
movq %r15, %rdi
callq 0x1030
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1684
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movq %rdi, %rbx
movswl (%rdi), %ecx
movswl (%rsi), %eax
cmpw %ax, %cx
jne 0x48dc
movq %rbx, %rdi
callq 0x4773
movl %eax, %ecx
negl %eax
cmpw $0x0, (%rbx)
cmovel %ecx, %eax
jmp 0x490a
cmpl $0x1, 0x14(%rbx)
jne 0x4908
movq 0x18(%rbx), %rdx
cmpl $0x0, (%rdx)
jne 0x4908
cmpw $0x0, 0x2(%rbx)
jne 0x4908
cmpl $0x1, 0x14(%rsi)
jne 0x4908
movq 0x18(%rsi), %rdx
cmpl $0x0, (%rdx)
jne 0x4908
cmpw $0x0, 0x2(%rsi)
je 0x490c
subl %ecx, %eax
popq %rbx
retq
xorl %eax, %eax
jmp 0x490a
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
movl $0x18, %edi
callq 0x1140
movq %rax, %rbx
movabsq $0x2200000000, %rax     # imm = 0x2200000000
movq %rax, (%rbx)
movl $0x1, 0x8(%rbx)
movl $0x22, %edi
movl $0x8, %esi
callq 0x1100
movq %rax, 0x10(%rbx)
testq %rax, %rax
jne 0x496b
leaq 0x12f87(%rip), %rsi     # 0x178d8
leaq 0x12e0c(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8cca
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x4(%rdi), %r15d
xorl %ebp, %ebp
cmpl %esi, %r15d
jge 0x4a02
movq %rdi, %rbx
addl %r15d, %r15d
cmpl %esi, %r15d
cmovlel %esi, %r15d
movq 0x10(%rdi), %rdi
leal (,%r15,8), %eax
movslq %eax, %rsi
callq 0x1150
testq %rax, %rax
je 0x49e6
movq %rax, %r14
movslq 0x4(%rbx), %rax
leaq (%r14,%rax,8), %rdi
movslq %r15d, %rdx
subq %rax, %rdx
shlq $0x3, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x10e0
movq %r14, 0x10(%rbx)
movl %r15d, 0x4(%rbx)
jmp 0x4a02
leaq 0x12ef8(%rip), %rsi     # 0x178e5
leaq 0x12d70(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8cca
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x0, (%rdi)
movl $0x1, 0x8(%rdi)
movq 0x10(%rdi), %rdi
movslq 0x4(%r14), %rdx
shlq $0x3, %rdx
xorl %esi, %esi
callq 0x10e0
movl 0x8(%rbx), %esi
movq %r14, %rdi
callq 0x4986
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4a6f
movl (%rbx), %eax
movl %eax, (%r14)
movslq 0x8(%rbx), %rdx
movl %edx, 0x8(%r14)
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
shlq $0x3, %rdx
callq 0x1120
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
movl 0x8(%rdi), %edx
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
testq %rdx, %rdx
je 0x4adb
movslq 0x4(%rdi), %rcx
cmpl %ecx, %edx
jle 0x4adc
retq
cmpl $0x2, %edx
jl 0x4aef
movq 0x10(%rdi), %rsi
cmpq $0x0, -0x8(%rsi,%rdx,8)
jne 0x4af4
jmp 0x4adb
cmpl $0x1, %edx
jne 0x4b0a
movq 0x10(%rdi), %rsi
xorl %r8d, %r8d
cmpq $0x0, (%rsi,%r8,8)
js 0x4adb
incq %r8
cmpq %r8, %rdx
jne 0x4afb
cmpl %ecx, %edx
jge 0x4b24
movq 0x10(%rdi), %rsi
movslq %edx, %rdx
cmpq $0x0, (%rsi,%rdx,8)
jne 0x4adb
incq %rdx
cmpq %rdx, %rcx
jne 0x4b15
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %rbx
subq $0x10, %rsp
leaq 0x8(%rsp), %rbx
movq $0x0, (%rbx)
movq %rbx, %rsi
movl $0xa, %edx
callq 0x5127
movq (%rbx), %rdi
callq 0x1060
movq (%rbx), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
testl %esi, %esi
jle 0x4d9e
leal 0x3e(%r14), %esi
imulq $0x4104105, %rsi, %rax  # imm = 0x4104105
shrq $0x20, %rax
subl %eax, %esi
shrl %esi
addl %eax, %esi
shrl $0x5, %esi
addl 0x8(%rbx), %esi
movq %rbx, %rdi
callq 0x4986
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4db2
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
movl %r14d, %edx
callq 0x4b7f
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x4a77
movq %r14, %rcx
btrq $0x3f, %rcx
movq 0x10(%rbx), %rax
movq %rcx, (%rax)
testq %r14, %r14
jns 0x5839
movslq 0x8(%rbx), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x8(%rbx)
movq $0x1, (%rax,%rcx,8)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/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:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
testq %rsi, %rsi
js 0x5863
movq %r14, %rdi
callq 0x4a77
movq 0x10(%r14), %rax
movq %rbx, (%rax)
jmp 0x587c
negq %rbx
movq %r14, %rdi
callq 0x4a77
movq 0x10(%r14), %rax
movq %rbx, (%rax)
movl $0x1, (%r14)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_add_buf
int _tt_int_add_buf(_tt_word *int1, int msb1, const _tt_word *int2, int msb2)
{
	int i, carry = 0;

	for (i = 0; i < msb2; i++)
		int1[i] = add_int(int1[i], int2[i], &carry);
	for (; i < msb1; i++) {
		if (carry == 0)
			return msb1;
		int1[i]++;
		carry = !int1[i];
	}
	if (carry)
		int1[i++] = 1;

	return i;
}

// Assembly:
movl %esi, %eax
testl %ecx, %ecx
jle 0x58bb
movl %ecx, %r8d
xorl %r9d, %r9d
xorl %esi, %esi
addq (%rdi,%r9,8), %rsi
movq %rsi, %r10
addq (%rdx,%r9,8), %r10
movq %r10, %rsi
shrq $0x3f, %rsi
btrq $0x3f, %r10
movq %r10, (%rdi,%r9,8)
incq %r9
cmpq %r9, %r8
jne 0x5896
jmp 0x58bf
xorl %esi, %esi
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x58df
movl %ecx, %ecx
movl %eax, %edx
testl %esi, %esi
je 0x58f1
xorl %esi, %esi
incq (%rdi,%rcx,8)
sete %sil
incq %rcx
cmpq %rcx, %rdx
jne 0x58c7
movl %eax, %ecx
testl %esi, %esi
je 0x58ef
movl %ecx, %eax
incl %ecx
movq $0x1, (%rdi,%rax,8)
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_sub_buf
int _tt_int_sub_buf(_tt_word *int1, int msb1, const _tt_word *int2, int msb2)
{
	int i, borrow = 0;

	for (i = 0; i < msb2; i++)
		int1[i] = sub_int(int1[i], int2[i], &borrow);
	for (; i < msb1; i++) {
		if (borrow == 0)
			return msb1;
		borrow = !int1[i];
		int1[i]--;
	}
	while (i > 1 && int1[i-1] == 0)
		i--;

	return i;
}

// Assembly:
movl %esi, %eax
testl %ecx, %ecx
jle 0x592d
movl %ecx, %r8d
xorl %r9d, %r9d
xorl %r10d, %r10d
addq (%rdi,%r9,8), %r10
movq %r10, %rsi
subq (%rdx,%r9,8), %rsi
movq %rsi, %r10
sarq $0x3f, %r10
movq %rsi, %r11
btrq $0x3f, %r11
movq %r11, (%rdi,%r9,8)
incq %r9
cmpq %r9, %r8
jne 0x5901
shrq $0x3f, %rsi
jmp 0x5931
xorl %esi, %esi
xorl %ecx, %ecx
cmpl %eax, %ecx
jge 0x5952
movl %ecx, %ecx
movl %eax, %edx
testl %esi, %esi
je 0x5970
xorl %esi, %esi
subq $0x1, (%rdi,%rcx,8)
setb %sil
incq %rcx
cmpq %rcx, %rdx
jne 0x5939
movl %eax, %ecx
cmpl $0x2, %ecx
jl 0x5971
movl %ecx, %eax
cmpq $0x0, -0x8(%rdi,%rax,8)
jne 0x5971
leal -0x1(%rcx), %eax
cmpl $0x2, %ecx
movl %eax, %ecx
jg 0x5957
movl $0x1, %eax
retq
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_cmp_buf
int _tt_int_cmp_buf(const _tt_word *int1, int msb1,
		const _tt_word *int2, int msb2)
{
	if (msb1 > msb2)
		return 1;
	else if (msb1 < msb2)
		return -1;

	for (int i = msb1-1; i >= 0; i--) {
		if (int1[i] > int2[i])
			return 1;
		else if (int1[i] < int2[i])
			return -1;
	}

	return 0;
}

// Assembly:
movl $0x1, %eax
cmpl %ecx, %esi
jg 0x59a1
jl 0x599c
movl %esi, %ecx
testl %ecx, %ecx
jle 0x59a2
movq -0x8(%rdi,%rcx,8), %rsi
movq -0x8(%rdx,%rcx,8), %r8
cmpq %r8, %rsi
ja 0x59a1
decq %rcx
cmpq %r8, %rsi
jae 0x5981
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_mul_buf
int _tt_int_mul_buf(_tt_word *intr, const _tt_word *int1, int msb1,
		const _tt_word *int2, int msb2)
{
	/* mul_buf_xxx cannot treat 0 correctly */
	if ((msb1 == 1 && int1[0] == 0) || (msb2 == 1 && int2[0] == 0))
		return 1;

	int msbmin, msbmax;
	if (msb1 > msb2) {
		msbmax = msb1;
		msbmin = msb2;
	} else {
		msbmax = msb2;
		msbmin = msb1;
	}

	/* Use classic algorithm when input size below crosspoint */
	if (msbmin < KARA_CROSS)
		return mul_buf_classic(intr, int1, msb1, int2, msb2);

	/* Allocate working buffer for Karatsuba algorithm */
	/* recursive calls = (int)(log2(msbmax) - log2(KARA_CROSS)) + 2; */
	const int recurse = 33 - __builtin_clz((msbmax / KARA_CROSS) + 1);
	const int worksz = msbmax * 4 + recurse * (recurse + 9);
	void *workbuf = malloc(worksz * _tt_word_sz);
	if (workbuf == NULL)
		return TT_ENOMEM;

	int ret = mul_buf_kara(intr, int1, msb1, int2, msb2, workbuf);

	free(workbuf);
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
cmpl $0x1, %edx
jne 0x59e6
cmpq $0x0, (%r15)
je 0x5a1e
cmpl $0x1, %ebx
jne 0x59f1
cmpq $0x0, (%r14)
je 0x5a1e
cmpl %ebx, %ebp
movl %ebx, %eax
cmovll %ebp, %eax
cmpl $0xf, %eax
jg 0x5a25
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5aa0
movl $0x1, %eax
jmp 0x5a91
cmpl %ebx, %ebp
movl %ebx, %eax
cmovgl %ebp, %eax
leal 0xf(%rax), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
sarl $0x4, %ecx
incl %ecx
bsrl %ecx, %ecx
xorl $0x1f, %ecx
movl $0x21, %edx
subl %ecx, %edx
shll $0x5, %eax
shll $0x3, %ecx
movl $0x150, %esi            # imm = 0x150
subl %ecx, %esi
imull %edx, %esi
addl %eax, %esi
movslq %esi, %rdi
callq 0x1140
testq %rax, %rax
je 0x5a8c
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
movq %rax, %r9
callq 0x5c4e
movl %eax, %ebx
movq %r13, %rdi
callq 0x1030
movl %ebx, %eax
jmp 0x5a91
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: add_sub_ints
static int add_sub_ints(struct tt_int *dst, const struct tt_int *src1,
		const struct tt_int *src2, int sub)
{
	int ret = 0;

	/* Zero dst if not overlap with src1 and src2 */
	if (dst != src1 && dst != src2)
		_tt_int_zero(dst);

	int sign1 = src1->sign;
	int sign2 = src2->sign;
	if (sub)
		sign2 = !sign2;

	if (sign1 == sign2) {
		dst->sign = sign1;
		ret = add_ints_abs(dst, src1, src2);
	} else {
		int cmp12 = tt_int_cmp_abs(src1, src2);
		if (cmp12 >= 0) {
			dst->sign = sign1;
			ret = sub_ints_abs(dst, src1, src2);
		} else {
			dst->sign = sign2;
			ret = sub_ints_abs(dst, src2, src1);
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpq %rsi, %rdi
sete %al
cmpq %rdx, %rdi
sete %cl
orb %al, %cl
jne 0x6e49
movq %rbx, %rdi
callq 0x4a77
movl (%r14), %eax
movl (%r15), %edx
xorl %ecx, %ecx
testl %edx, %edx
sete %cl
testl %ebp, %ebp
cmovel %edx, %ecx
cmpl %ecx, %eax
jne 0x6edd
movl %eax, (%rbx)
movl 0x8(%r14), %eax
cmpl 0x8(%r15), %eax
movq %r15, %r12
cmovlq %r14, %r12
cmovlq %r15, %r14
movl 0x8(%r14), %esi
cmpl %esi, 0x4(%rbx)
jg 0x6e95
incl %esi
movq %rbx, %rdi
callq 0x4986
movl %eax, %ebp
testl %eax, %eax
jne 0x6fb5
movl 0x8(%r14), %esi
movl %esi, 0x8(%rbx)
movslq 0x8(%r12), %rcx
testq %rcx, %rcx
jle 0x6f35
movq 0x10(%r14), %rdx
movq 0x10(%r12), %rdi
movq 0x10(%rbx), %r8
xorl %r9d, %r9d
xorl %eax, %eax
addq (%rdx,%r9,8), %rax
movq %rax, %r10
addq (%rdi,%r9,8), %r10
movq %r10, %rax
shrq $0x3f, %rax
btrq $0x3f, %r10
movq %r10, (%r8,%r9,8)
incq %r9
cmpq %r9, %rcx
jne 0x6eb8
jmp 0x6f39
movl 0x8(%r14), %edx
movl 0x8(%r15), %esi
cmpl %esi, %edx
jle 0x6ef6
movl %eax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
jmp 0x6f28
cmpl %esi, %edx
jl 0x6f1d
movq 0x10(%r14), %rsi
movq 0x10(%r15), %rdi
testl %edx, %edx
jle 0x6ee9
movq -0x8(%rsi,%rdx,8), %r8
movq -0x8(%rdi,%rdx,8), %r9
cmpq %r9, %r8
ja 0x6ee9
decq %rdx
cmpq %r9, %r8
jae 0x6f02
movl %ecx, (%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x74ca
xorl %eax, %eax
xorl %ecx, %ecx
movl 0x8(%r14), %edi
cmpl %edi, %ecx
jge 0x6f77
movl %ecx, %r8d
leal (,%rdi,8), %edx
shll $0x3, %ecx
subl %ecx, %edx
testl %eax, %eax
je 0x6f94
movq 0x10(%r14), %rax
movq (%rax,%r8,8), %rcx
xorl %eax, %eax
incq %rcx
sete %al
movq 0x10(%rbx), %r9
movq %rcx, (%r9,%r8,8)
incq %r8
addl $-0x8, %edx
cmpq %r8, %rdi
jne 0x6f50
xorl %ebp, %ebp
testl %eax, %eax
je 0x6fb5
movq 0x10(%rbx), %rax
leal 0x1(%rsi), %ecx
movl %ecx, 0x8(%rbx)
movslq %esi, %rcx
movq $0x1, (%rax,%rcx,8)
jmp 0x6fb5
xorl %ebp, %ebp
cmpq %rbx, %r14
je 0x6fb5
movl %r8d, %esi
shlq $0x3, %rsi
movq 0x10(%rbx), %rdi
addq %rsi, %rdi
addq 0x10(%r14), %rsi
movslq %edx, %rdx
callq 0x1120
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_mul
int tt_int_mul(struct tt_int *dst, const struct tt_int *src1,
		const struct tt_int *src2)
{
	if (_tt_int_is_zero(src1) || _tt_int_is_zero(src2)) {
		_tt_int_zero(dst);
		return 0;
	}

	/* Allocate result buffer */
	_tt_word *r = calloc(src1->msb + src2->msb, _tt_word_sz);
	if (!r)
		return TT_ENOMEM;

	const int sign = src1->sign ^ src2->sign;
	int msb = _tt_int_mul_buf(r, src1->buf, src1->msb,
			src2->buf, src2->msb);
	/* TODO: drop memcpy by replacing dst->buf with r directly */
	if (dst->_max < msb) {
		int ret = _tt_int_realloc(dst, msb);
		if (ret)
			return ret;
	}
	memcpy(dst->buf, r, msb*_tt_word_sz);
	memset(dst->buf + msb, 0, (dst->_max - msb)*_tt_word_sz);
	dst->msb = msb;
	dst->sign = sign;

	free(r);
	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movl 0x8(%rsi), %r15d
cmpl $0x1, %r15d
jne 0x6ff6
movq 0x10(%r13), %rax
cmpq $0x0, (%rax)
je 0x70b6
movl 0x8(%r12), %ebp
cmpl $0x1, %ebp
jne 0x700f
movq 0x10(%r12), %rax
cmpq $0x0, (%rax)
je 0x70b6
leal (%r15,%rbp), %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x1100
testq %rax, %rax
je 0x70c2
movq %rax, %r14
movl (%r12), %eax
xorl (%r13), %eax
movl %eax, 0x4(%rsp)
movq 0x10(%r13), %rsi
movq 0x10(%r12), %rcx
movq %r14, %rdi
movl %r15d, %edx
movl %ebp, %r8d
callq 0x59c2
movl %eax, %r15d
cmpl %eax, 0x4(%rbx)
jge 0x7068
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4986
movl %eax, %ebp
testl %eax, %eax
jne 0x70c7
movq 0x10(%rbx), %rdi
leal (,%r15,8), %eax
movslq %eax, %rdx
movq %r14, %rsi
callq 0x1120
movslq %r15d, %rax
leaq (,%rax,8), %rdi
addq 0x10(%rbx), %rdi
movslq 0x4(%rbx), %rdx
subq %rax, %rdx
shlq $0x3, %rdx
xorl %ebp, %ebp
xorl %esi, %esi
callq 0x10e0
movl %r15d, 0x8(%rbx)
movl 0x4(%rsp), %eax
movl %eax, (%rbx)
movq %r14, %rdi
callq 0x1030
jmp 0x70c7
movq %rbx, %rdi
callq 0x4a77
xorl %ebp, %ebp
jmp 0x70c7
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/cyb70289[P]tt/src/apn/integer/basic.c
// Function: tt_int_cmp
int tt_int_cmp(const struct tt_int *src1, const struct tt_int *src2)
{
	int ret;

	if (src1->sign != src2->sign) {
		if (_tt_int_is_zero(src1) && _tt_int_is_zero(src2))
			return 0;
		ret = src2->sign - src1->sign;
	} else {
		ret = tt_int_cmp_abs(src1, src2);
		if (src1->sign)
			ret = -ret;
	}

	return ret;
}

// Assembly:
movl (%rdi), %ecx
movl (%rsi), %eax
subl %ecx, %eax
jne 0x749a
movl 0x8(%rdi), %eax
movl 0x8(%rsi), %r8d
movl $0x1, %edx
cmpl %r8d, %eax
jg 0x74c0
cmpl %r8d, %eax
jl 0x7493
movq 0x10(%rdi), %rdi
movq 0x10(%rsi), %rsi
testl %eax, %eax
jle 0x74be
movq -0x8(%rdi,%rax,8), %r8
movq -0x8(%rsi,%rax,8), %r9
cmpq %r9, %r8
ja 0x74c0
decq %rax
cmpq %r9, %r8
jae 0x7478
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0x74c0
cmpl $0x1, 0x8(%rdi)
jne 0x74aa
movq 0x10(%rdi), %rcx
cmpq $0x0, (%rcx)
je 0x74ab
retq
cmpl $0x1, 0x8(%rsi)
jne 0x74aa
movq 0x10(%rsi), %rcx
cmpq $0x0, (%rcx)
jne 0x74aa
xorl %eax, %eax
retq
xorl %edx, %edx
movl %edx, %eax
negl %eax
testl %ecx, %ecx
cmovel %edx, %eax
retq