// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: x_bignum_add
cell x_bignum_add(cell a, cell b) {
	cell	fa, fb, result, r;
	int	carry;

	if (x_bignum_negative_p(a)) {
		if (x_bignum_negative_p(b)) {
			/* -A+-B --> -(|A|+|B|) */
			a = bignum_abs(a);
			save(a);
			a = bignum_add(a, bignum_abs(b));
			unsave(1);
			return bignum_negate(a);
		}
		else {
			/* -A+B --> B-|A| */
			return bignum_subtract(b, bignum_abs(a));
		}
	}
	else if (x_bignum_negative_p(b)) {
		/* A+-B --> A-|B| */
		return bignum_subtract(a, bignum_abs(b));
	}
	/* A+B */
	a = reverse_segments(cdr(a));
	save(a);
	b = reverse_segments(cdr(b));
	save(b);
	carry = 0;
	result = NIL;
	save(result);
	while (a != NIL || b != NIL || carry) {
		fa = a == NIL? 0: car(a);
		fb = b == NIL? 0: car(b);
		r = fa + fb + carry;
		carry = 0;
		if (r >= INT_SEG_LIMIT) {
			r -= INT_SEG_LIMIT;
			carry = 1;
		}
		result = new_atom(r, result);
		car(Stack) = result;
		if (a != NIL) a = cdr(a);
		if (b != NIL) b = cdr(b);
	}
	unsave(3);
	return new_atom(T_INTEGER, result);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq 0x23619(%rip), %rax     # 0x28180
movq 0x23a62(%rip), %rcx     # 0x285d0
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jge 0x4c27
movq 0x235f8(%rip), %rax     # 0x28180
movq 0x23a41(%rip), %rcx     # 0x285d0
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jge 0x4c01
movq -0x10(%rbp), %rdi
callq 0x49f0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x23582(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x23574(%rip)     # 0x28138
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rdi
callq 0x49f0
movq -0x48(%rbp), %rdi
movq %rax, %rsi
callq 0x4e50
movq %rax, -0x10(%rbp)
movl $0x1, %edi
callq 0x3950
movq -0x10(%rbp), %rdi
callq 0x4a70
movq %rax, -0x8(%rbp)
jmp 0x4e39
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rdi
callq 0x49f0
movq -0x50(%rbp), %rdi
movq %rax, %rsi
callq 0x4ed0
movq %rax, -0x8(%rbp)
jmp 0x4e39
movq 0x23552(%rip), %rax     # 0x28180
movq 0x2399b(%rip), %rcx     # 0x285d0
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jge 0x4c6a
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x49f0
movq -0x58(%rbp), %rdi
movq %rax, %rsi
callq 0x4ed0
movq %rax, -0x8(%rbp)
jmp 0x4e39
jmp 0x4c6c
movq 0x2395d(%rip), %rax     # 0x285d0
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4af0
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq 0x234a9(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x2349b(%rip)     # 0x28138
movq 0x2392c(%rip), %rax     # 0x285d0
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x4af0
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
movq 0x23478(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x2346a(%rip)     # 0x28138
movl $0x0, -0x3c(%rbp)
movq $-0x1, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movq 0x23450(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x23442(%rip)     # 0x28138
movb $0x1, %al
cmpq $-0x1, -0x10(%rbp)
movb %al, -0x59(%rbp)
jne 0x4d18
movb $0x1, %al
cmpq $-0x1, -0x18(%rbp)
movb %al, -0x59(%rbp)
jne 0x4d18
cmpl $0x0, -0x3c(%rbp)
setne %al
movb %al, -0x59(%rbp)
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x4d24
jmp 0x4e16
cmpq $-0x1, -0x10(%rbp)
jne 0x4d33
xorl %eax, %eax
movq %rax, -0x68(%rbp)
jmp 0x4d46
movq 0x23446(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $-0x1, -0x18(%rbp)
jne 0x4d5d
xorl %eax, %eax
movq %rax, -0x70(%rbp)
jmp 0x4d70
movq 0x2341c(%rip), %rax     # 0x28180
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rax
addq -0x28(%rbp), %rax
movslq -0x3c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
cmpq $0x3b9aca00, -0x38(%rbp) # imm = 0x3B9ACA00
jl 0x4db1
movq -0x38(%rbp), %rax
subq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
movq %rax, -0x38(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x1, %edx
callq 0x3780
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdx
movq 0x233ae(%rip), %rax     # 0x28180
movq 0x2335f(%rip), %rcx     # 0x28138
movq %rdx, (%rax,%rcx,8)
cmpq $-0x1, -0x10(%rbp)
je 0x4df7
movq 0x237e5(%rip), %rax     # 0x285d0
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x10(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x4e11
movq 0x237cb(%rip), %rax     # 0x285d0
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x4cf6
movl $0x3, %edi
callq 0x3950
movq -0x30(%rbp), %rsi
movq $-0x18, %rdi
movl $0x1, %edx
callq 0x3780
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)