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


x86 assembly (clang, -O0):
<test_is_diag_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1030 <memset@plt>
movl   $0x1,-0x94(%rbp)
lea    -0x100(%rbp),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x2,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x3,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x4,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x5,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x6,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x7,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x6,%esi
xor    %edx,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x5,%esi
mov    $0x1,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x3,%edx
mov    %edx,%esi
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x2,%esi
mov    $0x4,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x6,%edx
call   1040 <is_diag_free@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x101(%rbp)
jne    13c9 <test_is_diag_free+0x2a9>
lea    -0x100(%rbp),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <is_diag_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_diag_free>:
push   %rbx
sub    $0x100,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x60(%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,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
movl   $0x1,0x6c(%rsp)
mov    %rsp,%rdi
xor    %ebx,%ebx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x2,%esi
mov    $0x2,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x4,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x5,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x6,%esi
mov    $0x6,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x7,%esi
mov    $0x7,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
xor    %ebx,%ebx
mov    $0x6,%esi
xor    %edx,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x5,%esi
mov    $0x1,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x2,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x3,%esi
mov    $0x3,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x2,%esi
mov    $0x4,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x5,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
xor    %ebx,%ebx
xor    %esi,%esi
mov    $0x6,%edx
call   1030 <is_diag_free@plt>
test   %rax,%rax
jne    131c <test_is_diag_free+0x20c>
mov    %rsp,%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <is_diag_free@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @test_is_diag_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 27
store i32 1, i32* %3
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%5 = call i64 @is_diag_free(i32* %4, i32 0, i32 0)
%6 = icmp ne i64 %5, 0
br i1 %6, label %67, label %7
7: ; preds = %0
%8 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%9 = call i64 @is_diag_free(i32* %8, i32 1, i32 1)
%10 = icmp ne i64 %9, 0
br i1 %10, label %67, label %11
11: ; preds = %7
%12 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%13 = call i64 @is_diag_free(i32* %12, i32 2, i32 2)
%14 = icmp ne i64 %13, 0
br i1 %14, label %67, label %15
15: ; preds = %11
%16 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%17 = call i64 @is_diag_free(i32* %16, i32 3, i32 3)
%18 = icmp ne i64 %17, 0
br i1 %18, label %67, label %19
19: ; preds = %15
%20 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%21 = call i64 @is_diag_free(i32* %20, i32 4, i32 4)
%22 = icmp ne i64 %21, 0
br i1 %22, label %67, label %23
23: ; preds = %19
%24 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%25 = call i64 @is_diag_free(i32* %24, i32 5, i32 5)
%26 = icmp ne i64 %25, 0
br i1 %26, label %67, label %27
27: ; preds = %23
%28 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%29 = call i64 @is_diag_free(i32* %28, i32 6, i32 6)
%30 = icmp ne i64 %29, 0
br i1 %30, label %67, label %31
31: ; preds = %27
%32 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%33 = call i64 @is_diag_free(i32* %32, i32 7, i32 7)
%34 = icmp ne i64 %33, 0
br i1 %34, label %67, label %35
35: ; preds = %31
%36 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%37 = call i64 @is_diag_free(i32* %36, i32 6, i32 0)
%38 = icmp ne i64 %37, 0
br i1 %38, label %67, label %39
39: ; preds = %35
%40 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%41 = call i64 @is_diag_free(i32* %40, i32 5, i32 1)
%42 = icmp ne i64 %41, 0
br i1 %42, label %67, label %43
43: ; preds = %39
%44 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%45 = call i64 @is_diag_free(i32* %44, i32 4, i32 2)
%46 = icmp ne i64 %45, 0
br i1 %46, label %67, label %47
47: ; preds = %43
%48 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%49 = call i64 @is_diag_free(i32* %48, i32 3, i32 3)
%50 = icmp ne i64 %49, 0
br i1 %50, label %67, label %51
51: ; preds = %47
%52 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%53 = call i64 @is_diag_free(i32* %52, i32 2, i32 4)
%54 = icmp ne i64 %53, 0
br i1 %54, label %67, label %55
55: ; preds = %51
%56 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%57 = call i64 @is_diag_free(i32* %56, i32 1, i32 5)
%58 = icmp ne i64 %57, 0
br i1 %58, label %67, label %59
59: ; preds = %55
%60 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%61 = call i64 @is_diag_free(i32* %60, i32 0, i32 6)
%62 = icmp ne i64 %61, 0
br i1 %62, label %67, label %63
63: ; preds = %59
%64 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%65 = call i64 @is_diag_free(i32* %64, i32 1, i32 0)
%66 = icmp ne i64 %65, 0
br label %67
67: ; preds = %63, %59, %55, %51, %47, %43, %39, %35, %31, %27, %23, %19, %15, %11, %7, %0
%68 = phi i1 [ false, %59 ], [ false, %55 ], [ false, %51 ], [ false, %47 ], [ false, %43 ], [ false, %39 ], [ false, %35 ], [ false, %31 ], [ false, %27 ], [ false, %23 ], [ false, %19 ], [ false, %15 ], [ false, %11 ], [ false, %7 ], [ false, %0 ], [ %66, %63 ]
%69 = zext i1 %68 to i32
ret i32 %69
}

LLVM IR (-O2):
define i32 @test_is_diag_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 27
store i32 1, i32* %3
%4 = getelementptr inbounds [64 x i32], [64 x i32]* %1, i64 0, i64 0
%5 = call i64 @is_diag_free(i32* %4, i32 0, i32 0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %53
7: ; preds = %0
%8 = call i64 @is_diag_free(i32* %4, i32 1, i32 1)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %53
10: ; preds = %7
%11 = call i64 @is_diag_free(i32* %4, i32 2, i32 2)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %53
13: ; preds = %10
%14 = call i64 @is_diag_free(i32* %4, i32 3, i32 3)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %53
16: ; preds = %13
%17 = call i64 @is_diag_free(i32* %4, i32 4, i32 4)
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %53
19: ; preds = %16
%20 = call i64 @is_diag_free(i32* %4, i32 5, i32 5)
%21 = icmp eq i64 %20, 0
br i1 %21, label %22, label %53
22: ; preds = %19
%23 = call i64 @is_diag_free(i32* %4, i32 6, i32 6)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %53
25: ; preds = %22
%26 = call i64 @is_diag_free(i32* %4, i32 7, i32 7)
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %53
28: ; preds = %25
%29 = call i64 @is_diag_free(i32* %4, i32 6, i32 0)
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %53
31: ; preds = %28
%32 = call i64 @is_diag_free(i32* %4, i32 5, i32 1)
%33 = icmp eq i64 %32, 0
br i1 %33, label %34, label %53
34: ; preds = %31
%35 = call i64 @is_diag_free(i32* %4, i32 4, i32 2)
%36 = icmp eq i64 %35, 0
br i1 %36, label %37, label %53
37: ; preds = %34
%38 = call i64 @is_diag_free(i32* %4, i32 3, i32 3)
%39 = icmp eq i64 %38, 0
br i1 %39, label %40, label %53
40: ; preds = %37
%41 = call i64 @is_diag_free(i32* %4, i32 2, i32 4)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %40
%44 = call i64 @is_diag_free(i32* %4, i32 1, i32 5)
%45 = icmp eq i64 %44, 0
br i1 %45, label %46, label %53
46: ; preds = %43
%47 = call i64 @is_diag_free(i32* %4, i32 0, i32 6)
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %53
49: ; preds = %46
%50 = call i64 @is_diag_free(i32* %4, i32 1, i32 0)
%51 = icmp ne i64 %50, 0
%52 = zext i1 %51 to i32
br label %53
53: ; preds = %49, %46, %43, %40, %37, %34, %31, %28, %25, %22, %19, %16, %13, %10, %7, %0
%54 = phi i32 [ 0, %46 ], [ 0, %43 ], [ 0, %40 ], [ 0, %37 ], [ 0, %34 ], [ 0, %31 ], [ 0, %28 ], [ 0, %25 ], [ 0, %22 ], [ 0, %19 ], [ 0, %16 ], [ 0, %13 ], [ 0, %10 ], [ 0, %7 ], [ 0, %0 ], [ %52, %49 ]
ret i32 %54
}