#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*/ getArray(int *, unsigned int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printArray(int *, unsigned int);
int /*<<< orphan*/ reverseArray(int *, unsigned int);
int /*<<< orphan*/ scanf(char *, unsigned int *);
void main(void) {
  unsigned N;
  scanf("%u", &N);
  getchar();
  unsigned count;
  unsigned i;
  int array[120] = {0};
  for (; N; --N) {
    scanf("%u", &count);
    getchar();
    getArray(array, count);
    reverseArray(array, count);
    printArray(array, count);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f0,%rsp
lea    0xe8e(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    -0x1f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x1e0,%edx
call   1030 <memset@plt>
cmpl   $0x0,-0x4(%rbp)
je     11f1 <main+0x91>
lea    0xe5a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    -0x1f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <getArray@plt>
lea    -0x1f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1080 <reverseArray@plt>
lea    -0x1f0(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1070 <printArray@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1195 <main+0x35>
add    $0x1f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1f0,%rsp
lea    0xe8d(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
lea    0x10(%rsp),%rdi
mov    $0x1e0,%edx
xor    %esi,%esi
call   1030 <memset@plt>
cmpl   $0x0,0xc(%rsp)
je     11ed <main+0x8d>
lea    0xe5d(%rip),%r14
lea    0x8(%rsp),%r15
lea    0x10(%rsp),%rbx
nopl   (%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1060 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1050 <getArray@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1080 <reverseArray@plt>
mov    0x8(%rsp),%esi
mov    %rbx,%rdi
call   1070 <printArray@plt>
addl   $0xffffffff,0xc(%rsp)
jne    11b0 <main+0x50>
add    $0x1f0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%u\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [120 x i32]
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (...) @getchar()
%7 = bitcast [120 x i32]* %4 to i8*
br label %8
8: ; preds = %23, %0
%9 = load i32, i32* %1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %26
11: ; preds = %8
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%13 = call i32 (...) @getchar()
%14 = getelementptr inbounds [120 x i32], [120 x i32]* %4, i64 0, i64 0
%15 = load i32, i32* %2
%16 = call i32 @getArray(i32* %14, i32 %15)
%17 = getelementptr inbounds [120 x i32], [120 x i32]* %4, i64 0, i64 0
%18 = load i32, i32* %2
%19 = call i32 @reverseArray(i32* %17, i32 %18)
%20 = getelementptr inbounds [120 x i32], [120 x i32]* %4, i64 0, i64 0
%21 = load i32, i32* %2
%22 = call i32 @printArray(i32* %20, i32 %21)
br label %23
23: ; preds = %11
%24 = load i32, i32* %1
%25 = add i32 %24, -1
store i32 %25, i32* %1
br label %8
26: ; preds = %8
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [120 x i32]
%4 = bitcast i32* %1 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 (...) @getchar()
%7 = bitcast i32* %2 to i8*
%8 = bitcast [120 x i32]* %3 to i8*
%9 = load i32, i32* %1
%10 = icmp eq i32 %9, 0
br i1 %10, label %25, label %11
11: ; preds = %0
%12 = getelementptr inbounds [120 x i32], [120 x i32]* %3, i64 0, i64 0
br label %13
13: ; preds = %11, %13
%14 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%15 = call i32 (...) @getchar()
%16 = load i32, i32* %2
%17 = call i32 @getArray(i32* %12, i32 %16)
%18 = load i32, i32* %2
%19 = call i32 @reverseArray(i32* %12, i32 %18)
%20 = load i32, i32* %2
%21 = call i32 @printArray(i32* %12, i32 %20)
%22 = load i32, i32* %1
%23 = add i32 %22, -1
store i32 %23, i32* %1
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %13
25: ; preds = %13, %0
ret void
}