void calcF84AuxProbs(double *Pi, double *Mloc, double *Nloc, double *Ploc) {
  double PAG, PCT, PR, PY;
  PAG = Pi[0] * Pi[2];
  PCT = Pi[1] * Pi[3];
  PR = Pi[0] + Pi[2];
  PY = Pi[1] + Pi[3];
  *Mloc = PAG / PR + PCT / PY;
  *Nloc = PAG + PCT;
  *Ploc = PR * PY;
  return;
}


x86 assembly (clang, -O0):
<calcF84AuxProbs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
mulsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
divsd  -0x40(%rbp),%xmm1
addsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x28(%rbp),%xmm0
addsd  -0x30(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcF84AuxProbs>:
movsd  0x10(%rdi),%xmm0
movsd  (%rdi),%xmm1
movsd  0x8(%rdi),%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm0,%xmm3
movsd  0x18(%rdi),%xmm4
movapd %xmm2,%xmm5
mulsd  %xmm4,%xmm5
addsd  %xmm0,%xmm1
addsd  %xmm4,%xmm2
movapd %xmm3,%xmm0
divsd  %xmm1,%xmm0
addsd  %xmm5,%xmm3
divsd  %xmm2,%xmm5
addsd  %xmm0,%xmm5
movsd  %xmm5,(%rsi)
movsd  %xmm3,(%rdx)
mulsd  %xmm1,%xmm2
movsd  %xmm2,(%rcx)
ret

LLVM IR (-O0):
define void @calcF84AuxProbs(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
%11 = alloca double
%12 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%13 = load double*, double** %5
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double*, double** %5
%17 = getelementptr inbounds double, double* %16, i64 2
%18 = load double, double* %17
%19 = fmul double %15, %18
store double %19, double* %9
%20 = load double*, double** %5
%21 = getelementptr inbounds double, double* %20, i64 1
%22 = load double, double* %21
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 3
%25 = load double, double* %24
%26 = fmul double %22, %25
store double %26, double* %10
%27 = load double*, double** %5
%28 = getelementptr inbounds double, double* %27, i64 0
%29 = load double, double* %28
%30 = load double*, double** %5
%31 = getelementptr inbounds double, double* %30, i64 2
%32 = load double, double* %31
%33 = fadd double %29, %32
store double %33, double* %11
%34 = load double*, double** %5
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
%37 = load double*, double** %5
%38 = getelementptr inbounds double, double* %37, i64 3
%39 = load double, double* %38
%40 = fadd double %36, %39
store double %40, double* %12
%41 = load double, double* %9
%42 = load double, double* %11
%43 = fdiv double %41, %42
%44 = load double, double* %10
%45 = load double, double* %12
%46 = fdiv double %44, %45
%47 = fadd double %43, %46
%48 = load double*, double** %6
store double %47, double* %48
%49 = load double, double* %9
%50 = load double, double* %10
%51 = fadd double %49, %50
%52 = load double*, double** %7
store double %51, double* %52
%53 = load double, double* %11
%54 = load double, double* %12
%55 = fmul double %53, %54
%56 = load double*, double** %8
store double %55, double* %56
ret void
}

LLVM IR (-O2):
define void @calcF84AuxProbs(double* nocapture %0, double* nocapture writeonly %1, double* nocapture writeonly %2, double* nocapture writeonly %3) {
%5 = load double, double* %0
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = fmul double %5, %7
%9 = getelementptr inbounds double, double* %0, i64 1
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %0, i64 3
%12 = load double, double* %11
%13 = fmul double %10, %12
%14 = fadd double %5, %7
%15 = fadd double %10, %12
%16 = fdiv double %8, %14
%17 = fdiv double %13, %15
%18 = fadd double %16, %17
store double %18, double* %1
%19 = fadd double %8, %13
store double %19, double* %2
%20 = fmul double %14, %15
store double %20, double* %3
ret void
}