#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 *, ...);
void printMtr(int linha, int coluna, int **mtr) {
  printf("\t");
  for (size_t i = 0; i < coluna; i++) {
    printf("[%d]\t", i);
  }
  printf("\n");
  for (size_t j = 0; j < linha; j++) {
    printf("[%d]\t", j);
    for (size_t i = 0; i < coluna; i++) {
      printf(" %d\t", mtr[j][i]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printMtr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    116c <printMtr+0x5c>
mov    -0x18(%rbp),%rsi
lea    0xeac(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1138 <printMtr+0x28>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movslq -0x4(%rbp),%rcx
cmp    %rcx,%rax
jae    120f <printMtr+0xff>
mov    -0x20(%rbp),%rsi
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movq   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movslq -0x8(%rbp),%rcx
cmp    %rcx,%rax
jae    11f0 <printMtr+0xe0>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    -0x28(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x28(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x28(%rbp)
jmp    11ad <printMtr+0x9d>
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1182 <printMtr+0x72>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMtr>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r13
mov    %esi,%ebx
mov    %edi,%r15d
mov    $0x9,%edi
call   1030 <putchar@plt>
mov    %ebx,0x4(%rsp)
movslq %ebx,%r14
test   %r14d,%r14d
je     1176 <printMtr+0x56>
cmp    $0x2,%r14
mov    $0x1,%ebx
cmovae %r14,%rbx
lea    0xea3(%rip),%r12
xor    %ebp,%ebp
nop
mov    %r12,%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1160 <printMtr+0x40>
mov    $0xa,%edi
call   1030 <putchar@plt>
test   %r15d,%r15d
je     11ee <printMtr+0xce>
cmp    $0x2,%r14
mov    $0x1,%ebx
cmovae %r14,%rbx
movslq %r15d,%r14
lea    0xe6a(%rip),%r12
xor    %ebp,%ebp
jmp    11b3 <printMtr+0x93>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %r14,%rbp
je     11ee <printMtr+0xce>
lea    0xe46(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0x4(%rsp)
je     11a0 <printMtr+0x80>
xor    %r15d,%r15d
xchg   %ax,%ax
mov    0x0(%r13,%rbp,8),%rax
mov    (%rax,%r15,4),%esi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r15
cmp    %r15,%rbx
jne    11d0 <printMtr+0xb0>
jmp    11a0 <printMtr+0x80>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str.1 = [6 x i8] c"[%d]\09\00"
@.str.3 = [5 x i8] c" %d\09\00"
define void @printMtr(i32 %0, i32 %1, i32** nocapture %2) {
%4 = tail call i32 @putchar(i32 9)
%5 = sext i32 %1 to i64
%6 = icmp eq i32 %1, 0
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = call i64 @llvm.umax.i64(i64 %5, i64 1)
br label %15
9: ; preds = %15, %3
%10 = tail call i32 @putchar(i32 10)
%11 = icmp eq i32 %0, 0
br i1 %11, label %20, label %12
12: ; preds = %9
%13 = call i64 @llvm.umax.i64(i64 %5, i64 1)
%14 = sext i32 %0 to i64
br label %21
15: ; preds = %7, %15
%16 = phi i64 [ %18, %15 ], [ 0, %7 ]
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %16)
%18 = add nuw i64 %16, 1
%19 = icmp eq i64 %18, %8
br i1 %19, label %9, label %15
20: ; preds = %26, %9
ret void
21: ; preds = %12, %26
%22 = phi i64 [ 0, %12 ], [ %28, %26 ]
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %22)
br i1 %6, label %26, label %24
24: ; preds = %21
%25 = getelementptr inbounds i32*, i32** %2, i64 %22
br label %30
26: ; preds = %30, %21
%27 = tail call i32 @putchar(i32 10)
%28 = add nuw i64 %22, 1
%29 = icmp eq i64 %28, %14
br i1 %29, label %20, label %21
30: ; preds = %24, %30
%31 = phi i64 [ 0, %24 ], [ %36, %30 ]
%32 = load i32*, i32** %25
%33 = getelementptr inbounds i32, i32* %32, i64 %31
%34 = load i32, i32* %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %34)
%36 = add nuw i64 %31, 1
%37 = icmp eq i64 %36, %13
br i1 %37, label %26, label %30
}