int wematODEtoGL(float *rot, float *pos, float *m16) {
  m16[0] = rot[0];
  m16[1] = rot[4];
  m16[2] = rot[8];
  m16[3] = 0;
  m16[4] = rot[1];
  m16[5] = rot[5];
  m16[6] = rot[9];
  m16[7] = 0;
  m16[8] = rot[2];
  m16[9] = rot[6];
  m16[10] = rot[10];
  m16[11] = 0;
  m16[12] = pos[0];
  m16[13] = pos[1];
  m16[14] = pos[2];
  m16[15] = 1;
  return 0;
}


x86 assembly (clang, -O0):
<wematODEtoGL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
movss  0x24(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
movss  0x28(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x34(%rax)
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x38(%rax)
mov    -0x18(%rbp),%rax
movss  0xdeb(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wematODEtoGL>:
movss  (%rdi),%xmm0
movss  %xmm0,(%rdx)
movss  0x10(%rdi),%xmm0
movss  %xmm0,0x4(%rdx)
movss  0x20(%rdi),%xmm0
movss  %xmm0,0x8(%rdx)
movl   $0x0,0xc(%rdx)
movss  0x4(%rdi),%xmm0
movss  %xmm0,0x10(%rdx)
movss  0x14(%rdi),%xmm0
movss  %xmm0,0x14(%rdx)
movss  0x24(%rdi),%xmm0
movss  %xmm0,0x18(%rdx)
movl   $0x0,0x1c(%rdx)
movss  0x8(%rdi),%xmm0
movss  %xmm0,0x20(%rdx)
movss  0x18(%rdi),%xmm0
movss  %xmm0,0x24(%rdx)
movss  0x28(%rdi),%xmm0
movss  %xmm0,0x28(%rdx)
movl   $0x0,0x2c(%rdx)
movss  (%rsi),%xmm0
movss  %xmm0,0x30(%rdx)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0x34(%rdx)
movss  0x8(%rsi),%xmm0
movss  %xmm0,0x38(%rdx)
movl   $0x3f800000,0x3c(%rdx)
xor    %eax,%eax
ret

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

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