// File: /workspace/github_c_makefile_star2_O1/lucvoo[P]sparse-dev/expand.c
// Function: expand_compare
static int expand_compare(struct expression *expr)
{
	struct expression *left = expr->left, *right = expr->right;
	int cost;

	cost = expand_expression(left);
	cost += expand_expression(right);

	if (left && right) {
		/* Type comparison? */
		if (left->type == EXPR_TYPE && right->type == EXPR_TYPE) {
			int op = expr->op;
			expr->type = EXPR_VALUE;
			expr->value = compare_types(op, left->symbol, right->symbol);
			expr->taint = 0;
			return 0;
		}
		if (simplify_cmp_binop(expr, left->ctype))
			return 0;
		if (simplify_float_cmp(expr, left->ctype))
			return 0;
	}
	return cost + 1;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
movq 0x20(%rdi), %r15
movq 0x28(%rdi), %r12
movq %r15, %rdi
callq 0xed5f
movl %eax, %r14d
movq %r12, %rdi
callq 0xed5f
testq %r15, %r15
setne %cl
testq %r12, %r12
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xfbbf
cmpb $0x4, (%r15)
jne 0xfaea
cmpb $0x4, (%r12)
jne 0xfaea
movl 0x4(%rbx), %esi
movb $0x1, (%rbx)
movq 0x20(%r15), %rdx
movq 0x20(%r12), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
xorl %ecx, %ecx
movq %rcx, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movq %rdx, 0x30(%rsp)
movaps %xmm0, (%rsp)
movq %rcx, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movq %rax, (%rsp)
leal -0x108(%rsi), %edi
cmpl $0x3, %edi
ja 0xfbc9
leaq 0x316b1(%rip), %rcx     # 0x41184
movslq (%rcx,%rdi,4), %rsi
addq %rcx, %rsi
jmpq *%rsi
movl 0x50(%rdx), %ecx
cmpl 0x50(%rax), %ecx
setle %cl
jmp 0xfc9a
movq 0x20(%rbx), %rdx
cmpb $0x1, (%rdx)
jne 0xfb7b
movq 0x28(%rbx), %rsi
cmpb $0x1, (%rsi)
jne 0xfb7b
movq 0x10(%r15), %rcx
movq 0x20(%rdx), %rax
movq 0x20(%rsi), %rdi
movb 0x50(%rcx), %cl
decb %cl
movl $0x1, %r8d
shlq %cl, %r8
movzbl %cl, %r9d
negq %r8
xorl %r10d, %r10d
btq %r9, %rax
movq %r8, %rcx
cmovaeq %r10, %rcx
btq %r9, %rdi
cmovaeq %r10, %r8
movl 0x4(%rbx), %r9d
cmpl $0x118, %r9d            # imm = 0x118
jg 0xfbe5
orq %rax, %rcx
orq %rdi, %r8
leal -0x108(%r9), %r10d
cmpl $0x3, %r10d
ja 0xfc29
leaq 0x315fe(%rip), %r9      # 0x41164
movslq (%r9,%r10,4), %r10
addq %r9, %r10
jmpq *%r10
cmpq %r8, %rcx
setle %al
jmp 0xfd1d
movq 0x20(%rbx), %rcx
cmpb $0x1c, (%rcx)
jne 0xfbbf
movq 0x28(%rbx), %rdx
cmpb $0x1c, (%rdx)
jne 0xfbbf
fldt 0x20(%rcx)
fldt 0x20(%rdx)
movl 0x4(%rbx), %eax
leal -0x108(%rax), %ecx
cmpl $0x3, %ecx
ja 0xfc12
leaq 0x315ac(%rip), %rax     # 0x41154
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setae %al
jmp 0xfccc
addl %r14d, %eax
incl %eax
jmp 0xfd32
cmpl $0x3c, %esi
je 0xfc48
cmpl $0x3e, %esi
jne 0xfc9a
movl 0x50(%rdx), %ecx
cmpl 0x50(%rax), %ecx
setg %cl
jmp 0xfc9a
addl $0xfffffee7, %r9d       # imm = 0xFFFFFEE7
cmpl $0x3, %r9d
ja 0xfd24
leaq 0x31577(%rip), %rcx     # 0x41174
movslq (%rcx,%r9,4), %r8
addq %rcx, %r8
jmpq *%r8
cmpq %rdi, %rax
setb %al
jmp 0xfd1d
cmpl $0x3e, %eax
je 0xfca3
cmpl $0x3c, %eax
je 0xfca5
jmp 0xfcd7
cmpl $0x3c, %r9d
je 0xfd17
cmpl $0x3e, %r9d
jne 0xfd24
cmpq %r8, %rcx
setg %al
jmp 0xfd1d
movl 0x50(%rdx), %ecx
cmpl 0x50(%rax), %ecx
setl %cl
jmp 0xfc9a
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
movl $0xe00, %edx            # imm = 0xE00
movl $0xe00, %ecx            # imm = 0xE00
callq 0x32020
testq %rax, %rax
sete %cl
jmp 0xfc9a
leaq 0x30(%rsp), %rdi
movq %rsp, %rsi
movl $0xe00, %edx            # imm = 0xE00
movl $0xe00, %ecx            # imm = 0xE00
callq 0x32020
testq %rax, %rax
setne %cl
jmp 0xfc9a
movl 0x50(%rdx), %ecx
cmpl 0x50(%rax), %ecx
setge %cl
movzbl %cl, %eax
movq %rax, 0x20(%rbx)
jmp 0xfcde
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
seta %al
jmp 0xfccc
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setnp %cl
sete %al
andb %cl, %al
jmp 0xfccc
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setp %cl
setne %al
orb %cl, %al
movzbl %al, %eax
movq %rax, 0x20(%rbx)
fldz
fldz
fstp %st(1)
fstp %st(0)
movb $0x1, (%rbx)
movl $0x0, 0x28(%rbx)
jmp 0xfd30
cmpq %rdi, %rax
setbe %al
jmp 0xfd1d
cmpq %rdi, %rax
sete %al
jmp 0xfd1d
cmpq %rdi, %rax
setae %al
jmp 0xfd1d
cmpq %rdi, %rax
seta %al
jmp 0xfd1d
cmpq %rdi, %rax
setne %al
jmp 0xfd1d
cmpq %r8, %rcx
setge %al
jmp 0xfd1d
cmpq %r8, %rcx
setl %al
movzbl %al, %eax
movq %rax, 0x20(%rbx)
movb $0x1, (%rbx)
movl 0x28(%rsi), %eax
orl 0x28(%rdx), %eax
movl %eax, 0x28(%rbx)
xorl %eax, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq