void glmMultVectorByMatrix43d(double result[3], const double v[3],
                              const double m[16]) {
  result[0] = m[0] * v[0] + m[4] * v[1] + m[8] * v[2] + m[12];
  result[1] = m[1] * v[0] + m[5] * v[1] + m[9] * v[2] + m[13];
  result[2] = m[2] * v[0] + m[6] * v[1] + m[10] * v[2] + m[14];
}


x86 assembly (clang, -O0):
<glmMultVectorByMatrix43d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0x60(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0x68(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0x70(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMultVectorByMatrix43d>:
movsd  (%rdx),%xmm0
movsd  0x20(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x40(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
addsd  0x60(%rdx),%xmm2
movsd  %xmm2,(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  0x28(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x48(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
addsd  %xmm0,%xmm2
addsd  0x68(%rdx),%xmm2
movsd  %xmm2,0x8(%rdi)
movsd  0x10(%rdx),%xmm0
movsd  0x30(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x50(%rdx),%xmm1
mulsd  0x10(%rsi),%xmm1
addsd  %xmm0,%xmm1
addsd  0x70(%rdx),%xmm1
movsd  %xmm1,0x10(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMultVectorByMatrix43d(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %2
%5 = load double, double* %1
%6 = getelementptr inbounds double, double* %2, i64 4
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fmul double %7, %9
%11 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %10)
%12 = getelementptr inbounds double, double* %2, i64 8
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %1, i64 2
%15 = load double, double* %14
%16 = tail call double @llvm.fmuladd.f64(double %13, double %15, double %11)
%17 = getelementptr inbounds double, double* %2, i64 12
%18 = load double, double* %17
%19 = fadd double %16, %18
store double %19, double* %0
%20 = getelementptr inbounds double, double* %2, i64 1
%21 = load double, double* %20
%22 = load double, double* %1
%23 = getelementptr inbounds double, double* %2, i64 5
%24 = load double, double* %23
%25 = load double, double* %8
%26 = fmul double %24, %25
%27 = tail call double @llvm.fmuladd.f64(double %21, double %22, double %26)
%28 = getelementptr inbounds double, double* %2, i64 9
%29 = load double, double* %28
%30 = load double, double* %14
%31 = tail call double @llvm.fmuladd.f64(double %29, double %30, double %27)
%32 = getelementptr inbounds double, double* %2, i64 13
%33 = load double, double* %32
%34 = fadd double %31, %33
%35 = getelementptr inbounds double, double* %0, i64 1
store double %34, double* %35
%36 = getelementptr inbounds double, double* %2, i64 2
%37 = load double, double* %36
%38 = load double, double* %1
%39 = getelementptr inbounds double, double* %2, i64 6
%40 = load double, double* %39
%41 = load double, double* %8
%42 = fmul double %40, %41
%43 = tail call double @llvm.fmuladd.f64(double %37, double %38, double %42)
%44 = getelementptr inbounds double, double* %2, i64 10
%45 = load double, double* %44
%46 = load double, double* %14
%47 = tail call double @llvm.fmuladd.f64(double %45, double %46, double %43)
%48 = getelementptr inbounds double, double* %2, i64 14
%49 = load double, double* %48
%50 = fadd double %47, %49
%51 = getelementptr inbounds double, double* %0, i64 2
store double %50, double* %51
ret void
}