void Map3f(double u, double v, const double *corners, double *x, double *y,
           double *z) {
  *x = corners[0] + u * (corners[3] - corners[0]) +
       v * (corners[6] - corners[3]);
  *y = corners[1] + u * (corners[4] - corners[1]) +
       v * (corners[7] - corners[4]);
  *z = corners[2] + u * (corners[5] - corners[2]) +
       v * (corners[8] - corners[5]);
}


x86 assembly (clang, -O0):
<Map3f>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  (%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x8(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x20(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x8(%rbp),%xmm1
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x18(%rbp),%rax
subsd  0x28(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Map3f>:
movsd  (%rdi),%xmm2
movsd  0x18(%rdi),%xmm3
movsd  0x30(%rdi),%xmm4
subsd  %xmm3,%xmm4
subsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rsi)
movsd  0x8(%rdi),%xmm2
movsd  0x20(%rdi),%xmm3
movsd  0x38(%rdi),%xmm4
subsd  %xmm3,%xmm4
subsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rdx)
movsd  0x10(%rdi),%xmm2
movsd  0x28(%rdi),%xmm3
movsd  0x40(%rdi),%xmm4
subsd  %xmm3,%xmm4
subsd  %xmm2,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
mulsd  %xmm1,%xmm4
addsd  %xmm3,%xmm4
movsd  %xmm4,(%rcx)
ret

LLVM IR (-O0):
define void @Map3f(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** %9
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double, double* %7
%17 = load double*, double** %9
%18 = getelementptr inbounds double, double* %17, i64 3
%19 = load double, double* %18
%20 = load double*, double** %9
%21 = getelementptr inbounds double, double* %20, i64 0
%22 = load double, double* %21
%23 = fsub double %19, %22
%24 = call double @llvm.fmuladd.f64(double %16, double %23, double %15)
%25 = load double, double* %8
%26 = load double*, double** %9
%27 = getelementptr inbounds double, double* %26, i64 6
%28 = load double, double* %27
%29 = load double*, double** %9
%30 = getelementptr inbounds double, double* %29, i64 3
%31 = load double, double* %30
%32 = fsub double %28, %31
%33 = call double @llvm.fmuladd.f64(double %25, double %32, double %24)
%34 = load double*, double** %10
store double %33, double* %34
%35 = load double*, double** %9
%36 = getelementptr inbounds double, double* %35, i64 1
%37 = load double, double* %36
%38 = load double, double* %7
%39 = load double*, double** %9
%40 = getelementptr inbounds double, double* %39, i64 4
%41 = load double, double* %40
%42 = load double*, double** %9
%43 = getelementptr inbounds double, double* %42, i64 1
%44 = load double, double* %43
%45 = fsub double %41, %44
%46 = call double @llvm.fmuladd.f64(double %38, double %45, double %37)
%47 = load double, double* %8
%48 = load double*, double** %9
%49 = getelementptr inbounds double, double* %48, i64 7
%50 = load double, double* %49
%51 = load double*, double** %9
%52 = getelementptr inbounds double, double* %51, i64 4
%53 = load double, double* %52
%54 = fsub double %50, %53
%55 = call double @llvm.fmuladd.f64(double %47, double %54, double %46)
%56 = load double*, double** %11
store double %55, double* %56
%57 = load double*, double** %9
%58 = getelementptr inbounds double, double* %57, i64 2
%59 = load double, double* %58
%60 = load double, double* %7
%61 = load double*, double** %9
%62 = getelementptr inbounds double, double* %61, i64 5
%63 = load double, double* %62
%64 = load double*, double** %9
%65 = getelementptr inbounds double, double* %64, i64 2
%66 = load double, double* %65
%67 = fsub double %63, %66
%68 = call double @llvm.fmuladd.f64(double %60, double %67, double %59)
%69 = load double, double* %8
%70 = load double*, double** %9
%71 = getelementptr inbounds double, double* %70, i64 8
%72 = load double, double* %71
%73 = load double*, double** %9
%74 = getelementptr inbounds double, double* %73, i64 5
%75 = load double, double* %74
%76 = fsub double %72, %75
%77 = call double @llvm.fmuladd.f64(double %69, double %76, double %68)
%78 = load double*, double** %12
store double %77, double* %78
ret void
}

LLVM IR (-O2):
define void @Map3f(double %0, double %1, double* nocapture %2, double* nocapture writeonly %3, double* nocapture writeonly %4, double* nocapture writeonly %5) {
%7 = load double, double* %2
%8 = getelementptr inbounds double, double* %2, i64 3
%9 = load double, double* %8
%10 = fsub double %9, %7
%11 = tail call double @llvm.fmuladd.f64(double %0, double %10, double %7)
%12 = getelementptr inbounds double, double* %2, i64 6
%13 = load double, double* %12
%14 = fsub double %13, %9
%15 = tail call double @llvm.fmuladd.f64(double %1, double %14, double %11)
store double %15, double* %3
%16 = getelementptr inbounds double, double* %2, i64 1
%17 = load double, double* %16
%18 = getelementptr inbounds double, double* %2, i64 4
%19 = load double, double* %18
%20 = fsub double %19, %17
%21 = tail call double @llvm.fmuladd.f64(double %0, double %20, double %17)
%22 = getelementptr inbounds double, double* %2, i64 7
%23 = load double, double* %22
%24 = fsub double %23, %19
%25 = tail call double @llvm.fmuladd.f64(double %1, double %24, double %21)
store double %25, double* %4
%26 = getelementptr inbounds double, double* %2, i64 2
%27 = load double, double* %26
%28 = getelementptr inbounds double, double* %2, i64 5
%29 = load double, double* %28
%30 = fsub double %29, %27
%31 = tail call double @llvm.fmuladd.f64(double %0, double %30, double %27)
%32 = getelementptr inbounds double, double* %2, i64 8
%33 = load double, double* %32
%34 = fsub double %33, %29
%35 = tail call double @llvm.fmuladd.f64(double %1, double %34, double %31)
store double %35, double* %5
ret void
}