double get_dynamical_diff_near(double JD) {
  double TD = 0;
  double delta_T[3] = {56.86, 63.83, 70.0};
  double a, b, c, n;
  a = delta_T[1] - delta_T[0];
  b = delta_T[2] - delta_T[1];
  c = b - a;
  n = (JD - 2451544.5) / 3652.5;
  TD = delta_T[1] + (n / 2) * (a + b + n * c);
  return TD;
}


x86 assembly (clang, -O0):
<get_dynamical_diff_near>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0xf08(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xf05(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xf02(%rip),%rax
mov    %rax,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
subsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe90(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  0xe6d(%rip),%xmm2
divsd  %xmm2,%xmm0
movsd  -0x38(%rbp),%xmm3
addsd  -0x40(%rbp),%xmm3
movsd  -0x50(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm4
mulsd  %xmm4,%xmm2
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dynamical_diff_near>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xef4(%rip),%xmm0
addsd  0xef4(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
@__const.get_dynamical_diff_near.delta_T = [3 x double] [double 5.686000e+01, double 6.383000e+01, double 7.000000e+01]
define double @get_dynamical_diff_near(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca [3 x double]
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%9 = bitcast [3 x double]* %4 to i8*
%10 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%11 = load double, double* %10
%12 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%13 = load double, double* %12
%14 = fsub double %11, %13
store double %14, double* %5
%15 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 2
%16 = load double, double* %15
%17 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%18 = load double, double* %17
%19 = fsub double %16, %18
store double %19, double* %6
%20 = load double, double* %6
%21 = load double, double* %5
%22 = fsub double %20, %21
store double %22, double* %7
%23 = load double, double* %2
%24 = fsub double %23, 0x4142B42C40000000
%25 = fdiv double %24, 3.652500e+03
store double %25, double* %8
%26 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 1
%27 = load double, double* %26
%28 = load double, double* %8
%29 = fdiv double %28, 2.000000e+00
%30 = load double, double* %5
%31 = load double, double* %6
%32 = fadd double %30, %31
%33 = load double, double* %8
%34 = load double, double* %7
%35 = call double @llvm.fmuladd.f64(double %33, double %34, double %32)
%36 = call double @llvm.fmuladd.f64(double %29, double %35, double %27)
store double %36, double* %3
%37 = load double, double* %3
ret double %37
}

LLVM IR (-O2):
define double @get_dynamical_diff_near(double %0) {
%2 = fadd double %0, 0xC142B42C40000000
%3 = fdiv double %2, 3.652500e+03
%4 = fmul double %3, 5.000000e-01
%5 = tail call double @llvm.fmuladd.f64(double %3, double 0xBFE9999999999980, double 1.314000e+01)
%6 = tail call double @llvm.fmuladd.f64(double %4, double %5, double 6.383000e+01)
ret double %6
}