#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 num, j = 0, s[1234];
  scanf("%d", &num);
  for (int k = 0; k < num; k++) {
    scanf("%d", &j);
    s[k + 1] = j;
  }
  s[num + 1] = '\0';
  int z = num;
  while (z > 0) {
    printf("%d\n", s[z]);
    z--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1370,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xec0(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x1364(%rbp)
mov    -0x1364(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    119b <main+0x7b>
lea    0xe97(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0xc(%rbp),%ecx
mov    -0x1364(%rbp),%eax
add    $0x1,%eax
cltq
mov    %ecx,-0x1360(%rbp,%rax,4)
mov    -0x1364(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1364(%rbp)
jmp    1153 <main+0x33>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
cltq
movl   $0x0,-0x1360(%rbp,%rax,4)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1368(%rbp)
cmpl   $0x0,-0x1368(%rbp)
jle    11f2 <main+0xd2>
movslq -0x1368(%rbp),%rax
mov    -0x1360(%rbp,%rax,4),%esi
lea    0xe2a(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1368(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1368(%rbp)
jmp    11b7 <main+0x97>
xor    %eax,%eax
add    $0x1370,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1360,%rsp
movl   $0x0,0x8(%rsp)
lea    0xec5(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0xc(%rsp),%rax
test   %rax,%rax
jle    11b8 <main+0x98>
xor    %ebx,%ebx
lea    0xea8(%rip),%r14
lea    0x8(%rsp),%r15
nopl   (%rax)
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>
movl   $0x0,0x14(%rsp,%rax,4)
test   %eax,%eax
jle    11c0 <main+0xa0>
mov    %eax,%ebx
add    $0x1,%rbx
lea    0xe69(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    0xc(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     11a0 <main+0x80>
jmp    11c0 <main+0xa0>
movl   $0x0,0x14(%rsp,%rax,4)
xor    %eax,%eax
add    $0x1360,%rsp
pop    %rbx
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 [1234 x i32]
%5 = alloca 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)
store i32 0, i32* %5
br label %8
8: ; preds = %19, %0
%9 = load i32, i32* %5
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %22
12: ; preds = %8
%13 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = add nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [1234 x i32], [1234 x i32]* %4, i64 0, i64 %17
store i32 %14, i32* %18
br label %19
19: ; preds = %12
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 1
store i32 %21, i32* %5
br label %8
22: ; preds = %8
%23 = load i32, i32* %2
%24 = add nsw i32 %23, 1
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds [1234 x i32], [1234 x i32]* %4, i64 0, i64 %25
store i32 0, i32* %26
%27 = load i32, i32* %2
store i32 %27, i32* %6
br label %28
28: ; preds = %31, %22
%29 = load i32, i32* %6
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %39
31: ; preds = %28
%32 = load i32, i32* %6
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [1234 x i32], [1234 x i32]* %4, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %6
%38 = add nsw i32 %37, -1
store i32 %38, i32* %6
br label %28
39: ; preds = %28
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 [1234 x i32]
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%6 = bitcast [1234 x i32]* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%8 = load i32, i32* %1
%9 = icmp sgt i32 %8, 0
br i1 %9, label %21, label %10
10: ; preds = %0
%11 = add nsw i32 %8, 1
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [1234 x i32], [1234 x i32]* %3, i64 0, i64 %12
store i32 0, i32* %13
br label %37
14: ; preds = %21
%15 = add nsw i32 %27, 1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [1234 x i32], [1234 x i32]* %3, i64 0, i64 %16
store i32 0, i32* %17
%18 = icmp sgt i32 %27, 0
br i1 %18, label %19, label %37
19: ; preds = %14
%20 = zext i32 %27 to i64
br label %30
21: ; preds = %0, %21
%22 = phi i64 [ %25, %21 ], [ 0, %0 ]
%23 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%24 = load i32, i32* %2
%25 = add nuw nsw i64 %22, 1
%26 = getelementptr inbounds [1234 x i32], [1234 x i32]* %3, i64 0, i64 %25
store i32 %24, i32* %26
%27 = load i32, i32* %1
%28 = sext i32 %27 to i64
%29 = icmp slt i64 %25, %28
br i1 %29, label %21, label %14
30: ; preds = %19, %30
%31 = phi i64 [ %20, %19 ], [ %35, %30 ]
%32 = getelementptr inbounds [1234 x i32], [1234 x i32]* %3, i64 0, i64 %31
%33 = load i32, i32* %32
%34 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %33)
%35 = add nsw i64 %31, -1
%36 = icmp ugt i64 %31, 1
br i1 %36, label %30, label %37
37: ; preds = %30, %10, %14
ret i32 0
}