#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 *, double const, double const, double const,
                          double const);
void glmPrintMatrix4d(const double m[16]) {
  printf("[ %f %f %f %f ]\n", m[0], m[4], m[8], m[12]);
  printf("[ %f %f %f %f ]\n", m[1], m[5], m[9], m[13]);
  printf("[ %f %f %f %f ]\n", m[2], m[6], m[10], m[14]);
  printf("[ %f %f %f %f ]\n\n", m[3], m[7], m[11], m[15]);
}


x86 assembly (clang, -O0):
<glmPrintMatrix4d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x40(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x60(%rax),%xmm3
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x48(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x68(%rax),%xmm3
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x50(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x70(%rax),%xmm3
lea    0xe5a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x58(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x78(%rax),%xmm3
lea    0xe3b(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmPrintMatrix4d>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x20(%rdi),%xmm1
movsd  0x40(%rdi),%xmm2
movsd  0x60(%rdi),%xmm3
lea    0xecf(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
movsd  0x8(%rbx),%xmm0
movsd  0x28(%rbx),%xmm1
movsd  0x48(%rbx),%xmm2
movsd  0x68(%rbx),%xmm3
mov    %r14,%rdi
call   1030 <printf@plt>
movsd  0x10(%rbx),%xmm0
movsd  0x30(%rbx),%xmm1
movsd  0x50(%rbx),%xmm2
movsd  0x70(%rbx),%xmm3
mov    %r14,%rdi
call   1030 <printf@plt>
movsd  0x18(%rbx),%xmm0
movsd  0x38(%rbx),%xmm1
movsd  0x58(%rbx),%xmm2
movsd  0x78(%rbx),%xmm3
lea    0xe85(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"[ %f %f %f %f ]\0A\00"
@.str.1 = [18 x i8] c"[ %f %f %f %f ]\0A\0A\00"
define void @glmPrintMatrix4d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 4
%8 = load double, double* %7
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 8
%11 = load double, double* %10
%12 = load double*, double** %2
%13 = getelementptr inbounds double, double* %12, i64 12
%14 = load double, double* %13
%15 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %5, double %8, double %11, double %14)
%16 = load double*, double** %2
%17 = getelementptr inbounds double, double* %16, i64 1
%18 = load double, double* %17
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 5
%21 = load double, double* %20
%22 = load double*, double** %2
%23 = getelementptr inbounds double, double* %22, i64 9
%24 = load double, double* %23
%25 = load double*, double** %2
%26 = getelementptr inbounds double, double* %25, i64 13
%27 = load double, double* %26
%28 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %18, double %21, double %24, double %27)
%29 = load double*, double** %2
%30 = getelementptr inbounds double, double* %29, i64 2
%31 = load double, double* %30
%32 = load double*, double** %2
%33 = getelementptr inbounds double, double* %32, i64 6
%34 = load double, double* %33
%35 = load double*, double** %2
%36 = getelementptr inbounds double, double* %35, i64 10
%37 = load double, double* %36
%38 = load double*, double** %2
%39 = getelementptr inbounds double, double* %38, i64 14
%40 = load double, double* %39
%41 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %31, double %34, double %37, double %40)
%42 = load double*, double** %2
%43 = getelementptr inbounds double, double* %42, i64 3
%44 = load double, double* %43
%45 = load double*, double** %2
%46 = getelementptr inbounds double, double* %45, i64 7
%47 = load double, double* %46
%48 = load double*, double** %2
%49 = getelementptr inbounds double, double* %48, i64 11
%50 = load double, double* %49
%51 = load double*, double** %2
%52 = getelementptr inbounds double, double* %51, i64 15
%53 = load double, double* %52
%54 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %44, double %47, double %50, double %53)
ret void
}

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