void mulmvv(double *dest, const double *s1, const double *s2) {
  dest[(0 + (0 << 2))] = s1[0] * s2[0];
  dest[(1 + (0 << 2))] = s1[1] * s2[0];
  dest[(2 + (0 << 2))] = s1[2] * s2[0];
  dest[(3 + (0 << 2))] = 0;
  dest[(0 + (1 << 2))] = s1[0] * s2[1];
  dest[(1 + (1 << 2))] = s1[1] * s2[1];
  dest[(2 + (1 << 2))] = s1[2] * s2[1];
  dest[(3 + (1 << 2))] = 0;
  dest[(0 + (2 << 2))] = s1[0] * s2[2];
  dest[(1 + (2 << 2))] = s1[1] * s2[2];
  dest[(2 + (2 << 2))] = s1[2] * s2[2];
  dest[(3 + (2 << 2))] = 0;
  dest[(0 + (3 << 2))] = 0;
  dest[(1 + (3 << 2))] = 0;
  dest[(2 + (3 << 2))] = 0;
  dest[(3 + (3 << 2))] = 1;
}


x86 assembly (clang, -O0):
<mulmvv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x58(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x60(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x68(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x70(%rax)
mov    -0x8(%rbp),%rax
movsd  0xdb0(%rip),%xmm0
movsd  %xmm0,0x78(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mulmvv>:
movsd  (%rsi),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x10(%rsi),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,0x10(%rdi)
movq   $0x0,0x18(%rdi)
movsd  (%rsi),%xmm0
mulsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rdi)
movsd  0x8(%rsi),%xmm0
mulsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x28(%rdi)
movsd  0x10(%rsi),%xmm0
mulsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x30(%rdi)
movq   $0x0,0x38(%rdi)
movsd  (%rsi),%xmm0
mulsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rdi)
movsd  0x8(%rsi),%xmm0
mulsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x48(%rdi)
movsd  0x10(%rsi),%xmm0
mulsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x50(%rdi)
xorpd  %xmm0,%xmm0
movupd %xmm0,0x58(%rdi)
movupd %xmm0,0x68(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x78(%rdi)
ret

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

LLVM IR (-O2):
define void @mulmvv(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2) {
%4 = load double, double* %1
%5 = load double, double* %2
%6 = fmul double %4, %5
store double %6, double* %0
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = load double, double* %2
%10 = fmul double %8, %9
%11 = getelementptr inbounds double, double* %0, i64 1
store double %10, double* %11
%12 = getelementptr inbounds double, double* %1, i64 2
%13 = load double, double* %12
%14 = load double, double* %2
%15 = fmul double %13, %14
%16 = getelementptr inbounds double, double* %0, i64 2
store double %15, double* %16
%17 = getelementptr inbounds double, double* %0, i64 3
store double 0.000000e+00, double* %17
%18 = load double, double* %1
%19 = getelementptr inbounds double, double* %2, i64 1
%20 = load double, double* %19
%21 = fmul double %18, %20
%22 = getelementptr inbounds double, double* %0, i64 4
store double %21, double* %22
%23 = load double, double* %7
%24 = load double, double* %19
%25 = fmul double %23, %24
%26 = getelementptr inbounds double, double* %0, i64 5
store double %25, double* %26
%27 = load double, double* %12
%28 = load double, double* %19
%29 = fmul double %27, %28
%30 = getelementptr inbounds double, double* %0, i64 6
store double %29, double* %30
%31 = getelementptr inbounds double, double* %0, i64 7
store double 0.000000e+00, double* %31
%32 = load double, double* %1
%33 = getelementptr inbounds double, double* %2, i64 2
%34 = load double, double* %33
%35 = fmul double %32, %34
%36 = getelementptr inbounds double, double* %0, i64 8
store double %35, double* %36
%37 = load double, double* %7
%38 = load double, double* %33
%39 = fmul double %37, %38
%40 = getelementptr inbounds double, double* %0, i64 9
store double %39, double* %40
%41 = load double, double* %12
%42 = load double, double* %33
%43 = fmul double %41, %42
%44 = getelementptr inbounds double, double* %0, i64 10
store double %43, double* %44
%45 = getelementptr inbounds double, double* %0, i64 11
%46 = getelementptr inbounds double, double* %0, i64 15
%47 = bitcast double* %45 to i8*
store double 1.000000e+00, double* %46
ret void
}