double palDt(double epoch) {
  double t, w, s;
  t = (epoch - 1800.0) / 100.0;
  if (epoch >= 1708.185161980887) {
    w = t - 0.19;
    s = 5.156 + 13.3066 * w * w;
  } else if (epoch >= 979.0258204760233) {
    s = 25.5 * t * t;
  } else {
    s = 1360.0 + (320.0 + 44.3 * t) * t;
  }
  return s;
}


x86 assembly (clang, -O0):
<palDt>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xefa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1184 <palDt+0x84>
movsd  -0x10(%rbp),%xmm0
movsd  0xf01(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xee8(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11f3 <palDt+0xf3>
movsd  -0x8(%rbp),%xmm0
movsd  0xe87(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     11b7 <palDt+0xb7>
movsd  0xe95(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11ee <palDt+0xee>
movsd  -0x10(%rbp),%xmm0
movsd  0xe64(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe60(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe3b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11f3 <palDt+0xf3>
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<palDt>:
movsd  0xef8(%rip),%xmm1
addsd  %xmm0,%xmm1
divsd  0xef4(%rip),%xmm1
ucomisd 0xef4(%rip),%xmm0
jae    1149 <palDt+0x49>
ucomisd 0xf0a(%rip),%xmm0
jae    116a <palDt+0x6a>
movsd  0xf10(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf0c(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xf08(%rip),%xmm0
ret
addsd  0xec7(%rip),%xmm1
movsd  0xec7(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xebf(%rip),%xmm0
ret
movsd  0xec6(%rip),%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @palDt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %2
%6 = load double, double* %2
%7 = fsub double %6, 1.800000e+03
%8 = fdiv double %7, 1.000000e+02
store double %8, double* %3
%9 = load double, double* %2
%10 = fcmp oge double %9, 0x409AB0BD9B1A317D
br i1 %10, label %11, label %18
11: ; preds = %1
%12 = load double, double* %3
%13 = fsub double %12, 1.900000e-01
store double %13, double* %4
%14 = load double, double* %4
%15 = fmul double 1.330660e+01, %14
%16 = load double, double* %4
%17 = call double @llvm.fmuladd.f64(double %15, double %16, double 5.156000e+00)
store double %17, double* %5
br label %32
18: ; preds = %1
%19 = load double, double* %2
%20 = fcmp oge double %19, 0x408E9834E15DA0B3
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load double, double* %3
%23 = fmul double 2.550000e+01, %22
%24 = load double, double* %3
%25 = fmul double %23, %24
store double %25, double* %5
br label %31
26: ; preds = %18
%27 = load double, double* %3
%28 = call double @llvm.fmuladd.f64(double 4.430000e+01, double %27, double 3.200000e+02)
%29 = load double, double* %3
%30 = call double @llvm.fmuladd.f64(double %28, double %29, double 1.360000e+03)
store double %30, double* %5
br label %31
31: ; preds = %26, %21
br label %32
32: ; preds = %31, %11
%33 = load double, double* %5
ret double %33
}

LLVM IR (-O2):
define double @palDt(double %0) {
%2 = fadd double %0, -1.800000e+03
%3 = fdiv double %2, 1.000000e+02
%4 = fcmp ult double %0, 0x409AB0BD9B1A317D
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = fadd double %3, -1.900000e-01
%7 = fmul double %6, 1.330660e+01
%8 = tail call double @llvm.fmuladd.f64(double %7, double %6, double 5.156000e+00)
br label %17
9: ; preds = %1
%10 = fcmp ult double %0, 0x408E9834E15DA0B3
br i1 %10, label %14, label %11
11: ; preds = %9
%12 = fmul double %3, 2.550000e+01
%13 = fmul double %3, %12
br label %17
14: ; preds = %9
%15 = tail call double @llvm.fmuladd.f64(double %3, double 4.430000e+01, double 3.200000e+02)
%16 = tail call double @llvm.fmuladd.f64(double %15, double %3, double 1.360000e+03)
br label %17
17: ; preds = %11, %14, %5
%18 = phi double [ %8, %5 ], [ %13, %11 ], [ %16, %14 ]
ret double %18
}