// File: /workspace/github_c_makefile_star2_O3/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 0x18ec5(%rip), %rax     # 0x1e170
movq 0x1930e(%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 0x4392
movq %rax, %rbx
movq 0x18e54(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18e43(%rip)     # 0x1e128
movq %r14, %rdi
callq 0x4392
movq %rax, %r14
movq 0x18e31(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18e20(%rip)     # 0x1e128
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47fe
testl %eax, %eax
je 0x5375
testq %r15, %r15
jns 0x5327
movq %rbx, %rdi
callq 0x43d9
movq %rax, %rbx
movq %rbx, 0x18de2(%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, 0x18dad(%rip) # 0x1e110
movl $0x2, %edi
callq 0x384f
movq %r14, %rdi
jmp 0x56ad
movq %r12, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5120
movq %rax, %r14
movq 0x18dde(%rip), %rax     # 0x1e170
movq 0x19227(%rip), %rcx     # 0x1e5c0
movq 0x18d88(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rcx
movq %r14, (%rax,%rcx,8)
movq 0x18d79(%rip), %rcx     # 0x1e128
movq %rbx, (%rax,%rcx,8)
movq 0x18d6e(%rip), %rsi     # 0x1e128
movq $-0x1, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18d59(%rip)     # 0x1e128
movq $-0x1, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18d41(%rip)     # 0x1e128
movq 0x191d2(%rip), %rcx     # 0x1e5c0
movq (%rcx,%r14,8), %r13
movq 0x18d77(%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 0x18d14(%rip), %rsi     # 0x1e128
movq %r13, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18d03(%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 0x18cd2(%rip), %rsi     # 0x1e128
movq %rax, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x18cc1(%rip)     # 0x1e128
movq 0x18d02(%rip), %rcx     # 0x1e170
movq 0x1914b(%rip), %rax     # 0x1e5c0
movq (%rax,%r13,8), %rdx
cmpq $0x0, (%rcx,%rdx,8)
jne 0x548b
cmpq $-0x1, (%rax,%rdx,8)
je 0x5668
cmpl $0x0, 0x19122(%rip)     # 0x1e5b4
jne 0x5668
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 0x18c9f(%rip), %rax     # 0x1e170
movq 0x190e8(%rip), %rcx     # 0x1e5c0
movq 0x18c49(%rip), %rdx     # 0x1e128
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rdx,8), %rdx
movq %r13, (%rax,%rdx,8)
movq 0x18c32(%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 0x47fe
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x5524
cmpl $0x0, 0x19096(%rip)     # 0x1e5b4
je 0x55e7
movq %r13, %r14
movq -0x48(%rbp), %rdi
movl %r15d, %esi
callq 0x4caa
movq %rax, %r15
movq 0x18c33(%rip), %rax     # 0x1e170
movq 0x18be4(%rip), %rcx     # 0x1e128
movq %r15, (%rax,%rcx,8)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4796
movq %rax, %rbx
movq 0x18c13(%rip), %rax     # 0x1e170
movq 0x1905c(%rip), %rcx     # 0x1e5c0
movq 0x18bbd(%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 0x4dca
movq 0x18be1(%rip), %rcx     # 0x1e170
movq (%rcx,%rax,8), %r13
movq 0x19026(%rip), %rax     # 0x1e5c0
movq 0x18b87(%rip), %rdx     # 0x1e128
movq (%rax,%rdx,8), %rax
movq %r13, (%rcx,%rax,8)
movq %r12, %rdi
callq 0x4dca
movq 0x18bb8(%rip), %rcx     # 0x1e170
movq (%rcx,%rax,8), %r12
movq 0x18ffd(%rip), %rax     # 0x1e5c0
movq 0x18b5e(%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), %rdx
movq %r12, (%rcx,%rdx,8)
jmp 0x5475
xorl %eax, %eax
movq %r13, %r14
movl %eax, %r15d
movq 0x18b7a(%rip), %rax     # 0x1e170
movq 0x18fc3(%rip), %rcx     # 0x1e5c0
movq 0x18b24(%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 0x472e
movq %rax, %r13
movq 0x18b4b(%rip), %rax     # 0x1e170
movq 0x18f94(%rip), %rcx     # 0x1e5c0
movq 0x18af5(%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 0x47fe
testl %eax, %eax
jne 0x5527
leal 0x1(%r15), %eax
cmpl $0x0, 0x18f53(%rip)     # 0x1e5b4
je 0x55e9
jmp 0x5527
cmpq $0x0, -0x38(%rbp)
jns 0x5681
movq %r15, %rdi
callq 0x43d9
movq %rax, %r15
movq 0x18aef(%rip), %rcx     # 0x1e170
movq -0x30(%rbp), %rdx
movq 0x18a9c(%rip), %rax     # 0x1e128
movq %r15, (%rcx,%rax,8)
testq %rdx, %rdx
jns 0x56a0
movq %rbx, %rdi
callq 0x43d9
movq %rax, %rbx
movl $0x6, %edi
callq 0x384f
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