#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*/ display(char **);
char getchar();
int main(void) {
  char play[3][3];
  while (1) {
    for (int count = 0; count < 3; count++) {
      for (int count1 = 0; count1 < 3; count1++) {
        play[count][count1] = getchar();
        display(play);
      }
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    119a <main+0x7a>
movl   $0x0,-0x18(%rbp)
cmpl   $0x3,-0x18(%rbp)
jge    1187 <main+0x67>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,%dl
movslq -0x14(%rbp),%rcx
lea    -0xd(%rbp),%rax
imul   $0x3,%rcx,%rcx
add    %rcx,%rax
movslq -0x18(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
lea    -0xd(%rbp),%rdi
call   1030 <display@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1147 <main+0x27>
jmp    118c <main+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1136 <main+0x16>
jmp    112f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0x7(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x7(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x8(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0x9(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xa(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xb(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xc(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xd(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xe(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %al,0xf(%rsp)
mov    %rbx,%rdi
call   1030 <display@plt>
jmp    1130 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [3 x i8]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %0, %31
store i32 0, i32* %3
br label %6
6: ; preds = %28, %5
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %31
9: ; preds = %6
store i32 0, i32* %4
br label %10
10: ; preds = %24, %9
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %27
13: ; preds = %10
%14 = call signext i8 (...) @getchar()
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %2, i64 0, i64 %16
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [3 x i8], [3 x i8]* %17, i64 0, i64 %19
store i8 %14, i8* %20
%21 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %2, i64 0, i64 0
%22 = bitcast [3 x i8]* %21 to i8**
%23 = call i32 @display(i8** %22)
br label %24
24: ; preds = %13
%25 = load i32, i32* %4
%26 = add nsw i32 %25, 1
store i32 %26, i32* %4
br label %10
27: ; preds = %10
br label %28
28: ; preds = %27
%29 = load i32, i32* %3
%30 = add nsw i32 %29, 1
store i32 %30, i32* %3
br label %6
31: ; preds = %6
br label %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [3 x [3 x i8]]
%2 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0, i64 0
%3 = bitcast [3 x [3 x i8]]* %1 to i8**
%4 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0, i64 1
%5 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 0, i64 2
%6 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 1, i64 0
%7 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 1, i64 1
%8 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 1, i64 2
%9 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 2, i64 0
%10 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 2, i64 1
%11 = getelementptr inbounds [3 x [3 x i8]], [3 x [3 x i8]]* %1, i64 0, i64 2, i64 2
br label %12
12: ; preds = %12, %0
%13 = call signext i8 (...) @getchar()
store i8 %13, i8* %2
%14 = call i32 @display(i8** %3)
%15 = call signext i8 (...) @getchar()
store i8 %15, i8* %4
%16 = call i32 @display(i8** %3)
%17 = call signext i8 (...) @getchar()
store i8 %17, i8* %5
%18 = call i32 @display(i8** %3)
%19 = call signext i8 (...) @getchar()
store i8 %19, i8* %6
%20 = call i32 @display(i8** %3)
%21 = call signext i8 (...) @getchar()
store i8 %21, i8* %7
%22 = call i32 @display(i8** %3)
%23 = call signext i8 (...) @getchar()
store i8 %23, i8* %8
%24 = call i32 @display(i8** %3)
%25 = call signext i8 (...) @getchar()
store i8 %25, i8* %9
%26 = call i32 @display(i8** %3)
%27 = call signext i8 (...) @getchar()
store i8 %27, i8* %10
%28 = call i32 @display(i8** %3)
%29 = call signext i8 (...) @getchar()
store i8 %29, i8* %11
%30 = call i32 @display(i8** %3)
br label %12
}