#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 cos(double);
double sin(double);
void Sun(double RAD, double T, double T2, double *L, double *M, double *R,
         double *LAM0) {
  double T3, C, V, E, THETA, OM;
  T3 = T2 * T;
  *L = 280.466 + 36000.8 * T;
  *M = 357.529 + 35999 * T - .0001536 * T2 + T3 / 24490000;
  *M = *M * RAD;
  C = (1.915 - .004817 * T - .000014 * T2) * sin(*M) +
      (.01999 - .000101 * T) * sin(2 * *M) + .00029 * sin(3 * *M);
  V = *M + C * RAD;
  E = .01671 - .00004204 * T - .0000001236 * T2;
  *R = .99972 / (1 + E * cos(V)) * 145980000;
  THETA = *L + C;
  OM = 125.04 - 1934.1 * T;
  *LAM0 = THETA - .00569 - .00478 * sin(OM * RAD);
}


x86 assembly (clang, -O0):
<Sun>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %rcx,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xf4a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xf46(%rip),%xmm1
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm1
movsd  0xf15(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xf11(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xef0(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x40(%rbp),%xmm1
movsd  0xed3(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm1
movsd  0xe91(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe8d(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe6c(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <sin@plt>
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0x10(%rbp),%xmm0
movsd  0xe2a(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe26(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x28(%rbp),%rax
movsd  0xdfe(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
movsd  -0x98(%rbp),%xmm1
ff
movsd  -0x90(%rbp),%xmm2
ff
movaps %xmm0,%xmm3
movsd  -0x88(%rbp),%xmm0
ff
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x28(%rbp),%rax
movsd  0xdb5(%rip),%xmm0
mulsd  (%rax),%xmm0
call   1030 <sin@plt>
movsd  -0x80(%rbp),%xmm1
movsd  0xd97(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  0xd4e(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd4a(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xd29(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0x50(%rbp),%xmm0
call   1040 <cos@plt>
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xcef(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xcdb(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  0xcc7(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xc8c(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc88(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x60(%rbp),%xmm0
movsd  0xc62(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  -0x68(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <sin@plt>
movsd  -0x70(%rbp),%xmm1
movsd  0xc35(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sun>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
mov    %rdi,%r12
movapd %xmm0,%xmm3
movsd  %xmm0,0x20(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,%xmm6
movsd  0xeab(%rip),%xmm4
mulsd  %xmm1,%xmm4
addsd  0xea7(%rip),%xmm4
movsd  0xea7(%rip),%xmm2
mulsd  %xmm1,%xmm2
movapd %xmm1,%xmm5
movsd  %xmm1,0x18(%rsp)
addsd  0xe99(%rip),%xmm2
movsd  %xmm4,(%rdi)
movsd  0xe95(%rip),%xmm1
movsd  %xmm6,0x10(%rsp)
mulsd  %xmm6,%xmm1
addsd  %xmm2,%xmm1
divsd  0xe87(%rip),%xmm0
addsd  %xmm1,%xmm0
mulsd  %xmm3,%xmm0
movsd  0xe7f(%rip),%xmm1
mulsd  %xmm5,%xmm1
addsd  0xe7b(%rip),%xmm1
movsd  %xmm0,(%rsi)
movsd  0xe77(%rip),%xmm2
mulsd  %xmm6,%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x30(%rsp)
call   1030 <sin@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0xe5e(%rip),%xmm0
mulsd  0x18(%rsp),%xmm0
addsd  0xe58(%rip),%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  (%rbx),%xmm0
addsd  %xmm0,%xmm0
call   1030 <sin@plt>
mulsd  0x28(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0x30(%rsp),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
movsd  (%rbx),%xmm0
mulsd  0xe25(%rip),%xmm0
call   1030 <sin@plt>
mulsd  0xe20(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  0x20(%rsp),%xmm0
addsd  (%rbx),%xmm0
movsd  0xe0a(%rip),%xmm1
mulsd  0x18(%rsp),%xmm1
addsd  0xe04(%rip),%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  0xdfe(%rip),%xmm2
addsd  %xmm1,%xmm2
movsd  %xmm2,0x10(%rsp)
call   1040 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0xde9(%rip),%xmm0
movsd  0xde9(%rip),%xmm1
divsd  %xmm0,%xmm1
mulsd  0xde5(%rip),%xmm1
movsd  %xmm1,(%r15)
movsd  0x8(%rsp),%xmm1
addsd  (%r12),%xmm1
movsd  0x18(%rsp),%xmm0
mulsd  0xdce(%rip),%xmm0
addsd  0xdce(%rip),%xmm0
addsd  0xdce(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
mulsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
mulsd  0xdbd(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @Sun(double %0, double %1, double %2, double* %3, double* %4, double* %5, double* %6) {
%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
%18 = alloca double
%19 = alloca double
%20 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double* %3, double** %11
store double* %4, double** %12
store double* %5, double** %13
store double* %6, double** %14
%21 = load double, double* %10
%22 = load double, double* %9
%23 = fmul double %21, %22
store double %23, double* %15
%24 = load double, double* %9
%25 = call double @llvm.fmuladd.f64(double 3.600080e+04, double %24, double 2.804660e+02)
%26 = load double*, double** %11
store double %25, double* %26
%27 = load double, double* %9
%28 = call double @llvm.fmuladd.f64(double 3.599900e+04, double %27, double 3.575290e+02)
%29 = load double, double* %10
%30 = call double @llvm.fmuladd.f64(double -1.536000e-04, double %29, double %28)
%31 = load double, double* %15
%32 = fdiv double %31, 2.449000e+07
%33 = fadd double %30, %32
%34 = load double*, double** %12
store double %33, double* %34
%35 = load double*, double** %12
%36 = load double, double* %35
%37 = load double, double* %8
%38 = fmul double %36, %37
%39 = load double*, double** %12
store double %38, double* %39
%40 = load double, double* %9
%41 = call double @llvm.fmuladd.f64(double -4.817000e-03, double %40, double 1.915000e+00)
%42 = load double, double* %10
%43 = call double @llvm.fmuladd.f64(double -1.400000e-05, double %42, double %41)
%44 = load double*, double** %12
%45 = load double, double* %44
%46 = call double @sin(double %45)
%47 = load double, double* %9
%48 = call double @llvm.fmuladd.f64(double -1.010000e-04, double %47, double 1.999000e-02)
%49 = load double*, double** %12
%50 = load double, double* %49
%51 = fmul double 2.000000e+00, %50
%52 = call double @sin(double %51)
%53 = fmul double %48, %52
%54 = call double @llvm.fmuladd.f64(double %43, double %46, double %53)
%55 = load double*, double** %12
%56 = load double, double* %55
%57 = fmul double 3.000000e+00, %56
%58 = call double @sin(double %57)
%59 = call double @llvm.fmuladd.f64(double 2.900000e-04, double %58, double %54)
store double %59, double* %16
%60 = load double*, double** %12
%61 = load double, double* %60
%62 = load double, double* %16
%63 = load double, double* %8
%64 = call double @llvm.fmuladd.f64(double %62, double %63, double %61)
store double %64, double* %17
%65 = load double, double* %9
%66 = call double @llvm.fmuladd.f64(double -4.204000e-05, double %65, double 1.671000e-02)
%67 = load double, double* %10
%68 = call double @llvm.fmuladd.f64(double -1.236000e-07, double %67, double %66)
store double %68, double* %18
%69 = load double, double* %18
%70 = load double, double* %17
%71 = call double @cos(double %70)
%72 = call double @llvm.fmuladd.f64(double %69, double %71, double 1.000000e+00)
%73 = fdiv double 9.997200e-01, %72
%74 = fmul double %73, 1.459800e+08
%75 = load double*, double** %13
store double %74, double* %75
%76 = load double*, double** %11
%77 = load double, double* %76
%78 = load double, double* %16
%79 = fadd double %77, %78
store double %79, double* %19
%80 = load double, double* %9
%81 = call double @llvm.fmuladd.f64(double -1.934100e+03, double %80, double 1.250400e+02)
store double %81, double* %20
%82 = load double, double* %19
%83 = fsub double %82, 5.690000e-03
%84 = load double, double* %20
%85 = load double, double* %8
%86 = fmul double %84, %85
%87 = call double @sin(double %86)
%88 = call double @llvm.fmuladd.f64(double -4.780000e-03, double %87, double %83)
%89 = load double*, double** %14
store double %88, double* %89
ret void
}

LLVM IR (-O2):
define void @Sun(double %0, double %1, double %2, double* nocapture %3, double* nocapture %4, double* nocapture writeonly %5, double* nocapture writeonly %6) {
%8 = fmul double %1, %2
%9 = tail call double @llvm.fmuladd.f64(double %1, double 3.600080e+04, double 2.804660e+02)
store double %9, double* %3
%10 = tail call double @llvm.fmuladd.f64(double %1, double 3.599900e+04, double 3.575290e+02)
%11 = tail call double @llvm.fmuladd.f64(double %2, double -1.536000e-04, double %10)
%12 = fdiv double %8, 2.449000e+07
%13 = fadd double %11, %12
%14 = fmul double %13, %0
store double %14, double* %4
%15 = tail call double @llvm.fmuladd.f64(double %1, double -4.817000e-03, double 1.915000e+00)
%16 = tail call double @llvm.fmuladd.f64(double %2, double -1.400000e-05, double %15)
%17 = tail call double @sin(double %14)
%18 = tail call double @llvm.fmuladd.f64(double %1, double -1.010000e-04, double 1.999000e-02)
%19 = load double, double* %4
%20 = fmul double %19, 2.000000e+00
%21 = tail call double @sin(double %20)
%22 = fmul double %18, %21
%23 = tail call double @llvm.fmuladd.f64(double %16, double %17, double %22)
%24 = load double, double* %4
%25 = fmul double %24, 3.000000e+00
%26 = tail call double @sin(double %25)
%27 = tail call double @llvm.fmuladd.f64(double %26, double 2.900000e-04, double %23)
%28 = load double, double* %4
%29 = tail call double @llvm.fmuladd.f64(double %27, double %0, double %28)
%30 = tail call double @llvm.fmuladd.f64(double %1, double -4.204000e-05, double 1.671000e-02)
%31 = tail call double @llvm.fmuladd.f64(double %2, double -1.236000e-07, double %30)
%32 = tail call double @cos(double %29)
%33 = tail call double @llvm.fmuladd.f64(double %31, double %32, double 1.000000e+00)
%34 = fdiv double 9.997200e-01, %33
%35 = fmul double %34, 1.459800e+08
store double %35, double* %5
%36 = load double, double* %3
%37 = fadd double %27, %36
%38 = tail call double @llvm.fmuladd.f64(double %1, double -1.934100e+03, double 1.250400e+02)
%39 = fadd double %37, -5.690000e-03
%40 = fmul double %38, %0
%41 = tail call double @sin(double %40)
%42 = tail call double @llvm.fmuladd.f64(double %41, double -4.780000e-03, double %39)
store double %42, double* %6
ret void
}