#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 JDNow();
double Map360(double);
double LongitudePerihelion(void) {
  double lp;
  double jdnow, dt, t;
  dt = 35.0;
  dt = dt + 32.184;
  dt = dt / (36525 * 24. * 60. * 60.);
  jdnow = JDNow();
  t = (jdnow - 2451545.0) / 36525.0;
  t = t + dt;
  lp = 102.93735 + 0.71953 * t + 0.00046 * t * t;
  lp = Map360(lp);
  return (lp);
}


x86 assembly (clang, -O0):
<LongitudePerihelion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xf08(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xef3(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xed4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <JDNow@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  0xe61(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe5d(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe41(%rip),%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <Map360@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LongitudePerihelion>:
push   %rax
xor    %eax,%eax
call   1040 <JDNow@plt>
addsd  0xed0(%rip),%xmm0
divsd  0xed0(%rip),%xmm0
addsd  0xed0(%rip),%xmm0
movsd  0xed0(%rip),%xmm1
mulsd  %xmm0,%xmm1
addsd  0xecc(%rip),%xmm1
movsd  0xecc(%rip),%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rax
jmp    1030 <Map360@plt>

LLVM IR (-O0):
define double @LongitudePerihelion() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double 3.500000e+01, double* %3
%5 = load double, double* %3
%6 = fadd double %5, 3.218400e+01
store double %6, double* %3
%7 = load double, double* %3
%8 = fdiv double %7, 3.155760e+09
store double %8, double* %3
%9 = call double (...) @JDNow()
store double %9, double* %2
%10 = load double, double* %2
%11 = fsub double %10, 0x4142B42C80000000
%12 = fdiv double %11, 3.652500e+04
store double %12, double* %4
%13 = load double, double* %4
%14 = load double, double* %3
%15 = fadd double %13, %14
store double %15, double* %4
%16 = load double, double* %4
%17 = call double @llvm.fmuladd.f64(double 7.195300e-01, double %16, double 0x4059BBFD8ADAB9F5)
%18 = load double, double* %4
%19 = fmul double 4.600000e-04, %18
%20 = load double, double* %4
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double %17)
store double %21, double* %1
%22 = load double, double* %1
%23 = call double @Map360(double %22)
store double %23, double* %1
%24 = load double, double* %1
ret double %24
}

LLVM IR (-O2):
define double @LongitudePerihelion() {
%1 = tail call double (...) @JDNow()
%2 = fadd double %1, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
%4 = fadd double %3, 0x3E56DBF70F0D61B1
%5 = tail call double @llvm.fmuladd.f64(double %4, double 7.195300e-01, double 0x4059BBFD8ADAB9F5)
%6 = fmul double %4, 4.600000e-04
%7 = tail call double @llvm.fmuladd.f64(double %6, double %4, double %5)
%8 = tail call double @Map360(double %7)
ret double %8
}