#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*/ allones(int *);
int /*<<< orphan*/ compymove(int *, int);
char getchar();
int /*<<< orphan*/ humanmove(int *, int);
int /*<<< orphan*/ isalnum(char);
int /*<<< orphan*/ printf(char *);
int printgame(int *);
int /*<<< orphan*/ puts(char *);
int rand();
char tolower(char);
scalar_t__ won(int *);
void play() {
  int piles[10];
  int c, nimber;
  char ch;
  do {
    puts("\nDo you want a (S)tandard or (R)andom setup? (S/R) ");
    while (!isalnum(ch = getchar()))
      ;
  } while ((tolower(ch) != 'r') && (tolower(ch) != 's'));
  if (tolower(ch) == 'r')
    for (c = 0; c < 10; c++)
      piles[c] = rand() % 20;
  else
    for (c = 0; c < 10; c++)
      piles[c] = (c < 3) ? 3 + c : 0;
  nimber = printgame(piles);
  while (!won(piles)) {
    if ((!nimber) && (!allones(piles))) {
      printf("\nComputer is going to win. Do you want to continue? (Y/N) ");
      while (!isalnum(ch = getchar()))
        ;
      if ((tolower(ch) == 'n') || (tolower(ch) == 'q'))
        return;
    }
    humanmove(piles, nimber);
    nimber = printgame(piles);
    if (won(piles))
      printf("\nComputer won that round. Try harder next time.");
    else {
      compymove(piles, nimber);
      nimber = printgame(piles);
      if (won(piles))
        printf("\nYou won! You're getting pretty good.");
    }
  }
}


x86 assembly (clang, -O0):
<play>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    0xe41(%rip),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    %al,-0x39(%rbp)
movsbl %al,%edi
call   1060 <isalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    11eb <play+0x3b>
jmp    11f0 <play+0x40>
jmp    11c4 <play+0x14>
jmp    11f5 <play+0x45>
movsbl -0x39(%rbp),%edi
call   1080 <tolower@plt>
movsbl %al,%ecx
xor    %eax,%eax
cmp    $0x72,%ecx
mov    %al,-0x3a(%rbp)
je     1224 <play+0x74>
movsbl -0x39(%rbp),%edi
call   1080 <tolower@plt>
movsbl %al,%eax
cmp    $0x73,%eax
setne  %al
mov    %al,-0x3a(%rbp)
mov    -0x3a(%rbp),%al
test   $0x1,%al
jne    11b8 <play+0x8>
movsbl -0x39(%rbp),%edi
call   1080 <tolower@plt>
movsbl %al,%eax
cmp    $0x72,%eax
jne    127f <play+0xcf>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    127a <play+0xca>
mov    $0x0,%al
call   10d0 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
movslq -0x34(%rbp),%rax
mov    %edx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    124b <play+0x9b>
jmp    12d0 <play+0x120>
movl   $0x0,-0x34(%rbp)
cmpl   $0xa,-0x34(%rbp)
jge    12cb <play+0x11b>
cmpl   $0x3,-0x34(%rbp)
jge    12a8 <play+0xf8>
mov    -0x34(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x40(%rbp)
jmp    12b2 <play+0x102>
xor    %eax,%eax
mov    %eax,-0x40(%rbp)
jmp    12b2 <play+0x102>
mov    -0x40(%rbp),%ecx
movslq -0x34(%rbp),%rax
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1286 <play+0xd6>
jmp    12d0 <play+0x120>
lea    -0x30(%rbp),%rdi
call   1090 <printgame@plt>
mov    %eax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   10c0 <won@plt>
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    12fb <play+0x14b>
jmp    1400 <play+0x250>
cmpl   $0x0,-0x38(%rbp)
jne    1383 <play+0x1d3>
lea    -0x30(%rbp),%rdi
call   10b0 <allones@plt>
cmp    $0x0,%eax
jne    1383 <play+0x1d3>
lea    0xd16(%rip),%rdi
call   1050 <printf@plt>
mov    $0x0,%al
call   1070 <getchar@plt>
mov    %al,-0x39(%rbp)
movsbl %al,%edi
call   1060 <isalnum@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    134a <play+0x19a>
jmp    134f <play+0x19f>
jmp    1323 <play+0x173>
movsbl -0x39(%rbp),%edi
call   1080 <tolower@plt>
movsbl %al,%eax
cmp    $0x6e,%eax
je     1379 <play+0x1c9>
movsbl -0x39(%rbp),%edi
call   1080 <tolower@plt>
movsbl %al,%eax
cmp    $0x71,%eax
jne    137e <play+0x1ce>
jmp    1400 <play+0x250>
jmp    1383 <play+0x1d3>
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%esi
call   10a0 <humanmove@plt>
lea    -0x30(%rbp),%rdi
call   1090 <printgame@plt>
mov    %eax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   10c0 <won@plt>
cmp    $0x0,%rax
je     13bf <play+0x20f>
lea    0xcba(%rip),%rdi
call   1050 <printf@plt>
jmp    13fb <play+0x24b>
lea    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%esi
call   1040 <compymove@plt>
lea    -0x30(%rbp),%rdi
call   1090 <printgame@plt>
mov    %eax,-0x38(%rbp)
lea    -0x30(%rbp),%rdi
call   10c0 <won@plt>
cmp    $0x0,%rax
je     13f6 <play+0x246>
lea    0xcae(%rip),%rdi
call   1050 <printf@plt>
jmp    13fb <play+0x24b>
jmp    12dc <play+0x12c>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<play>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe3b(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbx,%rdi
call   1030 <puts@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1070 <getchar@plt>
movsbl %al,%ebp
mov    %ebp,%edi
call   1060 <isalnum@plt>
test   %eax,%eax
je     11e0 <play+0x30>
mov    %ebp,%edi
call   1080 <tolower@plt>
cmp    $0x72,%al
je     120b <play+0x5b>
mov    %ebp,%edi
call   1080 <tolower@plt>
cmp    $0x73,%al
jne    11d0 <play+0x20>
mov    %ebp,%edi
call   1080 <tolower@plt>
cmp    $0x72,%al
jne    13d3 <play+0x223>
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x4(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x8(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0xc(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x10(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x14(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x18(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x1c(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x20(%rsp)
xor    %eax,%eax
call   10d0 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
sar    $0x3,%ecx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
mov    %eax,0x24(%rsp)
jmp    13f6 <play+0x246>
movabs $0x400000003,%rax
mov    %rax,(%rsp)
movl   $0x5,0x8(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0xc(%rsp)
movups %xmm0,0x18(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1090 <printgame@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   10c0 <won@plt>
test   %rax,%rax
je     141f <play+0x26f>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    %rsp,%r15
lea    0xc0b(%rip),%r14
lea    0xc3f(%rip),%r12
lea    0xc68(%rip),%r13
jmp    1455 <play+0x2a5>
nopl   0x0(%rax)
mov    %r12,%rdi
call   1050 <printf@plt>
mov    %r15,%rdi
call   10c0 <won@plt>
test   %rax,%rax
jne    1410 <play+0x260>
test   %ebp,%ebp
jne    14b0 <play+0x300>
mov    %r15,%rdi
call   10b0 <allones@plt>
test   %eax,%eax
jne    14b0 <play+0x300>
mov    %r14,%rdi
call   1050 <printf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1070 <getchar@plt>
movsbl %al,%ebx
mov    %ebx,%edi
call   1060 <isalnum@plt>
test   %eax,%eax
je     1470 <play+0x2c0>
mov    %ebx,%edi
call   1080 <tolower@plt>
cmp    $0x6e,%al
je     1410 <play+0x260>
mov    %ebx,%edi
call   1080 <tolower@plt>
cmp    $0x71,%al
je     1410 <play+0x260>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
call   10a0 <humanmove@plt>
mov    %r15,%rdi
call   1090 <printgame@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   10c0 <won@plt>
test   %rax,%rax
jne    1440 <play+0x290>
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <compymove@plt>
mov    %r15,%rdi
call   1090 <printgame@plt>
mov    %eax,%ebp
mov    %r15,%rdi
call   10c0 <won@plt>
mov    %r13,%rdi
test   %rax,%rax
jne    1443 <play+0x293>
jmp    1448 <play+0x298>

LLVM IR (-O0):
@.str = [52 x i8] c"\0ADo you want a (S)tandard or (R)andom setup? (S/R) \00"
@.str.1 = [59 x i8] c"\0AComputer is going to win. Do you want to continue? (Y/N) \00"
@.str.2 = [48 x i8] c"\0AComputer won that round. Try harder next time.\00"
@.str.3 = [38 x i8] c"\0AYou won! You're getting pretty good.\00"
define void @play() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8
br label %5
5: ; preds = %24, %0
%6 = call i32 @puts(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %12, %5
%8 = call signext i8 (...) @getchar()
store i8 %8, i8* %4
%9 = call i32 @isalnum(i8 signext %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br i1 %11, label %12, label %13
12: ; preds = %7
br label %7
13: ; preds = %7
br label %14
14: ; preds = %13
%15 = load i8, i8* %4
%16 = call signext i8 @tolower(i8 signext %15)
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 114
br i1 %18, label %19, label %24
19: ; preds = %14
%20 = load i8, i8* %4
%21 = call signext i8 @tolower(i8 signext %20)
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 115
br label %24
24: ; preds = %19, %14
%25 = phi i1 [ false, %14 ], [ %23, %19 ]
br i1 %25, label %5, label %26
26: ; preds = %24
%27 = load i8, i8* %4
%28 = call signext i8 @tolower(i8 signext %27)
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 114
br i1 %30, label %31, label %45
31: ; preds = %26
store i32 0, i32* %2
br label %32
32: ; preds = %41, %31
%33 = load i32, i32* %2
%34 = icmp slt i32 %33, 10
br i1 %34, label %35, label %44
35: ; preds = %32
%36 = call i32 (...) @rand()
%37 = srem i32 %36, 20
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %39
store i32 %37, i32* %40
br label %41
41: ; preds = %35
%42 = load i32, i32* %2
%43 = add nsw i32 %42, 1
store i32 %43, i32* %2
br label %32
44: ; preds = %32
br label %65
45: ; preds = %26
store i32 0, i32* %2
br label %46
46: ; preds = %61, %45
%47 = load i32, i32* %2
%48 = icmp slt i32 %47, 10
br i1 %48, label %49, label %64
49: ; preds = %46
%50 = load i32, i32* %2
%51 = icmp slt i32 %50, 3
br i1 %51, label %52, label %55
52: ; preds = %49
%53 = load i32, i32* %2
%54 = add nsw i32 3, %53
br label %56
55: ; preds = %49
br label %56
56: ; preds = %55, %52
%57 = phi i32 [ %54, %52 ], [ 0, %55 ]
%58 = load i32, i32* %2
%59 = sext i32 %58 to i64
%60 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %59
store i32 %57, i32* %60
br label %61
61: ; preds = %56
%62 = load i32, i32* %2
%63 = add nsw i32 %62, 1
store i32 %63, i32* %2
br label %46
64: ; preds = %46
br label %65
65: ; preds = %64, %44
%66 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%67 = call i32 @printgame(i32* %66)
store i32 %67, i32* %3
br label %68
68: ; preds = %123, %65
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%70 = call i64 @won(i32* %69)
%71 = icmp ne i64 %70, 0
%72 = xor i1 %71, true
br i1 %72, label %73, label %124
73: ; preds = %68
%74 = load i32, i32* %3
%75 = icmp ne i32 %74, 0
br i1 %75, label %100, label %76
76: ; preds = %73
%77 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%78 = call i32 @allones(i32* %77)
%79 = icmp ne i32 %78, 0
br i1 %79, label %100, label %80
80: ; preds = %76
%81 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
br label %82
82: ; preds = %87, %80
%83 = call signext i8 (...) @getchar()
store i8 %83, i8* %4
%84 = call i32 @isalnum(i8 signext %83)
%85 = icmp ne i32 %84, 0
%86 = xor i1 %85, true
br i1 %86, label %87, label %88
87: ; preds = %82
br label %82
88: ; preds = %82
%89 = load i8, i8* %4
%90 = call signext i8 @tolower(i8 signext %89)
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 110
br i1 %92, label %98, label %93
93: ; preds = %88
%94 = load i8, i8* %4
%95 = call signext i8 @tolower(i8 signext %94)
%96 = sext i8 %95 to i32
%97 = icmp eq i32 %96, 113
br i1 %97, label %98, label %99
98: ; preds = %93, %88
br label %124
99: ; preds = %93
br label %100
100: ; preds = %99, %76, %73
%101 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%102 = load i32, i32* %3
%103 = call i32 @humanmove(i32* %101, i32 %102)
%104 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%105 = call i32 @printgame(i32* %104)
store i32 %105, i32* %3
%106 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%107 = call i64 @won(i32* %106)
%108 = icmp ne i64 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %100
%110 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0))
br label %123
111: ; preds = %100
%112 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%113 = load i32, i32* %3
%114 = call i32 @compymove(i32* %112, i32 %113)
%115 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%116 = call i32 @printgame(i32* %115)
store i32 %116, i32* %3
%117 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%118 = call i64 @won(i32* %117)
%119 = icmp ne i64 %118, 0
br i1 %119, label %120, label %122
120: ; preds = %111
%121 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0))
br label %122
122: ; preds = %120, %111
br label %123
123: ; preds = %122, %109
br label %68
124: ; preds = %98, %68
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0ADo you want a (S)tandard or (R)andom setup? (S/R) \00"
@.str.1 = [59 x i8] c"\0AComputer is going to win. Do you want to continue? (Y/N) \00"
@.str.2 = [48 x i8] c"\0AComputer won that round. Try harder next time.\00"
@.str.3 = [38 x i8] c"\0AYou won! You're getting pretty good.\00"
define void @play() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
br label %3
3: ; preds = %12, %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %5, %3
%6 = tail call signext i8 (...) @getchar()
%7 = tail call i32 @isalnum(i8 signext %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5
%10 = tail call signext i8 @tolower(i8 signext %6)
%11 = icmp eq i8 %10, 114
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = tail call signext i8 @tolower(i8 signext %6)
%14 = icmp eq i8 %13, 115
br i1 %14, label %15, label %3
15: ; preds = %9, %12
%16 = tail call signext i8 @tolower(i8 signext %6)
%17 = icmp eq i8 %16, 114
br i1 %17, label %24, label %18
18: ; preds = %15
%19 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 3, i32* %19
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 4, i32* %20
%21 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 5, i32* %21
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%23 = bitcast i32* %22 to i8*
br label %55
24: ; preds = %15
%25 = tail call i32 (...) @rand()
%26 = srem i32 %25, 20
%27 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
store i32 %26, i32* %27
%28 = tail call i32 (...) @rand()
%29 = srem i32 %28, 20
%30 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
store i32 %29, i32* %30
%31 = tail call i32 (...) @rand()
%32 = srem i32 %31, 20
%33 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
store i32 %32, i32* %33
%34 = tail call i32 (...) @rand()
%35 = srem i32 %34, 20
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
store i32 %35, i32* %36
%37 = tail call i32 (...) @rand()
%38 = srem i32 %37, 20
%39 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
store i32 %38, i32* %39
%40 = tail call i32 (...) @rand()
%41 = srem i32 %40, 20
%42 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
store i32 %41, i32* %42
%43 = tail call i32 (...) @rand()
%44 = srem i32 %43, 20
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
store i32 %44, i32* %45
%46 = tail call i32 (...) @rand()
%47 = srem i32 %46, 20
%48 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
store i32 %47, i32* %48
%49 = tail call i32 (...) @rand()
%50 = srem i32 %49, 20
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
store i32 %50, i32* %51
%52 = tail call i32 (...) @rand()
%53 = srem i32 %52, 20
%54 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
store i32 %53, i32* %54
br label %55
55: ; preds = %18, %24
%56 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%57 = call i32 @printgame(i32* %56)
%58 = call i64 @won(i32* %56)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %96
60: ; preds = %55, %92
%61 = phi i32 [ %93, %92 ], [ %57, %55 ]
%62 = icmp eq i32 %61, 0
br i1 %62, label %63, label %78
63: ; preds = %60
%64 = call i32 @allones(i32* %56)
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %78
66: ; preds = %63
%67 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
br label %68
68: ; preds = %68, %66
%69 = call signext i8 (...) @getchar()
%70 = call i32 @isalnum(i8 signext %69)
%71 = icmp eq i32 %70, 0
br i1 %71, label %68, label %72
72: ; preds = %68
%73 = call signext i8 @tolower(i8 signext %69)
%74 = icmp eq i8 %73, 110
br i1 %74, label %96, label %75
75: ; preds = %72
%76 = call signext i8 @tolower(i8 signext %69)
%77 = icmp eq i8 %76, 113
br i1 %77, label %96, label %78
78: ; preds = %75, %63, %60
%79 = call i32 @humanmove(i32* %56, i32 %61)
%80 = call i32 @printgame(i32* %56)
%81 = call i64 @won(i32* %56)
%82 = icmp eq i64 %81, 0
br i1 %82, label %83, label %88
83: ; preds = %78
%84 = call i32 @compymove(i32* %56, i32 %80)
%85 = call i32 @printgame(i32* %56)
%86 = call i64 @won(i32* %56)
%87 = icmp eq i64 %86, 0
br i1 %87, label %92, label %88
88: ; preds = %83, %78
%89 = phi i8* [ getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), %78 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), %83 ]
%90 = phi i32 [ %80, %78 ], [ %85, %83 ]
%91 = call i32 @printf(i8* dereferenceable(1) %89)
br label %92
92: ; preds = %88, %83
%93 = phi i32 [ %85, %83 ], [ %90, %88 ]
%94 = call i64 @won(i32* %56)
%95 = icmp eq i64 %94, 0
br i1 %95, label %60, label %96
96: ; preds = %75, %72, %92, %55
ret void
}