#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int cos(float);
int pow(float, int);
double sin(float);
float fint(float x) {
  return 4.0 * x * (x * x - 7.) * sin(x) -
         (pow(x, 4.) - 14. * x * x + 28.) * cos(x);
}


x86 assembly (clang, -O0):
<fint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xeca(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xea8(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x4,%edi
call   1050 <pow@plt>
cvtsi2sd %eax,%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe60(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe24(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
cvtsi2sd %eax,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fint>:
sub    $0x28,%rsp
movss  %xmm0,0xc(%rsp)
cvtss2sd %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0xeb4(%rip),%xmm2
mulsd  %xmm1,%xmm2
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
cvtss2sd %xmm1,%xmm1
addsd  0xea5(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x18(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0x4,%edi
call   1050 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0xe79(%rip),%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm0,%xmm2
addsd  0xe67(%rip),%xmm2
movsd  %xmm2,0x10(%rsp)
movss  0xc(%rsp),%xmm0
call   1040 <cos@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x20(%rsp),%xmm1
subsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define float @fint(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fmul double 4.000000e+00, %4
%6 = load float, float* %2
%7 = load float, float* %2
%8 = fmul float %6, %7
%9 = fpext float %8 to double
%10 = fsub double %9, 7.000000e+00
%11 = fmul double %5, %10
%12 = load float, float* %2
%13 = call double @sin(float %12)
%14 = load float, float* %2
%15 = call i32 @pow(float %14, i32 4)
%16 = sitofp i32 %15 to double
%17 = load float, float* %2
%18 = fpext float %17 to double
%19 = fmul double 1.400000e+01, %18
%20 = load float, float* %2
%21 = fpext float %20 to double
%22 = fneg double %19
%23 = call double @llvm.fmuladd.f64(double %22, double %21, double %16)
%24 = fadd double %23, 2.800000e+01
%25 = load float, float* %2
%26 = call i32 @cos(float %25)
%27 = sitofp i32 %26 to double
%28 = fmul double %24, %27
%29 = fneg double %28
%30 = call double @llvm.fmuladd.f64(double %11, double %13, double %29)
%31 = fptrunc double %30 to float
ret float %31
}

LLVM IR (-O2):
define float @fint(float %0) {
%2 = fpext float %0 to double
%3 = fmul double %2, 4.000000e+00
%4 = fmul float %0, %0
%5 = fpext float %4 to double
%6 = fadd double %5, -7.000000e+00
%7 = fmul double %3, %6
%8 = tail call double @sin(float %0)
%9 = tail call i32 @pow(float %0, i32 4)
%10 = sitofp i32 %9 to double
%11 = fmul double %2, -1.400000e+01
%12 = tail call double @llvm.fmuladd.f64(double %11, double %2, double %10)
%13 = fadd double %12, 2.800000e+01
%14 = tail call i32 @cos(float %0)
%15 = sitofp i32 %14 to double
%16 = fneg double %13
%17 = fmul double %15, %16
%18 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %17)
%19 = fptrunc double %18 to float
ret float %19
}