extern double Swapoption(int fCall, double t1, double m, double F, double X,
                         double T, double r, double v) {
  double d1, d2, result;
  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(((v) == (v)) && (v) >= 0.0000001 && v <= 100.99999);
  d1 = (log(F / X) + ((v) * (v)) / 2.0 * T) / (v * sqrt(T));
  d2 = d1 - v * sqrt(T);
  if (fCall) {
    result = ((1.0 - 1.0 / pow((1 + F / m), (t1 * m))) / F) * exp(-r * T) *
             (F * cnd(d1) - X * cnd(d2));
  } else {
    result = ((1.0 - 1.0 / pow((1.0 + F / m), (t1 * m))) / F) * exp(-r * T) *
             (X * cnd(-d2) - F * cnd(-d1));
  }
  assert(((result) == (result)));
  return result;
}


x86 assembly (clang, -O0):
<Swapoption>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%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  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x59(%rbp)
jne    11db <Swapoption+0x7b>
jp     11db <Swapoption+0x7b>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe45(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x59(%rbp)
jb     11db <Swapoption+0x7b>
movsd  0xe38(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x59(%rbp)
mov    -0x59(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0x5a(%rbp)
jne    1234 <Swapoption+0xd4>
jp     1234 <Swapoption+0xd4>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdfc(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x5a(%rbp)
jb     1234 <Swapoption+0xd4>
movsd  0xdef(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0x5a(%rbp)
mov    -0x5a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x38(%rbp),%xmm0
mov    %al,-0x5b(%rbp)
jne    1288 <Swapoption+0x128>
jp     1288 <Swapoption+0x128>
movsd  -0x38(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x5b(%rbp)
jb     1288 <Swapoption+0x128>
movsd  0xda3(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
setae  %al
mov    %al,-0x5b(%rbp)
mov    -0x5b(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x40(%rbp),%xmm0
mov    %al,-0x5c(%rbp)
jne    12e1 <Swapoption+0x181>
jp     12e1 <Swapoption+0x181>
movsd  -0x40(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd67(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x5c(%rbp)
jb     12e1 <Swapoption+0x181>
movsd  0xd5a(%rip),%xmm0
ucomisd -0x40(%rbp),%xmm0
setae  %al
mov    %al,-0x5c(%rbp)
mov    -0x5c(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x20(%rbp),%xmm0
divsd  -0x28(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  0xd24(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  -0x30(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0x80(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x78(%rbp),%xmm0
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
call   1080 <sqrt@plt>
movsd  -0x70(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     14cb <Swapoption+0x36b>
movsd  -0x20(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xc7d(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
call   1070 <pow@plt>
movsd  0xc62(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xc56(%rip),%xmm0
subsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xa8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  -0xa0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm3
ff
movsd  -0x88(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
jmp    160e <Swapoption+0x4ae>
movsd  -0x20(%rbp),%xmm1
divsd  -0x18(%rbp),%xmm1
movsd  0xb63(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
call   1070 <pow@plt>
movsd  0xb48(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  0xb3c(%rip),%xmm0
subsd  %xmm1,%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  -0xc8(%rbp),%xmm2
ff
movsd  -0xc0(%rbp),%xmm1
ff
movsd  -0xb8(%rbp),%xmm3
ff
movsd  -0xb0(%rbp),%xmm0
ff
cvtsi2sd %eax,%xmm4
mulsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
ucomisd -0x58(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x58(%rbp),%xmm0
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Swapoption>:
push   %rbx
sub    $0x70,%rsp
movsd  %xmm3,0x38(%rsp)
ucomisd %xmm3,%xmm3
setnp  %al
ucomisd 0xe86(%rip),%xmm3
setae  %cl
and    %al,%cl
movsd  0xe81(%rip),%xmm7
ucomisd %xmm3,%xmm7
movsd  %xmm6,0x10(%rsp)
movaps %xmm5,0x50(%rsp)
movsd  %xmm4,0x8(%rsp)
movsd  %xmm2,0x18(%rsp)
movsd  %xmm1,0x60(%rsp)
movsd  %xmm0,0x68(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe3c(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe37(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xorpd  %xmm0,%xmm0
movapd 0x50(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xe13(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x10(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xdf3(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xdee(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x18(%rsp),%xmm0
divsd  0x38(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x10(%rsp),%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm1,%xmm2
mulsd  0xdbc(%rip),%xmm2
movsd  0x8(%rsp),%xmm3
mulsd  %xmm3,%xmm2
addsd  %xmm0,%xmm2
sqrtsd %xmm3,%xmm4
ucomisd 0xdb2(%rip),%xmm3
xorpd  %xmm3,%xmm3
movapd %xmm4,%xmm0
jae    12cd <Swapoption+0x16d>
movsd  0x8(%rsp),%xmm0
movapd %xmm2,0x20(%rsp)
movsd  %xmm4,0x40(%rsp)
call   1080 <sqrt@plt>
movsd  0x40(%rsp),%xmm4
xorpd  %xmm3,%xmm3
movapd 0x20(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
movsd  0x8(%rsp),%xmm0
ucomisd %xmm3,%xmm0
movapd %xmm2,0x20(%rsp)
jae    1302 <Swapoption+0x1a2>
movsd  0x8(%rsp),%xmm0
call   1080 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
movsd  0x10(%rsp),%xmm1
movapd %xmm0,%xmm4
mulsd  %xmm4,%xmm1
subsd  %xmm1,%xmm2
movapd %xmm2,0x40(%rsp)
movsd  0x18(%rsp),%xmm0
movsd  0x60(%rsp),%xmm2
divsd  %xmm2,%xmm0
addsd  0xd18(%rip),%xmm0
movsd  0x68(%rsp),%xmm1
mulsd  %xmm2,%xmm1
call   1070 <pow@plt>
movsd  %xmm0,0x10(%rsp)
movapd 0x50(%rsp),%xmm0
xorpd  0xd05(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
test   %ebx,%ebx
je     13a8 <Swapoption+0x248>
movaps 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
movaps 0x40(%rsp),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  0x20(%rsp),%xmm3
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm3
subsd  %xmm0,%xmm3
jmp    1400 <Swapoption+0x2a0>
movaps 0x40(%rsp),%xmm0
xorps  0xc9c(%rip),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x50(%rsp)
movaps 0x20(%rsp),%xmm0
xorps  0xc7c(%rip),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0x38(%rsp),%xmm1
mulsd  0x50(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm3
movsd  0xc38(%rip),%xmm0
movapd %xmm0,%xmm1
divsd  0x10(%rsp),%xmm1
subsd  %xmm1,%xmm0
divsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm3,%xmm1
movsd  %xmm1,0x8(%rsp)
xor    %edi,%edi
ucomisd %xmm1,%xmm1
setnp  %dil
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
add    $0x70,%rsp
pop    %rbx
ret

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

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