double VasicekBondOption(int fCall, double F, double X, double tau, double T,
                         double r, double Theta, double kappa, double v) {
  double PtT, Pt_tau, vp, H, 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);
  X = X / F;
  PtT = VasicekBondPrice(0.0, T, r, Theta, kappa, v);
  Pt_tau = VasicekBondPrice(0.0, tau, r, Theta, kappa, v);
  vp = sqrt(((v) * (v)) * (1.0 - exp(-2.0 * kappa * T)) / (2.0 * kappa)) *
       (1.0 - exp(-kappa * (tau - T))) / kappa;
  H = 1.0 / vp * log(Pt_tau / (PtT * X)) + vp / 2.0;
  if (fCall)
    result = F * (Pt_tau * cnd(H) - X * PtT * cnd(H - vp));
  else
    result = F * (X * PtT * cnd(-H + vp) - Pt_tau * cnd(-H));
  return result;
}


x86 assembly (clang, -O0):
<VasicekBondOption>:
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  %xmm7,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x71(%rbp)
jne    11e0 <VasicekBondOption+0x80>
jp     11e0 <VasicekBondOption+0x80>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe40(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x71(%rbp)
jb     11e0 <VasicekBondOption+0x80>
movsd  0xe33(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x71(%rbp)
mov    -0x71(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x72(%rbp)
jne    1239 <VasicekBondOption+0xd9>
jp     1239 <VasicekBondOption+0xd9>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdf7(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x72(%rbp)
jb     1239 <VasicekBondOption+0xd9>
movsd  0xdea(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x72(%rbp)
mov    -0x72(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x30(%rbp),%xmm0
mov    %al,-0x73(%rbp)
jne    128d <VasicekBondOption+0x12d>
jp     128d <VasicekBondOption+0x12d>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x73(%rbp)
jb     128d <VasicekBondOption+0x12d>
movsd  0xd9e(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0x73(%rbp)
mov    -0x73(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x48(%rbp),%xmm0
mov    %al,-0x74(%rbp)
jne    12e6 <VasicekBondOption+0x186>
jp     12e6 <VasicekBondOption+0x186>
movsd  -0x48(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd62(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x74(%rbp)
jb     12e6 <VasicekBondOption+0x186>
movsd  0xd55(%rip),%xmm0
ucomisd -0x48(%rbp),%xmm0
setae  %al
mov    %al,-0x74(%rbp)
mov    -0x74(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1040 <assert@plt>
movsd  -0x18(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
xorps  %xmm0,%xmm0
mov    $0x6,%al
call   1030 <VasicekBondPrice@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
movsd  -0x48(%rbp),%xmm5
xorps  %xmm0,%xmm0
mov    $0x6,%al
call   1030 <VasicekBondPrice@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xcd2(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x90(%rbp),%xmm0
ff
movsd  0xca8(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc90(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1080 <sqrt@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1050 <exp@plt>
movaps %xmm0,%xmm2
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xc40(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xc26(%rip),%xmm0
divsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
mulsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movaps %xmm0,%xmm2
movsd  -0x80(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  0xbe7(%rip),%xmm3
divsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1516 <VasicekBondOption+0x3b6>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm3
ff
movsd  -0x98(%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,-0x70(%rbp)
jmp    15e9 <VasicekBondOption+0x489>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x18(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x60(%rbp),%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
movsd  -0xd0(%rbp),%xmm2
ff
movsd  -0xc8(%rbp),%xmm1
ff
movsd  -0xc0(%rbp),%xmm3
ff
movsd  -0xb8(%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,-0x70(%rbp)
movsd  -0x70(%rbp),%xmm0
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VasicekBondOption>:
push   %rbx
sub    $0x60,%rsp
movsd  %xmm1,0x28(%rsp)
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe86(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe80(%rip),%xmm8
ucomisd %xmm1,%xmm8
movsd  %xmm7,(%rsp)
movaps %xmm6,0x30(%rsp)
movsd  %xmm5,0x48(%rsp)
movsd  %xmm4,0x18(%rsp)
movsd  %xmm3,0x20(%rsp)
movsd  %xmm2,0x40(%rsp)
movsd  %xmm0,0x50(%rsp)
mov    %edi,%ebx
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1040 <assert@plt>
movsd  0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe35(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe30(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1040 <assert@plt>
xorpd  %xmm0,%xmm0
movsd  0x18(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xe0c(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1040 <assert@plt>
movsd  (%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xded(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xde8(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1040 <assert@plt>
movsd  0x28(%rsp),%xmm0
divsd  0x50(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
xorpd  %xmm0,%xmm0
movsd  0x20(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x48(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
movsd  (%rsp),%xmm5
mov    $0x6,%al
call   1030 <VasicekBondPrice@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x58(%rsp)
xorpd  %xmm0,%xmm0
movsd  0x40(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
movsd  0x48(%rsp),%xmm3
movaps 0x30(%rsp),%xmm4
movsd  (%rsp),%xmm5
mov    $0x6,%al
call   1030 <VasicekBondPrice@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xd4d(%rip),%xmm0
mulsd  0x30(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
call   1050 <exp@plt>
movapd %xmm0,%xmm1
movsd  0xd38(%rip),%xmm0
subsd  %xmm1,%xmm0
mulsd  (%rsp),%xmm0
movapd 0x30(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
ucomisd 0xd29(%rip),%xmm0
jb     132f <VasicekBondOption+0x1cf>
sqrtsd %xmm0,%xmm0
jmp    1334 <VasicekBondOption+0x1d4>
call   1080 <sqrt@plt>
movsd  %xmm0,(%rsp)
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm2
movapd 0xd13(%rip),%xmm1
xorpd  0x30(%rsp),%xmm1
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
call   1050 <exp@plt>
movsd  0xcd8(%rip),%xmm1
movapd %xmm1,%xmm2
subsd  %xmm0,%xmm2
mulsd  (%rsp),%xmm2
divsd  0x30(%rsp),%xmm2
movsd  %xmm2,0x30(%rsp)
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x28(%rsp),%xmm1
mulsd  0x58(%rsp),%xmm1
movsd  0x18(%rsp),%xmm0
movsd  %xmm1,0x28(%rsp)
divsd  %xmm1,%xmm0
call   1060 <log@plt>
movapd %xmm0,%xmm1
movsd  0xc91(%rip),%xmm0
mulsd  0x30(%rsp),%xmm0
mulsd  (%rsp),%xmm1
addsd  %xmm0,%xmm1
test   %ebx,%ebx
je     1418 <VasicekBondOption+0x2b8>
movapd %xmm1,%xmm0
mov    $0x1,%al
movapd %xmm1,(%rsp)
call   1070 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x20(%rsp)
movapd (%rsp),%xmm0
subsd  0x30(%rsp),%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
jmp    146b <VasicekBondOption+0x30b>
movsd  0x30(%rsp),%xmm0
subsd  %xmm1,%xmm0
xorpd  0xc36(%rip),%xmm1
movapd %xmm1,(%rsp)
mov    $0x1,%al
call   1070 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x30(%rsp)
movaps (%rsp),%xmm0
mov    $0x1,%al
call   1070 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x28(%rsp),%xmm0
mulsd  0x30(%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x50(%rsp),%xmm0
add    $0x60,%rsp
pop    %rbx
ret

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

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