#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 EXIT_SUCCESS;
int /*<<< orphan*/ print_counting_sort(int, int *);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char **argv) {
  int nc, n, i, j;
  scanf("%d", &nc);
  for (i = 0; i < nc; i++) {
    scanf("%d", &n);
    int h[n], hcs[211] = {0};
    for (j = 0; j < n; j++) {
      scanf("%d", &h[j]);
      hcs[h[j] - 20]++;
    }
    print_counting_sort(211, hcs);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x390,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb0(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1242 <main+0x112>
lea    0xe8d(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x18(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x28(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x388(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x30(%rbp)
lea    -0x380(%rbp),%rdi
xor    %esi,%esi
mov    $0x34c,%edx
call   1040 <memset@plt>
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    121c <main+0xec>
mov    -0x388(%rbp),%rsi
movslq -0x20(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe1b(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x388(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
sub    $0x14,%eax
cltq
mov    -0x380(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x380(%rbp,%rax,4)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11c0 <main+0x90>
lea    -0x380(%rbp),%rsi
mov    $0xd3,%edi
call   1030 <print_counting_sort@plt>
mov    -0x28(%rbp),%rax
mov    %rax,%rsp
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1160 <main+0x30>
mov    0x2d97(%rip),%rax
mov    (%rax),%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    $0x368,%rsp
lea    0xeb5(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x30(%rbp)
jle    121c <main+0xec>
xor    %r13d,%r13d
lea    0xe98(%rip),%r12
lea    -0x390(%rbp),%r15
jmp    119e <main+0x6e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0xd3,%edi
mov    %r14,%r15
mov    %r14,%rsi
call   1030 <print_counting_sort@plt>
mov    -0x38(%rbp),%rsp
add    $0x1,%r13d
cmp    -0x30(%rbp),%r13d
jge    121c <main+0xec>
mov    %r12,%rdi
lea    -0x2c(%rbp),%rsi
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
mov    $0x34c,%edx
mov    %r15,%r14
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
cmpl   $0x0,-0x2c(%rbp)
jle    1180 <main+0x50>
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movslq (%rbx),%rax
addl   $0x1,-0x3e0(%rbp,%rax,4)
01
add    $0x1,%r15
movslq -0x2c(%rbp),%rax
add    $0x4,%rbx
cmp    %rax,%r15
jl     11f0 <main+0xc0>
jmp    1180 <main+0x50>
mov    0x2dbd(%rip),%rax
mov    (%rax),%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"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i64
%12 = alloca [211 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
store i32 0, i32* %8
br label %14
14: ; preds = %50, %2
%15 = load i32, i32* %8
%16 = load i32, i32* %6
%17 = icmp slt i32 %15, %16
br i1 %17, label %18, label %53
18: ; preds = %14
%19 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%20 = load i32, i32* %7
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %10
%23 = alloca i32, i64 %21
store i64 %21, i64* %11
%24 = bitcast [211 x i32]* %12 to i8*
store i32 0, i32* %9
br label %25
25: ; preds = %43, %18
%26 = load i32, i32* %9
%27 = load i32, i32* %7
%28 = icmp slt i32 %26, %27
br i1 %28, label %29, label %46
29: ; preds = %25
%30 = load i32, i32* %9
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds i32, i32* %23, i64 %31
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %32)
%34 = load i32, i32* %9
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i32, i32* %23, i64 %35
%37 = load i32, i32* %36
%38 = sub nsw i32 %37, 20
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [211 x i32], [211 x i32]* %12, 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* %9
%45 = add nsw i32 %44, 1
store i32 %45, i32* %9
br label %25
46: ; preds = %25
%47 = getelementptr inbounds [211 x i32], [211 x i32]* %12, i64 0, i64 0
%48 = call i32 @print_counting_sort(i32 211, i32* %47)
%49 = load i8*, i8** %10
br label %50
50: ; preds = %46
%51 = load i32, i32* %8
%52 = add nsw i32 %51, 1
store i32 %52, i32* %8
br label %14
53: ; preds = %14
%54 = load i32, i32* @EXIT_SUCCESS
ret i32 %54
}

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