int _orbita_models_plummer_f(const void *par, const double *pos, double *F) {
  double M = *((double *)par), b = *((double *)par + 1);
  double R_sq =
      ((pos)[0] * (pos)[0] + (pos)[1] * (pos)[1] + (pos)[2] * (pos)[2]);
  double Fr_R = -M / pow(((b) * (b)) + R_sq, 1.5);
  if (!isfinite(Fr_R))
    Fr_R = 0;
  F[0] = Fr_R * pos[0], F[1] = Fr_R * pos[1], F[2] = Fr_R * pos[2];
  return 0;
}


x86 assembly (clang, -O0):
<_orbita_models_plummer_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%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,-0x30(%rbp)
movsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe28(%rip),%xmm1
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    $0x1,%al
call   1030 <isfinite@plt>
cmp    $0x0,%eax
jne    120b <_orbita_models_plummer_f+0xeb>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_orbita_models_plummer_f>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
movsd  0x8(%rdi),%xmm0
movsd  (%rsi),%xmm1
movsd  0x8(%rsi),%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0x10(%rsi),%xmm2
mulsd  %xmm2,%xmm2
addsd  %xmm1,%xmm2
movsd  (%rdi),%xmm1
xorps  0xea1(%rip),%xmm1
movaps %xmm1,(%rsp)
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
movsd  0xe9d(%rip),%xmm1
call   1040 <pow@plt>
movapd (%rsp),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,(%rsp)
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1030 <isfinite@plt>
xorpd  %xmm0,%xmm0
test   %eax,%eax
je     119e <_orbita_models_plummer_f+0x7e>
movapd (%rsp),%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    $0x18,%rsp
pop    %rbx
pop    %r14
ret

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

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