#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 */
scalar_t__ EOF;
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *);
int main(void) {
  int n, age[7], i, temp;
  while (scanf("%d", &n) != EOF && n != 0) {
    for (i = 0; i < 7; i++)
      age[i] = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &temp);
      temp /= 10;
      if (temp >= 7)
        temp = 6;
      age[temp]++;
    }
    for (i = 0; i < 7; i++)
      printf("%d\n", age[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    %rax,%rcx
xor    %eax,%eax
mov    0x2e9d(%rip),%rdx
cmp    (%rdx),%rcx
mov    %al,-0x39(%rbp)
je     1161 <main+0x41>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0x39(%rbp)
mov    -0x39(%rbp),%al
test   $0x1,%al
jne    1171 <main+0x51>
jmp    1233 <main+0x113>
movl   $0x0,-0x34(%rbp)
cmpl   $0x7,-0x34(%rbp)
jge    119c <main+0x7c>
movslq -0x34(%rbp),%rax
movl   $0x0,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1178 <main+0x58>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11fb <main+0xdb>
lea    0xe4a(%rip),%rdi
lea    -0x38(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x38(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x38(%rbp)
cmpl   $0x7,-0x38(%rbp)
jl     11de <main+0xbe>
movl   $0x6,-0x38(%rbp)
movslq -0x38(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x30(%rbp,%rax,4)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11a3 <main+0x83>
movl   $0x0,-0x34(%rbp)
cmpl   $0x7,-0x34(%rbp)
jge    122e <main+0x10e>
movslq -0x34(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%esi
lea    0xde8(%rip),%rdi
call   1030 <printf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1202 <main+0xe2>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
lea    0xecb(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2ea2(%rip),%rcx
cmp    (%rcx),%rax
je     12a0 <main+0x180>
mov    0x8(%rsp),%eax
test   %eax,%eax
je     12a0 <main+0x180>
lea    0xe9e(%rip),%rbx
lea    0x1c(%rsp),%r14
mov    $0x6,%r12d
nopl   (%rax)
xorps  %xmm0,%xmm0
movups %xmm0,0x2c(%rsp)
movaps %xmm0,0x20(%rsp)
test   %eax,%eax
jle    1200 <main+0xe0>
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0x1c(%rsp),%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
cmp    $0x6,%eax
cmovge %r12d,%eax
movslq %eax,%rcx
addl   $0x1,0x20(%rsp,%rcx,4)
mov    %eax,0x1c(%rsp)
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1190 <main+0x70>
mov    0x20(%rsp),%esi
mov    0x24(%rsp),%ebp
mov    0x28(%rsp),%r13d
mov    0x2c(%rsp),%eax
mov    %eax,0xc(%rsp)
mov    0x30(%rsp),%eax
mov    %eax,0x10(%rsp)
mov    0x34(%rsp),%eax
mov    %eax,0x14(%rsp)
mov    0x38(%rsp),%eax
mov    %eax,0x18(%rsp)
jmp    1227 <main+0x107>
nop
movl   $0x0,0x18(%rsp)
movl   $0x0,0x14(%rsp)
movl   $0x0,0x10(%rsp)
movl   $0x0,0xc(%rsp)
xor    %r13d,%r13d
xor    %ebp,%ebp
xor    %esi,%esi
lea    0xdd5(%rip),%r15
mov    %r15,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %r13d,%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    0xc(%rsp),%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    0x10(%rsp),%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    0x14(%rsp),%esi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    0x18(%rsp),%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
lea    0x8(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2d59(%rip),%rcx
cmp    (%rcx),%rax
je     12a0 <main+0x180>
mov    0x8(%rsp),%eax
test   %eax,%eax
jne    1170 <main+0x50>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

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