int main() {
  char maze[10][10] = {"00XXX", "00000", "0XX00", "000X0", "0X000"};
  int m = 4, n = 4;
  int sol[10][10];
  int i, j;
  for (i = 0; i < 10; i++) {
    for (j = 0; j < 10; j++) {
      sol[i][j] = 0;
    }
  }
  int ways = 0;
  solveMaze(maze, sol, 0, 0, m, n, &ways);
  if (ways) {
    printf("Total ways %d\n", ways);
  } else {
    printf("No ways\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
movl   $0x4,-0x74(%rbp)
movl   $0x4,-0x78(%rbp)
movl   $0x0,-0x214(%rbp)
cmpl   $0xa,-0x214(%rbp)
jge    11e3 <main+0xb3>
movl   $0x0,-0x218(%rbp)
cmpl   $0xa,-0x218(%rbp)
jge    11ca <main+0x9a>
movslq -0x214(%rbp),%rcx
lea    -0x210(%rbp),%rax
imul   $0x28,%rcx,%rcx
add    %rcx,%rax
movslq -0x218(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x218(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x218(%rbp)
jmp    1186 <main+0x56>
jmp    11cf <main+0x9f>
mov    -0x214(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x214(%rbp)
jmp    116f <main+0x3f>
movl   $0x0,-0x21c(%rbp)
lea    -0x70(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    -0x74(%rbp),%r8d
mov    -0x78(%rbp),%r9d
xor    %ecx,%ecx
lea    -0x21c(%rbp),%rax
mov    %ecx,%edx
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <solveMaze@plt>
cmpl   $0x0,-0x21c(%rbp)
je     123c <main+0x10c>
mov    -0x21c(%rbp),%esi
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    124a <main+0x11a>
lea    0xe30(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x210,%rsp
mov    0xf12(%rip),%eax
mov    %eax,0x70(%rsp)
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xedb(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xebf(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe87(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xe6b(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0x80(%rsp),%rbx
mov    $0x190,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1050 <memset@plt>
movl   $0x0,0xc(%rsp)
lea    0xc(%rsp),%rax
mov    %rax,(%rsp)
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x4,%r8d
mov    $0x4,%r9d
xor    %eax,%eax
call   1060 <solveMaze@plt>
mov    0xc(%rsp),%esi
test   %esi,%esi
je     11f9 <main+0xb9>
lea    0xe74(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1205 <main+0xc5>
lea    0xe73(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@__const.main.maze = [10 x [10 x i8]] [[10 x i8] c"00XXX\00\00\00\00\00", [10 x i8] c"00000\00\00\00\00\00", [10 x i8] c"0XX00\00\00\00\00\00", [10 x i8] c"000X0\00\00\00\00\00", [10 x i8] c"0X000\00\00\00\00\00", [10 x i8] zeroinitializer, [10 x i8] zeroinitializer, [10 x i8] zeroinitializer, [10 x i8] zeroinitializer, [10 x i8] zeroinitializer]
@.str = [15 x i8] c"Total ways %d\0A\00"
@str = [8 x i8] c"No ways\00"
define i32 @main() {
%1 = alloca [10 x [10 x i8]]
%2 = alloca [10 x [10 x i32]]
%3 = bitcast [10 x [10 x i32]]* %2 to i8*
%4 = alloca i32
%5 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %1, i64 0, i64 0, i64 0
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %1, i64 0, i64 0
%8 = getelementptr inbounds [10 x [10 x i32]], [10 x [10 x i32]]* %2, i64 0, i64 0
%9 = call i32 ([10 x i8]*, [10 x i32]*, i32, i32, i32, i32, i32*, ...) bitcast (i32 (...)* @solveMaze to i32 ([10 x i8]*, [10 x i32]*, i32, i32, i32, i32, i32*, ...)*)([10 x i8]* %7, [10 x i32]* %8, i32 0, i32 0, i32 4, i32 4, i32* %4)
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %16
14: ; preds = %0
%15 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
ret i32 0
}