#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 */
int /*<<< orphan*/ assert(int);
double cnd(double);
double exp(double);
double log(double);
double pow(double, double);
double sqrt(double);
double FloatingStrikeLookback(int fCall, double S, double SMin, double SMax,
                              double T, double r, double b, double v) {
  double sT, ebT, vv, vsT, m, a1, a2, result;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  sT = sqrt(T);
  ebT = exp(b * T);
  vv = v * v;
  vsT = v * sT;
  if (fCall)
    m = SMin;
  else
    m = SMax;
  a1 = (log(S / m) + (b + vv / 2.0) * T) / vsT;
  a2 = a1 - vsT;
  if (fCall) {
    result = S * exp((b - r) * T) * cnd(a1) - m * exp(-r * T) * cnd(a2) +
             exp(-r * T) * vv / (2.0 * b) * S *
                 (pow((S / m), (-2.0 * b / vv)) * cnd(-a1 + 2.0 * b / v * sT) -
                  ebT * cnd(-a1));
  } else {
    result = m * exp(-r * T) * cnd(-a2) - S * exp((b - r) * T) * cnd(-a1) +
             exp(-r * T) * vv / (2.0 * b) * S *
                 (-pow((S / m), (-2.0 * b / vv)) * cnd(a1 - 2.0 * b / v * sT) +
                  ebT * cnd(a1));
  }
  return result;
}


x86 assembly (clang, -O0):
<FloatingStrikeLookback>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
mov    %edi,-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  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x81(%rbp)
jne    11e4 <FloatingStrikeLookback+0x84>
jp     11e4 <FloatingStrikeLookback+0x84>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe42(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x81(%rbp)
jb     11e4 <FloatingStrikeLookback+0x84>
movsd  0xe32(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x81(%rbp)
mov    -0x81(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x82(%rbp)
jne    1247 <FloatingStrikeLookback+0xe7>
jp     1247 <FloatingStrikeLookback+0xe7>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdef(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x82(%rbp)
jb     1247 <FloatingStrikeLookback+0xe7>
movsd  0xddf(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x82(%rbp)
mov    -0x82(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     12b1 <FloatingStrikeLookback+0x151>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    12bb <FloatingStrikeLookback+0x15b>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  0xd41(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1543 <FloatingStrikeLookback+0x3e3>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
call   1060 <cnd@plt>
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xb8(%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,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
mulsd  -0x58(%rbp),%xmm0
movsd  0xbf2(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  0xbd2(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  -0x58(%rbp),%xmm1
call   1070 <pow@plt>
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xb8f(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <cnd@plt>
movsd  -0xb0(%rbp),%xmm3
ff
movsd  -0xa8(%rbp),%xmm2
ff
movsd  -0xa0(%rbp),%xmm4
ff
movsd  -0x98(%rbp),%xmm1
ff
movaps %xmm0,%xmm5
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm5,%xmm3
movq   %xmm3,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
jmp    1781 <FloatingStrikeLookback+0x621>
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x128(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x128(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x108(%rbp)
ff
movsd  -0x78(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0x110(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x120(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x120(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x118(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <cnd@plt>
movsd  -0x118(%rbp),%xmm1
ff
movsd  -0x110(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x108(%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,-0xe8(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1040 <exp@plt>
mulsd  -0x58(%rbp),%xmm0
movsd  0x998(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
divsd  -0x68(%rbp),%xmm0
movsd  0x978(%rip),%xmm1
mulsd  -0x38(%rbp),%xmm1
divsd  -0x58(%rbp),%xmm1
call   1070 <pow@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xf8(%rbp)
ff
movsd  -0x70(%rbp),%xmm1
movsd  0x935(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0x100(%rbp)
ff
movsd  -0x70(%rbp),%xmm0
call   1060 <cnd@plt>
movsd  -0x100(%rbp),%xmm3
ff
movsd  -0xf8(%rbp),%xmm2
ff
movsd  -0xf0(%rbp),%xmm4
ff
movsd  -0xe8(%rbp),%xmm1
ff
movaps %xmm0,%xmm5
movsd  -0xe0(%rbp),%xmm0
ff
mulsd  %xmm5,%xmm3
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FloatingStrikeLookback>:
push   %rbx
sub    $0xb0,%rsp
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe89(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe84(%rip),%xmm7
movsd  %xmm0,0x40(%rsp)
ucomisd %xmm0,%xmm7
movsd  %xmm6,0x68(%rsp)
movsd  %xmm5,0x10(%rsp)
movaps %xmm4,0x20(%rsp)
movsd  %xmm3,0x8(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x50(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe3b(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe36(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm2
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     120c <FloatingStrikeLookback+0xac>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
jmp    121b <FloatingStrikeLookback+0xbb>
movapd %xmm2,%xmm0
call   1080 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movsd  %xmm0,0x48(%rsp)
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x90(%rsp)
test   %ebx,%ebx
movsd  0x18(%rsp),%xmm1
je     124d <FloatingStrikeLookback+0xed>
movsd  0x50(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0x40(%rsp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,0x88(%rsp)
call   1050 <log@plt>
movsd  0x68(%rsp),%xmm2
movapd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
movsd  0x48(%rsp),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xd95(%rip),%xmm2
movsd  %xmm3,0x80(%rsp)
mulsd  %xmm3,%xmm2
movsd  0x10(%rsp),%xmm4
addsd  %xmm4,%xmm2
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
divsd  %xmm1,%xmm2
movapd %xmm2,0x50(%rsp)
subsd  %xmm1,%xmm2
movapd %xmm2,0xa0(%rsp)
test   %ebx,%ebx
movapd %xmm3,%xmm2
je     1437 <FloatingStrikeLookback+0x2d7>
movapd %xmm4,%xmm0
subsd  0x20(%rsp),%xmm0
mulsd  %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x98(%rsp)
movaps 0x50(%rsp),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x38(%rsp)
movapd 0xd23(%rip),%xmm1
movapd %xmm1,0x70(%rsp)
movapd 0x20(%rsp),%xmm0
xorpd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
movapd %xmm0,0x20(%rsp)
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0xa0(%rsp),%xmm0
call   1060 <cnd@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x38(%rsp),%xmm0
mulsd  0x98(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x38(%rsp)
movapd 0x20(%rsp),%xmm0
call   1040 <exp@plt>
movsd  0x80(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x20(%rsp)
divsd  %xmm3,%xmm0
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0xc79(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  0x88(%rsp),%xmm0
call   1070 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x70(%rsp),%xmm0
movapd 0x50(%rsp),%xmm1
xorpd  %xmm1,%xmm0
movapd %xmm0,0x70(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0x68(%rsp),%xmm0
mulsd  0x48(%rsp),%xmm0
subsd  %xmm1,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x70(%rsp),%xmm0
call   1060 <cnd@plt>
mulsd  0x90(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0x8(%rsp),%xmm1
addsd  0x38(%rsp),%xmm1
movapd %xmm1,%xmm0
jmp    1587 <FloatingStrikeLookback+0x427>
movapd 0x20(%rsp),%xmm0
xorpd  0xbeb(%rip),%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm0,0x70(%rsp)
call   1040 <exp@plt>
mulsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movaps 0xa0(%rsp),%xmm0
xorps  0xbc1(%rip),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x10(%rsp),%xmm0
subsd  0x20(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0xb91(%rip),%xmm0
xorpd  0x50(%rsp),%xmm0
call   1060 <cnd@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x18(%rsp)
movapd 0x70(%rsp),%xmm0
call   1040 <exp@plt>
movsd  0x80(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,0x20(%rsp)
divsd  %xmm3,%xmm0
mulsd  0x40(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0xb14(%rip),%xmm1
divsd  %xmm2,%xmm1
movsd  0x88(%rsp),%xmm0
call   1070 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x20(%rsp),%xmm0
divsd  0x68(%rsp),%xmm0
mulsd  0x48(%rsp),%xmm0
movapd %xmm0,%xmm1
movapd 0x50(%rsp),%xmm0
subsd  %xmm1,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x20(%rsp)
movapd 0x50(%rsp),%xmm0
call   1060 <cnd@plt>
mulsd  0x90(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
subsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x18(%rsp),%xmm0
add    $0xb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @FloatingStrikeLookback(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = alloca i32
%10 = alloca double
%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
store i32 %0, i32* %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
%25 = load double, double* %10
%26 = load double, double* %10
%27 = fcmp oeq double %25, %26
br i1 %27, label %28, label %34
28: ; preds = %8
%29 = load double, double* %10
%30 = fcmp oge double %29, 0x3EB0C6F7A0B5ED8D
br i1 %30, label %31, label %34
31: ; preds = %28
%32 = load double, double* %10
%33 = fcmp ole double %32, 1.000000e+12
br label %34
34: ; preds = %31, %28, %8
%35 = phi i1 [ false, %28 ], [ false, %8 ], [ %33, %31 ]
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load double, double* %13
%39 = load double, double* %13
%40 = fcmp oeq double %38, %39
br i1 %40, label %41, label %47
41: ; preds = %34
%42 = load double, double* %13
%43 = fcmp oge double %42, 0x3F2596179C29D2CE
br i1 %43, label %44, label %47
44: ; preds = %41
%45 = load double, double* %13
%46 = fcmp ole double %45, 2.000000e+01
br label %47
47: ; preds = %44, %41, %34
%48 = phi i1 [ false, %41 ], [ false, %34 ], [ %46, %44 ]
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load double, double* %13
%52 = call double @sqrt(double %51)
store double %52, double* %17
%53 = load double, double* %15
%54 = load double, double* %13
%55 = fmul double %53, %54
%56 = call double @exp(double %55)
store double %56, double* %18
%57 = load double, double* %16
%58 = load double, double* %16
%59 = fmul double %57, %58
store double %59, double* %19
%60 = load double, double* %16
%61 = load double, double* %17
%62 = fmul double %60, %61
store double %62, double* %20
%63 = load i32, i32* %9
%64 = icmp ne i32 %63, 0
br i1 %64, label %65, label %67
65: ; preds = %47
%66 = load double, double* %11
store double %66, double* %21
br label %69
67: ; preds = %47
%68 = load double, double* %12
store double %68, double* %21
br label %69
69: ; preds = %67, %65
%70 = load double, double* %10
%71 = load double, double* %21
%72 = fdiv double %70, %71
%73 = call double @log(double %72)
%74 = load double, double* %15
%75 = load double, double* %19
%76 = fdiv double %75, 2.000000e+00
%77 = fadd double %74, %76
%78 = load double, double* %13
%79 = call double @llvm.fmuladd.f64(double %77, double %78, double %73)
%80 = load double, double* %20
%81 = fdiv double %79, %80
store double %81, double* %22
%82 = load double, double* %22
%83 = load double, double* %20
%84 = fsub double %82, %83
store double %84, double* %23
%85 = load i32, i32* %9
%86 = icmp ne i32 %85, 0
br i1 %86, label %87, label %147
87: ; preds = %69
%88 = load double, double* %10
%89 = load double, double* %15
%90 = load double, double* %14
%91 = fsub double %89, %90
%92 = load double, double* %13
%93 = fmul double %91, %92
%94 = call double @exp(double %93)
%95 = fmul double %88, %94
%96 = load double, double* %22
%97 = call double @cnd(double %96)
%98 = load double, double* %21
%99 = load double, double* %14
%100 = fneg double %99
%101 = load double, double* %13
%102 = fmul double %100, %101
%103 = call double @exp(double %102)
%104 = fmul double %98, %103
%105 = load double, double* %23
%106 = call double @cnd(double %105)
%107 = fmul double %104, %106
%108 = fneg double %107
%109 = call double @llvm.fmuladd.f64(double %95, double %97, double %108)
%110 = load double, double* %14
%111 = fneg double %110
%112 = load double, double* %13
%113 = fmul double %111, %112
%114 = call double @exp(double %113)
%115 = load double, double* %19
%116 = fmul double %114, %115
%117 = load double, double* %15
%118 = fmul double 2.000000e+00, %117
%119 = fdiv double %116, %118
%120 = load double, double* %10
%121 = fmul double %119, %120
%122 = load double, double* %10
%123 = load double, double* %21
%124 = fdiv double %122, %123
%125 = load double, double* %15
%126 = fmul double -2.000000e+00, %125
%127 = load double, double* %19
%128 = fdiv double %126, %127
%129 = call double @pow(double %124, double %128)
%130 = load double, double* %22
%131 = fneg double %130
%132 = load double, double* %15
%133 = fmul double 2.000000e+00, %132
%134 = load double, double* %16
%135 = fdiv double %133, %134
%136 = load double, double* %17
%137 = call double @llvm.fmuladd.f64(double %135, double %136, double %131)
%138 = call double @cnd(double %137)
%139 = load double, double* %18
%140 = load double, double* %22
%141 = fneg double %140
%142 = call double @cnd(double %141)
%143 = fmul double %139, %142
%144 = fneg double %143
%145 = call double @llvm.fmuladd.f64(double %129, double %138, double %144)
%146 = call double @llvm.fmuladd.f64(double %121, double %145, double %109)
store double %146, double* %24
br label %208
147: ; preds = %69
%148 = load double, double* %21
%149 = load double, double* %14
%150 = fneg double %149
%151 = load double, double* %13
%152 = fmul double %150, %151
%153 = call double @exp(double %152)
%154 = fmul double %148, %153
%155 = load double, double* %23
%156 = fneg double %155
%157 = call double @cnd(double %156)
%158 = load double, double* %10
%159 = load double, double* %15
%160 = load double, double* %14
%161 = fsub double %159, %160
%162 = load double, double* %13
%163 = fmul double %161, %162
%164 = call double @exp(double %163)
%165 = fmul double %158, %164
%166 = load double, double* %22
%167 = fneg double %166
%168 = call double @cnd(double %167)
%169 = fmul double %165, %168
%170 = fneg double %169
%171 = call double @llvm.fmuladd.f64(double %154, double %157, double %170)
%172 = load double, double* %14
%173 = fneg double %172
%174 = load double, double* %13
%175 = fmul double %173, %174
%176 = call double @exp(double %175)
%177 = load double, double* %19
%178 = fmul double %176, %177
%179 = load double, double* %15
%180 = fmul double 2.000000e+00, %179
%181 = fdiv double %178, %180
%182 = load double, double* %10
%183 = fmul double %181, %182
%184 = load double, double* %10
%185 = load double, double* %21
%186 = fdiv double %184, %185
%187 = load double, double* %15
%188 = fmul double -2.000000e+00, %187
%189 = load double, double* %19
%190 = fdiv double %188, %189
%191 = call double @pow(double %186, double %190)
%192 = fneg double %191
%193 = load double, double* %22
%194 = load double, double* %15
%195 = fmul double 2.000000e+00, %194
%196 = load double, double* %16
%197 = fdiv double %195, %196
%198 = load double, double* %17
%199 = fneg double %197
%200 = call double @llvm.fmuladd.f64(double %199, double %198, double %193)
%201 = call double @cnd(double %200)
%202 = load double, double* %18
%203 = load double, double* %22
%204 = call double @cnd(double %203)
%205 = fmul double %202, %204
%206 = call double @llvm.fmuladd.f64(double %192, double %201, double %205)
%207 = call double @llvm.fmuladd.f64(double %183, double %206, double %171)
store double %207, double* %24
br label %208
208: ; preds = %147, %87
%209 = load double, double* %24
ret double %209
}

LLVM IR (-O2):
define double @FloatingStrikeLookback(i32 %0, double %1, double %2, double %3, double %4, double %5, double %6, double %7) {
%9 = fcmp ord double %1, 0.000000e+00
%10 = fcmp oge double %1, 0x3EB0C6F7A0B5ED8D
%11 = and i1 %9, %10
%12 = fcmp ole double %1, 1.000000e+12
%13 = and i1 %12, %11
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
%16 = fcmp ord double %4, 0.000000e+00
%17 = fcmp oge double %4, 0x3F2596179C29D2CE
%18 = and i1 %16, %17
%19 = fcmp ole double %4, 2.000000e+01
%20 = and i1 %19, %18
%21 = zext i1 %20 to i32
%22 = tail call i32 @assert(i32 %21)
%23 = tail call double @sqrt(double %4)
%24 = fmul double %4, %6
%25 = tail call double @exp(double %24)
%26 = fmul double %7, %7
%27 = fmul double %23, %7
%28 = icmp eq i32 %0, 0
%29 = select i1 %28, double %3, double %2
%30 = fdiv double %1, %29
%31 = tail call double @log(double %30)
%32 = fmul double %26, 5.000000e-01
%33 = fadd double %32, %6
%34 = tail call double @llvm.fmuladd.f64(double %33, double %4, double %31)
%35 = fdiv double %34, %27
%36 = fsub double %35, %27
br i1 %28, label %68, label %37
37: ; preds = %8
%38 = fsub double %6, %5
%39 = fmul double %38, %4
%40 = tail call double @exp(double %39)
%41 = fmul double %40, %1
%42 = tail call double @cnd(double %35)
%43 = fneg double %5
%44 = fmul double %43, %4
%45 = tail call double @exp(double %44)
%46 = tail call double @cnd(double %36)
%47 = fneg double %29
%48 = fmul double %45, %47
%49 = fmul double %48, %46
%50 = tail call double @llvm.fmuladd.f64(double %41, double %42, double %49)
%51 = tail call double @exp(double %44)
%52 = fmul double %26, %51
%53 = fmul double %6, 2.000000e+00
%54 = fdiv double %52, %53
%55 = fmul double %54, %1
%56 = fmul double %6, -2.000000e+00
%57 = fdiv double %56, %26
%58 = tail call double @pow(double %30, double %57)
%59 = fneg double %35
%60 = fdiv double %53, %7
%61 = tail call double @llvm.fmuladd.f64(double %60, double %23, double %59)
%62 = tail call double @cnd(double %61)
%63 = tail call double @cnd(double %59)
%64 = fneg double %25
%65 = fmul double %63, %64
%66 = tail call double @llvm.fmuladd.f64(double %58, double %62, double %65)
%67 = tail call double @llvm.fmuladd.f64(double %55, double %66, double %50)
br label %101
68: ; preds = %8
%69 = fneg double %5
%70 = fmul double %69, %4
%71 = tail call double @exp(double %70)
%72 = fmul double %29, %71
%73 = fneg double %36
%74 = tail call double @cnd(double %73)
%75 = fsub double %6, %5
%76 = fmul double %75, %4
%77 = tail call double @exp(double %76)
%78 = fneg double %35
%79 = tail call double @cnd(double %78)
%80 = fneg double %77
%81 = fmul double %80, %1
%82 = fmul double %81, %79
%83 = tail call double @llvm.fmuladd.f64(double %72, double %74, double %82)
%84 = tail call double @exp(double %70)
%85 = fmul double %26, %84
%86 = fmul double %6, 2.000000e+00
%87 = fdiv double %85, %86
%88 = fmul double %87, %1
%89 = fmul double %6, -2.000000e+00
%90 = fdiv double %89, %26
%91 = tail call double @pow(double %30, double %90)
%92 = fneg double %91
%93 = fneg double %86
%94 = fdiv double %93, %7
%95 = tail call double @llvm.fmuladd.f64(double %94, double %23, double %35)
%96 = tail call double @cnd(double %95)
%97 = tail call double @cnd(double %35)
%98 = fmul double %25, %97
%99 = tail call double @llvm.fmuladd.f64(double %92, double %96, double %98)
%100 = tail call double @llvm.fmuladd.f64(double %88, double %99, double %83)
br label %101
101: ; preds = %68, %37
%102 = phi double [ %67, %37 ], [ %100, %68 ]
ret double %102
}