#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);
int log(double);
double rq_pricing_cumul_norm_dist(double);
double sqrt(double);
double rq_pricing_average_rate_levy(short call, double S, double SA, double X,
                                    double r, double rf, double v, double T,
                                    double T2) {
  double b = r - rf;
  double ret = 0.0;
  double SE = S / (T * b) * (exp((b - r) * T2) - exp(-r * T2));
  double m = 2 * (S * S) / (b + (v * v)) *
             ((exp((2 * b + (v * v)) * T2) - 1) / (2 * b + (v * v)) -
              (exp(b * T2) - 1) / b);
  double d = m / (T * T);
  double Sv = log(d) - 2 * (r * T2 + log(SE));
  double XStar = X - (T - T2) / T * SA;
  double d1 = 1 / sqrt(Sv) * (log(d) / 2 - log(XStar));
  double d2 = d1 - sqrt(Sv);
  if (call)
    ret = SE * rq_pricing_cumul_norm_dist(d1) -
          XStar * exp(-r * T2) * rq_pricing_cumul_norm_dist(d2);
  else
    ret = (SE * rq_pricing_cumul_norm_dist(d1) -
           XStar * exp(-r * T2) * rq_pricing_cumul_norm_dist(d2)) -
          SE + XStar * exp(-r * T2);
  return ret;
}


x86 assembly (clang, -O0):
<rq_pricing_average_rate_levy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%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)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0xe0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xde8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
mulsd  -0x38(%rbp),%xmm1
addsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movsd  0xd90(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x50(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
mulsd  -0x38(%rbp),%xmm2
addsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0xd0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xc8(%rbp),%xmm0
ff
movsd  0xd3f(%rip),%xmm3
subsd  %xmm3,%xmm2
divsd  -0x50(%rbp),%xmm2
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
call   1050 <log@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm3
ff
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
addsd  %xmm1,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm0
subsd  -0x48(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x78(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  0xc54(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1050 <log@plt>
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x9c(%rbp)
movsd  -0x80(%rbp),%xmm0
call   1050 <log@plt>
movsd  -0xa8(%rbp),%xmm0
ff
mov    %eax,%ecx
mov    -0x9c(%rbp),%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x98(%rbp),%xmm0
ff
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
cmpw   $0x0,-0x2(%rbp)
je     14f9 <rq_pricing_average_rate_levy+0x3b9>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x100(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  -0xf8(%rbp),%xmm1
ff
movsd  -0xf0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    1610 <rq_pricing_average_rate_levy+0x4d0>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  -0x128(%rbp),%xmm1
ff
movsd  -0x120(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x118(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x80(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movsd  -0x110(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x108(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_average_rate_levy>:
push   %rbp
push   %rbx
sub    $0xb8,%rsp
movsd  %xmm7,0x8(%rsp)
movsd  %xmm6,0x68(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x78(%rsp)
movapd %xmm0,0x30(%rsp)
mov    %edi,%ebx
movapd %xmm3,%xmm2
movapd %xmm3,0x90(%rsp)
movapd %xmm5,0x50(%rsp)
unpcklpd %xmm5,%xmm2
unpcklpd %xmm5,%xmm4
movapd %xmm2,%xmm1
subpd  %xmm4,%xmm1
movapd %xmm1,0x10(%rsp)
mulpd  %xmm2,%xmm4
movsd  %xmm1,%xmm4
movapd %xmm4,0xa0(%rsp)
movapd %xmm1,%xmm2
mulsd  %xmm6,%xmm2
divsd  %xmm2,%xmm0
movsd  %xmm0,0x70(%rsp)
movapd %xmm1,%xmm0
subsd  %xmm3,%xmm0
mulsd  %xmm7,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x48(%rsp)
movapd 0xe2c(%rip),%xmm0
xorpd  0x90(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movapd %xmm0,0x80(%rsp)
call   1040 <exp@plt>
movsd  0x48(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x70(%rsp),%xmm1
movsd  %xmm1,0x48(%rsp)
movapd 0x30(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movapd %xmm0,0x30(%rsp)
movapd 0x50(%rsp),%xmm1
movapd %xmm1,%xmm0
unpcklpd 0x10(%rsp),%xmm0
shufpd $0x2,0xde0(%rip),%xmm1
mulpd  %xmm0,%xmm1
addpd  0xa0(%rsp),%xmm1
movapd %xmm1,0x50(%rsp)
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
unpcklpd %xmm0,%xmm1
addpd  0xdbe(%rip),%xmm1
movapd 0x30(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,%xmm1
divpd  0x50(%rsp),%xmm1
movapd %xmm1,0x30(%rsp)
movapd 0x10(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
addsd  0xd9b(%rip),%xmm0
divsd  0x10(%rsp),%xmm0
movapd 0x30(%rsp),%xmm2
movapd %xmm2,%xmm1
unpckhpd %xmm2,%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  0x68(%rsp),%xmm0
mulsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,0x30(%rsp)
movapd %xmm1,%xmm0
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x48(%rsp),%xmm0
call   1050 <log@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x8(%rsp),%xmm2
movapd 0x90(%rsp),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
addsd  %xmm1,%xmm1
movsd  0x10(%rsp),%xmm3
subsd  %xmm1,%xmm3
movsd  0x68(%rsp),%xmm1
movapd %xmm1,%xmm0
subsd  %xmm2,%xmm0
divsd  %xmm1,%xmm0
mulsd  0x78(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
xorps  %xmm0,%xmm0
sqrtsd %xmm3,%xmm0
xorpd  %xmm1,%xmm1
movsd  %xmm3,0x10(%rsp)
ucomisd %xmm1,%xmm3
movsd  %xmm0,0x8(%rsp)
jae    1362 <rq_pricing_average_rate_levy+0x222>
movsd  0x10(%rsp),%xmm0
call   1060 <sqrt@plt>
movsd  0xcce(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x50(%rsp)
movaps 0x30(%rsp),%xmm0
call   1050 <log@plt>
mov    %eax,%ebp
shr    $0x1f,%ebp
add    %eax,%ebp
sar    %ebp
movsd  0x28(%rsp),%xmm0
call   1050 <log@plt>
sub    %eax,%ebp
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
mulsd  0x50(%rsp),%xmm1
movsd  0x10(%rsp),%xmm0
ucomisd 0xc91(%rip),%xmm0
movsd  0x8(%rsp),%xmm0
jae    13ce <rq_pricing_average_rate_levy+0x28e>
movsd  0x10(%rsp),%xmm0
movsd  %xmm1,0x8(%rsp)
call   1060 <sqrt@plt>
movsd  0x8(%rsp),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0x8(%rsp)
movaps 0x80(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x28(%rsp),%xmm1
movsd  0x30(%rsp),%xmm3
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movsd  0x48(%rsp),%xmm0
mulsd  %xmm0,%xmm2
subsd  %xmm3,%xmm2
test   %bx,%bx
je     143c <rq_pricing_average_rate_levy+0x2fc>
movapd %xmm2,%xmm0
jmp    1460 <rq_pricing_average_rate_levy+0x320>
subsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
movapd 0x80(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x28(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0xb8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define 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) {
%10 = insertelement <2 x double> poison, double %4, i64 0
%11 = insertelement <2 x double> %10, double %6, i64 1
%12 = insertelement <2 x double> poison, double %5, i64 0
%13 = insertelement <2 x double> %12, double %6, i64 1
%14 = fsub <2 x double> %11, %13
%15 = fmul <2 x double> %11, %13
%16 = shufflevector <2 x double> %14, <2 x double> %15, <2 x i32> <i32 0, i32 3>
%17 = extractelement <2 x double> %14, i64 0
%18 = fmul double %17, %7
%19 = fdiv double %1, %18
%20 = fsub double %17, %4
%21 = fmul double %20, %8
%22 = tail call double @exp(double %21)
%23 = fneg double %4
%24 = fmul double %23, %8
%25 = tail call double @exp(double %24)
%26 = fsub double %22, %25
%27 = fmul double %19, %26
%28 = fmul double %1, %1
%29 = insertelement <2 x double> poison, double %6, i64 0
%30 = shufflevector <2 x double> %29, <2 x double> %14, <2 x i32> <i32 0, i32 2>
%31 = insertelement <2 x double> <double poison, double 2.000000e+00>, double %6, i64 0
%32 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %31, <2 x double> %16)
%33 = extractelement <2 x double> %32, i64 1
%34 = fmul double %33, %8
%35 = tail call double @exp(double %34)
%36 = insertelement <2 x double> poison, double %28, i64 0
%37 = insertelement <2 x double> %36, double %35, i64 1
%38 = fmul <2 x double> %37, <double 2.000000e+00, double poison>
%39 = fadd <2 x double> %37, <double poison, double -1.000000e+00>
%40 = shufflevector <2 x double> %38, <2 x double> %39, <2 x i32> <i32 0, i32 3>
%41 = fdiv <2 x double> %40, %32
%42 = fmul double %17, %8
%43 = tail call double @exp(double %42)
%44 = fadd double %43, -1.000000e+00
%45 = fdiv double %44, %17
%46 = extractelement <2 x double> %41, i64 1
%47 = fsub double %46, %45
%48 = extractelement <2 x double> %41, i64 0
%49 = fmul double %48, %47
%50 = fmul double %7, %7
%51 = fdiv double %49, %50
%52 = tail call i32 @log(double %51)
%53 = sitofp i32 %52 to double
%54 = tail call i32 @log(double %27)
%55 = sitofp i32 %54 to double
%56 = tail call double @llvm.fmuladd.f64(double %4, double %8, double %55)
%57 = tail call double @llvm.fmuladd.f64(double %56, double -2.000000e+00, double %53)
%58 = fsub double %7, %8
%59 = fneg double %58
%60 = fdiv double %59, %7
%61 = tail call double @llvm.fmuladd.f64(double %60, double %2, double %3)
%62 = tail call double @sqrt(double %57)
%63 = fdiv double 1.000000e+00, %62
%64 = tail call i32 @log(double %51)
%65 = sdiv i32 %64, 2
%66 = tail call i32 @log(double %61)
%67 = sub nsw i32 %65, %66
%68 = sitofp i32 %67 to double
%69 = fmul double %63, %68
%70 = tail call double @sqrt(double %57)
%71 = fsub double %69, %70
%72 = icmp eq i16 %0, 0
%73 = tail call double @rq_pricing_cumul_norm_dist(double %69)
%74 = tail call double @exp(double %24)
%75 = tail call double @rq_pricing_cumul_norm_dist(double %71)
%76 = fneg double %61
%77 = fmul double %74, %76
%78 = fmul double %77, %75
%79 = tail call double @llvm.fmuladd.f64(double %27, double %73, double %78)
br i1 %72, label %80, label %84
80: ; preds = %9
%81 = fsub double %79, %27
%82 = tail call double @exp(double %24)
%83 = tail call double @llvm.fmuladd.f64(double %61, double %82, double %81)
br label %84
84: ; preds = %9, %80
%85 = phi double [ %83, %80 ], [ %79, %9 ]
ret double %85
}