#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 rq_pricing_blackscholes_gen(short, double, double, double, double,
                                   double, double);
double rq_pricing_jennergren_naslund(short call, double S, double X, double T,
                                     double r, double b, double v,
                                     double lambda) {
  return exp(-lambda * T) * rq_pricing_blackscholes_gen(call, S, X, T, r, b, v);
}


x86 assembly (clang, -O0):
<rq_pricing_jennergren_naslund>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movsd  %xmm0,-0x48(%rbp)
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
movswl %ax,%edi
call   1040 <rq_pricing_blackscholes_gen@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm1,%xmm0
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_jennergren_naslund>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm5,0x38(%rsp)
movsd  %xmm4,0x30(%rsp)
movsd  %xmm3,0x28(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x20(%rsp)
movsd  %xmm0,0x18(%rsp)
mov    %edi,%ebx
xorpd  0xead(%rip),%xmm6
mulsd  %xmm2,%xmm6
movapd %xmm6,%xmm0
call   1030 <exp@plt>
movsd  %xmm0,0x10(%rsp)
mov    %ebx,%edi
movsd  0x18(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x30(%rsp),%xmm4
movsd  0x38(%rsp),%xmm5
call   1040 <rq_pricing_blackscholes_gen@plt>
mulsd  0x10(%rsp),%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @rq_pricing_jennergren_naslund(i16 signext %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca i16
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store i16 %0, i16* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double %5, double* %14
store double %6, double* %15
store double %7, double* %16
%17 = load double, double* %16
%18 = fneg double %17
%19 = load double, double* %12
%20 = fmul double %18, %19
%21 = call double @exp(double %20)
%22 = load i16, i16* %9
%23 = load double, double* %10
%24 = load double, double* %11
%25 = load double, double* %12
%26 = load double, double* %13
%27 = load double, double* %14
%28 = load double, double* %15
%29 = call double @rq_pricing_blackscholes_gen(i16 signext %22, double %23, double %24, double %25, double %26, double %27, double %28)
%30 = fmul double %21, %29
ret double %30
}

LLVM IR (-O2):
define double @rq_pricing_jennergren_naslund(i16 signext %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fneg double %7
%10 = fmul double %9, %3
%11 = tail call double @exp(double %10)
%12 = tail call double @rq_pricing_blackscholes_gen(i16 signext %0, double %1, double %2, double %3, double %4, double %5, double %6)
%13 = fmul double %11, %12
ret double %13
}