#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*/ printf(char *, int, ...);
int main() {
  int arr1[32];
  int arr2[32] = {1};
  int arr3[3] = {1, 2, 3};
  printf("arr1[16] = %d\n", arr1[16]);
  printf("arr2[16] = %d\n", arr2[16]);
  printf("arr3 = {%d, %d, %d}\n", arr3[0], arr3[1], arr3[2]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
lea    -0x100(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
movl   $0x1,-0x100(%rbp)
mov    0xeb1(%rip),%rax
mov    %rax,-0x10c(%rbp)
mov    0xeac(%rip),%eax
mov    %eax,-0x104(%rbp)
mov    -0x40(%rbp),%esi
lea    0xea0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc0(%rbp),%esi
lea    0xe9b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10c(%rbp),%esi
mov    -0x108(%rbp),%edx
mov    -0x104(%rbp),%ecx
lea    0xe8a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee8(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.arr3 = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [15 x i8] c"arr1[16] = %d\0A\00"
@.str.1 = [15 x i8] c"arr2[16] = %d\0A\00"
@.str.2 = [21 x i8] c"arr3 = {%d, %d, %d}\0A\00"
define i32 @main() {
%1 = alloca [32 x i32]
%2 = alloca [32 x i32]
%3 = alloca [3 x i32]
%4 = bitcast [32 x i32]* %2 to i8*
%5 = bitcast i8* %4 to <{ i32, [31 x i32] }>*
%6 = getelementptr inbounds <{ i32, [31 x i32] }>, <{ i32, [31 x i32] }>* %5, i32 0, i32 0
store i32 1, i32* %6
%7 = bitcast [3 x i32]* %3 to i8*
%8 = getelementptr inbounds [32 x i32], [32 x i32]* %1, i64 0, i64 16
%9 = load i32, i32* %8
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = getelementptr inbounds [32 x i32], [32 x i32]* %2, i64 0, i64 16
%12 = load i32, i32* %11
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %12)
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 0
%15 = load i32, i32* %14
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 1
%17 = load i32, i32* %16
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %3, i64 0, i64 2
%19 = load i32, i32* %18
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %17, i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"arr1[16] = %d\0A\00"
@.str.1 = [15 x i8] c"arr2[16] = %d\0A\00"
@.str.2 = [21 x i8] c"arr3 = {%d, %d, %d}\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 undef)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 2, i32 3)
ret i32 0
}