#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 printMaze(int maze[32][32]) {
  int i;
  int j;
  int c;
  printf("\n----------\n");
  for (i = 0; i < 32; i++) {
    for (j = 0; j < 32; j++) {
      c = maze[i][j];
      if (c > -5) {
        if (c < 0) {
          printf("%c ", (48 + c));
        } else {
          printf("%d ", c);
        }
      } else
        printf("  ");
    }
    printf("\n");
  }
  printf("\n----------\n");
}


x86 assembly (clang, -O0):
<printMaze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    11e5 <printMaze+0xd5>
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x10(%rbp)
jge    11c9 <printMaze+0xb9>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x7,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0xfffffffb,-0x14(%rbp)
jle    11a8 <printMaze+0x98>
cmpl   $0x0,-0x14(%rbp)
jge    1192 <printMaze+0x82>
mov    -0x14(%rbp),%esi
add    $0x30,%esi
lea    0xe87(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a3 <printMaze+0x93>
mov    -0x14(%rbp),%esi
lea    0xe75(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11b6 <printMaze+0xa6>
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11bb <printMaze+0xab>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1142 <printMaze+0x32>
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1131 <printMaze+0x21>
lea    0xe14(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printMaze>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xec6(%rip),%rdi
call   1040 <puts@plt>
lea    0xeaf(%rip),%r14
lea    0xeac(%rip),%r15
lea    0xea9(%rip),%r12
xor    %r13d,%r13d
jmp    1188 <printMaze+0x58>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r13
sub    $0xffffffffffffff80,%rbx
cmp    $0x20,%r13
je     11c4 <printMaze+0x94>
xor    %ebp,%ebp
jmp    11a4 <printMaze+0x74>
nopl   0x0(%rax)
mov    %r12,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbp
cmp    $0x20,%rbp
je     1170 <printMaze+0x40>
mov    (%rbx,%rbp,4),%esi
cmp    $0xfffffffc,%esi
jl     1190 <printMaze+0x60>
test   %esi,%esi
js     11b5 <printMaze+0x85>
mov    %r15,%rdi
jmp    11bb <printMaze+0x8b>
add    $0x30,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    119a <printMaze+0x6a>
lea    0xe40(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <puts@plt>

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

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