double sidereal(double jul) {
  double gmst, rem_jul;
  rem_jul = jul;
  jul = floor(jul) + 0.5;
  rem_jul -= jul;
  jul = (jul - 2451545.0) / 36525.0;
  gmst = (24110.54841 + 8640184.812866 * jul + 0.093104 * (jul) * (jul) +
          -6.2e-6 * (jul) * (jul) * (jul)) /
         86400.0;
  gmst += 1.00273790934 * rem_jul;
  gmst -= floor(gmst);
  gmst *= 24;
  return (gmst);
}


x86 assembly (clang, -O0):
<sidereal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  0xf0f(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeca(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea4(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe84(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe62(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe3b(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xe18(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xde0(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sidereal>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
addsd  0xedd(%rip),%xmm0
movsd  (%rsp),%xmm3
subsd  %xmm0,%xmm3
addsd  0xed4(%rip),%xmm0
divsd  0xed4(%rip),%xmm0
movsd  0xed4(%rip),%xmm2
mulsd  %xmm0,%xmm2
addsd  0xed0(%rip),%xmm2
movsd  0xed0(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  0xec4(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  0xeb4(%rip),%xmm0
movapd %xmm3,%xmm1
mulsd  0xeb0(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
call   1030 <floor@plt>
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xe99(%rip),%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sidereal(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
store double %5, double* %4
%6 = load double, double* %2
%7 = call double @llvm.floor.f64(double %6)
%8 = fadd double %7, 5.000000e-01
store double %8, double* %2
%9 = load double, double* %2
%10 = load double, double* %4
%11 = fsub double %10, %9
store double %11, double* %4
%12 = load double, double* %2
%13 = fsub double %12, 0x4142B42C80000000
%14 = fdiv double %13, 3.652500e+04
store double %14, double* %2
%15 = load double, double* %2
%16 = call double @llvm.fmuladd.f64(double 0x41607AD71A02FF8F, double %15, double 0x40D78BA3192641B3)
%17 = load double, double* %2
%18 = fmul double 9.310400e-02, %17
%19 = load double, double* %2
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %16)
%21 = load double, double* %2
%22 = fmul double -6.200000e-06, %21
%23 = load double, double* %2
%24 = fmul double %22, %23
%25 = load double, double* %2
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double %20)
%27 = fdiv double %26, 8.640000e+04
store double %27, double* %3
%28 = load double, double* %4
%29 = load double, double* %3
%30 = call double @llvm.fmuladd.f64(double 0x3FF00B36E7F13206, double %28, double %29)
store double %30, double* %3
%31 = load double, double* %3
%32 = call double @llvm.floor.f64(double %31)
%33 = load double, double* %3
%34 = fsub double %33, %32
store double %34, double* %3
%35 = load double, double* %3
%36 = fmul double %35, 2.400000e+01
store double %36, double* %3
%37 = load double, double* %3
ret double %37
}

LLVM IR (-O2):
define double @sidereal(double %0) {
%2 = tail call double @llvm.floor.f64(double %0)
%3 = fadd double %2, 5.000000e-01
%4 = fsub double %0, %3
%5 = fadd double %3, 0xC142B42C80000000
%6 = fdiv double %5, 3.652500e+04
%7 = tail call double @llvm.fmuladd.f64(double %6, double 0x41607AD71A02FF8F, double 0x40D78BA3192641B3)
%8 = fmul double %6, 9.310400e-02
%9 = tail call double @llvm.fmuladd.f64(double %8, double %6, double %7)
%10 = fmul double %6, -6.200000e-06
%11 = fmul double %6, %10
%12 = tail call double @llvm.fmuladd.f64(double %11, double %6, double %9)
%13 = fdiv double %12, 8.640000e+04
%14 = tail call double @llvm.fmuladd.f64(double %4, double 0x3FF00B36E7F13206, double %13)
%15 = tail call double @llvm.floor.f64(double %14)
%16 = fsub double %14, %15
%17 = fmul double %16, 2.400000e+01
ret double %17
}