#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 cos(double);
double floor(double);
double swe_deltat(double);
double swe_sidtime0(double tjd, double eps, double nut) {
  double jd0;
  double secs;
  double eqeq, jd, tu, tt, msday;
  double gmst;
  jd = tjd;
  jd0 = floor(jd);
  secs = tjd - jd0;
  if (secs < 0.5) {
    jd0 -= 0.5;
    secs += 0.5;
  } else {
    jd0 += 0.5;
    secs -= 0.5;
  }
  secs *= 86400.0;
  tu = (jd0 - 2451545.0) / 36525.0;
  if (1) {
    tt = (jd0 + swe_deltat(jd0) - 2451545.0) / 36525.0;
    gmst = (((-0.000000002454 * tt - 0.00000199708) * tt - 0.0000002926) * tt +
            0.092772110) *
               tt * tt +
           307.4771013 * (tt - tu) + 8640184.79447825 * tu + 24110.5493771;
    msday =
        1 +
        ((((-0.000000012270 * tt - 0.00000798832) * tt - 0.0000008778) * tt +
          0.185544220) *
             tt +
         8640184.79447825) /
            (86400. * 36525.);
  } else {
    gmst =
        ((-6.2e-6 * tu + 9.3104e-2) * tu + 8640184.812866) * tu + 24110.54841;
    msday = 1.0 + ((-1.86e-5 * tu + 0.186208) * tu + 8640184.812866) /
                      (86400. * 36525.);
  }
  eqeq = 240.0 * nut * cos(eps * 0.0174532925199433);
  gmst = gmst + msday * secs + eqeq;
  gmst = gmst - 86400.0 * floor(gmst / 86400.0);
  gmst /= 3600;
  return gmst;
}


x86 assembly (clang, -O0):
<swe_sidtime0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1050 <floor@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe89(%rip),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    11af <swe_sidtime0+0x7f>
movsd  -0x20(%rbp),%xmm0
movsd  0xe71(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe60(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
jmp    11d7 <swe_sidtime0+0xa7>
movsd  0xe49(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe32(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe39(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <swe_deltat@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xe6d(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe59(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0xe33(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe2f(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe0a(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xded(%rip),%xmm0
addsd  %xmm0,%xmm1
mulsd  -0x48(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm3
subsd  -0x40(%rbp),%xmm3
movsd  0xdc5(%rip),%xmm0
mulsd  %xmm3,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
movsd  0xd7c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd94(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x48(%rbp),%xmm1
movsd  0xd6e(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd6a(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd45(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd28(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd0b(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xcf7(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xce3(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xcca(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  0xcb0(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x68(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x58(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xc55(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <floor@plt>
movsd  -0x60(%rbp),%xmm1
movsd  0xc37(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  0xc15(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swe_sidtime0>:
sub    $0x48,%rsp
movsd  %xmm2,0x8(%rsp)
movsd  %xmm1,0x28(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1050 <floor@plt>
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0xea3(%rip),%xmm4
ucomisd %xmm1,%xmm4
movapd %xmm1,%xmm3
movapd %xmm1,%xmm5
cmpltsd %xmm4,%xmm3
movapd %xmm3,%xmm2
andpd  %xmm4,%xmm2
movsd  0xe8a(%rip),%xmm1
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
addsd  %xmm5,%xmm3
ja     1190 <swe_sidtime0+0x60>
movapd %xmm4,%xmm1
addsd  %xmm1,%xmm0
movapd %xmm0,0x30(%rsp)
mulsd  0xe6e(%rip),%xmm3
movapd %xmm3,0x10(%rsp)
call   1030 <swe_deltat@plt>
movapd 0x30(%rsp),%xmm1
addsd  %xmm1,%xmm0
unpcklpd %xmm1,%xmm0
addpd  0xedd(%rip),%xmm0
divpd  0xee5(%rip),%xmm0
movsd  0xe45(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe41(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe3d(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe39(%rip),%xmm1
movapd %xmm0,%xmm3
unpckhpd %xmm0,%xmm3
movapd %xmm0,%xmm2
subsd  %xmm3,%xmm2
mulsd  0xe29(%rip),%xmm2
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe1d(%rip),%xmm2
mulsd  %xmm2,%xmm3
addsd  %xmm1,%xmm3
addsd  0xe15(%rip),%xmm3
movsd  0xe15(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe11(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe0d(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xe09(%rip),%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
divsd  0xe01(%rip),%xmm0
addsd  0xe01(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  %xmm3,%xmm0
movapd %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xdeb(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
mulsd  0xddf(%rip),%xmm0
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
divsd  0xd48(%rip),%xmm0
call   1050 <floor@plt>
mulsd  0xdbb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
divsd  0xdb5(%rip),%xmm0
add    $0x48,%rsp
ret

LLVM IR (-O0):
define double @swe_sidtime0(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%15 = load double, double* %4
store double %15, double* %10
%16 = load double, double* %10
%17 = call double @llvm.floor.f64(double %16)
store double %17, double* %7
%18 = load double, double* %4
%19 = load double, double* %7
%20 = fsub double %18, %19
store double %20, double* %8
%21 = load double, double* %8
%22 = fcmp olt double %21, 5.000000e-01
br i1 %22, label %23, label %28
23: ; preds = %3
%24 = load double, double* %7
%25 = fsub double %24, 5.000000e-01
store double %25, double* %7
%26 = load double, double* %8
%27 = fadd double %26, 5.000000e-01
store double %27, double* %8
br label %33
28: ; preds = %3
%29 = load double, double* %7
%30 = fadd double %29, 5.000000e-01
store double %30, double* %7
%31 = load double, double* %8
%32 = fsub double %31, 5.000000e-01
store double %32, double* %8
br label %33
33: ; preds = %28, %23
%34 = load double, double* %8
%35 = fmul double %34, 8.640000e+04
store double %35, double* %8
%36 = load double, double* %7
%37 = fsub double %36, 0x4142B42C80000000
%38 = fdiv double %37, 3.652500e+04
store double %38, double* %11
%39 = load double, double* %7
%40 = load double, double* %7
%41 = call double @swe_deltat(double %40)
%42 = fadd double %39, %41
%43 = fsub double %42, 0x4142B42C80000000
%44 = fdiv double %43, 3.652500e+04
store double %44, double* %12
%45 = load double, double* %12
%46 = call double @llvm.fmuladd.f64(double -2.454000e-09, double %45, double -1.997080e-06)
%47 = load double, double* %12
%48 = call double @llvm.fmuladd.f64(double %46, double %47, double -2.926000e-07)
%49 = load double, double* %12
%50 = call double @llvm.fmuladd.f64(double %48, double %49, double 0x3FB7BFE9BA6E506B)
%51 = load double, double* %12
%52 = fmul double %50, %51
%53 = load double, double* %12
%54 = load double, double* %12
%55 = load double, double* %11
%56 = fsub double %54, %55
%57 = fmul double 0x407337A234F90611, %56
%58 = call double @llvm.fmuladd.f64(double %52, double %53, double %57)
%59 = load double, double* %11
%60 = call double @llvm.fmuladd.f64(double 0x41607AD7196C5DA7, double %59, double %58)
%61 = fadd double %60, 0x40D78BA328FE916B
store double %61, double* %14
%62 = load double, double* %12
%63 = call double @llvm.fmuladd.f64(double -1.227000e-08, double %62, double -7.988320e-06)
%64 = load double, double* %12
%65 = call double @llvm.fmuladd.f64(double %63, double %64, double 0xBEAD743E9D1CFC7D)
%66 = load double, double* %12
%67 = call double @llvm.fmuladd.f64(double %65, double %66, double 0x3FC7BFE9BA6E506B)
%68 = load double, double* %12
%69 = call double @llvm.fmuladd.f64(double %67, double %68, double 0x41607AD7196C5DA7)
%70 = fdiv double %69, 3.155760e+09
%71 = fadd double 1.000000e+00, %70
store double %71, double* %13
%72 = load double, double* %6
%73 = fmul double 2.400000e+02, %72
%74 = load double, double* %5
%75 = fmul double %74, 0x3F91DF46A2529D3A
%76 = call double @cos(double %75)
%77 = fmul double %73, %76
store double %77, double* %9
%78 = load double, double* %14
%79 = load double, double* %13
%80 = load double, double* %8
%81 = call double @llvm.fmuladd.f64(double %79, double %80, double %78)
%82 = load double, double* %9
%83 = fadd double %81, %82
store double %83, double* %14
%84 = load double, double* %14
%85 = load double, double* %14
%86 = fdiv double %85, 8.640000e+04
%87 = call double @llvm.floor.f64(double %86)
%88 = call double @llvm.fmuladd.f64(double -8.640000e+04, double %87, double %84)
store double %88, double* %14
%89 = load double, double* %14
%90 = fdiv double %89, 3.600000e+03
store double %90, double* %14
%91 = load double, double* %14
ret double %91
}

LLVM IR (-O2):
define double @swe_sidtime0(double %0, double %1, double %2) {
%4 = tail call double @llvm.floor.f64(double %0)
%5 = fsub double %0, %4
%6 = fcmp olt double %5, 5.000000e-01
%7 = select i1 %6, double 5.000000e-01, double -5.000000e-01
%8 = fadd double %5, %7
%9 = select i1 %6, double -5.000000e-01, double 5.000000e-01
%10 = fadd double %4, %9
%11 = fmul double %8, 8.640000e+04
%12 = tail call double @swe_deltat(double %10)
%13 = fadd double %10, %12
%14 = insertelement <2 x double> poison, double %13, i64 0
%15 = insertelement <2 x double> %14, double %10, i64 1
%16 = fadd <2 x double> %15, <double 0xC142B42C80000000, double 0xC142B42C80000000>
%17 = fdiv <2 x double> %16, <double 3.652500e+04, double 3.652500e+04>
%18 = extractelement <2 x double> %17, i64 0
%19 = tail call double @llvm.fmuladd.f64(double %18, double -2.454000e-09, double -1.997080e-06)
%20 = tail call double @llvm.fmuladd.f64(double %19, double %18, double -2.926000e-07)
%21 = tail call double @llvm.fmuladd.f64(double %20, double %18, double 0x3FB7BFE9BA6E506B)
%22 = fmul double %18, %21
%23 = extractelement <2 x double> %17, i64 1
%24 = fsub double %18, %23
%25 = fmul double %24, 0x407337A234F90611
%26 = tail call double @llvm.fmuladd.f64(double %22, double %18, double %25)
%27 = tail call double @llvm.fmuladd.f64(double %23, double 0x41607AD7196C5DA7, double %26)
%28 = fadd double %27, 0x40D78BA328FE916B
%29 = tail call double @llvm.fmuladd.f64(double %18, double -1.227000e-08, double -7.988320e-06)
%30 = tail call double @llvm.fmuladd.f64(double %29, double %18, double 0xBEAD743E9D1CFC7D)
%31 = tail call double @llvm.fmuladd.f64(double %30, double %18, double 0x3FC7BFE9BA6E506B)
%32 = tail call double @llvm.fmuladd.f64(double %31, double %18, double 0x41607AD7196C5DA7)
%33 = fdiv double %32, 3.155760e+09
%34 = fadd double %33, 1.000000e+00
%35 = fmul double %2, 2.400000e+02
%36 = fmul double %1, 0x3F91DF46A2529D3A
%37 = tail call double @cos(double %36)
%38 = fmul double %35, %37
%39 = tail call double @llvm.fmuladd.f64(double %34, double %11, double %28)
%40 = fadd double %38, %39
%41 = fdiv double %40, 8.640000e+04
%42 = tail call double @llvm.floor.f64(double %41)
%43 = tail call double @llvm.fmuladd.f64(double %42, double -8.640000e+04, double %40)
%44 = fdiv double %43, 3.600000e+03
ret double %44
}