#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*/ check_array(int *, int);
int main() {
  {
    int arr[1] = {0};
    check_array(arr, 1);
  }
  {
    int arr[2] = {1, 2};
    check_array(arr, 2);
  }
  {
    int arr[2] = {2, 1};
    check_array(arr, 2);
  }
  {
    int arr[5] = {0, 1, 2, 3, 4};
    check_array(arr, 5);
  }
  {
    int arr[5] = {4, 3, 2, 1, 0};
    check_array(arr, 5);
  }
  {
    int arr[5] = {1, 0, 3, 2, 4};
    check_array(arr, 5);
  }
  {
    int arr[5] = {4, 2, 3, 1, 0};
    check_array(arr, 5);
  }
  {
    int arr[10] = {
        765257874, 933712350,  1354440650, 1856529878, 111694870,
        603621184, 1574814417, 290282169,  441512486,  2061656385,
    };
    check_array(arr, 10);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <check_array@plt>
mov    0xe99(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1030 <check_array@plt>
mov    0xe88(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1030 <check_array@plt>
mov    0xe77(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xe74(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xe72(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xeba(%rip),%rax
mov    %rax,-0x50(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x48(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x40(%rbp)
lea    -0x50(%rbp),%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xe3d(%rip),%rax
mov    %rax,-0x70(%rbp)
mov    0xe3a(%rip),%rax
mov    %rax,-0x68(%rbp)
mov    0xe38(%rip),%eax
mov    %eax,-0x60(%rbp)
lea    -0x70(%rbp),%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xe80(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xe7a(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xe75(%rip),%eax
mov    %eax,-0x80(%rbp)
lea    -0x90(%rbp),%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
lea    -0xc0(%rbp),%rdi
lea    0xdf3(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0xc0(%rbp),%rdi
mov    $0xa,%esi
call   1030 <check_array@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movl   $0x0,(%rsp)
mov    %rsp,%rdi
mov    $0x1,%esi
call   1030 <check_array@plt>
movabs $0x200000001,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <check_array@plt>
movabs $0x100000002,%rax
mov    %rax,(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <check_array@plt>
mov    0xeac(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xe91(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xefa(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xedf(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xe88(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xe6d(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xed6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xebb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <check_array@plt>
mov    0xe73(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xe57(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe3b(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <check_array@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [2 x i32] [i32 1, i32 2]
@__const.main.arr.1 = [2 x i32] [i32 2, i32 1]
@__const.main.arr.2 = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4]
@__const.main.arr.3 = [5 x i32] [i32 4, i32 3, i32 2, i32 1, i32 0]
@__const.main.arr.4 = [5 x i32] [i32 1, i32 0, i32 3, i32 2, i32 4]
@__const.main.arr.5 = [5 x i32] [i32 4, i32 2, i32 3, i32 1, i32 0]
@__const.main.arr.6 = [10 x i32] [i32 765257874, i32 933712350, i32 1354440650, i32 1856529878, i32 111694870, i32 603621184, i32 1574814417, i32 290282169, i32 441512486, i32 2061656385]
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i32]
%3 = alloca [2 x i32]
%4 = alloca [2 x i32]
%5 = alloca [5 x i32]
%6 = alloca [5 x i32]
%7 = alloca [5 x i32]
%8 = alloca [5 x i32]
%9 = alloca [10 x i32]
store i32 0, i32* %1
%10 = bitcast [1 x i32]* %2 to i8*
%11 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%12 = call i32 @check_array(i32* %11, i32 1)
%13 = bitcast [2 x i32]* %3 to i8*
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%15 = call i32 @check_array(i32* %14, i32 2)
%16 = bitcast [2 x i32]* %4 to i8*
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%18 = call i32 @check_array(i32* %17, i32 2)
%19 = bitcast [5 x i32]* %5 to i8*
%20 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%21 = call i32 @check_array(i32* %20, i32 5)
%22 = bitcast [5 x i32]* %6 to i8*
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%24 = call i32 @check_array(i32* %23, i32 5)
%25 = bitcast [5 x i32]* %7 to i8*
%26 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%27 = call i32 @check_array(i32* %26, i32 5)
%28 = bitcast [5 x i32]* %8 to i8*
%29 = getelementptr inbounds [5 x i32], [5 x i32]* %8, i64 0, i64 0
%30 = call i32 @check_array(i32* %29, i32 5)
%31 = bitcast [10 x i32]* %9 to i8*
%32 = getelementptr inbounds [10 x i32], [10 x i32]* %9, i64 0, i64 0
%33 = call i32 @check_array(i32* %32, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr.2 = [5 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4]
@__const.main.arr.3 = [5 x i32] [i32 4, i32 3, i32 2, i32 1, i32 0]
@__const.main.arr.4 = [5 x i32] [i32 1, i32 0, i32 3, i32 2, i32 4]
@__const.main.arr.5 = [5 x i32] [i32 4, i32 2, i32 3, i32 1, i32 0]
@__const.main.arr.6 = [10 x i32] [i32 765257874, i32 933712350, i32 1354440650, i32 1856529878, i32 111694870, i32 603621184, i32 1574814417, i32 290282169, i32 441512486, i32 2061656385]
define i32 @main() {
%1 = alloca [1 x i32]
%2 = alloca i64
%3 = alloca i64
%4 = alloca [5 x i32]
%5 = alloca [5 x i32]
%6 = alloca [5 x i32]
%7 = alloca [5 x i32]
%8 = alloca [10 x i32]
%9 = bitcast [1 x i32]* %1 to i8*
%10 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 0, i32* %10
%11 = call i32 @check_array(i32* %10, i32 1)
%12 = bitcast i64* %2 to i8*
store i64 8589934593, i64* %2
%13 = bitcast i64* %2 to i32*
%14 = call i32 @check_array(i32* %13, i32 2)
%15 = bitcast i64* %3 to i8*
store i64 4294967298, i64* %3
%16 = bitcast i64* %3 to i32*
%17 = call i32 @check_array(i32* %16, i32 2)
%18 = bitcast [5 x i32]* %4 to i8*
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 0
%20 = call i32 @check_array(i32* %19, i32 5)
%21 = bitcast [5 x i32]* %5 to i8*
%22 = getelementptr inbounds [5 x i32], [5 x i32]* %5, i64 0, i64 0
%23 = call i32 @check_array(i32* %22, i32 5)
%24 = bitcast [5 x i32]* %6 to i8*
%25 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%26 = call i32 @check_array(i32* %25, i32 5)
%27 = bitcast [5 x i32]* %7 to i8*
%28 = getelementptr inbounds [5 x i32], [5 x i32]* %7, i64 0, i64 0
%29 = call i32 @check_array(i32* %28, i32 5)
%30 = bitcast [10 x i32]* %8 to i8*
%31 = getelementptr inbounds [10 x i32], [10 x i32]* %8, i64 0, i64 0
%32 = call i32 @check_array(i32* %31, i32 10)
ret i32 0
}