#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*/ system(char *);
void printMaze(const char (*maze)[25], int xRow, int xCol) {
  int i, j;
  system("cls");
  for (i = 0; i < 13; i++) {
    for (j = 0; j < 25; j++) {
      if (i == xRow && j == xCol)
        printf("X ");
      else
        printf("%c ", maze[i][j]);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<printMaze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <system@plt>
movl   $0x0,-0x14(%rbp)
cmpl   $0xd,-0x14(%rbp)
jge    11df <printMaze+0xbf>
movl   $0x0,-0x18(%rbp)
cmpl   $0x19,-0x18(%rbp)
jge    11c3 <printMaze+0xa3>
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    118b <printMaze+0x6b>
mov    -0x18(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    118b <printMaze+0x6b>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11b0 <printMaze+0x90>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
imul   $0x19,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11b5 <printMaze+0x95>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1156 <printMaze+0x36>
lea    0xe41(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1145 <printMaze+0x25>
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    %edx,%ebp
mov    %esi,%r14d
mov    %rdi,%r12
lea    0xeb6(%rip),%rdi
call   1040 <system@plt>
mov    %ebp,%r13d
mov    %r14d,%ebx
lea    0xeab(%rip),%r15
xor    %ebp,%ebp
jmp    1178 <printMaze+0x48>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
add    $0x19,%r12
cmp    $0xd,%rbp
je     11b3 <printMaze+0x83>
xor    %r14d,%r14d
jmp    1199 <printMaze+0x69>
nopl   (%rax)
movsbl (%r12,%r14,1),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%r14
cmp    $0x19,%r14
je     1160 <printMaze+0x30>
cmp    %rbx,%rbp
jne    1180 <printMaze+0x50>
cmp    %r14,%r13
jne    1180 <printMaze+0x50>
lea    0xe5a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    118f <printMaze+0x5f>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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