#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*/ generaTavola(char **);
int /*<<< orphan*/ intro();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pulisciArray(char **);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  short loop = 1;
  int menu;
  char array[10][10];
  struct player {
    char nome[20];
    unsigned short punteggio;
  };
  array[5][5] = 'x';
  pulisciArray(array);
  array[5][5] = 'x';
  intro();
  do {
    generaTavola(array);
    printf("Inserisci 0 per uscire\n");
    scanf("%d", &menu);
    if (menu == 0) {
      loop = 0;
    }
  } while (loop);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x1,-0x6(%rbp)
movb   $0x78,-0x39(%rbp)
lea    -0x70(%rbp),%rdi
call   1070 <pulisciArray@plt>
movb   $0x78,-0x39(%rbp)
mov    $0x0,%al
call   1030 <intro@plt>
lea    -0x70(%rbp),%rdi
call   1050 <generaTavola@plt>
lea    0xe73(%rip),%rdi
call   1040 <printf@plt>
lea    0xe7f(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,-0xc(%rbp)
jne    11b2 <main+0x62>
movw   $0x0,-0x6(%rbp)
jmp    11b7 <main+0x67>
cmpw   $0x0,-0x6(%rbp)
jne    117d <main+0x2d>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x78,%rsp
movb   $0x78,0x47(%rsp)
lea    0x10(%rsp),%r14
mov    %r14,%rdi
call   1070 <pulisciArray@plt>
movb   $0x78,0x47(%rsp)
xor    %eax,%eax
call   1030 <intro@plt>
lea    0xe83(%rip),%r15
lea    0xe79(%rip),%r12
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1050 <generaTavola@plt>
mov    %r15,%rdi
call   1040 <puts@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jne    1190 <main+0x40>
xor    %eax,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Inserisci 0 per uscire\0A\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i16
%3 = alloca i32
%4 = alloca [10 x [10 x i8]]
store i32 0, i32* %1
store i16 1, i16* %2
%5 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %4, i64 0, i64 5
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 5
store i8 120, i8* %6
%7 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %4, i64 0, i64 0
%8 = bitcast [10 x i8]* %7 to i8**
%9 = call i32 @pulisciArray(i8** %8)
%10 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %4, i64 0, i64 5
%11 = getelementptr inbounds [10 x i8], [10 x i8]* %10, i64 0, i64 5
store i8 120, i8* %11
%12 = call i32 (...) @intro()
br label %13
13: ; preds = %23, %0
%14 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %4, i64 0, i64 0
%15 = bitcast [10 x i8]* %14 to i8**
%16 = call i32 @generaTavola(i8** %15)
%17 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%19 = load i32, i32* %3
%20 = icmp eq i32 %19, 0
br i1 %20, label %21, label %22
21: ; preds = %13
store i16 0, i16* %2
br label %22
22: ; preds = %21, %13
br label %23
23: ; preds = %22
%24 = load i16, i16* %2
%25 = icmp ne i16 %24, 0
br i1 %25, label %13, label %26
26: ; preds = %23
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@str = [23 x i8] c"Inserisci 0 per uscire\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x [10 x i8]]
%3 = bitcast i32* %1 to i8*
%4 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %2, i64 0, i64 0, i64 0
%5 = getelementptr inbounds [10 x [10 x i8]], [10 x [10 x i8]]* %2, i64 0, i64 5, i64 5
store i8 120, i8* %5
%6 = bitcast [10 x [10 x i8]]* %2 to i8**
%7 = call i32 @pulisciArray(i8** %6)
store i8 120, i8* %5
%8 = call i32 (...) @intro()
br label %9
9: ; preds = %9, %0
%10 = call i32 @generaTavola(i8** %6)
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%13 = load i32, i32* %1
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %9
15: ; preds = %9
ret i32 0
}