void glmMatrixFromVectors3dT(double m[9], const double v1[3],
                             const double v2[3], const double v3[3]) {
  m[0] = v1[0];
  m[3] = v1[1];
  m[6] = v1[2];
  m[1] = v2[0];
  m[4] = v2[1];
  m[7] = v2[2];
  m[2] = v3[0];
  m[5] = v3[1];
  m[8] = v3[2];
}


x86 assembly (clang, -O0):
<glmMatrixFromVectors3dT>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%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,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x30(%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,0x20(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x38(%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,0x28(%rax)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMatrixFromVectors3dT>:
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x18(%rdi)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x30(%rdi)
movsd  (%rdx),%xmm0
movsd  %xmm0,0x8(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rdi)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x38(%rdi)
movsd  (%rcx),%xmm0
movsd  %xmm0,0x10(%rdi)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x28(%rdi)
movsd  0x10(%rcx),%xmm0
movsd  %xmm0,0x40(%rdi)
ret

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

LLVM IR (-O2):
define void @glmMatrixFromVectors3dT(double* nocapture writeonly %0, double* nocapture %1, double* nocapture %2, double* nocapture %3) {
%5 = load double, double* %1
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %0, i64 3
store double %7, double* %8
%9 = getelementptr inbounds double, double* %1, i64 2
%10 = load double, double* %9
%11 = getelementptr inbounds double, double* %0, i64 6
store double %10, double* %11
%12 = load double, double* %2
%13 = getelementptr inbounds double, double* %0, i64 1
store double %12, double* %13
%14 = getelementptr inbounds double, double* %2, i64 1
%15 = load double, double* %14
%16 = getelementptr inbounds double, double* %0, i64 4
store double %15, double* %16
%17 = getelementptr inbounds double, double* %2, i64 2
%18 = load double, double* %17
%19 = getelementptr inbounds double, double* %0, i64 7
store double %18, double* %19
%20 = load double, double* %3
%21 = getelementptr inbounds double, double* %0, i64 2
store double %20, double* %21
%22 = getelementptr inbounds double, double* %3, i64 1
%23 = load double, double* %22
%24 = getelementptr inbounds double, double* %0, i64 5
store double %23, double* %24
%25 = getelementptr inbounds double, double* %3, i64 2
%26 = load double, double* %25
%27 = getelementptr inbounds double, double* %0, i64 8
store double %26, double* %27
ret void
}