#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 fmod(int, double);
double revolution(double);
double GMST0(double d) {
  double sidtim0;
  sidtim0 = revolution((180.0 + 356.0470 + 282.9404) +
                       (0.9856002585 + 4.70935E-5) * d);
  sidtim0 = fmod(
      (180.0 + 356.0470 + 282.9404) + (0.9856002585 + 4.70935E-5) * d, 360.0);
  sidtim0 = fmod(
      (180 + 357.52911 + 282.9404) + (0.985600281725 + 4.70935E-5) * d, 360.0);
  return sidtim0;
}


x86 assembly (clang, -O0):
<GMST0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xede(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeda(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1040 <revolution@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb3(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe83(%rip),%xmm0
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xe74(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe70(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe50(%rip),%xmm0
call   1030 <fmod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GMST0>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  0xece(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xeca(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movapd %xmm1,%xmm0
call   1040 <revolution@plt>
cvttsd2si 0x8(%rsp),%edi
movsd  0xeb5(%rip),%xmm0
call   1030 <fmod@plt>
movsd  0x10(%rsp),%xmm0
mulsd  0xeaa(%rip),%xmm0
addsd  0xeaa(%rip),%xmm0
cvttsd2si %xmm0,%edi
movsd  0xe8e(%rip),%xmm0
add    $0x18,%rsp
jmp    1030 <fmod@plt>

LLVM IR (-O0):
define double @GMST0(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call double @llvm.fmuladd.f64(double 0x3FEF8A6C50C753F8, double %4, double 0x408997E631F8A090)
%6 = call double @revolution(double %5)
store double %6, double* %3
%7 = load double, double* %2
%8 = call double @llvm.fmuladd.f64(double 0x3FEF8A6C50C753F8, double %7, double 0x408997E631F8A090)
%9 = fptosi double %8 to i32
%10 = call double @fmod(i32 %9, double 3.600000e+02)
store double %10, double* %3
%11 = load double, double* %2
%12 = call double @llvm.fmuladd.f64(double 0x3FEF8A6C5D3F5903, double %11, double 0x4089A3C18E757928)
%13 = fptosi double %12 to i32
%14 = call double @fmod(i32 %13, double 3.600000e+02)
store double %14, double* %3
%15 = load double, double* %3
ret double %15
}

LLVM IR (-O2):
define double @GMST0(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FEF8A6C50C753F8, double 0x408997E631F8A090)
%3 = tail call double @revolution(double %2)
%4 = fptosi double %2 to i32
%5 = tail call double @fmod(i32 %4, double 3.600000e+02)
%6 = tail call double @llvm.fmuladd.f64(double %0, double 0x3FEF8A6C5D3F5903, double 0x4089A3C18E757928)
%7 = fptosi double %6 to i32
%8 = tail call double @fmod(i32 %7, double 3.600000e+02)
ret double %8
}