#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_blank(char **board) {
  int i, j;
  for (i = 0; i < 3; i++)
    for (j = 0; j < 3; j++)
      if (board[i][j] == '-')
        return (i * 3 + j + 1);
  printf("ERROR: Can't make_blank\n");
}


x86 assembly (clang, -O0):
<make_blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    1193 <make_blank+0x83>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1180 <make_blank+0x70>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
jne    116d <make_blank+0x5d>
imul   $0x3,-0x14(%rbp),%eax
add    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    119f <make_blank+0x8f>
jmp    1172 <make_blank+0x62>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1134 <make_blank+0x24>
jmp    1185 <make_blank+0x75>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <make_blank+0x13>
lea    0xe66(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_blank>:
push   %rax
mov    (%rdi),%rdx
xor    %eax,%eax
cmpb   $0x2d,(%rdx)
jne    1122 <make_blank+0x12>
mov    $0x1,%ecx
jmp    113a <make_blank+0x2a>
cmpb   $0x2d,0x1(%rdx)
jne    112f <make_blank+0x1f>
mov    $0x2,%ecx
jmp    113a <make_blank+0x2a>
mov    $0x3,%ecx
cmpb   $0x2d,0x2(%rdx)
jne    113e <make_blank+0x2e>
add    %ecx,%eax
pop    %rcx
ret
mov    0x8(%rdi),%rdx
mov    $0x3,%eax
cmpb   $0x2d,(%rdx)
je     111b <make_blank+0xb>
cmpb   $0x2d,0x1(%rdx)
je     1128 <make_blank+0x18>
mov    $0x3,%ecx
cmpb   $0x2d,0x2(%rdx)
jne    1164 <make_blank+0x54>
mov    $0x3,%eax
jmp    113a <make_blank+0x2a>
mov    0x10(%rdi),%rdx
mov    $0x6,%eax
cmpb   $0x2d,(%rdx)
je     111b <make_blank+0xb>
cmpb   $0x2d,0x1(%rdx)
je     1128 <make_blank+0x18>
cmpb   $0x2d,0x2(%rdx)
je     113a <make_blank+0x2a>
lea    0xe7b(%rip),%rdi
call   1030 <puts@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [24 x i8] c"ERROR: Can't make_blank\00"
define i32 @make_blank(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 45
br i1 %4, label %5, label %9
5: ; preds = %39, %35, %30, %26, %22, %17, %13, %9, %1
%6 = phi i32 [ 0, %1 ], [ 0, %9 ], [ 0, %13 ], [ 3, %17 ], [ 3, %22 ], [ 3, %26 ], [ 6, %30 ], [ 6, %35 ], [ 6, %39 ]
%7 = phi i32 [ 1, %1 ], [ 2, %9 ], [ 3, %13 ], [ 1, %17 ], [ 2, %22 ], [ 3, %26 ], [ 1, %30 ], [ 2, %35 ], [ 3, %39 ]
%8 = add nuw nsw i32 %7, %6
br label %45
9: ; preds = %1
%10 = getelementptr inbounds i8, i8* %2, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 45
br i1 %12, label %5, label %13
13: ; preds = %9
%14 = getelementptr inbounds i8, i8* %2, i64 2
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 45
br i1 %16, label %5, label %17
17: ; preds = %13
%18 = getelementptr inbounds i8*, i8** %0, i64 1
%19 = load i8*, i8** %18
%20 = load i8, i8* %19
%21 = icmp eq i8 %20, 45
br i1 %21, label %5, label %22
22: ; preds = %17
%23 = getelementptr inbounds i8, i8* %19, i64 1
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 45
br i1 %25, label %5, label %26
26: ; preds = %22
%27 = getelementptr inbounds i8, i8* %19, i64 2
%28 = load i8, i8* %27
%29 = icmp eq i8 %28, 45
br i1 %29, label %5, label %30
30: ; preds = %26
%31 = getelementptr inbounds i8*, i8** %0, i64 2
%32 = load i8*, i8** %31
%33 = load i8, i8* %32
%34 = icmp eq i8 %33, 45
br i1 %34, label %5, label %35
35: ; preds = %30
%36 = getelementptr inbounds i8, i8* %32, i64 1
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 45
br i1 %38, label %5, label %39
39: ; preds = %35
%40 = getelementptr inbounds i8, i8* %32, i64 2
%41 = load i8, i8* %40
%42 = icmp eq i8 %41, 45
br i1 %42, label %5, label %43
43: ; preds = %39
%44 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %45
45: ; preds = %43, %5
%46 = phi i32 [ %8, %5 ], [ undef, %43 ]
ret i32 %46
}