void glmInterpolateVector3d(double result[3], const double v1[3],
                            const double v2[3], double a) {
  float b = 1.0 - a;
  result[0] = b * v1[0] + a * v2[0];
  result[1] = b * v1[1] + a * v2[1];
  result[2] = b * v1[2] + a * v2[2];
}


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

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

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

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