#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 calcEccentricityEarthOrbit(double);
double calcGeomMeanAnomalySun(double);
double calcGeomMeanLongSun(double);
double calcObliquityCorrection(double);
double cos(double);
double degToRad(double);
double radToDeg(double);
double sin(double);
double tan(double);
double calcEquationOfTime(double t) {
  double epsilon = calcObliquityCorrection(t);
  double l0 = calcGeomMeanLongSun(t);
  double e = calcEccentricityEarthOrbit(t);
  double m = calcGeomMeanAnomalySun(t);
  double y = tan(degToRad(epsilon) / 2.0);
  y *= y;
  double sin2l0 = sin(2.0 * degToRad(l0));
  double sinm = sin(degToRad(m));
  double cos2l0 = cos(2.0 * degToRad(l0));
  double sin4l0 = sin(4.0 * degToRad(l0));
  double sin2m = sin(2.0 * degToRad(m));
  double Etime = y * sin2l0 - 2.0 * e * sinm + 4.0 * e * y * sinm * cos2l0 -
                 0.5 * y * y * sin4l0 - 1.25 * e * e * sin2m;
  return radToDeg(Etime) * 4.0;
}


x86 assembly (clang, -O0):
<calcEquationOfTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <calcObliquityCorrection@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <calcGeomMeanLongSun@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1080 <calcEccentricityEarthOrbit@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <calcGeomMeanAnomalySun@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   10b0 <degToRad@plt>
movsd  0xe2d(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1090 <tan@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   10b0 <degToRad@plt>
movaps %xmm0,%xmm1
movsd  0xdfb(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   10b0 <degToRad@plt>
call   1060 <sin@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   10b0 <degToRad@plt>
movaps %xmm0,%xmm1
movsd  0xdc4(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   10a0 <cos@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x18(%rbp),%xmm0
call   10b0 <degToRad@plt>
movaps %xmm0,%xmm1
movsd  0xd89(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
call   10b0 <degToRad@plt>
movaps %xmm0,%xmm1
movsd  0xd7e(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
movsd  0xd5e(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd15(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xd01(%rip),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
movsd  -0x50(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xcc3(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
call   1040 <radToDeg@plt>
movsd  0xc76(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcEquationOfTime>:
sub    $0x38,%rsp
movsd  %xmm0,(%rsp)
call   1030 <calcObliquityCorrection@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1070 <calcGeomMeanLongSun@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1080 <calcEccentricityEarthOrbit@plt>
movsd  %xmm0,0x30(%rsp)
movsd  (%rsp),%xmm0
call   1050 <calcGeomMeanAnomalySun@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   10b0 <degToRad@plt>
mulsd  0xe1a(%rip),%xmm0
call   1090 <tan@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   10b0 <degToRad@plt>
addsd  %xmm0,%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x28(%rsp)
movsd  (%rsp),%xmm0
call   10b0 <degToRad@plt>
call   1060 <sin@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x8(%rsp),%xmm0
call   10b0 <degToRad@plt>
addsd  %xmm0,%xmm0
call   10a0 <cos@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x8(%rsp),%xmm0
call   10b0 <degToRad@plt>
mulsd  0xdb7(%rip),%xmm0
call   1060 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   10b0 <degToRad@plt>
addsd  %xmm0,%xmm0
call   1060 <sin@plt>
movsd  0xd99(%rip),%xmm1
movsd  0x30(%rsp),%xmm2
mulsd  %xmm2,%xmm1
movsd  0x18(%rsp),%xmm6
mulsd  %xmm6,%xmm1
movsd  0x10(%rsp),%xmm4
movsd  0x28(%rsp),%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm1,%xmm3
movapd %xmm3,%xmm5
movapd %xmm2,%xmm1
movapd %xmm2,%xmm3
mulsd  0xd55(%rip),%xmm1
mulsd  %xmm4,%xmm1
mulsd  %xmm6,%xmm1
mulsd  0x20(%rsp),%xmm1
addsd  %xmm5,%xmm1
movsd  0xd4b(%rip),%xmm2
mulsd  %xmm4,%xmm2
mulsd  %xmm4,%xmm2
mulsd  0x8(%rsp),%xmm2
addsd  %xmm1,%xmm2
movsd  0xd39(%rip),%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm3,%xmm1
mulsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
call   1040 <radToDeg@plt>
mulsd  0xd04(%rip),%xmm0
add    $0x38,%rsp
ret

LLVM IR (-O0):
define double @calcEquationOfTime(double %0) {
%2 = alloca double
%3 = alloca double
%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
store double %0, double* %2
%14 = load double, double* %2
%15 = call double @calcObliquityCorrection(double %14)
store double %15, double* %3
%16 = load double, double* %2
%17 = call double @calcGeomMeanLongSun(double %16)
store double %17, double* %4
%18 = load double, double* %2
%19 = call double @calcEccentricityEarthOrbit(double %18)
store double %19, double* %5
%20 = load double, double* %2
%21 = call double @calcGeomMeanAnomalySun(double %20)
store double %21, double* %6
%22 = load double, double* %3
%23 = call double @degToRad(double %22)
%24 = fdiv double %23, 2.000000e+00
%25 = call double @tan(double %24)
store double %25, double* %7
%26 = load double, double* %7
%27 = load double, double* %7
%28 = fmul double %27, %26
store double %28, double* %7
%29 = load double, double* %4
%30 = call double @degToRad(double %29)
%31 = fmul double 2.000000e+00, %30
%32 = call double @sin(double %31)
store double %32, double* %8
%33 = load double, double* %6
%34 = call double @degToRad(double %33)
%35 = call double @sin(double %34)
store double %35, double* %9
%36 = load double, double* %4
%37 = call double @degToRad(double %36)
%38 = fmul double 2.000000e+00, %37
%39 = call double @cos(double %38)
store double %39, double* %10
%40 = load double, double* %4
%41 = call double @degToRad(double %40)
%42 = fmul double 4.000000e+00, %41
%43 = call double @sin(double %42)
store double %43, double* %11
%44 = load double, double* %6
%45 = call double @degToRad(double %44)
%46 = fmul double 2.000000e+00, %45
%47 = call double @sin(double %46)
store double %47, double* %12
%48 = load double, double* %7
%49 = load double, double* %8
%50 = load double, double* %5
%51 = fmul double 2.000000e+00, %50
%52 = load double, double* %9
%53 = fmul double %51, %52
%54 = fneg double %53
%55 = call double @llvm.fmuladd.f64(double %48, double %49, double %54)
%56 = load double, double* %5
%57 = fmul double 4.000000e+00, %56
%58 = load double, double* %7
%59 = fmul double %57, %58
%60 = load double, double* %9
%61 = fmul double %59, %60
%62 = load double, double* %10
%63 = call double @llvm.fmuladd.f64(double %61, double %62, double %55)
%64 = load double, double* %7
%65 = fmul double 5.000000e-01, %64
%66 = load double, double* %7
%67 = fmul double %65, %66
%68 = load double, double* %11
%69 = fneg double %67
%70 = call double @llvm.fmuladd.f64(double %69, double %68, double %63)
%71 = load double, double* %5
%72 = fmul double 1.250000e+00, %71
%73 = load double, double* %5
%74 = fmul double %72, %73
%75 = load double, double* %12
%76 = fneg double %74
%77 = call double @llvm.fmuladd.f64(double %76, double %75, double %70)
store double %77, double* %13
%78 = load double, double* %13
%79 = call double @radToDeg(double %78)
%80 = fmul double %79, 4.000000e+00
ret double %80
}

LLVM IR (-O2):
define double @calcEquationOfTime(double %0) {
%2 = tail call double @calcObliquityCorrection(double %0)
%3 = tail call double @calcGeomMeanLongSun(double %0)
%4 = tail call double @calcEccentricityEarthOrbit(double %0)
%5 = tail call double @calcGeomMeanAnomalySun(double %0)
%6 = tail call double @degToRad(double %2)
%7 = fmul double %6, 5.000000e-01
%8 = tail call double @tan(double %7)
%9 = fmul double %8, %8
%10 = tail call double @degToRad(double %3)
%11 = fmul double %10, 2.000000e+00
%12 = tail call double @sin(double %11)
%13 = tail call double @degToRad(double %5)
%14 = tail call double @sin(double %13)
%15 = tail call double @degToRad(double %3)
%16 = fmul double %15, 2.000000e+00
%17 = tail call double @cos(double %16)
%18 = tail call double @degToRad(double %3)
%19 = fmul double %18, 4.000000e+00
%20 = tail call double @sin(double %19)
%21 = tail call double @degToRad(double %5)
%22 = fmul double %21, 2.000000e+00
%23 = tail call double @sin(double %22)
%24 = fmul double %4, -2.000000e+00
%25 = fmul double %24, %14
%26 = tail call double @llvm.fmuladd.f64(double %9, double %12, double %25)
%27 = fmul double %4, 4.000000e+00
%28 = fmul double %27, %9
%29 = fmul double %28, %14
%30 = tail call double @llvm.fmuladd.f64(double %29, double %17, double %26)
%31 = fmul double %9, -5.000000e-01
%32 = fmul double %9, %31
%33 = tail call double @llvm.fmuladd.f64(double %32, double %20, double %30)
%34 = fmul double %4, -1.250000e+00
%35 = fmul double %4, %34
%36 = tail call double @llvm.fmuladd.f64(double %35, double %23, double %33)
%37 = tail call double @radToDeg(double %36)
%38 = fmul double %37, 4.000000e+00
ret double %38
}