double interpb(const double *y, double a, double b) {
  return y[0] * (1.0 - a) * (1.0 - b) + y[1] * a * (1.0 - b) +
         y[2] * (1.0 - a) * b + y[3] * a * b;
}


x86 assembly (clang, -O0):
<interpb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  0xede(%rip),%xmm1
subsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecd(%rip),%xmm2
subsd  -0x18(%rbp),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mulsd  -0x10(%rbp),%xmm1
movsd  0xeb2(%rip),%xmm3
subsd  -0x18(%rbp),%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm1
movsd  0xe90(%rip),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm1
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interpb>:
movsd  0xef8(%rip),%xmm2
movapd %xmm2,%xmm3
subsd  %xmm0,%xmm3
movsd  (%rdi),%xmm4
mulsd  %xmm3,%xmm4
subsd  %xmm1,%xmm2
movsd  0x8(%rdi),%xmm5
mulsd  %xmm0,%xmm5
mulsd  %xmm2,%xmm5
mulsd  %xmm4,%xmm2
addsd  %xmm5,%xmm2
mulsd  0x10(%rdi),%xmm3
mulsd  %xmm1,%xmm3
addsd  %xmm2,%xmm3
mulsd  0x18(%rdi),%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @interpb(double* %0, double %1, double %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double*, double** %4
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double, double* %5
%11 = fsub double 1.000000e+00, %10
%12 = fmul double %9, %11
%13 = load double, double* %6
%14 = fsub double 1.000000e+00, %13
%15 = load double*, double** %4
%16 = getelementptr inbounds double, double* %15, i64 1
%17 = load double, double* %16
%18 = load double, double* %5
%19 = fmul double %17, %18
%20 = load double, double* %6
%21 = fsub double 1.000000e+00, %20
%22 = fmul double %19, %21
%23 = call double @llvm.fmuladd.f64(double %12, double %14, double %22)
%24 = load double*, double** %4
%25 = getelementptr inbounds double, double* %24, i64 2
%26 = load double, double* %25
%27 = load double, double* %5
%28 = fsub double 1.000000e+00, %27
%29 = fmul double %26, %28
%30 = load double, double* %6
%31 = call double @llvm.fmuladd.f64(double %29, double %30, double %23)
%32 = load double*, double** %4
%33 = getelementptr inbounds double, double* %32, i64 3
%34 = load double, double* %33
%35 = load double, double* %5
%36 = fmul double %34, %35
%37 = load double, double* %6
%38 = call double @llvm.fmuladd.f64(double %36, double %37, double %31)
ret double %38
}

LLVM IR (-O2):
define double @interpb(double* nocapture %0, double %1, double %2) {
%4 = load double, double* %0
%5 = fsub double 1.000000e+00, %1
%6 = fmul double %5, %4
%7 = fsub double 1.000000e+00, %2
%8 = getelementptr inbounds double, double* %0, i64 1
%9 = load double, double* %8
%10 = fmul double %9, %1
%11 = fmul double %7, %10
%12 = tail call double @llvm.fmuladd.f64(double %6, double %7, double %11)
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = fmul double %5, %14
%16 = tail call double @llvm.fmuladd.f64(double %15, double %2, double %12)
%17 = getelementptr inbounds double, double* %0, i64 3
%18 = load double, double* %17
%19 = fmul double %18, %1
%20 = tail call double @llvm.fmuladd.f64(double %19, double %2, double %16)
ret double %20
}