#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 local_sidereal_time(double tday, long int timezone, double longitude) {
  double s;
  s = 24110.5 + 8640184.812999999 * tday / 36525.;
  s += 86636.6 * (double)timezone / (3600. * 24.) + 86400. * longitude / 360.;
  s = s / 86400.;
  s = s - floor(s);
  return (s * 360. * (3.14159265 / 180.));
}


x86 assembly (clang, -O0):
<local_sidereal_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  0xf02(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xeed(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xed9(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm1
movsd  0xeba(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xea6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  -0x18(%rbp),%xmm1
movsd  0xe85(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe6e(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <floor@plt>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe30(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe1b(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<local_sidereal_time>:
sub    $0x18,%rsp
cvtsi2sd %rdi,%xmm2
unpcklpd %xmm2,%xmm0
mulpd  0xedb(%rip),%xmm0
divpd  0xee3(%rip),%xmm0
movsd  0xefb(%rip),%xmm3
mulsd  %xmm3,%xmm1
divsd  0xef7(%rip),%xmm1
movapd 0xed7(%rip),%xmm2
unpcklpd %xmm1,%xmm2
addpd  %xmm2,%xmm0
movapd %xmm0,%xmm1
unpckhpd %xmm0,%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm3,%xmm0
movapd %xmm0,(%rsp)
call   1030 <floor@plt>
movapd (%rsp),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xebc(%rip),%xmm1
mulsd  0xebc(%rip),%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @local_sidereal_time(double %0, i64 %1, double %2) {
%4 = alloca double
%5 = alloca i64
%6 = alloca double
%7 = alloca double
store double %0, double* %4
store i64 %1, i64* %5
store double %2, double* %6
%8 = load double, double* %4
%9 = fmul double 0x41607AD71A041893, %8
%10 = fdiv double %9, 3.652500e+04
%11 = fadd double 2.411050e+04, %10
store double %11, double* %7
%12 = load i64, i64* %5
%13 = sitofp i64 %12 to double
%14 = fmul double 8.663660e+04, %13
%15 = fdiv double %14, 8.640000e+04
%16 = load double, double* %6
%17 = fmul double 8.640000e+04, %16
%18 = fdiv double %17, 3.600000e+02
%19 = fadd double %15, %18
%20 = load double, double* %7
%21 = fadd double %20, %19
store double %21, double* %7
%22 = load double, double* %7
%23 = fdiv double %22, 8.640000e+04
store double %23, double* %7
%24 = load double, double* %7
%25 = load double, double* %7
%26 = call double @llvm.floor.f64(double %25)
%27 = fsub double %24, %26
store double %27, double* %7
%28 = load double, double* %7
%29 = fmul double %28, 3.600000e+02
%30 = fmul double %29, 0x3F91DF46A1FAE712
ret double %30
}

LLVM IR (-O2):
define double @local_sidereal_time(double %0, i64 %1, double %2) {
%4 = sitofp i64 %1 to double
%5 = insertelement <2 x double> poison, double %0, i64 0
%6 = insertelement <2 x double> %5, double %4, i64 1
%7 = fmul <2 x double> %6, <double 0x41607AD71A041893, double 8.663660e+04>
%8 = fdiv <2 x double> %7, <double 3.652500e+04, double 8.640000e+04>
%9 = fmul double %2, 8.640000e+04
%10 = fdiv double %9, 3.600000e+02
%11 = insertelement <2 x double> <double 2.411050e+04, double poison>, double %10, i64 1
%12 = fadd <2 x double> %8, %11
%13 = shufflevector <2 x double> %12, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%14 = fadd <2 x double> %12, %13
%15 = extractelement <2 x double> %14, i64 0
%16 = fdiv double %15, 8.640000e+04
%17 = tail call double @llvm.floor.f64(double %16)
%18 = fsub double %16, %17
%19 = fmul double %18, 3.600000e+02
%20 = fmul double %19, 0x3F91DF46A1FAE712
ret double %20
}