#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 log(double);
double pow(double, double);
double rq_pricing_cumul_norm_dist(double);
double sqrt(double);
double rq_pricing_digital_barrier(short cash, short at_hit, short in, double S,
                                  double X, double B, double r_dom,
                                  double r_for, double sigma, double tau_e,
                                  double tau_d) {
  short up = B > S;
  short down = !up;
  short asset = !cash;
  short out = !in;
  short at_expiry = !at_hit;
  double eta = (up ? -1 : 1);
  double phi = (in ? -eta : eta);
  double b = r_dom - r_for;
  double v_sqr = sigma * sigma;
  double v_sqrt_T = sigma * sqrt(tau_e);
  double mu = (b - v_sqr / 2.0) / v_sqr;
  double mu_plus_1 = mu + 1.0;
  double lambda = sqrt((mu * mu) + 2.0 * r_dom / v_sqr);
  double X1 = log(S / X) / v_sqrt_T + mu_plus_1 * v_sqrt_T;
  double X2 = log(S / B) / v_sqrt_T + mu_plus_1 * v_sqrt_T;
  double y1 = log((B * B) / (S * X)) / v_sqrt_T + mu_plus_1 * v_sqrt_T;
  double y2 = log(B / S) / v_sqrt_T + mu_plus_1 * v_sqrt_T;
  double Z = log(B / S) / v_sqrt_T + lambda * v_sqrt_T;
  double a1 =
      S * exp((b - r_dom) * tau_d) * rq_pricing_cumul_norm_dist(phi * X1);
  double b1 = X * exp(-r_dom * tau_d) *
              rq_pricing_cumul_norm_dist(phi * X1 - phi * v_sqrt_T);
  double a2 =
      S * exp((b - r_dom) * tau_d) * rq_pricing_cumul_norm_dist(phi * X2);
  double b2 = X * exp(-r_dom * tau_d) *
              rq_pricing_cumul_norm_dist(phi * X2 - phi * v_sqrt_T);
  double a4 = S * exp((b - r_dom) * tau_d) * pow((B / S), (2 * mu_plus_1)) *
              rq_pricing_cumul_norm_dist(eta * y2);
  double b4 = X * exp(-r_dom * tau_d) * pow((B / S), (2 * mu)) *
              rq_pricing_cumul_norm_dist(eta * y2 - eta * v_sqrt_T);
  double a5 =
      X *
      (pow((B / S), (mu + lambda)) * rq_pricing_cumul_norm_dist(eta * Z) +
       pow((B / S), (mu - lambda)) *
           rq_pricing_cumul_norm_dist(eta * Z - 2 * eta * lambda * v_sqrt_T));
  double value = 0.0;
  if (down && in && cash && at_hit)
    value = a5;
  else if (up && in && cash && at_hit)
    value = a5;
  else if (down && in && asset && at_hit)
    value = a5;
  else if (up && in && asset && at_hit)
    value = a5;
  else if (down && in && cash && at_expiry)
    value = b2 + b4;
  else if (up && in && cash && at_expiry)
    value = b2 + b4;
  else if (down && in && asset && at_expiry)
    value = a2 + a4;
  else if (up && in && asset && at_expiry)
    value = a2 + a4;
  else if (down && out && cash)
    value = b2 - b4;
  else if (up && out && cash)
    value = b2 - b4;
  else if (down && out && asset)
    value = a2 - a4;
  else if (up && out && asset)
    value = a2 - a4;
  return value;
}


x86 assembly (clang, -O0):
<rq_pricing_digital_barrier>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%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  -0x20(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x4a(%rbp)
cmpw   $0x0,-0x4a(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x4c(%rbp)
cmpw   $0x0,-0x2(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x4e(%rbp)
cmpw   $0x0,-0x6(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x50(%rbp)
cmpw   $0x0,-0x4(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %ax,-0x52(%rbp)
movswl -0x4a(%rbp),%edx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     124d <rq_pricing_digital_barrier+0xfd>
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
jmp    125a <rq_pricing_digital_barrier+0x10a>
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x108(%rbp),%xmm0
ff
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x1a0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x1a0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x70(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
movsd  0xd3e(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
divsd  -0x78(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xd29(%rip),%xmm0
addsd  -0x88(%rbp),%xmm0
ff
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0x88(%rbp),%xmm2
ff
movsd  0xcf9(%rip),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1070 <sqrt@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
divsd  -0x80(%rbp),%xmm1
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0x80(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x198(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x198(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x190(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0xa0(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x190(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x188(%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  -0x188(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x180(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x68(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x180(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x178(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x178(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x170(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mulsd  -0xa8(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x170(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x168(%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  -0x168(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x160(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0x68(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x160(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x158(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x158(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x150(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0x984(%rip),%xmm1
mulsd  -0x90(%rbp),%xmm1
ff
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x150(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x148(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0xb8(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x148(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x140(%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  -0x140(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x138(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  0x8db(%rip),%xmm1
mulsd  -0x88(%rbp),%xmm1
ff
call   1060 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x138(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x130(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x60(%rbp),%xmm1
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps %xmm0,%xmm1
movsd  -0x130(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
addsd  -0x98(%rbp),%xmm1
ff
call   1060 <pow@plt>
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
mulsd  -0xc0(%rbp),%xmm0
ff
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
subsd  -0x98(%rbp),%xmm1
ff
call   1060 <pow@plt>
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  -0xc0(%rbp),%xmm2
ff
movsd  0x7db(%rip),%xmm1
mulsd  -0x60(%rbp),%xmm1
mulsd  -0x98(%rbp),%xmm1
ff
mulsd  -0x80(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  -0x128(%rbp),%xmm2
ff
movsd  -0x120(%rbp),%xmm1
ff
movsd  -0x118(%rbp),%xmm3
ff
movaps %xmm0,%xmm4
movsd  -0x110(%rbp),%xmm0
ff
mulsd  %xmm4,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     18ea <rq_pricing_digital_barrier+0x79a>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     18ea <rq_pricing_digital_barrier+0x79a>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     18ea <rq_pricing_digital_barrier+0x79a>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
je     18ea <rq_pricing_digital_barrier+0x79a>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c4b <rq_pricing_digital_barrier+0xafb>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     1933 <rq_pricing_digital_barrier+0x7e3>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1933 <rq_pricing_digital_barrier+0x7e3>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1933 <rq_pricing_digital_barrier+0x7e3>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
je     1933 <rq_pricing_digital_barrier+0x7e3>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c46 <rq_pricing_digital_barrier+0xaf6>
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     197c <rq_pricing_digital_barrier+0x82c>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     197c <rq_pricing_digital_barrier+0x82c>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     197c <rq_pricing_digital_barrier+0x82c>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
je     197c <rq_pricing_digital_barrier+0x82c>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c41 <rq_pricing_digital_barrier+0xaf1>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     19c5 <rq_pricing_digital_barrier+0x875>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     19c5 <rq_pricing_digital_barrier+0x875>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     19c5 <rq_pricing_digital_barrier+0x875>
movswl -0x4(%rbp),%eax
cmp    $0x0,%eax
je     19c5 <rq_pricing_digital_barrier+0x875>
movsd  -0xf8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c3c <rq_pricing_digital_barrier+0xaec>
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     1a16 <rq_pricing_digital_barrier+0x8c6>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1a16 <rq_pricing_digital_barrier+0x8c6>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1a16 <rq_pricing_digital_barrier+0x8c6>
movswl -0x52(%rbp),%eax
cmp    $0x0,%eax
je     1a16 <rq_pricing_digital_barrier+0x8c6>
movsd  -0xe0(%rbp),%xmm0
addsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c37 <rq_pricing_digital_barrier+0xae7>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     1a67 <rq_pricing_digital_barrier+0x917>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1a67 <rq_pricing_digital_barrier+0x917>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1a67 <rq_pricing_digital_barrier+0x917>
movswl -0x52(%rbp),%eax
cmp    $0x0,%eax
je     1a67 <rq_pricing_digital_barrier+0x917>
movsd  -0xe0(%rbp),%xmm0
ff
addsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c32 <rq_pricing_digital_barrier+0xae2>
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     1ab8 <rq_pricing_digital_barrier+0x968>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1ab8 <rq_pricing_digital_barrier+0x968>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     1ab8 <rq_pricing_digital_barrier+0x968>
movswl -0x52(%rbp),%eax
cmp    $0x0,%eax
je     1ab8 <rq_pricing_digital_barrier+0x968>
movsd  -0xd8(%rbp),%xmm0
ff
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c2d <rq_pricing_digital_barrier+0xadd>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     1b09 <rq_pricing_digital_barrier+0x9b9>
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1b09 <rq_pricing_digital_barrier+0x9b9>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     1b09 <rq_pricing_digital_barrier+0x9b9>
movswl -0x52(%rbp),%eax
cmp    $0x0,%eax
je     1b09 <rq_pricing_digital_barrier+0x9b9>
movsd  -0xd8(%rbp),%xmm0
ff
addsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c28 <rq_pricing_digital_barrier+0xad8>
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     1b4d <rq_pricing_digital_barrier+0x9fd>
movswl -0x50(%rbp),%eax
cmp    $0x0,%eax
je     1b4d <rq_pricing_digital_barrier+0x9fd>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1b4d <rq_pricing_digital_barrier+0x9fd>
movsd  -0xe0(%rbp),%xmm0
ff
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c23 <rq_pricing_digital_barrier+0xad3>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     1b91 <rq_pricing_digital_barrier+0xa41>
movswl -0x50(%rbp),%eax
cmp    $0x0,%eax
je     1b91 <rq_pricing_digital_barrier+0xa41>
movswl -0x2(%rbp),%eax
cmp    $0x0,%eax
je     1b91 <rq_pricing_digital_barrier+0xa41>
movsd  -0xe0(%rbp),%xmm0
ff
subsd  -0xf0(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c1e <rq_pricing_digital_barrier+0xace>
movswl -0x4c(%rbp),%eax
cmp    $0x0,%eax
je     1bd5 <rq_pricing_digital_barrier+0xa85>
movswl -0x50(%rbp),%eax
cmp    $0x0,%eax
je     1bd5 <rq_pricing_digital_barrier+0xa85>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     1bd5 <rq_pricing_digital_barrier+0xa85>
movsd  -0xd8(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c19 <rq_pricing_digital_barrier+0xac9>
movswl -0x4a(%rbp),%eax
cmp    $0x0,%eax
je     1c14 <rq_pricing_digital_barrier+0xac4>
movswl -0x50(%rbp),%eax
cmp    $0x0,%eax
je     1c14 <rq_pricing_digital_barrier+0xac4>
movswl -0x4e(%rbp),%eax
cmp    $0x0,%eax
je     1c14 <rq_pricing_digital_barrier+0xac4>
movsd  -0xd8(%rbp),%xmm0
ff
subsd  -0xe8(%rbp),%xmm0
ff
movsd  %xmm0,-0x100(%rbp)
ff
jmp    1c19 <rq_pricing_digital_barrier+0xac9>
jmp    1c1e <rq_pricing_digital_barrier+0xace>
jmp    1c23 <rq_pricing_digital_barrier+0xad3>
jmp    1c28 <rq_pricing_digital_barrier+0xad8>
jmp    1c2d <rq_pricing_digital_barrier+0xadd>
jmp    1c32 <rq_pricing_digital_barrier+0xae2>
jmp    1c37 <rq_pricing_digital_barrier+0xae7>
jmp    1c3c <rq_pricing_digital_barrier+0xaec>
jmp    1c41 <rq_pricing_digital_barrier+0xaf1>
jmp    1c46 <rq_pricing_digital_barrier+0xaf6>
jmp    1c4b <rq_pricing_digital_barrier+0xafb>
movsd  -0x100(%rbp),%xmm0
ff
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rq_pricing_digital_barrier>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe0,%rsp
xor    %eax,%eax
ucomisd %xmm0,%xmm2
setbe  %r15b
mov    %edx,%ebp
movsd  %xmm7,0x90(%rsp)
movsd  %xmm1,0x58(%rsp)
mov    %esi,%r12d
mov    %edi,%r14d
seta   %al
lea    0xe76(%rip),%rcx
movsd  (%rcx,%rax,8),%xmm8
movaps 0xe79(%rip),%xmm1
xorps  %xmm8,%xmm1
movaps %xmm1,0xa0(%rsp)
test   %bp,%bp
jne    11b1 <rq_pricing_digital_barrier+0x61>
movaps %xmm8,0xa0(%rsp)
movapd %xmm3,%xmm7
subsd  %xmm4,%xmm7
movapd %xmm5,%xmm4
mulsd  %xmm5,%xmm4
xorpd  %xmm9,%xmm9
ucomisd %xmm9,%xmm6
movsd  %xmm2,0x50(%rsp)
movsd  %xmm0,0x28(%rsp)
movaps %xmm8,0xb0(%rsp)
movaps %xmm1,0xd0(%rsp)
movapd %xmm3,0x60(%rsp)
movapd %xmm7,0x70(%rsp)
jb     11ff <rq_pricing_digital_barrier+0xaf>
xorps  %xmm0,%xmm0
sqrtsd %xmm6,%xmm0
jmp    122f <rq_pricing_digital_barrier+0xdf>
movapd %xmm6,%xmm0
movsd  %xmm5,0x8(%rsp)
movsd  %xmm4,(%rsp)
call   1070 <sqrt@plt>
movsd  (%rsp),%xmm4
xorpd  %xmm9,%xmm9
movsd  0x8(%rsp),%xmm5
movapd 0x70(%rsp),%xmm7
movapd 0x60(%rsp),%xmm3
mulsd  %xmm5,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xddf(%rip),%xmm2
mulsd  %xmm4,%xmm2
addsd  %xmm7,%xmm2
divsd  %xmm4,%xmm2
movsd  0xdd3(%rip),%xmm0
addsd  %xmm2,%xmm0
movsd  %xmm0,0x48(%rsp)
movapd %xmm3,%xmm1
addsd  %xmm3,%xmm1
divsd  %xmm4,%xmm1
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm9,%xmm0
movsd  %xmm2,0x88(%rsp)
jb     128d <rq_pricing_digital_barrier+0x13d>
sqrtsd %xmm0,%xmm0
jmp    1292 <rq_pricing_digital_barrier+0x142>
call   1070 <sqrt@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x28(%rsp),%xmm0
divsd  0x58(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x8(%rsp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x48(%rsp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x28(%rsp),%xmm0
divsd  0x50(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x28(%rsp),%xmm3
movsd  0x50(%rsp),%xmm2
movapd %xmm0,%xmm4
movapd %xmm2,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm3,%xmm1
mulsd  0x58(%rsp),%xmm1
divsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    178a <rq_pricing_digital_barrier+0x63a>
divsd  0x8(%rsp),%xmm4
movsd  %xmm4,(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movapd %xmm2,%xmm0
divsd  %xmm3,%xmm0
movsd  %xmm0,0x20(%rsp)
call   1050 <log@plt>
divsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
call   1050 <log@plt>
movapd %xmm0,%xmm3
movsd  0x8(%rsp),%xmm0
divsd  %xmm0,%xmm3
movsd  0x38(%rsp),%xmm2
mulsd  %xmm0,%xmm2
movapd 0x70(%rsp),%xmm0
subsd  0x60(%rsp),%xmm0
mulsd  0x90(%rsp),%xmm0
ucomisd 0xca6(%rip),%xmm0
movapd %xmm0,0x70(%rsp)
ja     17aa <rq_pricing_digital_barrier+0x65a>
movsd  0xc9a(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     17aa <rq_pricing_digital_barrier+0x65a>
movsd  (%rsp),%xmm0
movsd  0x40(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
addsd  %xmm3,%xmm2
movsd  %xmm2,0x30(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xa0(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
call   1030 <rq_pricing_cumul_norm_dist@plt>
movapd 0x60(%rsp),%xmm0
xorpd  0xc12(%rip),%xmm0
mulsd  0x90(%rsp),%xmm0
ucomisd 0xc21(%rip),%xmm0
movapd %xmm0,0x60(%rsp)
ja     17d2 <rq_pricing_digital_barrier+0x682>
movsd  0xc15(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     17d2 <rq_pricing_digital_barrier+0x682>
test   %bp,%bp
setne  %bl
movapd 0xbd5(%rip),%xmm1
xorpd  0xa0(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
movapd %xmm1,0x90(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movaps 0x70(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x40(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xa0(%rsp),%xmm0
movsd  %xmm0,(%rsp)
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0x80(%rsp)
movaps 0x60(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
addsd  0x90(%rsp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0xa0(%rsp)
movaps 0x70(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x90(%rsp)
movsd  0x48(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  0x20(%rsp),%xmm0
call   1060 <pow@plt>
movsd  %xmm0,0xc8(%rsp)
movsd  0x18(%rsp),%xmm0
mulsd  0xb0(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0xc0(%rsp)
movaps 0x60(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x70(%rsp)
movsd  0x88(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  0x20(%rsp),%xmm0
call   1060 <pow@plt>
movsd  %xmm0,0x48(%rsp)
movapd 0xd0(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x88(%rsp),%xmm1
addsd  0x38(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
call   1060 <pow@plt>
movsd  %xmm0,0x60(%rsp)
movsd  0x30(%rsp),%xmm0
mulsd  0xb0(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  %xmm0,(%rsp)
movsd  0x88(%rsp),%xmm1
subsd  0x38(%rsp),%xmm1
movsd  0x20(%rsp),%xmm0
call   1060 <pow@plt>
movapd 0xb0(%rsp),%xmm1
mulsd  0xa75(%rip),%xmm1
movsd  %xmm0,0x20(%rsp)
mulsd  0x38(%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  0x30(%rsp),%xmm1
movapd %xmm1,%xmm0
call   1030 <rq_pricing_cumul_norm_dist@plt>
movsd  (%rsp),%xmm3
mulsd  0x20(%rsp),%xmm0
mulsd  0x60(%rsp),%xmm3
addsd  %xmm0,%xmm3
mulsd  0x58(%rsp),%xmm3
and    %r15b,%bl
test   %r14w,%r14w
setne  %al
and    %bl,%al
test   %r12w,%r12w
je     1621 <rq_pricing_digital_barrier+0x4d1>
test   %al,%al
jne    1731 <rq_pricing_digital_barrier+0x5e1>
test   %r14w,%r14w
setne  %dil
test   %bp,%bp
setne  %dl
movsd  0x50(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
ucomisd %xmm1,%xmm0
seta   %cl
and    %dl,%cl
and    %cl,%dil
test   %r12w,%r12w
je     1656 <rq_pricing_digital_barrier+0x506>
test   %dil,%dil
jne    1731 <rq_pricing_digital_barrier+0x5e1>
test   %r14w,%r14w
sete   %sil
and    %bl,%sil
test   %r12w,%r12w
je     1670 <rq_pricing_digital_barrier+0x520>
test   %sil,%sil
jne    1731 <rq_pricing_digital_barrier+0x5e1>
test   %r14w,%r14w
sete   %bl
and    %cl,%bl
test   %r12w,%r12w
je     1687 <rq_pricing_digital_barrier+0x537>
test   %bl,%bl
jne    1731 <rq_pricing_digital_barrier+0x5e1>
movsd  0x58(%rsp),%xmm2
movsd  0x10(%rsp),%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xa0(%rsp),%xmm3
movsd  0x70(%rsp),%xmm5
mulsd  %xmm2,%xmm5
mulsd  0x48(%rsp),%xmm5
mulsd  0x18(%rsp),%xmm5
test   %r12w,%r12w
setne  %cl
xor    $0x1,%al
or     %cl,%al
je     16d3 <rq_pricing_digital_barrier+0x583>
test   %r12w,%r12w
setne  %al
xor    $0x1,%dil
or     %al,%dil
jne    16d9 <rq_pricing_digital_barrier+0x589>
addsd  %xmm5,%xmm3
jmp    1731 <rq_pricing_digital_barrier+0x5e1>
movsd  0x40(%rsp),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x80(%rsp),%xmm2
movsd  0x90(%rsp),%xmm4
mulsd  %xmm1,%xmm4
mulsd  0xc8(%rsp),%xmm4
mulsd  0xc0(%rsp),%xmm4
test   %r12w,%r12w
setne  %al
xor    $0x1,%sil
or     %al,%sil
je     1729 <rq_pricing_digital_barrier+0x5d9>
test   %r12w,%r12w
setne  %al
xor    $0x1,%bl
or     %al,%bl
jne    1745 <rq_pricing_digital_barrier+0x5f5>
addsd  %xmm4,%xmm2
movapd %xmm2,%xmm3
movapd %xmm3,%xmm0
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
test   %bp,%bp
sete   %al
and    %r15b,%al
test   %r14w,%r14w
je     1758 <rq_pricing_digital_barrier+0x608>
test   %al,%al
jne    1771 <rq_pricing_digital_barrier+0x621>
test   %bp,%bp
sete   %dl
ucomisd %xmm1,%xmm0
seta   %cl
and    %dl,%cl
test   %r14w,%r14w
je     1777 <rq_pricing_digital_barrier+0x627>
test   %cl,%cl
je     1777 <rq_pricing_digital_barrier+0x627>
subsd  %xmm5,%xmm3
jmp    1731 <rq_pricing_digital_barrier+0x5e1>
test   %r14w,%r14w
setne  %dl
xor    $0x1,%al
or     %dl,%al
jne    17dc <rq_pricing_digital_barrier+0x68c>
subsd  %xmm4,%xmm2
jmp    172d <rq_pricing_digital_barrier+0x5dd>
movsd  %xmm4,(%rsp)
call   1050 <log@plt>
movsd  (%rsp),%xmm4
movsd  0x28(%rsp),%xmm3
movsd  0x50(%rsp),%xmm2
jmp    130e <rq_pricing_digital_barrier+0x1be>
movsd  %xmm2,0x30(%rsp)
movsd  %xmm3,0x80(%rsp)
call   1040 <exp@plt>
movsd  0x80(%rsp),%xmm3
movsd  0x30(%rsp),%xmm2
jmp    13a8 <rq_pricing_digital_barrier+0x258>
call   1040 <exp@plt>
jmp    142d <rq_pricing_digital_barrier+0x2dd>
test   %cl,%cl
jne    17e6 <rq_pricing_digital_barrier+0x696>
xorpd  %xmm3,%xmm3
jmp    17ee <rq_pricing_digital_barrier+0x69e>
subsd  %xmm4,%xmm2
movapd %xmm2,%xmm3
test   %r14w,%r14w
je     1731 <rq_pricing_digital_barrier+0x5e1>
xorpd  %xmm3,%xmm3
jmp    1731 <rq_pricing_digital_barrier+0x5e1>

LLVM IR (-O0):
define double @rq_pricing_digital_barrier(i16 signext %0, i16 signext %1, i16 signext %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 i16
%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 i16
%24 = alloca i16
%25 = alloca i16
%26 = alloca i16
%27 = alloca i16
%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* %12
store i16 %1, i16* %13
store i16 %2, i16* %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
%49 = load double, double* %17
%50 = load double, double* %15
%51 = fcmp ogt double %49, %50
%52 = zext i1 %51 to i32
%53 = trunc i32 %52 to i16
store i16 %53, i16* %23
%54 = load i16, i16* %23
%55 = icmp ne i16 %54, 0
%56 = xor i1 %55, true
%57 = zext i1 %56 to i32
%58 = trunc i32 %57 to i16
store i16 %58, i16* %24
%59 = load i16, i16* %12
%60 = icmp ne i16 %59, 0
%61 = xor i1 %60, true
%62 = zext i1 %61 to i32
%63 = trunc i32 %62 to i16
store i16 %63, i16* %25
%64 = load i16, i16* %14
%65 = icmp ne i16 %64, 0
%66 = xor i1 %65, true
%67 = zext i1 %66 to i32
%68 = trunc i32 %67 to i16
store i16 %68, i16* %26
%69 = load i16, i16* %13
%70 = icmp ne i16 %69, 0
%71 = xor i1 %70, true
%72 = zext i1 %71 to i32
%73 = trunc i32 %72 to i16
store i16 %73, i16* %27
%74 = load i16, i16* %23
%75 = sext i16 %74 to i32
%76 = icmp ne i32 %75, 0
%77 = zext i1 %76 to i64
%78 = select i1 %76, i32 -1, i32 1
%79 = sitofp i32 %78 to double
store double %79, double* %28
%80 = load i16, i16* %14
%81 = sext i16 %80 to i32
%82 = icmp ne i32 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %11
%84 = load double, double* %28
%85 = fneg double %84
br label %88
86: ; preds = %11
%87 = load double, double* %28
br label %88
88: ; preds = %86, %83
%89 = phi double [ %85, %83 ], [ %87, %86 ]
store double %89, double* %29
%90 = load double, double* %18
%91 = load double, double* %19
%92 = fsub double %90, %91
store double %92, double* %30
%93 = load double, double* %20
%94 = load double, double* %20
%95 = fmul double %93, %94
store double %95, double* %31
%96 = load double, double* %20
%97 = load double, double* %21
%98 = call double @sqrt(double %97)
%99 = fmul double %96, %98
store double %99, double* %32
%100 = load double, double* %30
%101 = load double, double* %31
%102 = fdiv double %101, 2.000000e+00
%103 = fsub double %100, %102
%104 = load double, double* %31
%105 = fdiv double %103, %104
store double %105, double* %33
%106 = load double, double* %33
%107 = fadd double %106, 1.000000e+00
store double %107, double* %34
%108 = load double, double* %33
%109 = load double, double* %33
%110 = load double, double* %18
%111 = fmul double 2.000000e+00, %110
%112 = load double, double* %31
%113 = fdiv double %111, %112
%114 = call double @llvm.fmuladd.f64(double %108, double %109, double %113)
%115 = call double @sqrt(double %114)
store double %115, double* %35
%116 = load double, double* %15
%117 = load double, double* %16
%118 = fdiv double %116, %117
%119 = call double @log(double %118)
%120 = load double, double* %32
%121 = fdiv double %119, %120
%122 = load double, double* %34
%123 = load double, double* %32
%124 = call double @llvm.fmuladd.f64(double %122, double %123, double %121)
store double %124, double* %36
%125 = load double, double* %15
%126 = load double, double* %17
%127 = fdiv double %125, %126
%128 = call double @log(double %127)
%129 = load double, double* %32
%130 = fdiv double %128, %129
%131 = load double, double* %34
%132 = load double, double* %32
%133 = call double @llvm.fmuladd.f64(double %131, double %132, double %130)
store double %133, double* %37
%134 = load double, double* %17
%135 = load double, double* %17
%136 = fmul double %134, %135
%137 = load double, double* %15
%138 = load double, double* %16
%139 = fmul double %137, %138
%140 = fdiv double %136, %139
%141 = call double @log(double %140)
%142 = load double, double* %32
%143 = fdiv double %141, %142
%144 = load double, double* %34
%145 = load double, double* %32
%146 = call double @llvm.fmuladd.f64(double %144, double %145, double %143)
store double %146, double* %38
%147 = load double, double* %17
%148 = load double, double* %15
%149 = fdiv double %147, %148
%150 = call double @log(double %149)
%151 = load double, double* %32
%152 = fdiv double %150, %151
%153 = load double, double* %34
%154 = load double, double* %32
%155 = call double @llvm.fmuladd.f64(double %153, double %154, double %152)
store double %155, double* %39
%156 = load double, double* %17
%157 = load double, double* %15
%158 = fdiv double %156, %157
%159 = call double @log(double %158)
%160 = load double, double* %32
%161 = fdiv double %159, %160
%162 = load double, double* %35
%163 = load double, double* %32
%164 = call double @llvm.fmuladd.f64(double %162, double %163, double %161)
store double %164, double* %40
%165 = load double, double* %15
%166 = load double, double* %30
%167 = load double, double* %18
%168 = fsub double %166, %167
%169 = load double, double* %22
%170 = fmul double %168, %169
%171 = call double @exp(double %170)
%172 = fmul double %165, %171
%173 = load double, double* %29
%174 = load double, double* %36
%175 = fmul double %173, %174
%176 = call double @rq_pricing_cumul_norm_dist(double %175)
%177 = fmul double %172, %176
store double %177, double* %41
%178 = load double, double* %16
%179 = load double, double* %18
%180 = fneg double %179
%181 = load double, double* %22
%182 = fmul double %180, %181
%183 = call double @exp(double %182)
%184 = fmul double %178, %183
%185 = load double, double* %29
%186 = load double, double* %36
%187 = load double, double* %29
%188 = load double, double* %32
%189 = fmul double %187, %188
%190 = fneg double %189
%191 = call double @llvm.fmuladd.f64(double %185, double %186, double %190)
%192 = call double @rq_pricing_cumul_norm_dist(double %191)
%193 = fmul double %184, %192
store double %193, double* %42
%194 = load double, double* %15
%195 = load double, double* %30
%196 = load double, double* %18
%197 = fsub double %195, %196
%198 = load double, double* %22
%199 = fmul double %197, %198
%200 = call double @exp(double %199)
%201 = fmul double %194, %200
%202 = load double, double* %29
%203 = load double, double* %37
%204 = fmul double %202, %203
%205 = call double @rq_pricing_cumul_norm_dist(double %204)
%206 = fmul double %201, %205
store double %206, double* %43
%207 = load double, double* %16
%208 = load double, double* %18
%209 = fneg double %208
%210 = load double, double* %22
%211 = fmul double %209, %210
%212 = call double @exp(double %211)
%213 = fmul double %207, %212
%214 = load double, double* %29
%215 = load double, double* %37
%216 = load double, double* %29
%217 = load double, double* %32
%218 = fmul double %216, %217
%219 = fneg double %218
%220 = call double @llvm.fmuladd.f64(double %214, double %215, double %219)
%221 = call double @rq_pricing_cumul_norm_dist(double %220)
%222 = fmul double %213, %221
store double %222, double* %44
%223 = load double, double* %15
%224 = load double, double* %30
%225 = load double, double* %18
%226 = fsub double %224, %225
%227 = load double, double* %22
%228 = fmul double %226, %227
%229 = call double @exp(double %228)
%230 = fmul double %223, %229
%231 = load double, double* %17
%232 = load double, double* %15
%233 = fdiv double %231, %232
%234 = load double, double* %34
%235 = fmul double 2.000000e+00, %234
%236 = call double @pow(double %233, double %235)
%237 = fmul double %230, %236
%238 = load double, double* %28
%239 = load double, double* %39
%240 = fmul double %238, %239
%241 = call double @rq_pricing_cumul_norm_dist(double %240)
%242 = fmul double %237, %241
store double %242, double* %45
%243 = load double, double* %16
%244 = load double, double* %18
%245 = fneg double %244
%246 = load double, double* %22
%247 = fmul double %245, %246
%248 = call double @exp(double %247)
%249 = fmul double %243, %248
%250 = load double, double* %17
%251 = load double, double* %15
%252 = fdiv double %250, %251
%253 = load double, double* %33
%254 = fmul double 2.000000e+00, %253
%255 = call double @pow(double %252, double %254)
%256 = fmul double %249, %255
%257 = load double, double* %28
%258 = load double, double* %39
%259 = load double, double* %28
%260 = load double, double* %32
%261 = fmul double %259, %260
%262 = fneg double %261
%263 = call double @llvm.fmuladd.f64(double %257, double %258, double %262)
%264 = call double @rq_pricing_cumul_norm_dist(double %263)
%265 = fmul double %256, %264
store double %265, double* %46
%266 = load double, double* %16
%267 = load double, double* %17
%268 = load double, double* %15
%269 = fdiv double %267, %268
%270 = load double, double* %33
%271 = load double, double* %35
%272 = fadd double %270, %271
%273 = call double @pow(double %269, double %272)
%274 = load double, double* %28
%275 = load double, double* %40
%276 = fmul double %274, %275
%277 = call double @rq_pricing_cumul_norm_dist(double %276)
%278 = load double, double* %17
%279 = load double, double* %15
%280 = fdiv double %278, %279
%281 = load double, double* %33
%282 = load double, double* %35
%283 = fsub double %281, %282
%284 = call double @pow(double %280, double %283)
%285 = load double, double* %28
%286 = load double, double* %40
%287 = load double, double* %28
%288 = fmul double 2.000000e+00, %287
%289 = load double, double* %35
%290 = fmul double %288, %289
%291 = load double, double* %32
%292 = fmul double %290, %291
%293 = fneg double %292
%294 = call double @llvm.fmuladd.f64(double %285, double %286, double %293)
%295 = call double @rq_pricing_cumul_norm_dist(double %294)
%296 = fmul double %284, %295
%297 = call double @llvm.fmuladd.f64(double %273, double %277, double %296)
%298 = fmul double %266, %297
store double %298, double* %47
store double 0.000000e+00, double* %48
%299 = load i16, i16* %24
%300 = sext i16 %299 to i32
%301 = icmp ne i32 %300, 0
br i1 %301, label %302, label %316
302: ; preds = %88
%303 = load i16, i16* %14
%304 = sext i16 %303 to i32
%305 = icmp ne i32 %304, 0
br i1 %305, label %306, label %316
306: ; preds = %302
%307 = load i16, i16* %12
%308 = sext i16 %307 to i32
%309 = icmp ne i32 %308, 0
br i1 %309, label %310, label %316
310: ; preds = %306
%311 = load i16, i16* %13
%312 = sext i16 %311 to i32
%313 = icmp ne i32 %312, 0
br i1 %313, label %314, label %316
314: ; preds = %310
%315 = load double, double* %47
store double %315, double* %48
br label %525
316: ; preds = %310, %306, %302, %88
%317 = load i16, i16* %23
%318 = sext i16 %317 to i32
%319 = icmp ne i32 %318, 0
br i1 %319, label %320, label %334
320: ; preds = %316
%321 = load i16, i16* %14
%322 = sext i16 %321 to i32
%323 = icmp ne i32 %322, 0
br i1 %323, label %324, label %334
324: ; preds = %320
%325 = load i16, i16* %12
%326 = sext i16 %325 to i32
%327 = icmp ne i32 %326, 0
br i1 %327, label %328, label %334
328: ; preds = %324
%329 = load i16, i16* %13
%330 = sext i16 %329 to i32
%331 = icmp ne i32 %330, 0
br i1 %331, label %332, label %334
332: ; preds = %328
%333 = load double, double* %47
store double %333, double* %48
br label %524
334: ; preds = %328, %324, %320, %316
%335 = load i16, i16* %24
%336 = sext i16 %335 to i32
%337 = icmp ne i32 %336, 0
br i1 %337, label %338, label %352
338: ; preds = %334
%339 = load i16, i16* %14
%340 = sext i16 %339 to i32
%341 = icmp ne i32 %340, 0
br i1 %341, label %342, label %352
342: ; preds = %338
%343 = load i16, i16* %25
%344 = sext i16 %343 to i32
%345 = icmp ne i32 %344, 0
br i1 %345, label %346, label %352
346: ; preds = %342
%347 = load i16, i16* %13
%348 = sext i16 %347 to i32
%349 = icmp ne i32 %348, 0
br i1 %349, label %350, label %352
350: ; preds = %346
%351 = load double, double* %47
store double %351, double* %48
br label %523
352: ; preds = %346, %342, %338, %334
%353 = load i16, i16* %23
%354 = sext i16 %353 to i32
%355 = icmp ne i32 %354, 0
br i1 %355, label %356, label %370
356: ; preds = %352
%357 = load i16, i16* %14
%358 = sext i16 %357 to i32
%359 = icmp ne i32 %358, 0
br i1 %359, label %360, label %370
360: ; preds = %356
%361 = load i16, i16* %25
%362 = sext i16 %361 to i32
%363 = icmp ne i32 %362, 0
br i1 %363, label %364, label %370
364: ; preds = %360
%365 = load i16, i16* %13
%366 = sext i16 %365 to i32
%367 = icmp ne i32 %366, 0
br i1 %367, label %368, label %370
368: ; preds = %364
%369 = load double, double* %47
store double %369, double* %48
br label %522
370: ; preds = %364, %360, %356, %352
%371 = load i16, i16* %24
%372 = sext i16 %371 to i32
%373 = icmp ne i32 %372, 0
br i1 %373, label %374, label %390
374: ; preds = %370
%375 = load i16, i16* %14
%376 = sext i16 %375 to i32
%377 = icmp ne i32 %376, 0
br i1 %377, label %378, label %390
378: ; preds = %374
%379 = load i16, i16* %12
%380 = sext i16 %379 to i32
%381 = icmp ne i32 %380, 0
br i1 %381, label %382, label %390
382: ; preds = %378
%383 = load i16, i16* %27
%384 = sext i16 %383 to i32
%385 = icmp ne i32 %384, 0
br i1 %385, label %386, label %390
386: ; preds = %382
%387 = load double, double* %44
%388 = load double, double* %46
%389 = fadd double %387, %388
store double %389, double* %48
br label %521
390: ; preds = %382, %378, %374, %370
%391 = load i16, i16* %23
%392 = sext i16 %391 to i32
%393 = icmp ne i32 %392, 0
br i1 %393, label %394, label %410
394: ; preds = %390
%395 = load i16, i16* %14
%396 = sext i16 %395 to i32
%397 = icmp ne i32 %396, 0
br i1 %397, label %398, label %410
398: ; preds = %394
%399 = load i16, i16* %12
%400 = sext i16 %399 to i32
%401 = icmp ne i32 %400, 0
br i1 %401, label %402, label %410
402: ; preds = %398
%403 = load i16, i16* %27
%404 = sext i16 %403 to i32
%405 = icmp ne i32 %404, 0
br i1 %405, label %406, label %410
406: ; preds = %402
%407 = load double, double* %44
%408 = load double, double* %46
%409 = fadd double %407, %408
store double %409, double* %48
br label %520
410: ; preds = %402, %398, %394, %390
%411 = load i16, i16* %24
%412 = sext i16 %411 to i32
%413 = icmp ne i32 %412, 0
br i1 %413, label %414, label %430
414: ; preds = %410
%415 = load i16, i16* %14
%416 = sext i16 %415 to i32
%417 = icmp ne i32 %416, 0
br i1 %417, label %418, label %430
418: ; preds = %414
%419 = load i16, i16* %25
%420 = sext i16 %419 to i32
%421 = icmp ne i32 %420, 0
br i1 %421, label %422, label %430
422: ; preds = %418
%423 = load i16, i16* %27
%424 = sext i16 %423 to i32
%425 = icmp ne i32 %424, 0
br i1 %425, label %426, label %430
426: ; preds = %422
%427 = load double, double* %43
%428 = load double, double* %45
%429 = fadd double %427, %428
store double %429, double* %48
br label %519
430: ; preds = %422, %418, %414, %410
%431 = load i16, i16* %23
%432 = sext i16 %431 to i32
%433 = icmp ne i32 %432, 0
br i1 %433, label %434, label %450
434: ; preds = %430
%435 = load i16, i16* %14
%436 = sext i16 %435 to i32
%437 = icmp ne i32 %436, 0
br i1 %437, label %438, label %450
438: ; preds = %434
%439 = load i16, i16* %25
%440 = sext i16 %439 to i32
%441 = icmp ne i32 %440, 0
br i1 %441, label %442, label %450
442: ; preds = %438
%443 = load i16, i16* %27
%444 = sext i16 %443 to i32
%445 = icmp ne i32 %444, 0
br i1 %445, label %446, label %450
446: ; preds = %442
%447 = load double, double* %43
%448 = load double, double* %45
%449 = fadd double %447, %448
store double %449, double* %48
br label %518
450: ; preds = %442, %438, %434, %430
%451 = load i16, i16* %24
%452 = sext i16 %451 to i32
%453 = icmp ne i32 %452, 0
br i1 %453, label %454, label %466
454: ; preds = %450
%455 = load i16, i16* %26
%456 = sext i16 %455 to i32
%457 = icmp ne i32 %456, 0
br i1 %457, label %458, label %466
458: ; preds = %454
%459 = load i16, i16* %12
%460 = sext i16 %459 to i32
%461 = icmp ne i32 %460, 0
br i1 %461, label %462, label %466
462: ; preds = %458
%463 = load double, double* %44
%464 = load double, double* %46
%465 = fsub double %463, %464
store double %465, double* %48
br label %517
466: ; preds = %458, %454, %450
%467 = load i16, i16* %23
%468 = sext i16 %467 to i32
%469 = icmp ne i32 %468, 0
br i1 %469, label %470, label %482
470: ; preds = %466
%471 = load i16, i16* %26
%472 = sext i16 %471 to i32
%473 = icmp ne i32 %472, 0
br i1 %473, label %474, label %482
474: ; preds = %470
%475 = load i16, i16* %12
%476 = sext i16 %475 to i32
%477 = icmp ne i32 %476, 0
br i1 %477, label %478, label %482
478: ; preds = %474
%479 = load double, double* %44
%480 = load double, double* %46
%481 = fsub double %479, %480
store double %481, double* %48
br label %516
482: ; preds = %474, %470, %466
%483 = load i16, i16* %24
%484 = sext i16 %483 to i32
%485 = icmp ne i32 %484, 0
br i1 %485, label %486, label %498
486: ; preds = %482
%487 = load i16, i16* %26
%488 = sext i16 %487 to i32
%489 = icmp ne i32 %488, 0
br i1 %489, label %490, label %498
490: ; preds = %486
%491 = load i16, i16* %25
%492 = sext i16 %491 to i32
%493 = icmp ne i32 %492, 0
br i1 %493, label %494, label %498
494: ; preds = %490
%495 = load double, double* %43
%496 = load double, double* %45
%497 = fsub double %495, %496
store double %497, double* %48
br label %515
498: ; preds = %490, %486, %482
%499 = load i16, i16* %23
%500 = sext i16 %499 to i32
%501 = icmp ne i32 %500, 0
br i1 %501, label %502, label %514
502: ; preds = %498
%503 = load i16, i16* %26
%504 = sext i16 %503 to i32
%505 = icmp ne i32 %504, 0
br i1 %505, label %506, label %514
506: ; preds = %502
%507 = load i16, i16* %25
%508 = sext i16 %507 to i32
%509 = icmp ne i32 %508, 0
br i1 %509, label %510, label %514
510: ; preds = %506
%511 = load double, double* %43
%512 = load double, double* %45
%513 = fsub double %511, %512
store double %513, double* %48
br label %514
514: ; preds = %510, %506, %502, %498
br label %515
515: ; preds = %514, %494
br label %516
516: ; preds = %515, %478
br label %517
517: ; preds = %516, %462
br label %518
518: ; preds = %517, %446
br label %519
519: ; preds = %518, %426
br label %520
520: ; preds = %519, %406
br label %521
521: ; preds = %520, %386
br label %522
522: ; preds = %521, %368
br label %523
523: ; preds = %522, %350
br label %524
524: ; preds = %523, %332
br label %525
525: ; preds = %524, %314
%526 = load double, double* %48
ret double %526
}

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