void glmMatrixFromVectors4dT(double m[16], const double v1[4],
                             const double v2[4], const double v3[4],
                             const double v4[4]) {
  m[0] = v1[0];
  m[4] = v1[1];
  m[8] = v1[2];
  m[12] = v1[3];
  m[1] = v2[0];
  m[5] = v2[1];
  m[9] = v2[2];
  m[13] = v2[3];
  m[2] = v3[0];
  m[6] = v3[1];
  m[10] = v3[2];
  m[14] = v3[3];
  m[3] = v4[0];
  m[7] = v4[1];
  m[11] = v4[2];
  m[15] = v4[3];
}


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

x86 assembly (clang, -O2):
<glmMatrixFromVectors4dT>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x20(%rdi)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x40(%rdi)
movsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x60(%rdi)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x28(%rdi)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x48(%rdi)
movsd  0x18(%rdx),%xmm0
movsd  %xmm0,0x68(%rdi)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x10(%rdi)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x30(%rdi)
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x50(%rdi)
movsd  0x18(%rcx),%xmm0
movsd  %xmm0,0x70(%rdi)
movsd  (%r8),%xmm0
movsd  %xmm0,0x18(%rdi)
movsd  0x8(%r8),%xmm0
movsd  %xmm0,0x38(%rdi)
movsd  0x10(%r8),%xmm0
movsd  %xmm0,0x58(%rdi)
movsd  0x18(%r8),%xmm0
movsd  %xmm0,0x78(%rdi)
ret

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

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