#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 /*<<< orphan*/ scanf(char *, int *);
int main() {
  int q, m = 0;
  scanf("%d", &q);
  int help = q;
  int o[555];
  int i = 0;
  while (i < q) {
    scanf("%d", &m);
    o[i + 1] = m;
    i++;
  }
  o[q + 1] = '\0';
  do {
    printf("%d\n", o[help]);
    help--;
  } while (help > 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8d0,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8c4(%rbp)
mov    -0x8c4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11a1 <main+0x81>
lea    0xe91(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%ecx
mov    -0x8c4(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x8c0(%rbp,%rax,4)
mov    -0x8c4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8c4(%rbp)
jmp    1159 <main+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x0,-0x8c0(%rbp,%rax,4)
movslq -0x10(%rbp),%rax
mov    -0x8c0(%rbp,%rax,4),%esi
lea    0xe3d(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jg     11b4 <main+0x94>
xor    %eax,%eax
add    $0x8d0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x8c8,%rsp
movl   $0x0,0x8(%rsp)
lea    0xec3(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%r12
test   %r12,%r12
jle    1183 <main+0x63>
xor    %ebx,%ebx
lea    0xea6(%rip),%r14
lea    0x8(%rsp),%r15
nop
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
mov    0x8(%rsp),%eax
mov    %eax,0x14(%rsp,%rbx,4)
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     1160 <main+0x40>
jmp    1186 <main+0x66>
mov    %r12d,%eax
cltq
movl   $0x0,0x14(%rsp,%rax,4)
add    $0x1,%r12
lea    0xe68(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    0xc(%rsp,%r12,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%r12
cmp    $0x1,%r12
jg     11a0 <main+0x80>
xor    %eax,%eax
add    $0x8c8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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