#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*/ print_sol(int **);
int /*<<< orphan*/ printf(char *);
scalar_t__ solve_maze_util(int **, int /*<<< orphan*/, int /*<<< orphan*/,
                           int **);
void solve_maze(int maze[][4]) {
  int sol[4][4] = {0};
  sol[0][0] = 1;
  if (solve_maze_util(maze, 0, 0, sol)) {
    print_sol(sol);
  } else {
    printf("solution does not exixts");
  }
}


x86 assembly (clang, -O0):
<solve_maze>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1050 <memset@plt>
movl   $0x1,-0x50(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x50(%rbp),%rcx
xor    %edx,%edx
mov    %edx,%esi
call   1060 <solve_maze_util@plt>
cmp    $0x0,%rax
je     118c <solve_maze+0x4c>
lea    -0x50(%rbp),%rdi
call   1030 <print_sol@plt>
jmp    1198 <solve_maze+0x58>
lea    0xe6d(%rip),%rdi
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_maze>:
sub    $0x48,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x1,(%rsp)
mov    %rsp,%rcx
xor    %esi,%esi
xor    %edx,%edx
call   1050 <solve_maze_util@plt>
test   %rax,%rax
je     116f <solve_maze+0x3f>
mov    %rsp,%rdi
call   1030 <print_sol@plt>
add    $0x48,%rsp
ret
lea    0xe8a(%rip),%rdi
call   1040 <printf@plt>
add    $0x48,%rsp
ret

LLVM IR (-O0):
@.str = [25 x i8] c"solution does not exixts\00"
define void @solve_maze([4 x i32]* %0) {
%2 = alloca [4 x i32]*
%3 = alloca [4 x [4 x i32]]
store [4 x i32]* %0, [4 x i32]** %2
%4 = bitcast [4 x [4 x i32]]* %3 to i8*
%5 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %3, i64 0, i64 0
%6 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
store i32 1, i32* %6
%7 = load [4 x i32]*, [4 x i32]** %2
%8 = bitcast [4 x i32]* %7 to i32**
%9 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %3, i64 0, i64 0
%10 = bitcast [4 x i32]* %9 to i32**
%11 = call i64 @solve_maze_util(i32** %8, i32 0, i32 0, i32** %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %3, i64 0, i64 0
%15 = bitcast [4 x i32]* %14 to i32**
%16 = call i32 @print_sol(i32** %15)
br label %19
17: ; preds = %1
%18 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %13
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"solution does not exixts\00"
define void @solve_maze([4 x i32]* %0) {
%2 = alloca [4 x [4 x i32]]
%3 = bitcast [4 x [4 x i32]]* %2 to i8*
%4 = getelementptr inbounds [4 x [4 x i32]], [4 x [4 x i32]]* %2, i64 0, i64 0, i64 0
store i32 1, i32* %4
%5 = bitcast [4 x i32]* %0 to i32**
%6 = bitcast [4 x [4 x i32]]* %2 to i32**
%7 = call i64 @solve_maze_util(i32** %5, i32 0, i32 0, i32** %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = call i32 @print_sol(i32** %6)
br label %13
11: ; preds = %1
%12 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %9
ret void
}