#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 Map180(double);
double Map24(double);
double MeanObliquity();
double asin(int);
double atan2(int, int);
int cos(double);
int sin(double);
int tan(double);
void EclipticalToCelestial(double lambda, double beta, double *ra,
                           double *dec) {
  double ra_out, dec_out, eps;
  lambda = lambda * 3.14159265358 / 180.;
  beta = beta * 3.14159265358 / 180.;
  eps = MeanObliquity() * 3.14159265358 / 180;
  ra_out = atan2(sin(lambda) * cos(eps) - tan(beta) * sin(eps), cos(lambda));
  ra_out = Map24(ra_out * 12. / 3.14159265358);
  dec_out = asin(sin(beta) * cos(eps) + cos(beta) * sin(eps) * sin(lambda));
  dec_out = Map180(dec_out * 180. / 3.14159265358);
  if (dec_out > 90.) {
    *ra = Map24(ra_out + 12.);
    *dec = 180. - dec_out;
  } else if (dec_out < -90.) {
    *ra = Map24(ra_out + 12.);
    *dec = dec_out + 180;
  } else {
    *ra = ra_out;
    *dec = dec_out;
  }
}


x86 assembly (clang, -O0):
<EclipticalToCelestial>:
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  0xe66(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  0xe61(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xe48(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xe43(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <MeanObliquity@plt>
movsd  0xe23(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe1f(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sin@plt>
mov    %eax,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
call   10a0 <cos@plt>
mov    %eax,%ecx
mov    -0x58(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1080 <tan@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
mov    -0x54(%rbp),%ecx
mov    %eax,%edx
mov    -0x50(%rbp),%eax
imul   %edx,%ecx
sub    %ecx,%eax
mov    %eax,-0x4c(%rbp)
movsd  -0x8(%rbp),%xmm0
call   10a0 <cos@plt>
mov    -0x4c(%rbp),%edi
mov    %eax,%esi
call   1030 <atan2@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  0xdb4(%rip),%xmm0
mulsd  -0x28(%rbp),%xmm0
movsd  0xd97(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1050 <Map24@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1060 <sin@plt>
mov    %eax,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
call   10a0 <cos@plt>
mov    %eax,%ecx
mov    -0x48(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
call   10a0 <cos@plt>
mov    %eax,-0x44(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1060 <sin@plt>
mov    %eax,%ecx
mov    -0x44(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <sin@plt>
mov    -0x40(%rbp),%edi
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
imul   %ecx,%eax
add    %eax,%edi
call   1070 <asin@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xd24(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  0xd0f(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1090 <Map180@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xcec(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1352 <EclipticalToCelestial+0x1d2>
movsd  0xcf2(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
call   1050 <Map24@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xcd0(%rip),%xmm0
subsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13b8 <EclipticalToCelestial+0x238>
movsd  0xcc6(%rip),%xmm0
ucomisd -0x30(%rbp),%xmm0
jbe    1399 <EclipticalToCelestial+0x219>
movsd  0xcab(%rip),%xmm0
addsd  -0x28(%rbp),%xmm0
call   1050 <Map24@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xc89(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13b3 <EclipticalToCelestial+0x233>
movsd  -0x28(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x30(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    13b8 <EclipticalToCelestial+0x238>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EclipticalToCelestial>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
movsd  0xe68(%rip),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xe64(%rip),%xmm3
divsd  %xmm3,%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  %xmm2,%xmm1
divsd  %xmm3,%xmm1
movsd  %xmm1,0x10(%rsp)
xor    %eax,%eax
call   1040 <MeanObliquity@plt>
mulsd  0xe35(%rip),%xmm0
divsd  0xe35(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x18(%rsp),%xmm0
call   1060 <sin@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   10a0 <cos@plt>
imul   %eax,%ebp
movsd  0x10(%rsp),%xmm0
call   1080 <tan@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
imul   %ebx,%eax
sub    %eax,%ebp
movsd  0x18(%rsp),%xmm0
call   10a0 <cos@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1030 <atan2@plt>
mulsd  0xde3(%rip),%xmm0
divsd  0xdcb(%rip),%xmm0
call   1050 <Map24@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
call   1060 <sin@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   10a0 <cos@plt>
imul   %eax,%ebx
movsd  0x10(%rsp),%xmm0
call   10a0 <cos@plt>
mov    %eax,%ebp
movsd  0x8(%rsp),%xmm0
call   1060 <sin@plt>
imul   %eax,%ebp
movsd  0x18(%rsp),%xmm0
call   1060 <sin@plt>
imul   %eax,%ebp
add    %ebx,%ebp
mov    %ebp,%edi
call   1070 <asin@plt>
mulsd  0xd73(%rip),%xmm0
divsd  0xd63(%rip),%xmm0
call   1090 <Map180@plt>
movapd %xmm0,%xmm2
ucomisd 0xd6a(%rip),%xmm0
jbe    12de <EclipticalToCelestial+0x15e>
movsd  0x20(%rsp),%xmm0
addsd  0xd52(%rip),%xmm0
movsd  %xmm2,0x8(%rsp)
call   1050 <Map24@plt>
movsd  %xmm0,(%r15)
movsd  0xd32(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
jmp    1327 <EclipticalToCelestial+0x1a7>
movsd  0x20(%rsp),%xmm1
movsd  0xd34(%rip),%xmm0
ucomisd %xmm2,%xmm0
jbe    131e <EclipticalToCelestial+0x19e>
movapd %xmm1,%xmm0
addsd  0xd12(%rip),%xmm0
movsd  %xmm2,0x8(%rsp)
call   1050 <Map24@plt>
movsd  %xmm0,(%r15)
movsd  0x8(%rsp),%xmm0
addsd  0xcec(%rip),%xmm0
jmp    1327 <EclipticalToCelestial+0x1a7>
movsd  %xmm1,(%r15)
movapd %xmm2,%xmm0
movsd  %xmm0,(%r14)
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @EclipticalToCelestial(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
%11 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%12 = load double, double* %5
%13 = fmul double %12, 0x400921FB5443D6F4
%14 = fdiv double %13, 1.800000e+02
store double %14, double* %5
%15 = load double, double* %6
%16 = fmul double %15, 0x400921FB5443D6F4
%17 = fdiv double %16, 1.800000e+02
store double %17, double* %6
%18 = call double (...) @MeanObliquity()
%19 = fmul double %18, 0x400921FB5443D6F4
%20 = fdiv double %19, 1.800000e+02
store double %20, double* %11
%21 = load double, double* %5
%22 = call i32 @sin(double %21)
%23 = load double, double* %11
%24 = call i32 @cos(double %23)
%25 = mul nsw i32 %22, %24
%26 = load double, double* %6
%27 = call i32 @tan(double %26)
%28 = load double, double* %11
%29 = call i32 @sin(double %28)
%30 = mul nsw i32 %27, %29
%31 = sub nsw i32 %25, %30
%32 = load double, double* %5
%33 = call i32 @cos(double %32)
%34 = call double @atan2(i32 %31, i32 %33)
store double %34, double* %9
%35 = load double, double* %9
%36 = fmul double %35, 1.200000e+01
%37 = fdiv double %36, 0x400921FB5443D6F4
%38 = call double @Map24(double %37)
store double %38, double* %9
%39 = load double, double* %6
%40 = call i32 @sin(double %39)
%41 = load double, double* %11
%42 = call i32 @cos(double %41)
%43 = mul nsw i32 %40, %42
%44 = load double, double* %6
%45 = call i32 @cos(double %44)
%46 = load double, double* %11
%47 = call i32 @sin(double %46)
%48 = mul nsw i32 %45, %47
%49 = load double, double* %5
%50 = call i32 @sin(double %49)
%51 = mul nsw i32 %48, %50
%52 = add nsw i32 %43, %51
%53 = call double @asin(i32 %52)
store double %53, double* %10
%54 = load double, double* %10
%55 = fmul double %54, 1.800000e+02
%56 = fdiv double %55, 0x400921FB5443D6F4
%57 = call double @Map180(double %56)
store double %57, double* %10
%58 = load double, double* %10
%59 = fcmp ogt double %58, 9.000000e+01
br i1 %59, label %60, label %68
60: ; preds = %4
%61 = load double, double* %9
%62 = fadd double %61, 1.200000e+01
%63 = call double @Map24(double %62)
%64 = load double*, double** %7
store double %63, double* %64
%65 = load double, double* %10
%66 = fsub double 1.800000e+02, %65
%67 = load double*, double** %8
store double %66, double* %67
br label %85
68: ; preds = %4
%69 = load double, double* %10
%70 = fcmp olt double %69, -9.000000e+01
br i1 %70, label %71, label %79
71: ; preds = %68
%72 = load double, double* %9
%73 = fadd double %72, 1.200000e+01
%74 = call double @Map24(double %73)
%75 = load double*, double** %7
store double %74, double* %75
%76 = load double, double* %10
%77 = fadd double %76, 1.800000e+02
%78 = load double*, double** %8
store double %77, double* %78
br label %84
79: ; preds = %68
%80 = load double, double* %9
%81 = load double*, double** %7
store double %80, double* %81
%82 = load double, double* %10
%83 = load double*, double** %8
store double %82, double* %83
br label %84
84: ; preds = %79, %71
br label %85
85: ; preds = %84, %60
ret void
}

LLVM IR (-O2):
define void @EclipticalToCelestial(double %0, double %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = fmul double %0, 0x400921FB5443D6F4
%6 = fdiv double %5, 1.800000e+02
%7 = fmul double %1, 0x400921FB5443D6F4
%8 = fdiv double %7, 1.800000e+02
%9 = tail call double (...) @MeanObliquity()
%10 = fmul double %9, 0x400921FB5443D6F4
%11 = fdiv double %10, 1.800000e+02
%12 = tail call i32 @sin(double %6)
%13 = tail call i32 @cos(double %11)
%14 = mul nsw i32 %13, %12
%15 = tail call i32 @tan(double %8)
%16 = tail call i32 @sin(double %11)
%17 = mul nsw i32 %16, %15
%18 = sub nsw i32 %14, %17
%19 = tail call i32 @cos(double %6)
%20 = tail call double @atan2(i32 %18, i32 %19)
%21 = fmul double %20, 1.200000e+01
%22 = fdiv double %21, 0x400921FB5443D6F4
%23 = tail call double @Map24(double %22)
%24 = tail call i32 @sin(double %8)
%25 = tail call i32 @cos(double %11)
%26 = mul nsw i32 %25, %24
%27 = tail call i32 @cos(double %8)
%28 = tail call i32 @sin(double %11)
%29 = mul nsw i32 %28, %27
%30 = tail call i32 @sin(double %6)
%31 = mul nsw i32 %29, %30
%32 = add nsw i32 %31, %26
%33 = tail call double @asin(i32 %32)
%34 = fmul double %33, 1.800000e+02
%35 = fdiv double %34, 0x400921FB5443D6F4
%36 = tail call double @Map180(double %35)
%37 = fcmp ogt double %36, 9.000000e+01
br i1 %37, label %38, label %42
38: ; preds = %4
%39 = fadd double %23, 1.200000e+01
%40 = tail call double @Map24(double %39)
store double %40, double* %2
%41 = fsub double 1.800000e+02, %36
br label %49
42: ; preds = %4
%43 = fcmp olt double %36, -9.000000e+01
br i1 %43, label %44, label %48
44: ; preds = %42
%45 = fadd double %23, 1.200000e+01
%46 = tail call double @Map24(double %45)
store double %46, double* %2
%47 = fadd double %36, 1.800000e+02
br label %49
48: ; preds = %42
store double %23, double* %2
br label %49
49: ; preds = %44, %48, %38
%50 = phi double [ %47, %44 ], [ %36, %48 ], [ %41, %38 ]
store double %50, double* %3
ret void
}