#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 */
scalar_t__ EOF;
int /*<<< orphan*/ clear(int);
int /*<<< orphan*/ printf(char *, int);
scalar_t__ scanf(char *, int *);
int /*<<< orphan*/ set(int);
scalar_t__ test(int);
int main(int argc, char *argv[]) {
  int i, n;
  for (i = 1; i <= 10000000; i++) {
    clear(i);
  }
  while (scanf("%d", &n) != EOF) {
    set(n);
  }
  for (i = 1; i <= 10000000; i++) {
    if (test(i)) {
      printf("%d ", i);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
cmpl   $0x989680,-0x14(%rbp)
jg     1190 <main+0x40>
mov    -0x14(%rbp),%edi
call   1050 <clear@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    116d <main+0x1d>
jmp    1195 <main+0x45>
lea    0xe64(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    0x2e3c(%rip),%rcx
cmp    (%rcx),%rax
je     11c2 <main+0x72>
mov    -0x18(%rbp),%edi
call   1060 <set@plt>
jmp    1195 <main+0x45>
movl   $0x1,-0x14(%rbp)
cmpl   $0x989680,-0x14(%rbp)
jg     120a <main+0xba>
mov    -0x14(%rbp),%edi
call   1070 <test@plt>
cmp    $0x0,%rax
je     11f7 <main+0xa7>
mov    -0x14(%rbp),%esi
lea    0xe11(%rip),%rdi
call   1030 <printf@plt>
jmp    11fc <main+0xac>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c9 <main+0x79>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    $0x1,%ebx
xchg   %ax,%ax
mov    %ebx,%edi
call   1050 <clear@plt>
add    $0x1,%ebx
cmp    $0x989681,%ebx
jne    1160 <main+0x10>
lea    0xe87(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x2e5e(%rip),%r15
cmp    (%r15),%rax
je     11b9 <main+0x69>
lea    0xe6a(%rip),%r14
lea    0xc(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp),%edi
call   1060 <set@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
cmp    (%r15),%rax
jne    11a0 <main+0x50>
mov    $0x1,%ebx
lea    0xe3e(%rip),%r14
jmp    11db <main+0x8b>
nopw   0x0(%rax,%rax,1)
add    $0x1,%ebx
cmp    $0x989681,%ebx
je     11f3 <main+0xa3>
mov    %ebx,%edi
call   1070 <test@plt>
test   %rax,%rax
je     11d0 <main+0x80>
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
jmp    11d0 <main+0x80>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
@.str.1 = [4 x i8] c"%d \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %9
5: ; preds = %9
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %20, label %14
9: ; preds = %2, %9
%10 = phi i32 [ 1, %2 ], [ %12, %9 ]
%11 = tail call i32 @clear(i32 %10)
%12 = add nuw nsw i32 %10, 1
%13 = icmp eq i32 %12, 10000001
br i1 %13, label %5, label %9
14: ; preds = %5, %14
%15 = load i32, i32* %3
%16 = call i32 @set(i32 %15)
%17 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%18 = load i64, i64* @EOF
%19 = icmp eq i64 %17, %18
br i1 %19, label %20, label %14
20: ; preds = %14, %5
br label %21
21: ; preds = %20, %27
%22 = phi i32 [ %28, %27 ], [ 1, %20 ]
%23 = call i64 @test(i32 %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %27, label %25
25: ; preds = %21
%26 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %22)
br label %27
27: ; preds = %21, %25
%28 = add nuw nsw i32 %22, 1
%29 = icmp eq i32 %28, 10000001
br i1 %29, label %30, label %21
30: ; preds = %27
ret i32 0
}