#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 */
int fabs(double);
double log(double);
double psi_m_stable(double, double);
double psi_m_unstable(double, double);
double compute_ustar(double windspeed, double buoyancy_flux, double z0,
                     double zb) {
  double lmo, zeta, zeta0, psi_m, ustar;
  double ustar0, ustar1, ustar_new, f0, f1, delta_ustar;
  double logz = log(zb / z0);
  ustar0 = windspeed * 0.35 / logz;
  if (fabs(buoyancy_flux) > 1.0e-20) {
    lmo = -ustar0 * ustar0 * ustar0 / (buoyancy_flux * 0.35);
    zeta = zb / lmo;
    zeta0 = z0 / lmo;
    if (zeta >= 0.0) {
      f0 = windspeed - ustar0 / 0.35 * (logz - psi_m_stable(zeta, zeta0));
      ustar1 = windspeed * 0.35 / (logz - psi_m_stable(zeta, zeta0));
      lmo = -ustar1 * ustar1 * ustar1 / (buoyancy_flux * 0.35);
      zeta = zb / lmo;
      zeta0 = z0 / lmo;
      f1 = windspeed - ustar1 / 0.35 * (logz - psi_m_stable(zeta, zeta0));
      ustar = ustar1;
      delta_ustar = ustar1 - ustar0;
      do {
        ustar_new = ustar1 - f1 * delta_ustar / (f1 - f0);
        f0 = f1;
        ustar0 = ustar1;
        ustar1 = ustar_new;
        lmo = -ustar1 * ustar1 * ustar1 / (buoyancy_flux * 0.35);
        zeta = zb / lmo;
        zeta0 = z0 / lmo;
        f1 = windspeed - ustar1 / 0.35 * (logz - psi_m_stable(zeta, zeta0));
        delta_ustar = ustar1 - ustar0;
      } while (fabs(delta_ustar) > 1e-10);
    } else {
      f0 = windspeed - ustar0 / 0.35 * (logz - psi_m_unstable(zeta, zeta0));
      ustar1 = windspeed * 0.35 / (logz - psi_m_unstable(zeta, zeta0));
      lmo = -ustar1 * ustar1 * ustar1 / (buoyancy_flux * 0.35);
      zeta = zb / lmo;
      zeta0 = z0 / lmo;
      f1 = windspeed - ustar1 / 0.35 * (logz - psi_m_unstable(zeta, zeta0));
      ustar = ustar1;
      delta_ustar = ustar1 - ustar0;
      do {
        ustar_new = ustar1 - f1 * delta_ustar / (f1 - f0);
        f0 = f1;
        ustar0 = ustar1;
        ustar1 = ustar_new;
        lmo = -ustar1 * ustar1 * ustar1 / (buoyancy_flux * 0.35);
        zeta = zb / lmo;
        zeta0 = z0 / lmo;
        f1 = windspeed - ustar1 / 0.35 * (logz - psi_m_unstable(zeta, zeta0));
        delta_ustar = ustar1 - ustar0;
      } while (fabs(delta_ustar) > 1e-10);
    }
  } else {
    ustar = ustar0;
  }
  return ustar;
}


x86 assembly (clang, -O0):
<compute_ustar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1060 <log@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  0xe8d(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xe60(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1865 <compute_ustar+0x725>
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  0xe30(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     153b <compute_ustar+0x3fb>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0xdd8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1040 <psi_m_stable@plt>
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xb0(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xd65(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1040 <psi_m_stable@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa0(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xcee(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0xca8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1040 <psi_m_stable@plt>
movsd  -0x98(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x88(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
subsd  -0x68(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0xbb2(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0xb6c(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1040 <psi_m_stable@plt>
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xc8(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0xae4(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     13e4 <compute_ustar+0x2a4>
jmp    1860 <compute_ustar+0x720>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  0xab3(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <psi_m_unstable@plt>
movsd  -0x118(%rbp),%xmm2
ff
movsd  -0x110(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x108(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xa40(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <psi_m_unstable@plt>
movsd  -0x100(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0x9c9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0x983(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <psi_m_unstable@plt>
movsd  -0xf0(%rbp),%xmm2
ff
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0xe0(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
movsd  -0x70(%rbp),%xmm2
subsd  -0x68(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x58(%rbp),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  0x88d(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  0x847(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
call   1050 <psi_m_unstable@plt>
movsd  -0x130(%rbp),%xmm2
ff
movsd  -0x128(%rbp),%xmm1
ff
movaps %xmm0,%xmm3
movsd  -0x120(%rbp),%xmm0
ff
subsd  %xmm3,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x58(%rbp),%xmm0
subsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm0
movsd  0x7bf(%rip),%xmm1
ucomisd %xmm1,%xmm0
ja     1709 <compute_ustar+0x5c9>
jmp    1860 <compute_ustar+0x720>
jmp    186f <compute_ustar+0x72f>
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compute_ustar>:
sub    $0x98,%rsp
movsd  %xmm1,0x18(%rsp)
movaps %xmm0,0x80(%rsp)
movsd  %xmm3,0x28(%rsp)
movapd %xmm3,%xmm0
movsd  %xmm2,0x20(%rsp)
divsd  %xmm2,%xmm0
call   1060 <log@plt>
movsd  0xe8a(%rip),%xmm1
mulsd  0x80(%rsp),%xmm1
movapd %xmm1,0x40(%rsp)
movapd %xmm0,0x70(%rsp)
divsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1030 <fabs@plt>
test   %eax,%eax
jle    1387 <compute_ustar+0x247>
movapd 0xe61(%rip),%xmm2
movapd (%rsp),%xmm1
xorpd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movsd  0x18(%rsp),%xmm1
mulsd  0xe32(%rip),%xmm1
movsd  %xmm1,0x18(%rsp)
divsd  %xmm1,%xmm2
movsd  0x28(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm2,%xmm1
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm0
movsd  %xmm0,0x60(%rsp)
movsd  %xmm1,0x30(%rsp)
jae    1393 <compute_ustar+0x253>
call   1050 <psi_m_unstable@plt>
movapd %xmm0,0x50(%rsp)
movsd  0x60(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
call   1050 <psi_m_unstable@plt>
movapd 0x70(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,0x40(%rsp)
movapd 0xdcc(%rip),%xmm2
xorpd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
divsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm2,%xmm1
call   1050 <psi_m_unstable@plt>
movapd 0x70(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
unpcklpd 0x50(%rsp),%xmm0
subpd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm3
movapd %xmm3,%xmm0
movapd (%rsp),%xmm2
unpcklpd %xmm2,%xmm0
divpd  0xd82(%rip),%xmm0
mulpd  %xmm1,%xmm0
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm3,%xmm0
subsd  %xmm2,%xmm3
movapd %xmm0,%xmm2
nop
movsd  %xmm0,0x30(%rsp)
mulsd  %xmm1,%xmm3
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
movapd %xmm1,0x60(%rsp)
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm3
subsd  %xmm3,%xmm2
movapd %xmm2,(%rsp)
movapd (%rsp),%xmm2
xorpd  0xd1a(%rip),%xmm2
mulsd  (%rsp),%xmm2
mulsd  (%rsp),%xmm2
divsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm2,%xmm1
call   1050 <psi_m_unstable@plt>
movapd 0x70(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd (%rsp),%xmm0
divsd  0xcd2(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x80(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
movapd (%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
call   1030 <fabs@plt>
movapd 0x30(%rsp),%xmm3
movapd (%rsp),%xmm2
movapd 0x50(%rsp),%xmm1
unpcklpd 0x60(%rsp),%xmm1
movapd %xmm2,%xmm0
test   %eax,%eax
jg     12c0 <compute_ustar+0x180>
jmp    1512 <compute_ustar+0x3d2>
movaps (%rsp),%xmm0
add    $0x98,%rsp
ret
call   1040 <psi_m_stable@plt>
movapd %xmm0,0x50(%rsp)
movsd  0x60(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
call   1040 <psi_m_stable@plt>
movapd 0x70(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm0,0x40(%rsp)
movapd 0xc3f(%rip),%xmm2
xorpd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
divsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm2,%xmm1
call   1040 <psi_m_stable@plt>
movapd 0x70(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
unpcklpd 0x50(%rsp),%xmm0
subpd  %xmm0,%xmm1
movapd 0x40(%rsp),%xmm3
movapd %xmm3,%xmm0
movapd (%rsp),%xmm2
unpcklpd %xmm2,%xmm0
divpd  0xbf5(%rip),%xmm0
mulpd  %xmm1,%xmm0
movapd 0x80(%rsp),%xmm1
unpcklpd %xmm1,%xmm1
addpd  %xmm0,%xmm1
movapd %xmm3,%xmm0
subsd  %xmm2,%xmm3
movapd %xmm0,%xmm2
nopl   0x0(%rax)
movsd  %xmm0,0x30(%rsp)
mulsd  %xmm1,%xmm3
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
movapd %xmm1,0x60(%rsp)
subsd  %xmm0,%xmm1
divsd  %xmm1,%xmm3
subsd  %xmm3,%xmm2
movapd %xmm2,(%rsp)
movapd (%rsp),%xmm2
xorpd  0xb8a(%rip),%xmm2
mulsd  (%rsp),%xmm2
mulsd  (%rsp),%xmm2
divsd  0x18(%rsp),%xmm2
movsd  0x28(%rsp),%xmm0
divsd  %xmm2,%xmm0
movsd  0x20(%rsp),%xmm1
divsd  %xmm2,%xmm1
call   1040 <psi_m_stable@plt>
movapd 0x70(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd (%rsp),%xmm0
divsd  0xb42(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0x80(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
movapd (%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
movapd %xmm0,0x30(%rsp)
call   1030 <fabs@plt>
movapd 0x30(%rsp),%xmm3
movapd (%rsp),%xmm2
movapd 0x50(%rsp),%xmm1
unpcklpd 0x60(%rsp),%xmm1
movapd %xmm2,%xmm0
test   %eax,%eax
jg     1450 <compute_ustar+0x310>
movaps 0x40(%rsp),%xmm0
add    $0x98,%rsp
ret

LLVM IR (-O0):
define double @compute_ustar(double %0, double %1, double %2, double %3) {
%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
%20 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%21 = load double, double* %8
%22 = load double, double* %7
%23 = fdiv double %21, %22
%24 = call double @log(double %23)
store double %24, double* %20
%25 = load double, double* %5
%26 = fmul double %25, 3.500000e-01
%27 = load double, double* %20
%28 = fdiv double %26, %27
store double %28, double* %14
%29 = load double, double* %6
%30 = call i32 @fabs(double %29)
%31 = sitofp i32 %30 to double
%32 = fcmp ogt double %31, 0x3BC79CA10C924223
br i1 %32, label %33, label %242
33: ; preds = %4
%34 = load double, double* %14
%35 = fneg double %34
%36 = load double, double* %14
%37 = fmul double %35, %36
%38 = load double, double* %14
%39 = fmul double %37, %38
%40 = load double, double* %6
%41 = fmul double %40, 3.500000e-01
%42 = fdiv double %39, %41
store double %42, double* %9
%43 = load double, double* %8
%44 = load double, double* %9
%45 = fdiv double %43, %44
store double %45, double* %10
%46 = load double, double* %7
%47 = load double, double* %9
%48 = fdiv double %46, %47
store double %48, double* %11
%49 = load double, double* %10
%50 = fcmp oge double %49, 0.000000e+00
br i1 %50, label %51, label %146
51: ; preds = %33
%52 = load double, double* %5
%53 = load double, double* %14
%54 = fdiv double %53, 3.500000e-01
%55 = load double, double* %20
%56 = load double, double* %10
%57 = load double, double* %11
%58 = call double @psi_m_stable(double %56, double %57)
%59 = fsub double %55, %58
%60 = fneg double %54
%61 = call double @llvm.fmuladd.f64(double %60, double %59, double %52)
store double %61, double* %17
%62 = load double, double* %5
%63 = fmul double %62, 3.500000e-01
%64 = load double, double* %20
%65 = load double, double* %10
%66 = load double, double* %11
%67 = call double @psi_m_stable(double %65, double %66)
%68 = fsub double %64, %67
%69 = fdiv double %63, %68
store double %69, double* %15
%70 = load double, double* %15
%71 = fneg double %70
%72 = load double, double* %15
%73 = fmul double %71, %72
%74 = load double, double* %15
%75 = fmul double %73, %74
%76 = load double, double* %6
%77 = fmul double %76, 3.500000e-01
%78 = fdiv double %75, %77
store double %78, double* %9
%79 = load double, double* %8
%80 = load double, double* %9
%81 = fdiv double %79, %80
store double %81, double* %10
%82 = load double, double* %7
%83 = load double, double* %9
%84 = fdiv double %82, %83
store double %84, double* %11
%85 = load double, double* %5
%86 = load double, double* %15
%87 = fdiv double %86, 3.500000e-01
%88 = load double, double* %20
%89 = load double, double* %10
%90 = load double, double* %11
%91 = call double @psi_m_stable(double %89, double %90)
%92 = fsub double %88, %91
%93 = fneg double %87
%94 = call double @llvm.fmuladd.f64(double %93, double %92, double %85)
store double %94, double* %18
%95 = load double, double* %15
store double %95, double* %13
%96 = load double, double* %15
%97 = load double, double* %14
%98 = fsub double %96, %97
store double %98, double* %19
br label %99
99: ; preds = %140, %51
%100 = load double, double* %15
%101 = load double, double* %18
%102 = load double, double* %19
%103 = fmul double %101, %102
%104 = load double, double* %18
%105 = load double, double* %17
%106 = fsub double %104, %105
%107 = fdiv double %103, %106
%108 = fsub double %100, %107
store double %108, double* %16
%109 = load double, double* %18
store double %109, double* %17
%110 = load double, double* %15
store double %110, double* %14
%111 = load double, double* %16
store double %111, double* %15
%112 = load double, double* %15
%113 = fneg double %112
%114 = load double, double* %15
%115 = fmul double %113, %114
%116 = load double, double* %15
%117 = fmul double %115, %116
%118 = load double, double* %6
%119 = fmul double %118, 3.500000e-01
%120 = fdiv double %117, %119
store double %120, double* %9
%121 = load double, double* %8
%122 = load double, double* %9
%123 = fdiv double %121, %122
store double %123, double* %10
%124 = load double, double* %7
%125 = load double, double* %9
%126 = fdiv double %124, %125
store double %126, double* %11
%127 = load double, double* %5
%128 = load double, double* %15
%129 = fdiv double %128, 3.500000e-01
%130 = load double, double* %20
%131 = load double, double* %10
%132 = load double, double* %11
%133 = call double @psi_m_stable(double %131, double %132)
%134 = fsub double %130, %133
%135 = fneg double %129
%136 = call double @llvm.fmuladd.f64(double %135, double %134, double %127)
store double %136, double* %18
%137 = load double, double* %15
%138 = load double, double* %14
%139 = fsub double %137, %138
store double %139, double* %19
br label %140
140: ; preds = %99
%141 = load double, double* %19
%142 = call i32 @fabs(double %141)
%143 = sitofp i32 %142 to double
%144 = fcmp ogt double %143, 1.000000e-10
br i1 %144, label %99, label %145
145: ; preds = %140
br label %241
146: ; preds = %33
%147 = load double, double* %5
%148 = load double, double* %14
%149 = fdiv double %148, 3.500000e-01
%150 = load double, double* %20
%151 = load double, double* %10
%152 = load double, double* %11
%153 = call double @psi_m_unstable(double %151, double %152)
%154 = fsub double %150, %153
%155 = fneg double %149
%156 = call double @llvm.fmuladd.f64(double %155, double %154, double %147)
store double %156, double* %17
%157 = load double, double* %5
%158 = fmul double %157, 3.500000e-01
%159 = load double, double* %20
%160 = load double, double* %10
%161 = load double, double* %11
%162 = call double @psi_m_unstable(double %160, double %161)
%163 = fsub double %159, %162
%164 = fdiv double %158, %163
store double %164, double* %15
%165 = load double, double* %15
%166 = fneg double %165
%167 = load double, double* %15
%168 = fmul double %166, %167
%169 = load double, double* %15
%170 = fmul double %168, %169
%171 = load double, double* %6
%172 = fmul double %171, 3.500000e-01
%173 = fdiv double %170, %172
store double %173, double* %9
%174 = load double, double* %8
%175 = load double, double* %9
%176 = fdiv double %174, %175
store double %176, double* %10
%177 = load double, double* %7
%178 = load double, double* %9
%179 = fdiv double %177, %178
store double %179, double* %11
%180 = load double, double* %5
%181 = load double, double* %15
%182 = fdiv double %181, 3.500000e-01
%183 = load double, double* %20
%184 = load double, double* %10
%185 = load double, double* %11
%186 = call double @psi_m_unstable(double %184, double %185)
%187 = fsub double %183, %186
%188 = fneg double %182
%189 = call double @llvm.fmuladd.f64(double %188, double %187, double %180)
store double %189, double* %18
%190 = load double, double* %15
store double %190, double* %13
%191 = load double, double* %15
%192 = load double, double* %14
%193 = fsub double %191, %192
store double %193, double* %19
br label %194
194: ; preds = %235, %146
%195 = load double, double* %15
%196 = load double, double* %18
%197 = load double, double* %19
%198 = fmul double %196, %197
%199 = load double, double* %18
%200 = load double, double* %17
%201 = fsub double %199, %200
%202 = fdiv double %198, %201
%203 = fsub double %195, %202
store double %203, double* %16
%204 = load double, double* %18
store double %204, double* %17
%205 = load double, double* %15
store double %205, double* %14
%206 = load double, double* %16
store double %206, double* %15
%207 = load double, double* %15
%208 = fneg double %207
%209 = load double, double* %15
%210 = fmul double %208, %209
%211 = load double, double* %15
%212 = fmul double %210, %211
%213 = load double, double* %6
%214 = fmul double %213, 3.500000e-01
%215 = fdiv double %212, %214
store double %215, double* %9
%216 = load double, double* %8
%217 = load double, double* %9
%218 = fdiv double %216, %217
store double %218, double* %10
%219 = load double, double* %7
%220 = load double, double* %9
%221 = fdiv double %219, %220
store double %221, double* %11
%222 = load double, double* %5
%223 = load double, double* %15
%224 = fdiv double %223, 3.500000e-01
%225 = load double, double* %20
%226 = load double, double* %10
%227 = load double, double* %11
%228 = call double @psi_m_unstable(double %226, double %227)
%229 = fsub double %225, %228
%230 = fneg double %224
%231 = call double @llvm.fmuladd.f64(double %230, double %229, double %222)
store double %231, double* %18
%232 = load double, double* %15
%233 = load double, double* %14
%234 = fsub double %232, %233
store double %234, double* %19
br label %235
235: ; preds = %194
%236 = load double, double* %19
%237 = call i32 @fabs(double %236)
%238 = sitofp i32 %237 to double
%239 = fcmp ogt double %238, 1.000000e-10
br i1 %239, label %194, label %240
240: ; preds = %235
br label %241
241: ; preds = %240, %145
br label %244
242: ; preds = %4
%243 = load double, double* %14
store double %243, double* %13
br label %244
244: ; preds = %242, %241
%245 = load double, double* %13
ret double %245
}

LLVM IR (-O2):
define double @compute_ustar(double %0, double %1, double %2, double %3) {
%5 = fdiv double %3, %2
%6 = tail call double @log(double %5)
%7 = fmul double %0, 3.500000e-01
%8 = fdiv double %7, %6
%9 = tail call i32 @fabs(double %1)
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %120
11: ; preds = %4
%12 = fneg double %8
%13 = fmul double %8, %12
%14 = fmul double %8, %13
%15 = fmul double %1, 3.500000e-01
%16 = fdiv double %14, %15
%17 = fdiv double %3, %16
%18 = fdiv double %2, %16
%19 = fcmp ult double %17, 0.000000e+00
br i1 %19, label %70, label %20
20: ; preds = %11
%21 = tail call double @psi_m_stable(double %17, double %18)
%22 = tail call double @psi_m_stable(double %17, double %18)
%23 = fsub double %6, %22
%24 = fdiv double %7, %23
%25 = fneg double %24
%26 = fmul double %24, %25
%27 = fmul double %24, %26
%28 = fdiv double %27, %15
%29 = fdiv double %3, %28
%30 = fdiv double %2, %28
%31 = tail call double @psi_m_stable(double %29, double %30)
%32 = insertelement <2 x double> poison, double %6, i64 0
%33 = shufflevector <2 x double> %32, <2 x double> poison, <2 x i32> zeroinitializer
%34 = insertelement <2 x double> poison, double %31, i64 0
%35 = insertelement <2 x double> %34, double %21, i64 1
%36 = fsub <2 x double> %33, %35
%37 = insertelement <2 x double> poison, double %24, i64 0
%38 = insertelement <2 x double> %37, double %8, i64 1
%39 = fdiv <2 x double> %38, <double -3.500000e-01, double -3.500000e-01>
%40 = insertelement <2 x double> poison, double %0, i64 0
%41 = shufflevector <2 x double> %40, <2 x double> poison, <2 x i32> zeroinitializer
%42 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %39, <2 x double> %36, <2 x double> %41)
%43 = fsub double %24, %8
br label %44
44: ; preds = %44, %20
%45 = phi double [ %24, %20 ], [ %54, %44 ]
%46 = phi double [ %43, %20 ], [ %65, %44 ]
%47 = phi <2 x double> [ %42, %20 ], [ %69, %44 ]
%48 = extractelement <2 x double> %47, i64 0
%49 = fmul double %48, %46
%50 = shufflevector <2 x double> %47, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%51 = fsub <2 x double> %47, %50
%52 = extractelement <2 x double> %51, i64 0
%53 = fdiv double %49, %52
%54 = fsub double %45, %53
%55 = fneg double %54
%56 = fmul double %54, %55
%57 = fmul double %54, %56
%58 = fdiv double %57, %15
%59 = fdiv double %3, %58
%60 = fdiv double %2, %58
%61 = tail call double @psi_m_stable(double %59, double %60)
%62 = fsub double %6, %61
%63 = fdiv double %54, -3.500000e-01
%64 = tail call double @llvm.fmuladd.f64(double %63, double %62, double %0)
%65 = fsub double %54, %45
%66 = tail call i32 @fabs(double %65)
%67 = icmp sgt i32 %66, 0
%68 = insertelement <2 x double> poison, double %64, i64 0
%69 = shufflevector <2 x double> %68, <2 x double> %47, <2 x i32> <i32 0, i32 2>
br i1 %67, label %44, label %120
70: ; preds = %11
%71 = tail call double @psi_m_unstable(double %17, double %18)
%72 = tail call double @psi_m_unstable(double %17, double %18)
%73 = fsub double %6, %72
%74 = fdiv double %7, %73
%75 = fneg double %74
%76 = fmul double %74, %75
%77 = fmul double %74, %76
%78 = fdiv double %77, %15
%79 = fdiv double %3, %78
%80 = fdiv double %2, %78
%81 = tail call double @psi_m_unstable(double %79, double %80)
%82 = insertelement <2 x double> poison, double %6, i64 0
%83 = shufflevector <2 x double> %82, <2 x double> poison, <2 x i32> zeroinitializer
%84 = insertelement <2 x double> poison, double %81, i64 0
%85 = insertelement <2 x double> %84, double %71, i64 1
%86 = fsub <2 x double> %83, %85
%87 = insertelement <2 x double> poison, double %74, i64 0
%88 = insertelement <2 x double> %87, double %8, i64 1
%89 = fdiv <2 x double> %88, <double -3.500000e-01, double -3.500000e-01>
%90 = insertelement <2 x double> poison, double %0, i64 0
%91 = shufflevector <2 x double> %90, <2 x double> poison, <2 x i32> zeroinitializer
%92 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %89, <2 x double> %86, <2 x double> %91)
%93 = fsub double %74, %8
br label %94
94: ; preds = %94, %70
%95 = phi double [ %74, %70 ], [ %104, %94 ]
%96 = phi double [ %93, %70 ], [ %115, %94 ]
%97 = phi <2 x double> [ %92, %70 ], [ %119, %94 ]
%98 = extractelement <2 x double> %97, i64 0
%99 = fmul double %98, %96
%100 = shufflevector <2 x double> %97, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%101 = fsub <2 x double> %97, %100
%102 = extractelement <2 x double> %101, i64 0
%103 = fdiv double %99, %102
%104 = fsub double %95, %103
%105 = fneg double %104
%106 = fmul double %104, %105
%107 = fmul double %104, %106
%108 = fdiv double %107, %15
%109 = fdiv double %3, %108
%110 = fdiv double %2, %108
%111 = tail call double @psi_m_unstable(double %109, double %110)
%112 = fsub double %6, %111
%113 = fdiv double %104, -3.500000e-01
%114 = tail call double @llvm.fmuladd.f64(double %113, double %112, double %0)
%115 = fsub double %104, %95
%116 = tail call i32 @fabs(double %115)
%117 = icmp sgt i32 %116, 0
%118 = insertelement <2 x double> poison, double %114, i64 0
%119 = shufflevector <2 x double> %118, <2 x double> %97, <2 x i32> <i32 0, i32 2>
br i1 %117, label %94, label %120
120: ; preds = %44, %94, %4
%121 = phi double [ %8, %4 ], [ %74, %94 ], [ %24, %44 ]
ret double %121
}