#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 acos(double const);
double cbrt(scalar_t__);
double cos(double const);
scalar_t__ fabs(double const);
double log(double);
double psi_h_stable(double, double);
double psi_h_unstable(double, double);
double psi_m_stable(double, double);
double psi_m_unstable(double, double);
double sqrt(double const);
void exchange_coefficients_byun(double Ri, double zb, double z0, double *cm,
                                double *ch, double *lmo) {
  const double logz = log(zb / z0);
  const double zfactor = zb / (zb - z0) * logz;
  double zeta, zeta0, psi_m, psi_h, lmo_;
  double sb = Ri / 0.74;
  if (Ri <= 0.0) {
    const double qb =
        1.0 / 9.0 * (1.0 / (15.0 * 15.0) + 3.0 * 9.0 / 15.0 * sb * sb);
    const double pb = 1.0 / 54.0 *
                      (-2.0 / (15.0 * 15.0 * 15.0) +
                       9.0 / 15.0 * (-9.0 / 15.0 + 3.0) * sb * sb);
    const double crit = qb * qb * qb - pb * pb;
    if (crit >= 0.0) {
      const double angle = acos(pb / sqrt(qb * qb * qb));
      zeta =
          zfactor * (-2.0 * sqrt(qb) * cos(angle / 3.0) + 1.0 / (3.0 * 15.0));
    } else {
      const double tb = cbrt(sqrt(-crit) + fabs(pb));
      zeta = zfactor * (1.0 / (3.0 * 15.0) - (tb + qb / tb));
    }
    lmo_ = zb / zeta;
    zeta0 = z0 / lmo_;
    psi_m = psi_m_unstable(zeta, zeta0);
    psi_h = psi_h_unstable(zeta, zeta0);
  } else {
    zeta = zfactor / (2.0 * 6.351351351351352 * (4.7 * Ri - 1.0)) *
           ((1.0 - 2.0 * 6.351351351351352 * Ri) -
            sqrt(1.0 + 4.0 * (6.351351351351352 - 4.7) * sb));
    lmo_ = zb / zeta;
    zeta0 = z0 / lmo_;
    psi_m = psi_m_stable(zeta, zeta0);
    psi_h = psi_h_stable(zeta, zeta0);
  }
  const double cu = 0.35 / (logz - psi_m);
  const double cth = 0.35 / (logz - psi_h) / 0.74;
  *cm = cu * cu;
  *ch = cu * cth;
  *lmo = lmo_;
  return;
}


x86 assembly (clang, -O0):
<exchange_coefficients_byun>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   10b0 <log@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xdfc(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     1462 <exchange_coefficients_byun+0x2c2>
movsd  0xe3d(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe1f(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe0b(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xdf2(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xdd4(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xdc0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  -0x80(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     138b <exchange_coefficients_byun+0x1eb>
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x78(%rbp),%xmm0
call   10c0 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
divsd  %xmm1,%xmm0
call   1030 <acos@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   10c0 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xd43(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xd1f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1090 <cos@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
movsd  0xcef(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1417 <exchange_coefficients_byun+0x277>
movsd  -0x88(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   10c0 <sqrt@plt>
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1040 <fabs@plt>
movsd  -0xc8(%rbp),%xmm0
ff
cvtsi2sd %rax,%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rdi
call   1080 <cbrt@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
divsd  -0x98(%rbp),%xmm1
ff
addsd  %xmm1,%xmm2
movsd  0xc5e(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
call   1060 <psi_m_unstable@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
call   10a0 <psi_h_unstable@plt>
movsd  %xmm0,-0x60(%rbp)
jmp    1549 <exchange_coefficients_byun+0x3a9>
movsd  -0x40(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xbb4(%rip),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xbb0(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  0xb94(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  0xb6f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb5b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  0xb3a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xb36(%rip),%xmm1
addsd  %xmm1,%xmm0
call   10c0 <sqrt@plt>
movsd  -0xd8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd0(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
call   1050 <psi_m_stable@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
call   1070 <psi_h_stable@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm1
subsd  -0x58(%rbp),%xmm1
movsd  0xb25(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x38(%rbp),%xmm1
subsd  -0x60(%rbp),%xmm1
movsd  0xb07(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xa7b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa0(%rbp),%xmm0
ff
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exchange_coefficients_byun>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x8(%rsp)
movapd %xmm1,%xmm0
divsd  %xmm2,%xmm0
call   10b0 <log@plt>
movsd  0x8(%rsp),%xmm4
movapd %xmm0,%xmm1
movsd  0x20(%rsp),%xmm3
movapd %xmm3,%xmm0
subsd  0x18(%rsp),%xmm0
divsd  %xmm0,%xmm3
movapd %xmm4,%xmm0
divsd  0xe05(%rip),%xmm0
movsd  %xmm1,0x38(%rsp)
mulsd  %xmm1,%xmm3
xorpd  %xmm1,%xmm1
ucomisd %xmm4,%xmm1
jae    1262 <exchange_coefficients_byun+0xc2>
movsd  0xe41(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  0xe3d(%rip),%xmm2
mulsd  0xe3d(%rip),%xmm2
mulsd  0xe3d(%rip),%xmm4
divsd  %xmm2,%xmm3
movsd  0xe39(%rip),%xmm2
mulsd  0xe39(%rip),%xmm0
addsd  %xmm2,%xmm4
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     12fb <exchange_coefficients_byun+0x15b>
sqrtsd %xmm0,%xmm0
jmp    1318 <exchange_coefficients_byun+0x178>
movsd  %xmm3,0x10(%rsp)
movsd  0xd98(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
addsd  0xd90(%rip),%xmm2
mulsd  0xd90(%rip),%xmm2
movsd  0xd90(%rip),%xmm4
mulsd  %xmm0,%xmm4
mulsd  %xmm0,%xmm4
addsd  0xd88(%rip),%xmm4
mulsd  0xd88(%rip),%xmm4
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm4,%xmm3
mulsd  %xmm4,%xmm3
movsd  %xmm2,0x8(%rsp)
mulsd  %xmm2,%xmm0
movapd %xmm0,%xmm2
subsd  %xmm3,%xmm2
ucomisd %xmm1,%xmm2
jae    136b <exchange_coefficients_byun+0x1cb>
movapd 0xdc4(%rip),%xmm0
xorpd  %xmm2,%xmm0
movsd  0xd68(%rip),%xmm1
ucomisd %xmm2,%xmm1
jb     137b <exchange_coefficients_byun+0x1db>
sqrtsd %xmm0,%xmm0
jmp    138c <exchange_coefficients_byun+0x1ec>
movsd  %xmm3,0x10(%rsp)
movsd  %xmm4,0x8(%rsp)
call   10c0 <sqrt@plt>
movsd  0x8(%rsp),%xmm4
movsd  0x10(%rsp),%xmm3
movsd  0x20(%rsp),%xmm2
subsd  %xmm0,%xmm4
mulsd  %xmm4,%xmm3
movsd  %xmm3,0x10(%rsp)
divsd  %xmm3,%xmm2
movsd  %xmm2,0x20(%rsp)
movsd  0x18(%rsp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x18(%rsp)
movapd %xmm3,%xmm0
call   1050 <psi_m_stable@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   1070 <psi_h_stable@plt>
jmp    1495 <exchange_coefficients_byun+0x2f5>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13cf <exchange_coefficients_byun+0x22f>
sqrtsd %xmm0,%xmm0
jmp    13e0 <exchange_coefficients_byun+0x240>
movsd  %xmm4,0x28(%rsp)
call   10c0 <sqrt@plt>
movsd  0x28(%rsp),%xmm4
movsd  %xmm0,0x30(%rsp)
movapd %xmm4,%xmm0
call   1040 <fabs@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x30(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
call   1080 <cbrt@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
addsd  %xmm0,%xmm1
movsd  0xc7f(%rip),%xmm0
subsd  %xmm1,%xmm0
jmp    1445 <exchange_coefficients_byun+0x2a5>
movsd  %xmm4,0x28(%rsp)
call   10c0 <sqrt@plt>
movsd  0x28(%rsp),%xmm4
divsd  %xmm0,%xmm4
movapd %xmm4,%xmm0
call   1030 <acos@plt>
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
ucomisd 0xc91(%rip),%xmm0
jb     1407 <exchange_coefficients_byun+0x267>
sqrtsd %xmm0,%xmm0
jmp    1418 <exchange_coefficients_byun+0x278>
movsd  %xmm1,0x8(%rsp)
call   10c0 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0xc18(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  0xc12(%rip),%xmm1
movapd %xmm1,%xmm0
call   1090 <cos@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0xc03(%rip),%xmm0
movsd  0x10(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x18(%rsp),%xmm1
movsd  %xmm0,0x20(%rsp)
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movapd %xmm2,%xmm0
call   1060 <psi_m_unstable@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
call   10a0 <psi_h_unstable@plt>
movsd  0x38(%rsp),%xmm4
movapd %xmm4,%xmm1
subsd  0x8(%rsp),%xmm1
movsd  0xbdb(%rip),%xmm2
movapd %xmm2,%xmm3
divsd  %xmm1,%xmm3
subsd  %xmm0,%xmm4
divsd  %xmm4,%xmm2
divsd  0xb3b(%rip),%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm3,%xmm3
movsd  %xmm3,(%rbx)
movsd  %xmm2,(%r15)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @exchange_coefficients_byun(double %0, double %1, double %2, double* %3, double* %4, double* %5) {
%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
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
%24 = alloca double
%25 = alloca double
%26 = alloca double
%27 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double* %3, double** %10
store double* %4, double** %11
store double* %5, double** %12
%28 = load double, double* %8
%29 = load double, double* %9
%30 = fdiv double %28, %29
%31 = call double @log(double %30)
store double %31, double* %13
%32 = load double, double* %8
%33 = load double, double* %8
%34 = load double, double* %9
%35 = fsub double %33, %34
%36 = fdiv double %32, %35
%37 = load double, double* %13
%38 = fmul double %36, %37
store double %38, double* %14
%39 = load double, double* %7
%40 = fdiv double %39, 0x3FE7AE147AE147AE
store double %40, double* %20
%41 = load double, double* %7
%42 = fcmp ole double %41, 0.000000e+00
br i1 %42, label %43, label %115
43: ; preds = %6
%44 = load double, double* %20
%45 = fmul double 1.800000e+00, %44
%46 = load double, double* %20
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double 0x3F723456789ABCDF)
%48 = fmul double 0x3FBC71C71C71C71C, %47
store double %48, double* %21
%49 = load double, double* %20
%50 = fmul double 1.440000e+00, %49
%51 = load double, double* %20
%52 = call double @llvm.fmuladd.f64(double %50, double %51, double 0xBF436B06E70B7421)
%53 = fmul double 0x3F92F684BDA12F68, %52
store double %53, double* %22
%54 = load double, double* %21
%55 = load double, double* %21
%56 = fmul double %54, %55
%57 = load double, double* %21
%58 = load double, double* %22
%59 = load double, double* %22
%60 = fmul double %58, %59
%61 = fneg double %60
%62 = call double @llvm.fmuladd.f64(double %56, double %57, double %61)
store double %62, double* %23
%63 = load double, double* %23
%64 = fcmp oge double %63, 0.000000e+00
br i1 %64, label %65, label %84
65: ; preds = %43
%66 = load double, double* %22
%67 = load double, double* %21
%68 = load double, double* %21
%69 = fmul double %67, %68
%70 = load double, double* %21
%71 = fmul double %69, %70
%72 = call double @sqrt(double %71)
%73 = fdiv double %66, %72
%74 = call double @acos(double %73)
store double %74, double* %24
%75 = load double, double* %14
%76 = load double, double* %21
%77 = call double @sqrt(double %76)
%78 = fmul double -2.000000e+00, %77
%79 = load double, double* %24
%80 = fdiv double %79, 3.000000e+00
%81 = call double @cos(double %80)
%82 = call double @llvm.fmuladd.f64(double %78, double %81, double 0x3F96C16C16C16C17)
%83 = fmul double %75, %82
store double %83, double* %15
br label %102
84: ; preds = %43
%85 = load double, double* %23
%86 = fneg double %85
%87 = call double @sqrt(double %86)
%88 = load double, double* %22
%89 = call i64 @fabs(double %88)
%90 = sitofp i64 %89 to double
%91 = fadd double %87, %90
%92 = fptosi double %91 to i64
%93 = call double @cbrt(i64 %92)
store double %93, double* %25
%94 = load double, double* %14
%95 = load double, double* %25
%96 = load double, double* %21
%97 = load double, double* %25
%98 = fdiv double %96, %97
%99 = fadd double %95, %98
%100 = fsub double 0x3F96C16C16C16C17, %99
%101 = fmul double %94, %100
store double %101, double* %15
br label %102
102: ; preds = %84, %65
%103 = load double, double* %8
%104 = load double, double* %15
%105 = fdiv double %103, %104
store double %105, double* %19
%106 = load double, double* %9
%107 = load double, double* %19
%108 = fdiv double %106, %107
store double %108, double* %16
%109 = load double, double* %15
%110 = load double, double* %16
%111 = call double @psi_m_unstable(double %109, double %110)
store double %111, double* %17
%112 = load double, double* %15
%113 = load double, double* %16
%114 = call double @psi_h_unstable(double %112, double %113)
store double %114, double* %18
br label %140
115: ; preds = %6
%116 = load double, double* %14
%117 = load double, double* %7
%118 = call double @llvm.fmuladd.f64(double 4.700000e+00, double %117, double -1.000000e+00)
%119 = fmul double 0x402967C8A60DD67D, %118
%120 = fdiv double %116, %119
%121 = load double, double* %7
%122 = call double @llvm.fmuladd.f64(double 0xC02967C8A60DD67D, double %121, double 1.000000e+00)
%123 = load double, double* %20
%124 = call double @llvm.fmuladd.f64(double 0x401A6BEF650426C0, double %123, double 1.000000e+00)
%125 = call double @sqrt(double %124)
%126 = fsub double %122, %125
%127 = fmul double %120, %126
store double %127, double* %15
%128 = load double, double* %8
%129 = load double, double* %15
%130 = fdiv double %128, %129
store double %130, double* %19
%131 = load double, double* %9
%132 = load double, double* %19
%133 = fdiv double %131, %132
store double %133, double* %16
%134 = load double, double* %15
%135 = load double, double* %16
%136 = call double @psi_m_stable(double %134, double %135)
store double %136, double* %17
%137 = load double, double* %15
%138 = load double, double* %16
%139 = call double @psi_h_stable(double %137, double %138)
store double %139, double* %18
br label %140
140: ; preds = %115, %102
%141 = load double, double* %13
%142 = load double, double* %17
%143 = fsub double %141, %142
%144 = fdiv double 3.500000e-01, %143
store double %144, double* %26
%145 = load double, double* %13
%146 = load double, double* %18
%147 = fsub double %145, %146
%148 = fdiv double 3.500000e-01, %147
%149 = fdiv double %148, 0x3FE7AE147AE147AE
store double %149, double* %27
%150 = load double, double* %26
%151 = load double, double* %26
%152 = fmul double %150, %151
%153 = load double*, double** %10
store double %152, double* %153
%154 = load double, double* %26
%155 = load double, double* %27
%156 = fmul double %154, %155
%157 = load double*, double** %11
store double %156, double* %157
%158 = load double, double* %19
%159 = load double*, double** %12
store double %158, double* %159
ret void
}

LLVM IR (-O2):
define void @exchange_coefficients_byun(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = fdiv double %1, %2
%8 = tail call double @log(double %7)
%9 = fsub double %1, %2
%10 = fdiv double %1, %9
%11 = fmul double %10, %8
%12 = fdiv double %0, 0x3FE7AE147AE147AE
%13 = fcmp ugt double %0, 0.000000e+00
br i1 %13, label %54, label %14
14: ; preds = %6
%15 = fmul double %12, 1.800000e+00
%16 = tail call double @llvm.fmuladd.f64(double %15, double %12, double 0x3F723456789ABCDF)
%17 = fmul double %16, 0x3FBC71C71C71C71C
%18 = fmul double %12, 1.440000e+00
%19 = tail call double @llvm.fmuladd.f64(double %18, double %12, double 0xBF436B06E70B7421)
%20 = fmul double %19, 0x3F92F684BDA12F68
%21 = fmul double %17, %17
%22 = fneg double %20
%23 = fmul double %20, %22
%24 = tail call double @llvm.fmuladd.f64(double %21, double %17, double %23)
%25 = fcmp ult double %24, 0.000000e+00
br i1 %25, label %36, label %26
26: ; preds = %14
%27 = fmul double %17, %21
%28 = tail call double @sqrt(double %27)
%29 = fdiv double %20, %28
%30 = tail call double @acos(double %29)
%31 = tail call double @sqrt(double %17)
%32 = fmul double %31, -2.000000e+00
%33 = fdiv double %30, 3.000000e+00
%34 = tail call double @cos(double %33)
%35 = tail call double @llvm.fmuladd.f64(double %32, double %34, double 0x3F96C16C16C16C17)
br label %47
36: ; preds = %14
%37 = fneg double %24
%38 = tail call double @sqrt(double %37)
%39 = tail call i64 @fabs(double %20)
%40 = sitofp i64 %39 to double
%41 = fadd double %38, %40
%42 = fptosi double %41 to i64
%43 = tail call double @cbrt(i64 %42)
%44 = fdiv double %17, %43
%45 = fadd double %43, %44
%46 = fsub double 0x3F96C16C16C16C17, %45
br label %47
47: ; preds = %36, %26
%48 = phi double [ %35, %26 ], [ %46, %36 ]
%49 = fmul double %11, %48
%50 = fdiv double %1, %49
%51 = fdiv double %2, %50
%52 = tail call double @psi_m_unstable(double %49, double %51)
%53 = tail call double @psi_h_unstable(double %49, double %51)
br label %67
54: ; preds = %6
%55 = tail call double @llvm.fmuladd.f64(double %0, double 4.700000e+00, double -1.000000e+00)
%56 = fmul double %55, 0x402967C8A60DD67D
%57 = fdiv double %11, %56
%58 = tail call double @llvm.fmuladd.f64(double %0, double 0xC02967C8A60DD67D, double 1.000000e+00)
%59 = tail call double @llvm.fmuladd.f64(double %12, double 0x401A6BEF650426C0, double 1.000000e+00)
%60 = tail call double @sqrt(double %59)
%61 = fsub double %58, %60
%62 = fmul double %57, %61
%63 = fdiv double %1, %62
%64 = fdiv double %2, %63
%65 = tail call double @psi_m_stable(double %62, double %64)
%66 = tail call double @psi_h_stable(double %62, double %64)
br label %67
67: ; preds = %54, %47
%68 = phi double [ %50, %47 ], [ %63, %54 ]
%69 = phi double [ %53, %47 ], [ %66, %54 ]
%70 = phi double [ %52, %47 ], [ %65, %54 ]
%71 = fsub double %8, %70
%72 = fdiv double 3.500000e-01, %71
%73 = fsub double %8, %69
%74 = fdiv double 3.500000e-01, %73
%75 = fdiv double %74, 0x3FE7AE147AE147AE
%76 = fmul double %72, %72
store double %76, double* %3
%77 = fmul double %72, %75
store double %77, double* %4
store double %68, double* %5
ret void
}