#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 drawMaze(int (*maze)[25]) {
  int i, j;
  printf("{\n");
  for (i = 0; i < 13; i++) {
    printf("{ ");
    for (j = 0; j < 25; j++) {
      if (maze[i][j] == 1)
        printf("'#',");
      else
        printf("' ',");
    }
    printf("},\n");
  }
  printf("\n}\n");
}


x86 assembly (clang, -O0):
<drawMaze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jge    11bd <drawMaze+0xad>
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
cmpl   $0x19,-0x10(%rbp)
jge    11a3 <drawMaze+0x93>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x64,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1184 <drawMaze+0x74>
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    1190 <drawMaze+0x80>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    1195 <drawMaze+0x85>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    114c <drawMaze+0x3c>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112f <drawMaze+0x1f>
lea    0xe50(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawMaze>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %r12d,%r12d
lea    0xebf(%rip),%r13
lea    0xebd(%rip),%rbp
lea    0xec0(%rip),%r15
jmp    1176 <drawMaze+0x56>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
call   1030 <puts@plt>
add    $0x1,%r12
add    $0x64,%rbx
cmp    $0xd,%r12
je     11ae <drawMaze+0x8e>
lea    0xe83(%rip),%rdi
call   1040 <printf@plt>
xor    %r14d,%r14d
jmp    119f <drawMaze+0x7f>
nopw   0x0(%rax,%rax,1)
call   1040 <printf@plt>
add    $0x1,%r14
cmp    $0x19,%r14
je     1160 <drawMaze+0x40>
cmpl   $0x1,(%rbx,%r14,4)
mov    %r13,%rdi
je     1190 <drawMaze+0x70>
mov    %rbp,%rdi
jmp    1190 <drawMaze+0x70>
lea    0xe5a(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <puts@plt>

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

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