#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 corrected_mean_ecliptic_obliquity(double);
double cos(double);
double degrees(double);
double earth_orbit_eccentricity(double);
double pow(double, double);
double sin(double);
double sun_geometric_mean_anomaly(double);
double sun_geometric_mean_longitude(double);
double tan(double);
double equation_of_time(double tm) {
  double l = sun_geometric_mean_longitude(tm);
  double e = earth_orbit_eccentricity(tm);
  double m = sun_geometric_mean_anomaly(tm);
  double y = pow(tan(corrected_mean_ecliptic_obliquity(tm) / 2.0), 2.0);
  double rc = y * sin(2.0 * l);
  rc += (4.0 * y * cos(2.0 * l) - 2.0) * e * sin(m);
  rc -= pow(0.5 * y, 2.0) * sin(4.0 * l);
  rc -= pow(1.25 * e, 2.0) * sin(2.0 * m);
  return 4.0 * degrees(rc);
}


x86 assembly (clang, -O0):
<equation_of_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1080 <sun_geometric_mean_longitude@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <earth_orbit_eccentricity@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sun_geometric_mean_anomaly@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <corrected_mean_ecliptic_obliquity@plt>
movsd  0xe2c(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1070 <tan@plt>
movsd  0xe1b(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xdff(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xdd4(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdca(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xdc4(%rip),%xmm1
addsd  %xmm1,%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x48(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd82(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xd65(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  0xd4b(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x40(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xd18(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xd03(%rip),%xmm1
call   10a0 <pow@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  0xcf1(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
call   10b0 <degrees@plt>
movaps %xmm0,%xmm1
movsd  0xc99(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<equation_of_time>:
sub    $0x38,%rsp
movsd  %xmm0,(%rsp)
call   1080 <sun_geometric_mean_longitude@plt>
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1030 <earth_orbit_eccentricity@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1040 <sun_geometric_mean_anomaly@plt>
movsd  %xmm0,0x28(%rsp)
movsd  (%rsp),%xmm0
call   1060 <corrected_mean_ecliptic_obliquity@plt>
mulsd  0xe3a(%rip),%xmm0
call   1070 <tan@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
call   1050 <sin@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0xe08(%rip),%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x18(%rsp),%xmm0
call   1090 <cos@plt>
mulsd  0x30(%rsp),%xmm0
addsd  0xdf1(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  0x28(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
mulsd  0xdab(%rip),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  0xda0(%rip),%xmm0
call   1050 <sin@plt>
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mulsd  0xd80(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1050 <sin@plt>
movsd  0x10(%rsp),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
call   10a0 <degrees@plt>
mulsd  0xd36(%rip),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @equation_of_time(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %2
%8 = load double, double* %2
%9 = call double @sun_geometric_mean_longitude(double %8)
store double %9, double* %3
%10 = load double, double* %2
%11 = call double @earth_orbit_eccentricity(double %10)
store double %11, double* %4
%12 = load double, double* %2
%13 = call double @sun_geometric_mean_anomaly(double %12)
store double %13, double* %5
%14 = load double, double* %2
%15 = call double @corrected_mean_ecliptic_obliquity(double %14)
%16 = fdiv double %15, 2.000000e+00
%17 = call double @tan(double %16)
%18 = call double @pow(double %17, double 2.000000e+00)
store double %18, double* %6
%19 = load double, double* %6
%20 = load double, double* %3
%21 = fmul double 2.000000e+00, %20
%22 = call double @sin(double %21)
%23 = fmul double %19, %22
store double %23, double* %7
%24 = load double, double* %6
%25 = fmul double 4.000000e+00, %24
%26 = load double, double* %3
%27 = fmul double 2.000000e+00, %26
%28 = call double @cos(double %27)
%29 = call double @llvm.fmuladd.f64(double %25, double %28, double -2.000000e+00)
%30 = load double, double* %4
%31 = fmul double %29, %30
%32 = load double, double* %5
%33 = call double @sin(double %32)
%34 = load double, double* %7
%35 = call double @llvm.fmuladd.f64(double %31, double %33, double %34)
store double %35, double* %7
%36 = load double, double* %6
%37 = fmul double 5.000000e-01, %36
%38 = call double @pow(double %37, double 2.000000e+00)
%39 = load double, double* %3
%40 = fmul double 4.000000e+00, %39
%41 = call double @sin(double %40)
%42 = load double, double* %7
%43 = fneg double %38
%44 = call double @llvm.fmuladd.f64(double %43, double %41, double %42)
store double %44, double* %7
%45 = load double, double* %4
%46 = fmul double 1.250000e+00, %45
%47 = call double @pow(double %46, double 2.000000e+00)
%48 = load double, double* %5
%49 = fmul double 2.000000e+00, %48
%50 = call double @sin(double %49)
%51 = load double, double* %7
%52 = fneg double %47
%53 = call double @llvm.fmuladd.f64(double %52, double %50, double %51)
store double %53, double* %7
%54 = load double, double* %7
%55 = call double @degrees(double %54)
%56 = fmul double 4.000000e+00, %55
ret double %56
}

LLVM IR (-O2):
define double @equation_of_time(double %0) {
%2 = tail call double @sun_geometric_mean_longitude(double %0)
%3 = tail call double @earth_orbit_eccentricity(double %0)
%4 = tail call double @sun_geometric_mean_anomaly(double %0)
%5 = tail call double @corrected_mean_ecliptic_obliquity(double %0)
%6 = fmul double %5, 5.000000e-01
%7 = tail call double @tan(double %6)
%8 = fmul double %7, %7
%9 = fmul double %2, 2.000000e+00
%10 = tail call double @sin(double %9)
%11 = fmul double %8, %10
%12 = fmul double %8, 4.000000e+00
%13 = tail call double @cos(double %9)
%14 = tail call double @llvm.fmuladd.f64(double %12, double %13, double -2.000000e+00)
%15 = fmul double %3, %14
%16 = tail call double @sin(double %4)
%17 = tail call double @llvm.fmuladd.f64(double %15, double %16, double %11)
%18 = fmul double %8, 5.000000e-01
%19 = fmul double %2, 4.000000e+00
%20 = tail call double @sin(double %19)
%21 = fneg double %18
%22 = fmul double %18, %21
%23 = tail call double @llvm.fmuladd.f64(double %22, double %20, double %17)
%24 = fmul double %3, 1.250000e+00
%25 = fmul double %4, 2.000000e+00
%26 = tail call double @sin(double %25)
%27 = fneg double %24
%28 = fmul double %24, %27
%29 = tail call double @llvm.fmuladd.f64(double %28, double %26, double %23)
%30 = tail call double @degrees(double %29)
%31 = fmul double %30, 4.000000e+00
ret double %31
}