double bcorr(double a0, double b0) {
  static double c0 = .0833333333333333;
  static double c1 = -.00277777777760991;
  static double c2 = 7.9365066682539e-4;
  static double c3 = -5.9520293135187e-4;
  static double c4 = 8.37308034031215e-4;
  static double c5 = -.00165322962780713;
  double ret_val, r__1;
  double a, b, c__, h__, t, w, x, s3, s5, x2, s7, s9, s11;
  a = ((a0 < b0) ? a0 : b0);
  b = ((a0 > b0) ? a0 : b0);
  h__ = a / b;
  c__ = h__ / (h__ + 1.0);
  x = 1.0 / (h__ + 1.0);
  x2 = x * x;
  s3 = x + x2 + 1.0;
  s5 = x + x2 * s3 + 1.0;
  s7 = x + x2 * s5 + 1.0;
  s9 = x + x2 * s7 + 1.0;
  s11 = x + x2 * s9 + 1.0;
  r__1 = 1.0 / b;
  t = r__1 * r__1;
  w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 * s3) *
          t +
      c0;
  w *= c__ / b;
  r__1 = 1.0 / a;
  t = r__1 * r__1;
  ret_val = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a + w;
  return ret_val;
}


x86 assembly (clang, -O0):
<bcorr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x18,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1138 <bcorr+0x38>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1145 <bcorr+0x45>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1174 <bcorr+0x74>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
jmp    1181 <bcorr+0x81>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0xe56(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe40(%rip),%xmm1
addsd  -0x40(%rbp),%xmm1
movsd  0xe33(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  0xe09(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xde1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb9(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd91(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd69(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd55(%rip),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0x2d7c(%rip),%xmm0
mulsd  -0x88(%rbp),%xmm0
ff
movsd  -0x48(%rbp),%xmm2
movsd  0x2d5f(%rip),%xmm1
mulsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2d3d(%rip),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2d1b(%rip),%xmm1
mulsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2cf9(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2cd7(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xc8e(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0x2cb5(%rip),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2ca0(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2c83(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2c66(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2c49(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  0x2c2c(%rip),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
addsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x18,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcorr>:
movapd %xmm0,%xmm10
minsd  %xmm1,%xmm10
maxsd  %xmm1,%xmm0
movapd %xmm10,%xmm11
divsd  %xmm0,%xmm11
movsd  0xee0(%rip),%xmm3
movapd %xmm11,%xmm1
addsd  %xmm3,%xmm1
divsd  %xmm1,%xmm11
movapd %xmm3,%xmm4
divsd  %xmm1,%xmm4
movapd %xmm4,%xmm5
mulsd  %xmm4,%xmm5
movapd %xmm4,%xmm12
addsd  %xmm5,%xmm12
addsd  %xmm3,%xmm12
movapd %xmm5,%xmm7
mulsd  %xmm12,%xmm7
addsd  %xmm4,%xmm7
addsd  %xmm3,%xmm7
movapd %xmm5,%xmm2
mulsd  %xmm7,%xmm2
addsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
movapd %xmm5,%xmm6
mulsd  %xmm2,%xmm6
addsd  %xmm4,%xmm6
addsd  %xmm3,%xmm6
mulsd  %xmm6,%xmm5
addsd  %xmm4,%xmm5
addsd  %xmm3,%xmm5
movapd %xmm3,%xmm4
divsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm4
movsd  0xe6a(%rip),%xmm1
mulsd  %xmm1,%xmm5
movsd  0xe65(%rip),%xmm8
mulsd  %xmm8,%xmm6
mulsd  %xmm4,%xmm5
addsd  %xmm6,%xmm5
movsd  0xe57(%rip),%xmm9
mulsd  %xmm9,%xmm2
mulsd  %xmm4,%xmm5
addsd  %xmm2,%xmm5
movsd  0xe4a(%rip),%xmm2
mulsd  %xmm2,%xmm7
mulsd  %xmm4,%xmm5
addsd  %xmm7,%xmm5
movsd  0xe3e(%rip),%xmm7
mulsd  %xmm7,%xmm12
mulsd  %xmm4,%xmm5
addsd  %xmm12,%xmm5
mulsd  %xmm4,%xmm5
movsd  0xe2c(%rip),%xmm4
addsd  %xmm4,%xmm5
divsd  %xmm0,%xmm11
mulsd  %xmm5,%xmm11
divsd  %xmm10,%xmm3
mulsd  %xmm3,%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm8,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm9,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm7,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm4,%xmm1
divsd  %xmm10,%xmm1
addsd  %xmm11,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
@bcorr.c0 = internal global double 0x3FB5555555555553
@bcorr.c1 = internal global double 0xBF66C16C16BB8412
@bcorr.c2 = internal global double 0x3F4A019FD4488960
@bcorr.c3 = internal global double 0xBF4380EC8FF430DF
@bcorr.c4 = internal global double 0x3F4B6FD94FB94A6B
@bcorr.c5 = internal global double 0xBF5B1625CBCA1838
define double @bcorr(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
%18 = alloca double
%19 = alloca double
store double %0, double* %3
store double %1, double* %4
%20 = load double, double* %3
%21 = load double, double* %4
%22 = fcmp olt double %20, %21
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = load double, double* %3
br label %27
25: ; preds = %2
%26 = load double, double* %4
br label %27
27: ; preds = %25, %23
%28 = phi double [ %24, %23 ], [ %26, %25 ]
store double %28, double* %7
%29 = load double, double* %3
%30 = load double, double* %4
%31 = fcmp ogt double %29, %30
br i1 %31, label %32, label %34
32: ; preds = %27
%33 = load double, double* %3
br label %36
34: ; preds = %27
%35 = load double, double* %4
br label %36
36: ; preds = %34, %32
%37 = phi double [ %33, %32 ], [ %35, %34 ]
store double %37, double* %8
%38 = load double, double* %7
%39 = load double, double* %8
%40 = fdiv double %38, %39
store double %40, double* %10
%41 = load double, double* %10
%42 = load double, double* %10
%43 = fadd double %42, 1.000000e+00
%44 = fdiv double %41, %43
store double %44, double* %9
%45 = load double, double* %10
%46 = fadd double %45, 1.000000e+00
%47 = fdiv double 1.000000e+00, %46
store double %47, double* %13
%48 = load double, double* %13
%49 = load double, double* %13
%50 = fmul double %48, %49
store double %50, double* %16
%51 = load double, double* %13
%52 = load double, double* %16
%53 = fadd double %51, %52
%54 = fadd double %53, 1.000000e+00
store double %54, double* %14
%55 = load double, double* %13
%56 = load double, double* %16
%57 = load double, double* %14
%58 = call double @llvm.fmuladd.f64(double %56, double %57, double %55)
%59 = fadd double %58, 1.000000e+00
store double %59, double* %15
%60 = load double, double* %13
%61 = load double, double* %16
%62 = load double, double* %15
%63 = call double @llvm.fmuladd.f64(double %61, double %62, double %60)
%64 = fadd double %63, 1.000000e+00
store double %64, double* %17
%65 = load double, double* %13
%66 = load double, double* %16
%67 = load double, double* %17
%68 = call double @llvm.fmuladd.f64(double %66, double %67, double %65)
%69 = fadd double %68, 1.000000e+00
store double %69, double* %18
%70 = load double, double* %13
%71 = load double, double* %16
%72 = load double, double* %18
%73 = call double @llvm.fmuladd.f64(double %71, double %72, double %70)
%74 = fadd double %73, 1.000000e+00
store double %74, double* %19
%75 = load double, double* %8
%76 = fdiv double 1.000000e+00, %75
store double %76, double* %6
%77 = load double, double* %6
%78 = load double, double* %6
%79 = fmul double %77, %78
store double %79, double* %11
%80 = load double, double* @bcorr.c5
%81 = load double, double* %19
%82 = fmul double %80, %81
%83 = load double, double* %11
%84 = load double, double* @bcorr.c4
%85 = load double, double* %18
%86 = fmul double %84, %85
%87 = call double @llvm.fmuladd.f64(double %82, double %83, double %86)
%88 = load double, double* %11
%89 = load double, double* @bcorr.c3
%90 = load double, double* %17
%91 = fmul double %89, %90
%92 = call double @llvm.fmuladd.f64(double %87, double %88, double %91)
%93 = load double, double* %11
%94 = load double, double* @bcorr.c2
%95 = load double, double* %15
%96 = fmul double %94, %95
%97 = call double @llvm.fmuladd.f64(double %92, double %93, double %96)
%98 = load double, double* %11
%99 = load double, double* @bcorr.c1
%100 = load double, double* %14
%101 = fmul double %99, %100
%102 = call double @llvm.fmuladd.f64(double %97, double %98, double %101)
%103 = load double, double* %11
%104 = load double, double* @bcorr.c0
%105 = call double @llvm.fmuladd.f64(double %102, double %103, double %104)
store double %105, double* %12
%106 = load double, double* %9
%107 = load double, double* %8
%108 = fdiv double %106, %107
%109 = load double, double* %12
%110 = fmul double %109, %108
store double %110, double* %12
%111 = load double, double* %7
%112 = fdiv double 1.000000e+00, %111
store double %112, double* %6
%113 = load double, double* %6
%114 = load double, double* %6
%115 = fmul double %113, %114
store double %115, double* %11
%116 = load double, double* @bcorr.c5
%117 = load double, double* %11
%118 = load double, double* @bcorr.c4
%119 = call double @llvm.fmuladd.f64(double %116, double %117, double %118)
%120 = load double, double* %11
%121 = load double, double* @bcorr.c3
%122 = call double @llvm.fmuladd.f64(double %119, double %120, double %121)
%123 = load double, double* %11
%124 = load double, double* @bcorr.c2
%125 = call double @llvm.fmuladd.f64(double %122, double %123, double %124)
%126 = load double, double* %11
%127 = load double, double* @bcorr.c1
%128 = call double @llvm.fmuladd.f64(double %125, double %126, double %127)
%129 = load double, double* %11
%130 = load double, double* @bcorr.c0
%131 = call double @llvm.fmuladd.f64(double %128, double %129, double %130)
%132 = load double, double* %7
%133 = fdiv double %131, %132
%134 = load double, double* %12
%135 = fadd double %133, %134
store double %135, double* %5
%136 = load double, double* %5
ret double %136
}

LLVM IR (-O2):
define double @bcorr(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = select i1 %3, double %0, double %1
%5 = fcmp ogt double %0, %1
%6 = select i1 %5, double %0, double %1
%7 = fdiv double %4, %6
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double %7, %8
%10 = fdiv double 1.000000e+00, %8
%11 = fmul double %10, %10
%12 = fadd double %10, %11
%13 = fadd double %12, 1.000000e+00
%14 = tail call double @llvm.fmuladd.f64(double %11, double %13, double %10)
%15 = fadd double %14, 1.000000e+00
%16 = tail call double @llvm.fmuladd.f64(double %11, double %15, double %10)
%17 = fadd double %16, 1.000000e+00
%18 = tail call double @llvm.fmuladd.f64(double %11, double %17, double %10)
%19 = fadd double %18, 1.000000e+00
%20 = tail call double @llvm.fmuladd.f64(double %11, double %19, double %10)
%21 = fadd double %20, 1.000000e+00
%22 = fdiv double 1.000000e+00, %6
%23 = fmul double %22, %22
%24 = fmul double %21, 0xBF5B1625CBCA1838
%25 = fmul double %19, 0x3F4B6FD94FB94A6B
%26 = tail call double @llvm.fmuladd.f64(double %24, double %23, double %25)
%27 = fmul double %17, 0xBF4380EC8FF430DF
%28 = tail call double @llvm.fmuladd.f64(double %26, double %23, double %27)
%29 = fmul double %15, 0x3F4A019FD4488960
%30 = tail call double @llvm.fmuladd.f64(double %28, double %23, double %29)
%31 = fmul double %13, 0xBF66C16C16BB8412
%32 = tail call double @llvm.fmuladd.f64(double %30, double %23, double %31)
%33 = tail call double @llvm.fmuladd.f64(double %32, double %23, double 0x3FB5555555555553)
%34 = fdiv double %9, %6
%35 = fmul double %34, %33
%36 = fdiv double 1.000000e+00, %4
%37 = fmul double %36, %36
%38 = tail call double @llvm.fmuladd.f64(double %37, double 0xBF5B1625CBCA1838, double 0x3F4B6FD94FB94A6B)
%39 = tail call double @llvm.fmuladd.f64(double %38, double %37, double 0xBF4380EC8FF430DF)
%40 = tail call double @llvm.fmuladd.f64(double %39, double %37, double 0x3F4A019FD4488960)
%41 = tail call double @llvm.fmuladd.f64(double %40, double %37, double 0xBF66C16C16BB8412)
%42 = tail call double @llvm.fmuladd.f64(double %41, double %37, double 0x3FB5555555555553)
%43 = fdiv double %42, %4
%44 = fadd double %43, %35
ret double %44
}