void m_basis(float *M, const float e0[3], const float e1[3],
             const float e2[3]) {
  M[0] = e0[0];
  M[4] = e1[0];
  M[8] = e2[0];
  M[12] = 0.f;
  M[1] = e0[1];
  M[5] = e1[1];
  M[9] = e2[1];
  M[13] = 0.f;
  M[2] = e0[2];
  M[6] = e1[2];
  M[10] = e2[2];
  M[14] = 0.f;
  M[3] = 0.f;
  M[7] = 0.f;
  M[11] = 0.f;
  M[15] = 1.f;
}


x86 assembly (clang, -O0):
<m_basis>:
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
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x10(%rax)
mov    -0x20(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
mov    -0x20(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x18(%rax)
mov    -0x20(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x8(%rbp),%rax
movss  0xdfa(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_basis>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movss  (%rdx),%xmm0
movss  %xmm0,0x10(%rdi)
movss  (%rcx),%xmm0
movss  %xmm0,0x20(%rdi)
movl   $0x0,0x30(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x4(%rdi)
movss  0x4(%rdx),%xmm0
movss  %xmm0,0x14(%rdi)
movss  0x4(%rcx),%xmm0
movss  %xmm0,0x24(%rdi)
movl   $0x0,0x34(%rdi)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x8(%rdi)
movss  0x8(%rdx),%xmm0
movss  %xmm0,0x18(%rdi)
movss  0x8(%rcx),%xmm0
movss  %xmm0,0x28(%rdi)
movabs $0x3f80000000000000,%rax
mov    %rax,0x38(%rdi)
movl   $0x0,0xc(%rdi)
movl   $0x0,0x1c(%rdi)
movl   $0x0,0x2c(%rdi)
ret

LLVM IR (-O0):
define void @m_basis(float* %0, float* %1, float* %2, float* %3) {
%5 = alloca float*
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
store float* %0, float** %5
store float* %1, float** %6
store float* %2, float** %7
store float* %3, float** %8
%9 = load float*, float** %6
%10 = getelementptr inbounds float, float* %9, i64 0
%11 = load float, float* %10
%12 = load float*, float** %5
%13 = getelementptr inbounds float, float* %12, i64 0
store float %11, float* %13
%14 = load float*, float** %7
%15 = getelementptr inbounds float, float* %14, i64 0
%16 = load float, float* %15
%17 = load float*, float** %5
%18 = getelementptr inbounds float, float* %17, i64 4
store float %16, float* %18
%19 = load float*, float** %8
%20 = getelementptr inbounds float, float* %19, i64 0
%21 = load float, float* %20
%22 = load float*, float** %5
%23 = getelementptr inbounds float, float* %22, i64 8
store float %21, float* %23
%24 = load float*, float** %5
%25 = getelementptr inbounds float, float* %24, i64 12
store float 0.000000e+00, float* %25
%26 = load float*, float** %6
%27 = getelementptr inbounds float, float* %26, i64 1
%28 = load float, float* %27
%29 = load float*, float** %5
%30 = getelementptr inbounds float, float* %29, i64 1
store float %28, float* %30
%31 = load float*, float** %7
%32 = getelementptr inbounds float, float* %31, i64 1
%33 = load float, float* %32
%34 = load float*, float** %5
%35 = getelementptr inbounds float, float* %34, i64 5
store float %33, float* %35
%36 = load float*, float** %8
%37 = getelementptr inbounds float, float* %36, i64 1
%38 = load float, float* %37
%39 = load float*, float** %5
%40 = getelementptr inbounds float, float* %39, i64 9
store float %38, float* %40
%41 = load float*, float** %5
%42 = getelementptr inbounds float, float* %41, i64 13
store float 0.000000e+00, float* %42
%43 = load float*, float** %6
%44 = getelementptr inbounds float, float* %43, i64 2
%45 = load float, float* %44
%46 = load float*, float** %5
%47 = getelementptr inbounds float, float* %46, i64 2
store float %45, float* %47
%48 = load float*, float** %7
%49 = getelementptr inbounds float, float* %48, i64 2
%50 = load float, float* %49
%51 = load float*, float** %5
%52 = getelementptr inbounds float, float* %51, i64 6
store float %50, float* %52
%53 = load float*, float** %8
%54 = getelementptr inbounds float, float* %53, i64 2
%55 = load float, float* %54
%56 = load float*, float** %5
%57 = getelementptr inbounds float, float* %56, i64 10
store float %55, float* %57
%58 = load float*, float** %5
%59 = getelementptr inbounds float, float* %58, i64 14
store float 0.000000e+00, float* %59
%60 = load float*, float** %5
%61 = getelementptr inbounds float, float* %60, i64 3
store float 0.000000e+00, float* %61
%62 = load float*, float** %5
%63 = getelementptr inbounds float, float* %62, i64 7
store float 0.000000e+00, float* %63
%64 = load float*, float** %5
%65 = getelementptr inbounds float, float* %64, i64 11
store float 0.000000e+00, float* %65
%66 = load float*, float** %5
%67 = getelementptr inbounds float, float* %66, i64 15
store float 1.000000e+00, float* %67
ret void
}

LLVM IR (-O2):
define void @m_basis(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2, float* nocapture %3) {
%5 = load float, float* %1
store float %5, float* %0
%6 = load float, float* %2
%7 = getelementptr inbounds float, float* %0, i64 4
store float %6, float* %7
%8 = load float, float* %3
%9 = getelementptr inbounds float, float* %0, i64 8
store float %8, float* %9
%10 = getelementptr inbounds float, float* %0, i64 12
store float 0.000000e+00, float* %10
%11 = getelementptr inbounds float, float* %1, i64 1
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds float, float* %2, i64 1
%15 = load float, float* %14
%16 = getelementptr inbounds float, float* %0, i64 5
store float %15, float* %16
%17 = getelementptr inbounds float, float* %3, i64 1
%18 = load float, float* %17
%19 = getelementptr inbounds float, float* %0, i64 9
store float %18, float* %19
%20 = getelementptr inbounds float, float* %0, i64 13
store float 0.000000e+00, float* %20
%21 = getelementptr inbounds float, float* %1, i64 2
%22 = load float, float* %21
%23 = getelementptr inbounds float, float* %0, i64 2
store float %22, float* %23
%24 = getelementptr inbounds float, float* %2, i64 2
%25 = load float, float* %24
%26 = getelementptr inbounds float, float* %0, i64 6
store float %25, float* %26
%27 = getelementptr inbounds float, float* %3, i64 2
%28 = load float, float* %27
%29 = getelementptr inbounds float, float* %0, i64 10
store float %28, float* %29
%30 = getelementptr inbounds float, float* %0, i64 14
store float 0.000000e+00, float* %30
%31 = getelementptr inbounds float, float* %0, i64 3
store float 0.000000e+00, float* %31
%32 = getelementptr inbounds float, float* %0, i64 7
store float 0.000000e+00, float* %32
%33 = getelementptr inbounds float, float* %0, i64 11
store float 0.000000e+00, float* %33
%34 = getelementptr inbounds float, float* %0, i64 15
store float 1.000000e+00, float* %34
ret void
}