#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 asin(double);
double atan2(double, double);
double cos(double);
double sin(double);
double tan(double);
void ecliptic_to_equatorial(double lambda, double beta, double *alpha,
                            double *delta) {
  double sin_e, cos_e;
  sin_e = sin((23.440592 * ((2 * 3.141592653) / 360)));
  cos_e = cos((23.440592 * ((2 * 3.141592653) / 360)));
  *alpha = atan2(sin(lambda) * cos_e - tan(beta) * sin_e, cos(lambda));
  *delta = asin(sin(beta) * cos_e + cos(beta) * sin_e * sin(lambda));
}


x86 assembly (clang, -O0):
<ecliptic_to_equatorial>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
movsd  0xe8e(%rip),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xe7c(%rip),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <tan@plt>
movsd  -0x60(%rbp),%xmm2
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
call   1030 <atan2@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1070 <cos@plt>
mulsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
movsd  -0x48(%rbp),%xmm1
movsd  -0x40(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1050 <asin@plt>
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ecliptic_to_equatorial>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm1,0x8(%rsp)
movsd  %xmm0,0x10(%rsp)
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1060 <tan@plt>
mulsd  0xe7a(%rip),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xe75(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1030 <atan2@plt>
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
call   1040 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
mulsd  0xe35(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <sin@plt>
mulsd  0x8(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  0xe09(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1050 <asin@plt>
movsd  %xmm0,(%r14)
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ecliptic_to_equatorial(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%11 = call double @sin(double 0x3FDA2EF2D0CBB62A)
store double %11, double* %9
%12 = call double @cos(double 0x3FDA2EF2D0CBB62A)
store double %12, double* %10
%13 = load double, double* %5
%14 = call double @sin(double %13)
%15 = load double, double* %10
%16 = load double, double* %6
%17 = call double @tan(double %16)
%18 = load double, double* %9
%19 = fmul double %17, %18
%20 = fneg double %19
%21 = call double @llvm.fmuladd.f64(double %14, double %15, double %20)
%22 = load double, double* %5
%23 = call double @cos(double %22)
%24 = call double @atan2(double %21, double %23)
%25 = load double*, double** %7
store double %24, double* %25
%26 = load double, double* %6
%27 = call double @sin(double %26)
%28 = load double, double* %10
%29 = load double, double* %6
%30 = call double @cos(double %29)
%31 = load double, double* %9
%32 = fmul double %30, %31
%33 = load double, double* %5
%34 = call double @sin(double %33)
%35 = fmul double %32, %34
%36 = call double @llvm.fmuladd.f64(double %27, double %28, double %35)
%37 = call double @asin(double %36)
%38 = load double*, double** %8
store double %37, double* %38
ret void
}

LLVM IR (-O2):
define void @ecliptic_to_equatorial(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = tail call double @sin(double %0)
%6 = tail call double @tan(double %1)
%7 = fmul double %6, 0xBFD97585B0253660
%8 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FED5BF06692FC9B, double %7)
%9 = tail call double @cos(double %0)
%10 = tail call double @atan2(double %8, double %9)
store double %10, double* %2
%11 = tail call double @sin(double %1)
%12 = tail call double @cos(double %1)
%13 = fmul double %12, 0x3FD97585B0253660
%14 = tail call double @sin(double %0)
%15 = fmul double %13, %14
%16 = tail call double @llvm.fmuladd.f64(double %11, double 0x3FED5BF06692FC9B, double %15)
%17 = tail call double @asin(double %16)
store double %17, double* %3
ret void
}