#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*/ scanf(char *, int *);
int main() {
  int n, i, t;
  scanf("%d", &n);
  int a[100];
  for (i = 0; i < 100; ++i)
    a[i] = 0;
  for (i = 0; i < n; ++i) {
    scanf("%d", &t);
    a[t]++;
  }
  for (i = 0; i < 100; ++i)
    while (a[i]--)
      printf("%d ", i);
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1a0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1170 <main+0x50>
movslq -0xc(%rbp),%rax
movl   $0x0,-0x1a0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <main+0x29>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11b6 <main+0x96>
lea    0xe76(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movslq -0x10(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1177 <main+0x57>
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    1215 <main+0xf5>
jmp    11cc <main+0xac>
movslq -0xc(%rbp),%rcx
mov    -0x1a0(%rbp,%rcx,4),%eax
mov    %eax,%edx
add    $0xffffffff,%edx
mov    %edx,-0x1a0(%rbp,%rcx,4)
cmp    $0x0,%eax
je     1202 <main+0xe2>
mov    -0xc(%rbp),%esi
lea    0xe0d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11cc <main+0xac>
jmp    1207 <main+0xe7>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11bd <main+0x9d>
lea    0xdeb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x1a0,%rsp
lea    0xeae(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
lea    0x10(%rsp),%rdi
xor    %ebp,%ebp
mov    $0x190,%edx
xor    %esi,%esi
call   1050 <memset@plt>
cmpl   $0x0,0x8(%rsp)
jle    11ae <main+0x6e>
lea    0xe83(%rip),%r14
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <scanf@plt>
movslq 0xc(%rsp),%rax
addl   $0x1,0x10(%rsp,%rax,4)
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1190 <main+0x50>
lea    0xe4e(%rip),%r14
xor    %ebx,%ebx
jmp    11d2 <main+0x92>
nopl   0x0(%rax)
movl   $0xffffffff,0x10(%rsp,%rbx,4)
ff
add    $0x1,%rbx
cmp    $0x64,%rbx
je     11f3 <main+0xb3>
mov    0x10(%rsp,%rbx,4),%ebp
test   %ebp,%ebp
je     11c0 <main+0x80>
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%ebp
jne    11e0 <main+0xa0>
jmp    11c0 <main+0x80>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x1a0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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