double THExpMinusApprox(double x) {
  if (x < 13.0) {
    double y;
    y = (1.0) + x * ((0.125) + x * ((0.0078125) + x * ((0.00032552083) +
                                                       x * (1.0172526e-5))));
    y *= y;
    y *= y;
    y *= y;
    y = 1 / y;
    return y;
  }
  return 0;
}


x86 assembly (clang, -O0):
<THExpMinusApprox>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11cb <THExpMinusApprox+0xcb>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  0xee8(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xee4(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xec4(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeac(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe56(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11d3 <THExpMinusApprox+0xd3>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<THExpMinusApprox>:
xorpd  %xmm1,%xmm1
movsd  0xef4(%rip),%xmm2
ucomisd %xmm0,%xmm2
jbe    115e <THExpMinusApprox+0x5e>
movsd  0xeee(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xeea(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee6(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xee2(%rip),%xmm2
mulsd  %xmm0,%xmm2
movsd  0xede(%rip),%xmm1
addsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm2,%xmm2
divsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @THExpMinusApprox(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = fcmp olt double %5, 1.300000e+01
br i1 %6, label %7, label %28
7: ; preds = %1
%8 = load double, double* %3
%9 = load double, double* %3
%10 = load double, double* %3
%11 = load double, double* %3
%12 = call double @llvm.fmuladd.f64(double %11, double 0x3EE5555553DE088B, double 0x3F35555551AB155A)
%13 = call double @llvm.fmuladd.f64(double %10, double %12, double 7.812500e-03)
%14 = call double @llvm.fmuladd.f64(double %9, double %13, double 1.250000e-01)
%15 = call double @llvm.fmuladd.f64(double %8, double %14, double 1.000000e+00)
store double %15, double* %4
%16 = load double, double* %4
%17 = load double, double* %4
%18 = fmul double %17, %16
store double %18, double* %4
%19 = load double, double* %4
%20 = load double, double* %4
%21 = fmul double %20, %19
store double %21, double* %4
%22 = load double, double* %4
%23 = load double, double* %4
%24 = fmul double %23, %22
store double %24, double* %4
%25 = load double, double* %4
%26 = fdiv double 1.000000e+00, %25
store double %26, double* %4
%27 = load double, double* %4
store double %27, double* %2
br label %29
28: ; preds = %1
store double 0.000000e+00, double* %2
br label %29
29: ; preds = %28, %7
%30 = load double, double* %2
ret double %30
}

LLVM IR (-O2):
define double @THExpMinusApprox(double %0) {
%2 = fcmp olt double %0, 1.300000e+01
br i1 %2, label %3, label %12
3: ; preds = %1
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0x3EE5555553DE088B, double 0x3F35555551AB155A)
%5 = tail call double @llvm.fmuladd.f64(double %0, double %4, double 7.812500e-03)
%6 = tail call double @llvm.fmuladd.f64(double %0, double %5, double 1.250000e-01)
%7 = tail call double @llvm.fmuladd.f64(double %0, double %6, double 1.000000e+00)
%8 = fmul double %7, %7
%9 = fmul double %8, %8
%10 = fmul double %9, %9
%11 = fdiv double 1.000000e+00, %10
br label %12
12: ; preds = %1, %3
%13 = phi double [ %11, %3 ], [ 0.000000e+00, %1 ]
ret double %13
}