#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 get_turn(char **, char, char);
int /*<<< orphan*/ go(char **, char, int);
int make_blank(char **);
int make_center(char **);
int possible_win(char **, char);
int /*<<< orphan*/ printf(char *, int);
int computer_move_magic(char **board, char piece1, char piece2) {
  int turn = get_turn(board, piece1, piece2);
  printf("Computer Move: %d\n", turn);
  int poss;
  switch (turn) {
  case 1:
    go(board, piece1, 1);
    break;
  case 2:
    if (board[1][1] == '-')
      go(board, piece1, 5);
    else
      go(board, piece1, 1);
    break;
  case 3:
    if (board[2][2] == '-')
      go(board, piece1, 9);
    else
      go(board, piece1, 3);
    break;
  case 4:
    printf("4: Possible returned: %d", possible_win(board, piece2));
    if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else
      go(board, piece1, make_center(board));
    printf("make_center: %d", make_center(board));
    break;
  case 5:
    if (possible_win(board, piece1) != 0)
      go(board, piece1, possible_win(board, piece1));
    else if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else if (board[7 / 3][7 % 3] == '-')
      go(board, piece1, 7);
    else
      go(board, piece1, 3);
    break;
  case 6:
    printf("6: Possible piece2 returned: %d", possible_win(board, piece2));
    printf("6: Possible piece1 returned: %d", possible_win(board, piece1));
    if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else if (possible_win(board, piece1) != 0)
      go(board, piece1, possible_win(board, piece1));
    else
      go(board, piece1, make_center(board));
    break;
  case 7:
    if (possible_win(board, piece1) != 0)
      go(board, piece1, possible_win(board, piece1));
    else if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else
      go(board, piece1, make_blank(board));
    break;
  case 8:
    if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else if (possible_win(board, piece1) != 0)
      go(board, piece1, possible_win(board, piece1));
    else
      go(board, piece1, make_blank(board));
    break;
  case 9:
    if (possible_win(board, piece1) != 0)
      go(board, piece1, possible_win(board, piece1));
    else if (possible_win(board, piece2) != 0)
      go(board, piece1, possible_win(board, piece2));
    else
      go(board, piece1, make_blank(board));
    break;
  };
  return 1;
}


x86 assembly (clang, -O0):
<computer_move_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
movsbl -0xa(%rbp),%edx
call   1060 <get_turn@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1050 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x20(%rbp)
sub    $0x8,%eax
ja     1792 <computer_move_magic+0x632>
mov    -0x20(%rbp),%rax
lea    0xe43(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    1209 <computer_move_magic+0xa9>
mov    -0x8(%rbp),%rdi
mov    $0x5,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    121b <computer_move_magic+0xbb>
mov    -0x8(%rbp),%rdi
mov    $0x1,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsbl 0x2(%rax),%eax
cmp    $0x2d,%eax
jne    124c <computer_move_magic+0xec>
mov    -0x8(%rbp),%rdi
mov    $0x9,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    125e <computer_move_magic+0xfe>
mov    -0x8(%rbp),%rdi
mov    $0x3,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    %eax,%esi
lea    0xdbe(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     12c5 <computer_move_magic+0x165>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x21(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
mov    -0x21(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    12ed <computer_move_magic+0x18d>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x31(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <make_center@plt>
mov    -0x40(%rbp),%rdi
mov    %eax,%edx
mov    -0x31(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
mov    -0x8(%rbp),%rdi
call   1070 <make_center@plt>
mov    %eax,%esi
lea    0xd51(%rip),%rdi
call   1050 <printf@plt>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1350 <computer_move_magic+0x1f0>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x41(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x50(%rbp),%rdi
mov    %eax,%edx
mov    -0x41(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    13df <computer_move_magic+0x27f>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1397 <computer_move_magic+0x237>
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x51(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x60(%rbp),%rdi
mov    %eax,%edx
mov    -0x51(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    13da <computer_move_magic+0x27a>
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2d,%eax
jne    13c3 <computer_move_magic+0x263>
mov    -0x8(%rbp),%rdi
mov    $0x7,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    13d5 <computer_move_magic+0x275>
mov    -0x8(%rbp),%rdi
mov    $0x3,%edx
movsbl -0x9(%rbp),%esi
call   1040 <go@plt>
jmp    13da <computer_move_magic+0x27a>
jmp    13df <computer_move_magic+0x27f>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    %eax,%esi
lea    0xc66(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    %eax,%esi
lea    0xc6b(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1461 <computer_move_magic+0x301>
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x61(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x70(%rbp),%rdi
mov    %eax,%edx
mov    -0x61(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    14e1 <computer_move_magic+0x381>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     14a8 <computer_move_magic+0x348>
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x71(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x80(%rbp),%rdi
mov    %eax,%edx
mov    -0x71(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    14dc <computer_move_magic+0x37c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x81(%rbp)
mov    -0x8(%rbp),%rdi
call   1070 <make_center@plt>
mov    -0x90(%rbp),%rdi
mov    %eax,%edx
mov    -0x81(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    14e1 <computer_move_magic+0x381>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1539 <computer_move_magic+0x3d9>
mov    -0x8(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x91(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0xa0(%rbp),%rdi
mov    %eax,%edx
mov    -0x91(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    15c5 <computer_move_magic+0x465>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     158c <computer_move_magic+0x42c>
mov    -0x8(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xa1(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0xb0(%rbp),%rdi
mov    %eax,%edx
mov    -0xa1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    15c0 <computer_move_magic+0x460>
mov    -0x8(%rbp),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xb1(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <make_blank@plt>
mov    -0xc0(%rbp),%rdi
mov    %eax,%edx
mov    -0xb1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    15c5 <computer_move_magic+0x465>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     161d <computer_move_magic+0x4bd>
mov    -0x8(%rbp),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xc1(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0xd0(%rbp),%rdi
mov    %eax,%edx
mov    -0xc1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    16a9 <computer_move_magic+0x549>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1670 <computer_move_magic+0x510>
mov    -0x8(%rbp),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xd1(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0xe0(%rbp),%rdi
mov    %eax,%edx
mov    -0xd1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    16a4 <computer_move_magic+0x544>
mov    -0x8(%rbp),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xe1(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <make_blank@plt>
mov    -0xf0(%rbp),%rdi
mov    %eax,%edx
mov    -0xe1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    16a9 <computer_move_magic+0x549>
jmp    1792 <computer_move_magic+0x632>
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1701 <computer_move_magic+0x5a1>
mov    -0x8(%rbp),%rax
mov    %rax,-0x100(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0xf1(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0x9(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x100(%rbp),%rdi
mov    %eax,%edx
mov    -0xf1(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    178d <computer_move_magic+0x62d>
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
cmp    $0x0,%eax
je     1754 <computer_move_magic+0x5f4>
mov    -0x8(%rbp),%rax
mov    %rax,-0x110(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x101(%rbp)
mov    -0x8(%rbp),%rdi
movsbl -0xa(%rbp),%esi
call   1080 <possible_win@plt>
mov    -0x110(%rbp),%rdi
mov    %eax,%edx
mov    -0x101(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    1788 <computer_move_magic+0x628>
mov    -0x8(%rbp),%rax
mov    %rax,-0x120(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x111(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <make_blank@plt>
mov    -0x120(%rbp),%rdi
mov    %eax,%edx
mov    -0x111(%rbp),%al
movsbl %al,%esi
call   1040 <go@plt>
jmp    178d <computer_move_magic+0x62d>
jmp    1792 <computer_move_magic+0x632>
mov    $0x1,%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<computer_move_magic>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%r15d
mov    %rdi,%r14
call   1060 <get_turn@plt>
mov    %eax,%ebp
lea    0xea7(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
add    $0xffffffff,%ebp
cmp    $0x8,%ebp
ja     1374 <computer_move_magic+0x214>
lea    0xe69(%rip),%rax
movslq (%rax,%rbp,4),%rcx
add    %rax,%rcx
jmp    *%rcx
movsbl %r15b,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
jne    135e <computer_move_magic+0x1fe>
movsbl %bl,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
jne    12e8 <computer_move_magic+0x188>
mov    %r14,%rdi
call   1030 <make_blank@plt>
jmp    1368 <computer_move_magic+0x208>
mov    0x8(%r14),%rax
cmpb   $0x2d,0x1(%rax)
jne    11f3 <computer_move_magic+0x93>
movsbl %r15b,%esi
mov    %r14,%rdi
mov    $0x5,%edx
jmp    136f <computer_move_magic+0x20f>
movsbl %r15b,%esi
mov    %r14,%rdi
mov    $0x1,%edx
jmp    136f <computer_move_magic+0x20f>
mov    0x10(%r14),%rax
cmpb   $0x2d,0x2(%rax)
jne    1317 <computer_move_magic+0x1b7>
movsbl %r15b,%esi
mov    %r14,%rdi
mov    $0x9,%edx
jmp    136f <computer_move_magic+0x20f>
movsbl %bl,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
lea    0xe00(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
mov    %r14,%rdi
test   %eax,%eax
je     1325 <computer_move_magic+0x1c5>
mov    %ebx,%esi
call   1080 <possible_win@plt>
jmp    132a <computer_move_magic+0x1ca>
movsbl %r15b,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
jne    135e <computer_move_magic+0x1fe>
movsbl %bl,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
jne    12e8 <computer_move_magic+0x188>
mov    0x10(%r14),%rax
cmpb   $0x2d,0x1(%rax)
jne    13b8 <computer_move_magic+0x258>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x7,%edx
jmp    136f <computer_move_magic+0x20f>
movsbl %bl,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
lea    0xda9(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
movsbl %r15b,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
call   1080 <possible_win@plt>
lea    0xdad(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
je     1350 <computer_move_magic+0x1f0>
mov    %r14,%rdi
mov    %ebx,%esi
jmp    1363 <computer_move_magic+0x203>
movsbl %bl,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
je     1384 <computer_move_magic+0x224>
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
movsbl %r15b,%esi
mov    %r14,%rdi
jmp    136d <computer_move_magic+0x20d>
movsbl %r15b,%esi
mov    %r14,%rdi
mov    $0x3,%edx
jmp    136f <computer_move_magic+0x20f>
call   1070 <make_center@plt>
mov    %eax,%edx
movsbl %r15b,%esi
mov    %r14,%rdi
call   1040 <go@plt>
mov    %r14,%rdi
call   1070 <make_center@plt>
lea    0xd09(%rip),%rdi
mov    %eax,%esi
call   1050 <printf@plt>
jmp    1374 <computer_move_magic+0x214>
mov    %r14,%rdi
mov    %ebp,%esi
call   1080 <possible_win@plt>
test   %eax,%eax
je     13a2 <computer_move_magic+0x242>
mov    %r14,%rdi
mov    %ebp,%esi
call   1080 <possible_win@plt>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <go@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
movsbl %r15b,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
call   1080 <possible_win@plt>
mov    %r14,%rdi
test   %eax,%eax
je     13ac <computer_move_magic+0x24c>
mov    %ebx,%esi
call   1080 <possible_win@plt>
jmp    13b1 <computer_move_magic+0x251>
mov    %r14,%rdi
call   1070 <make_center@plt>
jmp    1368 <computer_move_magic+0x208>
call   1030 <make_blank@plt>
mov    %r14,%rdi
mov    %ebx,%esi
jmp    136d <computer_move_magic+0x20d>
mov    %r14,%rdi
mov    %ebp,%esi
mov    $0x3,%edx
jmp    136f <computer_move_magic+0x20f>

LLVM IR (-O0):
@.str = [19 x i8] c"Computer Move: %d\0A\00"
@.str.1 = [25 x i8] c"4: Possible returned: %d\00"
@.str.2 = [16 x i8] c"make_center: %d\00"
@.str.3 = [32 x i8] c"6: Possible piece2 returned: %d\00"
@.str.4 = [32 x i8] c"6: Possible piece1 returned: %d\00"
define i32 @computer_move_magic(i8** %0, i8 signext %1, i8 signext %2) {
%4 = alloca i8**
%5 = alloca i8
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
store i8** %0, i8*** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8**, i8*** %4
%10 = load i8, i8* %5
%11 = load i8, i8* %6
%12 = call i32 @get_turn(i8** %9, i8 signext %10, i8 signext %11)
store i32 %12, i32* %7
%13 = load i32, i32* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = load i32, i32* %7
switch i32 %15, label %259 [
i32 1, label %16
i32 2, label %20
i32 3, label %37
i32 4, label %54
i32 5, label %80
i32 6, label %123
i32 7, label %163
i32 8, label %195
i32 9, label %227
]
16: ; preds = %3
%17 = load i8**, i8*** %4
%18 = load i8, i8* %5
%19 = call i32 @go(i8** %17, i8 signext %18, i32 1)
br label %259
20: ; preds = %3
%21 = load i8**, i8*** %4
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 45
br i1 %27, label %28, label %32
28: ; preds = %20
%29 = load i8**, i8*** %4
%30 = load i8, i8* %5
%31 = call i32 @go(i8** %29, i8 signext %30, i32 5)
br label %36
32: ; preds = %20
%33 = load i8**, i8*** %4
%34 = load i8, i8* %5
%35 = call i32 @go(i8** %33, i8 signext %34, i32 1)
br label %36
36: ; preds = %32, %28
br label %259
37: ; preds = %3
%38 = load i8**, i8*** %4
%39 = getelementptr inbounds i8*, i8** %38, i64 2
%40 = load i8*, i8** %39
%41 = getelementptr inbounds i8, i8* %40, i64 2
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 45
br i1 %44, label %45, label %49
45: ; preds = %37
%46 = load i8**, i8*** %4
%47 = load i8, i8* %5
%48 = call i32 @go(i8** %46, i8 signext %47, i32 9)
br label %53
49: ; preds = %37
%50 = load i8**, i8*** %4
%51 = load i8, i8* %5
%52 = call i32 @go(i8** %50, i8 signext %51, i32 3)
br label %53
53: ; preds = %49, %45
br label %259
54: ; preds = %3
%55 = load i8**, i8*** %4
%56 = load i8, i8* %6
%57 = call i32 @possible_win(i8** %55, i8 signext %56)
%58 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %57)
%59 = load i8**, i8*** %4
%60 = load i8, i8* %6
%61 = call i32 @possible_win(i8** %59, i8 signext %60)
%62 = icmp ne i32 %61, 0
br i1 %62, label %63, label %70
63: ; preds = %54
%64 = load i8**, i8*** %4
%65 = load i8, i8* %5
%66 = load i8**, i8*** %4
%67 = load i8, i8* %6
%68 = call i32 @possible_win(i8** %66, i8 signext %67)
%69 = call i32 @go(i8** %64, i8 signext %65, i32 %68)
br label %76
70: ; preds = %54
%71 = load i8**, i8*** %4
%72 = load i8, i8* %5
%73 = load i8**, i8*** %4
%74 = call i32 @make_center(i8** %73)
%75 = call i32 @go(i8** %71, i8 signext %72, i32 %74)
br label %76
76: ; preds = %70, %63
%77 = load i8**, i8*** %4
%78 = call i32 @make_center(i8** %77)
%79 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %78)
br label %259
80: ; preds = %3
%81 = load i8**, i8*** %4
%82 = load i8, i8* %5
%83 = call i32 @possible_win(i8** %81, i8 signext %82)
%84 = icmp ne i32 %83, 0
br i1 %84, label %85, label %92
85: ; preds = %80
%86 = load i8**, i8*** %4
%87 = load i8, i8* %5
%88 = load i8**, i8*** %4
%89 = load i8, i8* %5
%90 = call i32 @possible_win(i8** %88, i8 signext %89)
%91 = call i32 @go(i8** %86, i8 signext %87, i32 %90)
br label %122
92: ; preds = %80
%93 = load i8**, i8*** %4
%94 = load i8, i8* %6
%95 = call i32 @possible_win(i8** %93, i8 signext %94)
%96 = icmp ne i32 %95, 0
br i1 %96, label %97, label %104
97: ; preds = %92
%98 = load i8**, i8*** %4
%99 = load i8, i8* %5
%100 = load i8**, i8*** %4
%101 = load i8, i8* %6
%102 = call i32 @possible_win(i8** %100, i8 signext %101)
%103 = call i32 @go(i8** %98, i8 signext %99, i32 %102)
br label %121
104: ; preds = %92
%105 = load i8**, i8*** %4
%106 = getelementptr inbounds i8*, i8** %105, i64 2
%107 = load i8*, i8** %106
%108 = getelementptr inbounds i8, i8* %107, i64 1
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %110, 45
br i1 %111, label %112, label %116
112: ; preds = %104
%113 = load i8**, i8*** %4
%114 = load i8, i8* %5
%115 = call i32 @go(i8** %113, i8 signext %114, i32 7)
br label %120
116: ; preds = %104
%117 = load i8**, i8*** %4
%118 = load i8, i8* %5
%119 = call i32 @go(i8** %117, i8 signext %118, i32 3)
br label %120
120: ; preds = %116, %112
br label %121
121: ; preds = %120, %97
br label %122
122: ; preds = %121, %85
br label %259
123: ; preds = %3
%124 = load i8**, i8*** %4
%125 = load i8, i8* %6
%126 = call i32 @possible_win(i8** %124, i8 signext %125)
%127 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %126)
%128 = load i8**, i8*** %4
%129 = load i8, i8* %5
%130 = call i32 @possible_win(i8** %128, i8 signext %129)
%131 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %130)
%132 = load i8**, i8*** %4
%133 = load i8, i8* %6
%134 = call i32 @possible_win(i8** %132, i8 signext %133)
%135 = icmp ne i32 %134, 0
br i1 %135, label %136, label %143
136: ; preds = %123
%137 = load i8**, i8*** %4
%138 = load i8, i8* %5
%139 = load i8**, i8*** %4
%140 = load i8, i8* %6
%141 = call i32 @possible_win(i8** %139, i8 signext %140)
%142 = call i32 @go(i8** %137, i8 signext %138, i32 %141)
br label %162
143: ; preds = %123
%144 = load i8**, i8*** %4
%145 = load i8, i8* %5
%146 = call i32 @possible_win(i8** %144, i8 signext %145)
%147 = icmp ne i32 %146, 0
br i1 %147, label %148, label %155
148: ; preds = %143
%149 = load i8**, i8*** %4
%150 = load i8, i8* %5
%151 = load i8**, i8*** %4
%152 = load i8, i8* %5
%153 = call i32 @possible_win(i8** %151, i8 signext %152)
%154 = call i32 @go(i8** %149, i8 signext %150, i32 %153)
br label %161
155: ; preds = %143
%156 = load i8**, i8*** %4
%157 = load i8, i8* %5
%158 = load i8**, i8*** %4
%159 = call i32 @make_center(i8** %158)
%160 = call i32 @go(i8** %156, i8 signext %157, i32 %159)
br label %161
161: ; preds = %155, %148
br label %162
162: ; preds = %161, %136
br label %259
163: ; preds = %3
%164 = load i8**, i8*** %4
%165 = load i8, i8* %5
%166 = call i32 @possible_win(i8** %164, i8 signext %165)
%167 = icmp ne i32 %166, 0
br i1 %167, label %168, label %175
168: ; preds = %163
%169 = load i8**, i8*** %4
%170 = load i8, i8* %5
%171 = load i8**, i8*** %4
%172 = load i8, i8* %5
%173 = call i32 @possible_win(i8** %171, i8 signext %172)
%174 = call i32 @go(i8** %169, i8 signext %170, i32 %173)
br label %194
175: ; preds = %163
%176 = load i8**, i8*** %4
%177 = load i8, i8* %6
%178 = call i32 @possible_win(i8** %176, i8 signext %177)
%179 = icmp ne i32 %178, 0
br i1 %179, label %180, label %187
180: ; preds = %175
%181 = load i8**, i8*** %4
%182 = load i8, i8* %5
%183 = load i8**, i8*** %4
%184 = load i8, i8* %6
%185 = call i32 @possible_win(i8** %183, i8 signext %184)
%186 = call i32 @go(i8** %181, i8 signext %182, i32 %185)
br label %193
187: ; preds = %175
%188 = load i8**, i8*** %4
%189 = load i8, i8* %5
%190 = load i8**, i8*** %4
%191 = call i32 @make_blank(i8** %190)
%192 = call i32 @go(i8** %188, i8 signext %189, i32 %191)
br label %193
193: ; preds = %187, %180
br label %194
194: ; preds = %193, %168
br label %259
195: ; preds = %3
%196 = load i8**, i8*** %4
%197 = load i8, i8* %6
%198 = call i32 @possible_win(i8** %196, i8 signext %197)
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %207
200: ; preds = %195
%201 = load i8**, i8*** %4
%202 = load i8, i8* %5
%203 = load i8**, i8*** %4
%204 = load i8, i8* %6
%205 = call i32 @possible_win(i8** %203, i8 signext %204)
%206 = call i32 @go(i8** %201, i8 signext %202, i32 %205)
br label %226
207: ; preds = %195
%208 = load i8**, i8*** %4
%209 = load i8, i8* %5
%210 = call i32 @possible_win(i8** %208, i8 signext %209)
%211 = icmp ne i32 %210, 0
br i1 %211, label %212, label %219
212: ; preds = %207
%213 = load i8**, i8*** %4
%214 = load i8, i8* %5
%215 = load i8**, i8*** %4
%216 = load i8, i8* %5
%217 = call i32 @possible_win(i8** %215, i8 signext %216)
%218 = call i32 @go(i8** %213, i8 signext %214, i32 %217)
br label %225
219: ; preds = %207
%220 = load i8**, i8*** %4
%221 = load i8, i8* %5
%222 = load i8**, i8*** %4
%223 = call i32 @make_blank(i8** %222)
%224 = call i32 @go(i8** %220, i8 signext %221, i32 %223)
br label %225
225: ; preds = %219, %212
br label %226
226: ; preds = %225, %200
br label %259
227: ; preds = %3
%228 = load i8**, i8*** %4
%229 = load i8, i8* %5
%230 = call i32 @possible_win(i8** %228, i8 signext %229)
%231 = icmp ne i32 %230, 0
br i1 %231, label %232, label %239
232: ; preds = %227
%233 = load i8**, i8*** %4
%234 = load i8, i8* %5
%235 = load i8**, i8*** %4
%236 = load i8, i8* %5
%237 = call i32 @possible_win(i8** %235, i8 signext %236)
%238 = call i32 @go(i8** %233, i8 signext %234, i32 %237)
br label %258
239: ; preds = %227
%240 = load i8**, i8*** %4
%241 = load i8, i8* %6
%242 = call i32 @possible_win(i8** %240, i8 signext %241)
%243 = icmp ne i32 %242, 0
br i1 %243, label %244, label %251
244: ; preds = %239
%245 = load i8**, i8*** %4
%246 = load i8, i8* %5
%247 = load i8**, i8*** %4
%248 = load i8, i8* %6
%249 = call i32 @possible_win(i8** %247, i8 signext %248)
%250 = call i32 @go(i8** %245, i8 signext %246, i32 %249)
br label %257
251: ; preds = %239
%252 = load i8**, i8*** %4
%253 = load i8, i8* %5
%254 = load i8**, i8*** %4
%255 = call i32 @make_blank(i8** %254)
%256 = call i32 @go(i8** %252, i8 signext %253, i32 %255)
br label %257
257: ; preds = %251, %244
br label %258
258: ; preds = %257, %232
br label %259
259: ; preds = %3, %258, %226, %194, %162, %122, %76, %53, %36, %16
ret i32 1
}

LLVM IR (-O2):
@.str = [19 x i8] c"Computer Move: %d\0A\00"
@.str.1 = [25 x i8] c"4: Possible returned: %d\00"
@.str.2 = [16 x i8] c"make_center: %d\00"
@.str.3 = [32 x i8] c"6: Possible piece2 returned: %d\00"
@.str.4 = [32 x i8] c"6: Possible piece1 returned: %d\00"
define i32 @computer_move_magic(i8** %0, i8 signext %1, i8 signext %2) {
%4 = tail call i32 @get_turn(i8** %0, i8 signext %1, i8 signext %2)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4)
switch i32 %4, label %128 [
i32 1, label %6
i32 2, label %8
i32 3, label %18
i32 4, label %28
i32 5, label %42
i32 6, label %64
i32 7, label %83
i32 8, label %98
i32 9, label %113
]
6: ; preds = %3
%7 = tail call i32 @go(i8** %0, i8 signext %1, i32 1)
br label %128
8: ; preds = %3
%9 = getelementptr inbounds i8*, i8** %0, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 45
br i1 %13, label %14, label %16
14: ; preds = %8
%15 = tail call i32 @go(i8** %0, i8 signext %1, i32 5)
br label %128
16: ; preds = %8
%17 = tail call i32 @go(i8** %0, i8 signext %1, i32 1)
br label %128
18: ; preds = %3
%19 = getelementptr inbounds i8*, i8** %0, i64 2
%20 = load i8*, i8** %19
%21 = getelementptr inbounds i8, i8* %20, i64 2
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 45
br i1 %23, label %24, label %26
24: ; preds = %18
%25 = tail call i32 @go(i8** %0, i8 signext %1, i32 9)
br label %128
26: ; preds = %18
%27 = tail call i32 @go(i8** %0, i8 signext %1, i32 3)
br label %128
28: ; preds = %3
%29 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%30 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i32 %29)
%31 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%32 = icmp eq i32 %31, 0
br i1 %32, label %35, label %33
33: ; preds = %28
%34 = tail call i32 @possible_win(i8** %0, i8 signext %2)
br label %37
35: ; preds = %28
%36 = tail call i32 @make_center(i8** %0)
br label %37
37: ; preds = %35, %33
%38 = phi i32 [ %36, %35 ], [ %34, %33 ]
%39 = tail call i32 @go(i8** %0, i8 signext %1, i32 %38)
%40 = tail call i32 @make_center(i8** %0)
%41 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %40)
br label %128
42: ; preds = %3
%43 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%44 = icmp eq i32 %43, 0
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%47 = tail call i32 @go(i8** %0, i8 signext %1, i32 %46)
br label %128
48: ; preds = %42
%49 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%50 = icmp eq i32 %49, 0
br i1 %50, label %54, label %51
51: ; preds = %48
%52 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%53 = tail call i32 @go(i8** %0, i8 signext %1, i32 %52)
br label %128
54: ; preds = %48
%55 = getelementptr inbounds i8*, i8** %0, i64 2
%56 = load i8*, i8** %55
%57 = getelementptr inbounds i8, i8* %56, i64 1
%58 = load i8, i8* %57
%59 = icmp eq i8 %58, 45
br i1 %59, label %60, label %62
60: ; preds = %54
%61 = tail call i32 @go(i8** %0, i8 signext %1, i32 7)
br label %128
62: ; preds = %54
%63 = tail call i32 @go(i8** %0, i8 signext %1, i32 3)
br label %128
64: ; preds = %3
%65 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%66 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i32 %65)
%67 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%68 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.4, i64 0, i64 0), i32 %67)
%69 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%70 = icmp eq i32 %69, 0
br i1 %70, label %74, label %71
71: ; preds = %64
%72 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%73 = tail call i32 @go(i8** %0, i8 signext %1, i32 %72)
br label %128
74: ; preds = %64
%75 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%76 = icmp eq i32 %75, 0
br i1 %76, label %80, label %77
77: ; preds = %74
%78 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%79 = tail call i32 @go(i8** %0, i8 signext %1, i32 %78)
br label %128
80: ; preds = %74
%81 = tail call i32 @make_center(i8** %0)
%82 = tail call i32 @go(i8** %0, i8 signext %1, i32 %81)
br label %128
83: ; preds = %3
%84 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%85 = icmp eq i32 %84, 0
br i1 %85, label %89, label %86
86: ; preds = %83
%87 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%88 = tail call i32 @go(i8** %0, i8 signext %1, i32 %87)
br label %128
89: ; preds = %83
%90 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%91 = icmp eq i32 %90, 0
br i1 %91, label %95, label %92
92: ; preds = %89
%93 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%94 = tail call i32 @go(i8** %0, i8 signext %1, i32 %93)
br label %128
95: ; preds = %89
%96 = tail call i32 @make_blank(i8** %0)
%97 = tail call i32 @go(i8** %0, i8 signext %1, i32 %96)
br label %128
98: ; preds = %3
%99 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%100 = icmp eq i32 %99, 0
br i1 %100, label %104, label %101
101: ; preds = %98
%102 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%103 = tail call i32 @go(i8** %0, i8 signext %1, i32 %102)
br label %128
104: ; preds = %98
%105 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%106 = icmp eq i32 %105, 0
br i1 %106, label %110, label %107
107: ; preds = %104
%108 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%109 = tail call i32 @go(i8** %0, i8 signext %1, i32 %108)
br label %128
110: ; preds = %104
%111 = tail call i32 @make_blank(i8** %0)
%112 = tail call i32 @go(i8** %0, i8 signext %1, i32 %111)
br label %128
113: ; preds = %3
%114 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%115 = icmp eq i32 %114, 0
br i1 %115, label %119, label %116
116: ; preds = %113
%117 = tail call i32 @possible_win(i8** %0, i8 signext %1)
%118 = tail call i32 @go(i8** %0, i8 signext %1, i32 %117)
br label %128
119: ; preds = %113
%120 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%121 = icmp eq i32 %120, 0
br i1 %121, label %125, label %122
122: ; preds = %119
%123 = tail call i32 @possible_win(i8** %0, i8 signext %2)
%124 = tail call i32 @go(i8** %0, i8 signext %1, i32 %123)
br label %128
125: ; preds = %119
%126 = tail call i32 @make_blank(i8** %0)
%127 = tail call i32 @go(i8** %0, i8 signext %1, i32 %126)
br label %128
128: ; preds = %116, %125, %122, %101, %110, %107, %86, %95, %92, %71, %80, %77, %45, %60, %62, %51, %24, %26, %14, %16, %3, %37, %6
ret i32 1
}