LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/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 0x9148(%rip), %rdi      # 0xb0e7
callq 0x1060
callq 0x48dc
movq %rax, %rbx
callq 0x48dc
movq %rax, %r14
movl $0x3e7, %r15d           # imm = 0x3E7
callq 0x48dc
movq %rax, (%rsp)
callq 0x90d2
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 0x1eeb
movq %rax, %rbp
callq 0x90d2
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 0x1eeb
movq %rax, %r12
movq (%rsp), %r13
movq %r13, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %rbp, %rcx
movq %rax, %r8
callq 0x7ac8
movq %rbx, %rdi
movq %rbp, %rsi
movq %rbx, %rdx
callq 0x700e
movq %r14, %rdi
movq %r12, %rsi
movq %r14, %rdx
callq 0x700e
movq %rbx, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x6e62
movq %r13, %rdi
movq %rbx, %rsi
callq 0x7451
movl %eax, %r13d
testl %eax, %eax
je 0x2088
xorl %edi, %edi
leaq 0x8ff5(%rip), %rsi      # 0xb05d
leaq 0x8ff7(%rip), %rdx      # 0xb066
xorl %eax, %eax
callq 0x8c46
movq %rbp, %rdi
callq 0x4b12
movq %r12, %rdi
callq 0x4b12
jmp 0x2098
movq %rbp, %rdi
callq 0x493c
movq %r12, %rdi
callq 0x493c
subl $0x1, %r15d
setb %al
testl %r13d, %r13d
jne 0x20ac
testb %al, %al
je 0x1fc3
movq %rbx, %rdi
callq 0x493c
movq %r14, %rdi
callq 0x493c
movq (%rsp), %rdi
callq 0x493c
leaq 0x902a(%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_O1/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 0x242b
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 %r15, (%r12)
movl %ebx, %r12d
movq $-0x1, %rax
movl %r14d, %ecx
shlq %cl, %rax
notq %rax
movq %rax, 0x8(%rsp)
cmpl $0x2, %ebx
movl $0x1, %r13d
cmovgel %ebx, %r13d
xorl %ebp, %ebp
callq 0x90d2
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
shlq $0x20, %rax
movq %rax, (%r15,%rbp,8)
callq 0x90d2
movl %eax, %eax
orq %rax, (%r15,%rbp,8)
incq %rbp
cmpq %rbp, %r13
jne 0x23ab
orb $0x1, (%r15)
testl %r14d, %r14d
je 0x23f0
cmpl $0x1, %r14d
jne 0x23f8
movq $0x1, -0x8(%r15,%r12,8)
orb $0x40, -0x9(%r15,%r12,8)
jmp 0x240c
orb $0x60, -0x1(%r15,%r12,8)
jmp 0x240c
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 0x82c4
testb %al, %al
je 0x23a9
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_O1/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 0x2489
movl $0x14, %r15d
cmpl $0x14, %edi
jb 0x248f
movl %edi, %r15d
cmpl $0x5f5e101, %edi        # imm = 0x5F5E101
jb 0x248f
leaq 0x152ce(%rip), %rsi     # 0x17740
leaq 0x152d4(%rip), %rdx     # 0x1774d
xorl %ebx, %ebx
xorl %edi, %edi
xorl %eax, %eax
callq 0x8c46
jmp 0x2521
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 0x2500
movl %r15d, 0x8(%rbx)
addl $0x12, %r15d
movl %r15d, 0xc(%rbx)
shll $0x2, %r14d
movl %r14d, 0x10(%rbx)
movl $0x1, 0x14(%rbx)
leaq 0x15258(%rip), %rsi     # 0x17740
leaq 0x15283(%rip), %rdx     # 0x17772
movl $0x3, %edi
movl %r14d, %ecx
xorl %eax, %eax
callq 0x8c46
jmp 0x2521
leaq 0x15239(%rip), %rsi     # 0x17740
leaq 0x15256(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8c46
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x2570
cmpl 0x8(%rdi), %ecx
jle 0x2571
retq
leal 0x8(%rcx), %r8d
imulq $0x38e38e39, %r8, %rsi  # imm = 0x38E38E39
shrq $0x21, %rsi
movq 0x18(%rdi), %r9
cmpl $0x2, %esi
movl $0x1, %edx
cmovael %esi, %edx
xorl %r10d, %r10d
cmpl $0x3fffffff, (%r9,%r10,4) # imm = 0x3FFFFFFF
ja 0x2570
incq %r10
cmpq %r10, %rdx
jne 0x2592
movl 0x10(%rdi), %r9d
shrl $0x2, %r9d
cmpl %r9d, %edx
jae 0x25e6
movq 0x18(%rdi), %r10
movl %r8d, %r8d
imulq $0x38e38e39, %r8, %r11  # imm = 0x38E38E39
shrq $0x21, %r11
cmpl $0x2, %r11d
movl $0x1, %r8d
cmovael %r11d, %r8d
addl %r8d, %r9d
subl %edx, %r9d
cmpl $0x0, (%r10,%r8,4)
jne 0x2570
incq %r8
cmpq %r8, %r9
jne 0x25d7
leal -0x1(%rcx), %eax
movq 0x18(%rdi), %rdx
movl %esi, %esi
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 0x25fc
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 0x265f
cltq
movl $0x8, %esi
cmpb $0x0, -0x9(%rsp,%rsi)
jne 0x268a
decq %rsi
cmpq %rax, %rsi
jg 0x2650
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
testl %esi, %esi
je 0x2676
movslq %esi, %rsi
cmpb $0x0, -0x9(%rsp,%rsi)
je 0x2570
cmpl $0x1, %ecx
jne 0x2687
cmpl $0x0, (%rdx)
jne 0x2687
cmpw $0x0, 0x2(%rdi)
je 0x2690
xorl %eax, %eax
retq
movl $0xffffff31, %eax       # imm = 0xFFFFFF31
retq
cmpl $0x0, 0x4(%rdi)
jg 0x2570
jmp 0x2687
// File: /workspace/github_c_makefile_star2_O1/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 0x26d3
movl $0xcccccccd, %edx       # imm = 0xCCCCCCCD
movl %eax, %eax
imulq %rdx, %rax
shrq $0x23, %rax
decl %ecx
jne 0x26c5
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_O1/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:
xorl %ecx, %ecx
testq %rsi, %rsi
sete %cl
je 0x2753
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 0x2740
incl %ecx
movl %eax, %r10d
imulq %r9, %r10
shrq $0x23, %r10
cmpl $0x9, %eax
movl %r10d, %eax
ja 0x2729
jmp 0x2743
addl $0x9, %ecx
addq $0x4, %rdi
cmpq $0x3b9ac9ff, %rsi       # imm = 0x3B9AC9FF
movq %rdx, %rsi
ja 0x2704
movl %ecx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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
xorl %ebx, %ebx
movq %rsi, %rax
orq %rdx, %rax
sete %bl
je 0x27de
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movl $0x3b9ac9ff, %r13d      # imm = 0x3B9AC9FF
movl $0xcccccccd, %ebp       # imm = 0xCCCCCCCD
movl $0x3b9aca00, %edx       # imm = 0x3B9ACA00
movq %r12, %rdi
movq %r15, %rsi
xorl %ecx, %ecx
callq 0xa870
imull $0x3b9aca00, %eax, %esi # imm = 0x3B9ACA00
movl %r12d, %ecx
subl %esi, %ecx
movl %ecx, (%r14)
cmpq %r12, %r13
movl $0x0, %esi
sbbq %r15, %rsi
jb 0x27c4
incl %ebx
movl %ecx, %esi
imulq %rbp, %rsi
shrq $0x23, %rsi
cmpl $0x9, %ecx
movl %esi, %ecx
ja 0x27af
jmp 0x27c7
addl $0x9, %ebx
addq $0x4, %r14
cmpq %r12, %r13
movl $0x0, %ecx
sbbq %r15, %rcx
movq %rax, %r12
movq %rdx, %r15
jb 0x2782
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x281e
movq %rsi, %r14
movq %rdi, %rbx
callq 0x2540
movq 0x18(%rbx), %rdi
movq %r14, %rsi
callq 0x26ea
movl %eax, 0x14(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x11fa
// File: /workspace/github_c_makefile_star2_O1/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 $0x58, %rsp
movq %rcx, 0x18(%rsp)
movq %rdi, 0x20(%rsp)
movq %rdx, 0x10(%rsp)
leal 0x8(%rdx), %eax
cltq
imulq $0x38e38e39, %rax, %r15 # imm = 0x38E38E39
movq %r15, %rax
shrq $0x3f, %rax
sarq $0x21, %r15
addl %eax, %r15d
movq %r8, 0x8(%rsp)
leal 0x8(%r8), %eax
cltq
imulq $0x38e38e39, %rax, %rcx # imm = 0x38E38E39
movq %rcx, %rax
shrq $0x3f, %rax
sarq $0x21, %rcx
addl %eax, %ecx
movq %rcx, 0x38(%rsp)
movl %ecx, %eax
addl %r15d, %eax
jle 0x3af1
movq %rsi, %r12
movslq %r15d, %rcx
movq %rcx, 0x30(%rsp)
decl %r15d
movl %eax, %eax
movq %rax, 0x28(%rsp)
movl $0x1, %ebp
xorl %r13d, %r13d
cmpq 0x30(%rsp), %r13
movl %r15d, %edi
cmovll %r13d, %edi
movl %r13d, %ecx
subl 0x38(%rsp), %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovsl %eax, %ecx
movl $0x0, %esi
movl $0x0, %edx
cmpl %ecx, %edi
jle 0x3a9a
movslq %edi, %rax
movslq %ecx, %rcx
movl %r13d, %edx
subl %edi, %edx
movslq %edx, %rdx
movq 0x18(%rsp), %rsi
leaq (%rsi,%rdx,4), %rdi
xorl %esi, %esi
xorl %edx, %edx
movl (%r12,%rax,4), %r8d
movl (%rdi), %r9d
imulq %r8, %r9
addq %r9, %rsi
adcq $0x0, %rdx
decq %rax
addq $0x4, %rdi
cmpq %rcx, %rax
jg 0x3a7c
movq %rsi, %rax
orq %rdx, %rax
je 0x3ae1
xorps %xmm0, %xmm0
movaps %xmm0, 0x40(%rsp)
movl $0x0, 0x50(%rsp)
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
callq 0x2756
movq 0x20(%rsp), %rcx
leaq (%rcx,%r13,4), %rdi
leal (%r13,%r13,8), %r14d
subl %r14d, %ebp
movl %ebp, %esi
movq %rbx, %rdx
movl %eax, %ecx
callq 0x3e17
movl %eax, %ebp
addl %r14d, %ebp
incq %r13
cmpq 0x28(%rsp), %r13
jne 0x3a38
jmp 0x3af6
movl $0x1, %ebp
movq 0x10(%rsp), %rcx
cmpl %ecx, %ebp
jl 0x3b1b
movq 0x8(%rsp), %rax
addl %ecx, %eax
cmpl %eax, %ebp
jg 0x3b1b
movl %ebp, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x1412
// File: /workspace/github_c_makefile_star2_O1/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 0x3e71
leal 0x8(%rcx), %eax
imulq $0x38e38e39, %rax, %rax # imm = 0x38E38E39
shrq $0x21, %rax
cmpl $0x2, %eax
movl $0x1, %r9d
cmovgel %eax, %r9d
xorl %eax, %eax
xorl %r8d, %r8d
movl (%rdx,%rax,4), %r10d
movzbl %r8b, %r8d
addl (%rdi,%rax,4), %r8d
leal (%r8,%r10), %r11d
cmpl $0x3b9aca00, %r11d      # imm = 0x3B9ACA00
leal -0x3b9aca00(%r10,%r8), %r10d
cmovbl %r11d, %r10d
setae %r8b
movl %r10d, (%rdi,%rax,4)
incq %rax
cmpq %rax, %r9
jne 0x3e3c
jmp 0x3e76
xorl %r8d, %r8d
xorl %eax, %eax
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, %eax
jge 0x3ed0
movl %eax, %eax
movl %edx, %r9d
testb %r8b, %r8b
je 0x3ece
movl (%rdi,%rax,4), %r10d
movzbl %r8b, %r8d
leal (%r10,%r8), %r11d
cmpl $0x3b9aca00, %r11d      # imm = 0x3B9ACA00
leal -0x3b9aca00(%r10,%r8), %r10d
cmovbl %r11d, %r10d
setae %r8b
movl %r10d, (%rdi,%rax,4)
incq %rax
cmpq %rax, %r9
jne 0x3e9a
movl %edx, %eax
testb %r8b, %r8b
je 0x3ee9
cltq
movl $0x1, (%rdi,%rax,4)
cmpl %ecx, %esi
cmovgl %esi, %ecx
incl %ecx
movl %ecx, %eax
jmp 0x3f35
testl %eax, %eax
jle 0x3f37
movslq %eax, %rdx
movl -0x4(%rdi,%rdx,4), %edi
leal (%rax,%rax,8), %edx
negl %edx
movl $0xcccccccd, %eax       # imm = 0xCCCCCCCD
movl %edi, %r8d
imulq %rax, %r8
shrq $0x23, %r8
decl %edx
cmpl $0x9, %edi
movl %r8d, %edi
ja 0x3efe
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 0x3f35
subl %ecx, %esi
cmpl %edx, %esi
jne 0x3f3c
popq %rcx
retq
callq 0x148e
callq 0x1466
// File: /workspace/github_c_makefile_star2_O1/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 0x4605
cmpl %ecx, %esi
jge 0x4606
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
jle 0x460e
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 0x4605
movl -0x4(%rdi,%rcx,4), %esi
movl -0x4(%rdx,%rcx,4), %r8d
cmpl %r8d, %esi
ja 0x4608
decq %rcx
cmpl %r8d, %esi
jae 0x4628
jmp 0x4600
// File: /workspace/github_c_makefile_star2_O1/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 0x474e
testl %r8d, %r8d
jle 0x46a5
addl $0x8, %r8d
imulq $0x38e38e39, %r8, %rax  # imm = 0x38E38E39
shrq $0x21, %rax
cmpl $0x2, %eax
movl $0x1, %r9d
cmovgel %eax, %r9d
xorl %r8d, %r8d
xorl %r10d, %r10d
addl (%rsi,%r8,4), %r10d
movl %r10d, %eax
subl (%rcx,%r8,4), %eax
leal 0x3b9aca00(%rax), %r11d
movl %eax, %r10d
sarl $0x1f, %r10d
testl %eax, %eax
cmovnsl %eax, %r11d
movl %r11d, (%rdi,%r8,4)
incq %r8
cmpq %r8, %r9
jne 0x4675
shrl $0x1f, %eax
jmp 0x46aa
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 0x4702
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 0x46d0
testb %al, %al
jne 0x4753
movl $0x1, %eax
movl $0xcccccccd, %esi       # imm = 0xCCCCCCCD
testl %ecx, %ecx
jle 0x4744
decq %rcx
movl %ecx, %r8d
movl (%rdi,%r8,4), %r8d
testl %r8d, %r8d
je 0x473f
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 0x4729
testl %r8d, %r8d
je 0x4710
testl %edx, %edx
jle 0x474c
cmpl %edx, %eax
jg 0x4758
popq %rcx
retq
callq 0x16ae
callq 0x165a
callq 0x1684
// File: /workspace/github_c_makefile_star2_O1/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), %r15d
movl 0x14(%rdi), %r12d
movl 0x4(%rsi), %eax
movl 0x14(%rsi), %r13d
leal (%r12,%r15), %ebp
leal (%rax,%r13), %ecx
subl %ecx, %ebp
jne 0x486e
movq %rsi, %rbx
movq %rdi, %r14
movq 0x18(%rdi), %rsi
movq 0x18(%rbx), %rbp
cmpl %r13d, %r12d
movl %r13d, %ecx
cmovgl %r12d, %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, %r15d
js 0x47fd
movq %rbp, 0x8(%rsp)
je 0x4832
movq %rsi, 0x10(%rsp)
movslq %ecx, %rdi
movl $0x4, %esi
callq 0x1100
movq %rax, %rbp
movq %rax, %rdi
xorl %esi, %esi
movq 0x10(%rsp), %rdx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x3b20
movl %eax, %r12d
movq %rbp, %rsi
jmp 0x4832
movq %rsi, 0x10(%rsp)
movslq %ecx, %rdi
movl $0x4, %esi
callq 0x1100
movq %rax, 0x8(%rsp)
negl %r15d
movq %rax, %rdi
xorl %esi, %esi
movq %rbp, %rdx
movl %r13d, %ecx
movl %r15d, %r8d
callq 0x3b20
movq 0x10(%rsp), %rsi
movl %eax, %r13d
movq 0x8(%rsp), %r15
cmpl %r13d, %r12d
jne 0x487f
movq %rsi, %rbp
movq %rsi, %rdi
movl %r12d, %esi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x45e9
movq %rbp, %rdi
movl %eax, %ebp
cmpq 0x18(%r14), %rdi
je 0x4860
callq 0x1030
cmpq 0x18(%rbx), %r15
je 0x486e
movq %r15, %rdi
callq 0x1030
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x16d8
// File: /workspace/github_c_makefile_star2_O1/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 0x48a8
movq %rbx, %rdi
callq 0x475d
movl %eax, %ecx
negl %eax
cmpw $0x0, (%rbx)
cmovel %ecx, %eax
jmp 0x48d6
cmpl $0x1, 0x14(%rbx)
jne 0x48d4
movq 0x18(%rbx), %rdx
cmpl $0x0, (%rdx)
jne 0x48d4
cmpw $0x0, 0x2(%rbx)
jne 0x48d4
cmpl $0x1, 0x14(%rsi)
jne 0x48d4
movq 0x18(%rsi), %rdx
cmpl $0x0, (%rdx)
jne 0x48d4
cmpw $0x0, 0x2(%rsi)
je 0x48d8
subl %ecx, %eax
popq %rbx
retq
xorl %eax, %eax
jmp 0x48d6
// File: /workspace/github_c_makefile_star2_O1/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 0x4937
leaq 0x12fbb(%rip), %rsi     # 0x178d8
leaq 0x12e40(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8c46
movq %rbx, %rdi
callq 0x1030
xorl %ebx, %ebx
movq %rbx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x49ce
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 0x49b2
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 0x49ce
leaq 0x12f2c(%rip), %rsi     # 0x178e5
leaq 0x12da4(%rip), %rdx     # 0x17764
xorl %edi, %edi
xorl %eax, %eax
callq 0x8c46
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_O1/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 0x4952
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
jne 0x4a3e
movl (%rbx), %eax
movl %eax, (%r14)
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
movslq 0x8(%rbx), %rdx
shlq $0x3, %rdx
callq 0x1120
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4aaa
movslq 0x4(%rdi), %rcx
cmpl %ecx, %edx
jle 0x4aab
retq
cmpl $0x2, %edx
jl 0x4abc
movq 0x10(%rdi), %rsi
cmpq $0x0, -0x8(%rsi,%rdx,8)
je 0x4aaa
testl %edx, %edx
setg %r8b
jle 0x4af5
movq 0x10(%rdi), %rsi
cmpq $0x0, (%rsi)
js 0x4af0
leaq -0x1(%rdx), %r8
xorl %r9d, %r9d
cmpq %r9, %r8
je 0x4af5
leaq 0x1(%r9), %r10
cmpq $0x0, 0x8(%rsi,%r9,8)
movq %r10, %r9
jns 0x4ad5
cmpq %rdx, %r10
setb %r8b
testb %r8b, %r8b
jne 0x4aaa
cmpl %ecx, %edx
jge 0x4b0f
movq 0x10(%rdi), %rsi
movslq %edx, %rdx
cmpq $0x0, (%rsi,%rdx,8)
jne 0x4aaa
incq %rdx
cmpq %rdx, %rcx
jne 0x4b00
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5180
movq (%rbx), %rdi
callq 0x1060
movq (%rbx), %rdi
callq 0x1030
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x4d86
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 0x4952
testl %eax, %eax
jne 0x4d9a
movq 0x10(%rbx), %rdi
movl 0x8(%rbx), %esi
movl %r14d, %edx
callq 0x4b6a
movl %eax, 0x8(%rbx)
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_c_makefile_star2_O1/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 0x4a46
movq %r14, %rcx
btrq $0x3f, %rcx
movq 0x10(%rbx), %rax
movq %rcx, (%rax)
testq %r14, %r14
jns 0x5889
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_O1/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 0x58b3
movq %r14, %rdi
callq 0x4a46
movq 0x10(%r14), %rax
movq %rbx, (%rax)
jmp 0x58cc
negq %rbx
movq %r14, %rdi
callq 0x4a46
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_O1/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:
testl %ecx, %ecx
jle 0x5908
movl %ecx, %r8d
xorl %eax, %eax
xorl %ecx, %ecx
addq (%rdi,%rax,8), %rcx
movq %rcx, %r9
addq (%rdx,%rax,8), %r9
movq %r9, %rcx
shrq $0x3f, %rcx
btrq $0x3f, %r9
movq %r9, (%rdi,%rax,8)
incq %rax
cmpq %rax, %r8
jne 0x58e3
jmp 0x590c
xorl %ecx, %ecx
xorl %eax, %eax
cmpl %esi, %eax
jge 0x5929
movl %esi, %edx
movl %eax, %eax
testl %ecx, %ecx
je 0x593a
xorl %ecx, %ecx
incq (%rdi,%rax,8)
sete %cl
incq %rax
cmpq %rax, %rdx
jne 0x5914
testl %ecx, %ecx
je 0x5939
movl %eax, %ecx
incl %eax
movq $0x1, (%rdi,%rcx,8)
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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:
testl %ecx, %ecx
jle 0x5975
movl %ecx, %r8d
xorl %eax, %eax
xorl %r9d, %r9d
addq (%rdi,%rax,8), %r9
movq %r9, %rcx
subq (%rdx,%rax,8), %rcx
movq %rcx, %r9
sarq $0x3f, %r9
movq %rcx, %r10
btrq $0x3f, %r10
movq %r10, (%rdi,%rax,8)
incq %rax
cmpq %rax, %r8
jne 0x5949
shrq $0x3f, %rcx
jmp 0x5979
xorl %ecx, %ecx
xorl %eax, %eax
cmpl %esi, %eax
jge 0x5997
movl %esi, %edx
movl %eax, %eax
testl %ecx, %ecx
je 0x59b6
xorl %ecx, %ecx
subq $0x1, (%rdi,%rax,8)
setb %cl
incq %rax
cmpq %rax, %rdx
jne 0x5981
cmpl $0x2, %eax
jl 0x59b5
movl %eax, %ecx
cmpq $0x0, -0x8(%rdi,%rcx,8)
jne 0x59b5
leal -0x1(%rax), %ecx
cmpl $0x2, %eax
movl %ecx, %eax
jg 0x599c
movl $0x1, %eax
retq
movl %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x59e6
jl 0x59e1
movl %esi, %ecx
testl %ecx, %ecx
jle 0x59e7
movq -0x8(%rdi,%rcx,8), %rsi
movq -0x8(%rdx,%rcx,8), %r8
cmpq %r8, %rsi
ja 0x59e6
decq %rcx
cmpq %r8, %rsi
jae 0x59c6
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/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 0x5a2b
cmpq $0x0, (%r15)
je 0x5a63
cmpl $0x1, %ebx
jne 0x5a36
cmpq $0x0, (%r14)
je 0x5a63
cmpl %ebx, %ebp
movl %ebx, %eax
cmovll %ebp, %eax
cmpl $0xf, %eax
jg 0x5a6a
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 0x5ae5
movl $0x1, %eax
jmp 0x5ad6
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 0x5ad1
movq %rax, %r13
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
movq %r14, %rcx
movl %ebx, %r8d
movq %rax, %r9
callq 0x5c9a
movl %eax, %ebx
movq %r13, %rdi
callq 0x1030
movl %ebx, %eax
jmp 0x5ad6
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_O1/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 0x6e91
movq %rbx, %rdi
callq 0x4a46
movl (%r14), %eax
movl (%r15), %edx
xorl %ecx, %ecx
testl %edx, %edx
sete %cl
testl %ebp, %ebp
cmovel %edx, %ecx
cmpl %ecx, %eax
jne 0x6f24
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 0x6ed9
incl %esi
movq %rbx, %rdi
callq 0x4952
movl %eax, %ebp
testl %eax, %eax
jne 0x6ff9
movslq 0x8(%r14), %rax
movl %eax, 0x8(%rbx)
movslq 0x8(%r12), %rdx
testq %rdx, %rdx
jle 0x6f7c
movq 0x10(%r14), %rdi
movq 0x10(%r12), %r8
movq 0x10(%rbx), %r9
xorl %esi, %esi
xorl %ecx, %ecx
addq (%rdi,%rsi,8), %rcx
movq %rcx, %r10
addq (%r8,%rsi,8), %r10
movq %r10, %rcx
shrq $0x3f, %rcx
btrq $0x3f, %r10
movq %r10, (%r9,%rsi,8)
incq %rsi
cmpq %rsi, %rdx
jne 0x6eff
jmp 0x6f80
movl 0x8(%r14), %edx
movl 0x8(%r15), %esi
cmpl %esi, %edx
jle 0x6f3d
movl %eax, (%rbx)
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
jmp 0x6f6f
cmpl %esi, %edx
jl 0x6f64
movq 0x10(%r14), %rsi
movq 0x10(%r15), %rdi
testl %edx, %edx
jle 0x6f30
movq -0x8(%rsi,%rdx,8), %r8
movq -0x8(%rdi,%rdx,8), %r9
cmpq %r9, %r8
ja 0x6f30
decq %rdx
cmpq %r9, %r8
jae 0x6f49
movl %ecx, (%rbx)
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x74c9
xorl %ecx, %ecx
xorl %esi, %esi
movl 0x8(%r14), %edi
cmpl %edi, %esi
jge 0x6fbe
movl %esi, %r8d
leal (,%rdi,8), %edx
shll $0x3, %esi
subl %esi, %edx
testl %ecx, %ecx
je 0x6fd8
movq 0x10(%r14), %rcx
movq (%rcx,%r8,8), %rsi
xorl %ecx, %ecx
incq %rsi
sete %cl
movq 0x10(%rbx), %r9
movq %rsi, (%r9,%r8,8)
incq %r8
addl $-0x8, %edx
cmpq %r8, %rdi
jne 0x6f97
xorl %ebp, %ebp
testl %ecx, %ecx
je 0x6ff9
movq 0x10(%rbx), %rcx
leal 0x1(%rax), %edx
movl %edx, 0x8(%rbx)
movq $0x1, (%rcx,%rax,8)
jmp 0x6ff9
xorl %ebp, %ebp
cmpq %rbx, %r14
je 0x6ff9
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_O1/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 0x703a
movq 0x10(%r13), %rax
cmpq $0x0, (%rax)
je 0x70fa
movl 0x8(%r12), %ebp
cmpl $0x1, %ebp
jne 0x7053
movq 0x10(%r12), %rax
cmpq $0x0, (%rax)
je 0x70fa
leal (%r15,%rbp), %eax
movslq %eax, %rdi
movl $0x8, %esi
callq 0x1100
testq %rax, %rax
je 0x7106
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 0x5a07
movl %eax, %r15d
cmpl %eax, 0x4(%rbx)
jge 0x70ac
movq %rbx, %rdi
movl %r15d, %esi
callq 0x4952
movl %eax, %ebp
testl %eax, %eax
jne 0x710b
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 0x710b
movq %rbx, %rdi
callq 0x4a46
xorl %ebp, %ebp
jmp 0x710b
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_O1/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 0x7499
movl 0x8(%rdi), %eax
movl 0x8(%rsi), %r8d
movl $0x1, %edx
cmpl %r8d, %eax
jg 0x74bf
cmpl %r8d, %eax
jl 0x7492
movq 0x10(%rdi), %rdi
movq 0x10(%rsi), %rsi
testl %eax, %eax
jle 0x74bd
movq -0x8(%rdi,%rax,8), %r8
movq -0x8(%rsi,%rax,8), %r9
cmpq %r9, %r8
ja 0x74bf
decq %rax
cmpq %r9, %r8
jae 0x7477
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
jmp 0x74bf
cmpl $0x1, 0x8(%rdi)
jne 0x74a9
movq 0x10(%rdi), %rcx
cmpq $0x0, (%rcx)
je 0x74aa
retq
cmpl $0x1, 0x8(%rsi)
jne 0x74a9
movq 0x10(%rsi), %rcx
cmpq $0x0, (%rcx)
jne 0x74a9
xorl %eax, %eax
retq
xorl %edx, %edx
movl %edx, %eax
negl %eax
testl %ecx, %ecx
cmovel %edx, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/src/apn/integer/basic.c
// Function: sub_ints_abs
static int sub_ints_abs(struct tt_int *dst, const struct tt_int *src1,
		const struct tt_int *src2)
{
	/* Make sure dst buffer is large enough. TODO: It's overkill. */
	if (dst->_max < src1->msb) {
		int ret = _tt_int_realloc(dst, src1->msb);
		if (ret)
			return ret;
	}

	/* Sub array */
	int i, borrow = 0;
	for (i = 0; i < src2->msb; i++)
		dst->buf[i] = sub_int(src1->buf[i], src2->buf[i], &borrow);
	for (; i < src1->msb; i++) {
		if (borrow == 0) {
			if (dst != src1)
				memcpy(&dst->buf[i], &src1->buf[i],
						(src1->msb-i)*_tt_word_sz);
			break;
		}
		dst->buf[i] = src1->buf[i] - 1;
		borrow = !src1->buf[i];
	}

	/* Check new msb */
	dst->msb = src1->msb;
	while (dst->msb > 1 && dst->buf[dst->msb-1] == 0)
		dst->msb--;

	return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movl 0x8(%rsi), %esi
cmpl %esi, 0x4(%rdi)
jge 0x74ef
movq %rbx, %rdi
callq 0x4952
testl %eax, %eax
jne 0x75c6
movslq 0x8(%r15), %rcx
testq %rcx, %rcx
jle 0x7535
movq 0x10(%r14), %rsi
movq 0x10(%r15), %rdi
movq 0x10(%rbx), %r8
xorl %edx, %edx
xorl %r9d, %r9d
addq (%rsi,%rdx,8), %r9
movq %r9, %rax
subq (%rdi,%rdx,8), %rax
movq %rax, %r9
sarq $0x3f, %r9
movq %rax, %r10
btrq $0x3f, %r10
movq %r10, (%r8,%rdx,8)
incq %rdx
cmpq %rdx, %rcx
jne 0x7509
shrq $0x3f, %rax
jmp 0x7539
xorl %eax, %eax
xorl %edx, %edx
movl 0x8(%r14), %esi
cmpl %esi, %edx
jge 0x759b
movl %edx, %edi
leal (,%rsi,8), %ecx
shll $0x3, %edx
subl %edx, %ecx
testl %eax, %eax
je 0x757d
movq 0x10(%r14), %rdx
movq (%rdx,%rdi,8), %rax
decq %rax
movq 0x10(%rbx), %r8
movq %rax, (%r8,%rdi,8)
xorl %eax, %eax
cmpq $0x0, (%rdx,%rdi,8)
sete %al
incq %rdi
addl $-0x8, %ecx
cmpq %rdi, %rsi
jne 0x754f
jmp 0x759b
cmpq %r14, %rbx
je 0x759b
movl %edi, %esi
shlq $0x3, %rsi
movq 0x10(%rbx), %rdi
addq %rsi, %rdi
addq 0x10(%r14), %rsi
movslq %ecx, %rdx
callq 0x1120
movl 0x8(%r14), %eax
cmpl $0x2, %eax
jl 0x75c1
movq 0x10(%rbx), %rcx
movl %eax, %edx
cmpq $0x0, -0x8(%rcx,%rdx,8)
jne 0x75c1
leal -0x1(%rax), %edx
cmpl $0x2, %eax
movl %edx, %eax
jg 0x75a8
movl $0x1, %eax
movl %eax, 0x8(%rbx)
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/src/apn/integer/gcd.c
// Function: to_odd
static _tt_word *to_odd(_tt_word *a, int *msb, uint *shift)
{
	*shift = 0;

	while (*a == 0) {
		a++;
		(*msb)--;
		(*shift) += _tt_word_bits;
	}

	int zc = _tt_int_word_ctz(*a);
	if (zc) {
		*msb = _tt_int_shift_buf(a, *msb, -zc);
		(*shift) += zc;
	}

	return a;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movl $0x0, (%rdx)
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x80ea
decl (%r15)
addl $0x3f, (%rbx)
movq 0x8(%r14), %rdi
addq $0x8, %r14
jmp 0x80d5
callq 0x4a7d
testl %eax, %eax
je 0x8109
movl %eax, %ebp
movl (%r15), %esi
movl %eax, %edx
negl %edx
movq %r14, %rdi
callq 0x4b6a
movl %eax, (%r15)
addl %ebp, (%rbx)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/cyb70289[P]tt/src/apn/integer/mod.c
// Function: tt_int_mod_inv
int tt_int_mod_inv(struct tt_int *m,
		const struct tt_int *a, const struct tt_int *b)
{
	struct tt_int *n = tt_int_alloc();

	int ret = tt_int_extgcd(NULL, m, n, a, b);
	tt_int_free(n);

	return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x48dc
movq %rax, %r12
xorl %edi, %edi
movq %r15, %rsi
movq %rax, %rdx
movq %r14, %rcx
movq %rbx, %r8
callq 0x7ac8
movl %eax, %ebx
movq %r12, %rdi
callq 0x493c
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq