#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 */
typedef int /*<<< orphan*/ v2;
typedef int /*<<< orphan*/ v1;

/* Variables and functions */
int /*<<< orphan*/ test(int, int, double *, int);
int main(void) {
  double v1[64];
  for (size_t i = 0; i < (sizeof(v1) / sizeof(v1[0])); i++)
    v1[i] = i;
  test(0, 6, v1, (sizeof(v1) / sizeof(v1[0])));
  test(1, 6, v1, (sizeof(v1) / sizeof(v1[0])));
  test(2, 6, v1, (sizeof(v1) / sizeof(v1[0])));
  test(3, 6, v1, (sizeof(v1) / sizeof(v1[0])));
  double v2[] = {3, 3, 3};
  test(0, 2, v2, (sizeof(v2) / sizeof(v2[0])));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x230,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x218(%rbp)
cmpq   $0x40,-0x218(%rbp)
40
jae    118c <main+0x7c>
movaps 0xebe(%rip),%xmm1
movq   -0x218(%rbp),%xmm0
ff
punpckldq %xmm1,%xmm0
movapd 0xeba(%rip),%xmm1
subpd  %xmm1,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
mov    -0x218(%rbp),%rax
movsd  %xmm0,-0x210(%rbp,%rax,8)
ff ff
mov    -0x218(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x218(%rbp)
jmp    112d <main+0x1d>
lea    -0x210(%rbp),%rdx
xor    %edi,%edi
mov    $0x6,%esi
mov    $0x40,%ecx
call   1030 <test@plt>
lea    -0x210(%rbp),%rdx
mov    $0x1,%edi
mov    $0x6,%esi
mov    $0x40,%ecx
call   1030 <test@plt>
lea    -0x210(%rbp),%rdx
mov    $0x2,%edi
mov    $0x6,%esi
mov    $0x40,%ecx
call   1030 <test@plt>
lea    -0x210(%rbp),%rdx
mov    $0x3,%edi
mov    $0x6,%esi
mov    $0x40,%ecx
call   1030 <test@plt>
mov    0xe24(%rip),%rax
mov    %rax,-0x230(%rbp)
mov    0xe1e(%rip),%rax
mov    %rax,-0x228(%rbp)
mov    0xe18(%rip),%rax
mov    %rax,-0x220(%rbp)
lea    -0x230(%rbp),%rdx
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x3,%ecx
call   1030 <test@plt>
xor    %eax,%eax
add    $0x230,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x220,%rsp
xorps  %xmm0,%xmm0
movhps 0xede(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee6(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeea(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeee(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xef6(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xef7(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xef9(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xefa(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xefb(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xefc(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xefe(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xeff(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
movaps 0xf00(%rip),%xmm0
movaps %xmm0,0x120(%rsp)
movaps 0xf01(%rip),%xmm0
movaps %xmm0,0x130(%rsp)
movaps 0xf02(%rip),%xmm0
movaps %xmm0,0x140(%rsp)
movaps 0xf03(%rip),%xmm0
movaps %xmm0,0x150(%rsp)
movaps 0xf04(%rip),%xmm0
movaps %xmm0,0x160(%rsp)
movaps 0xf05(%rip),%xmm0
movaps %xmm0,0x170(%rsp)
movaps 0xf06(%rip),%xmm0
movaps %xmm0,0x180(%rsp)
movaps 0xf07(%rip),%xmm0
movaps %xmm0,0x190(%rsp)
movaps 0xf08(%rip),%xmm0
movaps %xmm0,0x1a0(%rsp)
movaps 0xf09(%rip),%xmm0
movaps %xmm0,0x1b0(%rsp)
movaps 0xf0a(%rip),%xmm0
movaps %xmm0,0x1c0(%rsp)
movaps 0xf0b(%rip),%xmm0
movaps %xmm0,0x1d0(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x1e0(%rsp)
movaps 0xf0d(%rip),%xmm0
movaps %xmm0,0x1f0(%rsp)
movaps 0xf0e(%rip),%xmm0
movaps %xmm0,0x200(%rsp)
movaps 0xf0f(%rip),%xmm0
movaps %xmm0,0x210(%rsp)
lea    0x20(%rsp),%rbx
xor    %edi,%edi
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x40,%ecx
call   1030 <test@plt>
mov    $0x1,%edi
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x40,%ecx
call   1030 <test@plt>
mov    $0x2,%edi
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x40,%ecx
call   1030 <test@plt>
mov    $0x3,%edi
mov    $0x6,%esi
mov    %rbx,%rdx
mov    $0x40,%ecx
call   1030 <test@plt>
mov    0xec2(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xea6(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdx
xor    %edi,%edi
mov    $0x2,%esi
mov    $0x3,%ecx
call   1030 <test@plt>
xor    %eax,%eax
add    $0x220,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.v2 = [3 x double] [double 3.000000e+00, double 3.000000e+00, double 3.000000e+00]
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x double]
%3 = alloca i64
%4 = alloca [3 x double]
store i32 0, i32* %1
store i64 0, i64* %3
br label %5
5: ; preds = %13, %0
%6 = load i64, i64* %3
%7 = icmp ult i64 %6, 64
br i1 %7, label %8, label %16
8: ; preds = %5
%9 = load i64, i64* %3
%10 = uitofp i64 %9 to double
%11 = load i64, i64* %3
%12 = getelementptr inbounds [64 x double], [64 x double]* %2, i64 0, i64 %11
store double %10, double* %12
br label %13
13: ; preds = %8
%14 = load i64, i64* %3
%15 = add i64 %14, 1
store i64 %15, i64* %3
br label %5
16: ; preds = %5
%17 = getelementptr inbounds [64 x double], [64 x double]* %2, i64 0, i64 0
%18 = call i32 @test(i32 0, i32 6, double* %17, i32 64)
%19 = getelementptr inbounds [64 x double], [64 x double]* %2, i64 0, i64 0
%20 = call i32 @test(i32 1, i32 6, double* %19, i32 64)
%21 = getelementptr inbounds [64 x double], [64 x double]* %2, i64 0, i64 0
%22 = call i32 @test(i32 2, i32 6, double* %21, i32 64)
%23 = getelementptr inbounds [64 x double], [64 x double]* %2, i64 0, i64 0
%24 = call i32 @test(i32 3, i32 6, double* %23, i32 64)
%25 = bitcast [3 x double]* %4 to i8*
%26 = getelementptr inbounds [3 x double], [3 x double]* %4, i64 0, i64 0
%27 = call i32 @test(i32 0, i32 2, double* %26, i32 3)
ret i32 0
}

LLVM IR (-O2):
@__const.main.v2 = [3 x double] [double 3.000000e+00, double 3.000000e+00, double 3.000000e+00]
define i32 @main() {
%1 = alloca [64 x double]
%2 = alloca [3 x double]
%3 = bitcast [64 x double]* %1 to i8*
%4 = bitcast [64 x double]* %1 to <2 x double>*
store <2 x double> <double 0.000000e+00, double 1.000000e+00>, <2 x double>* %4
%5 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 2
%6 = bitcast double* %5 to <2 x double>*
store <2 x double> <double 2.000000e+00, double 3.000000e+00>, <2 x double>* %6
%7 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 4
%8 = bitcast double* %7 to <2 x double>*
store <2 x double> <double 4.000000e+00, double 5.000000e+00>, <2 x double>* %8
%9 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 6
%10 = bitcast double* %9 to <2 x double>*
store <2 x double> <double 6.000000e+00, double 7.000000e+00>, <2 x double>* %10
%11 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 8
%12 = bitcast double* %11 to <2 x double>*
store <2 x double> <double 8.000000e+00, double 9.000000e+00>, <2 x double>* %12
%13 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 10
%14 = bitcast double* %13 to <2 x double>*
store <2 x double> <double 1.000000e+01, double 1.100000e+01>, <2 x double>* %14
%15 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 12
%16 = bitcast double* %15 to <2 x double>*
store <2 x double> <double 1.200000e+01, double 1.300000e+01>, <2 x double>* %16
%17 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 14
%18 = bitcast double* %17 to <2 x double>*
store <2 x double> <double 1.400000e+01, double 1.500000e+01>, <2 x double>* %18
%19 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 16
%20 = bitcast double* %19 to <2 x double>*
store <2 x double> <double 1.600000e+01, double 1.700000e+01>, <2 x double>* %20
%21 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 18
%22 = bitcast double* %21 to <2 x double>*
store <2 x double> <double 1.800000e+01, double 1.900000e+01>, <2 x double>* %22
%23 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 20
%24 = bitcast double* %23 to <2 x double>*
store <2 x double> <double 2.000000e+01, double 2.100000e+01>, <2 x double>* %24
%25 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 22
%26 = bitcast double* %25 to <2 x double>*
store <2 x double> <double 2.200000e+01, double 2.300000e+01>, <2 x double>* %26
%27 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 24
%28 = bitcast double* %27 to <2 x double>*
store <2 x double> <double 2.400000e+01, double 2.500000e+01>, <2 x double>* %28
%29 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 26
%30 = bitcast double* %29 to <2 x double>*
store <2 x double> <double 2.600000e+01, double 2.700000e+01>, <2 x double>* %30
%31 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 28
%32 = bitcast double* %31 to <2 x double>*
store <2 x double> <double 2.800000e+01, double 2.900000e+01>, <2 x double>* %32
%33 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 30
%34 = bitcast double* %33 to <2 x double>*
store <2 x double> <double 3.000000e+01, double 3.100000e+01>, <2 x double>* %34
%35 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 32
%36 = bitcast double* %35 to <2 x double>*
store <2 x double> <double 3.200000e+01, double 3.300000e+01>, <2 x double>* %36
%37 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 34
%38 = bitcast double* %37 to <2 x double>*
store <2 x double> <double 3.400000e+01, double 3.500000e+01>, <2 x double>* %38
%39 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 36
%40 = bitcast double* %39 to <2 x double>*
store <2 x double> <double 3.600000e+01, double 3.700000e+01>, <2 x double>* %40
%41 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 38
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> <double 3.800000e+01, double 3.900000e+01>, <2 x double>* %42
%43 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 40
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> <double 4.000000e+01, double 4.100000e+01>, <2 x double>* %44
%45 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 42
%46 = bitcast double* %45 to <2 x double>*
store <2 x double> <double 4.200000e+01, double 4.300000e+01>, <2 x double>* %46
%47 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 44
%48 = bitcast double* %47 to <2 x double>*
store <2 x double> <double 4.400000e+01, double 4.500000e+01>, <2 x double>* %48
%49 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 46
%50 = bitcast double* %49 to <2 x double>*
store <2 x double> <double 4.600000e+01, double 4.700000e+01>, <2 x double>* %50
%51 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 48
%52 = bitcast double* %51 to <2 x double>*
store <2 x double> <double 4.800000e+01, double 4.900000e+01>, <2 x double>* %52
%53 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 50
%54 = bitcast double* %53 to <2 x double>*
store <2 x double> <double 5.000000e+01, double 5.100000e+01>, <2 x double>* %54
%55 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 52
%56 = bitcast double* %55 to <2 x double>*
store <2 x double> <double 5.200000e+01, double 5.300000e+01>, <2 x double>* %56
%57 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 54
%58 = bitcast double* %57 to <2 x double>*
store <2 x double> <double 5.400000e+01, double 5.500000e+01>, <2 x double>* %58
%59 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 56
%60 = bitcast double* %59 to <2 x double>*
store <2 x double> <double 5.600000e+01, double 5.700000e+01>, <2 x double>* %60
%61 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 58
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> <double 5.800000e+01, double 5.900000e+01>, <2 x double>* %62
%63 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 60
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> <double 6.000000e+01, double 6.100000e+01>, <2 x double>* %64
%65 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 62
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> <double 6.200000e+01, double 6.300000e+01>, <2 x double>* %66
%67 = getelementptr inbounds [64 x double], [64 x double]* %1, i64 0, i64 0
%68 = call i32 @test(i32 0, i32 6, double* %67, i32 64)
%69 = call i32 @test(i32 1, i32 6, double* %67, i32 64)
%70 = call i32 @test(i32 2, i32 6, double* %67, i32 64)
%71 = call i32 @test(i32 3, i32 6, double* %67, i32 64)
%72 = bitcast [3 x double]* %2 to i8*
%73 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%74 = call i32 @test(i32 0, i32 2, double* %73, i32 3)
ret i32 0
}