void SetMonoPolRefOut(double mc_pol_FN, double mc_pol_FM, double mc_pol_refProb,
                      double *mc_pol_sx, double *mc_pol_sy, double *mc_pol_sz) {
  *mc_pol_sx = (mc_pol_FN * mc_pol_FN - mc_pol_FM * mc_pol_FM) * (*mc_pol_sx) /
               mc_pol_refProb;
  *mc_pol_sy =
      ((mc_pol_FN * mc_pol_FN - mc_pol_FM * mc_pol_FM) * (*mc_pol_sy) +
       2 * mc_pol_FN * mc_pol_FM + 2 * mc_pol_FM * mc_pol_FM * (*mc_pol_sy)) /
      mc_pol_refProb;
  *mc_pol_sz = (mc_pol_FN * mc_pol_FN - mc_pol_FM * mc_pol_FM) * (*mc_pol_sz) /
               mc_pol_refProb;
  return;
}


x86 assembly (clang, -O0):
<SetMonoPolRefOut>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
mulsd  (%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
movsd  0xe56(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe3c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
divsd  -0x18(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  -0x10(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
mulsd  (%rax),%xmm0
divsd  -0x18(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SetMonoPolRefOut>:
movapd %xmm0,%xmm3
addsd  %xmm0,%xmm0
mulsd  %xmm1,%xmm0
movapd %xmm1,%xmm4
addsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm4
mulsd  %xmm1,%xmm1
mulsd  %xmm3,%xmm3
subsd  %xmm1,%xmm3
movsd  (%rdi),%xmm1
mulsd  %xmm3,%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,(%rdi)
movsd  (%rsi),%xmm1
movapd %xmm3,%xmm5
mulsd  %xmm1,%xmm5
addsd  %xmm0,%xmm5
mulsd  %xmm1,%xmm4
addsd  %xmm5,%xmm4
divsd  %xmm2,%xmm4
movsd  %xmm4,(%rsi)
mulsd  (%rdx),%xmm3
divsd  %xmm2,%xmm3
movsd  %xmm3,(%rdx)
ret

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

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