#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*/ make_table(char **);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  char prenom[22][11];
  make_table(prenom);
  int number = 0;
  while (number < 1 || number > 11) {
    printf("Enter a player number: ");
    scanf("%d", &number);
  }
  printf("The player number %d is %s.\n", number, prenom[10 + number]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x100(%rbp),%rdi
call   1030 <make_table@plt>
movl   $0x0,-0x104(%rbp)
mov    $0x1,%al
cmpl   $0x1,-0x104(%rbp)
mov    %al,-0x105(%rbp)
jl     117d <main+0x4d>
cmpl   $0xb,-0x104(%rbp)
setg   %al
mov    %al,-0x105(%rbp)
mov    -0x105(%rbp),%al
test   $0x1,%al
jne    1190 <main+0x60>
jmp    11b6 <main+0x86>
lea    0xe69(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe73(%rip),%rdi
lea    -0x104(%rbp),%rsi
call   1050 <scanf@plt>
jmp    1158 <main+0x28>
mov    -0x104(%rbp),%esi
mov    -0x104(%rbp),%eax
add    $0xa,%eax
cltq
lea    -0x100(%rbp),%rdx
imul   $0xb,%rax,%rax
add    %rax,%rdx
lea    0xe3f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x110,%rsp
lea    0x10(%rsp),%rdi
call   1030 <make_table@plt>
movl   $0x0,0xc(%rsp)
lea    0xeab(%rip),%r14
lea    0xebc(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%esi
lea    -0xc(%rsi),%eax
cmp    $0xfffffff5,%eax
jb     1170 <main+0x40>
lea    (%rsi,%rsi,4),%rax
lea    (%rsi,%rax,2),%rax
lea    (%rsp,%rax,1),%rdx
add    $0x7e,%rdx
lea    0xe73(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [24 x i8] c"Enter a player number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The player number %d is %s.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [22 x [11 x i8]]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [22 x [11 x i8]], [22 x [11 x i8]]* %2, i64 0, i64 0
%5 = bitcast [11 x i8]* %4 to i8**
%6 = call i32 @make_table(i8** %5)
store i32 0, i32* %3
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %3
%9 = icmp slt i32 %8, 1
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %3
%12 = icmp sgt i32 %11, 11
br label %13
13: ; preds = %10, %7
%14 = phi i1 [ true, %7 ], [ %12, %10 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
br label %7
18: ; preds = %13
%19 = load i32, i32* %3
%20 = load i32, i32* %3
%21 = add nsw i32 10, %20
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [22 x [11 x i8]], [22 x [11 x i8]]* %2, i64 0, i64 %22
%24 = getelementptr inbounds [11 x i8], [11 x i8]* %23, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %19, i8* %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"Enter a player number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [29 x i8] c"The player number %d is %s.\0A\00"
define i32 @main() {
%1 = alloca [22 x [11 x i8]]
%2 = alloca i32
%3 = getelementptr inbounds [22 x [11 x i8]], [22 x [11 x i8]]* %1, i64 0, i64 0, i64 0
%4 = bitcast [22 x [11 x i8]]* %1 to i8**
%5 = call i32 @make_table(i8** %4)
%6 = bitcast i32* %2 to i8*
store i32 0, i32* %2
br label %7
7: ; preds = %0, %7
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = add i32 %10, -12
%12 = icmp ult i32 %11, -11
br i1 %12, label %7, label %13
13: ; preds = %7
%14 = add nuw nsw i32 %10, 10
%15 = zext i32 %14 to i64
%16 = getelementptr inbounds [22 x [11 x i8]], [22 x [11 x i8]]* %1, i64 0, i64 %15, i64 0
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %10, i8* %16)
ret i32 0
}