#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__ is_row_free(int *, int);
int test_is_row_free() {
  int board[64] = {0};
  board[8] = 1;
  return is_row_free(board, 0) && !is_row_free(board, 1) &&
         is_row_free(board, 2) && is_row_free(board, 3) &&
         is_row_free(board, 4) && is_row_free(board, 5) &&
         is_row_free(board, 6) && is_row_free(board, 7);
}


x86 assembly (clang, -O0):
<test_is_row_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1040 <memset@plt>
movl   $0x1,-0xe0(%rbp)
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x1,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x2,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x3,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x4,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x5,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x6,%esi
call   1030 <is_row_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
je     126d <test_is_row_free+0x14d>
lea    -0x100(%rbp),%rdi
mov    $0x7,%esi
call   1030 <is_row_free@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x101(%rbp)
mov    -0x101(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_is_row_free>:
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x1,0x20(%rsp)
mov    %rsp,%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11b8 <test_is_row_free+0xa8>
mov    %ebx,%eax
add    $0x100,%rsp
pop    %rbx
ret
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x4,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x6,%esi
call   1030 <is_row_free@plt>
test   %rax,%rax
je     11ad <test_is_row_free+0x9d>
mov    %rsp,%rdi
mov    $0x7,%esi
call   1030 <is_row_free@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
jmp    11ad <test_is_row_free+0x9d>

LLVM IR (-O0):
define i32 @test_is_row_free() {
%1 = alloca [64 x i32]
%2 = bitcast [64 x i32]* %1 to i8*
%3 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 8
store i32 1, i32* %3
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%5 = call i64 @is_row_free(i32* %4, i32 0)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %35
7: ; preds = %0
%8 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%9 = call i64 @is_row_free(i32* %8, i32 1)
%10 = icmp ne i64 %9, 0
br i1 %10, label %35, label %11
11: ; preds = %7
%12 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%13 = call i64 @is_row_free(i32* %12, i32 2)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %35
15: ; preds = %11
%16 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%17 = call i64 @is_row_free(i32* %16, i32 3)
%18 = icmp ne i64 %17, 0
br i1 %18, label %19, label %35
19: ; preds = %15
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%21 = call i64 @is_row_free(i32* %20, i32 4)
%22 = icmp ne i64 %21, 0
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%25 = call i64 @is_row_free(i32* %24, i32 5)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %35
27: ; preds = %23
%28 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%29 = call i64 @is_row_free(i32* %28, i32 6)
%30 = icmp ne i64 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%33 = call i64 @is_row_free(i32* %32, i32 7)
%34 = icmp ne i64 %33, 0
br label %35
35: ; preds = %31, %27, %23, %19, %15, %11, %7, %0
%36 = phi i1 [ false, %27 ], [ false, %23 ], [ false, %19 ], [ false, %15 ], [ false, %11 ], [ false, %7 ], [ false, %0 ], [ %34, %31 ]
%37 = zext i1 %36 to i32
ret i32 %37
}

LLVM IR (-O2):
define i32 @test_is_row_free() {
%1 = alloca [64 x i32]
%2 = bitcast [64 x i32]* %1 to i8*
%3 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 8
store i32 1, i32* %3
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%5 = call i64 @is_row_free(i32* %4, i32 0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %29, label %7
7: ; preds = %0
%8 = call i64 @is_row_free(i32* %4, i32 1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %29
10: ; preds = %7
%11 = call i64 @is_row_free(i32* %4, i32 2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %29, label %13
13: ; preds = %10
%14 = call i64 @is_row_free(i32* %4, i32 3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %29, label %16
16: ; preds = %13
%17 = call i64 @is_row_free(i32* %4, i32 4)
%18 = icmp eq i64 %17, 0
br i1 %18, label %29, label %19
19: ; preds = %16
%20 = call i64 @is_row_free(i32* %4, i32 5)
%21 = icmp eq i64 %20, 0
br i1 %21, label %29, label %22
22: ; preds = %19
%23 = call i64 @is_row_free(i32* %4, i32 6)
%24 = icmp eq i64 %23, 0
br i1 %24, label %29, label %25
25: ; preds = %22
%26 = call i64 @is_row_free(i32* %4, i32 7)
%27 = icmp ne i64 %26, 0
%28 = zext i1 %27 to i32
br label %29
29: ; preds = %25, %22, %19, %16, %13, %10, %7, %0
%30 = phi i32 [ 0, %22 ], [ 0, %19 ], [ 0, %16 ], [ 0, %13 ], [ 0, %10 ], [ 0, %7 ], [ 0, %0 ], [ %28, %25 ]
ret i32 %30
}