#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 *, int, int, int);
void show_multi_array(int matrix[4][4]) {
  int i = 0;
  for (; i < 4; i++) {
    int j = 0;
    for (; j < 4; j++) {
      printf("[Row: %i][Column: %i] -> {%d} \n", i, j, matrix[i][j]);
    }
  }
}


x86 assembly (clang, -O0):
<show_multi_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x4,-0xc(%rbp)
jge    1187 <show_multi_array+0x77>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1174 <show_multi_array+0x64>
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x4,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <show_multi_array+0x24>
jmp    1179 <show_multi_array+0x69>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <show_multi_array+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_multi_array>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%ecx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x4(%rbx),%ecx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    0x8(%rbx),%ecx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    0xc(%rbx),%ecx
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    0x10(%rbx),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x14(%rbx),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    0x18(%rbx),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    0x1c(%rbx),%ecx
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    0x20(%rbx),%ecx
mov    %r14,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x24(%rbx),%ecx
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    0x28(%rbx),%ecx
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    0x2c(%rbx),%ecx
mov    %r14,%rdi
mov    $0x2,%esi
mov    $0x3,%edx
call   1030 <printf@plt>
mov    0x30(%rbx),%ecx
mov    %r14,%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x34(%rbx),%ecx
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    0x38(%rbx),%ecx
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x2,%edx
call   1030 <printf@plt>
mov    0x3c(%rbx),%ecx
mov    %r14,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"[Row: %i][Column: %i] -> {%d} \0A\00"
define void @show_multi_array([4 x i32]* %0) {
%2 = alloca [4 x i32]*
%3 = alloca i32
%4 = alloca i32
store [4 x i32]* %0, [4 x i32]** %2
store i32 0, i32* %3
br label %5
5: ; preds = %28, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 4
br i1 %7, label %8, label %31
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %24, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %27
12: ; preds = %9
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = load [4 x i32]*, [4 x i32]** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [4 x i32], [4 x i32]* %15, i64 %17
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %18, i64 0, i64 %20
%22 = load i32, i32* %21
%23 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i32 %22)
br label %24
24: ; preds = %12
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %9
27: ; preds = %9
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %5
31: ; preds = %5
ret void
}

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