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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xfc0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0xfb8(%rbp)
cmpl   $0x3e8,-0xfb8(%rbp)
jg     1182 <main+0x52>
movslq -0xfb8(%rbp),%rax
movl   $0x0,-0xfb0(%rbp,%rax,4)
mov    -0xfb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfb8(%rbp)
jmp    114c <main+0x1c>
lea    0xe77(%rip),%rdi
lea    -0xfb4(%rbp),%rsi
call   1050 <scanf@plt>
movl   $0x1,-0xfb8(%rbp)
mov    -0xfb8(%rbp),%eax
cmp    -0xfb4(%rbp),%eax
jg     11ea <main+0xba>
lea    0xe48(%rip),%rdi
lea    -0xfbc(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0xfbc(%rbp),%rax
movl   $0x1,-0xfb0(%rbp,%rax,4)
mov    -0xfb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfb8(%rbp)
jmp    119f <main+0x6f>
movl   $0x1,-0xfb8(%rbp)
cmpl   $0x3e8,-0xfb8(%rbp)
jg     1244 <main+0x114>
movslq -0xfb8(%rbp),%rax
cmpl   $0x1,-0xfb0(%rbp,%rax,4)
01
jne    122b <main+0xfb>
mov    -0xfb8(%rbp),%esi
lea    0xddd(%rip),%rdi
call   1030 <printf@plt>
jmp    1230 <main+0x100>
mov    -0xfb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfb8(%rbp)
jmp    11f4 <main+0xc4>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0xfc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xfc0,%rsp
lea    0x14(%rsp),%rdi
xor    %ebp,%ebp
mov    $0xfa0,%edx
xor    %esi,%esi
call   1040 <memset@plt>
lea    0xe9b(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
cmpl   $0x0,0x8(%rsp)
jle    11b1 <main+0x71>
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
movl   $0x1,0x10(%rsp,%rax,4)
add    $0x1,%ebp
cmp    0x8(%rsp),%ebp
jl     1190 <main+0x50>
mov    $0x1,%ebx
lea    0xe46(%rip),%r14
jmp    11cd <main+0x8d>
nop
add    $0x1,%rbx
cmp    $0x3e9,%rbx
je     11e0 <main+0xa0>
cmpl   $0x1,0x10(%rsp,%rbx,4)
jne    11c0 <main+0x80>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    11c0 <main+0x80>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
call   1050 <getchar@plt>
xor    %eax,%eax
add    $0xfc0,%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"
define i32 @main() {
%1 = alloca i32
%2 = alloca [1001 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %4
br label %6
6: ; preds = %13, %0
%7 = load i32, i32* %4
%8 = icmp sle i32 %7, 1000
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load i32, i32* %4
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [1001 x i32], [1001 x i32]* %2, i64 0, i64 %11
store i32 0, i32* %12
br label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = add nsw i32 %14, 1
store i32 %15, i32* %4
br label %6
16: ; preds = %6
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
store i32 1, i32* %4
br label %18
18: ; preds = %27, %16
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = icmp sle i32 %19, %20
br i1 %21, label %22, label %30
22: ; preds = %18
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%24 = load i32, i32* %5
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [1001 x i32], [1001 x i32]* %2, i64 0, i64 %25
store i32 1, i32* %26
br label %27
27: ; preds = %22
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %18
30: ; preds = %18
store i32 1, i32* %4
br label %31
31: ; preds = %44, %30
%32 = load i32, i32* %4
%33 = icmp sle i32 %32, 1000
br i1 %33, label %34, label %47
34: ; preds = %31
%35 = load i32, i32* %4
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [1001 x i32], [1001 x i32]* %2, i64 0, i64 %36
%38 = load i32, i32* %37
%39 = icmp eq i32 %38, 1
br i1 %39, label %40, label %43
40: ; preds = %34
%41 = load i32, i32* %4
%42 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %40, %34
br label %44
44: ; preds = %43
%45 = load i32, i32* %4
%46 = add nsw i32 %45, 1
store i32 %46, i32* %4
br label %31
47: ; preds = %31
%48 = call i32 (...) @getchar()
%49 = call i32 (...) @getchar()
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 [1001 x i32]
%2 = alloca i32
%3 = alloca i32
%4 = bitcast [1001 x i32]* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = getelementptr inbounds [1001 x i32], [1001 x i32]* %1, i64 0, i64 1
%8 = bitcast i32* %7 to i8*
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%10 = load i32, i32* %2
%11 = icmp slt i32 %10, 1
br i1 %11, label %21, label %12
12: ; preds = %0, %12
%13 = phi i32 [ %18, %12 ], [ 1, %0 ]
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [1001 x i32], [1001 x i32]* %1, i64 0, i64 %16
store i32 1, i32* %17
%18 = add nuw nsw i32 %13, 1
%19 = load i32, i32* %2
%20 = icmp slt i32 %13, %19
br i1 %20, label %12, label %21
21: ; preds = %12, %0
br label %22
22: ; preds = %21, %30
%23 = phi i64 [ %31, %30 ], [ 1, %21 ]
%24 = getelementptr inbounds [1001 x i32], [1001 x i32]* %1, i64 0, i64 %23
%25 = load i32, i32* %24
%26 = icmp eq i32 %25, 1
br i1 %26, label %27, label %30
27: ; preds = %22
%28 = trunc i64 %23 to i32
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %28)
br label %30
30: ; preds = %22, %27
%31 = add nuw nsw i64 %23, 1
%32 = icmp eq i64 %31, 1001
br i1 %32, label %33, label %22
33: ; preds = %30
%34 = call i32 (...) @getchar()
%35 = call i32 (...) @getchar()
ret i32 0
}