#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 a[50];
  int n, i;
  scanf("%d", &n);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  for (i = 1; i <= n; i++) {
    printf("\n%d", a[n - i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec8(%rip),%rdi
lea    -0xd4(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jge    1196 <main+0x76>
movslq -0xd8(%rbp),%rax
lea    -0xd0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe84(%rip),%rdi
call   1040 <scanf@plt>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    114f <main+0x2f>
movl   $0x1,-0xd8(%rbp)
mov    -0xd8(%rbp),%eax
cmp    -0xd4(%rbp),%eax
jg     11e7 <main+0xc7>
mov    -0xd4(%rbp),%eax
sub    -0xd8(%rbp),%eax
cltq
mov    -0xd0(%rbp,%rax,4),%esi
lea    0xe32(%rip),%rdi
call   1030 <printf@plt>
mov    -0xd8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd8(%rbp)
jmp    11a0 <main+0x80>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0xe0,%rsp
lea    0xecf(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11c0 <main+0xa0>
lea    0x10(%rsp),%rbx
xor    %ebp,%ebp
lea    0xeb0(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
add    $0x1,%rbp
movslq 0xc(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%rbp
jl     1160 <main+0x40>
test   %eax,%eax
jle    11c0 <main+0xa0>
xor    %ebp,%ebp
mov    $0xffffffffffffffff,%rbx
lea    0xe6f(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cltq
add    %rbx,%rax
mov    0x10(%rsp,%rax,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0xc(%rsp),%eax
add    $0x1,%ebp
add    $0xffffffffffffffff,%rbx
cmp    %ebp,%eax
jg     11a0 <main+0x80>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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