#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(int);
double cos(double);
int sin(double);
double sqrt(double);
void orbitParams(double a, double ecc, double obliq, double omega, double nu,
                 double *dec, double *r, double *nudot) {
  double x;
  x = a * (1.0 - ecc * ecc);
  *r = x / (1.0 + ecc * cos(nu));
  *dec = asin(sin(obliq) * sin(nu + omega));
  *nudot = (1.0 / ((*r) * (*r))) * sqrt(3.96423e-014 * x);
}


x86 assembly (clang, -O0):
<orbitParams>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
mov    %rsi,-0x38(%rbp)
mov    %rdx,-0x40(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm1
movsd  0xe69(%rip),%xmm2
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <cos@plt>
movsd  -0x68(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x60(%rbp),%xmm0
mulsd  %xmm2,%xmm1
movsd  0xe25(%rip),%xmm2
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
call   1030 <sin@plt>
mov    %eax,-0x54(%rbp)
movsd  -0x28(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
call   1030 <sin@plt>
mov    -0x54(%rbp),%edi
imul   %eax,%edi
call   1040 <asin@plt>
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x38(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x38(%rbp),%rax
mulsd  (%rax),%xmm1
movsd  0xdce(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xdb5(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x50(%rbp),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orbitParams>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
movsd  %xmm4,0x20(%rsp)
movsd  %xmm3,0x30(%rsp)
movsd  %xmm2,0x28(%rsp)
movsd  %xmm1,0x18(%rsp)
movapd %xmm1,%xmm3
mulsd  %xmm1,%xmm3
movsd  0xe85(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
subsd  %xmm3,%xmm2
mulsd  %xmm0,%xmm2
movsd  %xmm2,0x10(%rsp)
movapd %xmm4,%xmm0
call   1050 <cos@plt>
mulsd  0x18(%rsp),%xmm0
addsd  0xe5a(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
movsd  0x28(%rsp),%xmm0
call   1030 <sin@plt>
mov    %eax,%ebp
movsd  0x30(%rsp),%xmm0
addsd  0x20(%rsp),%xmm0
call   1030 <sin@plt>
imul   %eax,%ebp
mov    %ebp,%edi
call   1040 <asin@plt>
movsd  %xmm0,(%r15)
movsd  (%rbx),%xmm0
mulsd  %xmm0,%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe11(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
movapd %xmm1,%xmm0
jb     121b <orbitParams+0xdb>
sqrtsd %xmm0,%xmm0
jmp    1220 <orbitParams+0xe0>
call   1060 <sqrt@plt>
mulsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%r14)
add    $0x38,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @orbitParams(double %0, double %1, double %2, double %3, double %4, double* %5, double* %6, double* %7) {
%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* %9
store double %1, double* %10
store double %2, double* %11
store double %3, double* %12
store double %4, double* %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
%18 = load double, double* %9
%19 = load double, double* %10
%20 = load double, double* %10
%21 = fneg double %19
%22 = call double @llvm.fmuladd.f64(double %21, double %20, double 1.000000e+00)
%23 = fmul double %18, %22
store double %23, double* %17
%24 = load double, double* %17
%25 = load double, double* %10
%26 = load double, double* %13
%27 = call double @cos(double %26)
%28 = call double @llvm.fmuladd.f64(double %25, double %27, double 1.000000e+00)
%29 = fdiv double %24, %28
%30 = load double*, double** %15
store double %29, double* %30
%31 = load double, double* %11
%32 = call i32 @sin(double %31)
%33 = load double, double* %13
%34 = load double, double* %12
%35 = fadd double %33, %34
%36 = call i32 @sin(double %35)
%37 = mul nsw i32 %32, %36
%38 = call double @asin(i32 %37)
%39 = load double*, double** %14
store double %38, double* %39
%40 = load double*, double** %15
%41 = load double, double* %40
%42 = load double*, double** %15
%43 = load double, double* %42
%44 = fmul double %41, %43
%45 = fdiv double 1.000000e+00, %44
%46 = load double, double* %17
%47 = fmul double 3.964230e-14, %46
%48 = call double @sqrt(double %47)
%49 = fmul double %45, %48
%50 = load double*, double** %16
store double %49, double* %50
ret void
}

LLVM IR (-O2):
define void @orbitParams(double %0, double %1, double %2, double %3, double %4, double* nocapture writeonly %5, double* nocapture %6, double* nocapture writeonly %7) {
%9 = fneg double %1
%10 = tail call double @llvm.fmuladd.f64(double %9, double %1, double 1.000000e+00)
%11 = fmul double %10, %0
%12 = tail call double @cos(double %4)
%13 = tail call double @llvm.fmuladd.f64(double %1, double %12, double 1.000000e+00)
%14 = fdiv double %11, %13
store double %14, double* %6
%15 = tail call i32 @sin(double %2)
%16 = fadd double %3, %4
%17 = tail call i32 @sin(double %16)
%18 = mul nsw i32 %17, %15
%19 = tail call double @asin(i32 %18)
store double %19, double* %5
%20 = load double, double* %6
%21 = fmul double %20, %20
%22 = fdiv double 1.000000e+00, %21
%23 = fmul double %11, 3.964230e-14
%24 = tail call double @sqrt(double %23)
%25 = fmul double %24, %22
store double %25, double* %7
ret void
}