#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double exp(double);
double log(double);
double rq_pricing_blackscholes_gen(short, double, double, double, double,
                                   double, double);
double rq_pricing_cumul_bivar_norm_dist(double, double, double);
double sqrt(double);
double rq_pricing_extendible_maturity_writer(short call, double S, double X1,
                                             double X2, double t1, double T2,
                                             double r, double b, double v) {
  double ret = 0.0;
  double v_sqr = v * v;
  double rho = sqrt(t1 / T2);
  double z1 = (log(S / X2) + (b + v_sqr / 2.0) * T2) / (v * sqrt(T2));
  double z2 = (log(S / X1) + (b + v_sqr / 2.0) * t1) / (v * sqrt(t1));
  if (call)
    ret = rq_pricing_blackscholes_gen(call, S, X1, t1, r, b, v) +
          S * exp((b - r) * T2) *
              rq_pricing_cumul_bivar_norm_dist(z1, -z2, -rho) -
          X2 * exp(-r * T2) *
              rq_pricing_cumul_bivar_norm_dist(z1 - sqrt(v_sqr * T2),
                                               -z2 + sqrt(v * v * t1), -rho);
  else
    ret =
        rq_pricing_blackscholes_gen(call, S, X1, t1, r, b, v) +
        X2 * exp(-r * T2) *
            rq_pricing_cumul_bivar_norm_dist(-z1 + sqrt(v_sqr * T2),
                                             z2 - sqrt(v_sqr * t1), -rho) -
        S * exp((b - r) * T2) * rq_pricing_cumul_bivar_norm_dist(-z1, z2, -rho);
  return ret;
}


x86 assembly (clang, -O0):
<rq_pricing_extendible_maturity_writer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  %xmm3,-0x28(%rbp)
movsd  %xmm4,-0x30(%rbp)
movsd  %xmm5,-0x38(%rbp)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x30(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0xe27(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0x90(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0xdaf(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0x80(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
cmpw   $0x0,-0x2(%rbp)
je     149c <rq_pricing_extendible_maturity_writer+0x34c>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
movswl %ax,%edi
call   1050 <rq_pricing_blackscholes_gen@plt>
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x60(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x20(%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   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xb8(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0xb0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xa8(%rbp),%xmm0
ff
addsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x98(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
jmp    168a <rq_pricing_extendible_maturity_writer+0x53a>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
movswl %ax,%edi
call   1050 <rq_pricing_blackscholes_gen@plt>
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x118(%rbp),%xmm0
ff
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1070 <sqrt@plt>
movsd  -0x110(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x108(%rbp),%xmm0
ff
subsd  %xmm2,%xmm1
movsd  -0x60(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  -0x100(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xf8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xf0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x70(%rbp),%xmm1
movsd  -0x60(%rbp),%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe0(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_extendible_maturity_writer>:
push   %rbx
sub    $0xa0,%rsp
movsd  %xmm7,0x40(%rsp)
movsd  %xmm6,0x18(%rsp)
movaps %xmm5,0x90(%rsp)
movsd  %xmm3,0x68(%rsp)
movsd  %xmm2,0x88(%rsp)
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,(%rsp)
mov    %edi,%ebx
movapd %xmm7,%xmm0
mulsd  %xmm7,%xmm0
movsd  %xmm0,0x38(%rsp)
movapd %xmm3,%xmm0
movsd  %xmm4,0x8(%rsp)
divsd  %xmm4,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b4 <rq_pricing_extendible_maturity_writer+0x64>
sqrtsd %xmm0,%xmm0
jmp    11b9 <rq_pricing_extendible_maturity_writer+0x69>
call   1070 <sqrt@plt>
movapd %xmm0,0x70(%rsp)
movsd  (%rsp),%xmm0
divsd  0x88(%rsp),%xmm0
call   1060 <log@plt>
movapd %xmm0,%xmm3
movsd  0xe22(%rip),%xmm0
mulsd  0x38(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
movapd %xmm0,0x50(%rsp)
movapd %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
mulsd  %xmm0,%xmm1
ucomisd 0xe02(%rip),%xmm0
jb     120e <rq_pricing_extendible_maturity_writer+0xbe>
sqrtsd %xmm0,%xmm0
jmp    122b <rq_pricing_extendible_maturity_writer+0xdb>
movapd %xmm1,0x20(%rsp)
movsd  %xmm3,0x30(%rsp)
call   1070 <sqrt@plt>
movsd  0x30(%rsp),%xmm3
movapd 0x20(%rsp),%xmm1
movsd  0x40(%rsp),%xmm2
addsd  %xmm3,%xmm1
movapd %xmm1,0x20(%rsp)
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
divsd  0x10(%rsp),%xmm0
call   1060 <log@plt>
movapd 0x50(%rsp),%xmm1
movsd  0x68(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     127c <rq_pricing_extendible_maturity_writer+0x12c>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
jmp    1297 <rq_pricing_extendible_maturity_writer+0x147>
movapd %xmm2,%xmm0
movapd %xmm1,0x50(%rsp)
call   1070 <sqrt@plt>
movsd  0x68(%rsp),%xmm2
movapd 0x50(%rsp),%xmm1
movapd 0x20(%rsp),%xmm4
divsd  0x30(%rsp),%xmm4
movsd  0x40(%rsp),%xmm5
mulsd  %xmm5,%xmm0
divsd  %xmm0,%xmm1
test   %bx,%bx
movapd %xmm1,0x50(%rsp)
movapd %xmm4,0x20(%rsp)
je     138c <rq_pricing_extendible_maturity_writer+0x23c>
movswl %bx,%edi
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movapd 0x90(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
call   1050 <rq_pricing_blackscholes_gen@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x18(%rsp),%xmm0
subsd  0x90(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movaps 0xcf7(%rip),%xmm0
movaps 0x50(%rsp),%xmm1
xorps  %xmm0,%xmm1
movaps 0x70(%rsp),%xmm2
xorps  %xmm0,%xmm2
movapd 0x20(%rsp),%xmm0
movaps %xmm2,0x70(%rsp)
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movapd 0x90(%rsp),%xmm0
xorpd  0xcbc(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
jb     141c <rq_pricing_extendible_maturity_writer+0x2cc>
sqrtsd %xmm0,%xmm0
jmp    142b <rq_pricing_extendible_maturity_writer+0x2db>
xor    %edi,%edi
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movaps 0x90(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
call   1050 <rq_pricing_blackscholes_gen@plt>
movsd  %xmm0,0x30(%rsp)
movapd 0xc56(%rip),%xmm1
movapd %xmm1,0x40(%rsp)
movapd 0x90(%rsp),%xmm0
xorpd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movapd 0x20(%rsp),%xmm2
movapd %xmm0,%xmm3
movapd 0x40(%rsp),%xmm0
xorpd  %xmm2,%xmm0
movapd %xmm0,0x40(%rsp)
movsd  0x38(%rsp),%xmm1
movapd %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm0
jb     14a1 <rq_pricing_extendible_maturity_writer+0x351>
xorps  %xmm4,%xmm4
sqrtsd %xmm0,%xmm4
jmp    14c6 <rq_pricing_extendible_maturity_writer+0x376>
call   1070 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x38(%rsp),%xmm1
movsd  (%rsp),%xmm2
addsd  0x40(%rsp),%xmm2
movsd  %xmm2,(%rsp)
movapd 0x20(%rsp),%xmm2
subsd  %xmm0,%xmm2
mulsd  0x68(%rsp),%xmm1
ucomisd %xmm3,%xmm1
jb     1457 <rq_pricing_extendible_maturity_writer+0x307>
sqrtsd %xmm1,%xmm1
jmp    1470 <rq_pricing_extendible_maturity_writer+0x320>
movapd %xmm1,%xmm0
movapd %xmm2,0x20(%rsp)
call   1070 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
movapd %xmm0,%xmm1
subsd  0x50(%rsp),%xmm1
movapd %xmm2,%xmm0
movaps 0x70(%rsp),%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  0x18(%rsp),%xmm1
mulsd  0x88(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  (%rsp),%xmm0
jmp    1583 <rq_pricing_extendible_maturity_writer+0x433>
movsd  %xmm3,0x10(%rsp)
call   1070 <sqrt@plt>
xorpd  %xmm5,%xmm5
movsd  0x10(%rsp),%xmm3
movapd 0x20(%rsp),%xmm2
movsd  0x38(%rsp),%xmm1
movapd %xmm0,%xmm4
mulsd  0x88(%rsp),%xmm3
movsd  %xmm3,0x10(%rsp)
subsd  %xmm2,%xmm4
mulsd  0x68(%rsp),%xmm1
ucomisd %xmm5,%xmm1
jb     14ee <rq_pricing_extendible_maturity_writer+0x39e>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1503 <rq_pricing_extendible_maturity_writer+0x3b3>
movapd %xmm1,%xmm0
movsd  %xmm4,0x20(%rsp)
call   1070 <sqrt@plt>
movsd  0x20(%rsp),%xmm4
movapd 0x50(%rsp),%xmm1
subsd  %xmm0,%xmm1
movaps 0x70(%rsp),%xmm2
xorps  0xaf7(%rip),%xmm2
movaps %xmm2,0x70(%rsp)
movapd %xmm4,%xmm0
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
subsd  0x90(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x40(%rsp),%xmm0
movaps 0x50(%rsp),%xmm1
movaps 0x70(%rsp),%xmm2
call   1030 <rq_pricing_cumul_bivar_norm_dist@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0xa0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @rq_pricing_extendible_maturity_writer(i16 signext %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = alloca i16
%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
store i16 %0, i16* %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
store double 0.000000e+00, double* %19
%24 = load double, double* %18
%25 = load double, double* %18
%26 = fmul double %24, %25
store double %26, double* %20
%27 = load double, double* %14
%28 = load double, double* %15
%29 = fdiv double %27, %28
%30 = call double @sqrt(double %29)
store double %30, double* %21
%31 = load double, double* %11
%32 = load double, double* %13
%33 = fdiv double %31, %32
%34 = call double @log(double %33)
%35 = load double, double* %17
%36 = load double, double* %20
%37 = fdiv double %36, 2.000000e+00
%38 = fadd double %35, %37
%39 = load double, double* %15
%40 = call double @llvm.fmuladd.f64(double %38, double %39, double %34)
%41 = load double, double* %18
%42 = load double, double* %15
%43 = call double @sqrt(double %42)
%44 = fmul double %41, %43
%45 = fdiv double %40, %44
store double %45, double* %22
%46 = load double, double* %11
%47 = load double, double* %12
%48 = fdiv double %46, %47
%49 = call double @log(double %48)
%50 = load double, double* %17
%51 = load double, double* %20
%52 = fdiv double %51, 2.000000e+00
%53 = fadd double %50, %52
%54 = load double, double* %14
%55 = call double @llvm.fmuladd.f64(double %53, double %54, double %49)
%56 = load double, double* %18
%57 = load double, double* %14
%58 = call double @sqrt(double %57)
%59 = fmul double %56, %58
%60 = fdiv double %55, %59
store double %60, double* %23
%61 = load i16, i16* %10
%62 = icmp ne i16 %61, 0
br i1 %62, label %63, label %114
63: ; preds = %9
%64 = load i16, i16* %10
%65 = load double, double* %11
%66 = load double, double* %12
%67 = load double, double* %14
%68 = load double, double* %16
%69 = load double, double* %17
%70 = load double, double* %18
%71 = call double @rq_pricing_blackscholes_gen(i16 signext %64, double %65, double %66, double %67, double %68, double %69, double %70)
%72 = load double, double* %11
%73 = load double, double* %17
%74 = load double, double* %16
%75 = fsub double %73, %74
%76 = load double, double* %15
%77 = fmul double %75, %76
%78 = call double @exp(double %77)
%79 = fmul double %72, %78
%80 = load double, double* %22
%81 = load double, double* %23
%82 = fneg double %81
%83 = load double, double* %21
%84 = fneg double %83
%85 = call double @rq_pricing_cumul_bivar_norm_dist(double %80, double %82, double %84)
%86 = call double @llvm.fmuladd.f64(double %79, double %85, double %71)
%87 = load double, double* %13
%88 = load double, double* %16
%89 = fneg double %88
%90 = load double, double* %15
%91 = fmul double %89, %90
%92 = call double @exp(double %91)
%93 = fmul double %87, %92
%94 = load double, double* %22
%95 = load double, double* %20
%96 = load double, double* %15
%97 = fmul double %95, %96
%98 = call double @sqrt(double %97)
%99 = fsub double %94, %98
%100 = load double, double* %23
%101 = fneg double %100
%102 = load double, double* %18
%103 = load double, double* %18
%104 = fmul double %102, %103
%105 = load double, double* %14
%106 = fmul double %104, %105
%107 = call double @sqrt(double %106)
%108 = fadd double %101, %107
%109 = load double, double* %21
%110 = fneg double %109
%111 = call double @rq_pricing_cumul_bivar_norm_dist(double %99, double %108, double %110)
%112 = fneg double %93
%113 = call double @llvm.fmuladd.f64(double %112, double %111, double %86)
store double %113, double* %19
br label %163
114: ; preds = %9
%115 = load i16, i16* %10
%116 = load double, double* %11
%117 = load double, double* %12
%118 = load double, double* %14
%119 = load double, double* %16
%120 = load double, double* %17
%121 = load double, double* %18
%122 = call double @rq_pricing_blackscholes_gen(i16 signext %115, double %116, double %117, double %118, double %119, double %120, double %121)
%123 = load double, double* %13
%124 = load double, double* %16
%125 = fneg double %124
%126 = load double, double* %15
%127 = fmul double %125, %126
%128 = call double @exp(double %127)
%129 = fmul double %123, %128
%130 = load double, double* %22
%131 = fneg double %130
%132 = load double, double* %20
%133 = load double, double* %15
%134 = fmul double %132, %133
%135 = call double @sqrt(double %134)
%136 = fadd double %131, %135
%137 = load double, double* %23
%138 = load double, double* %20
%139 = load double, double* %14
%140 = fmul double %138, %139
%141 = call double @sqrt(double %140)
%142 = fsub double %137, %141
%143 = load double, double* %21
%144 = fneg double %143
%145 = call double @rq_pricing_cumul_bivar_norm_dist(double %136, double %142, double %144)
%146 = call double @llvm.fmuladd.f64(double %129, double %145, double %122)
%147 = load double, double* %11
%148 = load double, double* %17
%149 = load double, double* %16
%150 = fsub double %148, %149
%151 = load double, double* %15
%152 = fmul double %150, %151
%153 = call double @exp(double %152)
%154 = fmul double %147, %153
%155 = load double, double* %22
%156 = fneg double %155
%157 = load double, double* %23
%158 = load double, double* %21
%159 = fneg double %158
%160 = call double @rq_pricing_cumul_bivar_norm_dist(double %156, double %157, double %159)
%161 = fneg double %154
%162 = call double @llvm.fmuladd.f64(double %161, double %160, double %146)
store double %162, double* %19
br label %163
163: ; preds = %114, %63
%164 = load double, double* %19
ret double %164
}

LLVM IR (-O2):
define double @rq_pricing_extendible_maturity_writer(i16 signext %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8) {
%10 = fmul double %8, %8
%11 = fdiv double %4, %5
%12 = tail call double @sqrt(double %11)
%13 = fdiv double %1, %3
%14 = tail call double @log(double %13)
%15 = fmul double %10, 5.000000e-01
%16 = fadd double %15, %7
%17 = tail call double @llvm.fmuladd.f64(double %16, double %5, double %14)
%18 = tail call double @sqrt(double %5)
%19 = fmul double %18, %8
%20 = fdiv double %17, %19
%21 = fdiv double %1, %2
%22 = tail call double @log(double %21)
%23 = tail call double @llvm.fmuladd.f64(double %16, double %4, double %22)
%24 = tail call double @sqrt(double %4)
%25 = fmul double %24, %8
%26 = fdiv double %23, %25
%27 = icmp eq i16 %0, 0
br i1 %27, label %51, label %28
28: ; preds = %9
%29 = tail call double @rq_pricing_blackscholes_gen(i16 signext %0, double %1, double %2, double %4, double %6, double %7, double %8)
%30 = fsub double %7, %6
%31 = fmul double %30, %5
%32 = tail call double @exp(double %31)
%33 = fmul double %32, %1
%34 = fneg double %26
%35 = fneg double %12
%36 = tail call double @rq_pricing_cumul_bivar_norm_dist(double %20, double %34, double %35)
%37 = tail call double @llvm.fmuladd.f64(double %33, double %36, double %29)
%38 = fneg double %6
%39 = fmul double %38, %5
%40 = tail call double @exp(double %39)
%41 = fmul double %10, %5
%42 = tail call double @sqrt(double %41)
%43 = fsub double %20, %42
%44 = fmul double %10, %4
%45 = tail call double @sqrt(double %44)
%46 = fsub double %45, %26
%47 = tail call double @rq_pricing_cumul_bivar_norm_dist(double %43, double %46, double %35)
%48 = fneg double %40
%49 = fmul double %48, %3
%50 = tail call double @llvm.fmuladd.f64(double %49, double %47, double %37)
br label %74
51: ; preds = %9
%52 = tail call double @rq_pricing_blackscholes_gen(i16 signext 0, double %1, double %2, double %4, double %6, double %7, double %8)
%53 = fneg double %6
%54 = fmul double %53, %5
%55 = tail call double @exp(double %54)
%56 = fmul double %55, %3
%57 = fneg double %20
%58 = fmul double %10, %5
%59 = tail call double @sqrt(double %58)
%60 = fsub double %59, %20
%61 = fmul double %10, %4
%62 = tail call double @sqrt(double %61)
%63 = fsub double %26, %62
%64 = fneg double %12
%65 = tail call double @rq_pricing_cumul_bivar_norm_dist(double %60, double %63, double %64)
%66 = tail call double @llvm.fmuladd.f64(double %56, double %65, double %52)
%67 = fsub double %7, %6
%68 = fmul double %67, %5
%69 = tail call double @exp(double %68)
%70 = tail call double @rq_pricing_cumul_bivar_norm_dist(double %57, double %26, double %64)
%71 = fneg double %69
%72 = fmul double %71, %1
%73 = tail call double @llvm.fmuladd.f64(double %72, double %70, double %66)
br label %74
74: ; preds = %51, %28
%75 = phi double [ %50, %28 ], [ %73, %51 ]
ret double %75
}