#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 cdflib_fifdmax1(double const, double const);
double cdflib_fifdmin1(double const, double const);
double pow(double, double);
double cdflib_bcorr(const double *a0, const double *b0) {
  static const double c0 = 0.833333333333333e-01;
  static const double c1 = -0.277777777760991e-02;
  static const double c2 = 0.793650666825390e-03;
  static const double c3 = -0.595202931351870e-03;
  static const double c4 = 0.837308034031215e-03;
  static const double c5 = -0.165322962780713e-02;
  double bcorr, a, b, c, h, s11, s3, s5, s7, s9, t, w, x, x2;
  a = cdflib_fifdmin1(*a0, *b0);
  b = cdflib_fifdmax1(*a0, *b0);
  h = a / b;
  c = h / (1.0e0 + h);
  x = 1.0e0 / (1.0e0 + h);
  x2 = x * x;
  s3 = 1.0e0 + (x + x2);
  s5 = 1.0e0 + (x + x2 * s3);
  s7 = 1.0e0 + (x + x2 * s5);
  s9 = 1.0e0 + (x + x2 * s7);
  s11 = 1.0e0 + (x + x2 * s9);
  t = pow(1.0e0 / b, 2.0);
  w = ((((c5 * s11 * t + c4 * s9) * t + c3 * s7) * t + c2 * s5) * t + c1 * s3) *
          t +
      c0;
  w *= (c / b);
  t = pow(1.0e0 / a, 2.0);
  bcorr = (((((c5 * t + c4) * t + c3) * t + c2) * t + c1) * t + c0) / a + w;
  return bcorr;
}


x86 assembly (clang, -O0):
<cdflib_bcorr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1030 <cdflib_fifdmin1@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
call   1040 <cdflib_fifdmax1@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xea5(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe8f(%rip),%xmm1
addsd  -0x38(%rbp),%xmm1
movsd  0xe82(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm1
addsd  -0x80(%rbp),%xmm1
movsd  0xe58(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe30(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe08(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xde0(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdb8(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xda7(%rip),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  0xd92(%rip),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  0xd70(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  0xd66(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  0xd3c(%rip),%xmm1
mulsd  -0x58(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  0xd1a(%rip),%xmm1
mulsd  -0x50(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm2
movsd  0xcf8(%rip),%xmm1
mulsd  -0x48(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xcd2(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x30(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xce5(%rip),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  0xcd0(%rip),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  0xca9(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xca5(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc80(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc63(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc46(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc29(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
addsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_bcorr>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
call   1030 <cdflib_fifdmin1@plt>
movaps %xmm0,(%rsp)
movsd  (%rbx),%xmm0
movsd  (%r14),%xmm1
call   1040 <cdflib_fifdmax1@plt>
movapd (%rsp),%xmm12
movapd %xmm12,%xmm10
divsd  %xmm0,%xmm10
movsd  0xe9c(%rip),%xmm1
movapd %xmm10,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm10
movapd %xmm1,%xmm3
divsd  %xmm2,%xmm3
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
movapd %xmm3,%xmm11
addsd  %xmm2,%xmm11
addsd  %xmm1,%xmm11
movapd %xmm2,%xmm6
mulsd  %xmm11,%xmm6
addsd  %xmm3,%xmm6
addsd  %xmm1,%xmm6
movapd %xmm2,%xmm7
mulsd  %xmm6,%xmm7
addsd  %xmm3,%xmm7
addsd  %xmm1,%xmm7
movapd %xmm2,%xmm5
mulsd  %xmm7,%xmm5
addsd  %xmm3,%xmm5
addsd  %xmm1,%xmm5
mulsd  %xmm5,%xmm2
addsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm1,%xmm3
divsd  %xmm0,%xmm3
mulsd  %xmm3,%xmm3
movsd  0xe26(%rip),%xmm4
mulsd  %xmm4,%xmm2
movsd  0xe21(%rip),%xmm8
mulsd  %xmm8,%xmm5
mulsd  %xmm3,%xmm2
addsd  %xmm5,%xmm2
movsd  0xe13(%rip),%xmm9
mulsd  %xmm9,%xmm7
mulsd  %xmm3,%xmm2
addsd  %xmm7,%xmm2
movsd  0xe06(%rip),%xmm7
mulsd  %xmm7,%xmm6
mulsd  %xmm3,%xmm2
addsd  %xmm6,%xmm2
movsd  0xdfa(%rip),%xmm5
mulsd  %xmm5,%xmm11
mulsd  %xmm3,%xmm2
addsd  %xmm11,%xmm2
mulsd  %xmm3,%xmm2
movsd  0xde8(%rip),%xmm3
addsd  %xmm3,%xmm2
divsd  %xmm12,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm1,%xmm4
addsd  %xmm8,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm9,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm7,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
unpcklpd %xmm10,%xmm4
movapd %xmm12,%xmm1
unpcklpd %xmm0,%xmm1
divpd  %xmm1,%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm4,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@cdflib_bcorr.c0 = internal constant double 0x3FB5555555555553
@cdflib_bcorr.c1 = internal constant double 0xBF66C16C16BB8412
@cdflib_bcorr.c2 = internal constant double 0x3F4A019FD4488960
@cdflib_bcorr.c3 = internal constant double 0xBF4380EC8FF430DF
@cdflib_bcorr.c4 = internal constant double 0x3F4B6FD94FB94A6B
@cdflib_bcorr.c5 = internal constant double 0xBF5B1625CBCA1838
define double @cdflib_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
store double* %0, double** %3
store double* %1, double** %4
%19 = load double*, double** %3
%20 = load double, double* %19
%21 = load double*, double** %4
%22 = load double, double* %21
%23 = call double @cdflib_fifdmin1(double %20, double %22)
store double %23, double* %6
%24 = load double*, double** %3
%25 = load double, double* %24
%26 = load double*, double** %4
%27 = load double, double* %26
%28 = call double @cdflib_fifdmax1(double %25, double %27)
store double %28, double* %7
%29 = load double, double* %6
%30 = load double, double* %7
%31 = fdiv double %29, %30
store double %31, double* %9
%32 = load double, double* %9
%33 = load double, double* %9
%34 = fadd double 1.000000e+00, %33
%35 = fdiv double %32, %34
store double %35, double* %8
%36 = load double, double* %9
%37 = fadd double 1.000000e+00, %36
%38 = fdiv double 1.000000e+00, %37
store double %38, double* %17
%39 = load double, double* %17
%40 = load double, double* %17
%41 = fmul double %39, %40
store double %41, double* %18
%42 = load double, double* %17
%43 = load double, double* %18
%44 = fadd double %42, %43
%45 = fadd double 1.000000e+00, %44
store double %45, double* %11
%46 = load double, double* %17
%47 = load double, double* %18
%48 = load double, double* %11
%49 = call double @llvm.fmuladd.f64(double %47, double %48, double %46)
%50 = fadd double 1.000000e+00, %49
store double %50, double* %12
%51 = load double, double* %17
%52 = load double, double* %18
%53 = load double, double* %12
%54 = call double @llvm.fmuladd.f64(double %52, double %53, double %51)
%55 = fadd double 1.000000e+00, %54
store double %55, double* %13
%56 = load double, double* %17
%57 = load double, double* %18
%58 = load double, double* %13
%59 = call double @llvm.fmuladd.f64(double %57, double %58, double %56)
%60 = fadd double 1.000000e+00, %59
store double %60, double* %14
%61 = load double, double* %17
%62 = load double, double* %18
%63 = load double, double* %14
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double %61)
%65 = fadd double 1.000000e+00, %64
store double %65, double* %10
%66 = load double, double* %7
%67 = fdiv double 1.000000e+00, %66
%68 = call double @pow(double %67, double 2.000000e+00)
store double %68, double* %15
%69 = load double, double* %10
%70 = fmul double 0xBF5B1625CBCA1838, %69
%71 = load double, double* %15
%72 = load double, double* %14
%73 = fmul double 0x3F4B6FD94FB94A6B, %72
%74 = call double @llvm.fmuladd.f64(double %70, double %71, double %73)
%75 = load double, double* %15
%76 = load double, double* %13
%77 = fmul double 0xBF4380EC8FF430DF, %76
%78 = call double @llvm.fmuladd.f64(double %74, double %75, double %77)
%79 = load double, double* %15
%80 = load double, double* %12
%81 = fmul double 0x3F4A019FD4488960, %80
%82 = call double @llvm.fmuladd.f64(double %78, double %79, double %81)
%83 = load double, double* %15
%84 = load double, double* %11
%85 = fmul double 0xBF66C16C16BB8412, %84
%86 = call double @llvm.fmuladd.f64(double %82, double %83, double %85)
%87 = load double, double* %15
%88 = call double @llvm.fmuladd.f64(double %86, double %87, double 0x3FB5555555555553)
store double %88, double* %16
%89 = load double, double* %8
%90 = load double, double* %7
%91 = fdiv double %89, %90
%92 = load double, double* %16
%93 = fmul double %92, %91
store double %93, double* %16
%94 = load double, double* %6
%95 = fdiv double 1.000000e+00, %94
%96 = call double @pow(double %95, double 2.000000e+00)
store double %96, double* %15
%97 = load double, double* %15
%98 = call double @llvm.fmuladd.f64(double 0xBF5B1625CBCA1838, double %97, double 0x3F4B6FD94FB94A6B)
%99 = load double, double* %15
%100 = call double @llvm.fmuladd.f64(double %98, double %99, double 0xBF4380EC8FF430DF)
%101 = load double, double* %15
%102 = call double @llvm.fmuladd.f64(double %100, double %101, double 0x3F4A019FD4488960)
%103 = load double, double* %15
%104 = call double @llvm.fmuladd.f64(double %102, double %103, double 0xBF66C16C16BB8412)
%105 = load double, double* %15
%106 = call double @llvm.fmuladd.f64(double %104, double %105, double 0x3FB5555555555553)
%107 = load double, double* %6
%108 = fdiv double %106, %107
%109 = load double, double* %16
%110 = fadd double %108, %109
store double %110, double* %5
%111 = load double, double* %5
ret double %111
}

LLVM IR (-O2):
define double @cdflib_bcorr(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call double @cdflib_fifdmin1(double %3, double %4)
%6 = load double, double* %0
%7 = load double, double* %1
%8 = tail call double @cdflib_fifdmax1(double %6, double %7)
%9 = fdiv double %5, %8
%10 = fadd double %9, 1.000000e+00
%11 = fdiv double %9, %10
%12 = fdiv double 1.000000e+00, %10
%13 = fmul double %12, %12
%14 = fadd double %12, %13
%15 = fadd double %14, 1.000000e+00
%16 = tail call double @llvm.fmuladd.f64(double %13, double %15, double %12)
%17 = fadd double %16, 1.000000e+00
%18 = tail call double @llvm.fmuladd.f64(double %13, double %17, double %12)
%19 = fadd double %18, 1.000000e+00
%20 = tail call double @llvm.fmuladd.f64(double %13, double %19, double %12)
%21 = fadd double %20, 1.000000e+00
%22 = tail call double @llvm.fmuladd.f64(double %13, double %21, double %12)
%23 = fadd double %22, 1.000000e+00
%24 = fdiv double 1.000000e+00, %8
%25 = fmul double %24, %24
%26 = fmul double %23, 0xBF5B1625CBCA1838
%27 = fmul double %21, 0x3F4B6FD94FB94A6B
%28 = tail call double @llvm.fmuladd.f64(double %26, double %25, double %27)
%29 = fmul double %19, 0xBF4380EC8FF430DF
%30 = tail call double @llvm.fmuladd.f64(double %28, double %25, double %29)
%31 = fmul double %17, 0x3F4A019FD4488960
%32 = tail call double @llvm.fmuladd.f64(double %30, double %25, double %31)
%33 = fmul double %15, 0xBF66C16C16BB8412
%34 = tail call double @llvm.fmuladd.f64(double %32, double %25, double %33)
%35 = tail call double @llvm.fmuladd.f64(double %34, double %25, double 0x3FB5555555555553)
%36 = fdiv double 1.000000e+00, %5
%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 = insertelement <2 x double> poison, double %42, i64 0
%44 = insertelement <2 x double> %43, double %11, i64 1
%45 = insertelement <2 x double> poison, double %5, i64 0
%46 = insertelement <2 x double> %45, double %8, i64 1
%47 = fdiv <2 x double> %44, %46
%48 = extractelement <2 x double> %47, i64 1
%49 = fmul double %48, %35
%50 = extractelement <2 x double> %47, i64 0
%51 = fadd double %50, %49
ret double %51
}