#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 /*<<< orphan*/ radixsort(long long *, long long);
int /*<<< orphan*/ scanf(char *, long long *);
int main() {
  long long int i, j, k, t;
  long long int n, m;
  long long int a[100000];
  scanf("%lld", &t);
  for (i = 1; i <= t; i++) {
    scanf("%lld", &n);
    for (j = 0; j < n; j++) {
      scanf("%lld", &a[j]);
    }
    radixsort(a, n);
    for (k = 0; k < n; k++) {
      printf("%lld ", a[k]);
    }
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc3540,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb7(%rip),%rdi
lea    -0x28(%rbp),%rsi
call   1050 <scanf@plt>
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jg     122d <main+0xfd>
lea    0xe91(%rip),%rdi
lea    -0x30(%rbp),%rsi
call   1050 <scanf@plt>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    11bd <main+0x8d>
mov    -0x18(%rbp),%rax
lea    -0xc3540(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
lea    0xe59(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1180 <main+0x50>
lea    -0xc3540(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1040 <radixsort@plt>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jge    120e <main+0xde>
mov    -0x20(%rbp),%rax
mov    -0xc3540(%rbp,%rax,8),%rsi
ff
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    11d5 <main+0xa5>
lea    0xdf6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    115a <main+0x2a>
xor    %eax,%eax
add    $0xc3540,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xc3518,%rsp
lea    0xea8(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
cmpq   $0x0,0x8(%rsp)
jle    121e <main+0xde>
mov    $0x1,%ebp
lea    0xe86(%rip),%r13
lea    0x10(%rsp),%r15
lea    0xe7f(%rip),%r12
jmp    11a8 <main+0x68>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x1(%rbp),%rax
cmp    0x8(%rsp),%rbp
mov    %rax,%rbp
jge    121e <main+0xde>
mov    %r13,%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%rsi
test   %rsi,%rsi
jle    11ec <main+0xac>
mov    %r15,%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
add    $0x1,%r14
mov    (%rsp),%rsi
add    $0x8,%rbx
cmp    %rsi,%r14
jl     11d0 <main+0x90>
mov    %r15,%rdi
call   1050 <radixsort@plt>
cmpq   $0x0,(%rsp)
jle    1190 <main+0x50>
xor    %ebx,%ebx
nopl   (%rax)
mov    0x10(%rsp,%rbx,8),%rsi
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    (%rsp),%rbx
jl     1200 <main+0xc0>
jmp    1190 <main+0x50>
xor    %eax,%eax
add    $0xc3518,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%lld\00"
@.str.1 = [6 x i8] c"%lld \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca [100000 x i64]
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %5)
store i64 1, i64* %2
br label %10
10: ; preds = %45, %0
%11 = load i64, i64* %2
%12 = load i64, i64* %5
%13 = icmp sle i64 %11, %12
br i1 %13, label %14, label %48
14: ; preds = %10
%15 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %6)
store i64 0, i64* %3
br label %16
16: ; preds = %24, %14
%17 = load i64, i64* %3
%18 = load i64, i64* %6
%19 = icmp slt i64 %17, %18
br i1 %19, label %20, label %27
20: ; preds = %16
%21 = load i64, i64* %3
%22 = getelementptr inbounds [100000 x i64], [100000 x i64]* %8, i64 0, i64 %21
%23 = call i32 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64* %22)
br label %24
24: ; preds = %20
%25 = load i64, i64* %3
%26 = add nsw i64 %25, 1
store i64 %26, i64* %3
br label %16
27: ; preds = %16
%28 = getelementptr inbounds [100000 x i64], [100000 x i64]* %8, i64 0, i64 0
%29 = load i64, i64* %6
%30 = call i32 @radixsort(i64* %28, i64 %29)
store i64 0, i64* %4
br label %31
31: ; preds = %40, %27
%32 = load i64, i64* %4
%33 = load i64, i64* %6
%34 = icmp slt i64 %32, %33
br i1 %34, label %35, label %43
35: ; preds = %31
%36 = load i64, i64* %4
%37 = getelementptr inbounds [100000 x i64], [100000 x i64]* %8, i64 0, i64 %36
%38 = load i64, i64* %37
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %38)
br label %40
40: ; preds = %35
%41 = load i64, i64* %4
%42 = add nsw i64 %41, 1
store i64 %42, i64* %4
br label %31
43: ; preds = %31
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %45
45: ; preds = %43
%46 = load i64, i64* %2
%47 = add nsw i64 %46, 1
store i64 %47, i64* %2
br label %10
48: ; preds = %10
ret i32 0
}

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