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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2625a20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x2625a10(%rbp),%rdi
xor    %esi,%esi
mov    $0x2625a00,%edx
call   1040 <memset@plt>
movl   $0x0,-0x2625a14(%rbp)
movl   $0x989680,-0x2625a18(%rbp)
mov    -0x2625a14(%rbp),%eax
cmp    -0x2625a18(%rbp),%eax
jge    11dd <main+0xad>
mov    0x2e5f(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x2625a20(%rbp)
mov    -0x2625a14(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x2625a14(%rbp)
cltq
lea    -0x2625a10(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe45(%rip),%rdi
call   1050 <scanf@plt>
mov    %rax,%rcx
mov    -0x2625a20(%rbp),%rax
cmp    %rcx,%rax
jne    11d8 <main+0xa8>
jmp    11dd <main+0xad>
jmp    1170 <main+0x40>
movl   $0x0,-0x2625a14(%rbp)
mov    -0x2625a14(%rbp),%eax
cmp    -0x2625a18(%rbp),%eax
jge    1227 <main+0xf7>
movslq -0x2625a14(%rbp),%rax
mov    -0x2625a10(%rbp,%rax,4),%esi
lea    0xdf5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x2625a14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2625a14(%rbp)
jmp    11e7 <main+0xb7>
xor    %eax,%eax
add    $0x2625a20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2625a00,%rsp
mov    %rsp,%rdi
xor    %r12d,%r12d
mov    $0x2625a00,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    0x2e8f(%rip),%r14
lea    0xea0(%rip),%r15
lea    0x4(%r12),%rbx
cmp    $0x2625a04,%rbx
je     1185 <main+0x55>
mov    (%r14),%r13
lea    (%rsp,%r12,1),%rsi
mov    %r15,%rdi
call   1050 <scanf@plt>
mov    %rbx,%r12
cmp    %rax,%r13
jne    1160 <main+0x30>
xor    %ebx,%ebx
lea    0xe75(%rip),%r14
xchg   %ax,%ax
mov    (%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    $0x989680,%rbx
jne    1190 <main+0x60>
xor    %eax,%eax
add    $0x2625a00,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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