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


x86 assembly (clang, -O0):
<qexpmx>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1138 <qexpmx+0x38>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec0(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    11fa <qexpmx+0xfa>
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
movsd  0xeb9(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xeb5(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe95(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe7d(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe65(%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  0xe27(%rip),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1202 <qexpmx+0x102>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<qexpmx>:
movapd %xmm0,%xmm1
movapd 0xef4(%rip),%xmm3
xorpd  %xmm0,%xmm3
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm3
andnpd %xmm1,%xmm2
orpd   %xmm3,%xmm2
movsd  0xedf(%rip),%xmm1
ucomisd %xmm2,%xmm1
jbe    1183 <qexpmx+0x83>
movsd  0xed9(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xed5(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xed1(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xecd(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xec9(%rip),%xmm0
addsd  %xmm0,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @qexpmx(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, 0.000000e+00
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load double, double* %3
%9 = fneg double %8
store double %9, double* %3
br label %10
10: ; preds = %7, %1
%11 = load double, double* %3
%12 = fcmp olt double %11, 1.300000e+01
br i1 %12, label %13, label %34
13: ; preds = %10
%14 = load double, double* %3
%15 = load double, double* %3
%16 = load double, double* %3
%17 = load double, double* %3
%18 = call double @llvm.fmuladd.f64(double %17, double 0x3EE5555553DE088B, double 0x3F35555551AB155A)
%19 = call double @llvm.fmuladd.f64(double %16, double %18, double 7.812500e-03)
%20 = call double @llvm.fmuladd.f64(double %15, double %19, double 1.250000e-01)
%21 = call double @llvm.fmuladd.f64(double %14, double %20, double 1.000000e+00)
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 = load double, double* %4
%27 = fmul double %26, %25
store double %27, double* %4
%28 = load double, double* %4
%29 = load double, double* %4
%30 = fmul double %29, %28
store double %30, double* %4
%31 = load double, double* %4
%32 = fdiv double 1.000000e+00, %31
store double %32, double* %4
%33 = load double, double* %4
store double %33, double* %2
br label %35
34: ; preds = %10
store double 0.000000e+00, double* %2
br label %35
35: ; preds = %34, %13
%36 = load double, double* %2
ret double %36
}

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