#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 atan(double);
int /*<<< orphan*/ atan2(double, double);
double cos(double);
double deg2rad(double);
double rad2deg(int /*<<< orphan*/);
double sin(double);
double tan(double);
void sun_right_ascension_parallax_and_topocentric_dec(
    float latitude, float elevation, double xi, double h, double delta,
    double *delta_alpha, double *delta_prime) {
  double lat_rad = deg2rad(latitude);
  double xi_rad = deg2rad(xi);
  double h_rad = deg2rad(h);
  double delta_rad = deg2rad(delta);
  double u = atan(0.99664719 * tan(lat_rad));
  double y = 0.99664717 * sin(u) + elevation * sin(lat_rad) / 6378140.0;
  double x = cos(u) + elevation * cos(lat_rad) / 6378140.0;
  *delta_alpha = rad2deg(atan2(-x * sin(xi_rad) * sin(h_rad),
                               cos(delta_rad) - x * sin(xi_rad) * cos(h_rad)));
  *delta_prime =
      rad2deg(atan2((sin(delta_rad) - y * sin(xi_rad)) * cos(*delta_alpha),
                    cos(delta_rad) - x * sin(xi_rad) * cos(h_rad)));
}


x86 assembly (clang, -O0):
<sun_right_ascension_parallax_and_topocentric_dec>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movsd  %xmm2,-0x10(%rbp)
movsd  %xmm3,-0x18(%rbp)
movsd  %xmm4,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1080 <tan@plt>
movaps %xmm0,%xmm1
movsd  0xe1f(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <atan@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xe8(%rbp)
ff
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0xf0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xe8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
movsd  0xdb5(%rip),%xmm2
divsd  %xmm2,%xmm1
movsd  0xdb1(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,-0xd8(%rbp)
ff
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
movsd  -0x38(%rbp),%xmm0
call   1090 <cos@plt>
movsd  -0xe0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0xd8(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm1
movsd  0xd50(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x68(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xd0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc8(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  -0x50(%rbp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,-0xb0(%rbp)
ff
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0xc0(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
movsd  -0x48(%rbp),%xmm0
call   1090 <cos@plt>
movsd  -0xb8(%rbp),%xmm1
ff
movsd  -0xb0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0xa8(%rbp),%xmm0
ff
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1030 <atan2@plt>
mov    %eax,%edi
call   1070 <rad2deg@plt>
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x50(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  -0x60(%rbp),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x98(%rbp),%xmm0
ff
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
call   1090 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x68(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x40(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1090 <cos@plt>
movsd  -0x80(%rbp),%xmm1
movsd  -0x78(%rbp),%xmm2
movaps %xmm0,%xmm3
movsd  -0x70(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
call   1030 <atan2@plt>
mov    %eax,%edi
call   1070 <rad2deg@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_right_ascension_parallax_and_topocentric_dec>:
push   %r14
push   %rbx
sub    $0x58,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  %xmm4,0x8(%rsp)
movsd  %xmm3,0x38(%rsp)
movsd  %xmm2,(%rsp)
movss  %xmm1,0x40(%rsp)
cvtss2sd %xmm0,%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,(%rsp)
movsd  0x38(%rsp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,0x38(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <deg2rad@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
call   1080 <tan@plt>
mulsd  0xe19(%rip),%xmm0
call   1060 <atan@plt>
movsd  %xmm0,0x28(%rsp)
call   1050 <sin@plt>
movsd  %xmm0,0x30(%rsp)
movss  0x40(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x40(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x40(%rsp),%xmm0
divsd  0xde2(%rip),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  0xddc(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x30(%rsp)
movsd  0x28(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x10(%rsp),%xmm0
call   1090 <cos@plt>
mulsd  0x40(%rsp),%xmm0
divsd  0xda0(%rip),%xmm0
addsd  0x28(%rsp),%xmm0
movapd %xmm0,0x40(%rsp)
movapd 0xda4(%rip),%xmm1
xorpd  %xmm0,%xmm1
movapd %xmm1,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x38(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x50(%rsp)
movsd  0x38(%rsp),%xmm0
call   1090 <cos@plt>
movsd  0x50(%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0x28(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
call   1030 <atan2@plt>
mov    %eax,%edi
call   1070 <rad2deg@plt>
movsd  %xmm0,(%rbx)
movsd  0x8(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  (%rbx),%xmm0
call   1090 <cos@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x30(%rsp)
movsd  0x8(%rsp),%xmm0
call   1090 <cos@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0x38(%rsp),%xmm0
call   1090 <cos@plt>
movsd  (%rsp),%xmm1
mulsd  0x40(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  0x30(%rsp),%xmm0
call   1030 <atan2@plt>
mov    %eax,%edi
call   1070 <rad2deg@plt>
movsd  %xmm0,(%r14)
add    $0x58,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sun_right_ascension_parallax_and_topocentric_dec(float %0, float %1, double %2, double %3, double %4, double* %5, double* %6) {
%8 = alloca float
%9 = alloca float
%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
store float %0, float* %8
store float %1, float* %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
%22 = load float, float* %8
%23 = fpext float %22 to double
%24 = call double @deg2rad(double %23)
store double %24, double* %15
%25 = load double, double* %10
%26 = call double @deg2rad(double %25)
store double %26, double* %16
%27 = load double, double* %11
%28 = call double @deg2rad(double %27)
store double %28, double* %17
%29 = load double, double* %12
%30 = call double @deg2rad(double %29)
store double %30, double* %18
%31 = load double, double* %15
%32 = call double @tan(double %31)
%33 = fmul double 0x3FEFE488A5D668D8, %32
%34 = call double @atan(double %33)
store double %34, double* %19
%35 = load double, double* %19
%36 = call double @sin(double %35)
%37 = load float, float* %9
%38 = fpext float %37 to double
%39 = load double, double* %15
%40 = call double @sin(double %39)
%41 = fmul double %38, %40
%42 = fdiv double %41, 6.378140e+06
%43 = call double @llvm.fmuladd.f64(double 0x3FEFE4889B19A167, double %36, double %42)
store double %43, double* %20
%44 = load double, double* %19
%45 = call double @cos(double %44)
%46 = load float, float* %9
%47 = fpext float %46 to double
%48 = load double, double* %15
%49 = call double @cos(double %48)
%50 = fmul double %47, %49
%51 = fdiv double %50, 6.378140e+06
%52 = fadd double %45, %51
store double %52, double* %21
%53 = load double, double* %21
%54 = fneg double %53
%55 = load double, double* %16
%56 = call double @sin(double %55)
%57 = fmul double %54, %56
%58 = load double, double* %17
%59 = call double @sin(double %58)
%60 = fmul double %57, %59
%61 = load double, double* %18
%62 = call double @cos(double %61)
%63 = load double, double* %21
%64 = load double, double* %16
%65 = call double @sin(double %64)
%66 = fmul double %63, %65
%67 = load double, double* %17
%68 = call double @cos(double %67)
%69 = fneg double %66
%70 = call double @llvm.fmuladd.f64(double %69, double %68, double %62)
%71 = call i32 @atan2(double %60, double %70)
%72 = call double @rad2deg(i32 %71)
%73 = load double*, double** %13
store double %72, double* %73
%74 = load double, double* %18
%75 = call double @sin(double %74)
%76 = load double, double* %20
%77 = load double, double* %16
%78 = call double @sin(double %77)
%79 = fneg double %76
%80 = call double @llvm.fmuladd.f64(double %79, double %78, double %75)
%81 = load double*, double** %13
%82 = load double, double* %81
%83 = call double @cos(double %82)
%84 = fmul double %80, %83
%85 = load double, double* %18
%86 = call double @cos(double %85)
%87 = load double, double* %21
%88 = load double, double* %16
%89 = call double @sin(double %88)
%90 = fmul double %87, %89
%91 = load double, double* %17
%92 = call double @cos(double %91)
%93 = fneg double %90
%94 = call double @llvm.fmuladd.f64(double %93, double %92, double %86)
%95 = call i32 @atan2(double %84, double %94)
%96 = call double @rad2deg(i32 %95)
%97 = load double*, double** %14
store double %96, double* %97
ret void
}

LLVM IR (-O2):
define void @sun_right_ascension_parallax_and_topocentric_dec(float %0, float %1, double %2, double %3, double %4, double* nocapture %5, double* nocapture writeonly %6) {
%8 = fpext float %0 to double
%9 = tail call double @deg2rad(double %8)
%10 = tail call double @deg2rad(double %2)
%11 = tail call double @deg2rad(double %3)
%12 = tail call double @deg2rad(double %4)
%13 = tail call double @tan(double %9)
%14 = fmul double %13, 0x3FEFE488A5D668D8
%15 = tail call double @atan(double %14)
%16 = tail call double @sin(double %15)
%17 = fpext float %1 to double
%18 = tail call double @sin(double %9)
%19 = fmul double %18, %17
%20 = fdiv double %19, 6.378140e+06
%21 = tail call double @llvm.fmuladd.f64(double %16, double 0x3FEFE4889B19A167, double %20)
%22 = tail call double @cos(double %15)
%23 = tail call double @cos(double %9)
%24 = fmul double %23, %17
%25 = fdiv double %24, 6.378140e+06
%26 = fadd double %22, %25
%27 = fneg double %26
%28 = tail call double @sin(double %10)
%29 = fmul double %28, %27
%30 = tail call double @sin(double %11)
%31 = fmul double %30, %29
%32 = tail call double @cos(double %12)
%33 = tail call double @sin(double %10)
%34 = tail call double @cos(double %11)
%35 = fmul double %33, %27
%36 = tail call double @llvm.fmuladd.f64(double %35, double %34, double %32)
%37 = tail call i32 @atan2(double %31, double %36)
%38 = tail call double @rad2deg(i32 %37)
store double %38, double* %5
%39 = tail call double @sin(double %12)
%40 = tail call double @sin(double %10)
%41 = fneg double %21
%42 = tail call double @llvm.fmuladd.f64(double %41, double %40, double %39)
%43 = load double, double* %5
%44 = tail call double @cos(double %43)
%45 = fmul double %42, %44
%46 = tail call double @cos(double %12)
%47 = tail call double @sin(double %10)
%48 = tail call double @cos(double %11)
%49 = fmul double %47, %27
%50 = tail call double @llvm.fmuladd.f64(double %49, double %48, double %46)
%51 = tail call i32 @atan2(double %45, double %50)
%52 = tail call double @rad2deg(i32 %51)
store double %52, double* %6
ret void
}