#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 */
scalar_t__ cell_score(size_t, size_t, int);
bool is_move_possible(int player_type) {
  for (size_t i = 1; i <= 8; i++) {
    for (size_t j = 1; j <= 8; j++) {
      if (cell_score(i, j, player_type) > 0)
        return true;
    }
  }
  return false;
}


x86 assembly (clang, -O0):
<is_move_possible>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
movq   $0x1,-0x10(%rbp)
cmpq   $0x8,-0x10(%rbp)
ja     1193 <is_move_possible+0x83>
movq   $0x1,-0x18(%rbp)
cmpq   $0x8,-0x18(%rbp)
ja     117d <is_move_possible+0x6d>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%edx
call   1030 <cell_score@plt>
cmp    $0x0,%rax
jle    1167 <is_move_possible+0x57>
movl   $0x1,-0x4(%rbp)
jmp    119a <is_move_possible+0x8a>
jmp    116c <is_move_possible+0x5c>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1136 <is_move_possible+0x26>
jmp    1182 <is_move_possible+0x72>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1123 <is_move_possible+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_move_possible>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x1,%edi
mov    $0x1,%esi
mov    %ebp,%edx
call   1030 <cell_score@plt>
mov    $0x1,%r15b
test   %rax,%rax
jle    1144 <is_move_possible+0x34>
movzbl %r15b,%eax
and    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0x1,%r15b
mov    $0x2,%r14d
lea    -0x1(%r14),%rbx
mov    $0x2,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x3,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x4,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x5,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x6,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x7,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
mov    $0x8,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
test   %rax,%rax
jg     1132 <is_move_possible+0x22>
cmp    $0x8,%rbx
setb   %r15b
cmp    $0x9,%r14
je     1132 <is_move_possible+0x22>
mov    $0x1,%esi
mov    %r14,%rdi
mov    %ebp,%edx
call   1030 <cell_score@plt>
add    $0x1,%r14
test   %rax,%rax
jle    114d <is_move_possible+0x3d>
jmp    1132 <is_move_possible+0x22>

LLVM IR (-O0):
define i32 @is_move_possible(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %3
store i64 1, i64* %4
br label %6
6: ; preds = %25, %1
%7 = load i64, i64* %4
%8 = icmp ule i64 %7, 8
br i1 %8, label %9, label %28
9: ; preds = %6
store i64 1, i64* %5
br label %10
10: ; preds = %21, %9
%11 = load i64, i64* %5
%12 = icmp ule i64 %11, 8
br i1 %12, label %13, label %24
13: ; preds = %10
%14 = load i64, i64* %4
%15 = load i64, i64* %5
%16 = load i32, i32* %3
%17 = call i64 @cell_score(i64 %14, i64 %15, i32 %16)
%18 = icmp sgt i64 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %13
store i32 1, i32* %2
br label %29
20: ; preds = %13
br label %21
21: ; preds = %20
%22 = load i64, i64* %5
%23 = add i64 %22, 1
store i64 %23, i64* %5
br label %10
24: ; preds = %10
br label %25
25: ; preds = %24
%26 = load i64, i64* %4
%27 = add i64 %26, 1
store i64 %27, i64* %4
br label %6
28: ; preds = %6
store i32 0, i32* %2
br label %29
29: ; preds = %28, %19
%30 = load i32, i32* %2
ret i32 %30
}

LLVM IR (-O2):
define i32 @is_move_possible(i32 %0) {
%2 = tail call i64 @cell_score(i64 1, i64 1, i32 %0)
%3 = icmp sgt i64 %2, 0
br i1 %3, label %34, label %7
4: ; preds = %30
%5 = tail call i64 @cell_score(i64 %31, i64 1, i32 %0)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %34, label %7
7: ; preds = %1, %4
%8 = phi i64 [ %31, %4 ], [ 1, %1 ]
%9 = phi i1 [ %32, %4 ], [ true, %1 ]
%10 = tail call i64 @cell_score(i64 %8, i64 2, i32 %0)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %34, label %12
12: ; preds = %7
%13 = tail call i64 @cell_score(i64 %8, i64 3, i32 %0)
%14 = icmp sgt i64 %13, 0
br i1 %14, label %34, label %15
15: ; preds = %12
%16 = tail call i64 @cell_score(i64 %8, i64 4, i32 %0)
%17 = icmp sgt i64 %16, 0
br i1 %17, label %34, label %18
18: ; preds = %15
%19 = tail call i64 @cell_score(i64 %8, i64 5, i32 %0)
%20 = icmp sgt i64 %19, 0
br i1 %20, label %34, label %21
21: ; preds = %18
%22 = tail call i64 @cell_score(i64 %8, i64 6, i32 %0)
%23 = icmp sgt i64 %22, 0
br i1 %23, label %34, label %24
24: ; preds = %21
%25 = tail call i64 @cell_score(i64 %8, i64 7, i32 %0)
%26 = icmp sgt i64 %25, 0
br i1 %26, label %34, label %27
27: ; preds = %24
%28 = tail call i64 @cell_score(i64 %8, i64 8, i32 %0)
%29 = icmp sgt i64 %28, 0
br i1 %29, label %34, label %30
30: ; preds = %27
%31 = add nuw nsw i64 %8, 1
%32 = icmp ult i64 %8, 8
%33 = icmp eq i64 %31, 9
br i1 %33, label %34, label %4
34: ; preds = %27, %24, %21, %18, %15, %12, %7, %4, %30, %1
%35 = phi i1 [ true, %1 ], [ %9, %27 ], [ %9, %24 ], [ %9, %21 ], [ %9, %18 ], [ %9, %15 ], [ %9, %12 ], [ %9, %7 ], [ %32, %4 ], [ %32, %30 ]
%36 = zext i1 %35 to i32
ret i32 %36
}