#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*/ c;
typedef int /*<<< orphan*/ b;
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printarray(int *, int);
int main() {
  int a[5] = {};
  int b[5][10] = {{2}};
  int c[3][10][3] = {};
  printarray((int *)a, sizeof(a) / sizeof(int));
  printarray((int *)b, sizeof(b) / sizeof(int));
  printarray((int *)c, sizeof(c) / sizeof(int));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x260,%rsp
lea    -0x20(%rbp),%rdi
xor    %esi,%esi
mov    $0x14,%edx
call   1030 <memset@plt>
lea    -0xf0(%rbp),%rdi
xor    %esi,%esi
mov    $0xc8,%edx
call   1030 <memset@plt>
movl   $0x2,-0xf0(%rbp)
lea    -0x260(%rbp),%rdi
xor    %esi,%esi
mov    $0x168,%edx
call   1030 <memset@plt>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <printarray@plt>
lea    -0xf0(%rbp),%rdi
mov    $0x32,%esi
call   1040 <printarray@plt>
lea    -0x260(%rbp),%rdi
mov    $0x5a,%esi
call   1040 <printarray@plt>
xor    %eax,%eax
add    $0x260,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x260,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x10(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movq   $0x0,0xe0(%rsp)
movl   $0x2,0x20(%rsp)
lea    0xf0(%rsp),%rbx
mov    $0x168,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <printarray@plt>
lea    0x20(%rsp),%rdi
mov    $0x32,%esi
call   1040 <printarray@plt>
mov    %rbx,%rdi
mov    $0x5a,%esi
call   1040 <printarray@plt>
xor    %eax,%eax
add    $0x260,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x [10 x i32]]
%3 = alloca [3 x [10 x [3 x i32]]]
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [5 x [10 x i32]]* %2 to i8*
%6 = bitcast i8* %5 to <{ <{ i32, [9 x i32] }>, [10 x i32], [10 x i32], [10 x i32], [10 x i32] }>*
%7 = getelementptr inbounds <{ <{ i32, [9 x i32] }>, [10 x i32], [10 x i32], [10 x i32], [10 x i32] }>, <{ <{ i32, [9 x i32] }>, [10 x i32], [10 x i32], [10 x i32], [10 x i32] }>* %6, i32 0, i32 0
%8 = getelementptr inbounds <{ i32, [9 x i32] }>, <{ i32, [9 x i32] }>* %7, i32 0, i32 0
store i32 2, i32* %8
%9 = bitcast [3 x [10 x [3 x i32]]]* %3 to i8*
%10 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%11 = call i32 @printarray(i32* %10, i32 5)
%12 = getelementptr inbounds [5 x [10 x i32]], [5 x [10 x i32]]* %2, i64 0, i64 0
%13 = bitcast [10 x i32]* %12 to i32*
%14 = call i32 @printarray(i32* %13, i32 50)
%15 = getelementptr inbounds [3 x [10 x [3 x i32]]], [3 x [10 x [3 x i32]]]* %3, i64 0, i64 0
%16 = bitcast [10 x [3 x i32]]* %15 to i32*
%17 = call i32 @printarray(i32* %16, i32 90)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [5 x i32]
%2 = alloca [5 x [10 x i32]]
%3 = alloca [3 x [10 x [3 x i32]]]
%4 = bitcast [5 x i32]* %1 to i8*
%5 = bitcast [5 x [10 x i32]]* %2 to i8*
%6 = getelementptr inbounds [5 x [10 x i32]], [5 x [10 x i32]]* %2, i64 0, i64 0, i64 0
store i32 2, i32* %6
%7 = bitcast [3 x [10 x [3 x i32]]]* %3 to i8*
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%9 = call i32 @printarray(i32* %8, i32 5)
%10 = call i32 @printarray(i32* %6, i32 50)
%11 = getelementptr inbounds [3 x [10 x [3 x i32]]], [3 x [10 x [3 x i32]]]* %3, i64 0, i64 0, i64 0, i64 0
%12 = call i32 @printarray(i32* %11, i32 90)
ret i32 0
}