void glmMultVectorByMatrix54d(double result[4], const double v[4],
                              const double m[25]) {
  result[0] = m[0] * v[0] + m[5] * v[1] + m[10] * v[2] + m[15] * v[3] + m[20];
  result[1] = m[1] * v[0] + m[6] * v[1] + m[11] * v[2] + m[16] * v[3] + m[21];
  result[2] = m[2] * v[0] + m[7] * v[1] + m[12] * v[2] + m[17] * v[3] + m[22];
  result[3] = m[3] * v[0] + m[8] * v[1] + m[13] * v[2] + m[18] * v[3] + m[23];
  result[4] = m[4] * v[0] + m[9] * v[1] + m[14] * v[2] + m[19] * v[3] + m[24];
}


x86 assembly (clang, -O0):
<glmMultVectorByMatrix54d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x50(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x78(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0xa0(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x58(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x80(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0xa8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x88(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0xb0(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x90(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0xb8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm1
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
movsd  0x70(%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x18(%rbp),%rax
movsd  0x98(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
addsd  0xc0(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMultVectorByMatrix54d>:
movsd  (%rdx),%xmm0
movsd  0x28(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x50(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
movsd  0x78(%rdx),%xmm1
mulsd  0x18(%rsi),%xmm1
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
addsd  0xa0(%rdx),%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  0x30(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x58(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
movsd  0x80(%rdx),%xmm1
mulsd  0x18(%rsi),%xmm1
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
addsd  0xa8(%rdx),%xmm1
movsd  %xmm1,0x8(%rdi)
movsd  0x10(%rdx),%xmm0
movsd  0x38(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x60(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
movsd  0x88(%rdx),%xmm1
mulsd  0x18(%rsi),%xmm1
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
addsd  0xb0(%rdx),%xmm1
movsd  %xmm1,0x10(%rdi)
movsd  0x18(%rdx),%xmm0
movsd  0x40(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
movsd  0x68(%rdx),%xmm2
mulsd  0x10(%rsi),%xmm2
addsd  %xmm1,%xmm0
movsd  0x90(%rdx),%xmm1
mulsd  0x18(%rsi),%xmm1
addsd  %xmm0,%xmm2
addsd  %xmm2,%xmm1
addsd  0xb8(%rdx),%xmm1
movsd  %xmm1,0x18(%rdi)
movsd  0x20(%rdx),%xmm0
movsd  0x48(%rdx),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x70(%rdx),%xmm1
mulsd  0x10(%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x98(%rdx),%xmm0
mulsd  0x18(%rsi),%xmm0
addsd  %xmm1,%xmm0
addsd  0xc0(%rdx),%xmm0
movsd  %xmm0,0x20(%rdi)
ret

LLVM IR (-O0):
define void @glmMultVectorByMatrix54d(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 5
%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 10
%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 15
%30 = load double, double* %29
%31 = load double*, double** %5
%32 = getelementptr inbounds double, double* %31, i64 3
%33 = load double, double* %32
%34 = call double @llvm.fmuladd.f64(double %30, double %33, double %27)
%35 = load double*, double** %6
%36 = getelementptr inbounds double, double* %35, i64 20
%37 = load double, double* %36
%38 = fadd double %34, %37
%39 = load double*, double** %4
%40 = getelementptr inbounds double, double* %39, i64 0
store double %38, double* %40
%41 = load double*, double** %6
%42 = getelementptr inbounds double, double* %41, i64 1
%43 = load double, double* %42
%44 = load double*, double** %5
%45 = getelementptr inbounds double, double* %44, i64 0
%46 = load double, double* %45
%47 = load double*, double** %6
%48 = getelementptr inbounds double, double* %47, i64 6
%49 = load double, double* %48
%50 = load double*, double** %5
%51 = getelementptr inbounds double, double* %50, i64 1
%52 = load double, double* %51
%53 = fmul double %49, %52
%54 = call double @llvm.fmuladd.f64(double %43, double %46, double %53)
%55 = load double*, double** %6
%56 = getelementptr inbounds double, double* %55, i64 11
%57 = load double, double* %56
%58 = load double*, double** %5
%59 = getelementptr inbounds double, double* %58, i64 2
%60 = load double, double* %59
%61 = call double @llvm.fmuladd.f64(double %57, double %60, double %54)
%62 = load double*, double** %6
%63 = getelementptr inbounds double, double* %62, i64 16
%64 = load double, double* %63
%65 = load double*, double** %5
%66 = getelementptr inbounds double, double* %65, i64 3
%67 = load double, double* %66
%68 = call double @llvm.fmuladd.f64(double %64, double %67, double %61)
%69 = load double*, double** %6
%70 = getelementptr inbounds double, double* %69, i64 21
%71 = load double, double* %70
%72 = fadd double %68, %71
%73 = load double*, double** %4
%74 = getelementptr inbounds double, double* %73, i64 1
store double %72, double* %74
%75 = load double*, double** %6
%76 = getelementptr inbounds double, double* %75, i64 2
%77 = load double, double* %76
%78 = load double*, double** %5
%79 = getelementptr inbounds double, double* %78, i64 0
%80 = load double, double* %79
%81 = load double*, double** %6
%82 = getelementptr inbounds double, double* %81, i64 7
%83 = load double, double* %82
%84 = load double*, double** %5
%85 = getelementptr inbounds double, double* %84, i64 1
%86 = load double, double* %85
%87 = fmul double %83, %86
%88 = call double @llvm.fmuladd.f64(double %77, double %80, double %87)
%89 = load double*, double** %6
%90 = getelementptr inbounds double, double* %89, i64 12
%91 = load double, double* %90
%92 = load double*, double** %5
%93 = getelementptr inbounds double, double* %92, i64 2
%94 = load double, double* %93
%95 = call double @llvm.fmuladd.f64(double %91, double %94, double %88)
%96 = load double*, double** %6
%97 = getelementptr inbounds double, double* %96, i64 17
%98 = load double, double* %97
%99 = load double*, double** %5
%100 = getelementptr inbounds double, double* %99, i64 3
%101 = load double, double* %100
%102 = call double @llvm.fmuladd.f64(double %98, double %101, double %95)
%103 = load double*, double** %6
%104 = getelementptr inbounds double, double* %103, i64 22
%105 = load double, double* %104
%106 = fadd double %102, %105
%107 = load double*, double** %4
%108 = getelementptr inbounds double, double* %107, i64 2
store double %106, double* %108
%109 = load double*, double** %6
%110 = getelementptr inbounds double, double* %109, i64 3
%111 = load double, double* %110
%112 = load double*, double** %5
%113 = getelementptr inbounds double, double* %112, i64 0
%114 = load double, double* %113
%115 = load double*, double** %6
%116 = getelementptr inbounds double, double* %115, i64 8
%117 = load double, double* %116
%118 = load double*, double** %5
%119 = getelementptr inbounds double, double* %118, i64 1
%120 = load double, double* %119
%121 = fmul double %117, %120
%122 = call double @llvm.fmuladd.f64(double %111, double %114, double %121)
%123 = load double*, double** %6
%124 = getelementptr inbounds double, double* %123, i64 13
%125 = load double, double* %124
%126 = load double*, double** %5
%127 = getelementptr inbounds double, double* %126, i64 2
%128 = load double, double* %127
%129 = call double @llvm.fmuladd.f64(double %125, double %128, double %122)
%130 = load double*, double** %6
%131 = getelementptr inbounds double, double* %130, i64 18
%132 = load double, double* %131
%133 = load double*, double** %5
%134 = getelementptr inbounds double, double* %133, i64 3
%135 = load double, double* %134
%136 = call double @llvm.fmuladd.f64(double %132, double %135, double %129)
%137 = load double*, double** %6
%138 = getelementptr inbounds double, double* %137, i64 23
%139 = load double, double* %138
%140 = fadd double %136, %139
%141 = load double*, double** %4
%142 = getelementptr inbounds double, double* %141, i64 3
store double %140, double* %142
%143 = load double*, double** %6
%144 = getelementptr inbounds double, double* %143, i64 4
%145 = load double, double* %144
%146 = load double*, double** %5
%147 = getelementptr inbounds double, double* %146, i64 0
%148 = load double, double* %147
%149 = load double*, double** %6
%150 = getelementptr inbounds double, double* %149, i64 9
%151 = load double, double* %150
%152 = load double*, double** %5
%153 = getelementptr inbounds double, double* %152, i64 1
%154 = load double, double* %153
%155 = fmul double %151, %154
%156 = call double @llvm.fmuladd.f64(double %145, double %148, double %155)
%157 = load double*, double** %6
%158 = getelementptr inbounds double, double* %157, i64 14
%159 = load double, double* %158
%160 = load double*, double** %5
%161 = getelementptr inbounds double, double* %160, i64 2
%162 = load double, double* %161
%163 = call double @llvm.fmuladd.f64(double %159, double %162, double %156)
%164 = load double*, double** %6
%165 = getelementptr inbounds double, double* %164, i64 19
%166 = load double, double* %165
%167 = load double*, double** %5
%168 = getelementptr inbounds double, double* %167, i64 3
%169 = load double, double* %168
%170 = call double @llvm.fmuladd.f64(double %166, double %169, double %163)
%171 = load double*, double** %6
%172 = getelementptr inbounds double, double* %171, i64 24
%173 = load double, double* %172
%174 = fadd double %170, %173
%175 = load double*, double** %4
%176 = getelementptr inbounds double, double* %175, i64 4
store double %174, double* %176
ret void
}

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