#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 exibeMatriz(int l, int c, char matriz[l][c]) {
  int i, j;
  for (i = 0; i < l; i++) {
    for (j = 0; j < c; j++) {
      printf(" %c ", matriz[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<exibeMatriz>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11a2 <exibeMatriz+0x92>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1186 <exibeMatriz+0x76>
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe8f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1143 <exibeMatriz+0x33>
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1130 <exibeMatriz+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exibeMatriz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %esi,0x4(%rsp)
test   %edi,%edi
jle    118a <exibeMatriz+0x6a>
mov    %rdx,%rbx
mov    0x4(%rsp),%ebp
mov    %edi,%r12d
lea    0xebc(%rip),%r15
xor    %r13d,%r13d
jmp    1166 <exibeMatriz+0x46>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
add    %rbp,%rbx
cmp    %r12,%r13
je     118a <exibeMatriz+0x6a>
cmpl   $0x0,0x4(%rsp)
jle    1150 <exibeMatriz+0x30>
xor    %r14d,%r14d
movsbl (%rbx,%r14,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%rbp
jne    1170 <exibeMatriz+0x50>
jmp    1150 <exibeMatriz+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c" %c \00"
define void @exibeMatriz(i32 %0, i32 %1, i8* nocapture %2) {
%4 = zext i32 %1 to i64
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %26
6: ; preds = %3
%7 = icmp sgt i32 %1, 0
%8 = zext i32 %0 to i64
br label %9
9: ; preds = %6, %22
%10 = phi i64 [ 0, %6 ], [ %24, %22 ]
br i1 %7, label %11, label %22
11: ; preds = %9
%12 = mul nuw nsw i64 %10, %4
%13 = getelementptr inbounds i8, i8* %2, i64 %12
br label %14
14: ; preds = %11, %14
%15 = phi i64 [ 0, %11 ], [ %20, %14 ]
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %18)
%20 = add nuw nsw i64 %15, 1
%21 = icmp eq i64 %20, %4
br i1 %21, label %22, label %14
22: ; preds = %14, %9
%23 = tail call i32 @putchar(i32 10)
%24 = add nuw nsw i64 %10, 1
%25 = icmp eq i64 %24, %8
br i1 %25, label %26, label %9
26: ; preds = %22, %3
ret void
}