#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);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int X[21], i = 19;
  while (i >= 0) {
    scanf(" %d", &X[i]);
    i--;
  }
  i = 0;
  while (i < 20) {
    printf("N[%d] = %d\n", i, X[i]);
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x13,-0x64(%rbp)
cmpl   $0x0,-0x64(%rbp)
jl     1169 <main+0x49>
movslq -0x64(%rbp),%rax
lea    -0x60(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xeaa(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x64(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x64(%rbp)
jmp    1136 <main+0x16>
movl   $0x0,-0x64(%rbp)
cmpl   $0x14,-0x64(%rbp)
jge    119f <main+0x7f>
mov    -0x64(%rbp),%esi
movslq -0x64(%rbp),%rax
mov    -0x60(%rbp,%rax,4),%edx
lea    0xe78(%rip),%rdi
call   1030 <printf@plt>
mov    -0x64(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x64(%rbp)
jmp    1170 <main+0x50>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
lea    0x4c(%rsp),%rsi
lea    0xecf(%rip),%rbx
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x48(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x44(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x40(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x38(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x34(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x30(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x2c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x24(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x20(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x1c(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x18(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    (%rsp),%edx
lea    0xdcc(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <printf@plt>
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    0x8(%rsp),%edx
mov    %rbx,%rdi
mov    $0x2,%esi
call   1030 <printf@plt>
mov    0xc(%rsp),%edx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    0x10(%rsp),%edx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
mov    0x14(%rsp),%edx
mov    %rbx,%rdi
mov    $0x5,%esi
call   1030 <printf@plt>
mov    0x18(%rsp),%edx
mov    %rbx,%rdi
mov    $0x6,%esi
call   1030 <printf@plt>
mov    0x1c(%rsp),%edx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <printf@plt>
mov    0x20(%rsp),%edx
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
mov    0x24(%rsp),%edx
mov    %rbx,%rdi
mov    $0x9,%esi
call   1030 <printf@plt>
mov    0x28(%rsp),%edx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <printf@plt>
mov    0x2c(%rsp),%edx
mov    %rbx,%rdi
mov    $0xb,%esi
call   1030 <printf@plt>
mov    0x30(%rsp),%edx
mov    %rbx,%rdi
mov    $0xc,%esi
call   1030 <printf@plt>
mov    0x34(%rsp),%edx
mov    %rbx,%rdi
mov    $0xd,%esi
call   1030 <printf@plt>
mov    0x38(%rsp),%edx
mov    %rbx,%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
mov    0x3c(%rsp),%edx
mov    %rbx,%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
mov    0x40(%rsp),%edx
mov    %rbx,%rdi
mov    $0x10,%esi
call   1030 <printf@plt>
mov    0x44(%rsp),%edx
mov    %rbx,%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
mov    0x48(%rsp),%edx
mov    %rbx,%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
mov    0x4c(%rsp),%edx
mov    %rbx,%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %d\00"
@.str.1 = [12 x i8] c"N[%d] = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [21 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 19, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [21 x i32], [21 x i32]* %2, i64 0, i64 %9
%11 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %10)
%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 = %18, %14
%16 = load i32, i32* %3
%17 = icmp slt i32 %16, 20
br i1 %17, label %18, label %27
18: ; preds = %15
%19 = load i32, i32* %3
%20 = load i32, i32* %3
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [21 x i32], [21 x i32]* %2, i64 0, i64 %21
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %23)
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %15
27: ; preds = %15
ret i32 0
}

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