#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__ checkNeighborsForMatch(int);
int tilePairsExist() {
  int i;
  for (i = 0; i < 16; i++) {
    if (checkNeighborsForMatch(i)) {
      return true;
    }
  }
  return false;
}


x86 assembly (clang, -O0):
<tilePairsExist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
jge    115a <tilePairsExist+0x4a>
mov    -0x8(%rbp),%edi
call   1030 <checkNeighborsForMatch@plt>
cmp    $0x0,%rax
je     1147 <tilePairsExist+0x37>
movl   $0x1,-0x4(%rbp)
jmp    1161 <tilePairsExist+0x51>
jmp    114c <tilePairsExist+0x3c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    111f <tilePairsExist+0xf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tilePairsExist>:
push   %rbx
xor    %edi,%edi
call   1030 <checkNeighborsForMatch@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x1,%ebx
mov    $0x1,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x2,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x3,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x4,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x5,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x6,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x7,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x8,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0x9,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xa,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xb,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xc,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xd,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xe,%edi
call   1030 <checkNeighborsForMatch@plt>
test   %rax,%rax
jne    1227 <tilePairsExist+0x117>
mov    $0xf,%edi
call   1030 <checkNeighborsForMatch@plt>
xor    %ebx,%ebx
test   %rax,%rax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tilePairsExist() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 16
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = load i32, i32* %2
%8 = call i64 @checkNeighborsForMatch(i32 %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 1, i32* %1
br label %16
11: ; preds = %6
br label %12
12: ; preds = %11
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
store i32 0, i32* %1
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @tilePairsExist() {
%1 = tail call i64 @checkNeighborsForMatch(i32 0)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %49
3: ; preds = %0
%4 = tail call i64 @checkNeighborsForMatch(i32 1)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %49
6: ; preds = %3
%7 = tail call i64 @checkNeighborsForMatch(i32 2)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %49
9: ; preds = %6
%10 = tail call i64 @checkNeighborsForMatch(i32 3)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %49
12: ; preds = %9
%13 = tail call i64 @checkNeighborsForMatch(i32 4)
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %49
15: ; preds = %12
%16 = tail call i64 @checkNeighborsForMatch(i32 5)
%17 = icmp eq i64 %16, 0
br i1 %17, label %18, label %49
18: ; preds = %15
%19 = tail call i64 @checkNeighborsForMatch(i32 6)
%20 = icmp eq i64 %19, 0
br i1 %20, label %21, label %49
21: ; preds = %18
%22 = tail call i64 @checkNeighborsForMatch(i32 7)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %49
24: ; preds = %21
%25 = tail call i64 @checkNeighborsForMatch(i32 8)
%26 = icmp eq i64 %25, 0
br i1 %26, label %27, label %49
27: ; preds = %24
%28 = tail call i64 @checkNeighborsForMatch(i32 9)
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %49
30: ; preds = %27
%31 = tail call i64 @checkNeighborsForMatch(i32 10)
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %49
33: ; preds = %30
%34 = tail call i64 @checkNeighborsForMatch(i32 11)
%35 = icmp eq i64 %34, 0
br i1 %35, label %36, label %49
36: ; preds = %33
%37 = tail call i64 @checkNeighborsForMatch(i32 12)
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %49
39: ; preds = %36
%40 = tail call i64 @checkNeighborsForMatch(i32 13)
%41 = icmp eq i64 %40, 0
br i1 %41, label %42, label %49
42: ; preds = %39
%43 = tail call i64 @checkNeighborsForMatch(i32 14)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %49
45: ; preds = %42
%46 = tail call i64 @checkNeighborsForMatch(i32 15)
%47 = icmp ne i64 %46, 0
%48 = zext i1 %47 to i32
br label %49
49: ; preds = %45, %42, %39, %36, %33, %30, %27, %24, %21, %18, %15, %12, %9, %6, %3, %0
%50 = phi i32 [ 1, %0 ], [ 1, %3 ], [ 1, %6 ], [ 1, %9 ], [ 1, %12 ], [ 1, %15 ], [ 1, %18 ], [ 1, %21 ], [ 1, %24 ], [ 1, %27 ], [ 1, %30 ], [ 1, %33 ], [ 1, %36 ], [ 1, %39 ], [ 1, %42 ], [ %48, %45 ]
ret i32 %50
}