// File: /workspace/github_c_makefile_star2_O3/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 $0x18, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rdi, %rdi
js 0x6413
movq 0x1822a(%rip), %rax     # 0x1e5e0
testb $0x1, (%rax,%r14)
je 0x6413
testq %rbx, %rbx
js 0x63f6
movq 0x17da7(%rip), %rcx     # 0x1e170
cmpq $-0x18, (%rcx,%r14,8)
jne 0x63f6
testb $0x1, (%rax,%rbx)
je 0x63f6
cmpq $-0x18, (%rcx,%rbx,8)
jne 0x63f6
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x47fe
movq 0x17d73(%rip), %rax     # 0x1e170
cmpq $-0x18, (%rax,%r14,8)
jne 0x6413
movq %r14, %rdi
callq 0x5b40
movq %rax, %r14
movq %rax, -0x38(%rbp)
testq %rbx, %rbx
js 0x6464
movq 0x181c1(%rip), %rax     # 0x1e5e0
testb $0x1, (%rax,%rbx)
je 0x6464
movq 0x17d44(%rip), %rax     # 0x1e170
cmpq $-0x18, (%rax,%rbx,8)
jne 0x6464
movq 0x17cee(%rip), %rsi     # 0x1e128
movq %r14, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17cdd(%rip)     # 0x1e128
movq %rbx, %rdi
callq 0x5b40
movq %rax, %rbx
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x384f
movq 0x17d05(%rip), %r8      # 0x1e170
movq 0x1814e(%rip), %r9      # 0x1e5c0
movq (%r9,%r14,8), %rax
movq (%r8,%rax,8), %r15
testb $0x1, %r15b
je 0x64c4
movq (%r9,%rax,8), %rcx
movq (%r9,%rcx,8), %rcx
cmpq $0x0, (%r8,%rcx,8)
jne 0x6496
cmpq $-0x1, (%r9,%rcx,8)
je 0x64c4
movq (%r9,%rbx,8), %rdx
movl $0x1, %ecx
testb $0x1, (%r8,%rdx,8)
je 0x6744
movq (%r9,%rdx,8), %rdx
movq (%r9,%rdx,8), %rdx
cmpq $0x0, (%r8,%rdx,8)
jne 0x64c4
cmpq $-0x1, (%r9,%rdx,8)
je 0x6744
movq (%r9,%rbx,8), %rdx
movq (%r8,%rdx,8), %rsi
testb $0x1, %sil
je 0x650e
movq (%r9,%rdx,8), %rcx
movq (%r9,%rcx,8), %rcx
cmpq $0x0, (%r8,%rcx,8)
jne 0x64e8
cmpq $-0x1, (%r9,%rcx,8)
je 0x650e
xorl %ecx, %ecx
testb $0x1, %r15b
je 0x6744
movq (%r9,%rax,8), %rdi
movq (%r9,%rdi,8), %rdi
cmpq $0x0, (%r8,%rdi,8)
jne 0x650e
cmpq $-0x1, (%r9,%rdi,8)
je 0x6744
movq (%r9,%rax,8), %r10
movq (%r9,%r10,8), %r13
movq (%r8,%r13,8), %rdi
testq %rdi, %rdi
je 0x6551
movq (%r9,%rdx,8), %r11
movq (%r9,%r11,8), %r12
movq (%r8,%r12,8), %rsi
testq %rsi, %rsi
jne 0x653b
cmpq $-0x1, (%r9,%r12,8)
je 0x6755
testb $0x1, %r15b
je 0x6583
testq %rdi, %rdi
jne 0x6583
cmpq $-0x1, (%r9,%r13,8)
setne %r15b
jmp 0x65c5
testb $0x1, %sil
jne 0x651f
cmpq $-0x1, (%r9,%r13,8)
jne 0x651f
movq (%r9,%rdx,8), %rax
movq (%r9,%rax,8), %rax
movl $0x1, %ecx
cmpq $0x0, (%r8,%rax,8)
jne 0x6744
cmpq $-0x1, (%r9,%rax,8)
jne 0x6744
jmp 0x651f
andb $0x1, %r15b
testq %rdi, %rdi
je 0x65c5
movq %r11, -0x40(%rbp)
xorl %ecx, %ecx
movabsq $0x6666666666666667, %r11 # imm = 0x6666666666666667
movq %rdi, %rax
imulq %r11
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incl %ecx
addq $0x9, %rdi
cmpq $0x12, %rdi
movq %rdx, %rdi
ja 0x659c
movq -0x40(%rbp), %r11
jmp 0x65c7
xorl %ecx, %ecx
cmpl $0x1, %ecx
adcl $-0x9, %ecx
movq (%r9,%r13,8), %r13
addl $0x9, %ecx
cmpq $-0x1, %r13
jne 0x65cd
xorl %edi, %edi
testq %rsi, %rsi
je 0x660e
movabsq $0x6666666666666667, %r13 # imm = 0x6666666666666667
movq %rsi, %rax
imulq %r13
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incl %edi
addq $0x9, %rsi
cmpq $0x12, %rsi
movq %rdx, %rsi
ja 0x65eb
addl (%r8,%r10,8), %ecx
cmpl $0x1, %edi
adcl $-0x9, %edi
movq (%r9,%r12,8), %r12
addl $0x9, %edi
cmpq $-0x1, %r12
jne 0x6618
addl (%r8,%r11,8), %edi
cmpl %edi, %ecx
jge 0x6636
xorb $0x1, %r15b
jmp 0x6740
jg 0x6740
movq %rbx, 0x17acd(%rip)     # 0x1e110
movq 0x17ade(%rip), %rsi     # 0x1e128
movq %r14, %rdi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17acd(%rip)     # 0x1e128
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17ab9(%rip)     # 0x1e128
movq $-0x1, 0x17a96(%rip) # 0x1e110
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x6046
movl $0x2, %edi
callq 0x384f
movq (%rbx), %rcx
cmpq $-0x1, %rcx
je 0x6740
movq -0x30(%rbp), %rsi
cmpq $-0x1, %rsi
je 0x662d
movq 0x17f0e(%rip), %rax     # 0x1e5c0
movq (%rax,%rcx,8), %rcx
movq (%rax,%rcx,8), %rcx
movq (%rax,%rcx,8), %rdx
movq (%rax,%rsi,8), %rcx
movq (%rax,%rcx,8), %rcx
movq (%rax,%rcx,8), %rsi
xorl %edi, %edi
movl $0x0, %r8d
cmpq $-0x1, %rdx
je 0x66eb
xorl %r8d, %r8d
movq %rdx, %rcx
incl %r8d
movq (%rax,%rcx,8), %rcx
cmpq $-0x1, %rcx
jne 0x66de
cmpq $-0x1, %rsi
je 0x6702
xorl %edi, %edi
movq %rsi, %rcx
incl %edi
movq (%rax,%rcx,8), %rcx
cmpq $-0x1, %rcx
jne 0x66f6
movl $0x1, %ecx
cmpl %edi, %r8d
jl 0x6744
xorl %ecx, %ecx
cmpl %edi, %r8d
jg 0x6744
cmpq $-0x1, %rdx
je 0x6744
movq 0x17a50(%rip), %rdi     # 0x1e170
movq (%rdi,%rsi,8), %r8
cmpq %r8, (%rdi,%rdx,8)
jl 0x662d
jg 0x6740
movq (%rax,%rdx,8), %rdx
movq (%rax,%rsi,8), %rsi
cmpq $-0x1, %rdx
jne 0x6720
jmp 0x6744
movzbl %r15b, %ecx
movl %ecx, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r15b
jne 0x6773
xorl %ecx, %ecx
testq %rdi, %rdi
jne 0x6744
xorl %ecx, %ecx
cmpq $-0x1, (%r9,%r13,8)
jne 0x6744
xorl %r15d, %r15d
jmp 0x65c7
movb $0x1, %r15b
testq %rdi, %rdi
jne 0x658c
jmp 0x6546