#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 sunmodel_sun_rad_vector(double t, double m, double seoc, double e) {
  double v, r;
  v = m + seoc;
  r = (1.000001018 * (1.0 - e * e)) / (1.0 + e * cos(v));
  return r;
}


x86 assembly (clang, -O0):
<sunmodel_sun_rad_vector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm0,%xmm1
movsd  0xe98(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe94(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1030 <cos@plt>
movsd  -0x40(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x38(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe56(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x30(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sunmodel_sun_rad_vector>:
sub    $0x18,%rsp
movsd  %xmm3,0x10(%rsp)
movapd %xmm1,%xmm0
addsd  %xmm2,%xmm0
movapd %xmm3,%xmm1
mulsd  %xmm3,%xmm1
movsd  0xece(%rip),%xmm2
subsd  %xmm1,%xmm2
mulsd  0xeca(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
call   1030 <cos@plt>
mulsd  0x10(%rsp),%xmm0
addsd  0xea9(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @sunmodel_sun_rad_vector(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
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %6
%12 = load double, double* %7
%13 = fadd double %11, %12
store double %13, double* %9
%14 = load double, double* %8
%15 = load double, double* %8
%16 = fneg double %14
%17 = call double @llvm.fmuladd.f64(double %16, double %15, double 1.000000e+00)
%18 = fmul double 0x3FF0000111446D65, %17
%19 = load double, double* %8
%20 = load double, double* %9
%21 = call double @cos(double %20)
%22 = call double @llvm.fmuladd.f64(double %19, double %21, double 1.000000e+00)
%23 = fdiv double %18, %22
store double %23, double* %10
%24 = load double, double* %10
ret double %24
}

LLVM IR (-O2):
define double @sunmodel_sun_rad_vector(double %0, double %1, double %2, double %3) {
%5 = fadd double %1, %2
%6 = fneg double %3
%7 = tail call double @llvm.fmuladd.f64(double %6, double %3, double 1.000000e+00)
%8 = fmul double %7, 0x3FF0000111446D65
%9 = tail call double @cos(double %5)
%10 = tail call double @llvm.fmuladd.f64(double %3, double %9, double 1.000000e+00)
%11 = fdiv double %8, %10
ret double %11
}