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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x980,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x978(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x974(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x978(%rbp),%eax
cmp    -0x974(%rbp),%eax
jge    1196 <main+0x76>
movslq -0x978(%rbp),%rax
lea    -0x970(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe83(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x978(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x978(%rbp)
jmp    114f <main+0x2f>
jmp    119b <main+0x7b>
cmpl   $0x0,-0x978(%rbp)
jle    11da <main+0xba>
mov    -0x978(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x970(%rbp,%rax,4),%esi
lea    0xe42(%rip),%rdi
call   1030 <printf@plt>
mov    -0x978(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x978(%rbp)
jmp    119b <main+0x7b>
mov    -0x4(%rbp),%eax
add    $0x980,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x970,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11a6 <main+0x86>
lea    0x10(%rsp),%r15
xor    %ebx,%ebx
lea    0xeae(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <scanf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
add    $0x4,%r15
cmp    %rax,%rbx
jl     1160 <main+0x40>
test   %ebx,%ebx
jle    11a6 <main+0x86>
add    $0x1,%rbx
lea    0xe77(%rip),%r14
nopl   0x0(%rax)
mov    0x8(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1190 <main+0x70>
xor    %eax,%eax
add    $0x970,%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 [600 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %6
6: ; preds = %10, %0
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %17
10: ; preds = %6
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [600 x i32], [600 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)
%15 = load i32, i32* %4
%16 = add nsw i32 %15, 1
store i32 %16, i32* %4
br label %6
17: ; preds = %6
br label %18
18: ; preds = %21, %17
%19 = load i32, i32* %4
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %30
21: ; preds = %18
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [600 x i32], [600 x i32]* %2, i64 0, i64 %24
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %26)
%28 = load i32, i32* %4
%29 = add nsw i32 %28, -1
store i32 %29, i32* %4
br label %18
30: ; preds = %18
%31 = load i32, i32* %1
ret i32 %31
}

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