#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 OutPutResult(unsigned int **map, unsigned int *moveStep, unsigned int *Row,
                  unsigned int *Col, unsigned int *Y, unsigned int *X) {
  printf("\n      ");
  for (unsigned int Cindex = 0; Cindex < *Col; ++Cindex)
    printf("%5uC", Cindex);
  printf("\n\n");
  for (unsigned int Rindex = 0; Rindex < *Row; ++Rindex) {
    printf("%5uR", Rindex);
    for (unsigned int Cindex = 0; Cindex < *Col; ++Cindex)
      printf("%6u", map[Rindex][Cindex]);
    printf("\n");
  }
  printf("\nRow:%u, Col:%u, Y:%u, X:%u\n", *Row, *Col, *Y, *X);
  printf("Total Move Step: %u\n", *moveStep);
}


x86 assembly (clang, -O0):
<OutPutResult>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jae    1173 <OutPutResult+0x63>
mov    -0x34(%rbp),%esi
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1145 <OutPutResult+0x35>
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jae    1207 <OutPutResult+0xf7>
mov    -0x38(%rbp),%esi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    (%rcx),%eax
jae    11eb <OutPutResult+0xdb>
mov    -0x8(%rbp),%rax
mov    -0x38(%rbp),%ecx
mov    (%rax,%rcx,8),%rax
mov    -0x3c(%rbp),%ecx
mov    (%rax,%rcx,4),%esi
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11af <OutPutResult+0x9f>
lea    0xe1c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1188 <OutPutResult+0x78>
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
mov    -0x20(%rbp),%rax
mov    (%rax),%edx
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
mov    -0x30(%rbp),%rax
mov    (%rax),%r8d
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
lea    0xdfb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OutPutResult>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r9,%r12
mov    %r8,0x20(%rsp)
mov    %rcx,%r13
mov    %rdx,0x8(%rsp)
mov    %rsi,%r15
mov    %rdi,%rbp
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x0(%r13)
je     1195 <OutPutResult+0x65>
lea    0xe98(%rip),%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%ebx
cmp    0x0(%r13),%ebx
jb     1180 <OutPutResult+0x50>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    0x8(%rsp),%rax
cmpl   $0x0,(%rax)
je     122d <OutPutResult+0xfd>
mov    %r12,0x10(%rsp)
mov    %r15,0x18(%rsp)
lea    0xe4d(%rip),%r14
lea    0xe4b(%rip),%r15
xor    %r12d,%r12d
jmp    11ea <OutPutResult+0xba>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%r12
mov    0x8(%rsp),%rax
mov    (%rax),%esi
cmp    %rsi,%r12
jae    1221 <OutPutResult+0xf1>
mov    %r14,%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1050 <printf@plt>
cmpl   $0x0,0x0(%r13)
je     11d0 <OutPutResult+0xa0>
xor    %ebx,%ebx
mov    0x0(%rbp,%r12,8),%rax
mov    (%rax,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
mov    0x0(%r13),%eax
cmp    %rax,%rbx
jb     1200 <OutPutResult+0xd0>
jmp    11d0 <OutPutResult+0xa0>
mov    0x18(%rsp),%r15
mov    0x10(%rsp),%r12
jmp    122f <OutPutResult+0xff>
xor    %esi,%esi
mov    0x0(%r13),%edx
mov    0x20(%rsp),%rax
mov    (%rax),%ecx
mov    (%r12),%r8d
lea    0xdd1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15),%esi
lea    0xddd(%rip),%rdi
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\0A \00"
@.str.1 = [5 x i8] c"%5uC\00"
@.str.2 = [3 x i8] c"\0A\0A\00"
@.str.3 = [5 x i8] c"%5uR\00"
@.str.4 = [4 x i8] c"%6u\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [29 x i8] c"\0ARow:%u, Col:%u, Y:%u, X:%u\0A\00"
@.str.7 = [21 x i8] c"Total Move Step: %u\0A\00"
define void @OutPutResult(i32** %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i32**
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32** %0, i32*** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %13
br label %17
17: ; preds = %25, %6
%18 = load i32, i32* %13
%19 = load i32*, i32** %10
%20 = load i32, i32* %19
%21 = icmp ult i32 %18, %20
br i1 %21, label %22, label %28
22: ; preds = %17
%23 = load i32, i32* %13
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %23)
br label %25
25: ; preds = %22
%26 = load i32, i32* %13
%27 = add i32 %26, 1
store i32 %27, i32* %13
br label %17
28: ; preds = %17
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %14
br label %30
30: ; preds = %59, %28
%31 = load i32, i32* %14
%32 = load i32*, i32** %9
%33 = load i32, i32* %32
%34 = icmp ult i32 %31, %33
br i1 %34, label %35, label %62
35: ; preds = %30
%36 = load i32, i32* %14
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %36)
store i32 0, i32* %15
br label %38
38: ; preds = %54, %35
%39 = load i32, i32* %15
%40 = load i32*, i32** %10
%41 = load i32, i32* %40
%42 = icmp ult i32 %39, %41
br i1 %42, label %43, label %57
43: ; preds = %38
%44 = load i32**, i32*** %7
%45 = load i32, i32* %14
%46 = zext i32 %45 to i64
%47 = getelementptr inbounds i32*, i32** %44, i64 %46
%48 = load i32*, i32** %47
%49 = load i32, i32* %15
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %48, i64 %50
%52 = load i32, i32* %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %52)
br label %54
54: ; preds = %43
%55 = load i32, i32* %15
%56 = add i32 %55, 1
store i32 %56, i32* %15
br label %38
57: ; preds = %38
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %59
59: ; preds = %57
%60 = load i32, i32* %14
%61 = add i32 %60, 1
store i32 %61, i32* %14
br label %30
62: ; preds = %30
%63 = load i32*, i32** %9
%64 = load i32, i32* %63
%65 = load i32*, i32** %10
%66 = load i32, i32* %65
%67 = load i32*, i32** %11
%68 = load i32, i32* %67
%69 = load i32*, i32** %12
%70 = load i32, i32* %69
%71 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %64, i32 %66, i32 %68, i32 %70)
%72 = load i32*, i32** %8
%73 = load i32, i32* %72
%74 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %73)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\0A \00"
@.str.1 = [5 x i8] c"%5uC\00"
@.str.3 = [5 x i8] c"%5uR\00"
@.str.4 = [4 x i8] c"%6u\00"
@.str.6 = [29 x i8] c"\0ARow:%u, Col:%u, Y:%u, X:%u\0A\00"
@.str.7 = [21 x i8] c"Total Move Step: %u\0A\00"
@str = [2 x i8] c"\0A\00"
define void @OutPutResult(i32** nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %14, %6
%11 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%12 = load i32, i32* %2
%13 = icmp eq i32 %12, 0
br i1 %13, label %20, label %28
14: ; preds = %6, %14
%15 = phi i32 [ %17, %14 ], [ 0, %6 ]
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %15)
%17 = add nuw i32 %15, 1
%18 = load i32, i32* %3
%19 = icmp ult i32 %17, %18
br i1 %19, label %14, label %10
20: ; preds = %36, %10
%21 = phi i32 [ 0, %10 ], [ %39, %36 ]
%22 = load i32, i32* %3
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.6, i64 0, i64 0), i32 %21, i32 %22, i32 %23, i32 %24)
%26 = load i32, i32* %1
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i32 %26)
ret void
28: ; preds = %10, %36
%29 = phi i64 [ %38, %36 ], [ 0, %10 ]
%30 = trunc i64 %29 to i32
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %30)
%32 = load i32, i32* %3
%33 = icmp eq i32 %32, 0
br i1 %33, label %36, label %34
34: ; preds = %28
%35 = getelementptr inbounds i32*, i32** %0, i64 %29
br label %42
36: ; preds = %42, %28
%37 = tail call i32 @putchar(i32 10)
%38 = add nuw nsw i64 %29, 1
%39 = load i32, i32* %2
%40 = zext i32 %39 to i64
%41 = icmp ult i64 %38, %40
br i1 %41, label %28, label %20
42: ; preds = %34, %42
%43 = phi i64 [ 0, %34 ], [ %48, %42 ]
%44 = load i32*, i32** %35
%45 = getelementptr inbounds i32, i32* %44, i64 %43
%46 = load i32, i32* %45
%47 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i32 %46)
%48 = add nuw nsw i64 %43, 1
%49 = load i32, i32* %3
%50 = zext i32 %49 to i64
%51 = icmp ult i64 %48, %50
br i1 %51, label %42, label %36
}