int main(void) {
  int a[3] = {1, 2, 3};
  int b[] = {3, 2, 1};
  print_array(a, 3);
  print_array(b, 3);
  int *aptr = (int[]){1, 2, 3};
  int *bptr = malloc(3 * sizeof(int));
  bptr[0] = 3;
  bptr[1] = 2;
  bptr[2] = 1;
  print_array(aptr, 3);
  print_array(bptr, 3);
  free(bptr);
  int noInit[3];
  static int noInitStatic[3];
  print_array(noInit, 3);
  print_array(noInitStatic, 3);
  int big[32] = {0};
  print_array(big, 32);
  int desigA[6] = {[1] = 77, 88, [4] = 99};
  int desigB[6] = {0, 77, 88, 0, 99, 0};
  print_array(desigA, 6);
  print_array(desigB, 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    0xeae(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xeac(%rip),%eax
mov    %eax,-0x4(%rbp)
mov    0xea6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea4(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
lea    -0x18(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
movl   $0x1,-0x2c(%rbp)
movl   $0x2,-0x28(%rbp)
movl   $0x3,-0x24(%rbp)
lea    -0x2c(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0xc,%edi
call   1060 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
movl   $0x3,(%rax)
mov    -0x38(%rbp),%rax
movl   $0x2,0x4(%rax)
mov    -0x38(%rbp),%rax
movl   $0x1,0x8(%rax)
mov    -0x20(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
mov    -0x38(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
lea    -0x44(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
lea    0x2e26(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1050 <memset@plt>
lea    -0xd0(%rbp),%rdi
mov    $0x20,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
mov    0xdc9(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0xdc3(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0xdbd(%rip),%rax
mov    %rax,-0xe0(%rbp)
mov    0xdbf(%rip),%rax
mov    %rax,-0x110(%rbp)
mov    0xdb9(%rip),%rax
mov    %rax,-0x108(%rbp)
mov    0xdb3(%rip),%rax
mov    %rax,-0x100(%rbp)
lea    -0xf0(%rbp),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
lea    -0x110(%rbp),%rdi
mov    $0x6,%esi
mov    $0x0,%al
call   1040 <print_array@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x100,%rsp
mov    0xeca(%rip),%eax
mov    %eax,0x20(%rsp)
mov    0xeb7(%rip),%rax
mov    %rax,0x18(%rsp)
mov    0xec0(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xead(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x18(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
movabs $0x200000001,%rax
mov    %rax,0x24(%rsp)
movl   $0x3,0x2c(%rsp)
mov    $0xc,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
movabs $0x200000003,%rax
mov    %rax,(%rbx)
movl   $0x1,0x8(%rbx)
lea    0x24(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
lea    0x74(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
lea    0x2e3e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
xorps  %xmm0,%xmm0
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%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)
lea    0x80(%rsp),%rdi
mov    $0x20,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
mov    0xdc8(%rip),%rax
mov    %rax,0x60(%rsp)
movaps 0xdac(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
mov    %rax,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
lea    0x50(%rsp),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
lea    0x30(%rsp),%rdi
mov    $0x6,%esi
xor    %eax,%eax
call   1040 <print_array@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.b = [3 x i32] [i32 3, i32 2, i32 1]
@main.noInitStatic = internal global [3 x i32] zeroinitializer
@__const.main.desigA = [6 x i32] [i32 0, i32 77, i32 88, i32 0, i32 99, i32 0]
@__const.main.desigB = [6 x i32] [i32 0, i32 77, i32 88, i32 0, i32 99, i32 0]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = alloca i32*
%4 = alloca [3 x i32]
%5 = alloca i32*
%6 = alloca [3 x i32]
%7 = alloca [32 x i32]
%8 = alloca [6 x i32]
%9 = alloca [6 x i32]
%10 = bitcast [3 x i32]* %1 to i8*
%11 = bitcast [3 x i32]* %2 to i8*
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%13 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %12, i32 3)
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%15 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %14, i32 3)
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32 1, i32* %16
%17 = getelementptr inbounds i32, i32* %16, i64 1
store i32 2, i32* %17
%18 = getelementptr inbounds i32, i32* %17, i64 1
store i32 3, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
store i32* %19, i32** %3
%20 = call i8* @malloc(i64 12)
%21 = bitcast i8* %20 to i32*
store i32* %21, i32** %5
%22 = load i32*, i32** %5
%23 = getelementptr inbounds i32, i32* %22, i64 0
store i32 3, i32* %23
%24 = load i32*, i32** %5
%25 = getelementptr inbounds i32, i32* %24, i64 1
store i32 2, i32* %25
%26 = load i32*, i32** %5
%27 = getelementptr inbounds i32, i32* %26, i64 2
store i32 1, i32* %27
%28 = load i32*, i32** %3
%29 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %28, i32 3)
%30 = load i32*, i32** %5
%31 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %30, i32 3)
%32 = load i32*, i32** %5
%33 = bitcast i32* %32 to i8*
%34 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%35 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %34, i32 3)
%36 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.noInitStatic, i64 0, i64 0), i32 3)
%37 = bitcast [32 x i32]* %7 to i8*
%38 = getelementptr inbounds [32 x i32], [32 x i32]* %7, i64 0, i64 0
%39 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %38, i32 32)
%40 = bitcast [6 x i32]* %8 to i8*
%41 = bitcast [6 x i32]* %9 to i8*
%42 = getelementptr inbounds [6 x i32], [6 x i32]* %8, i64 0, i64 0
%43 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %42, i32 6)
%44 = getelementptr inbounds [6 x i32], [6 x i32]* %9, i64 0, i64 0
%45 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %44, i32 6)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [3 x i32] [i32 1, i32 2, i32 3]
@__const.main.b = [3 x i32] [i32 3, i32 2, i32 1]
@main.noInitStatic = internal global [3 x i32] zeroinitializer
@__const.main.desigB = [6 x i32] [i32 0, i32 77, i32 88, i32 0, i32 99, i32 0]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
%3 = alloca [3 x i32]
%4 = alloca [3 x i32]
%5 = alloca [32 x i32]
%6 = alloca [6 x i32]
%7 = alloca [6 x i32]
%8 = bitcast [3 x i32]* %1 to i8*
%9 = bitcast [3 x i32]* %2 to i8*
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%11 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %10, i32 3)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%13 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %12, i32 3)
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
store i32 1, i32* %14
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
store i32 2, i32* %15
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
store i32 3, i32* %16
%17 = call dereferenceable_or_null(12) i8* @malloc(i64 12)
%18 = bitcast i8* %17 to i32*
store i32 3, i32* %18
%19 = getelementptr inbounds i32, i32* %18, i64 1
store i32 2, i32* %19
%20 = getelementptr inbounds i32, i32* %18, i64 2
store i32 1, i32* %20
%21 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %14, i32 3)
%22 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %18, i32 3)
%23 = bitcast [3 x i32]* %4 to i8*
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %4, i64 0, i64 0
%25 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %24, i32 3)
%26 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* getelementptr inbounds ([3 x i32], [3 x i32]* @main.noInitStatic, i64 0, i64 0), i32 3)
%27 = bitcast [32 x i32]* %5 to i8*
%28 = getelementptr inbounds [32 x i32], [32 x i32]* %5, i64 0, i64 0
%29 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %28, i32 32)
%30 = bitcast [6 x i32]* %6 to i8*
%31 = bitcast [6 x i32]* %7 to i8*
%32 = getelementptr inbounds [6 x i32], [6 x i32]* %6, i64 0, i64 0
%33 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %32, i32 6)
%34 = getelementptr inbounds [6 x i32], [6 x i32]* %7, i64 0, i64 0
%35 = call i32 (i32*, i32, ...) bitcast (i32 (...)* @print_array to i32 (i32*, i32, ...)*)(i32* %34, i32 6)
ret i32 0
}