#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*/ aprint(double *, int);
int /*<<< orphan*/ areverse(double *, int);
int /*<<< orphan*/ areversep(double *, int);
int main() {
  double d2[] = {1.0, 2.0, 3.0};
  aprint(d2, 3);
  areverse(d2, 3);
  aprint(d2, 3);
  areversep(d2, 3);
  aprint(d2, 3);
  double d3[] = {1.0, 2.0, 3.0, 4.0};
  aprint(d3, 4);
  areverse(d3, 4);
  aprint(d3, 4);
  areversep(d3, 4);
  aprint(d3, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1030 <areverse@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1040 <areversep@plt>
lea    -0x20(%rbp),%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
mov    0xe73(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xe70(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xe6d(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe6a(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1030 <areverse@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1040 <areversep@plt>
lea    -0x40(%rbp),%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
mov    0xed4(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1030 <areverse@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1040 <areversep@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
call   1050 <aprint@plt>
movaps 0xe99(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe7d(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
lea    0x20(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <areverse@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1040 <areversep@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1050 <aprint@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.d2 = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@__const.main.d3 = [4 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x double]
%3 = alloca [4 x double]
store i32 0, i32* %1
%4 = bitcast [3 x double]* %2 to i8*
%5 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%6 = call i32 @aprint(double* %5, i32 3)
%7 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%8 = call i32 @areverse(double* %7, i32 3)
%9 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%10 = call i32 @aprint(double* %9, i32 3)
%11 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%12 = call i32 @areversep(double* %11, i32 3)
%13 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%14 = call i32 @aprint(double* %13, i32 3)
%15 = bitcast [4 x double]* %3 to i8*
%16 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%17 = call i32 @aprint(double* %16, i32 4)
%18 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%19 = call i32 @areverse(double* %18, i32 4)
%20 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%21 = call i32 @aprint(double* %20, i32 4)
%22 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%23 = call i32 @areversep(double* %22, i32 4)
%24 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%25 = call i32 @aprint(double* %24, i32 4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.d2 = [3 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00]
@__const.main.d3 = [4 x double] [double 1.000000e+00, double 2.000000e+00, double 3.000000e+00, double 4.000000e+00]
define i32 @main() {
%1 = alloca [3 x double]
%2 = alloca [4 x double]
%3 = bitcast [3 x double]* %1 to i8*
%4 = getelementptr inbounds [3 x double], [3 x double]* %1, i64 0, i64 0
%5 = call i32 @aprint(double* %4, i32 3)
%6 = call i32 @areverse(double* %4, i32 3)
%7 = call i32 @aprint(double* %4, i32 3)
%8 = call i32 @areversep(double* %4, i32 3)
%9 = call i32 @aprint(double* %4, i32 3)
%10 = bitcast [4 x double]* %2 to i8*
%11 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%12 = call i32 @aprint(double* %11, i32 4)
%13 = call i32 @areverse(double* %11, i32 4)
%14 = call i32 @aprint(double* %11, i32 4)
%15 = call i32 @areversep(double* %11, i32 4)
%16 = call i32 @aprint(double* %11, i32 4)
ret i32 0
}