#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(int);
int cos(double);
double deg2rad(double);
double rad2deg(int /*<<< orphan*/);
int sin(double);
double geocentric_declination(double beta, double epsilon, double lamda) {
  double beta_rad = deg2rad(beta);
  double epsilon_rad = deg2rad(epsilon);
  return rad2deg(asin(sin(beta_rad) * cos(epsilon_rad) +
                      cos(beta_rad) * sin(epsilon_rad) * sin(deg2rad(lamda))));
}


x86 assembly (clang, -O0):
<geocentric_declination>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <deg2rad@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <deg2rad@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <sin@plt>
mov    %eax,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1070 <cos@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1070 <cos@plt>
mov    %eax,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sin@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <deg2rad@plt>
call   1040 <sin@plt>
mov    -0x30(%rbp),%edi
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
imul   %ecx,%eax
add    %eax,%edi
call   1050 <asin@plt>
mov    %eax,%edi
call   1060 <rad2deg@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geocentric_declination>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm2,0x10(%rsp)
movsd  %xmm1,(%rsp)
call   1030 <deg2rad@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <deg2rad@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
call   1070 <cos@plt>
imul   %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mov    %eax,%ebp
movsd  (%rsp),%xmm0
call   1040 <sin@plt>
imul   %eax,%ebp
movsd  0x10(%rsp),%xmm0
call   1030 <deg2rad@plt>
call   1040 <sin@plt>
imul   %eax,%ebp
add    %ebx,%ebp
mov    %ebp,%edi
call   1050 <asin@plt>
mov    %eax,%edi
add    $0x18,%rsp
pop    %rbx
pop    %rbp
jmp    1060 <rad2deg@plt>

LLVM IR (-O0):
define double @geocentric_declination(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%9 = load double, double* %4
%10 = call double @deg2rad(double %9)
store double %10, double* %7
%11 = load double, double* %5
%12 = call double @deg2rad(double %11)
store double %12, double* %8
%13 = load double, double* %7
%14 = call i32 @sin(double %13)
%15 = load double, double* %8
%16 = call i32 @cos(double %15)
%17 = mul nsw i32 %14, %16
%18 = load double, double* %7
%19 = call i32 @cos(double %18)
%20 = load double, double* %8
%21 = call i32 @sin(double %20)
%22 = mul nsw i32 %19, %21
%23 = load double, double* %6
%24 = call double @deg2rad(double %23)
%25 = call i32 @sin(double %24)
%26 = mul nsw i32 %22, %25
%27 = add nsw i32 %17, %26
%28 = call i32 @asin(i32 %27)
%29 = call double @rad2deg(i32 %28)
ret double %29
}

LLVM IR (-O2):
define double @geocentric_declination(double %0, double %1, double %2) {
%4 = tail call double @deg2rad(double %0)
%5 = tail call double @deg2rad(double %1)
%6 = tail call i32 @sin(double %4)
%7 = tail call i32 @cos(double %5)
%8 = mul nsw i32 %7, %6
%9 = tail call i32 @cos(double %4)
%10 = tail call i32 @sin(double %5)
%11 = mul nsw i32 %10, %9
%12 = tail call double @deg2rad(double %2)
%13 = tail call i32 @sin(double %12)
%14 = mul nsw i32 %11, %13
%15 = add nsw i32 %14, %8
%16 = tail call i32 @asin(i32 %15)
%17 = tail call double @rad2deg(i32 %16)
ret double %17
}