#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*/ testerTousLesCotesFantomeBloquePacman(int, int, int, int,
                                                         int *);
int estBloquerFantomePacman(int lig, int col) {
  int nbCoteDisponibleLibre;
  nbCoteDisponibleLibre = 0;
  if ((lig - 1) >= 0) {
    testerTousLesCotesFantomeBloquePacman(lig, col, -1, 0,
                                          &nbCoteDisponibleLibre);
  }
  if ((lig + 1) < 32) {
    testerTousLesCotesFantomeBloquePacman(lig, col, 1, 0,
                                          &nbCoteDisponibleLibre);
  }
  if ((col - 2) >= 0) {
    testerTousLesCotesFantomeBloquePacman(lig, col, 0, -2,
                                          &nbCoteDisponibleLibre);
  }
  if ((col + 2) < 50) {
    testerTousLesCotesFantomeBloquePacman(lig, col, 0, -2,
                                          &nbCoteDisponibleLibre);
  }
  if (nbCoteDisponibleLibre > 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<estBloquerFantomePacman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cmp    $0x0,%eax
jl     114a <estBloquerFantomePacman+0x3a>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
lea    -0x10(%rbp),%r8
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cmp    $0x20,%eax
jge    116f <estBloquerFantomePacman+0x5f>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x1,%edx
xor    %ecx,%ecx
lea    -0x10(%rbp),%r8
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
cmp    $0x0,%eax
jl     1194 <estBloquerFantomePacman+0x84>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0xfffffffe,%ecx
lea    -0x10(%rbp),%r8
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
cmp    $0x32,%eax
jge    11b9 <estBloquerFantomePacman+0xa9>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0xfffffffe,%ecx
lea    -0x10(%rbp),%r8
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
cmpl   $0x0,-0x10(%rbp)
jle    11cf <estBloquerFantomePacman+0xbf>
movl   $0x0,-0x4(%rbp)
jmp    11d6 <estBloquerFantomePacman+0xc6>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<estBloquerFantomePacman>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
movl   $0x0,0x4(%rsp)
test   %edi,%edi
jle    1144 <estBloquerFantomePacman+0x34>
lea    0x4(%rsp),%r8
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0xffffffff,%edx
xor    %ecx,%ecx
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
cmp    $0x1e,%ebp
jbe    1144 <estBloquerFantomePacman+0x34>
cmp    $0x2,%ebx
jge    115e <estBloquerFantomePacman+0x4e>
jmp    1178 <estBloquerFantomePacman+0x68>
lea    0x4(%rsp),%r8
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
cmp    $0x2,%ebx
jl     1178 <estBloquerFantomePacman+0x68>
lea    0x4(%rsp),%r8
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
mov    $0xfffffffe,%ecx
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
cmp    $0x2f,%ebx
ja     118d <estBloquerFantomePacman+0x7d>
lea    0x4(%rsp),%r8
mov    %ebp,%edi
mov    %ebx,%esi
xor    %edx,%edx
mov    $0xfffffffe,%ecx
call   1030 <testerTousLesCotesFantomeBloquePacman@plt>
xor    %eax,%eax
cmpl   $0x0,0x4(%rsp)
setle  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @estBloquerFantomePacman(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 1
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %11, i32 %12, i32 -1, i32 0, i32* %6)
br label %14
14: ; preds = %10, %2
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
%17 = icmp slt i32 %16, 32
br i1 %17, label %18, label %22
18: ; preds = %14
%19 = load i32, i32* %4
%20 = load i32, i32* %5
%21 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %19, i32 %20, i32 1, i32 0, i32* %6)
br label %22
22: ; preds = %18, %14
%23 = load i32, i32* %5
%24 = sub nsw i32 %23, 2
%25 = icmp sge i32 %24, 0
br i1 %25, label %26, label %30
26: ; preds = %22
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %27, i32 %28, i32 0, i32 -2, i32* %6)
br label %30
30: ; preds = %26, %22
%31 = load i32, i32* %5
%32 = add nsw i32 %31, 2
%33 = icmp slt i32 %32, 50
br i1 %33, label %34, label %38
34: ; preds = %30
%35 = load i32, i32* %4
%36 = load i32, i32* %5
%37 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %35, i32 %36, i32 0, i32 -2, i32* %6)
br label %38
38: ; preds = %34, %30
%39 = load i32, i32* %6
%40 = icmp sgt i32 %39, 0
br i1 %40, label %41, label %42
41: ; preds = %38
store i32 0, i32* %3
br label %43
42: ; preds = %38
store i32 1, i32* %3
br label %43
43: ; preds = %42, %41
%44 = load i32, i32* %3
ret i32 %44
}

LLVM IR (-O2):
define i32 @estBloquerFantomePacman(i32 %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = icmp sgt i32 %0, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %0, i32 %1, i32 -1, i32 0, i32* %3)
%8 = icmp ult i32 %0, 31
br i1 %8, label %9, label %11
9: ; preds = %2, %6
%10 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %0, i32 %1, i32 1, i32 0, i32* %3)
br label %11
11: ; preds = %9, %6
%12 = icmp sgt i32 %1, 1
br i1 %12, label %13, label %16
13: ; preds = %11
%14 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %0, i32 %1, i32 0, i32 -2, i32* %3)
%15 = icmp ult i32 %1, 48
br i1 %15, label %16, label %18
16: ; preds = %11, %13
%17 = call i32 @testerTousLesCotesFantomeBloquePacman(i32 %0, i32 %1, i32 0, i32 -2, i32* %3)
br label %18
18: ; preds = %16, %13
%19 = load i32, i32* %3
%20 = icmp slt i32 %19, 1
%21 = zext i1 %20 to i32
ret i32 %21
}