#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 acos(int);
double atan(double);
int cos(double);
int sin(int);
double _PHYSICS_get_orbit_inclination(double latitude, double current_roll) {
  return (acos(cos(latitude * (4.0 * atan(1.0) / 180)) *
               sin((90 - current_roll) * (4.0 * atan(1.0) / 180)))) *
         57.29577;
}


x86 assembly (clang, -O0):
<_PHYSICS_get_orbit_inclination>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xeb4(%rip),%xmm0
call   1050 <atan@plt>
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe83(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
call   1060 <cos@plt>
mov    %eax,-0x14(%rbp)
movsd  0xe83(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe69(%rip),%xmm0
call   1050 <atan@plt>
movaps %xmm0,%xmm2
movsd  -0x20(%rbp),%xmm0
movsd  0xe4c(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe38(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
mov    -0x14(%rbp),%edi
imul   %eax,%edi
call   1030 <acos@plt>
movsd  0xe0c(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_PHYSICS_get_orbit_inclination>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm1,(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0xea8(%rip),%xmm0
call   1050 <atan@plt>
movsd  0x8(%rsp),%xmm0
mulsd  0xe9d(%rip),%xmm0
call   1060 <cos@plt>
mov    %eax,%ebx
movsd  0xe96(%rip),%xmm0
subsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xe74(%rip),%xmm0
call   1050 <atan@plt>
movsd  (%rsp),%xmm0
mulsd  0xe6a(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sin@plt>
imul   %eax,%ebx
mov    %ebx,%edi
call   1030 <acos@plt>
mulsd  0xe5f(%rip),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @_PHYSICS_get_orbit_inclination(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @atan(double 1.000000e+00)
%7 = fmul double 4.000000e+00, %6
%8 = fdiv double %7, 1.800000e+02
%9 = fmul double %5, %8
%10 = call i32 @cos(double %9)
%11 = load double, double* %4
%12 = fsub double 9.000000e+01, %11
%13 = call double @atan(double 1.000000e+00)
%14 = fmul double 4.000000e+00, %13
%15 = fdiv double %14, 1.800000e+02
%16 = fmul double %12, %15
%17 = fptosi double %16 to i32
%18 = call i32 @sin(i32 %17)
%19 = mul nsw i32 %10, %18
%20 = call double @acos(i32 %19)
%21 = fmul double %20, 0x404CA5DBCA9691A7
ret double %21
}

LLVM IR (-O2):
define double @_PHYSICS_get_orbit_inclination(double %0, double %1) {
%3 = tail call double @atan(double 1.000000e+00)
%4 = fmul double %0, 0x3F91DF46A2529D39
%5 = tail call i32 @cos(double %4)
%6 = fsub double 9.000000e+01, %1
%7 = tail call double @atan(double 1.000000e+00)
%8 = fmul double %6, 0x3F91DF46A2529D39
%9 = fptosi double %8 to i32
%10 = tail call i32 @sin(i32 %9)
%11 = mul nsw i32 %10, %5
%12 = tail call double @acos(i32 %11)
%13 = fmul double %12, 0x404CA5DBCA9691A7
ret double %13
}