#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 modf(double, double *);
double astro_siderial_greenwich(double jd) {
  double F, Z;
  F = modf(jd, &Z);
  Z += 0.5;
  double T = (Z - 2451545.0) / 36525.0;
  double theta = 280.46061837 + (360.98564736629 * (jd - 2451545.0)) +
                 (0.000387933 * T * T) - (T * T * T / 38710000.0);
  theta /= 360.0;
  F = modf(theta, &Z);
  if (F < 0.0)
    F += 1.0;
  return F * 24.0;
}


x86 assembly (clang, -O0):
<astro_siderial_greenwich>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xf00(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xed9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xed5(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeb7(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe9b(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe97(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe7b(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movsd  0xe4a(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe28(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    -0x18(%rbp),%rdi
call   1030 <modf@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1214 <astro_siderial_greenwich+0x104>
movsd  0xe36(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe2c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astro_siderial_greenwich>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm1
addsd  0xecd(%rip),%xmm1
movsd  %xmm1,(%rsp)
movsd  0xec8(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  0xec4(%rip),%xmm1
movsd  0x8(%rsp),%xmm3
addsd  %xmm0,%xmm3
movsd  0xeca(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm3,%xmm1
mulsd  0xe9a(%rip),%xmm1
addsd  0xe9a(%rip),%xmm1
divsd  0xea2(%rip),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
divsd  0xe9a(%rip),%xmm0
mov    %rbx,%rdi
call   1030 <modf@plt>
movsd  0xe92(%rip),%xmm2
addsd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
mulsd  0xe75(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @astro_siderial_greenwich(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %2
%7 = load double, double* %2
%8 = call double @modf(double %7, double* %4)
store double %8, double* %3
%9 = load double, double* %4
%10 = fadd double %9, 5.000000e-01
store double %10, double* %4
%11 = load double, double* %4
%12 = fsub double %11, 0x4142B42C80000000
%13 = fdiv double %12, 3.652500e+04
store double %13, double* %5
%14 = load double, double* %2
%15 = fsub double %14, 0x4142B42C80000000
%16 = call double @llvm.fmuladd.f64(double 0x40768FC5362C39AA, double %15, double 0x4071875EB15E3164)
%17 = load double, double* %5
%18 = fmul double 3.879330e-04, %17
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %18, double %19, double %16)
%21 = load double, double* %5
%22 = load double, double* %5
%23 = fmul double %21, %22
%24 = load double, double* %5
%25 = fmul double %23, %24
%26 = fdiv double %25, 3.871000e+07
%27 = fsub double %20, %26
store double %27, double* %6
%28 = load double, double* %6
%29 = fdiv double %28, 3.600000e+02
store double %29, double* %6
%30 = load double, double* %6
%31 = call double @modf(double %30, double* %4)
store double %31, double* %3
%32 = load double, double* %3
%33 = fcmp olt double %32, 0.000000e+00
br i1 %33, label %34, label %37
34: ; preds = %1
%35 = load double, double* %3
%36 = fadd double %35, 1.000000e+00
store double %36, double* %3
br label %37
37: ; preds = %34, %1
%38 = load double, double* %3
%39 = fmul double %38, 2.400000e+01
ret double %39
}

LLVM IR (-O2):
define double @astro_siderial_greenwich(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call double @modf(double %0, double* %2)
%5 = load double, double* %2
%6 = fadd double %5, 5.000000e-01
store double %6, double* %2
%7 = fadd double %6, 0xC142B42C80000000
%8 = fdiv double %7, 3.652500e+04
%9 = fadd double %0, 0xC142B42C80000000
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x40768FC5362C39AA, double 0x4071875EB15E3164)
%11 = fmul double %8, 3.879330e-04
%12 = tail call double @llvm.fmuladd.f64(double %11, double %8, double %10)
%13 = fmul double %8, %8
%14 = fmul double %8, %13
%15 = fdiv double %14, 3.871000e+07
%16 = fsub double %12, %15
%17 = fdiv double %16, 3.600000e+02
%18 = call double @modf(double %17, double* %2)
%19 = fcmp olt double %18, 0.000000e+00
%20 = fadd double %18, 1.000000e+00
%21 = select i1 %19, double %20, double %18
%22 = fmul double %21, 2.400000e+01
ret double %22
}