#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(double, double);
void gmst(double julsec, double *th, double *thp) {
  double a0 = 67310.54841;
  double a1 = 3164400184.812866;
  double a2 = 0.093104;
  double a3 = -6.2e-6;
  double rpd = 0.01745329251994329444;
  double sigma;
  double t;
  double twopi = 6.283185307179586;
  t = (julsec / 86400.0) / 36525.0;
  sigma = a0 + a1 * t + a2 * t * t + a3 * t * t * t;
  sigma = sigma / 240.0;
  sigma = sigma * rpd;
  *th = fmod(sigma, twopi);
  sigma = a1 + 2. * a2 * t + 3. * a3 * t * t;
  sigma = sigma / 240.0;
  sigma = sigma / (36525. * 86400.);
  *thp = sigma * rpd;
  return;
}


x86 assembly (clang, -O0):
<gmst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  0xf2b(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xf16(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xf01(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xed7(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xea8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe94(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x38(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xe17(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
call   1030 <fmod@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movsd  0xdeb(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xdc9(%rip),%xmm0
mulsd  -0x38(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xd98(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  0xd7a(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gmst>:
push   %r14
push   %rbx
push   %rax
movapd %xmm0,%xmm2
divsd  0xee0(%rip),%xmm2
mov    %rsi,%r14
mov    %rdi,%rbx
divsd  0xeda(%rip),%xmm2
movsd  %xmm2,(%rsp)
movapd %xmm2,%xmm0
mulsd  0xed1(%rip),%xmm0
addsd  0xed1(%rip),%xmm0
movsd  0xed1(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xec5(%rip),%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  0xeb5(%rip),%xmm0
mulsd  0xeb5(%rip),%xmm0
movsd  0xeb5(%rip),%xmm1
call   1030 <fmod@plt>
movsd  %xmm0,(%rbx)
movsd  0xeac(%rip),%xmm0
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm0
addsd  0xe63(%rip),%xmm0
movsd  0xe9b(%rip),%xmm1
mulsd  %xmm2,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
divsd  0xe67(%rip),%xmm1
divsd  0xe87(%rip),%xmm1
mulsd  0xe5f(%rip),%xmm1
movsd  %xmm1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @gmst(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
store double 0x40F06EE8C649906D, double* %7
store double 0x41E7939D471A0300, double* %8
store double 9.310400e-02, double* %9
store double -6.200000e-06, double* %10
store double 0x3F91DF46A2529D39, double* %11
store double 0x401921FB54442D18, double* %14
%15 = load double, double* %4
%16 = fdiv double %15, 8.640000e+04
%17 = fdiv double %16, 3.652500e+04
store double %17, double* %13
%18 = load double, double* %7
%19 = load double, double* %8
%20 = load double, double* %13
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double %18)
%22 = load double, double* %9
%23 = load double, double* %13
%24 = fmul double %22, %23
%25 = load double, double* %13
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double %21)
%27 = load double, double* %10
%28 = load double, double* %13
%29 = fmul double %27, %28
%30 = load double, double* %13
%31 = fmul double %29, %30
%32 = load double, double* %13
%33 = call double @llvm.fmuladd.f64(double %31, double %32, double %26)
store double %33, double* %12
%34 = load double, double* %12
%35 = fdiv double %34, 2.400000e+02
store double %35, double* %12
%36 = load double, double* %12
%37 = load double, double* %11
%38 = fmul double %36, %37
store double %38, double* %12
%39 = load double, double* %12
%40 = load double, double* %14
%41 = call double @fmod(double %39, double %40)
%42 = load double*, double** %5
store double %41, double* %42
%43 = load double, double* %8
%44 = load double, double* %9
%45 = fmul double 2.000000e+00, %44
%46 = load double, double* %13
%47 = call double @llvm.fmuladd.f64(double %45, double %46, double %43)
%48 = load double, double* %10
%49 = fmul double 3.000000e+00, %48
%50 = load double, double* %13
%51 = fmul double %49, %50
%52 = load double, double* %13
%53 = call double @llvm.fmuladd.f64(double %51, double %52, double %47)
store double %53, double* %12
%54 = load double, double* %12
%55 = fdiv double %54, 2.400000e+02
store double %55, double* %12
%56 = load double, double* %12
%57 = fdiv double %56, 3.155760e+09
store double %57, double* %12
%58 = load double, double* %12
%59 = load double, double* %11
%60 = fmul double %58, %59
%61 = load double*, double** %6
store double %60, double* %61
ret void
}

LLVM IR (-O2):
define void @gmst(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2) {
%4 = fdiv double %0, 8.640000e+04
%5 = fdiv double %4, 3.652500e+04
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x41E7939D471A0300, double 0x40F06EE8C649906D)
%7 = fmul double %5, 9.310400e-02
%8 = tail call double @llvm.fmuladd.f64(double %7, double %5, double %6)
%9 = fmul double %5, -6.200000e-06
%10 = fmul double %5, %9
%11 = tail call double @llvm.fmuladd.f64(double %10, double %5, double %8)
%12 = fdiv double %11, 2.400000e+02
%13 = fmul double %12, 0x3F91DF46A2529D39
%14 = tail call double @fmod(double %13, double 0x401921FB54442D18)
store double %14, double* %1
%15 = tail call double @llvm.fmuladd.f64(double %5, double 1.862080e-01, double 0x41E7939D471A0300)
%16 = fmul double %5, 0xBEF380E6446D175A
%17 = tail call double @llvm.fmuladd.f64(double %16, double %5, double %15)
%18 = fdiv double %17, 2.400000e+02
%19 = fdiv double %18, 3.155760e+09
%20 = fmul double %19, 0x3F91DF46A2529D39
store double %20, double* %2
ret void
}