#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 fabs(double);
double rq_pricing_average_rate_levy(short, double, double, double, double,
                                    double, double, double, double);
double rq_pricing_average_rate_levy_greeks(
    short call, double S, double SA, double X, double r, double rf, double v,
    double T, double T2, double *delta, double delta_shift, double *gamma,
    double gamma_shift, double *vega, double vega_shift, double *theta,
    double theta_shift, double *rho, double rho_shift) {
  double delta_up = 0.0;
  double delta_down = 0.0;
  double gamma_up = 0.0;
  double gamma_down = 0.0;
  double vega_up = 0.0;
  double vega_down = 0.0;
  double theta_up = 0.0;
  double rho_up = 0.0;
  double rho_down = 0.0;
  double price = 0.0;
  price = rq_pricing_average_rate_levy(call, S, SA, X, r, rf, v, T, T2);
  if (delta) {
    delta_up = rq_pricing_average_rate_levy(call, S + delta_shift, SA, X, r, rf,
                                            v, T, T2);
    delta_down = rq_pricing_average_rate_levy(call, S - delta_shift, SA, X, r,
                                              rf, v, T, T2);
    *delta = (delta_up - delta_down) / (2.0 * delta_shift);
    if (gamma) {
      gamma_up = rq_pricing_average_rate_levy(call, S + 2 * gamma_shift, SA, X,
                                              r, rf, v, T, T2);
      gamma_down = rq_pricing_average_rate_levy(call, S - 2 * gamma_shift, SA,
                                                X, r, rf, v, T, T2);
      gamma_up = (gamma_up - 2 * delta_up + price);
      gamma_down = (gamma_down - 2 * delta_down + price);
      *gamma = (fabs(gamma_up) + fabs(gamma_down)) /
               (2.0 * gamma_shift * gamma_shift);
    }
  }
  if (theta) {
    theta_up = rq_pricing_average_rate_levy(call, S, SA, X, r, rf, v,
                                            T + theta_shift, T2);
    *theta = (price - theta_up) / price;
  }
  if (rho) {
    rho_up = rq_pricing_average_rate_levy(call, S, SA, X, r + rho_shift, rf, v,
                                          T, T2);
    rho_down = rq_pricing_average_rate_levy(call, S, SA, X, r - rho_shift, rf,
                                            v, T, T2);
    *rho = (rho_up - rho_down) / (2.0 * rho_shift);
  }
  if (vega) {
    vega_up = rq_pricing_average_rate_levy(call, S, SA, X, r, rf,
                                           v + vega_shift, T, T2);
    vega_down = rq_pricing_average_rate_levy(call, S, SA, X, r, rf,
                                             v - vega_shift, T, T2);
    *vega = (vega_up - vega_down) / (2.0 * vega_shift);
  }
  return price;
}


x86 assembly (clang, -O0):
<rq_pricing_average_rate_levy_greeks>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %di,%ax
movsd  0x30(%rbp),%xmm8
movsd  0x28(%rbp),%xmm8
movsd  0x20(%rbp),%xmm8
movsd  0x18(%rbp),%xmm8
movsd  0x10(%rbp),%xmm8
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)
mov    %rsi,-0x50(%rbp)
mov    %rdx,-0x58(%rbp)
mov    %rcx,-0x60(%rbp)
mov    %r8,-0x68(%rbp)
mov    %r9,-0x70(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x78(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x80(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
cmpq   $0x0,-0x50(%rbp)
je     13fe <rq_pricing_average_rate_levy_greeks+0x2ee>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
addsd  0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0x78(%rbp)
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
subsd  0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
subsd  -0x80(%rbp),%xmm0
movsd  0xd47(%rip),%xmm1
mulsd  0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x58(%rbp)
je     13f9 <rq_pricing_average_rate_levy_greeks+0x2e9>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm1
movsd  0x18(%rbp),%xmm0
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  0x18(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x78(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
addsd  -0xc0(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movaps 0xc50(%rip),%xmm1
pand   %xmm1,%xmm0
movsd  -0x90(%rbp),%xmm1
ff
movaps 0xc3d(%rip),%xmm2
pand   %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  0xc1d(%rip),%xmm1
mulsd  0x18(%rbp),%xmm1
mulsd  0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x58(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13fe <rq_pricing_average_rate_levy_greeks+0x2ee>
cmpq   $0x0,-0x68(%rbp)
je     146a <rq_pricing_average_rate_levy_greeks+0x35a>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
addsd  0x28(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
subsd  -0xa8(%rbp),%xmm0
ff
divsd  -0xc0(%rbp),%xmm0
ff
mov    -0x68(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x70(%rbp)
je     1520 <rq_pricing_average_rate_levy_greeks+0x410>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
addsd  0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
subsd  0x30(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0xb0(%rbp),%xmm0
ff
subsd  -0xb8(%rbp),%xmm0
ff
movsd  0xaf1(%rip),%xmm1
mulsd  0x30(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x70(%rbp),%rax
movsd  %xmm0,(%rax)
cmpq   $0x0,-0x60(%rbp)
je     15d6 <rq_pricing_average_rate_levy_greeks+0x4c6>
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
addsd  0x20(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x2(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm4
movsd  -0x38(%rbp),%xmm5
subsd  0x20(%rbp),%xmm5
movsd  -0x40(%rbp),%xmm6
movsd  -0x48(%rbp),%xmm7
movswl %ax,%edi
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x98(%rbp),%xmm0
ff
subsd  -0xa0(%rbp),%xmm0
ff
movsd  0xa3b(%rip),%xmm1
mulsd  0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x60(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0xc0(%rbp),%xmm0
ff
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_average_rate_levy_greeks>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,%r15
mov    %r8,%r13
mov    %rcx,%r14
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %edi,%ebp
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm3,0x10(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm5,0x20(%rsp)
movsd  %xmm6,0x38(%rsp)
movsd  %xmm7,0x28(%rsp)
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,0x48(%rsp)
movswl %bp,%ebp
test   %rbx,%rbx
je     1317 <rq_pricing_average_rate_levy_greeks+0x207>
movsd  (%rsp),%xmm0
addsd  0xb0(%rsp),%xmm0
mov    %ebp,%edi
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,0x40(%rsp)
movsd  (%rsp),%xmm0
subsd  0xb0(%rsp),%xmm0
mov    %ebp,%edi
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movapd %xmm0,%xmm3
movsd  0x40(%rsp),%xmm0
subsd  %xmm3,%xmm0
movsd  0xb0(%rsp),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,(%rbx)
test   %r12,%r12
je     1317 <rq_pricing_average_rate_levy_greeks+0x207>
movsd  0xb8(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x50(%rsp)
addsd  (%rsp),%xmm0
mov    %ebp,%edi
movsd  %xmm3,0x58(%rsp)
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movapd %xmm0,0x60(%rsp)
movsd  (%rsp),%xmm0
subsd  0x50(%rsp),%xmm0
mov    %ebp,%edi
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  0x40(%rsp),%xmm1
addsd  %xmm1,%xmm1
movapd 0x60(%rsp),%xmm2
subsd  %xmm1,%xmm2
movsd  0x48(%rsp),%xmm1
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm3
movsd  0x58(%rsp),%xmm2
addsd  %xmm2,%xmm2
subsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movapd 0xd0e(%rip),%xmm1
andpd  %xmm1,%xmm3
andpd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
movsd  0x50(%rsp),%xmm1
mulsd  0xb8(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%r12)
test   %r13,%r13
je     1373 <rq_pricing_average_rate_levy_greeks+0x263>
movsd  0xc8(%rsp),%xmm6
addsd  0x38(%rsp),%xmm6
mov    %ebp,%edi
movsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  0x48(%rsp),%xmm2
movapd %xmm2,%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,0x0(%r13)
test   %r15,%r15
movsd  0x28(%rsp),%xmm8
movsd  0x20(%rsp),%xmm5
movsd  0x18(%rsp),%xmm4
movsd  0x10(%rsp),%xmm3
movsd  0x8(%rsp),%xmm2
movsd  0x30(%rsp),%xmm1
movsd  (%rsp),%xmm0
je     146e <rq_pricing_average_rate_levy_greeks+0x35e>
movsd  0x10(%rsp),%xmm3
addsd  0xd0(%rsp),%xmm3
mov    %ebp,%edi
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x10(%rsp),%xmm3
subsd  0xd0(%rsp),%xmm3
mov    %ebp,%edi
movsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x20(%rsp),%xmm5
movsd  0x28(%rsp),%xmm8
movsd  0x40(%rsp),%xmm7
subsd  %xmm0,%xmm7
movsd  (%rsp),%xmm0
movsd  0xd0(%rsp),%xmm6
addsd  %xmm6,%xmm6
divsd  %xmm6,%xmm7
movsd  %xmm7,(%r15)
test   %r14,%r14
movsd  0x38(%rsp),%xmm6
je     14f2 <rq_pricing_average_rate_levy_greeks+0x3e2>
addsd  0xc0(%rsp),%xmm5
mov    %ebp,%edi
movaps %xmm8,%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x20(%rsp),%xmm5
subsd  0xc0(%rsp),%xmm5
mov    %ebp,%edi
movsd  (%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
movsd  0x18(%rsp),%xmm4
movsd  0x38(%rsp),%xmm6
movsd  0x28(%rsp),%xmm7
call   1030 <rq_pricing_average_rate_levy@plt>
movsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0xc0(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
movsd  0x48(%rsp),%xmm0
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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