#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 imprimir_matriz(int x, int y, int m[x][y]) {
  int i, j;
  printf("\t|");
  for (i = 0; i < y; i++)
    printf(" %c |", i + 'a');
  for (i = 0; i < x; i++) {
    printf("\n%d\t|", i);
    for (j = 0; j < y; j++) {
      printf(" %d |", m[i][j]);
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<imprimir_matriz>:
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)
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    116c <imprimir_matriz+0x5c>
mov    -0x14(%rbp),%esi
add    $0x61,%esi
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113e <imprimir_matriz+0x2e>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11f0 <imprimir_matriz+0xe0>
mov    -0x14(%rbp),%esi
lea    0xe7d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11dd <imprimir_matriz+0xcd>
mov    -0x20(%rbp),%rdx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe44(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1197 <imprimir_matriz+0x87>
jmp    11e2 <imprimir_matriz+0xd2>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1173 <imprimir_matriz+0x63>
lea    0xe1b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imprimir_matriz>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %edi,%r14d
lea    0xecc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebp,0xc(%rsp)
test   %ebp,%ebp
jle    118f <imprimir_matriz+0x6f>
mov    0xc(%rsp),%eax
mov    %eax,%r15d
neg    %r15d
mov    $0x61,%ebp
lea    0xe9e(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    (%r15,%rbp,1),%eax
add    $0x1,%eax
mov    %ebp,%ecx
add    $0x1,%ecx
mov    %ecx,%ebp
cmp    $0x61,%eax
jne    1170 <imprimir_matriz+0x50>
test   %r14d,%r14d
jle    1209 <imprimir_matriz+0xe9>
mov    0xc(%rsp),%ebp
mov    %r14d,%eax
mov    %rax,0x10(%rsp)
lea    0x0(,%rbp,4),%r15
lea    0xe5d(%rip),%r13
xor    %r12d,%r12d
jmp    11ce <imprimir_matriz+0xae>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r12
add    %r15,%rbx
cmp    0x10(%rsp),%r12
je     1209 <imprimir_matriz+0xe9>
lea    0xe31(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1040 <printf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c0 <imprimir_matriz+0xa0>
xor    %r14d,%r14d
nopl   0x0(%rax)
mov    (%rbx,%r14,4),%esi
mov    %r13,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%r14
cmp    %r14,%rbp
jne    11f0 <imprimir_matriz+0xd0>
jmp    11c0 <imprimir_matriz+0xa0>
mov    $0xa,%edi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

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

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