int _orbita_models_pointmass_f(const void *M, const double *R, double *F) {
  double Rsq = ((R[0]) * (R[0])) + ((R[1]) * (R[1])) + ((R[2]) * (R[2]));
  double Ft_Rt = *((double *)M) / Rsq;
  if (!isfinite(Ft_Rt))
    Ft_Rt = 0;
  F[0] = -Ft_Rt * R[0], F[1] = -Ft_Rt * R[1], F[2] = -Ft_Rt * R[2];
  return 0;
}


x86 assembly (clang, -O0):
<_orbita_models_pointmass_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%al
call   1030 <isfinite@plt>
cmp    $0x0,%eax
jne    119c <_orbita_models_pointmass_f+0x8c>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_orbita_models_pointmass_f>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
movsd  (%rsi),%xmm0
movsd  0x8(%rsi),%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0x10(%rsi),%xmm1
mulsd  %xmm1,%xmm1
addsd  %xmm0,%xmm1
movsd  (%rdi),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x1,%al
call   1030 <isfinite@plt>
xorpd  %xmm0,%xmm0
test   %eax,%eax
je     115d <_orbita_models_pointmass_f+0x4d>
movsd  (%rsp),%xmm0
xorpd  0xe9b(%rip),%xmm0
movsd  (%rbx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%r14)
movsd  0x8(%rbx),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%r14)
mulsd  0x10(%rbx),%xmm0
movsd  %xmm0,0x10(%r14)
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @_orbita_models_pointmass_f(i8* %0, double* %1, double* %2) {
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
%7 = alloca double
%8 = alloca double
store i8* %0, i8** %4
store double* %1, double** %5
store double* %2, double** %6
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = load double*, double** %5
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = load double*, double** %5
%19 = getelementptr inbounds double, double* %18, i64 1
%20 = load double, double* %19
%21 = fmul double %17, %20
%22 = call double @llvm.fmuladd.f64(double %11, double %14, double %21)
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 2
%25 = load double, double* %24
%26 = load double*, double** %5
%27 = getelementptr inbounds double, double* %26, i64 2
%28 = load double, double* %27
%29 = call double @llvm.fmuladd.f64(double %25, double %28, double %22)
store double %29, double* %7
%30 = load i8*, i8** %4
%31 = bitcast i8* %30 to double*
%32 = load double, double* %31
%33 = load double, double* %7
%34 = fdiv double %32, %33
store double %34, double* %8
%35 = load double, double* %8
%36 = call i32 (double, ...) bitcast (i32 (...)* @isfinite to i32 (double, ...)*)(double %35)
%37 = icmp ne i32 %36, 0
br i1 %37, label %39, label %38
38: ; preds = %3
store double 0.000000e+00, double* %8
br label %39
39: ; preds = %38, %3
%40 = load double, double* %8
%41 = fneg double %40
%42 = load double*, double** %5
%43 = getelementptr inbounds double, double* %42, i64 0
%44 = load double, double* %43
%45 = fmul double %41, %44
%46 = load double*, double** %6
%47 = getelementptr inbounds double, double* %46, i64 0
store double %45, double* %47
%48 = load double, double* %8
%49 = fneg double %48
%50 = load double*, double** %5
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = fmul double %49, %52
%54 = load double*, double** %6
%55 = getelementptr inbounds double, double* %54, i64 1
store double %53, double* %55
%56 = load double, double* %8
%57 = fneg double %56
%58 = load double*, double** %5
%59 = getelementptr inbounds double, double* %58, i64 2
%60 = load double, double* %59
%61 = fmul double %57, %60
%62 = load double*, double** %6
%63 = getelementptr inbounds double, double* %62, i64 2
store double %61, double* %63
ret i32 0
}

LLVM IR (-O2):
define i32 @_orbita_models_pointmass_f(i8* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %1, i64 1
%6 = load double, double* %5
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %4, double %4, double %7)
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = tail call double @llvm.fmuladd.f64(double %10, double %10, double %8)
%12 = bitcast i8* %0 to double*
%13 = load double, double* %12
%14 = fdiv double %13, %11
%15 = tail call i32 (double, ...) bitcast (i32 (...)* @isfinite to i32 (double, ...)*)(double %14)
%16 = icmp eq i32 %15, 0
%17 = select i1 %16, double 0.000000e+00, double %14
%18 = fneg double %17
%19 = load double, double* %1
%20 = fmul double %19, %18
store double %20, double* %2
%21 = load double, double* %5
%22 = fmul double %21, %18
%23 = getelementptr inbounds double, double* %2, i64 1
store double %22, double* %23
%24 = load double, double* %9
%25 = fmul double %24, %18
%26 = getelementptr inbounds double, double* %2, i64 2
store double %25, double* %26
ret i32 0
}