void get_center(const double *a, const double *b, const double *c, double *cc) {
  static const double third = (1. / 3.);
  cc[0] = (a[0] + b[0] + c[0]) * third;
  cc[1] = (a[1] + b[1] + c[1]) * third;
}


x86 assembly (clang, -O0):
<get_center>:
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    -0x10(%rbp),%rax
addsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  (%rax),%xmm0
movsd  0xecc(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x8(%rax),%xmm0
movsd  0xe9d(%rip),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_center>:
movsd  (%rdi),%xmm0
addsd  (%rsi),%xmm0
addsd  (%rdx),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdi),%xmm0
addsd  0x8(%rsi),%xmm0
addsd  0x8(%rdx),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rcx)
ret

LLVM IR (-O0):
@get_center.third = internal constant double 0x3FD5555555555555
define void @get_center(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %6
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = fadd double %11, %14
%16 = load double*, double** %7
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fadd double %15, %18
%20 = fmul double %19, 0x3FD5555555555555
%21 = load double*, double** %8
%22 = getelementptr inbounds double, double* %21, i64 0
store double %20, double* %22
%23 = load double*, double** %5
%24 = getelementptr inbounds double, double* %23, i64 1
%25 = load double, double* %24
%26 = load double*, double** %6
%27 = getelementptr inbounds double, double* %26, i64 1
%28 = load double, double* %27
%29 = fadd double %25, %28
%30 = load double*, double** %7
%31 = getelementptr inbounds double, double* %30, i64 1
%32 = load double, double* %31
%33 = fadd double %29, %32
%34 = fmul double %33, 0x3FD5555555555555
%35 = load double*, double** %8
%36 = getelementptr inbounds double, double* %35, i64 1
store double %34, double* %36
ret void
}

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