#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);
extern double GarmanKohlhagen(int fCall, double S, double X, double T, double r,
                              double rf, double v) {
  double d1, d2, result;
  assert(((S) == (S)) && (S) >= 0.000001 && (S) <= 1000000000000.0);
  assert(((X) == (X)) && (X) >= 0.000001 && (X) <= 1000000000000.0);
  assert(((T) == (T)) && (T) >= (1.0 / (253.0 * 24.0)) && (T) <= (20.0));
  assert(((r) == (r)) && (r) >= 0.0 && (r) <= 1000.0);
  assert(((rf) == (rf)) && (rf) >= 0.0 && (rf) <= 1000.0);
  assert(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  d1 = (log(S / X) + (r - rf + pow(v, 2.0) / 2.0) * T) / (v * sqrt(T));
  d2 = d1 - (v * sqrt(T));
  if (fCall)
    result = (S * exp(-rf * T) * cnd(d1)) - (X * exp(-r * T) * cnd(d2));
  else
    result = (X * exp(-r * T) * cnd(-d2)) - (S * exp(-rf * T) * cnd(-d1));
  return result;
}


x86 assembly (clang, -O0):
<GarmanKohlhagen>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%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  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x51(%rbp)
jne    11d6 <GarmanKohlhagen+0x76>
jp     11d6 <GarmanKohlhagen+0x76>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe4a(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x51(%rbp)
jb     11d6 <GarmanKohlhagen+0x76>
movsd  0xe3d(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x51(%rbp)
mov    -0x51(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x52(%rbp)
jne    122d <GarmanKohlhagen+0xcd>
jp     122d <GarmanKohlhagen+0xcd>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdf3(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x52(%rbp)
jb     122d <GarmanKohlhagen+0xcd>
movsd  0xde6(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x52(%rbp)
mov    -0x52(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0x53(%rbp)
jne    1284 <GarmanKohlhagen+0x124>
jp     1284 <GarmanKohlhagen+0x124>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdac(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x53(%rbp)
jb     1284 <GarmanKohlhagen+0x124>
movsd  0xd9f(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
setae  %al
mov    %al,-0x53(%rbp)
mov    -0x53(%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,-0x54(%rbp)
jne    12d6 <GarmanKohlhagen+0x176>
jp     12d6 <GarmanKohlhagen+0x176>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x54(%rbp)
jb     12d6 <GarmanKohlhagen+0x176>
movsd  0xd55(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x54(%rbp)
mov    -0x54(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0x55(%rbp)
jne    1328 <GarmanKohlhagen+0x1c8>
jp     1328 <GarmanKohlhagen+0x1c8>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x55(%rbp)
jb     1328 <GarmanKohlhagen+0x1c8>
movsd  0xd03(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0x56(%rbp)
jne    137f <GarmanKohlhagen+0x21f>
jp     137f <GarmanKohlhagen+0x21f>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
movsd  0xcc9(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x56(%rbp)
jb     137f <GarmanKohlhagen+0x21f>
movsd  0xcbc(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0x56(%rbp)
mov    -0x56(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
call   1050 <log@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xc79(%rip),%xmm1
call   1070 <pow@plt>
movsd  -0x88(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
movsd  0xc5c(%rip),%xmm3
divsd  %xmm3,%xmm2
addsd  %xmm2,%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1575 <GarmanKohlhagen+0x415>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xb0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1060 <cnd@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  -0x98(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x90(%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,-0x50(%rbp)
jmp    1696 <GarmanKohlhagen+0x536>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%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,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GarmanKohlhagen>:
push   %rbx
sub    $0x70,%rsp
movsd  %xmm0,0x38(%rsp)
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe96(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe91(%rip),%xmm6
ucomisd %xmm0,%xmm6
movsd  %xmm5,0x20(%rsp)
movaps %xmm4,0x50(%rsp)
movaps %xmm3,0x40(%rsp)
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x8(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
ucomisd %xmm0,%xmm0
setnp  %al
ucomisd 0xe46(%rip),%xmm0
setae  %cl
and    %al,%cl
movsd  0xe41(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe24(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe1f(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
xorpd  %xmm1,%xmm1
movapd 0x40(%rsp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xdfd(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movapd 0x50(%rsp),%xmm0
ucomisd 0xdfe(%rip),%xmm0
setae  %al
movsd  0xdd3(%rip),%xmm1
ucomisd %xmm0,%xmm1
setae  %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xdb5(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xdb0(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
call   1030 <assert@plt>
movsd  0x38(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x20(%rsp),%xmm3
movsd  (%rsp),%xmm2
movapd 0x40(%rsp),%xmm1
subsd  0x50(%rsp),%xmm1
movapd %xmm3,%xmm4
mulsd  %xmm3,%xmm4
mulsd  0xd6f(%rip),%xmm4
addsd  %xmm1,%xmm4
xorpd  %xmm1,%xmm1
mulsd  %xmm2,%xmm4
addsd  %xmm0,%xmm4
sqrtsd %xmm2,%xmm5
ucomisd %xmm1,%xmm2
movapd %xmm5,%xmm0
jae    1317 <GarmanKohlhagen+0x1c7>
movapd %xmm2,%xmm0
movapd %xmm4,0x10(%rsp)
movsd  %xmm5,0x68(%rsp)
call   1070 <sqrt@plt>
movsd  0x68(%rsp),%xmm5
xorpd  %xmm1,%xmm1
movapd 0x10(%rsp),%xmm4
movsd  0x20(%rsp),%xmm3
movsd  (%rsp),%xmm2
mulsd  %xmm3,%xmm0
divsd  %xmm0,%xmm4
ucomisd %xmm1,%xmm2
movapd %xmm4,0x10(%rsp)
jae    1349 <GarmanKohlhagen+0x1f9>
movapd %xmm2,%xmm0
call   1070 <sqrt@plt>
movapd 0x10(%rsp),%xmm4
movsd  0x20(%rsp),%xmm3
movsd  (%rsp),%xmm2
movapd %xmm0,%xmm5
mulsd  %xmm5,%xmm3
subsd  %xmm3,%xmm4
movapd %xmm4,0x20(%rsp)
test   %ebx,%ebx
je     13d6 <GarmanKohlhagen+0x286>
movapd 0x50(%rsp),%xmm0
xorpd  0xce7(%rip),%xmm0
mulsd  %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0x38(%rsp),%xmm0
movsd  %xmm0,0x50(%rsp)
movaps 0x10(%rsp),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
xorpd  0xcb4(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,(%rsp)
movapd 0x20(%rsp),%xmm0
call   1060 <cnd@plt>
movsd  (%rsp),%xmm1
mulsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  0x50(%rsp),%xmm0
jmp    145b <GarmanKohlhagen+0x30b>
movapd 0x40(%rsp),%xmm0
xorpd  0xc6c(%rip),%xmm0
mulsd  %xmm2,%xmm0
call   1040 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movaps 0x20(%rsp),%xmm0
xorps  0xc4b(%rip),%xmm0
call   1060 <cnd@plt>
movsd  %xmm0,0x40(%rsp)
movapd 0x50(%rsp),%xmm0
xorpd  0xc32(%rip),%xmm0
mulsd  (%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,(%rsp)
movapd 0x10(%rsp),%xmm0
xorpd  0xc15(%rip),%xmm0
call   1060 <cnd@plt>
movsd  (%rsp),%xmm1
mulsd  0x38(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x40(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x70,%rsp
pop    %rbx
ret

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

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