#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 EOF;
int getchar();
int *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int scanf(char *, int *);
int main() {
  int n;
  int ret = scanf("%d", &n);
  int *valores;
  if (ret != 1) {
    printf("0\n");
    return 1;
  } else {
    valores = malloc(n * sizeof(int));
    for (int i = 0; i < n; i++) {
      if (scanf("%d", &valores[i]) != 1)
        valores[i] = 885444751;
      int c;
      while ((c = getchar()) != '\n' && c != EOF) {
      }
    }
  }
  for (int i = 0; i < n; i++)
    printf("%d\n", valores[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
je     1186 <main+0x46>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1277 <main+0x137>
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1238 <main+0xf8>
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe3e(%rip),%rdi
call   1060 <scanf@plt>
cmp    $0x1,%eax
je     11df <main+0x9f>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movl   $0x34c6d08f,(%rax,%rcx,4)
jmp    11e4 <main+0xa4>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,%ecx
mov    %ecx,-0x20(%rbp)
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x25(%rbp)
je     1210 <main+0xd0>
mov    -0x20(%rbp),%eax
mov    0x2de0(%rip),%rcx
cmp    (%rcx),%eax
setne  %al
mov    %al,-0x25(%rbp)
mov    -0x25(%rbp),%al
test   $0x1,%al
jne    1220 <main+0xe0>
jmp    1225 <main+0xe5>
jmp    11e4 <main+0xa4>
jmp    122a <main+0xea>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a0 <main+0x60>
jmp    123d <main+0xfd>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1277 <main+0x137>
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1244 <main+0x104>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
lea    0xe9c(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1070 <scanf@plt>
cmp    $0x1,%eax
jne    11f2 <main+0xa2>
mov    0xc(%rsp),%ebx
lea    0x0(,%rbx,4),%edi
call   1060 <malloc@plt>
test   %ebx,%ebx
jle    123e <main+0xee>
mov    %rax,%r12
lea    0xe6b(%rip),%r14
mov    0x2e4c(%rip),%rbx
xor    %r13d,%r13d
jmp    11be <main+0x6e>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%r13
movslq 0xc(%rsp),%rax
cmp    %rax,%r13
jge    1206 <main+0xb6>
lea    (%r12,%r13,4),%r15
mov    %r14,%rdi
mov    %r15,%rsi
call   1070 <scanf@plt>
cmp    $0x1,%eax
je     11e0 <main+0x90>
movl   $0x34c6d08f,(%r15)
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xa,%eax
je     11b0 <main+0x60>
cmp    (%rbx),%eax
jne    11e0 <main+0x90>
jmp    11b0 <main+0x60>
lea    0xe0e(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%r14d
jmp    1241 <main+0xf1>
xor    %r14d,%r14d
test   %eax,%eax
jle    1241 <main+0xf1>
lea    0xdef(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    (%r12,%rbx,4),%esi
mov    %r15,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     1220 <main+0xd0>
jmp    1241 <main+0xf1>
xor    %r14d,%r14d
mov    %r14d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i32 0
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [2 x i8] c"0\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
br label %41
7: ; preds = %0
%8 = load i32, i32* %1
%9 = shl i32 %8, 2
%10 = call i32* @malloc(i32 %9)
%11 = icmp sgt i32 %8, 0
br i1 %11, label %14, label %41
12: ; preds = %27
%13 = icmp sgt i32 %29, 0
br i1 %13, label %32, label %41
14: ; preds = %7, %27
%15 = phi i64 [ %28, %27 ], [ 0, %7 ]
%16 = getelementptr inbounds i32, i32* %10, i64 %15
%17 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %16)
%18 = icmp eq i32 %17, 1
br i1 %18, label %20, label %19
19: ; preds = %14
store i32 885444751, i32* %16
br label %20
20: ; preds = %19, %14
br label %21
21: ; preds = %20, %21
%22 = call i32 (...) @getchar()
%23 = icmp ne i32 %22, 10
%24 = load i32, i32* @EOF
%25 = icmp ne i32 %22, %24
%26 = select i1 %23, i1 %25, i1 false
br i1 %26, label %21, label %27
27: ; preds = %21
%28 = add nuw nsw i64 %15, 1
%29 = load i32, i32* %1
%30 = sext i32 %29 to i64
%31 = icmp slt i64 %28, %30
br i1 %31, label %14, label %12
32: ; preds = %12, %32
%33 = phi i64 [ %37, %32 ], [ 0, %12 ]
%34 = getelementptr inbounds i32, i32* %10, i64 %33
%35 = load i32, i32* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %35)
%37 = add nuw nsw i64 %33, 1
%38 = load i32, i32* %1
%39 = sext i32 %38 to i64
%40 = icmp slt i64 %37, %39
br i1 %40, label %32, label %41
41: ; preds = %32, %7, %12, %5
%42 = phi i32 [ 1, %5 ], [ 0, %12 ], [ 0, %7 ], [ 0, %32 ]
ret i32 %42
}