#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 asin(double);
double atan2(double, double);
double calc_gmst(double);
double cos(double);
double fmod(double, int);
double sin(int);
void solar_coords_and_times(double jtime, double *delta,
                            double *gw_mean_sol_time,
                            double *gw_appar_sol_time) {
  double a;
  double jdelta;
  double L;
  double g;
  double lambda;
  double epsilon;
  double alpha;
  double gmst;
  double E;
  jdelta = jtime - 2451545.;
  L = (280.466 + .9856474 * jdelta) * (3.14159265358979323846264338327 / 180.0);
  L = fmod(L, (3.14159265358979323846264338327 * 2.));
  g = (357.528 + .9856003 * jdelta) * (3.14159265358979323846264338327 / 180.0);
  g = fmod(g, (3.14159265358979323846264338327 * 2.));
  a = 1.915 * sin(g) + .020 * sin(2.0 * g);
  lambda = L + a * (3.14159265358979323846264338327 / 180.0);
  epsilon =
      (23.44 - .0000004 * jdelta) * (3.14159265358979323846264338327 / 180.0);
  alpha = atan2(cos(epsilon) * sin(lambda), cos(epsilon) * cos(lambda));
  if (alpha <= 0.)
    alpha += (3.14159265358979323846264338327 * 2.);
  *delta = asin(sin(epsilon) * sin(lambda));
  gmst = calc_gmst(jtime);
  *gw_mean_sol_time =
      (gmst - .5 - alpha / (3.14159265358979323846264338327 * 2.));
  if ((*gw_mean_sol_time = fmod(*gw_mean_sol_time, 1.)) < 0.)
    *gw_mean_sol_time += 1.;
  E = (-a + 2.466 * sin(2 * lambda) - .053 * sin(4 * lambda)) / 360.;
  *gw_appar_sol_time = *gw_mean_sol_time + E;
  if ((*gw_appar_sol_time = fmod(*gw_appar_sol_time, 1.)) < 0.)
    *gw_appar_sol_time += 1.;
}


x86 assembly (clang, -O0):
<solar_coords_and_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xea1(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe9d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe49(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xe4f(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe4b(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe07(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  %xmm0,-0x40(%rbp)
cvttsd2si -0x40(%rbp),%edi
call   1050 <sin@plt>
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xdf8(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm2
movsd  -0x88(%rbp),%xmm0
ff
movsd  0xdcf(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xdbb(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x38(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  0xd84(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  0xd72(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xd6e(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xd52(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x80(%rbp)
cvttsd2si -0x48(%rbp),%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,-0x78(%rbp)
movsd  -0x48(%rbp),%xmm0
call   1070 <cos@plt>
movsd  -0x78(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm2,%xmm1
call   1030 <atan2@plt>
movsd  %xmm0,-0x58(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x58(%rbp),%xmm0
jb     1335 <solar_coords_and_times+0x1d5>
movsd  0xd2d(%rip),%xmm0
addsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
cvttsd2si -0x50(%rbp),%edi
call   1050 <sin@plt>
movsd  %xmm0,-0x90(%rbp)
ff
cvttsd2si -0x48(%rbp),%edi
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x90(%rbp),%xmm0
ff
mulsd  %xmm1,%xmm0
call   1060 <asin@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
call   1080 <calc_gmst@plt>
movsd  %xmm0,-0x60(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xcd7(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  -0x58(%rbp),%xmm1
movsd  0xcbe(%rip),%xmm2
divsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%edi
call   1040 <fmod@plt>
movaps %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  %xmm1,(%rax)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    13e8 <solar_coords_and_times+0x288>
mov    -0x18(%rbp),%rax
movsd  0xc88(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xc14(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  -0xa0(%rbp),%xmm1
ff
movsd  0xc56(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  0xc36(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  -0x98(%rbp),%xmm1
ff
movsd  0xc10(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xbf8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%edi
call   1040 <fmod@plt>
movaps %xmm0,%xmm1
mov    -0x20(%rbp),%rax
movsd  %xmm1,(%rax)
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    14d4 <solar_coords_and_times+0x374>
mov    -0x20(%rbp),%rax
movsd  0xb9c(%rip),%xmm0
addsd  (%rax),%xmm0
movsd  %xmm0,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solar_coords_and_times>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
movsd  %xmm0,0x30(%rsp)
movsd  0xe7f(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0xe76(%rip),%xmm0
mulsd  %xmm1,%xmm0
addsd  0xe72(%rip),%xmm0
mulsd  0xe72(%rip),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe62(%rip),%xmm0
mulsd  (%rsp),%xmm0
addsd  0xe5d(%rip),%xmm0
mulsd  0xe45(%rip),%xmm0
mov    $0x6,%edi
call   1040 <fmod@plt>
movsd  %xmm0,0x10(%rsp)
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xe23(%rip),%xmm0
movsd  0x20(%rsp),%xmm1
mulsd  0xe1d(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x20(%rsp)
movsd  0xdeb(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  (%rsp),%xmm0
mulsd  0xe02(%rip),%xmm0
addsd  0x8(%rsp),%xmm1
movsd  %xmm1,0x8(%rsp)
addsd  0xdf6(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  %xmm0,(%rsp)
call   1070 <cos@plt>
movsd  %xmm0,0x10(%rsp)
cvttsd2si 0x8(%rsp),%ebp
mov    %ebp,%edi
call   1050 <sin@plt>
mulsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
call   1070 <cos@plt>
movsd  %xmm0,0x28(%rsp)
movsd  0x8(%rsp),%xmm0
call   1070 <cos@plt>
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x10(%rsp),%xmm0
call   1030 <atan2@plt>
movapd %xmm0,%xmm1
addsd  0xd95(%rip),%xmm1
xorpd  %xmm2,%xmm2
movapd %xmm0,%xmm3
cmpnlesd %xmm2,%xmm3
andpd  %xmm3,%xmm0
andnpd %xmm1,%xmm3
orpd   %xmm0,%xmm3
movapd %xmm3,0x10(%rsp)
cvttsd2si (%rsp),%edi
call   1050 <sin@plt>
movsd  %xmm0,(%rsp)
mov    %ebp,%edi
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
call   1060 <asin@plt>
movsd  %xmm0,(%r15)
movsd  0x30(%rsp),%xmm0
call   1080 <calc_gmst@plt>
addsd  0xd46(%rip),%xmm0
movapd 0x10(%rsp),%xmm1
divsd  0xd30(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
mov    $0x1,%edi
call   1040 <fmod@plt>
movsd  0xd26(%rip),%xmm2
movapd %xmm0,%xmm1
addsd  %xmm2,%xmm1
movapd %xmm0,%xmm2
cmpltsd 0xd39(%rip),%xmm2
andpd  %xmm2,%xmm1
andnpd %xmm0,%xmm2
orpd   %xmm1,%xmm2
movlpd %xmm2,(%rbx)
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xcee(%rip),%xmm0
subsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x8(%rsp),%xmm0
mulsd  0xcdd(%rip),%xmm0
cvttsd2si %xmm0,%edi
call   1050 <sin@plt>
mulsd  0xcd4(%rip),%xmm0
addsd  (%rsp),%xmm0
divsd  0xccf(%rip),%xmm0
addsd  (%rbx),%xmm0
movsd  %xmm0,(%r14)
mov    $0x1,%edi
call   1040 <fmod@plt>
movsd  0xc94(%rip),%xmm2
addsd  %xmm0,%xmm2
movapd %xmm0,%xmm1
cmpltsd 0xcab(%rip),%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movlpd %xmm1,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @solar_coords_and_times(double %0, double* %1, double* %2, double* %3) {
%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* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%18 = load double, double* %5
%19 = fsub double %18, 0x4142B42C80000000
store double %19, double* %10
%20 = load double, double* %10
%21 = call double @llvm.fmuladd.f64(double 0x3FEF8A6C6A8C65D4, double %20, double 2.804660e+02)
%22 = fmul double %21, 0x3F91DF46A2529D39
store double %22, double* %11
%23 = load double, double* %11
%24 = call double @fmod(double %23, i32 6)
store double %24, double* %11
%25 = load double, double* %10
%26 = call double @llvm.fmuladd.f64(double 0x3FEF8A09A3EDB072, double %25, double 3.575280e+02)
%27 = fmul double %26, 0x3F91DF46A2529D39
store double %27, double* %12
%28 = load double, double* %12
%29 = call double @fmod(double %28, i32 6)
store double %29, double* %12
%30 = load double, double* %12
%31 = fptosi double %30 to i32
%32 = call double @sin(i32 %31)
%33 = load double, double* %12
%34 = fmul double 2.000000e+00, %33
%35 = fptosi double %34 to i32
%36 = call double @sin(i32 %35)
%37 = fmul double 2.000000e-02, %36
%38 = call double @llvm.fmuladd.f64(double 1.915000e+00, double %32, double %37)
store double %38, double* %9
%39 = load double, double* %11
%40 = load double, double* %9
%41 = call double @llvm.fmuladd.f64(double %40, double 0x3F91DF46A2529D39, double %39)
store double %41, double* %13
%42 = load double, double* %10
%43 = call double @llvm.fmuladd.f64(double -4.000000e-07, double %42, double 2.344000e+01)
%44 = fmul double %43, 0x3F91DF46A2529D39
store double %44, double* %14
%45 = load double, double* %14
%46 = call double @cos(double %45)
%47 = load double, double* %13
%48 = fptosi double %47 to i32
%49 = call double @sin(i32 %48)
%50 = fmul double %46, %49
%51 = load double, double* %14
%52 = call double @cos(double %51)
%53 = load double, double* %13
%54 = call double @cos(double %53)
%55 = fmul double %52, %54
%56 = call double @atan2(double %50, double %55)
store double %56, double* %15
%57 = load double, double* %15
%58 = fcmp ole double %57, 0.000000e+00
br i1 %58, label %59, label %62
59: ; preds = %4
%60 = load double, double* %15
%61 = fadd double %60, 0x401921FB54442D18
store double %61, double* %15
br label %62
62: ; preds = %59, %4
%63 = load double, double* %14
%64 = fptosi double %63 to i32
%65 = call double @sin(i32 %64)
%66 = load double, double* %13
%67 = fptosi double %66 to i32
%68 = call double @sin(i32 %67)
%69 = fmul double %65, %68
%70 = call double @asin(double %69)
%71 = load double*, double** %6
store double %70, double* %71
%72 = load double, double* %5
%73 = call double @calc_gmst(double %72)
store double %73, double* %16
%74 = load double, double* %16
%75 = fsub double %74, 5.000000e-01
%76 = load double, double* %15
%77 = fdiv double %76, 0x401921FB54442D18
%78 = fsub double %75, %77
%79 = load double*, double** %7
store double %78, double* %79
%80 = load double*, double** %7
%81 = load double, double* %80
%82 = call double @fmod(double %81, i32 1)
%83 = load double*, double** %7
store double %82, double* %83
%84 = fcmp olt double %82, 0.000000e+00
br i1 %84, label %85, label %89
85: ; preds = %62
%86 = load double*, double** %7
%87 = load double, double* %86
%88 = fadd double %87, 1.000000e+00
store double %88, double* %86
br label %89
89: ; preds = %85, %62
%90 = load double, double* %9
%91 = fneg double %90
%92 = load double, double* %13
%93 = fmul double 2.000000e+00, %92
%94 = fptosi double %93 to i32
%95 = call double @sin(i32 %94)
%96 = call double @llvm.fmuladd.f64(double 2.466000e+00, double %95, double %91)
%97 = load double, double* %13
%98 = fmul double 4.000000e+00, %97
%99 = fptosi double %98 to i32
%100 = call double @sin(i32 %99)
%101 = call double @llvm.fmuladd.f64(double -5.300000e-02, double %100, double %96)
%102 = fdiv double %101, 3.600000e+02
store double %102, double* %17
%103 = load double*, double** %7
%104 = load double, double* %103
%105 = load double, double* %17
%106 = fadd double %104, %105
%107 = load double*, double** %8
store double %106, double* %107
%108 = load double*, double** %8
%109 = load double, double* %108
%110 = call double @fmod(double %109, i32 1)
%111 = load double*, double** %8
store double %110, double* %111
%112 = fcmp olt double %110, 0.000000e+00
br i1 %112, label %113, label %117
113: ; preds = %89
%114 = load double*, double** %8
%115 = load double, double* %114
%116 = fadd double %115, 1.000000e+00
store double %116, double* %114
br label %117
117: ; preds = %113, %89
ret void
}

LLVM IR (-O2):
define void @solar_coords_and_times(double %0, double* nocapture writeonly %1, double* nocapture %2, double* nocapture writeonly %3) {
%5 = fadd double %0, 0xC142B42C80000000
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FEF8A6C6A8C65D4, double 2.804660e+02)
%7 = fmul double %6, 0x3F91DF46A2529D39
%8 = tail call double @fmod(double %7, i32 6)
%9 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FEF8A09A3EDB072, double 3.575280e+02)
%10 = fmul double %9, 0x3F91DF46A2529D39
%11 = tail call double @fmod(double %10, i32 6)
%12 = fptosi double %11 to i32
%13 = tail call double @sin(i32 %12)
%14 = fmul double %11, 2.000000e+00
%15 = fptosi double %14 to i32
%16 = tail call double @sin(i32 %15)
%17 = fmul double %16, 2.000000e-02
%18 = tail call double @llvm.fmuladd.f64(double %13, double 1.915000e+00, double %17)
%19 = tail call double @llvm.fmuladd.f64(double %18, double 0x3F91DF46A2529D39, double %8)
%20 = tail call double @llvm.fmuladd.f64(double %5, double -4.000000e-07, double 2.344000e+01)
%21 = fmul double %20, 0x3F91DF46A2529D39
%22 = tail call double @cos(double %21)
%23 = fptosi double %19 to i32
%24 = tail call double @sin(i32 %23)
%25 = fmul double %22, %24
%26 = tail call double @cos(double %21)
%27 = tail call double @cos(double %19)
%28 = fmul double %26, %27
%29 = tail call double @atan2(double %25, double %28)
%30 = fcmp ugt double %29, 0.000000e+00
%31 = fadd double %29, 0x401921FB54442D18
%32 = select i1 %30, double %29, double %31
%33 = fptosi double %21 to i32
%34 = tail call double @sin(i32 %33)
%35 = tail call double @sin(i32 %23)
%36 = fmul double %34, %35
%37 = tail call double @asin(double %36)
store double %37, double* %1
%38 = tail call double @calc_gmst(double %0)
%39 = fadd double %38, -5.000000e-01
%40 = fdiv double %32, 0x401921FB54442D18
%41 = fsub double %39, %40
store double %41, double* %2
%42 = tail call double @fmod(double %41, i32 1)
%43 = fcmp olt double %42, 0.000000e+00
%44 = fadd double %42, 1.000000e+00
%45 = select i1 %43, double %44, double %42
store double %45, double* %2
%46 = fneg double %18
%47 = fmul double %19, 2.000000e+00
%48 = fptosi double %47 to i32
%49 = tail call double @sin(i32 %48)
%50 = tail call double @llvm.fmuladd.f64(double %49, double 2.466000e+00, double %46)
%51 = fmul double %19, 4.000000e+00
%52 = fptosi double %51 to i32
%53 = tail call double @sin(i32 %52)
%54 = tail call double @llvm.fmuladd.f64(double %53, double -5.300000e-02, double %50)
%55 = fdiv double %54, 3.600000e+02
%56 = load double, double* %2
%57 = fadd double %56, %55
store double %57, double* %3
%58 = tail call double @fmod(double %57, i32 1)
%59 = fcmp olt double %58, 0.000000e+00
%60 = fadd double %58, 1.000000e+00
%61 = select i1 %59, double %60, double %58
store double %61, double* %3
ret void
}