#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 */
typedef int /*<<< orphan*/ time_t;
typedef double ssue;

/* Variables and functions */
int atan(int);
double fmod(double, int);
double solve_keplers_equation(double);
int sqrt(int);
int tan(double);
double sun_ecliptic_longitude(time_t ssue) {
  double D, N;
  double M_sun, E;
  double v;
  D = (((ssue) - (631065600)) * (1.0 / (24 * 3600)));
  N = ((2 * 3.141592653) / 365.242191) * D;
  N = fmod(N, (2 * 3.141592653));
  if (N < 0)
    N += (2 * 3.141592653);
  M_sun = N + (279.403303 * ((2 * 3.141592653) / 360)) -
          (282.768422 * ((2 * 3.141592653) / 360));
  if (M_sun < 0)
    M_sun += (2 * 3.141592653);
  E = solve_keplers_equation(M_sun);
  v = 2 * atan(sqrt((1 + (0.016713)) / (1 - (0.016713))) * tan(E / 2));
  return (v + (282.768422 * ((2 * 3.141592653) / 360)));
}


x86 assembly (clang, -O0):
<sun_ecliptic_longitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x259d4c00,%eax
cvtsi2sd %eax,%xmm0
movsd  0xe99(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe80(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    11be <sun_ecliptic_longitude+0x6e>
movsd  0xe5c(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe5a(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  0xe45(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    11fc <sun_ecliptic_longitude+0xac>
movsd  0xe1e(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <solve_keplers_equation@plt>
movsd  %xmm0,-0x28(%rbp)
mov    $0x1,%edi
call   1070 <sqrt@plt>
mov    %eax,-0x34(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  0xe03(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1060 <tan@plt>
mov    -0x34(%rbp),%edi
imul   %eax,%edi
call   1050 <atan@plt>
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xdcb(%rip),%xmm0
addsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_ecliptic_longitude>:
push   %rbx
sub    $0x10,%rsp
add    $0xda62b400,%edi
cvtsi2sd %edi,%xmm0
mulsd  0xe99(%rip),%xmm0
mulsd  0xe99(%rip),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  0xe8f(%rip),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm4
cmpltsd %xmm3,%xmm4
andpd  %xmm4,%xmm2
andnpd %xmm0,%xmm4
orpd   %xmm2,%xmm4
addsd  0xe6e(%rip),%xmm4
addsd  0xe6e(%rip),%xmm4
addsd  %xmm4,%xmm1
movapd %xmm4,%xmm0
cmpltsd %xmm3,%xmm0
andpd  %xmm0,%xmm1
andnpd %xmm4,%xmm0
orpd   %xmm1,%xmm0
call   1030 <solve_keplers_equation@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x1,%edi
call   1070 <sqrt@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
mulsd  0xe38(%rip),%xmm0
call   1060 <tan@plt>
imul   %eax,%ebx
mov    %ebx,%edi
call   1050 <atan@plt>
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0xe20(%rip),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @sun_ecliptic_longitude(i32 %0) {
%2 = alloca i32
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 %0, i32* %2
%8 = load i32, i32* %2
%9 = sub nsw i32 %8, 631065600
%10 = sitofp i32 %9 to double
%11 = fmul double %10, 0x3EE845C8A0CE5129
store double %11, double* %3
%12 = load double, double* %3
%13 = fmul double 0x3F919D9BCDCA77CD, %12
store double %13, double* %4
%14 = load double, double* %4
%15 = call double @fmod(double %14, i32 6)
store double %15, double* %4
%16 = load double, double* %4
%17 = fcmp olt double %16, 0.000000e+00
br i1 %17, label %18, label %21
18: ; preds = %1
%19 = load double, double* %4
%20 = fadd double %19, 0x401921FB542FE938
store double %20, double* %4
br label %21
21: ; preds = %18, %1
%22 = load double, double* %4
%23 = fadd double %22, 0x4013818B33CE3476
%24 = fsub double %23, 0x4013BDAF8CDE9EB9
store double %24, double* %5
%25 = load double, double* %5
%26 = fcmp olt double %25, 0.000000e+00
br i1 %26, label %27, label %30
27: ; preds = %21
%28 = load double, double* %5
%29 = fadd double %28, 0x401921FB542FE938
store double %29, double* %5
br label %30
30: ; preds = %27, %21
%31 = load double, double* %5
%32 = call double @solve_keplers_equation(double %31)
store double %32, double* %6
%33 = call i32 @sqrt(i32 1)
%34 = load double, double* %6
%35 = fdiv double %34, 2.000000e+00
%36 = call i32 @tan(double %35)
%37 = mul nsw i32 %33, %36
%38 = call i32 @atan(i32 %37)
%39 = mul nsw i32 2, %38
%40 = sitofp i32 %39 to double
store double %40, double* %7
%41 = load double, double* %7
%42 = fadd double %41, 0x4013BDAF8CDE9EB9
ret double %42
}

LLVM IR (-O2):
define double @sun_ecliptic_longitude(i32 %0) {
%2 = add nsw i32 %0, -631065600
%3 = sitofp i32 %2 to double
%4 = fmul double %3, 0x3EE845C8A0CE5129
%5 = fmul double %4, 0x3F919D9BCDCA77CD
%6 = tail call double @fmod(double %5, i32 6)
%7 = fcmp olt double %6, 0.000000e+00
%8 = fadd double %6, 0x401921FB542FE938
%9 = select i1 %7, double %8, double %6
%10 = fadd double %9, 0x4013818B33CE3476
%11 = fadd double %10, 0xC013BDAF8CDE9EB9
%12 = fcmp olt double %11, 0.000000e+00
%13 = fadd double %11, 0x401921FB542FE938
%14 = select i1 %12, double %13, double %11
%15 = tail call double @solve_keplers_equation(double %14)
%16 = tail call i32 @sqrt(i32 1)
%17 = fmul double %15, 5.000000e-01
%18 = tail call i32 @tan(double %17)
%19 = mul nsw i32 %18, %16
%20 = tail call i32 @atan(i32 %19)
%21 = shl nsw i32 %20, 1
%22 = sitofp i32 %21 to double
%23 = fadd double %22, 0x4013BDAF8CDE9EB9
ret double %23
}