#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 M_PI;
double sin(double);
double sunmodel_sun_apparent_long(double t, double true_long) {
  double omega, lambda;
  omega = (M_PI * (125.04 - 1934.136 * t) / 180.0);
  lambda = true_long - (M_PI * (0.00569 + 0.00478 * sin(omega)) / 180.0);
  return lambda;
}


x86 assembly (clang, -O0):
<sunmodel_sun_apparent_long>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2ebf(%rip),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xede(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xeda(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeaa(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e78(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x30(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  0xe70(%rip),%xmm3
mulsd  %xmm3,%xmm2
movsd  0xe6c(%rip),%xmm3
addsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe4c(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunmodel_sun_apparent_long>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
mov    0x2ec7(%rip),%rax
mulsd  0xed7(%rip),%xmm0
addsd  0xed7(%rip),%xmm0
movsd  (%rax),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  %xmm1,%xmm0
divsd  0xec9(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0xec4(%rip),%xmm0
addsd  0xec4(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  0xea6(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @sunmodel_sun_apparent_long(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* @M_PI
%8 = load double, double* %3
%9 = call double @llvm.fmuladd.f64(double 0xC09E388B43958106, double %8, double 1.250400e+02)
%10 = fmul double %7, %9
%11 = fdiv double %10, 1.800000e+02
store double %11, double* %5
%12 = load double, double* %4
%13 = load double, double* @M_PI
%14 = load double, double* %5
%15 = call double @sin(double %14)
%16 = call double @llvm.fmuladd.f64(double 4.780000e-03, double %15, double 5.690000e-03)
%17 = fmul double %13, %16
%18 = fdiv double %17, 1.800000e+02
%19 = fsub double %12, %18
store double %19, double* %6
%20 = load double, double* %6
ret double %20
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @sunmodel_sun_apparent_long(double %0, double %1) {
%3 = load double, double* @M_PI
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0xC09E388B43958106, double 1.250400e+02)
%5 = fmul double %4, %3
%6 = fdiv double %5, 1.800000e+02
%7 = tail call double @sin(double %6)
%8 = tail call double @llvm.fmuladd.f64(double %7, double 4.780000e-03, double 5.690000e-03)
%9 = fmul double %3, %8
%10 = fdiv double %9, 1.800000e+02
%11 = fsub double %1, %10
ret double %11
}