void interpolatev(double *result, const double *s1, const double *s2,
                  const double alpha) {
  result[0] = (float)(s1[0] * (1.0 - (double)alpha) + s2[0] * (double)alpha);
  result[1] = (float)(s1[1] * (1.0 - (double)alpha) + s2[1] * (double)alpha);
  result[2] = (float)(s1[2] * (1.0 - (double)alpha) + s2[2] * (double)alpha);
}


x86 assembly (clang, -O0):
<interpolatev>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xedb(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  0xea0(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  0xe63(%rip),%xmm2
subsd  -0x20(%rbp),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
mulsd  -0x20(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpolatev>:
movsd  0xef8(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  (%rdx),%xmm2
mulsd  %xmm0,%xmm2
movsd  (%rsi),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
xorps  %xmm2,%xmm2
cvtsd2ss %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,(%rdi)
movsd  0x8(%rdx),%xmm2
mulsd  %xmm0,%xmm2
movsd  0x8(%rsi),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
xorps  %xmm2,%xmm2
cvtsd2ss %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,0x8(%rdi)
mulsd  0x10(%rdx),%xmm0
mulsd  0x10(%rsi),%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @interpolatev(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** %6
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double, double* %8
%13 = fsub double 1.000000e+00, %12
%14 = load double*, double** %7
%15 = getelementptr inbounds double, double* %14, i64 0
%16 = load double, double* %15
%17 = load double, double* %8
%18 = fmul double %16, %17
%19 = call double @llvm.fmuladd.f64(double %11, double %13, double %18)
%20 = fptrunc double %19 to float
%21 = fpext float %20 to double
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 0
store double %21, double* %23
%24 = load double*, double** %6
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = load double, double* %8
%28 = fsub double 1.000000e+00, %27
%29 = load double*, double** %7
%30 = getelementptr inbounds double, double* %29, i64 1
%31 = load double, double* %30
%32 = load double, double* %8
%33 = fmul double %31, %32
%34 = call double @llvm.fmuladd.f64(double %26, double %28, double %33)
%35 = fptrunc double %34 to float
%36 = fpext float %35 to double
%37 = load double*, double** %5
%38 = getelementptr inbounds double, double* %37, i64 1
store double %36, double* %38
%39 = load double*, double** %6
%40 = getelementptr inbounds double, double* %39, i64 2
%41 = load double, double* %40
%42 = load double, double* %8
%43 = fsub double 1.000000e+00, %42
%44 = load double*, double** %7
%45 = getelementptr inbounds double, double* %44, i64 2
%46 = load double, double* %45
%47 = load double, double* %8
%48 = fmul double %46, %47
%49 = call double @llvm.fmuladd.f64(double %41, double %43, double %48)
%50 = fptrunc double %49 to float
%51 = fpext float %50 to double
%52 = load double*, double** %5
%53 = getelementptr inbounds double, double* %52, i64 2
store double %51, double* %53
ret void
}

LLVM IR (-O2):
define void @interpolatev(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2, double %3) {
%5 = load double, double* %1
%6 = fsub double 1.000000e+00, %3
%7 = load double, double* %2
%8 = fmul double %7, %3
%9 = tail call double @llvm.fmuladd.f64(double %5, double %6, double %8)
%10 = fptrunc double %9 to float
%11 = fpext float %10 to double
store double %11, double* %0
%12 = getelementptr inbounds double, double* %1, i64 1
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %2, i64 1
%15 = load double, double* %14
%16 = fmul double %15, %3
%17 = tail call double @llvm.fmuladd.f64(double %13, double %6, double %16)
%18 = fptrunc double %17 to float
%19 = fpext float %18 to double
%20 = getelementptr inbounds double, double* %0, i64 1
store double %19, double* %20
%21 = getelementptr inbounds double, double* %1, i64 2
%22 = load double, double* %21
%23 = getelementptr inbounds double, double* %2, i64 2
%24 = load double, double* %23
%25 = fmul double %24, %3
%26 = tail call double @llvm.fmuladd.f64(double %22, double %6, double %25)
%27 = fptrunc double %26 to float
%28 = fpext float %27 to double
%29 = getelementptr inbounds double, double* %0, i64 2
store double %28, double* %29
ret void
}