#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double floor(double);
double range_degrees(double);
double get_mean_sidereal_time(double JD, double JDE) {
  double sidereal, UT1, t, tu;
  UT1 = (JD - floor(JD) + 0.5) * 86400.;
  t = (JDE - 2451545.) / 36525.;
  tu = (JD - 2451545.) / 36525.;
  sidereal = (((-0.000000002454 * t - 0.00000199708) * t - 0.0000002926) * t +
              0.092772110) *
             t * t;
  sidereal += (t - tu) * 307.4771013;
  sidereal += 8640184.79447825 * tu + 24110.5493771;
  sidereal += UT1;
  sidereal *= 1. / 240.;
  sidereal = range_degrees(sidereal);
  return sidereal;
}


x86 assembly (clang, -O0):
<get_mean_sidereal_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xefe(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xecc(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe70(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe6c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe47(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe2a(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xdf8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xdce(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xdca(%rip),%xmm1
addsd  %xmm1,%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xd95(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <range_degrees@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mean_sidereal_time>:
sub    $0x28,%rsp
movaps %xmm1,0x10(%rsp)
movapd %xmm0,(%rsp)
call   1040 <floor@plt>
movapd (%rsp),%xmm3
movapd 0x10(%rsp),%xmm4
unpcklpd %xmm3,%xmm4
subsd  %xmm0,%xmm3
addsd  0xeb2(%rip),%xmm3
mulsd  0xeb2(%rip),%xmm3
addpd  0xee2(%rip),%xmm4
divpd  0xeea(%rip),%xmm4
movsd  0xea2(%rip),%xmm0
mulsd  %xmm4,%xmm0
addsd  0xe9e(%rip),%xmm0
mulsd  %xmm4,%xmm0
addsd  0xe9a(%rip),%xmm0
mulsd  %xmm4,%xmm0
addsd  0xe96(%rip),%xmm0
mulsd  %xmm4,%xmm0
mulsd  %xmm4,%xmm0
movapd %xmm4,%xmm1
unpckhpd %xmm4,%xmm1
movapd %xmm4,%xmm2
subsd  %xmm1,%xmm2
shufpd $0x1,%xmm2,%xmm4
movapd 0xea9(%rip),%xmm1
unpcklpd %xmm0,%xmm1
mulpd  0xead(%rip),%xmm4
addpd  %xmm1,%xmm4
movapd %xmm4,%xmm0
unpckhpd %xmm4,%xmm0
addsd  %xmm4,%xmm0
addsd  %xmm3,%xmm0
mulsd  0xe51(%rip),%xmm0
add    $0x28,%rsp
jmp    1030 <range_degrees@plt>

LLVM IR (-O0):
define double @get_mean_sidereal_time(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %3
store double %1, double* %4
%9 = load double, double* %3
%10 = load double, double* %3
%11 = call double @llvm.floor.f64(double %10)
%12 = fsub double %9, %11
%13 = fadd double %12, 5.000000e-01
%14 = fmul double %13, 8.640000e+04
store double %14, double* %6
%15 = load double, double* %4
%16 = fsub double %15, 0x4142B42C80000000
%17 = fdiv double %16, 3.652500e+04
store double %17, double* %7
%18 = load double, double* %3
%19 = fsub double %18, 0x4142B42C80000000
%20 = fdiv double %19, 3.652500e+04
store double %20, double* %8
%21 = load double, double* %7
%22 = call double @llvm.fmuladd.f64(double -2.454000e-09, double %21, double -1.997080e-06)
%23 = load double, double* %7
%24 = call double @llvm.fmuladd.f64(double %22, double %23, double -2.926000e-07)
%25 = load double, double* %7
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double 0x3FB7BFE9BA6E506B)
%27 = load double, double* %7
%28 = fmul double %26, %27
%29 = load double, double* %7
%30 = fmul double %28, %29
store double %30, double* %5
%31 = load double, double* %7
%32 = load double, double* %8
%33 = fsub double %31, %32
%34 = load double, double* %5
%35 = call double @llvm.fmuladd.f64(double %33, double 0x407337A234F90611, double %34)
store double %35, double* %5
%36 = load double, double* %8
%37 = call double @llvm.fmuladd.f64(double 0x41607AD7196C5DA7, double %36, double 0x40D78BA328FE916B)
%38 = load double, double* %5
%39 = fadd double %38, %37
store double %39, double* %5
%40 = load double, double* %6
%41 = load double, double* %5
%42 = fadd double %41, %40
store double %42, double* %5
%43 = load double, double* %5
%44 = fmul double %43, 0x3F71111111111111
store double %44, double* %5
%45 = load double, double* %5
%46 = call double @range_degrees(double %45)
store double %46, double* %5
%47 = load double, double* %5
ret double %47
}

LLVM IR (-O2):
define double @get_mean_sidereal_time(double %0, double %1) {
%3 = tail call double @llvm.floor.f64(double %0)
%4 = fsub double %0, %3
%5 = fadd double %4, 5.000000e-01
%6 = fmul double %5, 8.640000e+04
%7 = insertelement <2 x double> poison, double %1, i64 0
%8 = insertelement <2 x double> %7, double %0, i64 1
%9 = fadd <2 x double> %8, <double 0xC142B42C80000000, double 0xC142B42C80000000>
%10 = fdiv <2 x double> %9, <double 3.652500e+04, double 3.652500e+04>
%11 = extractelement <2 x double> %10, i64 0
%12 = tail call double @llvm.fmuladd.f64(double %11, double -2.454000e-09, double -1.997080e-06)
%13 = tail call double @llvm.fmuladd.f64(double %12, double %11, double -2.926000e-07)
%14 = tail call double @llvm.fmuladd.f64(double %13, double %11, double 0x3FB7BFE9BA6E506B)
%15 = fmul double %11, %14
%16 = fmul double %11, %15
%17 = extractelement <2 x double> %10, i64 1
%18 = fsub double %11, %17
%19 = insertelement <2 x double> poison, double %17, i64 0
%20 = insertelement <2 x double> %19, double %18, i64 1
%21 = insertelement <2 x double> <double 0x40D78BA328FE916B, double poison>, double %16, i64 1
%22 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %20, <2 x double> <double 0x41607AD7196C5DA7, double 0x407337A234F90611>, <2 x double> %21)
%23 = shufflevector <2 x double> %22, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%24 = fadd <2 x double> %22, %23
%25 = extractelement <2 x double> %24, i64 0
%26 = fadd double %6, %25
%27 = fmul double %26, 0x3F71111111111111
%28 = tail call double @range_degrees(double %27)
ret double %28
}