#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(void) {
  int i;
  int flag[10] = {0};
  for (i = 0; i < 10; i++) {
    int n;
    scanf("%d", &n);
    flag[n] = 1;
  }
  int j;
  for (j = 0; j < 10; j++) {
    if (flag[j] == 0) {
      printf("%d", j);
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    118a <main+0x5a>
lea    0xe99(%rip),%rdi
lea    -0x34(%rbp),%rsi
call   1050 <scanf@plt>
movslq -0x34(%rbp),%rax
movl   $0x1,-0x30(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x26>
movl   $0x0,-0x38(%rbp)
cmpl   $0xa,-0x38(%rbp)
jge    11cc <main+0x9c>
movslq -0x38(%rbp),%rax
cmpl   $0x0,-0x30(%rbp,%rax,4)
jne    11b9 <main+0x89>
mov    -0x38(%rbp),%esi
lea    0xe4c(%rip),%rdi
call   1030 <printf@plt>
jmp    11be <main+0x8e>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    1191 <main+0x61>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movq   $0x0,0x30(%rsp)
lea    0xebc(%rip),%rbx
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
movl   $0x1,0x10(%rsp,%rax,4)
cmpl   $0x0,0x10(%rsp)
je     12a9 <main+0x189>
cmpl   $0x0,0x14(%rsp)
je     12be <main+0x19e>
cmpl   $0x0,0x18(%rsp)
je     12da <main+0x1ba>
cmpl   $0x0,0x1c(%rsp)
je     12f6 <main+0x1d6>
cmpl   $0x0,0x20(%rsp)
je     1312 <main+0x1f2>
cmpl   $0x0,0x24(%rsp)
je     132e <main+0x20e>
cmpl   $0x0,0x28(%rsp)
je     134a <main+0x22a>
cmpl   $0x0,0x2c(%rsp)
je     1366 <main+0x246>
cmpl   $0x0,0x30(%rsp)
je     1382 <main+0x262>
cmpl   $0x0,0x34(%rsp)
je     139e <main+0x27e>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret
lea    0xd50(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x14(%rsp)
jne    1247 <main+0x127>
lea    0xd3b(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x18(%rsp)
jne    1252 <main+0x132>
lea    0xd1f(%rip),%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x1c(%rsp)
jne    125d <main+0x13d>
lea    0xd03(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x20(%rsp)
jne    1268 <main+0x148>
lea    0xce7(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x24(%rsp)
jne    1273 <main+0x153>
lea    0xccb(%rip),%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x28(%rsp)
jne    127e <main+0x15e>
lea    0xcaf(%rip),%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x2c(%rsp)
jne    1289 <main+0x169>
lea    0xc93(%rip),%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x30(%rsp)
jne    1294 <main+0x174>
lea    0xc77(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
cmpl   $0x0,0x34(%rsp)
jne    129f <main+0x17f>
lea    0xc5b(%rip),%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
jmp    129f <main+0x17f>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca i32
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %7
store i32 1, i32* %8
%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 = sext i32 %10 to i64
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %11
store i32 1, i32* %12
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %15
store i32 1, i32* %16
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%18 = load i32, i32* %2
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %19
store i32 1, i32* %20
%21 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%22 = load i32, i32* %2
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %23
store i32 1, i32* %24
%25 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%26 = load i32, i32* %2
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %27
store i32 1, i32* %28
%29 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%30 = load i32, i32* %2
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %31
store i32 1, i32* %32
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%34 = load i32, i32* %2
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %35
store i32 1, i32* %36
%37 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%38 = load i32, i32* %2
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %39
store i32 1, i32* %40
%41 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%42 = load i32, i32* %2
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 %43
store i32 1, i32* %44
%45 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%46 = load i32, i32* %45
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %50
48: ; preds = %0
%49 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
br label %50
50: ; preds = %0, %48
%51 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 1
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %50
%55 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 1)
br label %56
56: ; preds = %54, %50
%57 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 2
%58 = load i32, i32* %57
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
br label %62
62: ; preds = %60, %56
%63 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 3
%64 = load i32, i32* %63
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %62
%67 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
br label %68
68: ; preds = %66, %62
%69 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 4
%70 = load i32, i32* %69
%71 = icmp eq i32 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %68
%73 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 4)
br label %74
74: ; preds = %72, %68
%75 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 5
%76 = load i32, i32* %75
%77 = icmp eq i32 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 5)
br label %80
80: ; preds = %78, %74
%81 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 6
%82 = load i32, i32* %81
%83 = icmp eq i32 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %80
%85 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
br label %86
86: ; preds = %84, %80
%87 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 7
%88 = load i32, i32* %87
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %86
%91 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 7)
br label %92
92: ; preds = %90, %86
%93 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 8
%94 = load i32, i32* %93
%95 = icmp eq i32 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %92
%97 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 8)
br label %98
98: ; preds = %96, %92
%99 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 9
%100 = load i32, i32* %99
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %98
%103 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 9)
br label %104
104: ; preds = %102, %98
ret i32 0
}