#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*/ cartsph(double, double, double, double *, double *,
                           double *);
double cos(double);
double sin(double);
int /*<<< orphan*/ sphcart(double, double, double, double *, double *,
                           double *);
void ab_eq(double mj, double lsn, double *ra, double *dec) {
  double x, y, z;
  double vx, vy, vz;
  double L;
  double cL;
  double r;
  sphcart(*ra, *dec, 1.0, &x, &y, &z);
  L = 2 * 3.141592653589793 *
      (0.27908 + 100.00214 * (mj - (2451545.0 - 2415020.0)) / 36525.0);
  cL = cos(L);
  vx = -0.994e-4 * sin(L);
  vy = 0.912e-4 * cL;
  vz = 0.395e-4 * cL;
  x += vx;
  y += vy;
  z += vz;
  cartsph(x, y, z, ra, dec, &r);
}


x86 assembly (clang, -O0):
<ab_eq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm1
movsd  0xec6(%rip),%xmm2
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
lea    -0x38(%rbp),%rdx
call   1040 <sphcart@plt>
movsd  -0x8(%rbp),%xmm1
movsd  0xe98(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe80(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe6c(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xe58(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1060 <cos@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xe23(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe0a(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xdf0(%rip),%xmm0
mulsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x48(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x50(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
lea    -0x68(%rbp),%rdx
call   1030 <cartsph@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ab_eq>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  0xe9d(%rip),%xmm2
lea    0x20(%rsp),%rdi
lea    0x18(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1040 <sphcart@plt>
movsd  0x8(%rsp),%xmm0
addsd  0xe83(%rip),%xmm0
mulsd  0xe83(%rip),%xmm0
divsd  0xe83(%rip),%xmm0
addsd  0xe83(%rip),%xmm0
mulsd  0xe83(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
call   1060 <cos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0xe67(%rip),%xmm0
movsd  0xe67(%rip),%xmm1
movsd  0x28(%rsp),%xmm2
mulsd  %xmm2,%xmm1
mulsd  0xe5d(%rip),%xmm2
addsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x20(%rsp)
addsd  0x18(%rsp),%xmm1
movsd  %xmm1,0x18(%rsp)
addsd  0x10(%rsp),%xmm2
movsd  %xmm2,0x10(%rsp)
lea    0x30(%rsp),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <cartsph@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ab_eq(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
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store double %0, double* %5
store double %1, double* %6
store double* %2, double** %7
store double* %3, double** %8
%18 = load double*, double** %7
%19 = load double, double* %18
%20 = load double*, double** %8
%21 = load double, double* %20
%22 = call i32 @sphcart(double %19, double %21, double 1.000000e+00, double* %9, double* %10, double* %11)
%23 = load double, double* %5
%24 = fsub double %23, 3.652500e+04
%25 = fmul double 0x405900230FCF80DC, %24
%26 = fdiv double %25, 3.652500e+04
%27 = fadd double 2.790800e-01, %26
%28 = fmul double 0x401921FB54442D18, %27
store double %28, double* %15
%29 = load double, double* %15
%30 = call double @cos(double %29)
store double %30, double* %16
%31 = load double, double* %15
%32 = call double @sin(double %31)
%33 = fmul double -9.940000e-05, %32
store double %33, double* %12
%34 = load double, double* %16
%35 = fmul double 0x3F17E85411D00C1C, %34
store double %35, double* %13
%36 = load double, double* %16
%37 = fmul double 3.950000e-05, %36
store double %37, double* %14
%38 = load double, double* %12
%39 = load double, double* %9
%40 = fadd double %39, %38
store double %40, double* %9
%41 = load double, double* %13
%42 = load double, double* %10
%43 = fadd double %42, %41
store double %43, double* %10
%44 = load double, double* %14
%45 = load double, double* %11
%46 = fadd double %45, %44
store double %46, double* %11
%47 = load double, double* %9
%48 = load double, double* %10
%49 = load double, double* %11
%50 = load double*, double** %7
%51 = load double*, double** %8
%52 = call i32 @cartsph(double %47, double %48, double %49, double* %50, double* %51, double* %17)
ret void
}

LLVM IR (-O2):
define void @ab_eq(double %0, double %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = bitcast double* %5 to i8*
%10 = bitcast double* %6 to i8*
%11 = bitcast double* %7 to i8*
%12 = bitcast double* %8 to i8*
%13 = load double, double* %2
%14 = load double, double* %3
%15 = call i32 @sphcart(double %13, double %14, double 1.000000e+00, double* %5, double* %6, double* %7)
%16 = fadd double %0, -3.652500e+04
%17 = fmul double %16, 0x405900230FCF80DC
%18 = fdiv double %17, 3.652500e+04
%19 = fadd double %18, 2.790800e-01
%20 = fmul double %19, 0x401921FB54442D18
%21 = call double @cos(double %20)
%22 = call double @sin(double %20)
%23 = fmul double %22, 9.940000e-05
%24 = fmul double %21, 0x3F17E85411D00C1C
%25 = fmul double %21, 3.950000e-05
%26 = load double, double* %5
%27 = fsub double %26, %23
store double %27, double* %5
%28 = load double, double* %6
%29 = fadd double %24, %28
store double %29, double* %6
%30 = load double, double* %7
%31 = fadd double %25, %30
store double %31, double* %7
%32 = call i32 @cartsph(double %27, double %29, double %31, double* %2, double* %3, double* %8)
ret void
}