#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 arr[30], i, j, num, temp;
  scanf("%d", &num);
  for (i = 0; i < num; i++) {
    scanf("%d", &arr[i]);
  }
  j = i - 1;
  i = 0;
  while (i < j) {
    temp = arr[i];
    arr[i] = arr[j];
    arr[j] = temp;
    i++;
    j--;
  }
  for (i = 0; i < num; i++) {
    printf("%d \n", arr[i]);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x8c(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1193 <main+0x73>
movslq -0x84(%rbp),%rax
lea    -0x80(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe86(%rip),%rdi
call   1040 <scanf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    114f <main+0x2f>
mov    -0x84(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x88(%rbp)
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x88(%rbp),%eax
jge    1219 <main+0xf9>
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%eax
mov    %eax,-0x90(%rbp)
movslq -0x88(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%ecx
movslq -0x84(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x90(%rbp),%ecx
movslq -0x88(%rbp),%rax
mov    %ecx,-0x80(%rbp,%rax,4)
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
mov    -0x88(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x88(%rbp)
jmp    11ac <main+0x8c>
movl   $0x0,-0x84(%rbp)
mov    -0x84(%rbp),%eax
cmp    -0x8c(%rbp),%eax
jge    1260 <main+0x140>
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,4),%esi
lea    0xdbc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1223 <main+0x103>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x90,%rsp
lea    0xecd(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0xc(%rsp)
jle    11da <main+0xba>
lea    0x10(%rsp),%rbx
xor    %r15d,%r15d
lea    0xea9(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1040 <scanf@plt>
add    $0x1,%r15
movslq 0xc(%rsp),%rax
add    $0x4,%rbx
cmp    %rax,%r15
jl     1160 <main+0x40>
cmp    $0x2,%r15d
jl     11b2 <main+0x92>
add    $0xfffffffffffffffe,%r15
xor    %ecx,%ecx
nopl   0x0(%rax)
mov    0x10(%rsp,%rcx,4),%edx
mov    0x14(%rsp,%r15,4),%esi
mov    %esi,0x10(%rsp,%rcx,4)
mov    %edx,0x14(%rsp,%r15,4)
add    $0x1,%rcx
lea    -0x1(%r15),%rdx
cmp    %r15,%rcx
mov    %rdx,%r15
jl     1190 <main+0x70>
test   %eax,%eax
jle    11da <main+0xba>
xor    %ebx,%ebx
lea    0xe44(%rip),%r14
nop
mov    0x10(%rsp,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
movslq 0xc(%rsp),%rax
cmp    %rax,%rbx
jl     11c0 <main+0xa0>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [5 x i8] c"%d \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i32]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
store i32 0, i32* %3
br label %8
8: ; preds = %17, %0
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %20
12: ; preds = %8
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %14
%16 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %3
%19 = add nsw i32 %18, 1
store i32 %19, i32* %3
br label %8
20: ; preds = %8
%21 = load i32, i32* %3
%22 = sub nsw i32 %21, 1
store i32 %22, i32* %4
store i32 0, i32* %3
br label %23
23: ; preds = %27, %20
%24 = load i32, i32* %3
%25 = load i32, i32* %4
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %47
27: ; preds = %23
%28 = load i32, i32* %3
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %29
%31 = load i32, i32* %30
store i32 %31, i32* %6
%32 = load i32, i32* %4
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = load i32, i32* %3
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %37
store i32 %35, i32* %38
%39 = load i32, i32* %6
%40 = load i32, i32* %4
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %41
store i32 %39, i32* %42
%43 = load i32, i32* %3
%44 = add nsw i32 %43, 1
store i32 %44, i32* %3
%45 = load i32, i32* %4
%46 = add nsw i32 %45, -1
store i32 %46, i32* %4
br label %23
47: ; preds = %23
store i32 0, i32* %3
br label %48
48: ; preds = %58, %47
%49 = load i32, i32* %3
%50 = load i32, i32* %5
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %61
52: ; preds = %48
%53 = load i32, i32* %3
%54 = sext i32 %53 to i64
%55 = getelementptr inbounds [30 x i32], [30 x i32]* %2, i64 0, i64 %54
%56 = load i32, i32* %55
%57 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %56)
br label %58
58: ; preds = %52
%59 = load i32, i32* %3
%60 = add nsw i32 %59, 1
store i32 %60, i32* %3
br label %48
61: ; preds = %48
ret i32 0
}

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