#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*/ atan2(int, int);
int cos(double);
double deg2rad(double);
double limit_degrees(int /*<<< orphan*/);
int /*<<< orphan*/ rad2deg(int /*<<< orphan*/);
int sin(double);
int tan(double);
double geocentric_right_ascension(double lamda, double epsilon, double beta) {
  double lamda_rad = deg2rad(lamda);
  double epsilon_rad = deg2rad(epsilon);
  return limit_degrees(rad2deg(atan2(sin(lamda_rad) * cos(epsilon_rad) -
                                         tan(deg2rad(beta)) * sin(epsilon_rad),
                                     cos(lamda_rad))));
}


x86 assembly (clang, -O0):
<geocentric_right_ascension>:
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   1040 <deg2rad@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1050 <sin@plt>
mov    %eax,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1090 <cos@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <deg2rad@plt>
call   1080 <tan@plt>
mov    %eax,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sin@plt>
mov    -0x34(%rbp),%ecx
mov    %eax,%edx
mov    -0x30(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x2c(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1090 <cos@plt>
mov    -0x2c(%rbp),%edi
mov    %eax,%esi
call   1030 <atan2@plt>
mov    %eax,%edi
call   1070 <rad2deg@plt>
mov    %eax,%edi
call   1060 <limit_degrees@plt>
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define double @geocentric_right_ascension(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* %6
%19 = call double @deg2rad(double %18)
%20 = call i32 @tan(double %19)
%21 = load double, double* %8
%22 = call i32 @sin(double %21)
%23 = mul nsw i32 %20, %22
%24 = sub nsw i32 %17, %23
%25 = load double, double* %7
%26 = call i32 @cos(double %25)
%27 = call i32 @atan2(i32 %24, i32 %26)
%28 = call i32 @rad2deg(i32 %27)
%29 = call double @limit_degrees(i32 %28)
ret double %29
}

LLVM IR (-O2):
define double @geocentric_right_ascension(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 double @deg2rad(double %2)
%10 = tail call i32 @tan(double %9)
%11 = tail call i32 @sin(double %5)
%12 = mul nsw i32 %11, %10
%13 = sub nsw i32 %8, %12
%14 = tail call i32 @cos(double %4)
%15 = tail call i32 @atan2(i32 %13, i32 %14)
%16 = tail call i32 @rad2deg(i32 %15)
%17 = tail call double @limit_degrees(i32 %16)
ret double %17
}