// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: real_divide
cell real_divide(cell x, cell a, cell b) {
	cell	r, m, e, ma, mb, ea, eb, neg;
	int	nd, dd;

	if (integer_p(a))
		a = bignum_to_real(a);
	if (x_real_zero_p(a)) {
		r = make_integer(0);
		return make_real(0, 0, cdr(r));
	}
	save(a);
	if (integer_p(b))
		b = bignum_to_real(b);
	save(b);
	neg = x_real_negative_flag(a) != x_real_negative_flag(b);
	ea = x_real_exponent(a);
	eb = x_real_exponent(b);
	ma = new_atom(T_INTEGER, x_real_mantissa(a));
	cadr(Stack) = ma;
	mb = new_atom(T_INTEGER, x_real_mantissa(b));
	car(Stack) = mb;
	if (x_bignum_zero_p(mb)) {
		unsave(2);
		return NAN;
	}
	nd = count_digits(cdr(ma));
	dd = MANTISSA_SIZE + count_digits(cdr(mb));
	while (nd < dd) {
		ma = bignum_shift_left(ma, 0);
		cadr(Stack) = ma;
		nd++;
		ea--;
	}
	e = ea - eb;
	m = bignum_divide(NOEXPR, ma, mb);
	unsave(2);
	r = make_real(neg? REAL_NEGATIVE: 0, e, cdar(m));
	return real_normalize(r, "/");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jl 0x8d61
movq 0x1f8be(%rip), %rax     # 0x285f0
movq -0x18(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8d61
movq 0x1f437(%rip), %rax     # 0x28180
movq -0x18(%rbp), %rcx
cmpq $-0x18, (%rax,%rcx,8)
jne 0x8d61
movq -0x18(%rbp), %rdi
callq 0x6870
movq %rax, -0x18(%rbp)
movq 0x1f418(%rip), %rax     # 0x28180
movq 0x1f861(%rip), %rcx     # 0x285d0
movq 0x1f85a(%rip), %rdx     # 0x285d0
movq 0x1f853(%rip), %rsi     # 0x285d0
movq -0x18(%rbp), %rdi
movq (%rsi,%rdi,8), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x8df7
movq 0x1f835(%rip), %rax     # 0x285d0
movq 0x1f82e(%rip), %rcx     # 0x285d0
movq 0x1f827(%rip), %rdx     # 0x285d0
movq 0x1f820(%rip), %rsi     # 0x285d0
movq -0x18(%rbp), %rdi
movq (%rsi,%rdi,8), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x8df7
xorl %eax, %eax
movl %eax, %edi
callq 0x3740
movq %rax, -0x28(%rbp)
movq 0x1f7f5(%rip), %rax     # 0x285d0
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdx
xorl %edi, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x6350
movq %rax, -0x8(%rbp)
jmp 0x90fd
movq -0x18(%rbp), %rdi
movq 0x1f336(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x1f328(%rip)     # 0x28138
cmpq $0x0, -0x20(%rbp)
jl 0x8e4d
movq 0x1f7d2(%rip), %rax     # 0x285f0
movq -0x20(%rbp), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x8e4d
movq 0x1f34b(%rip), %rax     # 0x28180
movq -0x20(%rbp), %rcx
cmpq $-0x18, (%rax,%rcx,8)
jne 0x8e4d
movq -0x20(%rbp), %rdi
callq 0x6870
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq 0x1f2e0(%rip), %rsi     # 0x28138
xorl %edx, %edx
callq 0x3780
movq %rax, 0x1f2d2(%rip)     # 0x28138
movq 0x1f313(%rip), %rax     # 0x28180
movq 0x1f75c(%rip), %rcx     # 0x285d0
movq -0x18(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
andq $0x1, %rax
movq 0x1f2f5(%rip), %rcx     # 0x28180
movq 0x1f73e(%rip), %rdx     # 0x285d0
movq -0x20(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
andq $0x1, %rcx
cmpq %rcx, %rax
setne %al
andb $0x1, %al
movzbl %al, %eax
cltq
movq %rax, -0x60(%rbp)
movq 0x1f2c6(%rip), %rax     # 0x28180
movq 0x1f70f(%rip), %rcx     # 0x285d0
movq 0x1f708(%rip), %rdx     # 0x285d0
movq -0x18(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
movq 0x1f29d(%rip), %rax     # 0x28180
movq 0x1f6e6(%rip), %rcx     # 0x285d0
movq 0x1f6df(%rip), %rdx     # 0x285d0
movq -0x20(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
movq 0x1f6c4(%rip), %rax     # 0x285d0
movq 0x1f6bd(%rip), %rcx     # 0x285d0
movq 0x1f6b6(%rip), %rdx     # 0x285d0
movq -0x18(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
movq $-0x18, %rdi
movl $0x1, %edx
callq 0x3780
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq 0x1f236(%rip), %rax     # 0x28180
movq 0x1f67f(%rip), %rcx     # 0x285d0
movq 0x1f1e0(%rip), %rsi     # 0x28138
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x1f669(%rip), %rax     # 0x285d0
movq 0x1f662(%rip), %rcx     # 0x285d0
movq 0x1f65b(%rip), %rdx     # 0x285d0
movq -0x20(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
movq $-0x18, %rdi
movl $0x1, %edx
callq 0x3780
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rdx
movq 0x1f1db(%rip), %rax     # 0x28180
movq 0x1f18c(%rip), %rcx     # 0x28138
movq %rdx, (%rax,%rcx,8)
movq 0x1f1c9(%rip), %rax     # 0x28180
movq 0x1f612(%rip), %rcx     # 0x285d0
movq -0x48(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0x9001
movq 0x1f5fc(%rip), %rax     # 0x285d0
movq 0x1f5f5(%rip), %rcx     # 0x285d0
movq -0x48(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x9001
movl $0x2, %edi
callq 0x3950
movq $-0x7, -0x8(%rbp)
jmp 0x90fd
movq 0x1f5c8(%rip), %rax     # 0x285d0
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x63b0
movl %eax, -0x64(%rbp)
movq 0x1f5b1(%rip), %rax     # 0x285d0
movq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x63b0
addq $0x24, %rax
movl %eax, -0x68(%rbp)
movl -0x64(%rbp), %eax
cmpl -0x68(%rbp), %eax
jge 0x9082
movq -0x40(%rbp), %rdi
xorl %esi, %esi
callq 0x55d0
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdx
movq 0x1f12b(%rip), %rax     # 0x28180
movq 0x1f574(%rip), %rcx     # 0x285d0
movq 0x1f0d5(%rip), %rsi     # 0x28138
movq (%rcx,%rsi,8), %rcx
movq %rdx, (%rax,%rcx,8)
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
movq -0x50(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x50(%rbp)
jmp 0x9033
movq -0x50(%rbp), %rax
subq -0x58(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movq $-0x8, %rdi
callq 0x6270
movq %rax, -0x30(%rbp)
movl $0x2, %edi
callq 0x3950
movq -0x60(%rbp), %rcx
xorl %edi, %edi
movl $0x1, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edi
movq -0x38(%rbp), %rsi
movq 0x1f503(%rip), %rax     # 0x285d0
movq 0x1f0ac(%rip), %rcx     # 0x28180
movq -0x30(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x6350
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
leaq 0x17192(%rip), %rsi     # 0x20286
callq 0x6460
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x70, %rsp
popq %rbp
retq
nopw (%rax,%rax)