double ComplexChooser(double S, double Xc, double Xp, double T, double Tc,
                      double Tp, double r, double b, double v) {
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((Xc) == (Xc)) && (Xc) >= 0.000001 && (Xc) <= 1000000000000.0);
  assert(((Xp) == (Xp)) && (Xp) >= 0.000001 && (Xp) <= 1000000000000.0);
  assert(((Tc) == (Tc)) && (Tc) >= (1.0 / (253.0 * 24.0)) && (Tc) <= (20.0));
  assert(((Tp) == (Tp)) && (Tp) >= (1.0 / (253.0 * 24.0)) && (Tp) <= (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);
  {
    const double vsT = v * sqrt(T);
    const double vsTc = v * sqrt(Tc);
    const double vsTp = v * sqrt(Tp);
    const double bv2 = b + ((v) * (v)) / 2.0;
    const double I = CriticalValueChooser(S, Xc, Xp, T, Tc, Tp, r, b, v);
    const double d1 = (log(S / I) + bv2 * T) / vsT;
    const double d2 = d1 - vsT;
    const double Y1 = (log(S / Xc) + bv2 * Tc) / vsTc;
    const double y2 = (log(S / Xp) + bv2 * Tp) / vsTp;
    const double rho1 = sqrt(T / Tc);
    const double rho2 = sqrt(T / Tp);
    const double result = S * exp((b - r) * Tc) * cbnd(d1, Y1, rho1) -
                          Xc * exp(-r * Tc) * cbnd(d2, Y1 - vsTc, rho1) -
                          S * exp((b - r) * Tp) * cbnd(-d1, -y2, rho2) +
                          Xp * exp(-r * Tp) * cbnd(-d2, -y2 + vsTp, rho2);
    return result;
  }
}


x86 assembly (clang, -O0):
<ComplexChooser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movsd  0x10(%rbp),%xmm8
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  %xmm7,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x8(%rbp),%xmm0
mov    %al,-0xa1(%rbp)
jne    11ec <ComplexChooser+0x8c>
jp     11ec <ComplexChooser+0x8c>
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe3a(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa1(%rbp)
jb     11ec <ComplexChooser+0x8c>
movsd  0xe2a(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
setae  %al
mov    %al,-0xa1(%rbp)
mov    -0xa1(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0xa2(%rbp)
jne    1251 <ComplexChooser+0xf1>
jp     1251 <ComplexChooser+0xf1>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdd5(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa2(%rbp)
jb     1251 <ComplexChooser+0xf1>
movsd  0xdc5(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0xa2(%rbp)
mov    -0xa2(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0xa3(%rbp)
jne    12b6 <ComplexChooser+0x156>
jp     12b6 <ComplexChooser+0x156>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd70(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa3(%rbp)
jb     12b6 <ComplexChooser+0x156>
movsd  0xd60(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0xa3(%rbp)
mov    -0xa3(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0xa4(%rbp)
jne    131b <ComplexChooser+0x1bb>
jp     131b <ComplexChooser+0x1bb>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd1b(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa4(%rbp)
jb     131b <ComplexChooser+0x1bb>
movsd  0xd0b(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0xa4(%rbp)
mov    -0xa4(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0xa5(%rbp)
jne    1380 <ComplexChooser+0x220>
jp     1380 <ComplexChooser+0x220>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
movsd  0xcb6(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa5(%rbp)
jb     1380 <ComplexChooser+0x220>
movsd  0xca6(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0xa5(%rbp)
mov    -0xa5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0xa6(%rbp)
jne    13e0 <ComplexChooser+0x280>
jp     13e0 <ComplexChooser+0x280>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa6(%rbp)
jb     13e0 <ComplexChooser+0x280>
movsd  0xc4e(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0xa6(%rbp)
mov    -0xa6(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0xa7(%rbp)
jne    1445 <ComplexChooser+0x2e5>
jp     1445 <ComplexChooser+0x2e5>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
movsd  0xc09(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa7(%rbp)
jb     1445 <ComplexChooser+0x2e5>
movsd  0xbe9(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0xa7(%rbp)
mov    -0xa7(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd 0x10(%rbp),%xmm0
mov    %al,-0xa8(%rbp)
jne    14aa <ComplexChooser+0x34a>
jp     14aa <ComplexChooser+0x34a>
movsd  0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xbac(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0xa8(%rbp)
jb     14aa <ComplexChooser+0x34a>
movsd  0xb9c(%rip),%xmm0
ucomisd 0x10(%rbp),%xmm0
setae  %al
mov    %al,-0xa8(%rbp)
mov    -0xa8(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1050 <assert@plt>
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0x10(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1080 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  0x10(%rbp),%xmm1
mulsd  0x10(%rbp),%xmm1
movsd  0xaec(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm6
movsd  -0x40(%rbp),%xmm7
movsd  0x10(%rbp),%xmm8
movsd  %xmm8,(%rsp)
mov    $0x8,%al
call   1040 <CriticalValueChooser@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1070 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x60(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mov    $0x3,%al
call   1030 <cbnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
subsd  -0x50(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm2
ff
mov    $0x3,%al
call   1030 <cbnd@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xe0(%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,-0xc8(%rbp)
ff
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mov    $0x3,%al
call   1030 <cbnd@plt>
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc8(%rbp),%xmm1
ff
cvtsi2sd %eax,%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  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1060 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x88(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
addsd  -0x58(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm2
ff
mov    $0x3,%al
call   1030 <cbnd@plt>
movsd  -0xb8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0xa0(%rbp),%xmm0
ff
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ComplexChooser>:
sub    $0xc8,%rsp
movsd  %xmm7,0x48(%rsp)
movaps %xmm6,0xa0(%rsp)
movsd  %xmm5,0x20(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm2,0x78(%rsp)
movsd  %xmm1,0x70(%rsp)
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe5e(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe59(%rip),%xmm1
movsd  %xmm0,0x28(%rsp)
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x70(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe23(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe1e(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x78(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdee(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xde9(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x18(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xdc9(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xdc4(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x20(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd94(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd8f(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
xorpd  %xmm1,%xmm1
movapd 0xa0(%rsp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xd68(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x48(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd48(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xd33(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0xd0(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xd18(%rip),%xmm0
movapd %xmm0,%xmm1
setae  %cl
movsd  0xd11(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %dl
and    %al,%dl
and    %cl,%dl
movzbl %dl,%edi
xor    %eax,%eax
call   1050 <assert@plt>
movsd  0x10(%rsp),%xmm0
ucomisd 0xcfe(%rip),%xmm0
jb     1352 <ComplexChooser+0x1f2>
sqrtsd %xmm0,%xmm0
jmp    1357 <ComplexChooser+0x1f7>
call   1080 <sqrt@plt>
movsd  %xmm0,0x80(%rsp)
movsd  0x18(%rsp),%xmm0
ucomisd 0xcda(%rip),%xmm0
jb     1376 <ComplexChooser+0x216>
sqrtsd %xmm0,%xmm0
jmp    137b <ComplexChooser+0x21b>
call   1080 <sqrt@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  0x80(%rsp),%xmm1
mulsd  0xd0(%rsp),%xmm1
movsd  %xmm1,0x80(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     13b2 <ComplexChooser+0x252>
sqrtsd %xmm0,%xmm0
jmp    13b7 <ComplexChooser+0x257>
call   1080 <sqrt@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0xd0(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x38(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xc5a(%rip),%xmm1
movsd  0x48(%rsp),%xmm7
addsd  %xmm7,%xmm1
movapd %xmm1,0x50(%rsp)
movsd  %xmm0,(%rsp)
movsd  0x28(%rsp),%xmm0
movsd  0x70(%rsp),%xmm1
movsd  0x78(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movaps 0xa0(%rsp),%xmm6
mov    $0x8,%al
call   1040 <CriticalValueChooser@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0x28(%rsp),%xmm0
divsd  %xmm1,%xmm0
call   1070 <log@plt>
movapd 0x50(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
addsd  %xmm0,%xmm1
divsd  0x80(%rsp),%xmm1
movapd %xmm1,0xb0(%rsp)
movsd  0x28(%rsp),%xmm0
divsd  0x70(%rsp),%xmm0
call   1070 <log@plt>
movapd 0x50(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x68(%rsp)
movsd  0x28(%rsp),%xmm0
divsd  0x78(%rsp),%xmm0
call   1070 <log@plt>
movsd  0x20(%rsp),%xmm1
movapd %xmm0,%xmm2
movapd 0x50(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm0,0x50(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  0x18(%rsp),%xmm0
ucomisd 0xb7c(%rip),%xmm0
jb     14d4 <ComplexChooser+0x374>
sqrtsd %xmm0,%xmm0
jmp    14eb <ComplexChooser+0x38b>
movsd  %xmm2,0x30(%rsp)
call   1080 <sqrt@plt>
movsd  0x30(%rsp),%xmm2
movsd  0x20(%rsp),%xmm1
movsd  %xmm0,0x98(%rsp)
movsd  0x40(%rsp),%xmm0
mulsd  0xd0(%rsp),%xmm0
movsd  %xmm0,0x40(%rsp)
movapd 0xb0(%rsp),%xmm0
subsd  0x80(%rsp),%xmm0
movapd %xmm0,0x80(%rsp)
movsd  0x68(%rsp),%xmm0
divsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x68(%rsp)
movapd 0x50(%rsp),%xmm0
addsd  %xmm2,%xmm0
movapd %xmm0,0x50(%rsp)
movsd  0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1560 <ComplexChooser+0x400>
sqrtsd %xmm0,%xmm0
jmp    1565 <ComplexChooser+0x405>
call   1080 <sqrt@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x48(%rsp),%xmm0
subsd  0xa0(%rsp),%xmm0
movsd  %xmm0,0x48(%rsp)
mulsd  0x18(%rsp),%xmm0
call   1060 <exp@plt>
mulsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movaps 0xb0(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
movsd  0x98(%rsp),%xmm2
mov    $0x3,%al
call   1030 <cbnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0xa0(%rsp),%xmm1
xorpd  0xa77(%rip),%xmm1
movapd %xmm1,0xa0(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x68(%rsp),%xmm1
subsd  0x38(%rsp),%xmm1
movaps 0x80(%rsp),%xmm0
movsd  0x98(%rsp),%xmm2
mov    $0x3,%al
call   1030 <cbnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x70(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x48(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movapd 0x9ef(%rip),%xmm2
movapd 0xb0(%rsp),%xmm0
xorpd  %xmm2,%xmm0
movapd 0x50(%rsp),%xmm1
xorpd  %xmm2,%xmm1
divsd  0x40(%rsp),%xmm1
movapd %xmm1,0x50(%rsp)
movsd  0x30(%rsp),%xmm2
mov    $0x3,%al
call   1030 <cbnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movapd 0xa0(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1060 <exp@plt>
mulsd  0x78(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movaps 0x80(%rsp),%xmm0
xorps  0x969(%rip),%xmm0
movapd 0x50(%rsp),%xmm1
addsd  0x40(%rsp),%xmm1
movsd  0x30(%rsp),%xmm2
mov    $0x3,%al
call   1030 <cbnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0xc8,%rsp
ret

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

LLVM IR (-O2):
define double @ComplexChooser(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fcmp ord double %0, 0.000000e+00
%11 = fcmp oge double %0, 0x3EB0C6F7A0B5ED8D
%12 = and i1 %10, %11
%13 = fcmp ole double %0, 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 %1, 0.000000e+00
%18 = fcmp oge double %1, 0x3EB0C6F7A0B5ED8D
%19 = and i1 %17, %18
%20 = fcmp ole double %1, 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 %2, 0.000000e+00
%25 = fcmp oge double %2, 0x3EB0C6F7A0B5ED8D
%26 = and i1 %24, %25
%27 = fcmp ole double %2, 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 %7, 0.000000e+00
%51 = fcmp oge double %7, -1.000000e+03
%52 = and i1 %50, %51
%53 = fcmp ole double %7, 1.000000e+03
%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 = fcmp ord double %8, 0.000000e+00
%58 = fcmp oge double %8, 0x3E7AD7F29ABCAF48
%59 = and i1 %57, %58
%60 = fcmp ole double %8, 0x40593FFFD60E94EE
%61 = and i1 %60, %59
%62 = zext i1 %61 to i32
%63 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %62)
%64 = tail call double @sqrt(double %3)
%65 = fmul double %64, %8
%66 = tail call double @sqrt(double %4)
%67 = fmul double %66, %8
%68 = tail call double @sqrt(double %5)
%69 = fmul double %68, %8
%70 = fmul double %8, %8
%71 = fmul double %70, 5.000000e-01
%72 = fadd double %71, %7
%73 = tail call i32 (double, double, double, double, double, double, double, double, double, ...) bitcast (i32 (...)* @CriticalValueChooser to i32 (double, double, double, double, double, double, double, double, double, ...)*)(double %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8)
%74 = sitofp i32 %73 to double
%75 = fdiv double %0, %74
%76 = tail call double @log(double %75)
%77 = tail call double @llvm.fmuladd.f64(double %72, double %3, double %76)
%78 = fdiv double %77, %65
%79 = fsub double %78, %65
%80 = fdiv double %0, %1
%81 = tail call double @log(double %80)
%82 = tail call double @llvm.fmuladd.f64(double %72, double %4, double %81)
%83 = fdiv double %82, %67
%84 = fdiv double %0, %2
%85 = tail call double @log(double %84)
%86 = tail call double @llvm.fmuladd.f64(double %72, double %5, double %85)
%87 = fdiv double %3, %4
%88 = tail call double @sqrt(double %87)
%89 = fdiv double %3, %5
%90 = tail call double @sqrt(double %89)
%91 = fsub double %7, %6
%92 = fmul double %91, %4
%93 = tail call double @exp(double %92)
%94 = fmul double %93, %0
%95 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cbnd to i32 (double, double, double, ...)*)(double %78, double %83, double %88)
%96 = sitofp i32 %95 to double
%97 = fneg double %6
%98 = fmul double %97, %4
%99 = tail call double @exp(double %98)
%100 = fsub double %83, %67
%101 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cbnd to i32 (double, double, double, ...)*)(double %79, double %100, double %88)
%102 = sitofp i32 %101 to double
%103 = fneg double %99
%104 = fmul double %103, %1
%105 = fmul double %104, %102
%106 = tail call double @llvm.fmuladd.f64(double %94, double %96, double %105)
%107 = fmul double %91, %5
%108 = tail call double @exp(double %107)
%109 = fneg double %78
%110 = fneg double %86
%111 = fdiv double %110, %69
%112 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cbnd to i32 (double, double, double, ...)*)(double %109, double %111, double %90)
%113 = sitofp i32 %112 to double
%114 = fneg double %108
%115 = fmul double %114, %0
%116 = tail call double @llvm.fmuladd.f64(double %115, double %113, double %106)
%117 = fmul double %97, %5
%118 = tail call double @exp(double %117)
%119 = fmul double %118, %2
%120 = fneg double %79
%121 = fadd double %69, %111
%122 = tail call i32 (double, double, double, ...) bitcast (i32 (...)* @cbnd to i32 (double, double, double, ...)*)(double %120, double %121, double %90)
%123 = sitofp i32 %122 to double
%124 = tail call double @llvm.fmuladd.f64(double %119, double %123, double %116)
ret double %124
}