#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(int);
double gast(double ut, double time, double tl) {
  double am, p, gast;
  am = 18.69735 + 2400.05130 * (time - tl / 3.15576E9);
  p = 0.00029 * cos((1934 * time + 145) * 0.0174532925199433);
  gast = 3.141592653589793 + ut + (am + p) * 3.141592653589793 / 12.0;
  return (gast);
}


x86 assembly (clang, -O0):
<gast>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xf07(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  0xee7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xee3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeb5(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb1(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <cos@plt>
movaps %xmm0,%xmm1
movsd  0xe75(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe5c(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
addsd  -0x28(%rbp),%xmm1
movsd  0xe45(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe31(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gast>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
divsd  0xede(%rip),%xmm2
addsd  %xmm1,%xmm2
mulsd  0xeda(%rip),%xmm2
addsd  0xeda(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
mulsd  0xed4(%rip),%xmm1
addsd  0xed4(%rip),%xmm1
mulsd  0xed4(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1030 <cos@plt>
mulsd  0xecb(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  0xec5(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
addsd  %xmm1,%xmm2
mulsd  %xmm1,%xmm0
divsd  0xeb7(%rip),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @gast(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = load double, double* %5
%11 = load double, double* %6
%12 = fdiv double %11, 3.155760e+09
%13 = fsub double %10, %12
%14 = call double @llvm.fmuladd.f64(double 0x40A2C01A43FE5C92, double %13, double 0x4032B2858793DD98)
store double %14, double* %7
%15 = load double, double* %5
%16 = call double @llvm.fmuladd.f64(double 1.934000e+03, double %15, double 1.450000e+02)
%17 = fmul double %16, 0x3F91DF46A2529D3A
%18 = fptosi double %17 to i32
%19 = call double @cos(i32 %18)
%20 = fmul double 2.900000e-04, %19
store double %20, double* %8
%21 = load double, double* %4
%22 = fadd double 0x400921FB54442D18, %21
%23 = load double, double* %7
%24 = load double, double* %8
%25 = fadd double %23, %24
%26 = fmul double %25, 0x400921FB54442D18
%27 = fdiv double %26, 1.200000e+01
%28 = fadd double %22, %27
store double %28, double* %9
%29 = load double, double* %9
ret double %29
}

LLVM IR (-O2):
define double @gast(double %0, double %1, double %2) {
%4 = fdiv double %2, 3.155760e+09
%5 = fsub double %1, %4
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x40A2C01A43FE5C92, double 0x4032B2858793DD98)
%7 = tail call double @llvm.fmuladd.f64(double %1, double 1.934000e+03, double 1.450000e+02)
%8 = fmul double %7, 0x3F91DF46A2529D3A
%9 = fptosi double %8 to i32
%10 = tail call double @cos(i32 %9)
%11 = fmul double %10, 2.900000e-04
%12 = fadd double %0, 0x400921FB54442D18
%13 = fadd double %6, %11
%14 = fmul double %13, 0x400921FB54442D18
%15 = fdiv double %14, 1.200000e+01
%16 = fadd double %12, %15
ret double %16
}