#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_rst_time {
  int dummy;
};
struct ln_lnlat_posn {
  int dummy;
};

/* Variables and functions */
int ln_get_body_rst_horizon_offset(double, struct ln_lnlat_posn *,
                                   void (*)(double, struct ln_equ_posn *),
                                   double, struct ln_rst_time *, double);
int ln_get_body_rst_horizon(double JD, struct ln_lnlat_posn *observer,
                            void (*get_equ_body_coords)(double,
                                                        struct ln_equ_posn *),
                            double horizon, struct ln_rst_time *rst) {
  return ln_get_body_rst_horizon_offset(JD, observer, get_equ_body_coords,
                                        horizon, rst, 0.5);
}


x86 assembly (clang, -O0):
<ln_get_body_rst_horizon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
movsd  -0x20(%rbp),%xmm1
mov    -0x28(%rbp),%rdx
movsd  0xeb4(%rip),%xmm2
call   1030 <ln_get_body_rst_horizon_offset@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ln_get_body_rst_horizon>:
movsd  0xee8(%rip),%xmm2
jmp    1030 <ln_get_body_rst_horizon_offset@plt>

LLVM IR (-O0):
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_equ_posn = type opaque
%struct.ln_rst_time = type { i32 }
%struct.ln_equ_posn.0 = type opaque
define i32 @ln_get_body_rst_horizon(double %0, %struct.ln_lnlat_posn* %1, void (double, %struct.ln_equ_posn*)* %2, double %3, %struct.ln_rst_time* %4) {
%6 = alloca double
%7 = alloca %struct.ln_lnlat_posn*
%8 = alloca void (double, %struct.ln_equ_posn*)*
%9 = alloca double
%10 = alloca %struct.ln_rst_time*
store double %0, double* %6
store %struct.ln_lnlat_posn* %1, %struct.ln_lnlat_posn** %7
store void (double, %struct.ln_equ_posn*)* %2, void (double, %struct.ln_equ_posn*)** %8
store double %3, double* %9
store %struct.ln_rst_time* %4, %struct.ln_rst_time** %10
%11 = load double, double* %6
%12 = load %struct.ln_lnlat_posn*, %struct.ln_lnlat_posn** %7
%13 = load void (double, %struct.ln_equ_posn*)*, void (double, %struct.ln_equ_posn*)** %8
%14 = bitcast void (double, %struct.ln_equ_posn*)* %13 to void (double, %struct.ln_equ_posn.0*)*
%15 = load double, double* %9
%16 = load %struct.ln_rst_time*, %struct.ln_rst_time** %10
%17 = call i32 @ln_get_body_rst_horizon_offset(double %11, %struct.ln_lnlat_posn* %12, void (double, %struct.ln_equ_posn.0*)* %14, double %15, %struct.ln_rst_time* %16, double 5.000000e-01)
ret i32 %17
}

LLVM IR (-O2):
%struct.ln_lnlat_posn = type { i32 }
%struct.ln_equ_posn = type opaque
%struct.ln_rst_time = type { i32 }
%struct.ln_equ_posn.0 = type opaque
define i32 @ln_get_body_rst_horizon(double %0, %struct.ln_lnlat_posn* %1, void (double, %struct.ln_equ_posn*)* %2, double %3, %struct.ln_rst_time* %4) {
%6 = bitcast void (double, %struct.ln_equ_posn*)* %2 to void (double, %struct.ln_equ_posn.0*)*
%7 = tail call i32 @ln_get_body_rst_horizon_offset(double %0, %struct.ln_lnlat_posn* %1, void (double, %struct.ln_equ_posn.0*)* %6, double %3, %struct.ln_rst_time* %4, double 5.000000e-01)
ret i32 %7
}