#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);
main() {
  int Getint(int *);
  int array[15];
  int i;
  for (i = 0; i < 15; i++)
    array[i] = 1;
  for (i = 0; i < 15 && Getint(&array[i]) != '\n'; i++)
    ;
  for (i = 0; i < 15; i++)
    printf("%d\n", array[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0xf,-0x44(%rbp)
jge    115a <main+0x3a>
movslq -0x44(%rbp),%rax
movl   $0x1,-0x40(%rbp,%rax,4)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0x44(%rbp)
xor    %eax,%eax
cmpl   $0xf,-0x44(%rbp)
mov    %al,-0x45(%rbp)
jge    118d <main+0x6d>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rdi
shl    $0x2,%rax
add    %rax,%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
setne  %al
mov    %al,-0x45(%rbp)
mov    -0x45(%rbp),%al
test   $0x1,%al
jne    119d <main+0x7d>
jmp    11b0 <main+0x90>
jmp    11a2 <main+0x82>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1161 <main+0x41>
movl   $0x0,-0x44(%rbp)
cmpl   $0xf,-0x44(%rbp)
jge    11e3 <main+0xc3>
movslq -0x44(%rbp),%rax
mov    -0x40(%rbp,%rax,4),%esi
lea    0xe30(%rip),%rdi
call   1040 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11b7 <main+0x97>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movaps 0xed4(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movabs $0x100000001,%rax
mov    %rax,0x30(%rsp)
movl   $0x1,0x38(%rsp)
mov    %rsp,%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x4(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x8(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0xc(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x10(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x14(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x18(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x1c(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x20(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x24(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x28(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x2c(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x30(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x34(%rsp),%rdi
call   1030 <Getint@plt>
cmp    $0xa,%eax
je     1243 <main+0x123>
lea    0x38(%rsp),%rdi
call   1030 <Getint@plt>
mov    (%rsp),%esi
lea    0xdc3(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x4(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x10(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x14(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x18(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x1c(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x20(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x24(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x28(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x2c(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x30(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x34(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
mov    0x38(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

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

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