#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*/ asin(double);
double calcObliquityCorrection(double);
double calcSunApparentLong(double);
int /*<<< orphan*/ degToRad(double);
double radToDeg(int /*<<< orphan*/);
double sin(int /*<<< orphan*/);
double calcSunDeclination(double t) {
  double e = calcObliquityCorrection(t);
  double lambda = calcSunApparentLong(t);
  double sint = sin(degToRad(e)) * sin(degToRad(lambda));
  double theta = radToDeg(asin(sint));
  return theta;
}


x86 assembly (clang, -O0):
<calcSunDeclination>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <calcObliquityCorrection@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <calcSunApparentLong@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1080 <degToRad@plt>
mov    %eax,%edi
call   1050 <sin@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1080 <degToRad@plt>
mov    %eax,%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1060 <asin@plt>
mov    %eax,%edi
call   1040 <radToDeg@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcSunDeclination>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
call   1030 <calcObliquityCorrection@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <calcSunApparentLong@plt>
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1080 <degToRad@plt>
mov    %eax,%edi
call   1050 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1080 <degToRad@plt>
mov    %eax,%edi
call   1050 <sin@plt>
mulsd  0x8(%rsp),%xmm0
call   1060 <asin@plt>
mov    %eax,%edi
add    $0x18,%rsp
jmp    1040 <radToDeg@plt>

LLVM IR (-O0):
define double @calcSunDeclination(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %2
%7 = load double, double* %2
%8 = call double @calcObliquityCorrection(double %7)
store double %8, double* %3
%9 = load double, double* %2
%10 = call double @calcSunApparentLong(double %9)
store double %10, double* %4
%11 = load double, double* %3
%12 = call i32 @degToRad(double %11)
%13 = call double @sin(i32 %12)
%14 = load double, double* %4
%15 = call i32 @degToRad(double %14)
%16 = call double @sin(i32 %15)
%17 = fmul double %13, %16
store double %17, double* %5
%18 = load double, double* %5
%19 = call i32 @asin(double %18)
%20 = call double @radToDeg(i32 %19)
store double %20, double* %6
%21 = load double, double* %6
ret double %21
}

LLVM IR (-O2):
define double @calcSunDeclination(double %0) {
%2 = tail call double @calcObliquityCorrection(double %0)
%3 = tail call double @calcSunApparentLong(double %0)
%4 = tail call i32 @degToRad(double %2)
%5 = tail call double @sin(i32 %4)
%6 = tail call i32 @degToRad(double %3)
%7 = tail call double @sin(i32 %6)
%8 = fmul double %5, %7
%9 = tail call i32 @asin(double %8)
%10 = tail call double @radToDeg(i32 %9)
ret double %10
}