extern double black76_put(double F, double X, double T, double r, double v) {
  double vst, d1;
  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);
  vst = v * sqrt(T);
  d1 = (log(F / X) + (((v) * (v)) / 2) * T) / vst;
  return exp(-r * T) * (X * cnd(-(d1 - vst)) - F * cnd(-d1));
}


x86 assembly (clang, -O0):
<black76_put>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x10(%rbp),%xmm0
mov    %al,-0x39(%rbp)
jne    11bb <black76_put+0x6b>
jp     11bb <black76_put+0x6b>
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe65(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x39(%rbp)
jb     11bb <black76_put+0x6b>
movsd  0xe58(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
setae  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%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,-0x3a(%rbp)
jne    1214 <black76_put+0xc4>
jp     1214 <black76_put+0xc4>
movsd  -0x18(%rbp),%xmm0
xor    %eax,%eax
movsd  0xe1c(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x3a(%rbp)
jb     1214 <black76_put+0xc4>
movsd  0xe0f(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
setae  %al
mov    %al,-0x3a(%rbp)
mov    -0x3a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x20(%rbp),%xmm0
mov    %al,-0x3b(%rbp)
jne    1268 <black76_put+0x118>
jp     1268 <black76_put+0x118>
movsd  -0x20(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x3b(%rbp)
jb     1268 <black76_put+0x118>
movsd  0xdc3(%rip),%xmm0
ucomisd -0x20(%rbp),%xmm0
setae  %al
mov    %al,-0x3b(%rbp)
mov    -0x3b(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
ucomisd -0x28(%rbp),%xmm0
mov    %al,-0x3c(%rbp)
jne    12c1 <black76_put+0x171>
jp     12c1 <black76_put+0x171>
movsd  -0x28(%rbp),%xmm0
xor    %eax,%eax
movsd  0xd87(%rip),%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x3c(%rbp)
jb     12c1 <black76_put+0x171>
movsd  0xd7a(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
setae  %al
mov    %al,-0x3c(%rbp)
mov    -0x3c(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1070 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
divsd  -0x10(%rbp),%xmm0
call   1050 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xd1f(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x18(%rbp),%xmm0
call   1040 <exp@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
subsd  -0x30(%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,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x38(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
movsd  -0x60(%rbp),%xmm2
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm0
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
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<black76_put>:
sub    $0x58,%rsp
ucomisd %xmm1,%xmm1
setnp  %al
ucomisd 0xe9d(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe98(%rip),%xmm5
movsd  %xmm1,0x38(%rsp)
ucomisd %xmm1,%xmm5
movsd  %xmm4,0x10(%rsp)
movaps %xmm3,0x40(%rsp)
movsd  %xmm2,0x8(%rsp)
movsd  %xmm0,0x30(%rsp)
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 0xe5b(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe56(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xorpd  %xmm0,%xmm0
movapd 0x40(%rsp),%xmm1
ucomisd %xmm0,%xmm1
setae  %al
movsd  0xe32(%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 0xe12(%rip),%xmm1
setae  %cl
and    %al,%cl
movsd  0xe0d(%rip),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    %cl,%al
movzbl %al,%edi
xor    %eax,%eax
call   1030 <assert@plt>
movsd  0x8(%rsp),%xmm0
ucomisd 0xdfc(%rip),%xmm0
jb     1252 <black76_put+0x102>
movsd  0x8(%rsp),%xmm0
sqrtsd %xmm0,%xmm0
jmp    125d <black76_put+0x10d>
movsd  0x8(%rsp),%xmm0
call   1070 <sqrt@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  0x30(%rsp),%xmm0
divsd  0x38(%rsp),%xmm0
call   1050 <log@plt>
movsd  0x10(%rsp),%xmm2
mulsd  %xmm2,%xmm2
mulsd  0xdac(%rip),%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
divsd  0x28(%rsp),%xmm0
movapd %xmm0,0x10(%rsp)
movapd 0x40(%rsp),%xmm0
xorpd  0xd9c(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1040 <exp@plt>
movsd  %xmm0,0x8(%rsp)
movapd 0x10(%rsp),%xmm0
subsd  0x28(%rsp),%xmm0
xorpd  0xd79(%rip),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x40(%rsp)
movaps 0x10(%rsp),%xmm0
xorps  0xd59(%rip),%xmm0
mov    $0x1,%al
call   1060 <cnd@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
mulsd  0x30(%rsp),%xmm1
movsd  0x40(%rsp),%xmm0
mulsd  0x38(%rsp),%xmm0
subsd  %xmm1,%xmm0
mulsd  0x8(%rsp),%xmm0
add    $0x58,%rsp
ret

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

LLVM IR (-O2):
define double @black76_put(double %0, double %1, double %2, double %3, double %4) {
%6 = fcmp ord double %1, 0.000000e+00
%7 = fcmp oge double %1, 0x3EB0C6F7A0B5ED8D
%8 = and i1 %6, %7
%9 = fcmp ole double %1, 1.000000e+12
%10 = and i1 %9, %8
%11 = zext i1 %10 to i32
%12 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %11)
%13 = fcmp ord double %2, 0.000000e+00
%14 = fcmp oge double %2, 0x3F2596179C29D2CE
%15 = and i1 %13, %14
%16 = fcmp ole double %2, 2.000000e+01
%17 = and i1 %16, %15
%18 = zext i1 %17 to i32
%19 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %18)
%20 = fcmp oge double %3, 0.000000e+00
%21 = fcmp ole double %3, 1.000000e+03
%22 = and i1 %20, %21
%23 = zext i1 %22 to i32
%24 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %23)
%25 = fcmp ord double %4, 0.000000e+00
%26 = fcmp oge double %4, 0x3E7AD7F29ABCAF48
%27 = and i1 %25, %26
%28 = fcmp ole double %4, 0x40593FFFD60E94EE
%29 = and i1 %28, %27
%30 = zext i1 %29 to i32
%31 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %30)
%32 = tail call double @sqrt(double %2)
%33 = fmul double %32, %4
%34 = fdiv double %0, %1
%35 = tail call double @log(double %34)
%36 = fmul double %4, %4
%37 = fmul double %36, 5.000000e-01
%38 = tail call double @llvm.fmuladd.f64(double %37, double %2, double %35)
%39 = fdiv double %38, %33
%40 = fneg double %3
%41 = fmul double %40, %2
%42 = tail call double @exp(double %41)
%43 = fsub double %39, %33
%44 = fneg double %43
%45 = tail call i32 (double, ...) bitcast (i32 (...)* @cnd to i32 (double, ...)*)(double %44)
%46 = sitofp i32 %45 to double
%47 = fneg double %39
%48 = tail call i32 (double, ...) bitcast (i32 (...)* @cnd to i32 (double, ...)*)(double %47)
%49 = sitofp i32 %48 to double
%50 = fneg double %49
%51 = fmul double %50, %0
%52 = tail call double @llvm.fmuladd.f64(double %1, double %46, double %51)
%53 = fmul double %42, %52
ret double %53
}