#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(scalar_t__);
int /*<<< orphan*/ getNutationAngles(double, double *, double *);
scalar_t__ getPrecessionAngleVondrakEpsilon(double);
double get_mean_sidereal_time(double, double);
double get_apparent_sidereal_time(double JD, double JDE) {
  double meanSidereal = get_mean_sidereal_time(JD, JDE);
  double deltaPsi, deltaEps;
  getNutationAngles(JDE, &deltaPsi, &deltaEps);
  return meanSidereal +
         (deltaPsi * cos(getPrecessionAngleVondrakEpsilon(JDE) + deltaEps)) *
             180. / 3.14159265358979323846;
}


x86 assembly (clang, -O0):
<get_apparent_sidereal_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <get_mean_sidereal_time@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <getNutationAngles@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <getPrecessionAngleVondrakEpsilon@plt>
cvtsi2sd %rax,%xmm0
addsd  -0x28(%rbp),%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <cos@plt>
movsd  -0x38(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe45(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe31(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_apparent_sidereal_time>:
sub    $0x28,%rsp
movsd  %xmm1,(%rsp)
call   1030 <get_mean_sidereal_time@plt>
movsd  %xmm0,0x10(%rsp)
lea    0x20(%rsp),%rdi
lea    0x18(%rsp),%rsi
movsd  (%rsp),%xmm0
call   1050 <getNutationAngles@plt>
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1060 <getPrecessionAngleVondrakEpsilon@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
addsd  0x18(%rsp),%xmm0
cvttsd2si %xmm0,%rdi
call   1040 <cos@plt>
mulsd  0x8(%rsp),%xmm0
mulsd  0xe5c(%rip),%xmm0
divsd  0xe5c(%rip),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @get_apparent_sidereal_time(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call double @get_mean_sidereal_time(double %8, double %9)
store double %10, double* %5
%11 = load double, double* %4
%12 = call i32 @getNutationAngles(double %11, double* %6, double* %7)
%13 = load double, double* %5
%14 = load double, double* %6
%15 = load double, double* %4
%16 = call i64 @getPrecessionAngleVondrakEpsilon(double %15)
%17 = sitofp i64 %16 to double
%18 = load double, double* %7
%19 = fadd double %17, %18
%20 = fptosi double %19 to i64
%21 = call double @cos(i64 %20)
%22 = fmul double %14, %21
%23 = fmul double %22, 1.800000e+02
%24 = fdiv double %23, 0x400921FB54442D18
%25 = fadd double %13, %24
ret double %25
}

LLVM IR (-O2):
define double @get_apparent_sidereal_time(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = tail call double @get_mean_sidereal_time(double %0, double %1)
%6 = bitcast double* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = call i32 @getNutationAngles(double %1, double* %3, double* %4)
%9 = load double, double* %3
%10 = call i64 @getPrecessionAngleVondrakEpsilon(double %1)
%11 = sitofp i64 %10 to double
%12 = load double, double* %4
%13 = fadd double %12, %11
%14 = fptosi double %13 to i64
%15 = call double @cos(i64 %14)
%16 = fmul double %9, %15
%17 = fmul double %16, 1.800000e+02
%18 = fdiv double %17, 0x400921FB54442D18
%19 = fadd double %5, %18
ret double %19
}