#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 getscore(char *);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  int ROUND, i;
  char playera[5][20];
  for (ROUND = 0; ROUND < 9; ROUND++) {
    for (i = 0; i < 5; i++) {
      scanf("%s", playera[i]);
    }
    printf("%d\n\n", getscore(&playera[0][0]));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x9,-0x8(%rbp)
jge    11af <main+0x7f>
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    118a <main+0x5a>
movslq -0xc(%rbp),%rax
lea    -0x70(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xe89(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <main+0x27>
lea    -0x70(%rbp),%rdi
call   1050 <getscore@plt>
mov    %eax,%esi
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0x3c(%rsp),%r12
mov    $0x9,%r15d
lea    0x50(%rsp),%r13
lea    0xeab(%rip),%rbx
mov    %rsp,%rbp
lea    0xea4(%rip),%r14
nop
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
lea    0x14(%rsp),%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
lea    0x28(%rsp),%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1040 <scanf@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
call   1040 <scanf@plt>
mov    %rbp,%rdi
call   1050 <getscore@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0xffffffff,%r15d
jne    1160 <main+0x30>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [5 x i8] c"%d\0A\0A\00"
define i32 @main() {
%1 = alloca [5 x [20 x i8]]
%2 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%3 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 1, i64 0
%4 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 2, i64 0
%5 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 3, i64 0
%6 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 4, i64 0
br label %7
7: ; preds = %0, %7
%8 = phi i32 [ 0, %0 ], [ %16, %7 ]
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%10 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %5)
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %6)
%14 = call i32 @getscore(i8* %2)
%15 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = add nuw nsw i32 %8, 1
%17 = icmp eq i32 %16, 9
br i1 %17, label %18, label %7
18: ; preds = %7
ret i32 0
}