#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, int, double, double, double, double,
                                   double);
double rq_pricing_forward_start(short call, double S, double alpha, double t1,
                                double T, double r, double b, double v) {
  return S * exp((b - r) * t1) *
         rq_pricing_blackscholes_gen(call, 1, alpha, T - t1, r, b, v);
}


x86 assembly (clang, -O0):
<rq_pricing_forward_start>:
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  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x2(%rbp),%ax
movsd  -0x18(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
mov    $0x1,%esi
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_forward_start>:
push   %rbx
sub    $0x40,%rsp
movsd  %xmm6,0x38(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x18(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,0x30(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    %edi,%ebx
movapd %xmm5,%xmm0
subsd  %xmm4,%xmm0
mulsd  %xmm2,%xmm0
call   1030 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm1
subsd  0x10(%rsp),%xmm1
mov    %ebx,%edi
mov    $0x1,%esi
movsd  0x30(%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
movsd  0x28(%rsp),%xmm3
movsd  0x38(%rsp),%xmm4
call   1040 <rq_pricing_blackscholes_gen@plt>
mulsd  0x8(%rsp),%xmm0
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @rq_pricing_forward_start(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* %10
%18 = load double, double* %15
%19 = load double, double* %14
%20 = fsub double %18, %19
%21 = load double, double* %12
%22 = fmul double %20, %21
%23 = call double @exp(double %22)
%24 = fmul double %17, %23
%25 = load i16, i16* %9
%26 = load double, double* %11
%27 = load double, double* %13
%28 = load double, double* %12
%29 = fsub double %27, %28
%30 = load double, double* %14
%31 = load double, double* %15
%32 = load double, double* %16
%33 = call double @rq_pricing_blackscholes_gen(i16 signext %25, i32 1, double %26, double %29, double %30, double %31, double %32)
%34 = fmul double %24, %33
ret double %34
}

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