#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 /*<<< orphan*/ abort();
int /*<<< orphan*/ assert(int);
double cnd(double);
double exp(double);
double gbs_call(double, double, double, double, double, double);
double gbs_put(double, double, double, double, double, double);
double log(double);
double pow(double, double);
double sqrt(double);
double SoftBarrier(int typeflag, double S, double X, double L, double U,
                   double T, double r, double b, double v) {
  double eta, SX, sT, vsT, vv, UU, LL, mu, lambda1, lambda2, d1, d2, d3, d4, e1,
      e2, e3, e4, w;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((X) == (X)) && (X) >= 0.000001 && (X) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((b) == (b)) && (b) >= -1000.0 && (b) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  assert(U != L);
  SX = S * X;
  sT = sqrt(T);
  vsT = v * sT;
  vv = v * v;
  UU = U * U;
  LL = L * L;
  if (typeflag == 1 || typeflag == 2)
    eta = 1.0;
  else
    eta = -1.0;
  mu = (b + vv / 2.0) / vv;
  lambda1 = exp(-0.5 * vv * T * (mu + 0.5) * (mu - 0.5));
  lambda2 = exp(-0.5 * vv * T * (mu - 0.5) * (mu - 1.5));
  d1 = log(UU / SX) / vsT + mu * vsT;
  d2 = d1 - (mu + 0.5) * vsT;
  d3 = log(UU / SX) / vsT + (mu - 1.0) * vsT;
  d4 = d3 - (mu - 0.5) * vsT;
  e1 = log(LL / SX) / vsT + mu * vsT;
  e2 = e1 - (mu + 0.5) * vsT;
  e3 = log(LL / SX) / vsT + (mu - 1.0) * vsT;
  e4 = e3 - (mu - 0.5) * vsT;
  w = eta * 1.0 / (U - L) *
      (S * exp((b - r) * T) * pow(S, (-2.0 * mu)) * pow(SX, (mu + 0.5)) /
           (2.0 * (mu + 0.5)) *
           (pow(UU / SX, mu + 0.5) * cnd(eta * d1) - lambda1 * cnd(eta * d2) -
            pow(LL / SX, mu + 0.5) * cnd(eta * e1) + lambda1 * cnd(eta * e2)) -
       X * exp(-r * T) * pow(S, (-2.0 * (mu - 1.0))) * pow(SX, mu - 0.5) /
           (2.0 * (mu - 0.5)) *
           (pow(UU / SX, mu - 0.5) * cnd(eta * d3) - lambda2 * cnd(eta * d4) -
            pow(LL / SX, mu - 0.5) * cnd(eta * e3) + lambda2 * cnd(eta * e4)));
  assert(((w) == (w)));
  if (typeflag == 1 || typeflag == 7)
    return w;
  else if (typeflag == 2)
    return gbs_call(S, X, T, r, b, v) - w;
  else if (typeflag == 8)
    return gbs_put(S, X, T, r, b, v) - w;
  else
    abort();
}


x86 assembly (clang, -O0):
<SoftBarrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1b0,%rsp
mov    %edi,-0xc(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
movsd  %xmm4,-0x38(%rbp)
movsd  %xmm5,-0x40(%rbp)
movsd  %xmm6,-0x48(%rbp)
movsd  %xmm7,-0x50(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0xe9(%rbp)
jne    1219 <SoftBarrier+0x89>
jp     1219 <SoftBarrier+0x89>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe0d(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xe9(%rbp)
jb     1219 <SoftBarrier+0x89>
movsd  0xdfd(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0xe9(%rbp)
mov    -0xe9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0xea(%rbp)
jne    127c <SoftBarrier+0xec>
jp     127c <SoftBarrier+0xec>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xea(%rbp)
jb     127c <SoftBarrier+0xec>
movsd  0xd9a(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
setae  %al
mov    %al,-0xea(%rbp)
mov    -0xea(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0xeb(%rbp)
jne    12df <SoftBarrier+0x14f>
jp     12df <SoftBarrier+0x14f>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd57(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xeb(%rbp)
jb     12df <SoftBarrier+0x14f>
movsd  0xd47(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0xeb(%rbp)
mov    -0xeb(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0xec(%rbp)
jne    133d <SoftBarrier+0x1ad>
jp     133d <SoftBarrier+0x1ad>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xec(%rbp)
jb     133d <SoftBarrier+0x1ad>
movsd  0xcf1(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0xec(%rbp)
mov    -0xec(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0xed(%rbp)
jne    13a0 <SoftBarrier+0x210>
jp     13a0 <SoftBarrier+0x210>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
movsd  0xcae(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xed(%rbp)
jb     13a0 <SoftBarrier+0x210>
movsd  0xc8e(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
setae  %al
mov    %al,-0xed(%rbp)
mov    -0xed(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x50(%rbp),%xmm0
mov    %al,-0xee(%rbp)
jne    1403 <SoftBarrier+0x273>
jp     1403 <SoftBarrier+0x273>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
movsd  0xc53(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xee(%rbp)
jb     1403 <SoftBarrier+0x273>
movsd  0xc43(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
setae  %al
mov    %al,-0xee(%rbp)
mov    -0xee(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x30(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
call   10b0 <sqrt@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cmpl   $0x1,-0xc(%rbp)
je     14a0 <SoftBarrier+0x310>
cmpl   $0x2,-0xc(%rbp)
jne    14b2 <SoftBarrier+0x322>
movsd  0xba0(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    14bf <SoftBarrier+0x32f>
movsd  0xb86(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  0xb87(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xb82(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  0xb50(%rip),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0xb34(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1070 <exp@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xb37(%rip),%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0xafd(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0xafd(%rip),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1070 <exp@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x70(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  0xa8c(%rip),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x70(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xa29(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xa00(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x60(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x70(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  0x989(%rip),%xmm0
addsd  -0x90(%rbp),%xmm0
ff
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x60(%rbp),%xmm0
call   1080 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x70(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  0x923(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x70(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0xd8(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  0x8fa(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  -0x70(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  0x8ba(%rip),%xmm0
mulsd  -0x58(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x1b0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1070 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x1b0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  0x872(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1a8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  0x831(%rip),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x1a0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  0x80d(%rip),%xmm2
addsd  -0x90(%rbp),%xmm2
ff
movsd  0x805(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  0x7db(%rip),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
call   10a0 <pow@plt>
movsd  %xmm0,-0x188(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xb0(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x198(%rbp),%xmm1
ff
movsd  -0x190(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x188(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x60(%rbp),%xmm0
movsd  0x72f(%rip),%xmm1
addsd  -0x90(%rbp),%xmm1
ff
call   10a0 <pow@plt>
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xc8(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x180(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x178(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0x168(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xd0(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x170(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x168(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1070 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x160(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  0x622(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0x62e(%rip),%xmm1
mulsd  %xmm2,%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x158(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0x5e9(%rip),%xmm2
subsd  %xmm2,%xmm1
call   10a0 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x150(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm2
ff
movsd  0x5c1(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  0x5bd(%rip),%xmm1
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0x58b(%rip),%xmm2
subsd  %xmm2,%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x148(%rbp),%xmm1
ff
movsd  -0x140(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
divsd  -0x60(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movsd  0x4db(%rip),%xmm2
subsd  %xmm2,%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xd8(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x130(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x128(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0xe0(%rbp),%xmm0
ff
call   1090 <cnd@plt>
movsd  -0x120(%rbp),%xmm4
ff
movsd  -0x118(%rbp),%xmm5
ff
movsd  -0x110(%rbp),%xmm2
ff
movsd  -0x108(%rbp),%xmm1
ff
movsd  -0x100(%rbp),%xmm3
ff
movaps %xmm0,%xmm6
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm6,%xmm4
addsd  %xmm5,%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
ucomisd -0xe8(%rbp),%xmm0
ff
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
cmpl   $0x1,-0xc(%rbp)
je     1c94 <SoftBarrier+0xb04>
cmpl   $0x7,-0xc(%rbp)
jne    1ca6 <SoftBarrier+0xb16>
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1d2b <SoftBarrier+0xb9b>
cmpl   $0x2,-0xc(%rbp)
jne    1ce5 <SoftBarrier+0xb55>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
call   1040 <gbs_call@plt>
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1d2b <SoftBarrier+0xb9b>
cmpl   $0x8,-0xc(%rbp)
jne    1d24 <SoftBarrier+0xb94>
movsd  -0x18(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  -0x50(%rbp),%xmm5
call   1050 <gbs_put@plt>
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1d2b <SoftBarrier+0xb9b>
mov    $0x0,%al
call   1030 <abort@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x1b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SoftBarrier>:
push   %rbx
sub    $0x130,%rsp
movsd  %xmm0,0x48(%rsp)
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe53(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe4d(%rip),%xmm8
ucomisd %xmm0,%xmm8
movsd  %xmm7,0x58(%rsp)
movsd  %xmm6,0x40(%rsp)
movaps %xmm5,0xc0(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x70(%rsp)
movsd  %xmm1,0x38(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  0x38(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdf0(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xdeb(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xdcd(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xdc8(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1060 <assert@plt>
xorpd  %xmm0,%xmm0
movapd 0xc0(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xda3(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1060 <assert@plt>
movsd  0x40(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd85(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd70(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  0x58(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xd5a(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xd55(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1060 <assert@plt>
movsd  0x10(%rsp),%xmm0
cmpneqsd 0x70(%rsp),%xmm0
movq   %xmm0,%rdi
and    $0x1,%edi
call   1060 <assert@plt>
movsd  0x20(%rsp),%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
ucomisd 0xd3a(%rip),%xmm1
jb     1339 <SoftBarrier+0x1a9>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1348 <SoftBarrier+0x1b8>
movapd %xmm1,%xmm0
call   10b0 <sqrt@plt>
movsd  0x20(%rsp),%xmm1
movsd  0x58(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x28(%rsp)
movapd %xmm2,%xmm4
mulsd  %xmm2,%xmm4
movsd  0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x70(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x50(%rsp)
add    $0xffffffff,%ebx
xor    %eax,%eax
cmp    $0x2,%ebx
setb   %al
lea    0xcde(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0xc9b(%rip),%xmm3
movapd %xmm4,%xmm0
mulsd  %xmm3,%xmm4
addsd  0x40(%rsp),%xmm4
divsd  %xmm0,%xmm4
movsd  %xmm4,(%rsp)
movsd  0xc84(%rip),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0xb0(%rsp)
addsd  %xmm4,%xmm3
movapd %xmm3,0x60(%rsp)
mulsd  %xmm3,%xmm0
addsd  %xmm4,%xmm2
movapd %xmm2,0x80(%rsp)
mulsd  %xmm2,%xmm0
call   1070 <exp@plt>
movsd  %xmm0,0xd8(%rsp)
movsd  0xb0(%rsp),%xmm1
mulsd  0x80(%rsp),%xmm1
movsd  0xc34(%rip),%xmm0
addsd  (%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1070 <exp@plt>
movsd  %xmm0,0xe0(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1080 <log@plt>
movsd  0x28(%rsp),%xmm2
divsd  %xmm2,%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,0x98(%rsp)
addsd  %xmm1,%xmm0
movsd  %xmm0,0xf8(%rsp)
movapd 0x60(%rsp),%xmm1
xorpd  0xbff(%rip),%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,0xa0(%rsp)
addsd  %xmm0,%xmm1
movapd %xmm1,0x110(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <log@plt>
movsd  0x28(%rsp),%xmm2
divsd  %xmm2,%xmm0
movsd  0xba0(%rip),%xmm1
addsd  (%rsp),%xmm1
movsd  %xmm1,0x100(%rsp)
mulsd  %xmm2,%xmm1
movsd  %xmm1,0xe8(%rsp)
addsd  %xmm1,%xmm0
movsd  %xmm0,0x108(%rsp)
movapd 0x80(%rsp),%xmm1
xorpd  0xb8f(%rip),%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,0xb0(%rsp)
addsd  %xmm0,%xmm1
movapd %xmm1,0x120(%rsp)
movsd  0x50(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
call   1080 <log@plt>
movapd %xmm0,%xmm1
divsd  0x28(%rsp),%xmm1
addsd  0x98(%rsp),%xmm1
movsd  %xmm1,0xf0(%rsp)
movapd 0xa0(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0xa0(%rsp)
movsd  0x50(%rsp),%xmm0
call   1080 <log@plt>
movapd %xmm0,%xmm1
divsd  0x28(%rsp),%xmm1
addsd  0xe8(%rsp),%xmm1
movsd  %xmm1,0x98(%rsp)
movapd 0xb0(%rsp),%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0xb0(%rsp)
movsd  0x10(%rsp),%xmm1
subsd  0x70(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x40(%rsp),%xmm0
subsd  0xc0(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1070 <exp@plt>
movapd %xmm0,%xmm1
movsd  0x48(%rsp),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm1
mulsd  0xa78(%rip),%xmm1
call   10a0 <pow@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x30(%rsp),%xmm0
movaps 0x60(%rsp),%xmm1
call   10a0 <pow@plt>
mulsd  (%rsp),%xmm0
movapd 0x60(%rsp),%xmm1
movapd %xmm1,%xmm2
addsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   10a0 <pow@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0xf8(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
movsd  %xmm0,(%rsp)
movapd 0x110(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0xd8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  0x70(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x50(%rsp),%xmm0
movaps 0x60(%rsp),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0xf0(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0x60(%rsp),%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd 0xa0(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0xd8(%rsp),%xmm0
addsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x98d(%rip),%xmm0
xorpd  0xc0(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1070 <exp@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x100(%rsp),%xmm1
mulsd  0x942(%rip),%xmm1
movsd  0x48(%rsp),%xmm0
call   10a0 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x30(%rsp),%xmm0
movaps 0x80(%rsp),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,0x30(%rsp)
movapd 0x80(%rsp),%xmm1
movapd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
movsd  0x8(%rsp),%xmm0
call   10a0 <pow@plt>
movsd  %xmm0,0xa0(%rsp)
movsd  0x108(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x120(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0xe0(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xa0(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  0x50(%rsp),%xmm0
movaps 0x80(%rsp),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,0x80(%rsp)
movsd  0x98(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0x80(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movapd 0xb0(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1090 <cnd@plt>
mulsd  0xe0(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
divsd  0x70(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x28(%rsp),%xmm0
xor    %edi,%edi
movsd  %xmm0,(%rsp)
ucomisd %xmm0,%xmm0
setnp  %dil
call   1060 <assert@plt>
cmp    $0x7,%ebx
ja     18ff <SoftBarrier+0x76f>
lea    0x80c(%rip),%rax
movslq (%rax,%rbx,4),%rcx
add    %rax,%rcx
jmp    *%rcx
movsd  0x48(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movapd 0xc0(%rsp),%xmm3
movsd  0x40(%rsp),%xmm4
movsd  0x58(%rsp),%xmm5
call   1040 <gbs_call@plt>
jmp    18e7 <SoftBarrier+0x757>
movsd  0x48(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
movapd 0xc0(%rsp),%xmm3
movsd  0x40(%rsp),%xmm4
movsd  0x58(%rsp),%xmm5
call   1050 <gbs_put@plt>
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsp),%xmm0
add    $0x130,%rsp
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define double @SoftBarrier(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca double
%11 = alloca i32
%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
%28 = alloca double
%29 = alloca double
%30 = alloca double
%31 = alloca double
%32 = alloca double
%33 = alloca double
%34 = alloca double
%35 = alloca double
%36 = alloca double
%37 = alloca double
%38 = alloca double
store i32 %0, i32* %11
store double %1, double* %12
store double %2, double* %13
store double %3, double* %14
store double %4, double* %15
store double %5, double* %16
store double %6, double* %17
store double %7, double* %18
store double %8, double* %19
%39 = load double, double* %12
%40 = load double, double* %12
%41 = fcmp oeq double %39, %40
br i1 %41, label %42, label %48
42: ; preds = %9
%43 = load double, double* %12
%44 = fcmp oge double %43, 0x3EB0C6F7A0B5ED8D
br i1 %44, label %45, label %48
45: ; preds = %42
%46 = load double, double* %12
%47 = fcmp ole double %46, 1.000000e+12
br label %48
48: ; preds = %45, %42, %9
%49 = phi i1 [ false, %42 ], [ false, %9 ], [ %47, %45 ]
%50 = zext i1 %49 to i32
%51 = call i32 @assert(i32 %50)
%52 = load double, double* %13
%53 = load double, double* %13
%54 = fcmp oeq double %52, %53
br i1 %54, label %55, label %61
55: ; preds = %48
%56 = load double, double* %13
%57 = fcmp oge double %56, 0x3EB0C6F7A0B5ED8D
br i1 %57, label %58, label %61
58: ; preds = %55
%59 = load double, double* %13
%60 = fcmp ole double %59, 1.000000e+12
br label %61
61: ; preds = %58, %55, %48
%62 = phi i1 [ false, %55 ], [ false, %48 ], [ %60, %58 ]
%63 = zext i1 %62 to i32
%64 = call i32 @assert(i32 %63)
%65 = load double, double* %16
%66 = load double, double* %16
%67 = fcmp oeq double %65, %66
br i1 %67, label %68, label %74
68: ; preds = %61
%69 = load double, double* %16
%70 = fcmp oge double %69, 0x3F2596179C29D2CE
br i1 %70, label %71, label %74
71: ; preds = %68
%72 = load double, double* %16
%73 = fcmp ole double %72, 2.000000e+01
br label %74
74: ; preds = %71, %68, %61
%75 = phi i1 [ false, %68 ], [ false, %61 ], [ %73, %71 ]
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = load double, double* %17
%79 = load double, double* %17
%80 = fcmp oeq double %78, %79
br i1 %80, label %81, label %87
81: ; preds = %74
%82 = load double, double* %17
%83 = fcmp oge double %82, 0.000000e+00
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load double, double* %17
%86 = fcmp ole double %85, 1.000000e+03
br label %87
87: ; preds = %84, %81, %74
%88 = phi i1 [ false, %81 ], [ false, %74 ], [ %86, %84 ]
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = load double, double* %18
%92 = load double, double* %18
%93 = fcmp oeq double %91, %92
br i1 %93, label %94, label %100
94: ; preds = %87
%95 = load double, double* %18
%96 = fcmp oge double %95, -1.000000e+03
br i1 %96, label %97, label %100
97: ; preds = %94
%98 = load double, double* %18
%99 = fcmp ole double %98, 1.000000e+03
br label %100
100: ; preds = %97, %94, %87
%101 = phi i1 [ false, %94 ], [ false, %87 ], [ %99, %97 ]
%102 = zext i1 %101 to i32
%103 = call i32 @assert(i32 %102)
%104 = load double, double* %19
%105 = load double, double* %19
%106 = fcmp oeq double %104, %105
br i1 %106, label %107, label %113
107: ; preds = %100
%108 = load double, double* %19
%109 = fcmp oge double %108, 0x3E7AD7F29ABCAF48
br i1 %109, label %110, label %113
110: ; preds = %107
%111 = load double, double* %19
%112 = fcmp ole double %111, 0x40593FFFD60E94EE
br label %113
113: ; preds = %110, %107, %100
%114 = phi i1 [ false, %107 ], [ false, %100 ], [ %112, %110 ]
%115 = zext i1 %114 to i32
%116 = call i32 @assert(i32 %115)
%117 = load double, double* %15
%118 = load double, double* %14
%119 = fcmp une double %117, %118
%120 = zext i1 %119 to i32
%121 = call i32 @assert(i32 %120)
%122 = load double, double* %12
%123 = load double, double* %13
%124 = fmul double %122, %123
store double %124, double* %21
%125 = load double, double* %16
%126 = call double @sqrt(double %125)
store double %126, double* %22
%127 = load double, double* %19
%128 = load double, double* %22
%129 = fmul double %127, %128
store double %129, double* %23
%130 = load double, double* %19
%131 = load double, double* %19
%132 = fmul double %130, %131
store double %132, double* %24
%133 = load double, double* %15
%134 = load double, double* %15
%135 = fmul double %133, %134
store double %135, double* %25
%136 = load double, double* %14
%137 = load double, double* %14
%138 = fmul double %136, %137
store double %138, double* %26
%139 = load i32, i32* %11
%140 = icmp eq i32 %139, 1
br i1 %140, label %144, label %141
141: ; preds = %113
%142 = load i32, i32* %11
%143 = icmp eq i32 %142, 2
br i1 %143, label %144, label %145
144: ; preds = %141, %113
store double 1.000000e+00, double* %20
br label %146
145: ; preds = %141
store double -1.000000e+00, double* %20
br label %146
146: ; preds = %145, %144
%147 = load double, double* %18
%148 = load double, double* %24
%149 = fdiv double %148, 2.000000e+00
%150 = fadd double %147, %149
%151 = load double, double* %24
%152 = fdiv double %150, %151
store double %152, double* %27
%153 = load double, double* %24
%154 = fmul double -5.000000e-01, %153
%155 = load double, double* %16
%156 = fmul double %154, %155
%157 = load double, double* %27
%158 = fadd double %157, 5.000000e-01
%159 = fmul double %156, %158
%160 = load double, double* %27
%161 = fsub double %160, 5.000000e-01
%162 = fmul double %159, %161
%163 = call double @exp(double %162)
store double %163, double* %28
%164 = load double, double* %24
%165 = fmul double -5.000000e-01, %164
%166 = load double, double* %16
%167 = fmul double %165, %166
%168 = load double, double* %27
%169 = fsub double %168, 5.000000e-01
%170 = fmul double %167, %169
%171 = load double, double* %27
%172 = fsub double %171, 1.500000e+00
%173 = fmul double %170, %172
%174 = call double @exp(double %173)
store double %174, double* %29
%175 = load double, double* %25
%176 = load double, double* %21
%177 = fdiv double %175, %176
%178 = call double @log(double %177)
%179 = load double, double* %23
%180 = fdiv double %178, %179
%181 = load double, double* %27
%182 = load double, double* %23
%183 = call double @llvm.fmuladd.f64(double %181, double %182, double %180)
store double %183, double* %30
%184 = load double, double* %30
%185 = load double, double* %27
%186 = fadd double %185, 5.000000e-01
%187 = load double, double* %23
%188 = fneg double %186
%189 = call double @llvm.fmuladd.f64(double %188, double %187, double %184)
store double %189, double* %31
%190 = load double, double* %25
%191 = load double, double* %21
%192 = fdiv double %190, %191
%193 = call double @log(double %192)
%194 = load double, double* %23
%195 = fdiv double %193, %194
%196 = load double, double* %27
%197 = fsub double %196, 1.000000e+00
%198 = load double, double* %23
%199 = call double @llvm.fmuladd.f64(double %197, double %198, double %195)
store double %199, double* %32
%200 = load double, double* %32
%201 = load double, double* %27
%202 = fsub double %201, 5.000000e-01
%203 = load double, double* %23
%204 = fneg double %202
%205 = call double @llvm.fmuladd.f64(double %204, double %203, double %200)
store double %205, double* %33
%206 = load double, double* %26
%207 = load double, double* %21
%208 = fdiv double %206, %207
%209 = call double @log(double %208)
%210 = load double, double* %23
%211 = fdiv double %209, %210
%212 = load double, double* %27
%213 = load double, double* %23
%214 = call double @llvm.fmuladd.f64(double %212, double %213, double %211)
store double %214, double* %34
%215 = load double, double* %34
%216 = load double, double* %27
%217 = fadd double %216, 5.000000e-01
%218 = load double, double* %23
%219 = fneg double %217
%220 = call double @llvm.fmuladd.f64(double %219, double %218, double %215)
store double %220, double* %35
%221 = load double, double* %26
%222 = load double, double* %21
%223 = fdiv double %221, %222
%224 = call double @log(double %223)
%225 = load double, double* %23
%226 = fdiv double %224, %225
%227 = load double, double* %27
%228 = fsub double %227, 1.000000e+00
%229 = load double, double* %23
%230 = call double @llvm.fmuladd.f64(double %228, double %229, double %226)
store double %230, double* %36
%231 = load double, double* %36
%232 = load double, double* %27
%233 = fsub double %232, 5.000000e-01
%234 = load double, double* %23
%235 = fneg double %233
%236 = call double @llvm.fmuladd.f64(double %235, double %234, double %231)
store double %236, double* %37
%237 = load double, double* %20
%238 = fmul double %237, 1.000000e+00
%239 = load double, double* %15
%240 = load double, double* %14
%241 = fsub double %239, %240
%242 = fdiv double %238, %241
%243 = load double, double* %12
%244 = load double, double* %18
%245 = load double, double* %17
%246 = fsub double %244, %245
%247 = load double, double* %16
%248 = fmul double %246, %247
%249 = call double @exp(double %248)
%250 = fmul double %243, %249
%251 = load double, double* %12
%252 = load double, double* %27
%253 = fmul double -2.000000e+00, %252
%254 = call double @pow(double %251, double %253)
%255 = fmul double %250, %254
%256 = load double, double* %21
%257 = load double, double* %27
%258 = fadd double %257, 5.000000e-01
%259 = call double @pow(double %256, double %258)
%260 = fmul double %255, %259
%261 = load double, double* %27
%262 = fadd double %261, 5.000000e-01
%263 = fmul double 2.000000e+00, %262
%264 = fdiv double %260, %263
%265 = load double, double* %25
%266 = load double, double* %21
%267 = fdiv double %265, %266
%268 = load double, double* %27
%269 = fadd double %268, 5.000000e-01
%270 = call double @pow(double %267, double %269)
%271 = load double, double* %20
%272 = load double, double* %30
%273 = fmul double %271, %272
%274 = call double @cnd(double %273)
%275 = load double, double* %28
%276 = load double, double* %20
%277 = load double, double* %31
%278 = fmul double %276, %277
%279 = call double @cnd(double %278)
%280 = fmul double %275, %279
%281 = fneg double %280
%282 = call double @llvm.fmuladd.f64(double %270, double %274, double %281)
%283 = load double, double* %26
%284 = load double, double* %21
%285 = fdiv double %283, %284
%286 = load double, double* %27
%287 = fadd double %286, 5.000000e-01
%288 = call double @pow(double %285, double %287)
%289 = load double, double* %20
%290 = load double, double* %34
%291 = fmul double %289, %290
%292 = call double @cnd(double %291)
%293 = fneg double %288
%294 = call double @llvm.fmuladd.f64(double %293, double %292, double %282)
%295 = load double, double* %28
%296 = load double, double* %20
%297 = load double, double* %35
%298 = fmul double %296, %297
%299 = call double @cnd(double %298)
%300 = call double @llvm.fmuladd.f64(double %295, double %299, double %294)
%301 = load double, double* %13
%302 = load double, double* %17
%303 = fneg double %302
%304 = load double, double* %16
%305 = fmul double %303, %304
%306 = call double @exp(double %305)
%307 = fmul double %301, %306
%308 = load double, double* %12
%309 = load double, double* %27
%310 = fsub double %309, 1.000000e+00
%311 = fmul double -2.000000e+00, %310
%312 = call double @pow(double %308, double %311)
%313 = fmul double %307, %312
%314 = load double, double* %21
%315 = load double, double* %27
%316 = fsub double %315, 5.000000e-01
%317 = call double @pow(double %314, double %316)
%318 = fmul double %313, %317
%319 = load double, double* %27
%320 = fsub double %319, 5.000000e-01
%321 = fmul double 2.000000e+00, %320
%322 = fdiv double %318, %321
%323 = load double, double* %25
%324 = load double, double* %21
%325 = fdiv double %323, %324
%326 = load double, double* %27
%327 = fsub double %326, 5.000000e-01
%328 = call double @pow(double %325, double %327)
%329 = load double, double* %20
%330 = load double, double* %32
%331 = fmul double %329, %330
%332 = call double @cnd(double %331)
%333 = load double, double* %29
%334 = load double, double* %20
%335 = load double, double* %33
%336 = fmul double %334, %335
%337 = call double @cnd(double %336)
%338 = fmul double %333, %337
%339 = fneg double %338
%340 = call double @llvm.fmuladd.f64(double %328, double %332, double %339)
%341 = load double, double* %26
%342 = load double, double* %21
%343 = fdiv double %341, %342
%344 = load double, double* %27
%345 = fsub double %344, 5.000000e-01
%346 = call double @pow(double %343, double %345)
%347 = load double, double* %20
%348 = load double, double* %36
%349 = fmul double %347, %348
%350 = call double @cnd(double %349)
%351 = fneg double %346
%352 = call double @llvm.fmuladd.f64(double %351, double %350, double %340)
%353 = load double, double* %29
%354 = load double, double* %20
%355 = load double, double* %37
%356 = fmul double %354, %355
%357 = call double @cnd(double %356)
%358 = call double @llvm.fmuladd.f64(double %353, double %357, double %352)
%359 = fmul double %322, %358
%360 = fneg double %359
%361 = call double @llvm.fmuladd.f64(double %264, double %300, double %360)
%362 = fmul double %242, %361
store double %362, double* %38
%363 = load double, double* %38
%364 = load double, double* %38
%365 = fcmp oeq double %363, %364
%366 = zext i1 %365 to i32
%367 = call i32 @assert(i32 %366)
%368 = load i32, i32* %11
%369 = icmp eq i32 %368, 1
br i1 %369, label %373, label %370
370: ; preds = %146
%371 = load i32, i32* %11
%372 = icmp eq i32 %371, 7
br i1 %372, label %373, label %375
373: ; preds = %370, %146
%374 = load double, double* %38
store double %374, double* %10
br label %403
375: ; preds = %370
%376 = load i32, i32* %11
%377 = icmp eq i32 %376, 2
br i1 %377, label %378, label %388
378: ; preds = %375
%379 = load double, double* %12
%380 = load double, double* %13
%381 = load double, double* %16
%382 = load double, double* %17
%383 = load double, double* %18
%384 = load double, double* %19
%385 = call double @gbs_call(double %379, double %380, double %381, double %382, double %383, double %384)
%386 = load double, double* %38
%387 = fsub double %385, %386
store double %387, double* %10
br label %403
388: ; preds = %375
%389 = load i32, i32* %11
%390 = icmp eq i32 %389, 8
br i1 %390, label %391, label %401
391: ; preds = %388
%392 = load double, double* %12
%393 = load double, double* %13
%394 = load double, double* %16
%395 = load double, double* %17
%396 = load double, double* %18
%397 = load double, double* %19
%398 = call double @gbs_put(double %392, double %393, double %394, double %395, double %396, double %397)
%399 = load double, double* %38
%400 = fsub double %398, %399
store double %400, double* %10
br label %403
401: ; preds = %388
%402 = call i32 (...) @abort()
unreachable
403: ; preds = %391, %378, %373
%404 = load double, double* %10
ret double %404
}

LLVM IR (-O2):
define double @SoftBarrier(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fcmp ord double %1, 0.000000e+00
%11 = fcmp oge double %1, 0x3EB0C6F7A0B5ED8D
%12 = and i1 %10, %11
%13 = fcmp ole double %1, 1.000000e+12
%14 = and i1 %13, %12
%15 = zext i1 %14 to i32
%16 = tail call i32 @assert(i32 %15)
%17 = fcmp ord double %2, 0.000000e+00
%18 = fcmp oge double %2, 0x3EB0C6F7A0B5ED8D
%19 = and i1 %17, %18
%20 = fcmp ole double %2, 1.000000e+12
%21 = and i1 %20, %19
%22 = zext i1 %21 to i32
%23 = tail call i32 @assert(i32 %22)
%24 = fcmp ord double %5, 0.000000e+00
%25 = fcmp oge double %5, 0x3F2596179C29D2CE
%26 = and i1 %24, %25
%27 = fcmp ole double %5, 2.000000e+01
%28 = and i1 %27, %26
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = fcmp oge double %6, 0.000000e+00
%32 = fcmp ole double %6, 1.000000e+03
%33 = and i1 %31, %32
%34 = zext i1 %33 to i32
%35 = tail call i32 @assert(i32 %34)
%36 = fcmp ord double %7, 0.000000e+00
%37 = fcmp oge double %7, -1.000000e+03
%38 = and i1 %36, %37
%39 = fcmp ole double %7, 1.000000e+03
%40 = and i1 %39, %38
%41 = zext i1 %40 to i32
%42 = tail call i32 @assert(i32 %41)
%43 = fcmp ord double %8, 0.000000e+00
%44 = fcmp oge double %8, 0x3E7AD7F29ABCAF48
%45 = and i1 %43, %44
%46 = fcmp ole double %8, 0x40593FFFD60E94EE
%47 = and i1 %46, %45
%48 = zext i1 %47 to i32
%49 = tail call i32 @assert(i32 %48)
%50 = fcmp une double %4, %3
%51 = zext i1 %50 to i32
%52 = tail call i32 @assert(i32 %51)
%53 = fmul double %1, %2
%54 = tail call double @sqrt(double %5)
%55 = fmul double %54, %8
%56 = fmul double %8, %8
%57 = fmul double %4, %4
%58 = fmul double %3, %3
%59 = add i32 %0, -1
%60 = icmp ult i32 %59, 2
%61 = select i1 %60, double 1.000000e+00, double -1.000000e+00
%62 = fmul double %56, 5.000000e-01
%63 = fadd double %62, %7
%64 = fdiv double %63, %56
%65 = fmul double %56, -5.000000e-01
%66 = fmul double %65, %5
%67 = fadd double %64, 5.000000e-01
%68 = fmul double %66, %67
%69 = fadd double %64, -5.000000e-01
%70 = fmul double %69, %68
%71 = tail call double @exp(double %70)
%72 = fmul double %66, %69
%73 = fadd double %64, -1.500000e+00
%74 = fmul double %73, %72
%75 = tail call double @exp(double %74)
%76 = fdiv double %57, %53
%77 = tail call double @log(double %76)
%78 = fdiv double %77, %55
%79 = tail call double @llvm.fmuladd.f64(double %64, double %55, double %78)
%80 = fneg double %67
%81 = tail call double @llvm.fmuladd.f64(double %80, double %55, double %79)
%82 = tail call double @log(double %76)
%83 = fdiv double %82, %55
%84 = fadd double %64, -1.000000e+00
%85 = tail call double @llvm.fmuladd.f64(double %84, double %55, double %83)
%86 = fneg double %69
%87 = tail call double @llvm.fmuladd.f64(double %86, double %55, double %85)
%88 = fdiv double %58, %53
%89 = tail call double @log(double %88)
%90 = fdiv double %89, %55
%91 = tail call double @llvm.fmuladd.f64(double %64, double %55, double %90)
%92 = tail call double @llvm.fmuladd.f64(double %80, double %55, double %91)
%93 = tail call double @log(double %88)
%94 = fdiv double %93, %55
%95 = tail call double @llvm.fmuladd.f64(double %84, double %55, double %94)
%96 = tail call double @llvm.fmuladd.f64(double %86, double %55, double %95)
%97 = fsub double %4, %3
%98 = fdiv double %61, %97
%99 = fsub double %7, %6
%100 = fmul double %99, %5
%101 = tail call double @exp(double %100)
%102 = fmul double %101, %1
%103 = fmul double %64, -2.000000e+00
%104 = tail call double @pow(double %1, double %103)
%105 = fmul double %102, %104
%106 = tail call double @pow(double %53, double %67)
%107 = fmul double %105, %106
%108 = fmul double %67, 2.000000e+00
%109 = fdiv double %107, %108
%110 = tail call double @pow(double %76, double %67)
%111 = fmul double %61, %79
%112 = tail call double @cnd(double %111)
%113 = fmul double %61, %81
%114 = tail call double @cnd(double %113)
%115 = fneg double %71
%116 = fmul double %114, %115
%117 = tail call double @llvm.fmuladd.f64(double %110, double %112, double %116)
%118 = tail call double @pow(double %88, double %67)
%119 = fmul double %61, %91
%120 = tail call double @cnd(double %119)
%121 = fneg double %118
%122 = tail call double @llvm.fmuladd.f64(double %121, double %120, double %117)
%123 = fmul double %61, %92
%124 = tail call double @cnd(double %123)
%125 = tail call double @llvm.fmuladd.f64(double %71, double %124, double %122)
%126 = fneg double %6
%127 = fmul double %126, %5
%128 = tail call double @exp(double %127)
%129 = fmul double %84, -2.000000e+00
%130 = tail call double @pow(double %1, double %129)
%131 = tail call double @pow(double %53, double %69)
%132 = fmul double %69, 2.000000e+00
%133 = tail call double @pow(double %76, double %69)
%134 = fmul double %61, %85
%135 = tail call double @cnd(double %134)
%136 = fmul double %61, %87
%137 = tail call double @cnd(double %136)
%138 = fneg double %75
%139 = fmul double %137, %138
%140 = tail call double @llvm.fmuladd.f64(double %133, double %135, double %139)
%141 = tail call double @pow(double %88, double %69)
%142 = fmul double %61, %95
%143 = tail call double @cnd(double %142)
%144 = fneg double %141
%145 = tail call double @llvm.fmuladd.f64(double %144, double %143, double %140)
%146 = fmul double %61, %96
%147 = tail call double @cnd(double %146)
%148 = tail call double @llvm.fmuladd.f64(double %75, double %147, double %145)
%149 = fneg double %128
%150 = fmul double %149, %2
%151 = fmul double %150, %130
%152 = fmul double %151, %131
%153 = fdiv double %152, %132
%154 = fmul double %153, %148
%155 = tail call double @llvm.fmuladd.f64(double %109, double %125, double %154)
%156 = fmul double %98, %155
%157 = fcmp ord double %156, 0.000000e+00
%158 = zext i1 %157 to i32
%159 = tail call i32 @assert(i32 %158)
switch i32 %0, label %166 [
i32 7, label %168
i32 1, label %168
i32 2, label %160
i32 8, label %163
]
160: ; preds = %9
%161 = tail call double @gbs_call(double %1, double %2, double %5, double %6, double %7, double %8)
%162 = fsub double %161, %156
br label %168
163: ; preds = %9
%164 = tail call double @gbs_put(double %1, double %2, double %5, double %6, double %7, double %8)
%165 = fsub double %164, %156
br label %168
166: ; preds = %9
%167 = tail call i32 (...) @abort()
unreachable
168: ; preds = %9, %9, %163, %160
%169 = phi double [ %162, %160 ], [ %165, %163 ], [ %156, %9 ], [ %156, %9 ]
ret double %169
}