#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 Obliquity(double);
double asin(double);
double atan2(double, double);
double cos(double);
double modpi2(double);
double sin(double);
void sun_position(double tJ2000, double *solar_ra, double *solar_dec,
                  double *solar_dist) {
  double L, M, C, e, e2, Lon, Obl;
  Obl = Obliquity(tJ2000);
  L = (280.46646 + tJ2000 * (36000.76983 + tJ2000 * 0.0003032)) *
      0.0174532925199432;
  M = (357.52910 + tJ2000 * (35999.05028 - tJ2000 * 0.0001561)) *
      0.0174532925199432;
  e = 0.016708617 - tJ2000 * (0.000042040 + tJ2000 * 0.0000001236);
  e2 = e * e;
  C = e * (2 - 0.25 * e2) * sin(M) + 1.25 * e2 * sin(2 * M) +
      1.0833333333 * e * e2 * sin(3 * M);
  Lon = modpi2(L + C);
  *solar_ra = modpi2(atan2(cos(Obl) * sin(Lon), cos(Lon)));
  *solar_dec = asin(sin(Obl) * sin(Lon));
  *solar_dist = 1.0000002 * (1 - e2) / (1 + e * cos(M + C));
}


x86 assembly (clang, -O0):
<sun_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1070 <Obliquity@plt>
movsd  %xmm0,-0x58(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xedb(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xed7(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xeb7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  0xe69(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe65(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe45(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe31(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe06(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xe02(%rip),%xmm2
addsd  %xmm2,%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xdcb(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
movsd  0xd99(%rip),%xmm2
mulsd  %xmm2,%xmm1
movsd  0xd7d(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
movsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0xa0(%rbp)
ff
movsd  0xd5b(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0xa8(%rbp)
ff
movsd  0xd3e(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0xa8(%rbp),%xmm1
ff
movsd  -0xa0(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x98(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  0xcf5(%rip),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  0xcd3(%rip),%xmm0
mulsd  -0x30(%rbp),%xmm0
call   1050 <sin@plt>
movsd  -0x90(%rbp),%xmm1
ff
movaps %xmm0,%xmm2
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
call   1040 <modpi2@plt>
movsd  %xmm0,-0x50(%rbp)
movsd  -0x58(%rbp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,-0x80(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x80(%rbp),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  -0x78(%rbp),%xmm0
call   1030 <atan2@plt>
call   1040 <modpi2@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x58(%rbp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,-0x70(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1050 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x70(%rbp),%xmm0
mulsd  %xmm1,%xmm0
call   1060 <asin@plt>
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  0xbfd(%rip),%xmm1
subsd  -0x48(%rbp),%xmm1
movsd  0xbf8(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x30(%rbp),%xmm0
addsd  -0x38(%rbp),%xmm0
call   1080 <cos@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xbb5(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sun_position>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
call   1070 <Obliquity@plt>
movsd  0xe7b(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
mulsd  %xmm2,%xmm1
addsd  0xe71(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe6d(%rip),%xmm1
movsd  %xmm0,0x20(%rsp)
movsd  0xe67(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  0xe5d(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe59(%rip),%xmm1
mulsd  %xmm2,%xmm1
addsd  0xe55(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0xe4b(%rip),%xmm0
mulsd  %xmm2,%xmm0
addsd  0xe47(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  0xe43(%rip),%xmm2
subsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
movsd  %xmm2,0x30(%rsp)
mulsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0xe2b(%rip),%xmm3
mulsd  %xmm0,%xmm3
addsd  0xe27(%rip),%xmm3
mulsd  %xmm2,%xmm3
movsd  %xmm3,0x10(%rsp)
movapd %xmm1,%xmm0
call   1050 <sin@plt>
movsd  %xmm0,(%rsp)
movsd  0xe0f(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x38(%rsp)
movsd  0x28(%rsp),%xmm0
addsd  %xmm0,%xmm0
call   1050 <sin@plt>
mulsd  0x38(%rsp),%xmm0
movsd  (%rsp),%xmm1
mulsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x10(%rsp)
movsd  0xdd9(%rip),%xmm0
mulsd  0x30(%rsp),%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0xdc8(%rip),%xmm0
mulsd  0x28(%rsp),%xmm0
call   1050 <sin@plt>
movapd %xmm0,%xmm1
mulsd  (%rsp),%xmm1
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,0x10(%rsp)
movsd  0x18(%rsp),%xmm0
addsd  %xmm1,%xmm0
call   1040 <modpi2@plt>
movsd  %xmm0,0x18(%rsp)
movsd  0x20(%rsp),%xmm0
call   1080 <cos@plt>
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  (%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x18(%rsp),%xmm0
call   1080 <cos@plt>
movaps %xmm0,%xmm1
movsd  (%rsp),%xmm0
call   1030 <atan2@plt>
call   1040 <modpi2@plt>
movsd  %xmm0,(%rbx)
movsd  0x20(%rsp),%xmm0
call   1050 <sin@plt>
movsd  %xmm0,0x20(%rsp)
movsd  0x18(%rsp),%xmm0
call   1050 <sin@plt>
mulsd  0x20(%rsp),%xmm0
call   1060 <asin@plt>
movsd  %xmm0,(%r15)
movsd  0xd21(%rip),%xmm0
subsd  0x8(%rsp),%xmm0
mulsd  0xd1b(%rip),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
addsd  0x28(%rsp),%xmm0
call   1080 <cos@plt>
mulsd  0x30(%rsp),%xmm0
addsd  0xcee(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @sun_position(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
store double %0, double* %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%16 = load double, double* %5
%17 = call double @Obliquity(double %16)
store double %17, double* %15
%18 = load double, double* %5
%19 = load double, double* %5
%20 = call double @llvm.fmuladd.f64(double %19, double 3.032000e-04, double 0x40E19418A272862F)
%21 = call double @llvm.fmuladd.f64(double %18, double %20, double 0x407187769EC2CE46)
%22 = fmul double %21, 0x3F91DF46A2529D1D
store double %22, double* %9
%23 = load double, double* %5
%24 = load double, double* %5
%25 = fneg double %24
%26 = call double @llvm.fmuladd.f64(double %25, double 1.561000e-04, double 0x40E193E19BE4CD75)
%27 = call double @llvm.fmuladd.f64(double %23, double %26, double 0x40765877318FC505)
%28 = fmul double %27, 0x3F91DF46A2529D1D
store double %28, double* %10
%29 = load double, double* %5
%30 = load double, double* %5
%31 = call double @llvm.fmuladd.f64(double %30, double 1.236000e-07, double 4.204000e-05)
%32 = fneg double %29
%33 = call double @llvm.fmuladd.f64(double %32, double %31, double 0x3F911C104E4E3915)
store double %33, double* %12
%34 = load double, double* %12
%35 = load double, double* %12
%36 = fmul double %34, %35
store double %36, double* %13
%37 = load double, double* %12
%38 = load double, double* %13
%39 = call double @llvm.fmuladd.f64(double -2.500000e-01, double %38, double 2.000000e+00)
%40 = fmul double %37, %39
%41 = load double, double* %10
%42 = call double @sin(double %41)
%43 = load double, double* %13
%44 = fmul double 1.250000e+00, %43
%45 = load double, double* %10
%46 = fmul double 2.000000e+00, %45
%47 = call double @sin(double %46)
%48 = fmul double %44, %47
%49 = call double @llvm.fmuladd.f64(double %40, double %42, double %48)
%50 = load double, double* %12
%51 = fmul double 0x3FF1555555530AED, %50
%52 = load double, double* %13
%53 = fmul double %51, %52
%54 = load double, double* %10
%55 = fmul double 3.000000e+00, %54
%56 = call double @sin(double %55)
%57 = call double @llvm.fmuladd.f64(double %53, double %56, double %49)
store double %57, double* %11
%58 = load double, double* %9
%59 = load double, double* %11
%60 = fadd double %58, %59
%61 = call double @modpi2(double %60)
store double %61, double* %14
%62 = load double, double* %15
%63 = call double @cos(double %62)
%64 = load double, double* %14
%65 = call double @sin(double %64)
%66 = fmul double %63, %65
%67 = load double, double* %14
%68 = call double @cos(double %67)
%69 = call double @atan2(double %66, double %68)
%70 = call double @modpi2(double %69)
%71 = load double*, double** %6
store double %70, double* %71
%72 = load double, double* %15
%73 = call double @sin(double %72)
%74 = load double, double* %14
%75 = call double @sin(double %74)
%76 = fmul double %73, %75
%77 = call double @asin(double %76)
%78 = load double*, double** %7
store double %77, double* %78
%79 = load double, double* %13
%80 = fsub double 1.000000e+00, %79
%81 = fmul double 0x3FF0000035AFE535, %80
%82 = load double, double* %12
%83 = load double, double* %10
%84 = load double, double* %11
%85 = fadd double %83, %84
%86 = call double @cos(double %85)
%87 = call double @llvm.fmuladd.f64(double %82, double %86, double 1.000000e+00)
%88 = fdiv double %81, %87
%89 = load double*, double** %8
store double %88, double* %89
ret void
}

LLVM IR (-O2):
define void @sun_position(double %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = tail call double @Obliquity(double %0)
%6 = tail call double @llvm.fmuladd.f64(double %0, double 3.032000e-04, double 0x40E19418A272862F)
%7 = tail call double @llvm.fmuladd.f64(double %0, double %6, double 0x407187769EC2CE46)
%8 = fmul double %7, 0x3F91DF46A2529D1D
%9 = fneg double %0
%10 = tail call double @llvm.fmuladd.f64(double %9, double 1.561000e-04, double 0x40E193E19BE4CD75)
%11 = tail call double @llvm.fmuladd.f64(double %0, double %10, double 0x40765877318FC505)
%12 = fmul double %11, 0x3F91DF46A2529D1D
%13 = tail call double @llvm.fmuladd.f64(double %0, double 1.236000e-07, double 4.204000e-05)
%14 = tail call double @llvm.fmuladd.f64(double %9, double %13, double 0x3F911C104E4E3915)
%15 = fmul double %14, %14
%16 = tail call double @llvm.fmuladd.f64(double %15, double -2.500000e-01, double 2.000000e+00)
%17 = fmul double %14, %16
%18 = tail call double @sin(double %12)
%19 = fmul double %15, 1.250000e+00
%20 = fmul double %12, 2.000000e+00
%21 = tail call double @sin(double %20)
%22 = fmul double %19, %21
%23 = tail call double @llvm.fmuladd.f64(double %17, double %18, double %22)
%24 = fmul double %14, 0x3FF1555555530AED
%25 = fmul double %24, %15
%26 = fmul double %12, 3.000000e+00
%27 = tail call double @sin(double %26)
%28 = tail call double @llvm.fmuladd.f64(double %25, double %27, double %23)
%29 = fadd double %8, %28
%30 = tail call double @modpi2(double %29)
%31 = tail call double @cos(double %5)
%32 = tail call double @sin(double %30)
%33 = fmul double %31, %32
%34 = tail call double @cos(double %30)
%35 = tail call double @atan2(double %33, double %34)
%36 = tail call double @modpi2(double %35)
store double %36, double* %1
%37 = tail call double @sin(double %5)
%38 = tail call double @sin(double %30)
%39 = fmul double %37, %38
%40 = tail call double @asin(double %39)
store double %40, double* %2
%41 = fsub double 1.000000e+00, %15
%42 = fmul double %41, 0x3FF0000035AFE535
%43 = fadd double %12, %28
%44 = tail call double @cos(double %43)
%45 = tail call double @llvm.fmuladd.f64(double %14, double %44, double 1.000000e+00)
%46 = fdiv double %42, %45
store double %46, double* %3
ret void
}