void gb_float44_identity(float m[4][4]) {
  m[0][0] = 1;
  m[0][1] = 0;
  m[0][2] = 0;
  m[0][3] = 0;
  m[1][0] = 0;
  m[1][1] = 1;
  m[1][2] = 0;
  m[1][3] = 0;
  m[2][0] = 0;
  m[2][1] = 0;
  m[2][2] = 1;
  m[2][3] = 0;
  m[3][0] = 0;
  m[3][1] = 0;
  m[3][2] = 0;
  m[3][3] = 1;
}


x86 assembly (clang, -O0):
<gb_float44_identity>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  0xeec(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0xc(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
movss  0xeac(%rip),%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x1c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
movss  0xe6b(%rip),%xmm0
movss  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x2c(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
movss  0xe2a(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_float44_identity>:
movl   $0x3f800000,(%rdi)
xorps  %xmm0,%xmm0
movups %xmm0,0x4(%rdi)
movl   $0x3f800000,0x14(%rdi)
movups %xmm0,0x18(%rdi)
movl   $0x3f800000,0x28(%rdi)
movups %xmm0,0x2c(%rdi)
movl   $0x3f800000,0x3c(%rdi)
ret

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

LLVM IR (-O2):
define void @gb_float44_identity([4 x float]* nocapture writeonly %0) {
%2 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 0
store float 1.000000e+00, float* %2
%3 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 0, i64 1
%4 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 1, i64 1
%5 = bitcast float* %3 to i8*
store float 1.000000e+00, float* %4
%6 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 1, i64 2
%7 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 2, i64 2
%8 = bitcast float* %6 to i8*
store float 1.000000e+00, float* %7
%9 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 2, i64 3
%10 = getelementptr inbounds [4 x float], [4 x float]* %0, i64 3, i64 3
%11 = bitcast float* %9 to i8*
store float 1.000000e+00, float* %10
ret void
}