#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*/ scanf(char *, ...);
int lerpontuacoes(char clubes[][50], int pontos[]) {
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%s %d", clubes[i], &pontos[i]);
  }
  return n;
}


x86 assembly (clang, -O0):
<lerpontuacoes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xedc(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1030 <scanf@plt>
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    117f <lerpontuacoes+0x6f>
mov    -0x8(%rbp),%rsi
movslq -0x18(%rbp),%rax
imul   $0x32,%rax,%rax
add    %rax,%rsi
mov    -0x10(%rbp),%rdx
movslq -0x18(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rdx
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1030 <scanf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1139 <lerpontuacoes+0x29>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lerpontuacoes>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
lea    0xede(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <scanf@plt>
mov    0x4(%rsp),%eax
test   %eax,%eax
jle    1176 <lerpontuacoes+0x66>
lea    0xec0(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <scanf@plt>
add    $0x1,%rbx
movslq 0x4(%rsp),%rax
add    $0x4,%r14
add    $0x32,%r12
cmp    %rax,%rbx
jl     1150 <lerpontuacoes+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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