#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 rq_pricing_digital(short, short, double, double, double, double, double,
                          double, double);
double rq_pricing_double_digital_knockout(short, short, double, double, double,
                                          double, double, double, double,
                                          double, double);
double rq_pricing_double_digital_knockin(short cash, short call, double S,
                                         double X, double L, double H,
                                         double r_dom, double r_for,
                                         double sigma, double tau_e,
                                         double tau_d) {
  return rq_pricing_digital(cash, call, S, X, r_dom, r_for, sigma, tau_e,
                            tau_d) -
         rq_pricing_double_digital_knockout(cash, call, S, X, L, H, r_dom,
                                            r_for, sigma, tau_e, tau_d);
}


x86 assembly (clang, -O0):
<rq_pricing_double_digital_knockin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %si,%ax
mov    %di,%cx
movsd  0x10(%rbp),%xmm8
mov    %cx,-0x2(%rbp)
mov    %ax,-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)
movsd  %xmm6,-0x40(%rbp)
movsd  %xmm7,-0x48(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x4(%rbp),%ax
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
movsd  0x10(%rbp),%xmm6
movswl %cx,%edi
movswl %ax,%esi
call   1030 <rq_pricing_digital@plt>
movsd  %xmm0,-0x50(%rbp)
mov    -0x2(%rbp),%cx
mov    -0x4(%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
movsd  0x10(%rbp),%xmm8
movswl %cx,%edi
movswl %ax,%esi
movsd  %xmm8,(%rsp)
call   1040 <rq_pricing_double_digital_knockout@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
subsd  %xmm1,%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_double_digital_knockin>:
push   %rbp
push   %rbx
sub    $0x58,%rsp
movaps %xmm7,%xmm8
movsd  %xmm7,0x38(%rsp)
movaps %xmm6,%xmm7
movsd  %xmm6,0x30(%rsp)
movsd  %xmm5,0x28(%rsp)
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x50(%rsp)
movsd  %xmm2,0x48(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x10(%rsp)
mov    %esi,%ebx
mov    %edi,%ebp
movsd  0x70(%rsp),%xmm6
movaps %xmm4,%xmm2
movaps %xmm5,%xmm3
movaps %xmm7,%xmm4
movaps %xmm8,%xmm5
call   1030 <rq_pricing_digital@plt>
movsd  %xmm0,0x40(%rsp)
movsd  0x70(%rsp),%xmm0
movsd  %xmm0,(%rsp)
mov    %ebp,%edi
mov    %ebx,%esi
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movsd  0x48(%rsp),%xmm2
movsd  0x50(%rsp),%xmm3
movsd  0x20(%rsp),%xmm4
movsd  0x28(%rsp),%xmm5
movsd  0x30(%rsp),%xmm6
movsd  0x38(%rsp),%xmm7
call   1040 <rq_pricing_double_digital_knockout@plt>
movsd  0x40(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @rq_pricing_double_digital_knockin(i16 signext %0, i16 signext %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = alloca i16
%13 = alloca i16
%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
store i16 %0, i16* %12
store i16 %1, i16* %13
store double %2, double* %14
store double %3, double* %15
store double %4, double* %16
store double %5, double* %17
store double %6, double* %18
store double %7, double* %19
store double %8, double* %20
store double %9, double* %21
store double %10, double* %22
%23 = load i16, i16* %12
%24 = load i16, i16* %13
%25 = load double, double* %14
%26 = load double, double* %15
%27 = load double, double* %18
%28 = load double, double* %19
%29 = load double, double* %20
%30 = load double, double* %21
%31 = load double, double* %22
%32 = call double @rq_pricing_digital(i16 signext %23, i16 signext %24, double %25, double %26, double %27, double %28, double %29, double %30, double %31)
%33 = load i16, i16* %12
%34 = load i16, i16* %13
%35 = load double, double* %14
%36 = load double, double* %15
%37 = load double, double* %16
%38 = load double, double* %17
%39 = load double, double* %18
%40 = load double, double* %19
%41 = load double, double* %20
%42 = load double, double* %21
%43 = load double, double* %22
%44 = call double @rq_pricing_double_digital_knockout(i16 signext %33, i16 signext %34, double %35, double %36, double %37, double %38, double %39, double %40, double %41, double %42, double %43)
%45 = fsub double %32, %44
ret double %45
}

LLVM IR (-O2):
define double @rq_pricing_double_digital_knockin(i16 signext %0, i16 signext %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10) {
%12 = tail call double @rq_pricing_digital(i16 signext %0, i16 signext %1, double %2, double %3, double %6, double %7, double %8, double %9, double %10)
%13 = tail call double @rq_pricing_double_digital_knockout(i16 signext %0, i16 signext %1, double %2, double %3, double %4, double %5, double %6, double %7, double %8, double %9, double %10)
%14 = fsub double %12, %13
ret double %14
}