double LevyAsian(int fCall, double S, double SA, double X, double T, double T2,
                 double r, double b, double v) {
  double vv, ebrT2, erT2, SE, m, d, ssv, XStar, d1, d2;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((SA) == (SA)) && (SA) >= 0.000001 && (SA) <= 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(((T2) == (T2)) && (T2) >= (1.0 / (253.0 * 24.0)) && (T2) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  vv = v * v;
  ebrT2 = exp((b - r) * T2);
  erT2 = exp(-r * T2);
  SE = S / (T * b) * (ebrT2 - erT2);
  m = 2.0 * ((S) * (S)) / (b + vv) *
      ((exp((2.0 * b + vv) * T2) - 1.0) / (2.0 * b + vv) -
       (exp(b * T2) - 1.0) / b);
  d = m / (((T) * (T)));
  ssv = sqrt(log(d) - 2.0 * (r * T2 + log(SE)));
  XStar = X - (T - T2) / T * SA;
  d1 = 1.0 / ssv * (log(d) / 2.0 - log(XStar));
  d2 = d1 - ssv;
  if (fCall)
    return SE * cnd(d1) - XStar * erT2 * cnd(d2);
  else
    return (SE * cnd(d1) - XStar * erT2 * cnd(d2)) - SE + XStar * erT2;
}


x86 assembly (clang, -O0):
<LevyAsian>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%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,-0xa1(%rbp)
jne    11d9 <LevyAsian+0x89>
jp     11d9 <LevyAsian+0x89>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe4d(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa1(%rbp)
jb     11d9 <LevyAsian+0x89>
movsd  0xe3d(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0xa2(%rbp)
jne    123e <LevyAsian+0xee>
jp     123e <LevyAsian+0xee>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
movsd  0xde8(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa2(%rbp)
jb     123e <LevyAsian+0xee>
movsd  0xdd8(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
setae  %al
mov    %al,-0xa2(%rbp)
mov    -0xa2(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0xa3(%rbp)
jne    12a3 <LevyAsian+0x153>
jp     12a3 <LevyAsian+0x153>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd83(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa3(%rbp)
jb     12a3 <LevyAsian+0x153>
movsd  0xd73(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0xa3(%rbp)
mov    -0xa3(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0xa4(%rbp)
jne    1308 <LevyAsian+0x1b8>
jp     1308 <LevyAsian+0x1b8>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd2e(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa4(%rbp)
jb     1308 <LevyAsian+0x1b8>
movsd  0xd1e(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0xa4(%rbp)
mov    -0xa4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0xa5(%rbp)
jne    136d <LevyAsian+0x21d>
jp     136d <LevyAsian+0x21d>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
movsd  0xcc9(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa5(%rbp)
jb     136d <LevyAsian+0x21d>
movsd  0xcb9(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0xa5(%rbp)
mov    -0xa5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0xa6(%rbp)
jne    13cd <LevyAsian+0x27d>
jp     13cd <LevyAsian+0x27d>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa6(%rbp)
jb     13cd <LevyAsian+0x27d>
movsd  0xc61(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0xa6(%rbp)
mov    -0xa6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x50(%rbp),%xmm0
mov    %al,-0xa7(%rbp)
jne    1432 <LevyAsian+0x2e2>
jp     1432 <LevyAsian+0x2e2>
movsd  -0x50(%rbp),%xmm0
xor    %eax,%eax
movsd  0xc1c(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa7(%rbp)
jb     1432 <LevyAsian+0x2e2>
movsd  0xc0c(%rip),%xmm0
ucomisd -0x50(%rbp),%xmm0
setae  %al
mov    %al,-0xa7(%rbp)
mov    -0xa7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x48(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x60(%rbp),%xmm1
subsd  -0x68(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x18(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xb69(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
addsd  -0x58(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <exp@plt>
movsd  0xb33(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm2
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0xe0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
movsd  0xae7(%rip),%xmm3
subsd  %xmm3,%xmm2
divsd  -0x48(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movsd  -0xc8(%rbp),%xmm3
ff
movaps %xmm0,%xmm2
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xa03(%rip),%xmm0
divsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
call   1050 <log@plt>
movsd  0x9d9(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1050 <log@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xb0(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
cmpl   $0x0,-0xc(%rbp)
je     1752 <LevyAsian+0x602>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mov    $0x1,%al
call   1060 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  -0xf8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xe8(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm3
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    17fc <LevyAsian+0x6ac>
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
mov    $0x1,%al
call   1060 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mulsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  -0x110(%rbp),%xmm0
ff
movsd  -0x108(%rbp),%xmm1
ff
movsd  -0x100(%rbp),%xmm2
ff
cvtsi2sd %eax,%xmm3
mulsd  %xmm3,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
subsd  -0x70(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x68(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LevyAsian>:
push   %rbp
push   %rbx
sub    $0x88,%rsp
movapd %xmm0,0x50(%rsp)
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe92(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe8c(%rip),%xmm8
ucomisd %xmm0,%xmm8
movaps %xmm7,0x10(%rsp)
movsd  %xmm6,0x8(%rsp)
movaps %xmm5,0x40(%rsp)
movsd  %xmm4,(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x20(%rsp)
movsd  %xmm1,0x38(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x38(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe32(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe2d(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xdfd(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xdf8(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x30(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdd8(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xdd3(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  (%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xda4(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd9f(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xorpd  %xmm0,%xmm0
movapd 0x40(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xd7b(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movapd 0x10(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xd5b(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xd56(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movapd 0x10(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
subsd  0x40(%rsp),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x28(%rsp)
movapd 0xd3f(%rip),%xmm0
xorpd  0x40(%rsp),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <exp@plt>
movsd  0x30(%rsp),%xmm4
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm4
movapd 0x50(%rsp),%xmm2
movapd %xmm2,%xmm1
divsd  %xmm4,%xmm1
movsd  %xmm0,0x68(%rsp)
movsd  0x28(%rsp),%xmm4
subsd  %xmm0,%xmm4
mulsd  %xmm1,%xmm4
movsd  %xmm4,0x28(%rsp)
mulsd  %xmm2,%xmm2
movapd %xmm2,0x50(%rsp)
movapd %xmm3,%xmm2
addsd  %xmm3,%xmm2
movapd 0x10(%rsp),%xmm1
addsd  %xmm1,%xmm2
movapd %xmm2,0x70(%rsp)
addsd  %xmm3,%xmm1
movapd %xmm1,0x10(%rsp)
movapd %xmm2,%xmm0
mulsd  (%rsp),%xmm0
call   1040 <exp@plt>
unpcklpd %xmm0,%xmm0
movapd 0x50(%rsp),%xmm1
addsd  %xmm1,%xmm1
addpd  0xcb7(%rip),%xmm0
movsd  %xmm1,%xmm0
movapd 0x10(%rsp),%xmm1
unpcklpd 0x70(%rsp),%xmm1
divpd  %xmm1,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
addsd  0xc4d(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
movapd 0x10(%rsp),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
call   1050 <log@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
call   1050 <log@plt>
movapd 0x40(%rsp),%xmm1
mulsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
ucomisd 0xbf6(%rip),%xmm0
jb     1462 <LevyAsian+0x312>
sqrtsd %xmm0,%xmm0
jmp    1467 <LevyAsian+0x317>
call   1070 <sqrt@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x30(%rsp),%xmm1
movapd %xmm1,%xmm2
subsd  (%rsp),%xmm2
divsd  %xmm1,%xmm2
mulsd  0x38(%rsp),%xmm2
movsd  0x20(%rsp),%xmm1
subsd  %xmm2,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xba2(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movapd 0x10(%rsp),%xmm0
call   1050 <log@plt>
mulsd  0xb8e(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  (%rsp),%xmm1
movapd %xmm1,%xmm2
movapd %xmm1,%xmm0
subsd  0x8(%rsp),%xmm2
movsd  %xmm2,(%rsp)
mov    $0x1,%al
call   1060 <cnd@plt>
mov    %eax,%ebp
movsd  (%rsp),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  0x20(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x68(%rsp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x28(%rsp),%xmm3
mulsd  %xmm3,%xmm0
subsd  %xmm1,%xmm0
test   %ebx,%ebx
jne    153a <LevyAsian+0x3ea>
subsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
add    $0x88,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define double @LevyAsian(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 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(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 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %22)
%24 = fcmp ord double %3, 0.000000e+00
%25 = fcmp oge double %3, 0x3EB0C6F7A0B5ED8D
%26 = and i1 %24, %25
%27 = fcmp ole double %3, 1.000000e+12
%28 = and i1 %27, %26
%29 = zext i1 %28 to i32
%30 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %29)
%31 = fcmp ord double %4, 0.000000e+00
%32 = fcmp oge double %4, 0x3F2596179C29D2CE
%33 = and i1 %31, %32
%34 = fcmp ole double %4, 2.000000e+01
%35 = and i1 %34, %33
%36 = zext i1 %35 to i32
%37 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %36)
%38 = fcmp ord double %5, 0.000000e+00
%39 = fcmp oge double %5, 0x3F2596179C29D2CE
%40 = and i1 %38, %39
%41 = fcmp ole double %5, 2.000000e+01
%42 = and i1 %41, %40
%43 = zext i1 %42 to i32
%44 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %43)
%45 = fcmp oge double %6, 0.000000e+00
%46 = fcmp ole double %6, 1.000000e+03
%47 = and i1 %45, %46
%48 = zext i1 %47 to i32
%49 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %48)
%50 = fcmp ord double %8, 0.000000e+00
%51 = fcmp oge double %8, 0x3E7AD7F29ABCAF48
%52 = and i1 %50, %51
%53 = fcmp ole double %8, 0x40593FFFD60E94EE
%54 = and i1 %53, %52
%55 = zext i1 %54 to i32
%56 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %55)
%57 = fmul double %8, %8
%58 = fsub double %7, %6
%59 = fmul double %58, %5
%60 = tail call double @exp(double %59)
%61 = fneg double %6
%62 = fmul double %61, %5
%63 = tail call double @exp(double %62)
%64 = fmul double %4, %7
%65 = fdiv double %1, %64
%66 = fsub double %60, %63
%67 = fmul double %65, %66
%68 = fmul double %1, %1
%69 = fadd double %57, %7
%70 = tail call double @llvm.fmuladd.f64(double %7, double 2.000000e+00, double %57)
%71 = fmul double %70, %5
%72 = tail call double @exp(double %71)
%73 = insertelement <2 x double> poison, double %68, i64 0
%74 = insertelement <2 x double> %73, double %72, i64 1
%75 = fmul <2 x double> %74, <double 2.000000e+00, double poison>
%76 = fadd <2 x double> %74, <double poison, double -1.000000e+00>
%77 = shufflevector <2 x double> %75, <2 x double> %76, <2 x i32> <i32 0, i32 3>
%78 = insertelement <2 x double> poison, double %69, i64 0
%79 = insertelement <2 x double> %78, double %70, i64 1
%80 = fdiv <2 x double> %77, %79
%81 = fmul double %5, %7
%82 = tail call double @exp(double %81)
%83 = fadd double %82, -1.000000e+00
%84 = fdiv double %83, %7
%85 = extractelement <2 x double> %80, i64 1
%86 = fsub double %85, %84
%87 = extractelement <2 x double> %80, i64 0
%88 = fmul double %87, %86
%89 = fmul double %4, %4
%90 = fdiv double %88, %89
%91 = tail call double @log(double %90)
%92 = tail call double @log(double %67)
%93 = tail call double @llvm.fmuladd.f64(double %6, double %5, double %92)
%94 = tail call double @llvm.fmuladd.f64(double %93, double -2.000000e+00, double %91)
%95 = tail call double @sqrt(double %94)
%96 = fsub double %4, %5
%97 = fneg double %96
%98 = fdiv double %97, %4
%99 = tail call double @llvm.fmuladd.f64(double %98, double %2, double %3)
%100 = fdiv double 1.000000e+00, %95
%101 = tail call double @log(double %90)
%102 = fmul double %101, 5.000000e-01
%103 = tail call double @log(double %99)
%104 = fsub double %102, %103
%105 = fmul double %100, %104
%106 = fsub double %105, %95
%107 = icmp eq i32 %0, 0
%108 = tail call i32 (double, ...) bitcast (i32 (...)* @cnd to i32 (double, ...)*)(double %105)
%109 = sitofp i32 %108 to double
%110 = tail call i32 (double, ...) bitcast (i32 (...)* @cnd to i32 (double, ...)*)(double %106)
%111 = sitofp i32 %110 to double
%112 = fneg double %99
%113 = fmul double %63, %112
%114 = fmul double %113, %111
%115 = tail call double @llvm.fmuladd.f64(double %67, double %109, double %114)
%116 = fsub double %115, %67
%117 = tail call double @llvm.fmuladd.f64(double %99, double %63, double %116)
%118 = select i1 %107, double %117, double %115
ret double %118
}