#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 n;
  scanf("%d", &n);
  int a[n], i, count[100];
  for (i = 0; i < 100; i++)
    count[i] = 0;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    count[a[i]]++;
  }
  int j;
  for (i = 0; i < 100; i++)
    for (j = 0; j < count[i]; j++)
      printf("%d ", i);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1c0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x1c0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    119a <main+0x7a>
movslq -0x1c(%rbp),%rax
movl   $0x0,-0x1b0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1173 <main+0x53>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11f9 <main+0xd9>
mov    -0x1c0(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe3a(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x1c0(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movslq (%rax,%rcx,4),%rax
mov    -0x1b0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1b0(%rbp,%rax,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a1 <main+0x81>
movl   $0x0,-0x1c(%rbp)
cmpl   $0x64,-0x1c(%rbp)
jge    1261 <main+0x141>
movl   $0x0,-0x1b4(%rbp)
mov    -0x1b4(%rbp),%eax
movslq -0x1c(%rbp),%rcx
cmp    -0x1b0(%rbp,%rcx,4),%eax
jge    124e <main+0x12e>
mov    -0x1c(%rbp),%esi
lea    0xdce(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1b4(%rbp)
jmp    1214 <main+0xf4>
jmp    1253 <main+0x133>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1200 <main+0xe0>
movl   $0x0,-0x4(%rbp)
mov    -0x10(%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   %r12
push   %rbx
sub    $0x1a0,%rsp
lea    0xeb7(%rip),%rdi
lea    -0x24(%rbp),%rsi
call   1050 <scanf@plt>
mov    %rsp,%r15
mov    -0x24(%rbp),%eax
mov    %rsp,%r12
lea    0xf(,%rax,4),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
lea    -0x1c0(%rbp),%rdi
mov    $0x190,%edx
xor    %esi,%esi
call   1040 <memset@plt>
cmpl   $0x0,-0x24(%rbp)
jle    11b8 <main+0x88>
xor    %ebx,%ebx
lea    0xe71(%rip),%r14
nop
mov    %r14,%rdi
mov    %r12,%rsi
call   1050 <scanf@plt>
movslq (%r12),%rax
addl   $0x1,-0x1c0(%rbp,%rax,4)
01
add    $0x1,%rbx
movslq -0x24(%rbp),%rax
add    $0x4,%r12
cmp    %rax,%rbx
jl     1190 <main+0x60>
xor    %r12d,%r12d
lea    0xe41(%rip),%r14
jmp    11da <main+0xaa>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%r12
cmp    $0x64,%r12
je     1202 <main+0xd2>
mov    -0x1c0(%rbp,%r12,4),%ebx
ff
test   %ebx,%ebx
jle    11d0 <main+0xa0>
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %r12d,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    11f0 <main+0xc0>
jmp    11d0 <main+0xa0>
mov    %r15,%rsp
xor    %eax,%eax
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

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

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 [100 x i32]
%3 = bitcast [100 x i32]* %2 to i8*
%4 = bitcast i32* %1 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = load i32, i32* %1
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
%9 = alloca i32, i64 %7
%10 = load i32, i32* %1
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %25
12: ; preds = %0, %12
%13 = phi i64 [ %21, %12 ], [ 0, %0 ]
%14 = getelementptr inbounds i32, i32* %9, i64 %13
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %14)
%16 = load i32, i32* %14
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %19, 1
store i32 %20, i32* %18
%21 = add nuw nsw i64 %13, 1
%22 = load i32, i32* %1
%23 = sext i32 %22 to i64
%24 = icmp slt i64 %21, %23
br i1 %24, label %12, label %25
25: ; preds = %12, %0
br label %26
26: ; preds = %25, %38
%27 = phi i64 [ %39, %38 ], [ 0, %25 ]
%28 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %27
%29 = load i32, i32* %28
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %38
31: ; preds = %26
%32 = trunc i64 %27 to i32
br label %33
33: ; preds = %31, %33
%34 = phi i32 [ %36, %33 ], [ 0, %31 ]
%35 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %32)
%36 = add nuw nsw i32 %34, 1
%37 = icmp eq i32 %36, %29
br i1 %37, label %38, label %33
38: ; preds = %33, %26
%39 = add nuw nsw i64 %27, 1
%40 = icmp eq i64 %39, 100
br i1 %40, label %41, label %26
41: ; preds = %38
ret i32 0
}