double TwoAssetBarrier(int typeflag, double S1, double S2, double X, double H,
                       double T, double r, double b1, double b2, double v1,
                       double v2, double Rho) {
  double sT, v2sT, logHS2, mu1, mu2, d1, d2, d3, d4, e1, e2, e3, e4, w;
  double eta;
  double phi;
  assert(((S1) == (S1)) && (S1) >= 0.000001 && (S1) <= 1000000000000.0);
  assert(((S2) == (S2)) && (S2) >= 0.000001 && (S2) <= 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(((b1) == (b1)) && (b1) >= -1000.0 && (b1) <= 1000.0);
  assert(((b2) == (b2)) && (b2) >= -1000.0 && (b2) <= 1000.0);
  assert(((v1) == (v1)) && (v1) >= 0.0000001 && v1 <= 100.99999);
  assert(((v2) == (v2)) && (v2) >= 0.0000001 && v2 <= 100.99999);
  sT = sqrt(T);
  v2sT = v2 * sT;
  logHS2 = log(H / S2);
  mu1 = b1 - ((v1) * (v1)) / 2.0;
  mu2 = b2 - ((v2) * (v2)) / 2.0;
  d1 = (log(S1 / X) + (mu1 + ((v1) * (v1))) * T) / (v1 * sT);
  d2 = d1 - v1 * sT;
  d3 = d1 + 2.0 * Rho * logHS2 / v2sT;
  d4 = d2 + 2.0 * Rho * logHS2 / v2sT;
  e1 = (logHS2 - (mu2 + Rho * v1 * v2) * T) / v2sT;
  e2 = e1 + Rho * v1 * sT;
  e3 = e1 - 2.0 * logHS2 / v2sT;
  e4 = e2 - 2.0 * logHS2 / v2sT;
  switch (typeflag) {
  case 4:
  case 3:
    eta = phi = 1;
    break;
  case 2:
  case 1:
    eta = 1;
    phi = -1;
    break;
  case 8:
  case 7:
    eta = -1;
    phi = 1;
    break;
  case 6:
  case 5:
    phi = eta = -1;
    break;
  default:
    assert(0);
    abort();
  }
  w = eta * S1 * exp((b1 - r) * T) *
          (cbnd(eta * d1, phi * e1, -eta * phi * Rho) -
           exp(2.0 * (mu2 + Rho * v1 * v2) * logHS2 / ((v2) * (v2))) *
               cbnd(eta * d3, phi * e3, -eta * phi * Rho)) -
      eta * exp(-r * T) * X *
          (cbnd(eta * d2, phi * e2, -eta * phi * Rho) -
           exp(2.0 * mu2 * logHS2 / ((v2) * (v2))) *
               cbnd(eta * d4, phi * e4, -eta * phi * Rho));
  switch (typeflag) {
  case 4:
  case 2:
  case 8:
  case 6:
    return w;
  case 3:
  case 1:
    return gbs_call(S1, X, T, r, b1, v1) - w;
  case 7:
  case 5:
    return gbs_put(S1, X, T, r, b1, v1) - w;
  default:
    abort();
  }
}


x86 assembly (clang, -O0):
<TwoAssetBarrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x150,%rsp
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
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,-0xd1(%rbp)
jne    121b <TwoAssetBarrier+0x9b>
jp     121b <TwoAssetBarrier+0x9b>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe0b(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd1(%rbp)
jb     121b <TwoAssetBarrier+0x9b>
movsd  0xdfb(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0xd1(%rbp)
mov    -0xd1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0xd2(%rbp)
jne    1280 <TwoAssetBarrier+0x100>
jp     1280 <TwoAssetBarrier+0x100>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
movsd  0xda6(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd2(%rbp)
jb     1280 <TwoAssetBarrier+0x100>
movsd  0xd96(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
setae  %al
mov    %al,-0xd2(%rbp)
mov    -0xd2(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0xd3(%rbp)
jne    12e5 <TwoAssetBarrier+0x165>
jp     12e5 <TwoAssetBarrier+0x165>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd41(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd3(%rbp)
jb     12e5 <TwoAssetBarrier+0x165>
movsd  0xd31(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0xd3(%rbp)
mov    -0xd3(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0xd4(%rbp)
jne    134a <TwoAssetBarrier+0x1ca>
jp     134a <TwoAssetBarrier+0x1ca>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
movsd  0xcec(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd4(%rbp)
jb     134a <TwoAssetBarrier+0x1ca>
movsd  0xcdc(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0xd4(%rbp)
mov    -0xd4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0xd5(%rbp)
jne    13aa <TwoAssetBarrier+0x22a>
jp     13aa <TwoAssetBarrier+0x22a>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd5(%rbp)
jb     13aa <TwoAssetBarrier+0x22a>
movsd  0xc84(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0xd5(%rbp)
mov    -0xd5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0xd6(%rbp)
jne    140f <TwoAssetBarrier+0x28f>
jp     140f <TwoAssetBarrier+0x28f>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
movsd  0xc3f(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd6(%rbp)
jb     140f <TwoAssetBarrier+0x28f>
movsd  0xc1f(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
setae  %al
mov    %al,-0xd6(%rbp)
mov    -0xd6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x50(%rbp),%xmm0
mov    %al,-0xd7(%rbp)
jne    1474 <TwoAssetBarrier+0x2f4>
jp     1474 <TwoAssetBarrier+0x2f4>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
movsd  0xbda(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd7(%rbp)
jb     1474 <TwoAssetBarrier+0x2f4>
movsd  0xbba(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
setae  %al
mov    %al,-0xd7(%rbp)
mov    -0xd7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd 0x10(%rbp),%xmm0
mov    %al,-0xd8(%rbp)
jne    14d9 <TwoAssetBarrier+0x359>
jp     14d9 <TwoAssetBarrier+0x359>
movsd  0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xb7d(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd8(%rbp)
jb     14d9 <TwoAssetBarrier+0x359>
movsd  0xb6d(%rip),%xmm0
ucomisd 0x10(%rbp),%xmm0
setae  %al
mov    %al,-0xd8(%rbp)
mov    -0xd8(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1070 <assert@plt>
movsd  0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd 0x18(%rbp),%xmm0
mov    %al,-0xd9(%rbp)
jne    153e <TwoAssetBarrier+0x3be>
jp     153e <TwoAssetBarrier+0x3be>
movsd  0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xb18(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xd9(%rbp)
jb     153e <TwoAssetBarrier+0x3be>
movsd  0xb08(%rip),%xmm0
ucomisd 0x18(%rbp),%xmm0
setae  %al
mov    %al,-0xd9(%rbp)
mov    -0xd9(%rbp),%al
movzbl %al,%edi
and    $0x1,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  -0x38(%rbp),%xmm0
call   10a0 <sqrt@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  0x18(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1090 <log@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm1
movsd  0xa9f(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
movsd  0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1090 <log@plt>
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm3
movsd  0x10(%rbp),%xmm1
movaps %xmm1,%xmm0
mulsd  %xmm0,%xmm0
addsd  %xmm3,%xmm0
movsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
movsd  0x10(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  0x20(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  0x20(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm2
movsd  0x20(%rbp),%xmm1
movsd  0x10(%rbp),%xmm3
mulsd  %xmm3,%xmm1
movsd  0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0x20(%rbp),%xmm0
movsd  0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
movsd  -0x58(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  -0x60(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm1
addsd  %xmm1,%xmm1
movsd  -0x60(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0xe8(%rbp)
sub    $0x7,%eax
ja     180a <TwoAssetBarrier+0x68a>
mov    -0xe8(%rbp),%rax
lea    0x903(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movsd  0x8d2(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  0x8c2(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
jmp    1818 <TwoAssetBarrier+0x698>
movsd  0x8ad(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x895(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1818 <TwoAssetBarrier+0x698>
movsd  0x880(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x878(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1818 <TwoAssetBarrier+0x698>
movsd  0x85b(%rip),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  0x84b(%rip),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
jmp    1818 <TwoAssetBarrier+0x698>
xor    %edi,%edi
mov    $0x0,%al
call   1070 <assert@plt>
call   1030 <abort@plt>
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1080 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x150(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
movaps %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xd0(%rbp),%xmm3
ff
movsd  -0xa0(%rbp),%xmm4
ff
movaps %xmm3,%xmm1
mulsd  %xmm4,%xmm1
movapd 0x7c9(%rip),%xmm4
movaps %xmm4,-0x130(%rbp)
pxor   %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
mov    $0x3,%al
mov    %al,-0x119(%rbp)
call   1050 <cbnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x140(%rbp)
ff
movsd  -0x78(%rbp),%xmm2
movsd  0x20(%rbp),%xmm0
movsd  0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
addsd  %xmm0,%xmm0
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
call   1080 <exp@plt>
movaps -0x130(%rbp),%xmm4
mov    -0x119(%rbp),%al
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
movaps %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xd0(%rbp),%xmm3
ff
movsd  -0xb0(%rbp),%xmm5
ff
movaps %xmm3,%xmm1
mulsd  %xmm5,%xmm1
pxor   %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
call   1050 <cbnd@plt>
movsd  -0x148(%rbp),%xmm2
ff
movsd  -0x140(%rbp),%xmm0
ff
movaps -0x130(%rbp),%xmm1
cvtsi2sd %eax,%xmm3
mulsd  %xmm3,%xmm2
subsd  %xmm2,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
pxor   %xmm1,%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1080 <exp@plt>
movaps -0x130(%rbp),%xmm4
mov    -0x119(%rbp),%al
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xd0(%rbp),%xmm3
ff
movsd  -0xa8(%rbp),%xmm5
movaps %xmm3,%xmm1
mulsd  %xmm5,%xmm1
pxor   %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
call   1050 <cbnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
addsd  %xmm0,%xmm0
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
call   1080 <exp@plt>
movaps -0x130(%rbp),%xmm4
mov    -0x119(%rbp),%al
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm2,%xmm0
mulsd  %xmm1,%xmm0
movsd  -0xd0(%rbp),%xmm3
ff
movsd  -0xb8(%rbp),%xmm5
ff
movaps %xmm3,%xmm1
mulsd  %xmm5,%xmm1
pxor   %xmm4,%xmm2
mulsd  %xmm3,%xmm2
movsd  0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm2
call   1050 <cbnd@plt>
movsd  -0x118(%rbp),%xmm4
ff
movsd  -0x110(%rbp),%xmm3
ff
movsd  -0x108(%rbp),%xmm1
ff
movsd  -0x100(%rbp),%xmm0
ff
movsd  -0xf8(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm5
mulsd  %xmm5,%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0xc(%rbp),%eax
mov    %eax,-0xec(%rbp)
sub    $0x1,%eax
je     1ba4 <TwoAssetBarrier+0xa24>
jmp    1b06 <TwoAssetBarrier+0x986>
mov    -0xec(%rbp),%eax
sub    $0x2,%eax
je     1b92 <TwoAssetBarrier+0xa12>
jmp    1b1a <TwoAssetBarrier+0x99a>
mov    -0xec(%rbp),%eax
sub    $0x3,%eax
je     1ba4 <TwoAssetBarrier+0xa24>
jmp    1b2e <TwoAssetBarrier+0x9ae>
mov    -0xec(%rbp),%eax
sub    $0x4,%eax
je     1b92 <TwoAssetBarrier+0xa12>
jmp    1b42 <TwoAssetBarrier+0x9c2>
mov    -0xec(%rbp),%eax
sub    $0x5,%eax
je     1bdf <TwoAssetBarrier+0xa5f>
jmp    1b56 <TwoAssetBarrier+0x9d6>
mov    -0xec(%rbp),%eax
sub    $0x6,%eax
je     1b92 <TwoAssetBarrier+0xa12>
jmp    1b6a <TwoAssetBarrier+0x9ea>
mov    -0xec(%rbp),%eax
sub    $0x7,%eax
je     1bdf <TwoAssetBarrier+0xa5f>
jmp    1b7e <TwoAssetBarrier+0x9fe>
mov    -0xec(%rbp),%eax
sub    $0x8,%eax
jne    1c1a <TwoAssetBarrier+0xa9a>
jmp    1b92 <TwoAssetBarrier+0xa12>
movsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1c1f <TwoAssetBarrier+0xa9f>
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  0x10(%rbp),%xmm5
mov    $0x6,%al
call   1040 <gbs_call@plt>
cvtsi2sd %eax,%xmm0
subsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1c1f <TwoAssetBarrier+0xa9f>
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm4
movsd  0x10(%rbp),%xmm5
mov    $0x6,%al
call   1060 <gbs_put@plt>
cvtsi2sd %eax,%xmm0
subsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x8(%rbp)
jmp    1c1f <TwoAssetBarrier+0xa9f>
call   1030 <abort@plt>
movsd  -0x8(%rbp),%xmm0
add    $0x150,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TwoAssetBarrier>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0xc8,%rsp
movsd  %xmm7,0x10(%rsp)
movsd  %xmm6,0x40(%rsp)
movapd %xmm5,0x70(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x30(%rsp)
movsd  %xmm1,0x20(%rsp)
mov    %edi,%r14d
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe37(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe32(%rip),%xmm1
movsd  %xmm0,0x38(%rsp)
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xdfc(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xdf7(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x30(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdc7(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xdc2(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x18(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xda2(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xd9d(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
xorpd  %xmm1,%xmm1
movapd 0x70(%rsp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xd79(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x40(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd59(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd44(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x10(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd24(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd0f(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0xf0(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xcf4(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xcef(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0xf8(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xcbc(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xcb7(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1070 <assert@plt>
movsd  0x18(%rsp),%xmm0
ucomisd 0xca6(%rip),%xmm0
jb     13aa <TwoAssetBarrier+0x22a>
sqrtsd %xmm0,%xmm0
jmp    13af <TwoAssetBarrier+0x22f>
call   10a0 <sqrt@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x8(%rsp),%xmm0
divsd  0x20(%rsp),%xmm0
call   1090 <log@plt>
movsd  %xmm0,0x58(%rsp)
movsd  0x38(%rsp),%xmm0
divsd  0x30(%rsp),%xmm0
call   1090 <log@plt>
lea    -0x1(%r14),%eax
cmp    $0x8,%eax
jae    17ea <TwoAssetBarrier+0x66a>
movsd  0x100(%rsp),%xmm5
movsd  0x60(%rsp),%xmm11
movapd %xmm11,%xmm1
movsd  0xf8(%rsp),%xmm8
mulsd  %xmm8,%xmm1
movsd  0xf0(%rsp),%xmm6
movapd %xmm6,%xmm2
mulsd  %xmm6,%xmm2
movsd  0xc19(%rip),%xmm3
movapd %xmm2,%xmm4
mulsd  %xmm3,%xmm4
movsd  0x40(%rsp),%xmm9
movapd %xmm9,%xmm7
subsd  %xmm4,%xmm7
movapd %xmm8,%xmm4
mulsd  %xmm8,%xmm4
movsd  %xmm4,0x80(%rsp)
mulsd  %xmm4,%xmm3
movsd  0x10(%rsp),%xmm4
subsd  %xmm3,%xmm4
movsd  %xmm4,0x10(%rsp)
addsd  %xmm2,%xmm7
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm7
movapd %xmm2,%xmm10
addsd  %xmm0,%xmm7
movapd %xmm11,%xmm0
mulsd  %xmm6,%xmm0
divsd  %xmm0,%xmm7
movapd %xmm7,%xmm2
movapd %xmm7,%xmm12
movsd  %xmm7,0x90(%rsp)
subsd  %xmm0,%xmm2
movapd %xmm2,%xmm7
movsd  %xmm2,0xa8(%rsp)
movapd %xmm5,%xmm3
addsd  %xmm5,%xmm5
movsd  0x58(%rsp),%xmm0
mulsd  %xmm0,%xmm5
movapd %xmm0,%xmm2
divsd  %xmm1,%xmm5
mulsd  %xmm3,%xmm6
mulsd  %xmm6,%xmm8
addsd  %xmm4,%xmm8
movapd %xmm8,%xmm0
movsd  %xmm8,0x50(%rsp)
mulsd  %xmm10,%xmm0
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
divsd  %xmm1,%xmm3
movsd  %xmm3,0x98(%rsp)
mulsd  %xmm11,%xmm6
addsd  %xmm3,%xmm6
movsd  %xmm6,0xb0(%rsp)
movapd %xmm2,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
movapd %xmm6,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0xc0(%rsp)
movapd %xmm3,%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x48(%rsp)
movapd %xmm5,%xmm0
addsd  %xmm7,%xmm0
movsd  %xmm0,0xb8(%rsp)
addsd  %xmm12,%xmm5
movsd  %xmm5,0xa0(%rsp)
cltq
lea    0xb00(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0xb2f(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movapd %xmm9,%xmm0
subsd  0x70(%rsp),%xmm0
mulsd  %xmm10,%xmm0
call   1080 <exp@plt>
movsd  %xmm0,0x88(%rsp)
movapd 0x20(%rsp),%xmm2
movsd  0x90(%rsp),%xmm0
mulsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm3
movsd  0x98(%rsp),%xmm1
mulsd  %xmm3,%xmm1
xorpd  0xa88(%rip),%xmm2
mulsd  %xmm3,%xmm2
mulsd  0x100(%rsp),%xmm2
movapd %xmm2,0x60(%rsp)
mov    $0x3,%al
call   1050 <cbnd@plt>
mov    %eax,%r15d
movsd  0x50(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x58(%rsp),%xmm0
divsd  0x80(%rsp),%xmm0
call   1080 <exp@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0xa0(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  0x48(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
mov    $0x3,%al
call   1050 <cbnd@plt>
mov    %eax,%ebx
movapd 0xa16(%rip),%xmm0
xorpd  0x70(%rsp),%xmm0
mulsd  0x18(%rsp),%xmm0
call   1080 <exp@plt>
movsd  %xmm0,0x48(%rsp)
movsd  0xa8(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  0xb0(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movaps 0x60(%rsp),%xmm2
mov    $0x3,%al
call   1050 <cbnd@plt>
mov    %eax,%ebp
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
mulsd  0x58(%rsp),%xmm0
divsd  0x80(%rsp),%xmm0
call   1080 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0xb8(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
movsd  0xc0(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movapd 0x60(%rsp),%xmm2
mov    $0x3,%al
call   1050 <cbnd@plt>
cmp    $0x8,%r14d
ja     17f3 <TwoAssetBarrier+0x673>
movapd 0x20(%rsp),%xmm2
movsd  0x48(%rsp),%xmm4
mulsd  %xmm2,%xmm4
mulsd  0x38(%rsp),%xmm2
mulsd  0x88(%rsp),%xmm2
xorps  %xmm3,%xmm3
cvtsi2sd %r15d,%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
movsd  0x50(%rsp),%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm1,%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  %xmm2,%xmm3
movsd  0x10(%rsp),%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
mulsd  0x30(%rsp),%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm4,%xmm3
mov    $0x154,%eax
bt     %r14d,%eax
jb     17d8 <TwoAssetBarrier+0x658>
mov    $0xa,%eax
bt     %r14d,%eax
movsd  %xmm3,0x20(%rsp)
jb     179e <TwoAssetBarrier+0x61e>
mov    $0xa0,%eax
bt     %r14d,%eax
jae    17f3 <TwoAssetBarrier+0x673>
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movaps 0x70(%rsp),%xmm3
movsd  0x40(%rsp),%xmm4
movsd  0xf0(%rsp),%xmm5
mov    $0x6,%al
call   1060 <gbs_put@plt>
jmp    17cb <TwoAssetBarrier+0x64b>
movsd  0x38(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movaps 0x70(%rsp),%xmm3
movsd  0x40(%rsp),%xmm4
movsd  0xf0(%rsp),%xmm5
mov    $0x6,%al
call   1040 <gbs_call@plt>
xorps  %xmm3,%xmm3
cvtsi2sd %eax,%xmm3
subsd  0x20(%rsp),%xmm3
movapd %xmm3,%xmm0
add    $0xc8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %edi,%edi
xor    %eax,%eax
call   1070 <assert@plt>
call   1030 <abort@plt>

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

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