// File: /workspace/github_c_makefile_star2_O0/cyb70289[P]tt/src/apn/integer/basic.c
// Function: add_ints_abs
static int add_ints_abs(struct tt_int *dst, const struct tt_int *src1,
		const struct tt_int *src2)
{
	int ret;

	/* Make src1 longer than src2 */
	if (src1->msb < src2->msb)
		__tt_swap(src1, src2);

	/* Make sure dst buffer is large enough */
	if (dst->_max <= src1->msb) {
		ret = _tt_int_realloc(dst, src1->msb+1);
		if (ret)
			return ret;
	}
	dst->msb = src1->msb;

	/* Add array */
	int i, carry = 0;
	for (i = 0; i < src2->msb; i++)
		dst->buf[i] = add_int(src1->buf[i], src2->buf[i], &carry);
	for (; i < src1->msb; i++) {
		if (carry == 0) {
			if (dst != src1)
				memcpy(&dst->buf[i], &src1->buf[i],
						(src1->msb-i)*_tt_word_sz);
			return 0;
		}
		dst->buf[i] = src1->buf[i] + 1;
		carry = !dst->buf[i];
	}
	if (carry)
		dst->buf[dst->msb++] = 1;

	return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq %rdx, 0x18(%rsp)
movq 0x20(%rsp), %rax
movl 0x8(%rax), %eax
movq 0x18(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xb4d7
jmp 0xb4b7
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0xb4d7
movq 0x28(%rsp), %rax
movl 0x4(%rax), %eax
movq 0x20(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jg 0xb518
movq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rax
movl 0x8(%rax), %esi
addl $0x1, %esi
callq 0x68d0
movl %eax, 0x14(%rsp)
cmpl $0x0, 0x14(%rsp)
je 0xb516
movl 0x14(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0xb691
jmp 0xb518
movq 0x20(%rsp), %rax
movl 0x8(%rax), %ecx
movq 0x28(%rsp), %rax
movl %ecx, 0x8(%rax)
movl $0x0, (%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
movq 0x18(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xb593
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x18(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq %rsp, %rdx
callq 0x88e0
movq %rax, %rdx
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xb537
jmp 0xb595
movl 0x4(%rsp), %eax
movq 0x20(%rsp), %rcx
cmpl 0x8(%rcx), %eax
jge 0xb65f
cmpl $0x0, (%rsp)
jne 0xb607
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
je 0xb5fa
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdi
movslq 0x4(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rsi
movslq 0x4(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rsi
movq 0x20(%rsp), %rax
movl 0x8(%rax), %eax
subl 0x4(%rsp), %eax
shll $0x3, %eax
movslq %eax, %rdx
callq 0x1140
movl $0x0, 0x34(%rsp)
jmp 0xb691
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
addq $0x1, %rdx
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x4(%rsp), %rcx
cmpq $0x0, (%rax,%rcx,8)
setne %al
xorb $-0x1, %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, (%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0xb595
cmpl $0x0, (%rsp)
je 0xb689
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x28(%rsp), %rdx
movl 0x8(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x8(%rdx)
movslq %ecx, %rcx
movq $0x1, (%rax,%rcx,8)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopw (%rax,%rax)