// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/basic.c
// Function: mul_buf_unbalanced
static int mul_buf_unbalanced(_tt_word *intr, const _tt_word *int1, int msb1,
		const _tt_word *int2, int msb2, _tt_word *workbuf)
{
	int msb = 0, msbr = 0, left = msb2, tmpmsb;
	const int tmpsz = msb1 * 2;

	for (int i = 0; i < (msb2+msb1-1)/msb1-1; i++) {
		int words2 = get_words(int2, msb1);
		if (words2) {
			memset(workbuf, 0, tmpsz*_tt_word_sz);
			tmpmsb = mul_buf_kara(workbuf, int1, msb1,
					int2, words2, workbuf+tmpsz);
			msbr = _tt_int_add_buf(intr, msbr, workbuf, tmpmsb)
				- msb1;
			if (msbr < 0)
				msbr = 0;
		} else {
			msbr = 0;
		}
		intr += msb1;
		int2 += msb1;
		msb += msb1;
		left -= msb1;
	}

	tt_assert_fa(left);
	memset(workbuf, 0, tmpsz*_tt_word_sz);
	tmpmsb = mul_buf_kara(workbuf, int1, msb1, int2, left, workbuf+tmpsz);
	msbr = _tt_int_add_buf(intr, msbr, workbuf, tmpmsb);

	return msb + msbr;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movl %edx, 0x44(%rsp)
movq %rcx, 0x38(%rsp)
movl %r8d, 0x34(%rsp)
movq %r9, 0x28(%rsp)
movl $0x0, 0x24(%rsp)
movl $0x0, 0x20(%rsp)
movl 0x34(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x44(%rsp), %eax
shll %eax
movl %eax, 0x14(%rsp)
movl $0x0, 0x10(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x8(%rsp)
movl 0x34(%rsp), %eax
addl 0x44(%rsp), %eax
subl $0x1, %eax
cltd
idivl 0x44(%rsp)
movl %eax, %ecx
movl 0x8(%rsp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jge 0xb227
movq 0x38(%rsp), %rdi
movl 0x44(%rsp), %esi
callq 0xb2e0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0xb1c5
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %eax
shll $0x3, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movq 0x38(%rsp), %rcx
movl 0xc(%rsp), %r8d
movq 0x28(%rsp), %r9
movslq 0x14(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r9
callq 0x90c0
movl %eax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movl 0x20(%rsp), %esi
movq 0x28(%rsp), %rdx
movl 0x18(%rsp), %ecx
callq 0x87d0
subl 0x44(%rsp), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jge 0xb1c3
movl $0x0, 0x20(%rsp)
jmp 0xb1cd
movl $0x0, 0x20(%rsp)
movl 0x44(%rsp), %ecx
movq 0x50(%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x50(%rsp)
movl 0x44(%rsp), %ecx
movq 0x38(%rsp), %rax
movslq %ecx, %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x38(%rsp)
movl 0x44(%rsp), %eax
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
movl 0x44(%rsp), %ecx
movl 0x1c(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x1c(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0xb10b
jmp 0xb229
cmpl $0x0, 0x1c(%rsp)
setne %al
xorb $-0x1, %al
xorb $-0x1, %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
cltq
cmpq $0x0, %rax
je 0xb26d
xorl %edi, %edi
leaq 0x1366c(%rip), %rsi     # 0x1e8b9
leaq 0x6e8a(%rip), %rdx      # 0x120de
leaq 0x13639(%rip), %rcx     # 0x1e894
movl $0x17c, %r8d            # imm = 0x17C
movb $0x0, %al
callq 0xe010
callq 0x1060
jmp 0xb26f
movq 0x28(%rsp), %rdi
movl 0x14(%rsp), %eax
shll $0x3, %eax
movslq %eax, %rdx
xorl %esi, %esi
callq 0x10e0
movq 0x28(%rsp), %rdi
movq 0x48(%rsp), %rsi
movl 0x44(%rsp), %edx
movq 0x38(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movq 0x28(%rsp), %r9
movslq 0x14(%rsp), %rax
shlq $0x3, %rax
addq %rax, %r9
callq 0x90c0
movl %eax, 0x18(%rsp)
movq 0x50(%rsp), %rdi
movl 0x20(%rsp), %esi
movq 0x28(%rsp), %rdx
movl 0x18(%rsp), %ecx
callq 0x87d0
movl %eax, 0x20(%rsp)
movl 0x24(%rsp), %eax
addl 0x20(%rsp), %eax
addq $0x58, %rsp
retq
nop