#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 atan2(double, double);
double cos(double);
int /*<<< orphan*/ earth_figure_values(double, double, double *, double *);
double sin(double);
int /*<<< orphan*/ sincos(double, double *, double *);
void geocentric_parallax(double hr_ang, double decl, double distance,
                         double geog_lat, double height_msl, double *d_ra,
                         double *d_decl) {
  double gclat, gcrad, hpx, cd, sd, ch, sh, cl, sl;
  earth_figure_values(geog_lat, height_msl, &gclat, &gcrad);
  hpx = sin(8.794 * ((3.141592653589793238462643 / 180.0) / 3600.0)) / distance;
  sincos(hr_ang, &sh, &ch);
  sincos(decl, &sd, &cd);
  sincos(gclat, &sl, &cl);
  *d_ra = atan2(-gcrad * cl * hpx * sh, cd - gcrad * cl * hpx * ch);
  *d_decl =
      atan2((sd - gcrad * sl * hpx) * cos(*d_ra), cd - gcrad * cl * hpx * ch) -
      decl;
}


x86 assembly (clang, -O0):
<geocentric_parallax>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
lea    -0x40(%rbp),%rdi
lea    -0x48(%rbp),%rsi
call   1060 <earth_figure_values@plt>
movsd  0xe65(%rip),%xmm0
call   1050 <sin@plt>
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x70(%rbp),%rdi
lea    -0x68(%rbp),%rsi
call   1030 <sincos@plt>
movsd  -0x10(%rbp),%xmm0
lea    -0x60(%rbp),%rdi
lea    -0x58(%rbp),%rsi
call   1030 <sincos@plt>
movsd  -0x40(%rbp),%xmm0
lea    -0x80(%rbp),%rdi
lea    -0x78(%rbp),%rsi
call   1030 <sincos@plt>
movsd  -0x48(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  -0x78(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x70(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1040 <atan2@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x60(%rbp),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x80(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x30(%rbp),%rax
movsd  (%rax),%xmm0
call   1070 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x48(%rbp),%xmm1
mulsd  -0x78(%rbp),%xmm1
mulsd  -0x50(%rbp),%xmm1
movsd  -0x68(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1040 <atan2@plt>
subsd  -0x10(%rbp),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geocentric_parallax>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm2,(%rsp)
movsd  %xmm1,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
lea    0x50(%rsp),%rdi
lea    0x10(%rsp),%rsi
movaps %xmm3,%xmm0
movaps %xmm4,%xmm1
call   1050 <earth_figure_values@plt>
movsd  0xe85(%rip),%xmm0
divsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
lea    0x40(%rsp),%rdi
lea    0x28(%rsp),%rsi
movsd  0x8(%rsp),%xmm0
call   1030 <sincos@plt>
lea    0x48(%rsp),%rdi
lea    0x30(%rsp),%rsi
movsd  0x18(%rsp),%xmm0
call   1030 <sincos@plt>
movsd  0x50(%rsp),%xmm0
lea    0x38(%rsp),%rdi
lea    0x20(%rsp),%rsi
call   1030 <sincos@plt>
movsd  0x10(%rsp),%xmm1
xorpd  0xe3e(%rip),%xmm1
mulsd  0x20(%rsp),%xmm1
mulsd  (%rsp),%xmm1
movsd  0x40(%rsp),%xmm0
mulsd  %xmm1,%xmm0
mulsd  0x28(%rsp),%xmm1
addsd  0x30(%rsp),%xmm1
call   1040 <atan2@plt>
movsd  %xmm0,(%rbx)
movsd  0x48(%rsp),%xmm2
movsd  0x38(%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  (%rsp),%xmm1
subsd  %xmm1,%xmm2
movsd  %xmm2,0x8(%rsp)
call   1060 <cos@plt>
mulsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
movsd  0x20(%rsp),%xmm2
mulsd  0x10(%rsp),%xmm2
mulsd  (%rsp),%xmm2
mulsd  0x28(%rsp),%xmm2
subsd  %xmm2,%xmm1
call   1040 <atan2@plt>
subsd  0x18(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @geocentric_parallax(double %0, double %1, double %2, double %3, double %4, double* %5, double* %6) {
%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
%18 = alloca double
%19 = alloca double
%20 = alloca double
%21 = alloca double
%22 = alloca double
%23 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double* %5, double** %13
store double* %6, double** %14
%24 = load double, double* %11
%25 = load double, double* %12
%26 = call i32 @earth_figure_values(double %24, double %25, double* %15, double* %16)
%27 = call double @sin(double 0x3F065A4EC8EC826A)
%28 = load double, double* %10
%29 = fdiv double %27, %28
store double %29, double* %17
%30 = load double, double* %8
%31 = call i32 @sincos(double %30, double* %21, double* %20)
%32 = load double, double* %9
%33 = call i32 @sincos(double %32, double* %19, double* %18)
%34 = load double, double* %15
%35 = call i32 @sincos(double %34, double* %23, double* %22)
%36 = load double, double* %16
%37 = fneg double %36
%38 = load double, double* %22
%39 = fmul double %37, %38
%40 = load double, double* %17
%41 = fmul double %39, %40
%42 = load double, double* %21
%43 = fmul double %41, %42
%44 = load double, double* %18
%45 = load double, double* %16
%46 = load double, double* %22
%47 = fmul double %45, %46
%48 = load double, double* %17
%49 = fmul double %47, %48
%50 = load double, double* %20
%51 = fneg double %49
%52 = call double @llvm.fmuladd.f64(double %51, double %50, double %44)
%53 = call double @atan2(double %43, double %52)
%54 = load double*, double** %13
store double %53, double* %54
%55 = load double, double* %19
%56 = load double, double* %16
%57 = load double, double* %23
%58 = fmul double %56, %57
%59 = load double, double* %17
%60 = fneg double %58
%61 = call double @llvm.fmuladd.f64(double %60, double %59, double %55)
%62 = load double*, double** %13
%63 = load double, double* %62
%64 = call double @cos(double %63)
%65 = fmul double %61, %64
%66 = load double, double* %18
%67 = load double, double* %16
%68 = load double, double* %22
%69 = fmul double %67, %68
%70 = load double, double* %17
%71 = fmul double %69, %70
%72 = load double, double* %20
%73 = fneg double %71
%74 = call double @llvm.fmuladd.f64(double %73, double %72, double %66)
%75 = call double @atan2(double %65, double %74)
%76 = load double, double* %9
%77 = fsub double %75, %76
%78 = load double*, double** %14
store double %77, double* %78
ret void
}

LLVM IR (-O2):
define void @geocentric_parallax(double %0, double %1, double %2, double %3, double %4, double* nocapture writeonly %5, double* nocapture writeonly %6) {
%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 = bitcast double* %8 to i8*
%17 = bitcast double* %9 to i8*
%18 = bitcast double* %10 to i8*
%19 = bitcast double* %11 to i8*
%20 = bitcast double* %12 to i8*
%21 = bitcast double* %13 to i8*
%22 = bitcast double* %14 to i8*
%23 = bitcast double* %15 to i8*
%24 = call i32 @earth_figure_values(double %3, double %4, double* %8, double* %9)
%25 = fdiv double 0x3F065A4EC8CF6CC4, %2
%26 = call i32 @sincos(double %0, double* %13, double* %12)
%27 = call i32 @sincos(double %1, double* %11, double* %10)
%28 = load double, double* %8
%29 = call i32 @sincos(double %28, double* %15, double* %14)
%30 = load double, double* %9
%31 = fneg double %30
%32 = load double, double* %14
%33 = fmul double %32, %31
%34 = fmul double %25, %33
%35 = load double, double* %13
%36 = fmul double %35, %34
%37 = load double, double* %10
%38 = load double, double* %12
%39 = call double @llvm.fmuladd.f64(double %34, double %38, double %37)
%40 = call double @atan2(double %36, double %39)
store double %40, double* %5
%41 = load double, double* %11
%42 = load double, double* %9
%43 = load double, double* %15
%44 = fneg double %42
%45 = fmul double %43, %44
%46 = call double @llvm.fmuladd.f64(double %45, double %25, double %41)
%47 = call double @cos(double %40)
%48 = fmul double %47, %46
%49 = load double, double* %10
%50 = load double, double* %9
%51 = load double, double* %14
%52 = load double, double* %12
%53 = fneg double %50
%54 = fmul double %51, %53
%55 = fmul double %25, %54
%56 = call double @llvm.fmuladd.f64(double %55, double %52, double %49)
%57 = call double @atan2(double %48, double %56)
%58 = fsub double %57, %1
store double %58, double* %6
ret void
}