#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_cumul_norm_dist(double);
double rq_pricing_norm_density(double);
double sqrt(double);
double rq_pricing_blackscholes_gen_greeks(int call, double S, double X,
                                          double tau, double r, double b,
                                          double sigma, double *delta,
                                          double *gamma, double *vega,
                                          double *rho, double *theta) {
  double sigma_tau_sqrt = sigma * sqrt(tau);
  double tau_sqrt = sqrt(tau);
  double d1 = (log(S / X) + (b + 0.5 * sigma * sigma * tau)) / sigma_tau_sqrt;
  double d2 = d1 - sigma * sqrt(tau);
  double ret = 0.0;
  double df_spot = exp((b - r) * tau);
  double df_strike = exp(-r * tau);
  double df = call ? df_spot : df_strike;
  double m = call ? 1.0 : -1.0;
  double nd1 = rq_pricing_norm_density(d1);
  double cnd1 = rq_pricing_cumul_norm_dist(m * d1);
  double cnd2 = rq_pricing_cumul_norm_dist(m * d2);
  ret = m * S * df_spot * cnd1 - m * X * df_strike * cnd2;
  if (delta)
    (*delta) = df * cnd1 * m;
  if (gamma)
    (*gamma) = df * nd1 / (S * sigma_tau_sqrt);
  if (vega)
    (*vega) = S * tau_sqrt * df * nd1;
  if (rho)
    (*rho) = m * X * df_strike * cnd2;
  if (theta)
    (*theta) = -sigma * S * df_spot * nd1 / (2 * tau_sqrt) -
               m * (b - r) * S * cnd1 * df_spot - m * r * X * df_strike * cnd2;
  return ret;
}


x86 assembly (clang, -O0):
<rq_pricing_blackscholes_gen_greeks>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %edi,-0x4(%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)
mov    %rsi,-0x40(%rbp)
mov    %rdx,-0x48(%rbp)
mov    %rcx,-0x50(%rbp)
mov    %r8,-0x58(%rbp)
mov    %r9,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0x30(%rbp),%xmm2
movsd  0xe1a(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x98(%rbp)
ff
cmpl   $0x0,-0x4(%rbp)
je     12da <rq_pricing_blackscholes_gen_greeks+0x18a>
movsd  -0x90(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
jmp    12ea <rq_pricing_blackscholes_gen_greeks+0x19a>
movsd  -0x98(%rbp),%xmm0
ff
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0xe0(%rbp),%xmm0
ff
movsd  %xmm0,-0xa0(%rbp)
ff
mov    -0x4(%rbp),%eax
movsd  0xd03(%rip),%xmm0
movsd  0xd03(%rip),%xmm1
movsd  %xmm1,-0xf0(%rbp)
ff
cmp    $0x0,%eax
movsd  %xmm0,-0xe8(%rbp)
ff
jne    1336 <rq_pricing_blackscholes_gen_greeks+0x1e6>
movsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1070 <rq_pricing_norm_density@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x78(%rbp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x80(%rbp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
mulsd  -0x18(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  -0xc0(%rbp),%xmm1
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
cmpq   $0x0,-0x40(%rbp)
je     1418 <rq_pricing_blackscholes_gen_greeks+0x2c8>
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xb8(%rbp),%xmm0
ff
mulsd  -0xa8(%rbp),%xmm0
ff
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x48(%rbp)
je     1449 <rq_pricing_blackscholes_gen_greeks+0x2f9>
movsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  -0x10(%rbp),%xmm1
mulsd  -0x68(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x50(%rbp)
je     1476 <rq_pricing_blackscholes_gen_greeks+0x326>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x58(%rbp)
je     14a6 <rq_pricing_blackscholes_gen_greeks+0x356>
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
mulsd  -0xc0(%rbp),%xmm0
ff
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x60(%rbp)
je     1586 <rq_pricing_blackscholes_gen_greeks+0x436>
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x90(%rbp),%xmm0
ff
mulsd  -0xb0(%rbp),%xmm0
ff
movsd  0xb2e(%rip),%xmm1
mulsd  -0x70(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0x30(%rbp),%xmm2
subsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0xb8(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
mulsd  -0x98(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_blackscholes_gen_greeks>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %r9,%r14
mov    %r8,%r15
mov    %rcx,%r12
mov    %rdx,%r13
mov    %rsi,%rbx
movapd %xmm5,0x40(%rsp)
movsd  %xmm4,0x20(%rsp)
movaps %xmm3,0x50(%rsp)
movsd  %xmm1,0x30(%rsp)
movapd %xmm0,%xmm1
mov    %edi,%ebp
xorps  %xmm3,%xmm3
sqrtsd %xmm2,%xmm3
xorpd  %xmm4,%xmm4
movsd  %xmm2,0x8(%rsp)
ucomisd %xmm4,%xmm2
movapd %xmm3,%xmm0
movsd  %xmm1,0x28(%rsp)
movsd  %xmm3,0x10(%rsp)
jae    11cf <rq_pricing_blackscholes_gen_greeks+0x7f>
movsd  0x8(%rsp),%xmm0
call   1060 <sqrt@plt>
xorpd  %xmm4,%xmm4
movsd  0x10(%rsp),%xmm3
movsd  0x28(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm0
ucomisd %xmm4,%xmm0
movapd %xmm3,%xmm0
jae    11fc <rq_pricing_blackscholes_gen_greeks+0xac>
movsd  0x8(%rsp),%xmm0
call   1060 <sqrt@plt>
movsd  0x28(%rsp),%xmm1
movsd  %xmm0,0x80(%rsp)
divsd  0x30(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1050 <log@plt>
movsd  0xde4(%rip),%xmm2
movapd 0x40(%rsp),%xmm1
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm2
addsd  0x20(%rsp),%xmm2
addsd  %xmm0,%xmm2
divsd  0x38(%rsp),%xmm2
movsd  %xmm2,0x18(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
jae    1265 <rq_pricing_blackscholes_gen_greeks+0x115>
movsd  0x8(%rsp),%xmm0
call   1060 <sqrt@plt>
mulsd  0x40(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x60(%rsp)
movsd  0x20(%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x50(%rsp),%xmm0
xorpd  0xd64(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
xor    %eax,%eax
movsd  %xmm0,0x78(%rsp)
test   %ebp,%ebp
sete   %cl
je     12cc <rq_pricing_blackscholes_gen_greeks+0x17c>
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x68(%rsp)
mov    %cl,%al
lea    0xd45(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1070 <rq_pricing_norm_density@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x60(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  0x68(%rsp),%xmm7
movsd  0x18(%rsp),%xmm8
movsd  0x8(%rsp),%xmm6
test   %rbx,%rbx
je     1348 <rq_pricing_blackscholes_gen_greeks+0x1f8>
movapd %xmm7,%xmm1
mulsd  %xmm8,%xmm1
mulsd  %xmm6,%xmm1
movsd  %xmm1,(%rbx)
movapd %xmm6,%xmm1
mulsd  0x30(%rsp),%xmm1
test   %r13,%r13
movsd  0x28(%rsp),%xmm3
movsd  0x80(%rsp),%xmm4
movsd  0x78(%rsp),%xmm9
movsd  0x70(%rsp),%xmm10
je     1391 <rq_pricing_blackscholes_gen_greeks+0x241>
movapd %xmm7,%xmm2
mulsd  %xmm10,%xmm2
movsd  0x38(%rsp),%xmm5
mulsd  %xmm3,%xmm5
divsd  %xmm5,%xmm2
movsd  %xmm2,0x0(%r13)
mulsd  %xmm9,%xmm1
test   %r12,%r12
je     13b2 <rq_pricing_blackscholes_gen_greeks+0x262>
movapd %xmm4,%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm7,%xmm2
mulsd  %xmm10,%xmm2
movsd  %xmm2,(%r12)
mulsd  %xmm0,%xmm1
test   %r15,%r15
movsd  0x10(%rsp),%xmm5
je     13c6 <rq_pricing_blackscholes_gen_greeks+0x276>
movsd  %xmm1,(%r15)
test   %r14,%r14
je     142b <rq_pricing_blackscholes_gen_greeks+0x2db>
movapd 0x40(%rsp),%xmm2
xorpd  0xc37(%rip),%xmm2
mulsd  %xmm3,%xmm2
mulsd  %xmm5,%xmm2
mulsd  %xmm10,%xmm2
addsd  %xmm4,%xmm4
divsd  %xmm4,%xmm2
movsd  0x20(%rsp),%xmm4
mulsd  %xmm6,%xmm4
mulsd  %xmm3,%xmm4
mulsd  %xmm8,%xmm4
mulsd  %xmm5,%xmm4
subsd  %xmm4,%xmm2
movapd 0x50(%rsp),%xmm4
mulsd  %xmm6,%xmm4
mulsd  0x30(%rsp),%xmm4
mulsd  %xmm9,%xmm4
mulsd  %xmm0,%xmm4
subsd  %xmm4,%xmm2
movsd  %xmm2,(%r14)
mulsd  %xmm3,%xmm6
mulsd  %xmm5,%xmm6
mulsd  %xmm8,%xmm6
subsd  %xmm1,%xmm6
movapd %xmm6,%xmm0
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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