#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*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, int *, int *);
void Posizione(char *str, int *px, int *py) {
  do {
    printf("Inserisci la posizione %s(riga colonna): ", str);
    scanf("%d %d", &*py, &*px);
  } while (*px > 8 || *px < 0 || *py > 8 || *py < 0);
}


x86 assembly (clang, -O0):
<Posizione>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xed7(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x10(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x8,(%rcx)
mov    %al,-0x19(%rbp)
jg     119b <Posizione+0x7b>
mov    -0x10(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x0,(%rcx)
mov    %al,-0x19(%rbp)
jl     119b <Posizione+0x7b>
mov    -0x18(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x8,(%rcx)
mov    %al,-0x19(%rbp)
jg     119b <Posizione+0x7b>
mov    -0x18(%rbp),%rax
cmpl   $0x0,(%rax)
setl   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
test   $0x1,%al
jne    1134 <Posizione+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Posizione>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xec7(%rip),%r12
lea    0xeea(%rip),%r13
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <printf@plt>
mov    %r13,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <scanf@plt>
cmpl   $0x8,(%rbx)
ja     1140 <Posizione+0x20>
cmpl   $0x8,(%r14)
ja     1140 <Posizione+0x20>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Inserisci la posizione %s(riga colonna): \00"
@.str.1 = [6 x i8] c"%d %d\00"
define void @Posizione(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
br label %7
7: ; preds = %29, %3
%8 = load i8*, i8** %4
%9 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = load i32*, i32** %6
%11 = load i32*, i32** %5
%12 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %10, i32* %11)
br label %13
13: ; preds = %7
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = icmp sgt i32 %15, 8
br i1 %16, label %29, label %17
17: ; preds = %13
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = icmp slt i32 %19, 0
br i1 %20, label %29, label %21
21: ; preds = %17
%22 = load i32*, i32** %6
%23 = load i32, i32* %22
%24 = icmp sgt i32 %23, 8
br i1 %24, label %29, label %25
25: ; preds = %21
%26 = load i32*, i32** %6
%27 = load i32, i32* %26
%28 = icmp slt i32 %27, 0
br label %29
29: ; preds = %25, %21, %17, %13
%30 = phi i1 [ true, %21 ], [ true, %17 ], [ true, %13 ], [ %28, %25 ]
br i1 %30, label %7, label %31
31: ; preds = %29
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"Inserisci la posizione %s(riga colonna): \00"
@.str.1 = [6 x i8] c"%d %d\00"
define void @Posizione(i8* %0, i32* %1, i32* %2) {
br label %4
4: ; preds = %12, %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %2, i32* %1)
%7 = load i32, i32* %1
%8 = icmp ugt i32 %7, 8
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = load i32, i32* %2
%11 = icmp ugt i32 %10, 8
br i1 %11, label %12, label %13
12: ; preds = %9, %4
br label %4
13: ; preds = %9
ret void
}