// File: /workspace/github_c_makefile_star2_O1/azhai[P]mlite/mlite.c
// Function: x_bignum_divide
cell x_bignum_divide(cell a, cell b) {
	int	neg, neg_a;
	cell	result, f;
	int	i;
	cell	c, c0;

	neg_a = x_bignum_negative_p(a);
	neg = neg_a != x_bignum_negative_p(b);
	a = bignum_abs(a);
	save(a);
	b = bignum_abs(b);
	save(b);
	if (bignum_less_p(a, b)) {
		if (neg_a)
			a = bignum_negate(a);
		Tmp = a;
		f = make_integer(0);
		Tmp = NIL;
		unsave(2);
		return node(f, a);
	}
	b = bignum_equalize(b, a);
	cadr(Stack) = b; /* cadr+cddddr */
	car(Stack) = a;	/* car+cddddr */
	c = NIL;
	save(c);	/* cadddr */
	c0 = NIL;
	save(c0);	/* caddr */
	f = cdr(b);
	b = car(b);
	cadddr(Stack) = b;
	save(f);	/* cadr */
	result = make_integer(0);
	save(result);	/* car */
	while (!x_bignum_zero_p(f)) {
		if (Error_flag)
			break;
		c = make_integer(0);
		cadddr(Stack) = c;
		caddr(Stack) = c0 = c;
		i = 0;
		while (!bignum_less_p(a, c)) {
			if (Error_flag)
				break;
			caddr(Stack) = c0 = c;
			c = bignum_add(c, b);
			cadddr(Stack) = c;
			i++;
		}
		result = bignum_shift_left(result, i-1);
		car(Stack) = result;
		a = bignum_subtract(a, c0);
		car(cddddr(Stack)) = a;
		f = bignum_shift_right(f);
		f = car(f);
		cadr(Stack) = f;
		b = bignum_shift_right(b);
		b = car(b);
		cadr(cddddr(Stack)) = b;
	}
	if (neg)
		result = bignum_negate(result);
	car(Stack) = result;
	if (neg_a)
		a = bignum_negate(a);
	unsave(6);
	return node(result, a);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq 0x18eb5(%rip), %rax     # 0x1e170
movq 0x192fe(%rip), %rcx     # 0x1e5c0
movq (%rcx,%rdi,8), %rdx
movq (%rax,%rdx,8), %r15
movq (%rcx,%rsi,8), %rcx
movq (%rax,%rcx,8), %r12
xorq %r15, %r12
callq 0x43a4
movq %rax, %rbx
movq 0x18e44(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18e33(%rip)     # 0x1e128
movq %r14, %rdi
callq 0x43a4
movq %rax, %r14
movq 0x18e21(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18e10(%rip)     # 0x1e128
movq %rbx, %rdi
movq %r14, %rsi
callq 0x480d
testl %eax, %eax
je 0x5385
testq %r15, %r15
jns 0x5337
movq %rbx, %rdi
callq 0x43eb
movq %rax, %rbx
movq %rbx, 0x18dd2(%rip)     # 0x1e110
xorl %edi, %edi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x36e8
movq $-0x18, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x36e8
movq %rax, %r14
movq $-0x1, 0x18d9d(%rip) # 0x1e110
movl $0x2, %edi
callq 0x3851
movq %r14, %rdi
jmp 0x56bd
movq %r12, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5130
movq %rax, %r14
movq 0x18dce(%rip), %rax     # 0x1e170
movq 0x19217(%rip), %rcx     # 0x1e5c0
movq 0x18d78(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rcx
movq %r14, (%rax,%rcx,8)
movq 0x18d69(%rip), %rcx     # 0x1e128
movq %rbx, (%rax,%rcx,8)
movq 0x18d5e(%rip), %rsi     # 0x1e128
movq $-0x1, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18d49(%rip)     # 0x1e128
movq $-0x1, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18d31(%rip)     # 0x1e128
movq 0x191c2(%rip), %rcx     # 0x1e5c0
movq (%rcx,%r14,8), %r13
movq 0x18d67(%rip), %rdx     # 0x1e170
movq (%rdx,%r14,8), %r12
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
movq %r12, (%rdx,%rax,8)
movq 0x18d04(%rip), %rsi     # 0x1e128
movq %r13, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18cf3(%rip)     # 0x1e128
xorl %edi, %edi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x36e8
movq $-0x18, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x36e8
movq %rax, %r15
movq 0x18cc2(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18cb1(%rip)     # 0x1e128
movq 0x18cf2(%rip), %rdx     # 0x1e170
movq 0x1913b(%rip), %rax     # 0x1e5c0
movq (%rax,%r13,8), %rcx
cmpq $0x0, (%rdx,%rcx,8)
jne 0x549b
cmpq $-0x1, (%rax,%rcx,8)
je 0x5678
cmpl $0x0, 0x19112(%rip)     # 0x1e5b4
jne 0x5678
movq %r13, -0x40(%rbp)
movq %r15, -0x48(%rbp)
xorl %edi, %edi
movq $-0x1, %rsi
movl $0x1, %edx
callq 0x36e8
movq $-0x18, %rdi
movq %rax, %rsi
movl $0x1, %edx
callq 0x36e8
movq %rax, %r13
movq 0x18c8f(%rip), %rax     # 0x1e170
movq 0x190d8(%rip), %rcx     # 0x1e5c0
movq 0x18c39(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq %r13, (%rax,%rdx,8)
movq 0x18c22(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq %r13, (%rax,%rcx,8)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x480d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5534
cmpl $0x0, 0x19086(%rip)     # 0x1e5b4
je 0x55f7
movq %r13, %r14
movq -0x48(%rbp), %rdi
movl %r15d, %esi
callq 0x4cb6
movq %rax, %r15
movq 0x18c23(%rip), %rax     # 0x1e170
movq 0x18bd4(%rip), %rcx     # 0x1e128
movq %r15, (%rax,%rcx,8)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47a5
movq %rax, %rbx
movq 0x18c03(%rip), %rax     # 0x1e170
movq 0x1904c(%rip), %rcx     # 0x1e5c0
movq 0x18bad(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq %rbx, (%rax,%rcx,8)
movq -0x40(%rbp), %rdi
callq 0x4dd6
movq 0x18bd1(%rip), %rcx     # 0x1e170
movq (%rcx,%rax,8), %r13
movq 0x19016(%rip), %rax     # 0x1e5c0
movq 0x18b77(%rip), %rdx     # 0x1e128
movq (%rax,%rdx,8), %rax
movq %r13, (%rcx,%rax,8)
movq %r12, %rdi
callq 0x4dd6
movq 0x18ba8(%rip), %rcx     # 0x1e170
movq (%rcx,%rax,8), %r12
movq 0x18fed(%rip), %rax     # 0x1e5c0
movq 0x18b4e(%rip), %rdx     # 0x1e128
movq (%rax,%rdx,8), %rdx
movq (%rax,%rdx,8), %rdx
movq (%rax,%rdx,8), %rdx
movq (%rax,%rdx,8), %rdx
movq (%rax,%rdx,8), %rax
movq %r12, (%rcx,%rax,8)
jmp 0x5477
xorl %eax, %eax
movq %r13, %r14
movl %eax, %r15d
movq 0x18b6a(%rip), %rax     # 0x1e170
movq 0x18fb3(%rip), %rcx     # 0x1e5c0
movq 0x18b14(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq %r13, (%rax,%rcx,8)
movq %r13, %rdi
movq %r12, %rsi
callq 0x473d
movq %rax, %r13
movq 0x18b3b(%rip), %rax     # 0x1e170
movq 0x18f84(%rip), %rcx     # 0x1e5c0
movq 0x18ae5(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq %r13, (%rax,%rcx,8)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x480d
testl %eax, %eax
jne 0x5537
leal 0x1(%r15), %eax
cmpl $0x0, 0x18f43(%rip)     # 0x1e5b4
je 0x55f9
jmp 0x5537
cmpq $0x0, -0x38(%rbp)
jns 0x568a
movq %r15, %rdi
callq 0x43eb
movq %rax, %r15
movq -0x30(%rbp), %rdx
movq 0x18adb(%rip), %rax     # 0x1e170
movq 0x18a8c(%rip), %rcx     # 0x1e128
movq %r15, (%rax,%rcx,8)
testq %rdx, %rdx
jns 0x56b0
movq %rbx, %rdi
callq 0x43eb
movq %rax, %rbx
movl $0x6, %edi
callq 0x3851
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x36e8