#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, float const, float const, float const);
void glmPrintMatrix3f(const float m[9]) {
  printf("[ %f %f %f ]\n", m[0], m[3], m[6]);
  printf("[ %f %f %f ]\n", m[1], m[4], m[7]);
  printf("[ %f %f %f ]\n\n", m[2], m[5], m[8]);
}


x86 assembly (clang, -O0):
<glmPrintMatrix3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0xc(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x18(%rax),%xmm2
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x10(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x1c(%rax),%xmm2
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  0x14(%rax),%xmm1
mov    -0x8(%rbp),%rax
movss  0x20(%rax),%xmm2
lea    0xe83(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintMatrix3f>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movss  (%rdi),%xmm0
movss  0xc(%rdi),%xmm1
movss  0x18(%rdi),%xmm2
lea    0xed4(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
movss  0x4(%rbx),%xmm0
movss  0x10(%rbx),%xmm1
movss  0x1c(%rbx),%xmm2
mov    %r14,%rdi
call   1030 <printf@plt>
movss  0x8(%rbx),%xmm0
movss  0x14(%rbx),%xmm1
movss  0x20(%rbx),%xmm2
lea    0xead(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"[ %f %f %f ]\0A\00"
@.str.1 = [15 x i8] c"[ %f %f %f ]\0A\0A\00"
define void @glmPrintMatrix3f(float* %0) {
%2 = alloca float*
store float* %0, float** %2
%3 = load float*, float** %2
%4 = getelementptr inbounds float, float* %3, i64 0
%5 = load float, float* %4
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 3
%8 = load float, float* %7
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 6
%11 = load float, float* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %5, float %8, float %11)
%13 = load float*, float** %2
%14 = getelementptr inbounds float, float* %13, i64 1
%15 = load float, float* %14
%16 = load float*, float** %2
%17 = getelementptr inbounds float, float* %16, i64 4
%18 = load float, float* %17
%19 = load float*, float** %2
%20 = getelementptr inbounds float, float* %19, i64 7
%21 = load float, float* %20
%22 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %15, float %18, float %21)
%23 = load float*, float** %2
%24 = getelementptr inbounds float, float* %23, i64 2
%25 = load float, float* %24
%26 = load float*, float** %2
%27 = getelementptr inbounds float, float* %26, i64 5
%28 = load float, float* %27
%29 = load float*, float** %2
%30 = getelementptr inbounds float, float* %29, i64 8
%31 = load float, float* %30
%32 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float %25, float %28, float %31)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"[ %f %f %f ]\0A\00"
@.str.1 = [15 x i8] c"[ %f %f %f ]\0A\0A\00"
define void @glmPrintMatrix3f(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 3
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 6
%6 = load float, float* %5
%7 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %2, float %4, float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
%9 = load float, float* %8
%10 = getelementptr inbounds float, float* %0, i64 4
%11 = load float, float* %10
%12 = getelementptr inbounds float, float* %0, i64 7
%13 = load float, float* %12
%14 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), float %9, float %11, float %13)
%15 = getelementptr inbounds float, float* %0, i64 2
%16 = load float, float* %15
%17 = getelementptr inbounds float, float* %0, i64 5
%18 = load float, float* %17
%19 = getelementptr inbounds float, float* %0, i64 8
%20 = load float, float* %19
%21 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), float %16, float %18, float %20)
ret void
}