// File: /workspace/github_c_makefile_star2_O1/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, -0x38(%rbp)
movq %rsi, -0x30(%rbp)
testq %rdi, %rdi
js 0x642e
movq 0x181e5(%rip), %rax     # 0x1e5e0
testb $0x1, (%rax,%rdi)
jne 0x6618
testq %rdi, %rdi
js 0x642e
movq 0x181cf(%rip), %rax     # 0x1e5e0
testb $0x1, (%rax,%rdi)
je 0x642e
movq 0x17d52(%rip), %rax     # 0x1e170
cmpq $-0x18, (%rax,%rdi,8)
jne 0x642e
callq 0x5b51
movq %rax, -0x38(%rbp)
testq %rbx, %rbx
js 0x647d
movq 0x181a6(%rip), %rax     # 0x1e5e0
testb $0x1, (%rax,%rbx)
je 0x647d
movq 0x17d29(%rip), %rax     # 0x1e170
cmpq $-0x18, (%rax,%rbx,8)
jne 0x647d
movq -0x38(%rbp), %rdi
movq 0x17ccf(%rip), %rsi     # 0x1e128
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17cc1(%rip)     # 0x1e128
movq %rbx, %rdi
callq 0x5b51
movq %rax, -0x30(%rbp)
movl $0x1, %edi
callq 0x3851
movq 0x17cec(%rip), %r8      # 0x1e170
movq 0x18135(%rip), %r9      # 0x1e5c0
movq -0x38(%rbp), %rdi
movq (%r9,%rdi,8), %rcx
movq (%r8,%rcx,8), %r14
testb $0x1, %r14b
je 0x64e5
movq (%r9,%rcx,8), %rax
movq (%r9,%rax,8), %rax
cmpq $0x0, (%r8,%rax,8)
jne 0x64b3
cmpq $-0x1, (%r9,%rax,8)
je 0x64e5
movq -0x30(%rbp), %rax
movq (%r9,%rax,8), %rdx
movl $0x1, %eax
testb $0x1, (%r8,%rdx,8)
je 0x67ae
movq (%r9,%rdx,8), %rdx
movq (%r9,%rdx,8), %rdx
cmpq $0x0, (%r8,%rdx,8)
jne 0x64e5
cmpq $-0x1, (%r9,%rdx,8)
je 0x67ae
movq -0x30(%rbp), %rbx
movq (%r9,%rbx,8), %rdx
movq (%r8,%rdx,8), %r11
testb $0x1, %r11b
je 0x6533
movq (%r9,%rdx,8), %rax
movq (%r9,%rax,8), %rax
cmpq $0x0, (%r8,%rax,8)
jne 0x650d
cmpq $-0x1, (%r9,%rax,8)
je 0x6533
xorl %eax, %eax
testb $0x1, %r14b
je 0x67ae
movq (%r9,%rcx,8), %rsi
movq (%r9,%rsi,8), %rsi
cmpq $0x0, (%r8,%rsi,8)
jne 0x6533
cmpq $-0x1, (%r9,%rsi,8)
je 0x67ae
movq (%r9,%rcx,8), %r10
movq (%r9,%r10,8), %r12
movq (%r8,%r12,8), %rsi
testq %rsi, %rsi
je 0x665e
movq (%r9,%rdx,8), %r11
movq (%r9,%r11,8), %r15
movq (%r8,%r15,8), %rcx
testq %rcx, %rcx
je 0x67bd
andl $0x1, %r14d
je 0x6571
testq %rsi, %rsi
jne 0x6571
cmpq $-0x1, (%r9,%r12,8)
setne %r14b
movq %rbx, -0x40(%rbp)
movabsq $0x6666666666666667, %rbx # imm = 0x6666666666666667
xorl %r13d, %r13d
testq %rsi, %rsi
je 0x65ab
movq %rsi, %rax
imulq %rbx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incl %r13d
addq $0x9, %rsi
cmpq $0x12, %rsi
movq %rdx, %rsi
ja 0x6587
cmpl $0x1, %r13d
adcl $-0x9, %r13d
movq (%r9,%r12,8), %r12
addl $0x9, %r13d
cmpq $-0x1, %r12
jne 0x65b3
xorl %esi, %esi
testq %rcx, %rcx
je 0x65eb
movq %rcx, %rax
imulq %rbx
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x2, %rdx
addq %rax, %rdx
incl %esi
addq $0x9, %rcx
cmpq $0x12, %rcx
movq %rdx, %rcx
ja 0x65c8
addl (%r8,%r10,8), %r13d
cmpl $0x1, %esi
adcl $-0x9, %esi
movq (%r9,%r15,8), %r15
addl $0x9, %esi
cmpq $-0x1, %r15
jne 0x65f5
addl (%r8,%r11,8), %esi
cmpl %esi, %r13d
jge 0x669b
xorb $0x1, %r14b
jmp 0x67aa
testq %rbx, %rbx
js 0x6405
movq 0x17b48(%rip), %rcx     # 0x1e170
cmpq $-0x18, (%rcx,%rdi,8)
jne 0x6405
testb $0x1, (%rax,%rbx)
je 0x6405
cmpq $-0x18, (%rcx,%rbx,8)
jne 0x6405
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x480d
testb $0x1, %r11b
jne 0x6548
cmpq $-0x1, (%r9,%r12,8)
jne 0x6548
movq (%r9,%rdx,8), %rax
movq (%r9,%rax,8), %rcx
movl $0x1, %eax
cmpq $0x0, (%r8,%rcx,8)
jne 0x67ae
cmpq $-0x1, (%r9,%rcx,8)
jne 0x67ae
jmp 0x6548
jg 0x67aa
movq -0x40(%rbp), %rbx
movq %rbx, 0x17a64(%rip)     # 0x1e110
movq 0x17a75(%rip), %rsi     # 0x1e128
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17a67(%rip)     # 0x1e128
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
movq %rax, 0x17a53(%rip)     # 0x1e128
movq $-0x1, 0x17a30(%rip) # 0x1e110
leaq -0x38(%rbp), %rbx
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x6062
movl $0x2, %edi
callq 0x3851
movq (%rbx), %rax
cmpq $-0x1, %rax
je 0x67aa
movq -0x30(%rbp), %rsi
cmpq $-0x1, %rsi
je 0x660f
movq 0x17ea4(%rip), %rcx     # 0x1e5c0
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rdx
movq (%rcx,%rsi,8), %rax
movq (%rcx,%rax,8), %rax
movq (%rcx,%rax,8), %rsi
xorl %edi, %edi
movl $0x0, %r8d
cmpq $-0x1, %rdx
je 0x6755
xorl %r8d, %r8d
movq %rdx, %rax
incl %r8d
movq (%rcx,%rax,8), %rax
cmpq $-0x1, %rax
jne 0x6748
cmpq $-0x1, %rsi
je 0x676c
xorl %edi, %edi
movq %rsi, %rax
incl %edi
movq (%rcx,%rax,8), %rax
cmpq $-0x1, %rax
jne 0x6760
movl $0x1, %eax
cmpl %edi, %r8d
jl 0x67ae
xorl %eax, %eax
cmpl %edi, %r8d
jg 0x67ae
cmpq $-0x1, %rdx
je 0x67ae
movq 0x179e6(%rip), %rdi     # 0x1e170
movq (%rdi,%rsi,8), %r8
cmpq %r8, (%rdi,%rdx,8)
jl 0x660f
jg 0x67aa
movq (%rcx,%rdx,8), %rdx
movq (%rcx,%rsi,8), %rsi
cmpq $-0x1, %rdx
jne 0x678a
jmp 0x67ae
movzbl %r14b, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testb $0x1, %r14b
jne 0x655d
cmpq $-0x1, (%r9,%r15,8)
jne 0x655d
xorl %eax, %eax
testq %rsi, %rsi
jne 0x67ae
cmpq $-0x1, (%r9,%r12,8)
jne 0x67ae
jmp 0x655d