#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 pow(double, double);
double radians(double);
double sin(double);
double sun_geometric_mean_anomaly(double);
double sun_equation_of_centre(double tm) {
  double a = sun_geometric_mean_anomaly(tm), rc;
  rc = sin(1.0 * a) * (pow(-0.000014 * tm, 2.0) - 0.004817 * tm + 1.914602);
  rc += sin(2.0 * a) * (-0.000101 * tm + 0.019993);
  rc += sin(3.0 * a) * 0.000289;
  return radians(rc);
}


x86 assembly (clang, -O0):
<sun_equation_of_centre>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <sun_geometric_mean_anomaly@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xedc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xebd(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe98(%rip),%xmm1
call   1060 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe8e(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe76(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe59(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x8(%rbp),%xmm2
movsd  0xe32(%rip),%xmm1
mulsd  %xmm1,%xmm2
movsd  0xe2e(%rip),%xmm1
addsd  %xmm1,%xmm2
movsd  -0x18(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe00(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xde1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1050 <radians@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_equation_of_centre>:
sub    $0x18,%rsp
movsd  %xmm0,(%rsp)
call   1030 <sun_geometric_mean_anomaly@plt>
movsd  %xmm0,0x8(%rsp)
call   1040 <sin@plt>
movsd  0xeaf(%rip),%xmm3
movsd  (%rsp),%xmm2
mulsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm3
movsd  0xea2(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  %xmm3,%xmm1
addsd  0xe9a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1040 <sin@plt>
movapd %xmm0,%xmm1
movsd  (%rsp),%xmm0
mulsd  0xe78(%rip),%xmm0
addsd  0xe78(%rip),%xmm0
mulsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xe63(%rip),%xmm0
call   1040 <sin@plt>
mulsd  0xe5e(%rip),%xmm0
addsd  (%rsp),%xmm0
add    $0x18,%rsp
jmp    1050 <radians@plt>

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

LLVM IR (-O2):
define double @sun_equation_of_centre(double %0) {
%2 = tail call double @sun_geometric_mean_anomaly(double %0)
%3 = tail call double @sin(double %2)
%4 = fmul double %0, -1.400000e-05
%5 = fmul double %4, %4
%6 = tail call double @llvm.fmuladd.f64(double %0, double -4.817000e-03, double %5)
%7 = fadd double %6, 0x3FFEA235B4EDB2F6
%8 = fmul double %7, %3
%9 = fmul double %2, 2.000000e+00
%10 = tail call double @sin(double %9)
%11 = tail call double @llvm.fmuladd.f64(double %0, double -1.010000e-04, double 1.999300e-02)
%12 = tail call double @llvm.fmuladd.f64(double %10, double %11, double %8)
%13 = fmul double %2, 3.000000e+00
%14 = tail call double @sin(double %13)
%15 = tail call double @llvm.fmuladd.f64(double %14, double 2.890000e-04, double %12)
%16 = tail call double @radians(double %15)
ret double %16
}