extern double VasicekBondPrice(double t1, double T, double r, double Theta,
                               double kappa, double v) {
  double BtT, AtT, PtT;
  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);
  BtT = (1 - exp(-kappa * (T - t1))) / kappa;
  AtT = exp((BtT - T + t1) * (((kappa) * (kappa)) * Theta - ((v) * (v)) / 2.0) /
                ((kappa) * (kappa)) -
            ((v) * (v)) * ((BtT) * (BtT)) / (4.0 * kappa));
  PtT = AtT * exp(-BtT * r);
  assert(((PtT) == (PtT)));
  return PtT;
}


x86 assembly (clang, -O0):
<VasicekBondPrice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x49(%rbp)
jne    1190 <VasicekBondPrice+0x70>
jp     1190 <VasicekBondPrice+0x70>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe90(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x49(%rbp)
jb     1190 <VasicekBondPrice+0x70>
movsd  0xe83(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x18(%rbp),%xmm0
mov    %al,-0x4a(%rbp)
jne    11e4 <VasicekBondPrice+0xc4>
jp     11e4 <VasicekBondPrice+0xc4>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x4a(%rbp)
jb     11e4 <VasicekBondPrice+0xc4>
movsd  0xe37(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x4a(%rbp)
mov    -0x4a(%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,-0x4b(%rbp)
jne    123d <VasicekBondPrice+0x11d>
jp     123d <VasicekBondPrice+0x11d>
movsd  -0x30(%rbp),%xmm0
xor    %eax,%eax
movsd  0xdfb(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x4b(%rbp)
jb     123d <VasicekBondPrice+0x11d>
movsd  0xdee(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
setae  %al
mov    %al,-0x4b(%rbp)
mov    -0x4b(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xdb2(%rip),%xmm0
subsd  %xmm1,%xmm0
divsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
movsd  -0x30(%rbp),%xmm2
mulsd  -0x30(%rbp),%xmm2
movsd  0xd6c(%rip),%xmm4
divsd  %xmm4,%xmm2
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  -0x28(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
mulsd  -0x38(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd0f(%rip),%xmm2
mulsd  -0x28(%rbp),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <exp@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
ucomisd -0x48(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x48(%rbp),%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VasicekBondPrice>:
sub    $0x68,%rsp
movsd  %xmm1,0x18(%rsp)
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xec7(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xec2(%rip),%xmm6
ucomisd %xmm1,%xmm6
movaps %xmm5,0x20(%rsp)
movaps %xmm4,0x30(%rsp)
movaps %xmm3,0x50(%rsp)
movsd  %xmm2,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xorpd  %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xe83(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %cl
and    %al,%cl
movzbl %cl,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movapd 0x20(%rsp),%xmm1
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe63(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe5e(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movapd 0x30(%rsp),%xmm1
xorpd  0xe5d(%rip),%xmm1
movsd  0x18(%rsp),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  0xe28(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd 0x30(%rsp),%xmm3
divsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
movapd %xmm1,%xmm5
movapd %xmm1,0x40(%rsp)
subsd  0x18(%rsp),%xmm0
movapd 0x20(%rsp),%xmm2
mulsd  %xmm2,%xmm2
movsd  0xdfc(%rip),%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm2,%xmm4
movapd %xmm3,%xmm2
unpcklpd %xmm3,%xmm2
shufpd $0x2,0xe03(%rip),%xmm3
mulpd  %xmm2,%xmm3
movapd 0x50(%rsp),%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
unpcklpd %xmm5,%xmm1
addsd  0x8(%rsp),%xmm0
mulpd  %xmm1,%xmm1
movsd  %xmm0,%xmm1
unpcklpd %xmm4,%xmm2
mulpd  %xmm1,%xmm2
divpd  %xmm3,%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
subsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x40(%rsp),%xmm0
xorpd  0xd9a(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
call   1040 <exp@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %edi,%edi
ucomisd %xmm0,%xmm0
setnp  %dil
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x10(%rsp),%xmm0
add    $0x68,%rsp
ret

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

LLVM IR (-O2):
define double @VasicekBondPrice(double %0, double %1, double %2, double %3, double %4, double %5) {
%7 = fcmp ord double %1, 0.000000e+00
%8 = fcmp oge double %1, 0x3F2596179C29D2CE
%9 = and i1 %7, %8
%10 = fcmp ole double %1, 2.000000e+01
%11 = and i1 %10, %9
%12 = zext i1 %11 to i32
%13 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %12)
%14 = fcmp oge double %2, 0.000000e+00
%15 = fcmp ole double %2, 1.000000e+03
%16 = and i1 %14, %15
%17 = zext i1 %16 to i32
%18 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %17)
%19 = fcmp ord double %5, 0.000000e+00
%20 = fcmp oge double %5, 0x3E7AD7F29ABCAF48
%21 = and i1 %19, %20
%22 = fcmp ole double %5, 0x40593FFFD60E94EE
%23 = and i1 %22, %21
%24 = zext i1 %23 to i32
%25 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %24)
%26 = fneg double %4
%27 = fsub double %1, %0
%28 = fmul double %27, %26
%29 = tail call double @exp(double %28)
%30 = fsub double 1.000000e+00, %29
%31 = fdiv double %30, %4
%32 = fsub double %31, %1
%33 = fmul double %5, %5
%34 = fmul double %33, -5.000000e-01
%35 = insertelement <2 x double> poison, double %4, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = insertelement <2 x double> <double poison, double 4.000000e+00>, double %4, i64 0
%38 = fmul <2 x double> %36, %37
%39 = extractelement <2 x double> %38, i64 0
%40 = tail call double @llvm.fmuladd.f64(double %39, double %3, double %34)
%41 = insertelement <2 x double> poison, double %32, i64 0
%42 = insertelement <2 x double> %41, double %31, i64 1
%43 = insertelement <2 x double> poison, double %0, i64 0
%44 = insertelement <2 x double> %43, double %31, i64 1
%45 = fadd <2 x double> %42, %44
%46 = fmul <2 x double> %42, %44
%47 = shufflevector <2 x double> %45, <2 x double> %46, <2 x i32> <i32 0, i32 3>
%48 = insertelement <2 x double> poison, double %40, i64 0
%49 = insertelement <2 x double> %48, double %33, i64 1
%50 = fmul <2 x double> %49, %47
%51 = fdiv <2 x double> %50, %38
%52 = shufflevector <2 x double> %51, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%53 = fsub <2 x double> %51, %52
%54 = extractelement <2 x double> %53, i64 0
%55 = tail call double @exp(double %54)
%56 = fneg double %31
%57 = fmul double %56, %2
%58 = tail call double @exp(double %57)
%59 = fmul double %55, %58
%60 = fcmp ord double %59, 0.000000e+00
%61 = zext i1 %60 to i32
%62 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %61)
ret double %59
}