#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 */
int /*<<< orphan*/ calcGeomMeanAnomalySun(double);
double deg2rad(int /*<<< orphan*/);
double sin(double);
double calcSunEqOfCenter(double t) {
  double m = deg2rad(calcGeomMeanAnomalySun(t));
  return sin(m) * (1.914602 - t * (0.004817 + 0.000014 * t)) +
         sin(m + m) * (0.019993 - 0.000101 * t) + sin(m + m + m) * 0.000289;
}


x86 assembly (clang, -O0):
<calcSunEqOfCenter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <calcGeomMeanAnomalySun@plt>
mov    %eax,%edi
call   1030 <deg2rad@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xeac(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xea8(%rip),%xmm2
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe71(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0x28(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm3
movsd  0xe2f(%rip),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xe2b(%rip),%xmm4
addsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xde5(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSunEqOfCenter>:
sub    $0x28,%rsp
movsd  %xmm0,(%rsp)
call   1040 <calcGeomMeanAnomalySun@plt>
mov    %eax,%edi
call   1030 <deg2rad@plt>
movsd  %xmm0,0x8(%rsp)
call   1050 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0xea2(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  %xmm1,%xmm0
addsd  0xe99(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe95(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x18(%rsp)
call   1050 <sin@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  0xe6d(%rip),%xmm0
addsd  0xe6d(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
mulsd  0x20(%rsp),%xmm0
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0xe43(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @calcSunEqOfCenter(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @calcGeomMeanAnomalySun(double %4)
%6 = call double @deg2rad(i32 %5)
store double %6, double* %3
%7 = load double, double* %3
%8 = call double @sin(double %7)
%9 = load double, double* %2
%10 = load double, double* %2
%11 = call double @llvm.fmuladd.f64(double 1.400000e-05, double %10, double 4.817000e-03)
%12 = fneg double %9
%13 = call double @llvm.fmuladd.f64(double %12, double %11, double 0x3FFEA235B4EDB2F6)
%14 = load double, double* %3
%15 = load double, double* %3
%16 = fadd double %14, %15
%17 = call double @sin(double %16)
%18 = load double, double* %2
%19 = call double @llvm.fmuladd.f64(double -1.010000e-04, double %18, double 1.999300e-02)
%20 = fmul double %17, %19
%21 = call double @llvm.fmuladd.f64(double %8, double %13, double %20)
%22 = load double, double* %3
%23 = load double, double* %3
%24 = fadd double %22, %23
%25 = load double, double* %3
%26 = fadd double %24, %25
%27 = call double @sin(double %26)
%28 = call double @llvm.fmuladd.f64(double %27, double 2.890000e-04, double %21)
ret double %28
}

LLVM IR (-O2):
define double @calcSunEqOfCenter(double %0) {
%2 = tail call i32 @calcGeomMeanAnomalySun(double %0)
%3 = tail call double @deg2rad(i32 %2)
%4 = tail call double @sin(double %3)
%5 = tail call double @llvm.fmuladd.f64(double %0, double 1.400000e-05, double 4.817000e-03)
%6 = fneg double %0
%7 = tail call double @llvm.fmuladd.f64(double %6, double %5, double 0x3FFEA235B4EDB2F6)
%8 = fadd double %3, %3
%9 = tail call double @sin(double %8)
%10 = tail call double @llvm.fmuladd.f64(double %0, double -1.010000e-04, double 1.999300e-02)
%11 = fmul double %10, %9
%12 = tail call double @llvm.fmuladd.f64(double %4, double %7, double %11)
%13 = fadd double %3, %8
%14 = tail call double @sin(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %14, double 2.890000e-04, double %12)
ret double %15
}