#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 pmod(double, int);
double prutenic_1st_epicycle_luna(double);
double prutenic_2nd_epicycle_luna(double);
double prutenic_excess_luna(double);
double prutenic_mean_longitude_sol(double);
double prutenic_precession(double);
double prutenic_prop_luna(double);
double prutenic_longitude_luna(double days_since_epoch) {
  static double med_elong_radix =
      ((209) + (((58) + (((22) + (((36) + (56) / 60.)) / 60.)) / 60.)) / 60.);
  static double med_elong_daily =
      ((12) +
       (((11) +
         (((26) +
           (((41) +
             (((29) + (((57) + (((49) + (37) / 60.)) / 60.)) / 60.)) / 60.)) /
               60.)) /
             60.)) /
           60.);
  static double anomaly_radix =
      ((207) + (((13) + (((27) + (((41) + (16) / 60.)) / 60.)) / 60.)) / 60.);
  static double anomaly_daily =
      ((13) +
       (((3) +
         (((53) +
           (((56) +
             (((23) + (((57) + (((40) + (46) / 60.)) / 60.)) / 60.)) / 60.)) /
               60.)) /
             60.)) /
           60.);
  static double arg_latitude_radix =
      ((129) + (((41) + (((50) + (((37) + (59) / 60.)) / 60.)) / 60.)) / 60.);
  static double arg_latitude_daily =
      ((13) +
       (((13) +
         (((45) +
           (((39) +
             (((30) + (((46) + (((28) + (53) / 60.)) / 60.)) / 60.)) / 60.)) /
               60.)) /
             60.)) /
           60.);
  double med_elong =
      pmod(med_elong_radix + days_since_epoch * med_elong_daily, 360);
  double anomaly = pmod(anomaly_radix + days_since_epoch * anomaly_daily, 360);
  double arg_latitude =
      pmod(arg_latitude_radix + days_since_epoch * arg_latitude_daily, 360);
  double double_elong = pmod(2 * med_elong, 360);
  double epicycle_2 = prutenic_2nd_epicycle_luna(double_elong);
  double corrected_anomaly = pmod(
      (double_elong > 180) ? anomaly - epicycle_2 : anomaly + epicycle_2, 360);
  double prop = prutenic_prop_luna(double_elong);
  double epicycle_1 = prutenic_1st_epicycle_luna(corrected_anomaly);
  double excess = prutenic_excess_luna(corrected_anomaly);
  double corr_add_sub = epicycle_1 + excess * prop / 60;
  double elongation = pmod((corrected_anomaly > 180) ? med_elong + corr_add_sub
                                                     : med_elong - corr_add_sub,
                           360);
  double mean_longitude_sol = prutenic_mean_longitude_sol(days_since_epoch);
  double true_longitude_1st_aries = pmod(elongation + mean_longitude_sol, 360);
  double precession = prutenic_precession(days_since_epoch);
  double true_longitude = pmod(true_longitude_1st_aries + precession, 360);
  return true_longitude;
}


x86 assembly (clang, -O0):
<prutenic_longitude_luna>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0x2ed0(%rip),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0x2ecb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0x2eb4(%rip),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0x2eaf(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0x2e98(%rip),%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0x2e93(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  0xdfc(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <prutenic_2nd_epicycle_luna@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xdc4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    125d <prutenic_longitude_luna+0xed>
movsd  -0x18(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
jmp    126f <prutenic_longitude_luna+0xff>
movsd  -0x18(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0x88(%rbp),%xmm0
ff
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <prutenic_prop_luna@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <prutenic_1st_epicycle_luna@plt>
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1080 <prutenic_excess_luna@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
mulsd  -0x40(%rbp),%xmm1
movsd  0xd46(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xd1c(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1305 <prutenic_longitude_luna+0x195>
movsd  -0x10(%rbp),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
jmp    1317 <prutenic_longitude_luna+0x1a7>
movsd  -0x10(%rbp),%xmm0
subsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x90(%rbp),%xmm0
ff
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <prutenic_mean_longitude_sol@plt>
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1060 <prutenic_precession@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x70(%rbp),%xmm0
addsd  -0x78(%rbp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x80(%rbp),%xmm0
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prutenic_longitude_luna>:
sub    $0x28,%rsp
movapd %xmm0,%xmm1
movsd  %xmm0,0x10(%rsp)
movsd  0xe7a(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe76(%rip),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0xe66(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0xe60(%rip),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,(%rsp)
movsd  0xe51(%rip),%xmm0
mulsd  0x10(%rsp),%xmm0
addsd  0xe4b(%rip),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  0x18(%rsp),%xmm0
addsd  %xmm0,%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,0x8(%rsp)
call   1050 <prutenic_2nd_epicycle_luna@plt>
movsd  0xe22(%rip),%xmm1
cmpltsd 0x8(%rsp),%xmm1
movapd %xmm1,%xmm2
andnpd %xmm0,%xmm2
xorpd  0xe1b(%rip),%xmm0
andpd  %xmm1,%xmm0
orpd   %xmm2,%xmm0
addsd  (%rsp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
call   1040 <prutenic_prop_luna@plt>
movsd  %xmm0,0x8(%rsp)
movsd  (%rsp),%xmm0
call   1030 <prutenic_1st_epicycle_luna@plt>
movsd  %xmm0,0x20(%rsp)
movsd  (%rsp),%xmm0
call   1080 <prutenic_excess_luna@plt>
mulsd  0x8(%rsp),%xmm0
divsd  0xdbe(%rip),%xmm0
addsd  0x20(%rsp),%xmm0
movapd 0xdb8(%rip),%xmm2
xorpd  %xmm0,%xmm2
movsd  0xd9c(%rip),%xmm1
cmpltsd (%rsp),%xmm1
andpd  %xmm1,%xmm0
andnpd %xmm2,%xmm1
orpd   %xmm1,%xmm0
addsd  0x18(%rsp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <prutenic_mean_longitude_sol@plt>
addsd  (%rsp),%xmm0
mov    $0x168,%edi
call   1090 <pmod@plt>
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1060 <prutenic_precession@plt>
addsd  (%rsp),%xmm0
mov    $0x168,%edi
add    $0x28,%rsp
jmp    1090 <pmod@plt>

LLVM IR (-O0):
@prutenic_longitude_luna.med_elong_radix = internal global double 0x406A3F22657306DD
@prutenic_longitude_luna.med_elong_daily = internal global double 0x402861A9AE234F9E
@prutenic_longitude_luna.anomaly_radix = internal global double 0x4069E72DF03BA132
@prutenic_longitude_luna.anomaly_daily = internal global double 0x402A21457EBD44D8
@prutenic_longitude_luna.arg_latitude_radix = internal global double 0x4060365115C265EF
@prutenic_longitude_luna.arg_latitude_daily = internal global double 0x402A756D4F735222
define double @prutenic_longitude_luna(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
%17 = alloca double
store double %0, double* %2
%18 = load double, double* @prutenic_longitude_luna.med_elong_radix
%19 = load double, double* %2
%20 = load double, double* @prutenic_longitude_luna.med_elong_daily
%21 = call double @llvm.fmuladd.f64(double %19, double %20, double %18)
%22 = call double @pmod(double %21, i32 360)
store double %22, double* %3
%23 = load double, double* @prutenic_longitude_luna.anomaly_radix
%24 = load double, double* %2
%25 = load double, double* @prutenic_longitude_luna.anomaly_daily
%26 = call double @llvm.fmuladd.f64(double %24, double %25, double %23)
%27 = call double @pmod(double %26, i32 360)
store double %27, double* %4
%28 = load double, double* @prutenic_longitude_luna.arg_latitude_radix
%29 = load double, double* %2
%30 = load double, double* @prutenic_longitude_luna.arg_latitude_daily
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double %28)
%32 = call double @pmod(double %31, i32 360)
store double %32, double* %5
%33 = load double, double* %3
%34 = fmul double 2.000000e+00, %33
%35 = call double @pmod(double %34, i32 360)
store double %35, double* %6
%36 = load double, double* %6
%37 = call double @prutenic_2nd_epicycle_luna(double %36)
store double %37, double* %7
%38 = load double, double* %6
%39 = fcmp ogt double %38, 1.800000e+02
br i1 %39, label %40, label %44
40: ; preds = %1
%41 = load double, double* %4
%42 = load double, double* %7
%43 = fsub double %41, %42
br label %48
44: ; preds = %1
%45 = load double, double* %4
%46 = load double, double* %7
%47 = fadd double %45, %46
br label %48
48: ; preds = %44, %40
%49 = phi double [ %43, %40 ], [ %47, %44 ]
%50 = call double @pmod(double %49, i32 360)
store double %50, double* %8
%51 = load double, double* %6
%52 = call double @prutenic_prop_luna(double %51)
store double %52, double* %9
%53 = load double, double* %8
%54 = call double @prutenic_1st_epicycle_luna(double %53)
store double %54, double* %10
%55 = load double, double* %8
%56 = call double @prutenic_excess_luna(double %55)
store double %56, double* %11
%57 = load double, double* %10
%58 = load double, double* %11
%59 = load double, double* %9
%60 = fmul double %58, %59
%61 = fdiv double %60, 6.000000e+01
%62 = fadd double %57, %61
store double %62, double* %12
%63 = load double, double* %8
%64 = fcmp ogt double %63, 1.800000e+02
br i1 %64, label %65, label %69
65: ; preds = %48
%66 = load double, double* %3
%67 = load double, double* %12
%68 = fadd double %66, %67
br label %73
69: ; preds = %48
%70 = load double, double* %3
%71 = load double, double* %12
%72 = fsub double %70, %71
br label %73
73: ; preds = %69, %65
%74 = phi double [ %68, %65 ], [ %72, %69 ]
%75 = call double @pmod(double %74, i32 360)
store double %75, double* %13
%76 = load double, double* %2
%77 = call double @prutenic_mean_longitude_sol(double %76)
store double %77, double* %14
%78 = load double, double* %13
%79 = load double, double* %14
%80 = fadd double %78, %79
%81 = call double @pmod(double %80, i32 360)
store double %81, double* %15
%82 = load double, double* %2
%83 = call double @prutenic_precession(double %82)
store double %83, double* %16
%84 = load double, double* %15
%85 = load double, double* %16
%86 = fadd double %84, %85
%87 = call double @pmod(double %86, i32 360)
store double %87, double* %17
%88 = load double, double* %17
ret double %88
}

LLVM IR (-O2):
define double @prutenic_longitude_luna(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double 0x402861A9AE234F9E, double 0x406A3F22657306DD)
%3 = tail call double @pmod(double %2, i32 360)
%4 = tail call double @llvm.fmuladd.f64(double %0, double 0x402A21457EBD44D8, double 0x4069E72DF03BA132)
%5 = tail call double @pmod(double %4, i32 360)
%6 = tail call double @llvm.fmuladd.f64(double %0, double 0x402A756D4F735222, double 0x4060365115C265EF)
%7 = tail call double @pmod(double %6, i32 360)
%8 = fmul double %3, 2.000000e+00
%9 = tail call double @pmod(double %8, i32 360)
%10 = tail call double @prutenic_2nd_epicycle_luna(double %9)
%11 = fcmp ogt double %9, 1.800000e+02
%12 = fneg double %10
%13 = select i1 %11, double %12, double %10
%14 = fadd double %5, %13
%15 = tail call double @pmod(double %14, i32 360)
%16 = tail call double @prutenic_prop_luna(double %9)
%17 = tail call double @prutenic_1st_epicycle_luna(double %15)
%18 = tail call double @prutenic_excess_luna(double %15)
%19 = fmul double %16, %18
%20 = fdiv double %19, 6.000000e+01
%21 = fadd double %17, %20
%22 = fcmp ogt double %15, 1.800000e+02
%23 = fneg double %21
%24 = select i1 %22, double %21, double %23
%25 = fadd double %3, %24
%26 = tail call double @pmod(double %25, i32 360)
%27 = tail call double @prutenic_mean_longitude_sol(double %0)
%28 = fadd double %26, %27
%29 = tail call double @pmod(double %28, i32 360)
%30 = tail call double @prutenic_precession(double %0)
%31 = fadd double %29, %30
%32 = tail call double @pmod(double %31, i32 360)
ret double %32
}