#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 *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
void print(int maze[23][19]) {
  int i, j;
  for (i = 0; i < 23; i++) {
    for (j = 0; j < 19; j++) {
      switch (maze[i][j]) {
      case 0:
        putchar('=');
        break;
      case 1:
        putchar(' ');
        break;
      case 7:
        putchar(' ');
        break;
      case -10:
        putchar('P');
        break;
      }
    }
    printf("\n");
  }
  puts("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x17,-0xc(%rbp)
jge    11fe <print+0xce>
movl   $0x0,-0x10(%rbp)
cmpl   $0x13,-0x10(%rbp)
jge    11e4 <print+0xb4>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x4c,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    $0xa,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x11,%eax
ja     11d1 <print+0xa1>
mov    -0x18(%rbp),%rax
lea    0xe6f(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    $0x3d,%edi
call   1030 <putchar@plt>
jmp    11d1 <print+0xa1>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11d1 <print+0xa1>
mov    $0x20,%edi
call   1030 <putchar@plt>
jmp    11d1 <print+0xa1>
mov    $0x50,%edi
call   1030 <putchar@plt>
jmp    11d6 <print+0xa6>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1154 <print+0x24>
lea    0xe5d(%rip),%rdi
call   1050 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1143 <print+0x13>
lea    0xe43(%rip),%rdi
call   1040 <puts@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
xor    %r14d,%r14d
lea    0xecb(%rip),%r15
jmp    1158 <print+0x38>
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r14
add    $0x4c,%r12
cmp    $0x17,%r14
je     118f <print+0x6f>
xor    %ebx,%ebx
jmp    1174 <print+0x54>
nopl   0x0(%rax)
mov    $0x50,%al
movzbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x13,%rbx
je     1140 <print+0x20>
mov    (%r12,%rbx,4),%ecx
add    $0xa,%ecx
cmp    $0x11,%ecx
ja     116a <print+0x4a>
mov    $0x3d,%al
movslq (%r15,%rcx,4),%rcx
add    %r15,%rcx
jmp    *%rcx
mov    $0x20,%al
jmp    1162 <print+0x42>
lea    0xeb2(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <puts@plt>

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

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