#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*/ Giocabili(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
void Mossa(int *r, int *c, int player) {
  int rr, cc;
  do {
    printf("Giocatore %d, dove vuoi giocare(riga colonna): ", player);
    scanf("%d %d", &rr, &cc);
    *r = rr;
    *c = cc;
  } while (!Giocabili(rr, cc));
}


x86 assembly (clang, -O0):
<Mossa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x18(%rbp),%rsi
lea    -0x1c(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1050 <Giocabili@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1143 <Mossa+0x13>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Mossa>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
lea    0xee5(%rip),%r12
lea    0x4(%rsp),%r13
mov    %rsp,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xe99(%rip),%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
mov    %r12,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
mov    %edi,0x0(%rbp)
mov    (%rsp),%esi
mov    %esi,(%rbx)
call   1050 <Giocabili@plt>
test   %eax,%eax
je     1160 <Mossa+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [48 x i8] c"Giocatore %d, dove vuoi giocare(riga colonna): \00"
@.str.1 = [6 x i8] c"%d %d\00"
define void @Mossa(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
br label %9
9: ; preds = %17, %3
%10 = load i32, i32* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %7, i32* %8)
%13 = load i32, i32* %7
%14 = load i32*, i32** %4
store i32 %13, i32* %14
%15 = load i32, i32* %8
%16 = load i32*, i32** %5
store i32 %15, i32* %16
br label %17
17: ; preds = %9
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @Giocabili(i32 %18, i32 %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
br i1 %22, label %9, label %23
23: ; preds = %17
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c"Giocatore %d, dove vuoi giocare(riga colonna): \00"
@.str.1 = [6 x i8] c"%d %d\00"
define void @Mossa(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %4 to i8*
%7 = bitcast i32* %5 to i8*
br label %8
8: ; preds = %8, %3
%9 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %4, i32* %5)
%11 = load i32, i32* %4
store i32 %11, i32* %0
%12 = load i32, i32* %5
store i32 %12, i32* %1
%13 = call i32 @Giocabili(i32 %11, i32 %12)
%14 = icmp eq i32 %13, 0
br i1 %14, label %8, label %15
15: ; preds = %8
ret void
}