void glmGenerateInertiaMatrixForSphere4f(float m[16], float r, float mass) {
  mass *= 2.0f / 5.0f;
  m[0] = mass * r * r;
  m[4] = 0;
  m[8] = 0;
  m[12] = 0;
  m[1] = 0;
  m[5] = mass * r * r;
  m[9] = 0;
  m[13] = 0;
  m[2] = 0;
  m[6] = 0;
  m[10] = mass * r * r;
  m[14] = 0;
  m[3] = 0;
  m[7] = 0;
  m[11] = 0;
  m[15] = 1;
}


x86 assembly (clang, -O0):
<glmGenerateInertiaMatrixForSphere4f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  0xeea(%rip),%xmm0
mulss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,0x14(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
movss  -0x10(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
mulss  -0xc(%rbp),%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  0xdf9(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateInertiaMatrixForSphere4f>:
mulss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm0,%xmm1
movss  %xmm1,(%rdi)
movss  %xmm1,0x14(%rdi)
movss  %xmm1,0x28(%rdi)
xorps  %xmm0,%xmm0
movups %xmm0,0x4(%rdi)
movups %xmm0,0x18(%rdi)
movups %xmm0,0x2c(%rdi)
movl   $0x3f800000,0x3c(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateInertiaMatrixForSphere4f(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* %6
%8 = fmul float %7, 0x3FD99999A0000000
store float %8, float* %6
%9 = load float, float* %6
%10 = load float, float* %5
%11 = fmul float %9, %10
%12 = load float, float* %5
%13 = fmul float %11, %12
%14 = load float*, float** %4
%15 = getelementptr inbounds float, float* %14, i64 0
store float %13, float* %15
%16 = load float*, float** %4
%17 = getelementptr inbounds float, float* %16, i64 4
store float 0.000000e+00, float* %17
%18 = load float*, float** %4
%19 = getelementptr inbounds float, float* %18, i64 8
store float 0.000000e+00, float* %19
%20 = load float*, float** %4
%21 = getelementptr inbounds float, float* %20, i64 12
store float 0.000000e+00, float* %21
%22 = load float*, float** %4
%23 = getelementptr inbounds float, float* %22, i64 1
store float 0.000000e+00, float* %23
%24 = load float, float* %6
%25 = load float, float* %5
%26 = fmul float %24, %25
%27 = load float, float* %5
%28 = fmul float %26, %27
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 5
store float %28, float* %30
%31 = load float*, float** %4
%32 = getelementptr inbounds float, float* %31, i64 9
store float 0.000000e+00, float* %32
%33 = load float*, float** %4
%34 = getelementptr inbounds float, float* %33, i64 13
store float 0.000000e+00, float* %34
%35 = load float*, float** %4
%36 = getelementptr inbounds float, float* %35, i64 2
store float 0.000000e+00, float* %36
%37 = load float*, float** %4
%38 = getelementptr inbounds float, float* %37, i64 6
store float 0.000000e+00, float* %38
%39 = load float, float* %6
%40 = load float, float* %5
%41 = fmul float %39, %40
%42 = load float, float* %5
%43 = fmul float %41, %42
%44 = load float*, float** %4
%45 = getelementptr inbounds float, float* %44, i64 10
store float %43, float* %45
%46 = load float*, float** %4
%47 = getelementptr inbounds float, float* %46, i64 14
store float 0.000000e+00, float* %47
%48 = load float*, float** %4
%49 = getelementptr inbounds float, float* %48, i64 3
store float 0.000000e+00, float* %49
%50 = load float*, float** %4
%51 = getelementptr inbounds float, float* %50, i64 7
store float 0.000000e+00, float* %51
%52 = load float*, float** %4
%53 = getelementptr inbounds float, float* %52, i64 11
store float 0.000000e+00, float* %53
%54 = load float*, float** %4
%55 = getelementptr inbounds float, float* %54, i64 15
store float 1.000000e+00, float* %55
ret void
}

LLVM IR (-O2):
define void @glmGenerateInertiaMatrixForSphere4f(float* nocapture writeonly %0, float %1, float %2) {
%4 = fmul float %2, 0x3FD99999A0000000
%5 = fmul float %4, %1
%6 = fmul float %5, %1
store float %6, float* %0
%7 = getelementptr inbounds float, float* %0, i64 1
%8 = getelementptr inbounds float, float* %0, i64 5
store float %6, float* %8
%9 = getelementptr inbounds float, float* %0, i64 6
%10 = getelementptr inbounds float, float* %0, i64 10
store float %6, float* %10
%11 = bitcast float* %7 to <4 x float>*
store <4 x float> zeroinitializer, <4 x float>* %11
%12 = bitcast float* %9 to <4 x float>*
store <4 x float> zeroinitializer, <4 x float>* %12
%13 = getelementptr inbounds float, float* %0, i64 11
%14 = bitcast float* %13 to <4 x float>*
store <4 x float> zeroinitializer, <4 x float>* %14
%15 = getelementptr inbounds float, float* %0, i64 15
store float 1.000000e+00, float* %15
ret void
}