// File: /workspace/github_c_makefile_star2_O3/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), %r14
movq 0x28(%rdi), %r12
movq %r14, %rdi
callq 0xed77
movl %eax, %r15d
movq %r12, %rdi
callq 0xed77
testq %r14, %r14
setne %cl
testq %r12, %r12
setne %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0xfd05
cmpb $0x4, (%r14)
jne 0xfc2d
cmpb $0x4, (%r12)
jne 0xfc2d
movl 0x4(%rbx), %edx
movb $0x1, (%rbx)
movq 0x20(%r14), %rcx
movq 0x20(%r12), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x10(%rsp)
movq %rax, 0x8(%rsp)
leal -0x108(%rdx), %esi
cmpl $0x3, %esi
ja 0xfd0f
leaq 0x3056e(%rip), %rdx     # 0x40184
movslq (%rdx,%rsi,4), %rsi
addq %rdx, %rsi
jmpq *%rsi
movl 0x50(%rcx), %ecx
cmpl 0x50(%rax), %ecx
setle %al
jmp 0xfdc5
movq 0x20(%rbx), %rdx
movq 0x28(%rbx), %rsi
movzbl (%rdx), %ecx
cmpl $0x1c, %ecx
je 0xfcce
cmpl $0x1, %ecx
jne 0xfd05
cmpb $0x1, (%rsi)
jne 0xfd05
movq 0x10(%r14), %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 0xfd3e
orq %rax, %rcx
orq %rdi, %r8
leal -0x108(%r9), %r10d
cmpl $0x3, %r10d
ja 0xfdce
leaq 0x304ab(%rip), %r9      # 0x40164
movslq (%r9,%r10,4), %r10
addq %r9, %r10
jmpq *%r10
cmpq %r8, %rcx
setle %al
jmp 0xfe64
cmpb $0x1c, (%rsi)
jne 0xfd05
fldt 0x20(%rdx)
fldt 0x20(%rsi)
movl 0x4(%rbx), %eax
leal -0x108(%rax), %ecx
cmpl $0x3, %ecx
ja 0xfd27
leaq 0x30466(%rip), %rax     # 0x40154
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setae %al
jmp 0xfe13
addl %r15d, %eax
incl %eax
jmp 0xfe79
cmpl $0x3c, %edx
je 0xfd6b
cmpl $0x3e, %edx
jne 0xfd97
movl 0x50(%rcx), %ecx
cmpl 0x50(%rax), %ecx
setg %al
jmp 0xfdc5
cmpl $0x3e, %eax
je 0xfdea
cmpl $0x3c, %eax
je 0xfdec
jmp 0xfe1e
addl $0xfffffee7, %r9d       # imm = 0xFFFFFEE7
cmpl $0x3, %r9d
ja 0xfe6b
leaq 0x3041e(%rip), %rcx     # 0x40174
movslq (%rcx,%r9,4), %r8
addq %rcx, %r8
jmpq *%r8
cmpq %rdi, %rax
setb %al
jmp 0xfe64
movl 0x50(%rcx), %ecx
cmpl 0x50(%rax), %ecx
setl %al
jmp 0xfdc5
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0xe00, %edx            # imm = 0xE00
movl $0xe00, %ecx            # imm = 0xE00
callq 0x31898
testq %rax, %rax
sete %al
jmp 0xfdc5
xorl %eax, %eax
jmp 0xfdc5
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0xe00, %edx            # imm = 0xE00
movl $0xe00, %ecx            # imm = 0xE00
callq 0x31898
testq %rax, %rax
setne %al
jmp 0xfdc5
movl 0x50(%rcx), %ecx
cmpl 0x50(%rax), %ecx
setge %al
movzbl %al, %eax
movq %rax, 0x20(%rbx)
jmp 0xfe25
cmpl $0x3c, %r9d
je 0xfe5e
cmpl $0x3e, %r9d
jne 0xfe6b
cmpq %r8, %rcx
setg %al
jmp 0xfe64
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
seta %al
jmp 0xfe13
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
setnp %cl
sete %al
andb %cl, %al
jmp 0xfe13
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 0xfe77
cmpq %rdi, %rax
setbe %al
jmp 0xfe64
cmpq %rdi, %rax
sete %al
jmp 0xfe64
cmpq %rdi, %rax
setae %al
jmp 0xfe64
cmpq %rdi, %rax
seta %al
jmp 0xfe64
cmpq %rdi, %rax
setne %al
jmp 0xfe64
cmpq %r8, %rcx
setge %al
jmp 0xfe64
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