#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*/ printf(char *);
int make_center(char **board) {
  if (board[1][1] == '-')
    return 5;
  else if (board[0][1] == '-')
    return 2;
  else if (board[1][0] == '-')
    return 4;
  else if (board[1][2] == '-')
    return 6;
  else if (board[2][1] == '-')
    return 8;
  printf("ERROR: Can't make_center\n");
}


x86 assembly (clang, -O0):
<make_center>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    113d <make_center+0x2d>
movl   $0x5,-0x4(%rbp)
jmp    11df <make_center+0xcf>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    115d <make_center+0x4d>
movl   $0x2,-0x4(%rbp)
jmp    11df <make_center+0xcf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    117d <make_center+0x6d>
movl   $0x4,-0x4(%rbp)
jmp    11df <make_center+0xcf>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x2d,%eax
jne    119e <make_center+0x8e>
movl   $0x6,-0x4(%rbp)
jmp    11df <make_center+0xcf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    11bf <make_center+0xaf>
movl   $0x8,-0x4(%rbp)
jmp    11df <make_center+0xcf>
jmp    11c4 <make_center+0xb4>
jmp    11c9 <make_center+0xb9>
jmp    11ce <make_center+0xbe>
jmp    11d3 <make_center+0xc3>
lea    0xe26(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_center>:
push   %rax
mov    0x8(%rdi),%rcx
mov    $0x5,%eax
cmpb   $0x2d,0x1(%rcx)
je     115e <make_center+0x4e>
mov    (%rdi),%rdx
mov    $0x2,%eax
cmpb   $0x2d,0x1(%rdx)
je     115e <make_center+0x4e>
mov    $0x4,%eax
cmpb   $0x2d,(%rcx)
je     115e <make_center+0x4e>
mov    $0x6,%eax
cmpb   $0x2d,0x2(%rcx)
je     115e <make_center+0x4e>
mov    0x10(%rdi),%rcx
mov    $0x8,%eax
cmpb   $0x2d,0x1(%rcx)
je     115e <make_center+0x4e>
lea    0xea7(%rip),%rdi
call   1030 <puts@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"ERROR: Can't make_center\0A\00"
define i32 @make_center(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = getelementptr inbounds i8*, i8** %4, i64 1
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 45
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 5, i32* %2
br label %54
12: ; preds = %1
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = getelementptr inbounds i8, i8* %15, i64 1
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 45
br i1 %19, label %20, label %21
20: ; preds = %12
store i32 2, i32* %2
br label %54
21: ; preds = %12
%22 = load i8**, i8*** %3
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = getelementptr inbounds i8, i8* %24, i64 0
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 45
br i1 %28, label %29, label %30
29: ; preds = %21
store i32 4, i32* %2
br label %54
30: ; preds = %21
%31 = load i8**, i8*** %3
%32 = getelementptr inbounds i8*, i8** %31, i64 1
%33 = load i8*, i8** %32
%34 = getelementptr inbounds i8, i8* %33, i64 2
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 45
br i1 %37, label %38, label %39
38: ; preds = %30
store i32 6, i32* %2
br label %54
39: ; preds = %30
%40 = load i8**, i8*** %3
%41 = getelementptr inbounds i8*, i8** %40, i64 2
%42 = load i8*, i8** %41
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 45
br i1 %46, label %47, label %48
47: ; preds = %39
store i32 8, i32* %2
br label %54
48: ; preds = %39
br label %49
49: ; preds = %48
br label %50
50: ; preds = %49
br label %51
51: ; preds = %50
br label %52
52: ; preds = %51
%53 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %54
54: ; preds = %52, %47, %38, %29, %20, %11
%55 = load i32, i32* %2
ret i32 %55
}

LLVM IR (-O2):
@str = [25 x i8] c"ERROR: Can't make_center\00"
define i32 @make_center(i8** nocapture %0) {
%2 = getelementptr inbounds i8*, i8** %0, i64 1
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 1
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 45
br i1 %6, label %27, label %7
7: ; preds = %1
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 45
br i1 %11, label %27, label %12
12: ; preds = %7
%13 = load i8, i8* %3
%14 = icmp eq i8 %13, 45
br i1 %14, label %27, label %15
15: ; preds = %12
%16 = getelementptr inbounds i8, i8* %3, i64 2
%17 = load i8, i8* %16
%18 = icmp eq i8 %17, 45
br i1 %18, label %27, label %19
19: ; preds = %15
%20 = getelementptr inbounds i8*, i8** %0, i64 2
%21 = load i8*, i8** %20
%22 = getelementptr inbounds i8, i8* %21, i64 1
%23 = load i8, i8* %22
%24 = icmp eq i8 %23, 45
br i1 %24, label %27, label %25
25: ; preds = %19
%26 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
br label %27
27: ; preds = %19, %15, %12, %7, %1, %25
%28 = phi i32 [ undef, %25 ], [ 5, %1 ], [ 2, %7 ], [ 4, %12 ], [ 6, %15 ], [ 8, %19 ]
ret i32 %28
}