#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*/ printBoardState(char **);
int /*<<< orphan*/ printf(char *);
int solidLineMade(char a, char b, char c, char board[3][3]) {
  if (a == 'X' && b == 'X' && c == 'X') {
    printf("\nPlayer 1 wins!\n");
    printBoardState(board);
    return 1;
  } else if (a == 'O' && b == 'O' && c == 'O') {
    printf("\nPlayer 2 wins!\n");
    printBoardState(board);
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<solidLineMade>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %dl,-0x6(%rbp)
mov    %al,-0x7(%rbp)
mov    %rcx,-0x10(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x58,%eax
jne    1186 <solidLineMade+0x66>
movsbl -0x6(%rbp),%eax
cmp    $0x58,%eax
jne    1186 <solidLineMade+0x66>
movsbl -0x7(%rbp),%eax
cmp    $0x58,%eax
jne    1186 <solidLineMade+0x66>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printBoardState@plt>
movl   $0x1,-0x4(%rbp)
jmp    11d5 <solidLineMade+0xb5>
movsbl -0x5(%rbp),%eax
cmp    $0x4f,%eax
jne    11ce <solidLineMade+0xae>
movsbl -0x6(%rbp),%eax
cmp    $0x4f,%eax
jne    11ce <solidLineMade+0xae>
movsbl -0x7(%rbp),%eax
cmp    $0x4f,%eax
jne    11ce <solidLineMade+0xae>
lea    0xe5d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printBoardState@plt>
movl   $0x1,-0x4(%rbp)
jmp    11d5 <solidLineMade+0xb5>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solidLineMade>:
push   %rbx
mov    %rcx,%rbx
cmp    $0x58,%dil
jne    113e <solidLineMade+0x1e>
cmp    $0x58,%sil
jne    113e <solidLineMade+0x1e>
cmp    $0x58,%dl
jne    113e <solidLineMade+0x1e>
lea    0xed4(%rip),%rdi
jmp    1158 <solidLineMade+0x38>
xor    %eax,%eax
cmp    $0x4f,%dil
jne    116a <solidLineMade+0x4a>
cmp    $0x4f,%sil
jne    116a <solidLineMade+0x4a>
cmp    $0x4f,%dl
jne    116a <solidLineMade+0x4a>
lea    0xea8(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1040 <printBoardState@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0APlayer 1 wins!\0A\00"
@.str.1 = [17 x i8] c"\0APlayer 2 wins!\0A\00"
define i32 @solidLineMade(i8 signext %0, i8 signext %1, i8 signext %2, [3 x i8]* %3) {
%5 = alloca i32
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca [3 x i8]*
store i8 %0, i8* %6
store i8 %1, i8* %7
store i8 %2, i8* %8
store [3 x i8]* %3, [3 x i8]** %9
%10 = load i8, i8* %6
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 88
br i1 %12, label %13, label %26
13: ; preds = %4
%14 = load i8, i8* %7
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 88
br i1 %16, label %17, label %26
17: ; preds = %13
%18 = load i8, i8* %8
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 88
br i1 %20, label %21, label %26
21: ; preds = %17
%22 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%23 = load [3 x i8]*, [3 x i8]** %9
%24 = bitcast [3 x i8]* %23 to i8**
%25 = call i32 @printBoardState(i8** %24)
store i32 1, i32* %5
br label %44
26: ; preds = %17, %13, %4
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 79
br i1 %29, label %30, label %43
30: ; preds = %26
%31 = load i8, i8* %7
%32 = sext i8 %31 to i32
%33 = icmp eq i32 %32, 79
br i1 %33, label %34, label %43
34: ; preds = %30
%35 = load i8, i8* %8
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 79
br i1 %37, label %38, label %43
38: ; preds = %34
%39 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%40 = load [3 x i8]*, [3 x i8]** %9
%41 = bitcast [3 x i8]* %40 to i8**
%42 = call i32 @printBoardState(i8** %41)
store i32 1, i32* %5
br label %44
43: ; preds = %34, %30, %26
store i32 0, i32* %5
br label %44
44: ; preds = %43, %38, %21
%45 = load i32, i32* %5
ret i32 %45
}

LLVM IR (-O2):
@str = [16 x i8] c"\0APlayer 2 wins!\00"
@str.2 = [16 x i8] c"\0APlayer 1 wins!\00"
define i32 @solidLineMade(i8 signext %0, i8 signext %1, i8 signext %2, [3 x i8]* %3) {
%5 = icmp eq i8 %0, 88
%6 = icmp eq i8 %1, 88
%7 = and i1 %5, %6
%8 = icmp eq i8 %2, 88
%9 = and i1 %7, %8
br i1 %9, label %16, label %10
10: ; preds = %4
%11 = icmp eq i8 %0, 79
%12 = icmp eq i8 %1, 79
%13 = and i1 %11, %12
%14 = icmp eq i8 %2, 79
%15 = and i1 %13, %14
br i1 %15, label %16, label %21
16: ; preds = %10, %4
%17 = phi i8* [ getelementptr inbounds ([16 x i8], [16 x i8]* @str.2, i64 0, i64 0), %4 ], [ getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0), %10 ]
%18 = tail call i32 @puts(i8* dereferenceable(1) %17)
%19 = bitcast [3 x i8]* %3 to i8**
%20 = tail call i32 @printBoardState(i8** %19)
br label %21
21: ; preds = %16, %10
%22 = phi i32 [ 0, %10 ], [ 1, %16 ]
ret i32 %22
}