#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 *, int);
int /*<<< orphan*/ scanf(char *, int *, ...);
int main() {
  int number;
  int i = 0;
  char name[10];
  scanf("%d", &number);
  int arr[number];
  int count = 0;
  int hashtable[100];
  for (i = 0; i < 99; i++)
    hashtable[i] = 0;
  for (i = 0; i < number; i++) {
    scanf("%d %s", &arr[i], name);
    hashtable[arr[i]]++;
  }
  for (i = 0; i < 100; i++) {
    count = count + hashtable[i];
    printf("%d ", count);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1d0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec0(%rip),%rdi
xor    %eax,%eax
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x20(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c8(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x63,-0xc(%rbp)
jge    11aa <main+0x8a>
movslq -0xc(%rbp),%rax
movl   $0x0,-0x1c0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1183 <main+0x63>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    120f <main+0xef>
mov    -0x1c8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    -0x16(%rbp),%rdx
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x1c8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
mov    -0x1c0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11b1 <main+0x91>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    124e <main+0x12e>
mov    -0x2c(%rbp),%eax
movslq -0xc(%rbp),%rcx
add    -0x1c0(%rbp,%rcx,4),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%esi
lea    0xdce(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1216 <main+0xf6>
movl   $0x0,-0x4(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1b8,%rsp
lea    0xeb5(%rip),%rdi
xor    %r14d,%r14d
lea    -0x2c(%rbp),%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rsp,-0x38(%rbp)
mov    -0x2c(%rbp),%eax
mov    %rsp,%rbx
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
lea    -0x1e0(%rbp),%rdi
mov    $0x18c,%edx
xor    %esi,%esi
call   1040 <memset@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    11cc <main+0x9c>
lea    0xe6e(%rip),%r15
lea    -0x42(%rbp),%r12
xor    %r13d,%r13d
nopl   0x0(%rax)
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1050 <scanf@plt>
movslq (%rbx),%rax
addl   $0x1,-0x1e0(%rbp,%rax,4)
01
add    $0x1,%r13
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r13
jl     11a0 <main+0x70>
lea    0xe36(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
add    -0x1e0(%rbp,%rbx,4),%r14d
ff
mov    %r15,%rdi
mov    %r14d,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    11e0 <main+0xb0>
mov    -0x38(%rbp),%rsp
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %s\00"
@.str.2 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [10 x i8]
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca [100 x i32]
store i32 0, i32* %1
store i32 0, i32* %3
%9 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = call i8* @llvm.stacksave()
store i8* %12, i8** %5
%13 = alloca i32, i64 %11
store i64 %11, i64* %6
store i32 0, i32* %7
store i32 0, i32* %3
br label %14
14: ; preds = %21, %0
%15 = load i32, i32* %3
%16 = icmp slt i32 %15, 99
br i1 %16, label %17, label %24
17: ; preds = %14
%18 = load i32, i32* %3
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 %19
store i32 0, i32* %20
br label %21
21: ; preds = %17
%22 = load i32, i32* %3
%23 = add nsw i32 %22, 1
store i32 %23, i32* %3
br label %14
24: ; preds = %14
store i32 0, i32* %3
br label %25
25: ; preds = %43, %24
%26 = load i32, i32* %3
%27 = load i32, i32* %2
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %46
29: ; preds = %25
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %13, i64 %31
%33 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%34 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %32, i8* %33)
%35 = load i32, i32* %3
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds i32, i32* %13, i64 %36
%38 = load i32, i32* %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 %39
%41 = load i32, i32* %40
%42 = add nsw i32 %41, 1
store i32 %42, i32* %40
br label %43
43: ; preds = %29
%44 = load i32, i32* %3
%45 = add nsw i32 %44, 1
store i32 %45, i32* %3
br label %25
46: ; preds = %25
store i32 0, i32* %3
br label %47
47: ; preds = %59, %46
%48 = load i32, i32* %3
%49 = icmp slt i32 %48, 100
br i1 %49, label %50, label %62
50: ; preds = %47
%51 = load i32, i32* %7
%52 = load i32, i32* %3
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [100 x i32], [100 x i32]* %8, i64 0, i64 %53
%55 = load i32, i32* %54
%56 = add nsw i32 %51, %55
store i32 %56, i32* %7
%57 = load i32, i32* %7
%58 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %57)
br label %59
59: ; preds = %50
%60 = load i32, i32* %3
%61 = add nsw i32 %60, 1
store i32 %61, i32* %3
br label %47
62: ; preds = %47
store i32 0, i32* %1
%63 = load i8*, i8** %5
%64 = load i32, i32* %1
ret i32 %64
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d %s\00"
@.str.2 = [4 x i8] c"%d \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i8]
%3 = alloca [100 x i32]
%4 = bitcast [100 x i32]* %3 to i8*
%5 = bitcast i32* %1 to i8*
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %2, i64 0, i64 0
%7 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = zext i32 %8 to i64
%10 = call i8* @llvm.stacksave()
%11 = alloca i32, i64 %9
%12 = load i32, i32* %1
%13 = icmp sgt i32 %12, 0
br i1 %13, label %14, label %27
14: ; preds = %0, %14
%15 = phi i64 [ %23, %14 ], [ 0, %0 ]
%16 = getelementptr inbounds i32, i32* %11, i64 %15
%17 = call i32 (i8*, i32*, ...) @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32* %16, i8* %6)
%18 = load i32, i32* %16
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %19
%21 = load i32, i32* %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %20
%23 = add nuw nsw i64 %15, 1
%24 = load i32, i32* %1
%25 = sext i32 %24 to i64
%26 = icmp slt i64 %23, %25
br i1 %26, label %14, label %27
27: ; preds = %14, %0
br label %28
28: ; preds = %27, %28
%29 = phi i64 [ %35, %28 ], [ 0, %27 ]
%30 = phi i32 [ %33, %28 ], [ 0, %27 ]
%31 = getelementptr inbounds [100 x i32], [100 x i32]* %3, i64 0, i64 %29
%32 = load i32, i32* %31
%33 = add nsw i32 %32, %30
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %33)
%35 = add nuw nsw i64 %29, 1
%36 = icmp eq i64 %35, 100
br i1 %36, label %37, label %28
37: ; preds = %28
ret i32 0
}