// File: /workspace/github_c_makefile_star2_O2/azhai[P]mlite/mlite.c
// Function: real_less_p
int real_less_p(cell a, cell b) {
	cell	ma, mb;
	int	ka, kb, neg;
	int	dpa, dpb;

	if (integer_p(a) && integer_p(b))
		return bignum_less_p(a, b);
	if (integer_p(a))
		a = bignum_to_real(a);
	if (integer_p(b)) {
		save(a);
		b = bignum_to_real(b);
		unsave(1);
	}
	if (x_real_negative_p(a) && !x_real_negative_p(b)) return 1;
	if (x_real_negative_p(b) && !x_real_negative_p(a)) return 0;
	if (x_real_zero_p(a) && x_real_positive_p(b)) return 1;
	if (x_real_zero_p(b) && x_real_positive_p(a)) return 0;
	neg = x_real_negative_p(a);
	dpa = count_digits(x_real_mantissa(a)) + x_real_exponent(a);
	dpb = count_digits(x_real_mantissa(b)) + x_real_exponent(b);
	if (dpa < dpb) return neg? 0: 1;
	if (dpa > dpb) return neg? 1: 0;
	Tmp = b;
	save(a);
	save(b);
	Tmp = NIL;
	autoscale(&a, &b);
	unsave(2);
	if (a == NIL) return neg? 1: 0;
	if (b == NIL) return neg? 0: 1;
	ma = x_real_mantissa(a);
	mb = x_real_mantissa(b);
	ka = length(ma);
	kb = length(mb);
	if (ka < kb) return 1;
	if (ka > kb) return 0;
	while (ma != NIL) {
		if (car(ma) < car(mb)) return neg? 0: 1;
		if (car(ma) > car(mb)) return neg? 1: 0;
		ma = cdr(ma);
		mb = cdr(mb);
	}
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, -0x40(%rbp)
movq %rsi, -0x38(%rbp)
testq %rdi, %rdi
js 0x5d74
movq 0x168c9(%rip), %rax     # 0x1c5e0
testb $0x1, (%rax,%r14)
je 0x5d74
testq %rbx, %rbx
js 0x5d57
movq 0x16446(%rip), %rcx     # 0x1c170
cmpq $-0x18, (%rcx,%r14,8)
jne 0x5d57
testb $0x1, (%rax,%rbx)
je 0x5d57
cmpq $-0x18, (%rcx,%rbx,8)
jne 0x5d57
movq %r14, %rdi
movq %rbx, %rsi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x45c4
movq 0x16412(%rip), %rax     # 0x1c170
cmpq $-0x18, (%rax,%r14,8)
jne 0x5d74
movq %r14, %rdi
callq 0x5580
movq %rax, %r14
movq %rax, -0x40(%rbp)
testq %rbx, %rbx
js 0x5dc3
movq 0x16860(%rip), %rax     # 0x1c5e0
testb $0x1, (%rax,%rbx)
je 0x5dc3
movq 0x163e3(%rip), %rax     # 0x1c170
cmpq $-0x18, (%rax,%rbx,8)
jne 0x5dc3
movq 0x1638d(%rip), %rsi     # 0x1c128
movq %r14, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x1637c(%rip)     # 0x1c128
movq %rbx, %rdi
callq 0x5580
movq %rax, %rbx
movq %rax, -0x38(%rbp)
pushq $0x1
popq %rdi
callq 0x3775
pushq $0x1
popq %r10
movq 0x163a2(%rip), %r13     # 0x1c170
movq 0x167eb(%rip), %rcx     # 0x1c5c0
movq (%rcx,%r14,8), %rdx
movq (%r13,%rdx,8), %r9
testb $0x1, %r9b
je 0x5e26
movq (%rcx,%rdx,8), %rax
movq (%rcx,%rax,8), %rax
cmpq $0x0, (%r13,%rax,8)
jne 0x5dfb
cmpq $-0x1, (%rcx,%rax,8)
je 0x5e26
movq (%rcx,%rbx,8), %rax
testb $0x1, (%r13,%rax,8)
je 0x6003
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
cmpq $0x0, (%r13,%rax,8)
jne 0x5e26
cmpq $-0x1, (%rcx,%rax,8)
je 0x6003
movq (%rcx,%rbx,8), %rsi
movq (%r13,%rsi,8), %r8
testb $0x1, %r8b
je 0x5e73
movq (%rcx,%rsi,8), %rax
movq (%rcx,%rax,8), %rax
cmpq $0x0, (%r13,%rax,8)
jne 0x5e4c
cmpq $-0x1, (%rcx,%rax,8)
je 0x5e73
xorl %eax, %eax
testb $0x1, %r9b
je 0x600c
movq (%rcx,%rdx,8), %rdi
movq (%rcx,%rdi,8), %rdi
cmpq $0x0, (%r13,%rdi,8)
jne 0x5e73
cmpq $-0x1, (%rcx,%rdi,8)
je 0x600c
movq (%rcx,%rdx,8), %r11
movq (%rcx,%r11,8), %rdi
movq (%r13,%rdi,8), %rdx
testq %rdx, %rdx
je 0x5fd3
movq (%rcx,%rsi,8), %rsi
movq (%rcx,%rsi,8), %r15
cmpq $0x0, (%r13,%r15,8)
movq %r11, -0x50(%rbp)
movq %rsi, -0x48(%rbp)
jne 0x5eac
cmpq $-0x1, (%rcx,%r15,8)
je 0x601b
andl $0x1, %r9d
je 0x5ec0
testq %rdx, %rdx
jne 0x5ec0
cmpq $-0x1, (%rcx,%rdi,8)
setne %r9b
movq %r9, -0x30(%rbp)
callq 0x52d5
movq %rax, %r12
movq -0x50(%rbp), %rax
addl (%r13,%rax,8), %r12d
movq %r15, %rdi
callq 0x52d5
movq -0x48(%rbp), %rcx
addl (%r13,%rcx,8), %eax
cmpl %eax, %r12d
jge 0x5ef9
movq -0x30(%rbp), %rax
xorb $0x1, %al
movzbl %al, %eax
jmp 0x600c
jg 0x6008
movq %rbx, 0x1620a(%rip)     # 0x1c110
movq 0x1621b(%rip), %rsi     # 0x1c128
movq %r14, %rdi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x1620a(%rip)     # 0x1c128
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3613
movq %rax, 0x161f6(%rip)     # 0x1c128
orq $-0x1, 0x161d6(%rip)    # 0x1c110
leaq -0x40(%rbp), %rbx
leaq -0x38(%rbp), %rsi
movq %rbx, %rdi
callq 0x59dc
pushq $0x2
popq %rdi
callq 0x3775
movq (%rbx), %rax
cmpq $-0x1, %rax
je 0x6008
movq -0x38(%rbp), %rcx
cmpq $-0x1, %rcx
je 0x5eeb
movq 0x16650(%rip), %r12     # 0x1c5c0
movq (%r12,%rax,8), %rax
movq (%r12,%rax,8), %rax
movq (%r12,%rax,8), %rbx
movq (%r12,%rcx,8), %rax
movq (%r12,%rax,8), %rax
movq (%r12,%rax,8), %r14
movq %rbx, %rdi
callq 0x46c4
movl %eax, %r15d
movq %r14, %rdi
callq 0x46c4
movl %eax, %ecx
pushq $0x1
popq %rax
cmpl %ecx, %r15d
movq -0x30(%rbp), %rsi
jl 0x600c
xorl %eax, %eax
cmpl %ecx, %r15d
jg 0x600c
movq 0x161b9(%rip), %rcx     # 0x1c170
cmpq $-0x1, %rbx
je 0x600c
movq (%rcx,%r14,8), %rdx
cmpq %rdx, (%rcx,%rbx,8)
jl 0x6041
jg 0x6045
movq (%r12,%rbx,8), %rbx
movq (%r12,%r14,8), %r14
jmp 0x5fb7
testb $0x1, %r8b
jne 0x5e89
cmpq $-0x1, (%rcx,%rdi,8)
jne 0x5e89
movq (%rcx,%rsi,8), %rax
movq (%rcx,%rax,8), %rax
cmpq $0x0, (%r13,%rax,8)
jne 0x6003
cmpq $-0x1, (%rcx,%rax,8)
je 0x5e89
movl %r10d, %eax
jmp 0x600c
movzbl -0x30(%rbp), %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r9b
jne 0x6039
xorl %eax, %eax
testq %rdx, %rdx
jne 0x600c
xorl %eax, %eax
cmpq $-0x1, (%rcx,%rdi,8)
jne 0x600c
xorl %r9d, %r9d
jmp 0x5ec0
movb $0x1, %r9b
jmp 0x5eb2
xorb $0x1, %sil
movzbl %sil, %eax
jmp 0x600c