#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 exp(double);
double pow(float, int);
float ath(float f) {
  float ath;
  f /= 1000.;
  ath = 3.64 * pow(f, -0.8) - 6.5 * exp(-0.6 * pow(f - 3.3, 2)) +
        0.001 * pow(f, 4);
  return ath;
}


x86 assembly (clang, -O0):
<ath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xor    %edi,%edi
call   1040 <pow@plt>
movsd  %xmm0,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb3(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe8e(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x18(%rbp),%xmm0
movsd  0xe6d(%rip),%xmm1
mulsd  %xmm2,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe42(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x4,%edi
call   1040 <pow@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe11(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ath>:
sub    $0x18,%rsp
divss  0xed4(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
xor    %edi,%edi
call   1040 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movss  0xc(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xeb7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
mov    $0x2,%edi
call   1040 <pow@plt>
mulsd  0xea9(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xea4(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe9e(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movss  0xc(%rsp),%xmm0
mov    $0x4,%edi
call   1040 <pow@plt>
mulsd  0xe84(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @ath(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fdiv double %5, 1.000000e+03
%7 = fptrunc double %6 to float
store float %7, float* %2
%8 = load float, float* %2
%9 = call double @pow(float %8, i32 0)
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fsub double %11, 3.300000e+00
%13 = fptrunc double %12 to float
%14 = call double @pow(float %13, i32 2)
%15 = fmul double -6.000000e-01, %14
%16 = call double @exp(double %15)
%17 = fmul double 6.500000e+00, %16
%18 = fneg double %17
%19 = call double @llvm.fmuladd.f64(double 3.640000e+00, double %9, double %18)
%20 = load float, float* %2
%21 = call double @pow(float %20, i32 4)
%22 = call double @llvm.fmuladd.f64(double 1.000000e-03, double %21, double %19)
%23 = fptrunc double %22 to float
store float %23, float* %3
%24 = load float, float* %3
ret float %24
}

LLVM IR (-O2):
define float @ath(float %0) {
%2 = fdiv float %0, 1.000000e+03
%3 = tail call double @pow(float %2, i32 0)
%4 = fpext float %2 to double
%5 = fadd double %4, -3.300000e+00
%6 = fptrunc double %5 to float
%7 = tail call double @pow(float %6, i32 2)
%8 = fmul double %7, -6.000000e-01
%9 = tail call double @exp(double %8)
%10 = fmul double %9, -6.500000e+00
%11 = tail call double @llvm.fmuladd.f64(double %3, double 3.640000e+00, double %10)
%12 = tail call double @pow(float %2, i32 4)
%13 = tail call double @llvm.fmuladd.f64(double %12, double 1.000000e-03, double %11)
%14 = fptrunc double %13 to float
ret float %14
}