#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 */
struct ln_lnlat_posn {
  int dummy;
};
struct ln_hrz_posn {
  int dummy;
};
struct ln_equ_posn {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ln_get_hrz_from_equ_sidereal_time(struct ln_equ_posn *,
                                                     struct ln_lnlat_posn *,
                                                     double,
                                                     struct ln_hrz_posn *);
double ln_get_mean_sidereal_time(double);
void ln_get_hrz_from_equ(struct ln_equ_posn *object,
                         struct ln_lnlat_posn *observer, double JD,
                         struct ln_hrz_posn *position) {
  double sidereal;
  sidereal = ln_get_mean_sidereal_time(JD);
  ln_get_hrz_from_equ_sidereal_time(object, observer, sidereal, position);
}


x86 assembly (clang, -O0):
<ln_get_hrz_from_equ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1040 <ln_get_mean_sidereal_time@plt>
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rdx
call   1030 <ln_get_hrz_from_equ_sidereal_time@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_hrz_from_equ>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
call   1040 <ln_get_mean_sidereal_time@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <ln_get_hrz_from_equ_sidereal_time@plt>

LLVM IR (-O0):
%struct.ln_equ_posn = type { i32 }
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_hrz_posn = type { i32 }
define void @ln_get_hrz_from_equ(%struct.ln_equ_posn* %0, %struct.ln_lnlat_posn* %1, double %2, %struct.ln_hrz_posn* %3) {
%5 = alloca %struct.ln_equ_posn*
%6 = alloca %struct.ln_lnlat_posn*
%7 = alloca double
%8 = alloca %struct.ln_hrz_posn*
%9 = alloca double
store %struct.ln_equ_posn* %0, %struct.ln_equ_posn** %5
store %struct.ln_lnlat_posn* %1, %struct.ln_lnlat_posn** %6
store double %2, double* %7
store %struct.ln_hrz_posn* %3, %struct.ln_hrz_posn** %8
%10 = load double, double* %7
%11 = call double @ln_get_mean_sidereal_time(double %10)
store double %11, double* %9
%12 = load %struct.ln_equ_posn*, %struct.ln_equ_posn** %5
%13 = load %struct.ln_lnlat_posn*, %struct.ln_lnlat_posn** %6
%14 = load double, double* %9
%15 = load %struct.ln_hrz_posn*, %struct.ln_hrz_posn** %8
%16 = call i32 @ln_get_hrz_from_equ_sidereal_time(%struct.ln_equ_posn* %12, %struct.ln_lnlat_posn* %13, double %14, %struct.ln_hrz_posn* %15)
ret void
}

LLVM IR (-O2):
%struct.ln_equ_posn = type { i32 }
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_hrz_posn = type { i32 }
define void @ln_get_hrz_from_equ(%struct.ln_equ_posn* %0, %struct.ln_lnlat_posn* %1, double %2, %struct.ln_hrz_posn* %3) {
%5 = tail call double @ln_get_mean_sidereal_time(double %2)
%6 = tail call i32 @ln_get_hrz_from_equ_sidereal_time(%struct.ln_equ_posn* %0, %struct.ln_lnlat_posn* %1, double %5, %struct.ln_hrz_posn* %3)
ret void
}