double AstAlg_mean_obliquity(double jd) {
  static double last_jd, last_e0;
  double tau;
  const double coefs[] = {23.439291111111, -0.0130041666667, -1.638888889e-7,
                          5.036111111e-7};
  if (jd == last_jd)
    return last_e0;
  tau = (jd - (2451545.0)) / 36525.0;
  last_e0 = ((((coefs[3] * tau) + coefs[2]) * tau) + coefs[1]) * tau + coefs[0];
  last_jd = jd;
  return last_e0;
}


x86 assembly (clang, -O0):
<AstAlg_mean_obliquity>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    0xf00(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xefd(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xefa(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xef7(%rip),%rax
mov    %rax,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd 0x2ee6(%rip),%xmm0
jne    1160 <AstAlg_mean_obliquity+0x60>
jp     1160 <AstAlg_mean_obliquity+0x60>
movsd  0x2eda(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11df <AstAlg_mean_obliquity+0xdf>
movsd  -0x10(%rbp),%xmm0
movsd  0xe9b(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe87(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x40(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,0x2e6b(%rip)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,0x2e56(%rip)
movsd  0x2e56(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<AstAlg_mean_obliquity>:
movsd  0x2f20(%rip),%xmm1
ucomisd %xmm0,%xmm1
jne    1119 <AstAlg_mean_obliquity+0x19>
jp     1119 <AstAlg_mean_obliquity+0x19>
movsd  0x2f18(%rip),%xmm0
ret
movsd  0xedf(%rip),%xmm2
addsd  %xmm0,%xmm2
divsd  0xedb(%rip),%xmm2
movsd  0xedb(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xed7(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xed3(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xecf(%rip),%xmm1
movsd  %xmm1,0x2ecf(%rip)
movsd  %xmm0,0x2ebf(%rip)
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
@AstAlg_mean_obliquity.last_jd = internal global double 0.000000e+00
@AstAlg_mean_obliquity.last_e0 = internal global double 0.000000e+00
@__const.AstAlg_mean_obliquity.coefs = [4 x double] [double 0x4037707561DBA52F, double 0xBF8AA1EDB45C96F9, double 0xBE85FF2DE97D7758, double 0x3EA0E5FC8B89446A]
define double @AstAlg_mean_obliquity(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca [4 x double]
store double %0, double* %3
%6 = bitcast [4 x double]* %5 to i8*
%7 = load double, double* %3
%8 = load double, double* @AstAlg_mean_obliquity.last_jd
%9 = fcmp oeq double %7, %8
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = load double, double* @AstAlg_mean_obliquity.last_e0
store double %11, double* %2
br label %32
12: ; preds = %1
%13 = load double, double* %3
%14 = fsub double %13, 0x4142B42C80000000
%15 = fdiv double %14, 3.652500e+04
store double %15, double* %4
%16 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 3
%17 = load double, double* %16
%18 = load double, double* %4
%19 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%20 = load double, double* %19
%21 = call double @llvm.fmuladd.f64(double %17, double %18, double %20)
%22 = load double, double* %4
%23 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %22, double %24)
%26 = load double, double* %4
%27 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%28 = load double, double* %27
%29 = call double @llvm.fmuladd.f64(double %25, double %26, double %28)
store double %29, double* @AstAlg_mean_obliquity.last_e0
%30 = load double, double* %3
store double %30, double* @AstAlg_mean_obliquity.last_jd
%31 = load double, double* @AstAlg_mean_obliquity.last_e0
store double %31, double* %2
br label %32
32: ; preds = %12, %10
%33 = load double, double* %2
ret double %33
}

LLVM IR (-O2):
@AstAlg_mean_obliquity.last_jd = internal unnamed_addr global double 0.000000e+00
@AstAlg_mean_obliquity.last_e0 = internal unnamed_addr global double 0.000000e+00
define double @AstAlg_mean_obliquity(double %0) {
%2 = load double, double* @AstAlg_mean_obliquity.last_jd
%3 = fcmp oeq double %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = load double, double* @AstAlg_mean_obliquity.last_e0
br label %12
6: ; preds = %1
%7 = fadd double %0, 0xC142B42C80000000
%8 = fdiv double %7, 3.652500e+04
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EA0E5FC8B89446A, double 0xBE85FF2DE97D7758)
%10 = tail call double @llvm.fmuladd.f64(double %9, double %8, double 0xBF8AA1EDB45C96F9)
%11 = tail call double @llvm.fmuladd.f64(double %10, double %8, double 0x4037707561DBA52F)
store double %11, double* @AstAlg_mean_obliquity.last_e0
store double %0, double* @AstAlg_mean_obliquity.last_jd
br label %12
12: ; preds = %6, %4
%13 = phi double [ %5, %4 ], [ %11, %6 ]
ret double %13
}