// File: /workspace/github_c_makefile_star2_O0/lucvoo[P]sparse-dev/expand.c
// Function: simplify_float_binop
static int simplify_float_binop(struct expression *expr)
{
	struct expression *left = expr->left, *right = expr->right;
	int rank = expr->ctype->rank;
	long double l, r, res;

	if (left->type != EXPR_FVALUE || right->type != EXPR_FVALUE)
		return 0;

	l = left->fvalue;
	r = right->fvalue;

	if (rank > 0) {
		switch (expr->op) {
		case '+':	res = l + r; break;
		case '-':	res = l - r; break;
		case '*':	res = l * r; break;
		case '/':	if (!r) goto Div;
				res = l / r; break;
		default: return 0;
		}
	} else if (rank == 0) {
		switch (expr->op) {
		case '+':	res = (double) l + (double) r; break;
		case '-':	res = (double) l - (double) r; break;
		case '*':	res = (double) l * (double) r; break;
		case '/':	if (!r) goto Div;
				res = (double) l / (double) r; break;
		default: return 0;
		}
	} else {
		switch (expr->op) {
		case '+':	res = (float)l + (float)r; break;
		case '-':	res = (float)l - (float)r; break;
		case '*':	res = (float)l * (float)r; break;
		case '/':	if (!r) goto Div;
				res = (float)l / (float)r; break;
		default: return 0;
		}
	}
	expr->type = EXPR_FVALUE;
	expr->fvalue = res;
	return 1;
Div:
	if (!conservative)
		warning(expr->pos, "division by zero");
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl 0x54(%rax), %eax
shll $0x6, %eax
sarl $0x1d, %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1c, %eax
jne 0x1352b
movq -0x20(%rbp), %rax
movl (%rax), %eax
andl $0xff, %eax
cmpl $0x1c, %eax
je 0x13537
movl $0x0, -0x4(%rbp)
jmp 0x13877
movq -0x18(%rbp), %rax
fldt 0x20(%rax)
fstpt -0x40(%rbp)
movq -0x20(%rbp), %rax
fldt 0x20(%rax)
fstpt -0x50(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x135df
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x2a, %eax
movl %eax, %ecx
movq %rcx, -0xf8(%rbp)
subl $0x5, %eax
ja 0x135ce
movq -0xf8(%rbp), %rax
leaq 0x4eb6d(%rip), %rcx     # 0x620e8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
fldt -0x40(%rbp)
fldt -0x50(%rbp)
faddp %st, %st(1)
fstpt -0x60(%rbp)
jmp 0x135da
fldt -0x40(%rbp)
fldt -0x50(%rbp)
fsubrp %st, %st(1)
fstpt -0x60(%rbp)
jmp 0x135da
fldt -0x40(%rbp)
fldt -0x50(%rbp)
fmulp %st, %st(1)
fstpt -0x60(%rbp)
jmp 0x135da
fldt -0x50(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x135c1
jp 0x135c1
jmp 0x135bc
jmp 0x13851
fldt -0x40(%rbp)
fldt -0x50(%rbp)
fdivrp %st, %st(1)
fstpt -0x60(%rbp)
jmp 0x135da
movl $0x0, -0x4(%rbp)
jmp 0x13877
jmp 0x13837
cmpl $0x0, -0x24(%rbp)
jne 0x1372d
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x2a, %eax
movl %eax, %ecx
movq %rcx, -0x100(%rbp)
subl $0x5, %eax
ja 0x1371c
movq -0x100(%rbp), %rax
leaq 0x4eabd(%rip), %rcx     # 0x620d0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
fldt -0x40(%rbp)
fstpl -0xe0(%rbp)
movsd -0xe0(%rbp), %xmm0
fldt -0x50(%rbp)
fstpl -0xe8(%rbp)
movsd -0xe8(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
fldl -0xf0(%rbp)
fstpt -0x60(%rbp)
jmp 0x13728
fldt -0x40(%rbp)
fstpl -0xc8(%rbp)
movsd -0xc8(%rbp), %xmm0
fldt -0x50(%rbp)
fstpl -0xd0(%rbp)
movsd -0xd0(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0xd8(%rbp)
fldl -0xd8(%rbp)
fstpt -0x60(%rbp)
jmp 0x13728
fldt -0x40(%rbp)
fstpl -0xb0(%rbp)
movsd -0xb0(%rbp), %xmm0
fldt -0x50(%rbp)
fstpl -0xb8(%rbp)
movsd -0xb8(%rbp), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0xc0(%rbp)
fldl -0xc0(%rbp)
fstpt -0x60(%rbp)
jmp 0x13728
fldt -0x50(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x136e3
jp 0x136e3
jmp 0x136de
jmp 0x13851
fldt -0x40(%rbp)
fstpl -0x98(%rbp)
movsd -0x98(%rbp), %xmm0
fldt -0x50(%rbp)
fstpl -0xa0(%rbp)
movsd -0xa0(%rbp), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
fldl -0xa8(%rbp)
fstpt -0x60(%rbp)
jmp 0x13728
movl $0x0, -0x4(%rbp)
jmp 0x13877
jmp 0x13835
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
addl $-0x2a, %eax
movl %eax, %ecx
movq %rcx, -0x108(%rbp)
subl $0x5, %eax
ja 0x1382a
movq -0x108(%rbp), %rax
leaq 0x4e961(%rip), %rcx     # 0x620b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
fldt -0x40(%rbp)
fstps -0x88(%rbp)
movss -0x88(%rbp), %xmm0
fldt -0x50(%rbp)
fstps -0x8c(%rbp)
movss -0x8c(%rbp), %xmm1
addss %xmm1, %xmm0
movss %xmm0, -0x90(%rbp)
flds -0x90(%rbp)
fstpt -0x60(%rbp)
jmp 0x13833
fldt -0x40(%rbp)
fstps -0x7c(%rbp)
movss -0x7c(%rbp), %xmm0
fldt -0x50(%rbp)
fstps -0x80(%rbp)
movss -0x80(%rbp), %xmm1
subss %xmm1, %xmm0
movss %xmm0, -0x84(%rbp)
flds -0x84(%rbp)
fstpt -0x60(%rbp)
jmp 0x13833
fldt -0x40(%rbp)
fstps -0x70(%rbp)
movss -0x70(%rbp), %xmm0
fldt -0x50(%rbp)
fstps -0x74(%rbp)
movss -0x74(%rbp), %xmm1
mulss %xmm1, %xmm0
movss %xmm0, -0x78(%rbp)
flds -0x78(%rbp)
fstpt -0x60(%rbp)
jmp 0x13833
fldt -0x50(%rbp)
fldz
fxch %st(1)
fucompi %st(1), %st
fstp %st(0)
jne 0x13803
jp 0x13803
jmp 0x13801
jmp 0x13851
fldt -0x40(%rbp)
fstps -0x64(%rbp)
movss -0x64(%rbp), %xmm0
fldt -0x50(%rbp)
fstps -0x68(%rbp)
movss -0x68(%rbp), %xmm1
divss %xmm1, %xmm0
movss %xmm0, -0x6c(%rbp)
flds -0x6c(%rbp)
fstpt -0x60(%rbp)
jmp 0x13833
movl $0x0, -0x4(%rbp)
jmp 0x13877
jmp 0x13835
jmp 0x13837
movq -0x10(%rbp), %rax
movb $0x1c, (%rax)
fldt -0x60(%rbp)
movq -0x10(%rbp), %rax
fstpt 0x20(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x13877
cmpl $0x0, 0x78018(%rip)     # 0x8b870
jne 0x13870
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x4e98a(%rip), %rsi     # 0x621f3
movb $0x0, %al
callq 0x16d80
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)