#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 */
double cos(double);
double exp(double);
double sin(double);
double fxd1(double x, double a0, double a1, double a2, double a3, double a4,
            double a5) {
  double rec =
      -sin(a1 * x) * a0 * a1 + cos(a3 * x) * a2 * a3 + a4 * exp(a4 * x);
  return rec;
}


x86 assembly (clang, -O0):
<fxd1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x60(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x50(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fxd1>:
sub    $0x38,%rsp
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x8(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm2,%xmm0
call   1030 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mulsd  0x30(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0x28(%rsp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x20(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @fxd1(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%16 = load double, double* %10
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = call double @sin(double %18)
%20 = fneg double %19
%21 = load double, double* %9
%22 = fmul double %20, %21
%23 = load double, double* %10
%24 = load double, double* %12
%25 = load double, double* %8
%26 = fmul double %24, %25
%27 = call double @cos(double %26)
%28 = load double, double* %11
%29 = fmul double %27, %28
%30 = load double, double* %12
%31 = fmul double %29, %30
%32 = call double @llvm.fmuladd.f64(double %22, double %23, double %31)
%33 = load double, double* %13
%34 = load double, double* %13
%35 = load double, double* %8
%36 = fmul double %34, %35
%37 = call double @exp(double %36)
%38 = call double @llvm.fmuladd.f64(double %33, double %37, double %32)
store double %38, double* %15
%39 = load double, double* %15
ret double %39
}

LLVM IR (-O2):
define double @fxd1(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = fmul double %0, %2
%9 = tail call double @sin(double %8)
%10 = fneg double %9
%11 = fmul double %10, %1
%12 = fmul double %0, %4
%13 = tail call double @cos(double %12)
%14 = fmul double %13, %3
%15 = fmul double %14, %4
%16 = tail call double @llvm.fmuladd.f64(double %11, double %2, double %15)
%17 = fmul double %0, %5
%18 = tail call double @exp(double %17)
%19 = tail call double @llvm.fmuladd.f64(double %5, double %18, double %16)
ret double %19
}