void makeTranslateMatrix(float x, float y, float z, float m[16]) {
  m[0] = 1;
  m[1] = 0;
  m[2] = 0;
  m[3] = x;
  m[4] = 0;
  m[5] = 1;
  m[6] = 0;
  m[7] = y;
  m[8] = 0;
  m[9] = 0;
  m[10] = 1;
  m[11] = z;
  m[12] = 0;
  m[13] = 0;
  m[14] = 0;
  m[15] = 1;
}


x86 assembly (clang, -O0):
<makeTranslateMatrix>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
mov    %rdi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movss  0xedd(%rip),%xmm0
movss  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x4(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x8(%rax)
movss  -0x4(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0xc(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movss  0xe9b(%rip),%xmm0
movss  %xmm0,0x14(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x18(%rax)
movss  -0x8(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x1c(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x24(%rax)
mov    -0x18(%rbp),%rax
movss  0xe58(%rip),%xmm0
movss  %xmm0,0x28(%rax)
movss  -0xc(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movss  %xmm0,0x2c(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x34(%rax)
mov    -0x18(%rbp),%rax
xorps  %xmm0,%xmm0
movss  %xmm0,0x38(%rax)
mov    -0x18(%rbp),%rax
movss  0xe15(%rip),%xmm0
movss  %xmm0,0x3c(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeTranslateMatrix>:
movq   $0x3f800000,(%rdi)
movl   $0x0,0x8(%rdi)
movss  %xmm0,0xc(%rdi)
movabs $0x3f80000000000000,%rax
mov    %rax,0x10(%rdi)
movl   $0x0,0x18(%rdi)
movss  %xmm1,0x1c(%rdi)
movq   $0x0,0x20(%rdi)
movl   $0x3f800000,0x28(%rdi)
movss  %xmm2,0x2c(%rdi)
movaps 0xeb8(%rip),%xmm0
movups %xmm0,0x30(%rdi)
ret

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

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