#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 */
int /*<<< orphan*/ pow(double, double);
double sqrt(int /*<<< orphan*/);
void kepler(double t, double *u, double *up) {
  double r3 = sqrt(pow(u[0] * u[0] + u[2] * u[2], 3.0));
  up[0] = u[1];
  up[1] = -u[0] / r3;
  up[2] = u[3];
  up[3] = -u[2] / r3;
}


x86 assembly (clang, -O0):
<kepler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe99(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
divsd  -0x20(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kepler>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x10(%rdi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xeb9(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%edi
call   1040 <sqrt@plt>
movsd  0x8(%rbx),%xmm1
movsd  %xmm1,(%r14)
movsd  (%rbx),%xmm1
movapd 0xea7(%rip),%xmm2
xorpd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r14)
movsd  0x18(%rbx),%xmm1
movsd  %xmm1,0x10(%r14)
movsd  0x10(%rbx),%xmm1
xorpd  %xmm2,%xmm1
divsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @kepler(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double*, double** %5
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %5
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 2
%16 = load double, double* %15
%17 = load double*, double** %5
%18 = getelementptr inbounds double, double* %17, i64 2
%19 = load double, double* %18
%20 = fmul double %16, %19
%21 = call double @llvm.fmuladd.f64(double %10, double %13, double %20)
%22 = call i32 @pow(double %21, double 3.000000e+00)
%23 = call double @sqrt(i32 %22)
store double %23, double* %7
%24 = load double*, double** %5
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = load double*, double** %6
%28 = getelementptr inbounds double, double* %27, i64 0
store double %26, double* %28
%29 = load double*, double** %5
%30 = getelementptr inbounds double, double* %29, i64 0
%31 = load double, double* %30
%32 = fneg double %31
%33 = load double, double* %7
%34 = fdiv double %32, %33
%35 = load double*, double** %6
%36 = getelementptr inbounds double, double* %35, i64 1
store double %34, double* %36
%37 = load double*, double** %5
%38 = getelementptr inbounds double, double* %37, i64 3
%39 = load double, double* %38
%40 = load double*, double** %6
%41 = getelementptr inbounds double, double* %40, i64 2
store double %39, double* %41
%42 = load double*, double** %5
%43 = getelementptr inbounds double, double* %42, i64 2
%44 = load double, double* %43
%45 = fneg double %44
%46 = load double, double* %7
%47 = fdiv double %45, %46
%48 = load double*, double** %6
%49 = getelementptr inbounds double, double* %48, i64 3
store double %47, double* %49
ret void
}

LLVM IR (-O2):
define void @kepler(double %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 2
%6 = load double, double* %5
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %7)
%9 = tail call i32 @pow(double %8, double 3.000000e+00)
%10 = tail call double @sqrt(i32 %9)
%11 = getelementptr inbounds double, double* %1, i64 1
%12 = load double, double* %11
store double %12, double* %2
%13 = load double, double* %1
%14 = fneg double %13
%15 = fdiv double %14, %10
%16 = getelementptr inbounds double, double* %2, i64 1
store double %15, double* %16
%17 = getelementptr inbounds double, double* %1, i64 3
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %2, i64 2
store double %18, double* %19
%20 = load double, double* %5
%21 = fneg double %20
%22 = fdiv double %21, %10
%23 = getelementptr inbounds double, double* %2, i64 3
store double %22, double* %23
ret void
}