#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 argc, char *argv[]) {
  int x[3];
  int y[3] = {4, 5, 6};
  int z[3][4];
  int A[] = {1, 2, 3};
  x[0] = 15;
  x[1] = 17;
  x[2] = 42;
  x[3] = 1;
  printf("0: %i\n", x[0]);
  printf("1: %i\n", x[1]);
  printf("2: %i\n", x[2]);
  printf("3: %i\n", x[5]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xed1(%rip),%eax
mov    %eax,-0x20(%rbp)
mov    0xecb(%rip),%rax
mov    %rax,-0x6c(%rbp)
mov    0xec9(%rip),%eax
mov    %eax,-0x64(%rbp)
movl   $0xf,-0x1c(%rbp)
movl   $0x11,-0x18(%rbp)
movl   $0x2a,-0x14(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xe9c(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xf,%esi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
mov    $0x2a,%esi
call   1030 <printf@plt>
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@__const.main.y = [3 x i32] [i32 4, i32 5, i32 6]
@__const.main.A = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [7 x i8] c"0: %i\0A\00"
@.str.1 = [7 x i8] c"1: %i\0A\00"
@.str.2 = [7 x i8] c"2: %i\0A\00"
@.str.3 = [7 x i8] c"3: %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i32]
%7 = alloca [3 x i32]
%8 = alloca [3 x [4 x i32]]
%9 = alloca [3 x i32]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = bitcast [3 x i32]* %7 to i8*
%11 = bitcast [3 x i32]* %9 to i8*
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 15, i32* %12
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 17, i32* %13
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 42, i32* %14
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 3
store i32 1, i32* %15
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
%17 = load i32, i32* %16
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
%20 = load i32, i32* %19
%21 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 %20)
%22 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
%23 = load i32, i32* %22
%24 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %23)
%25 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 5
%26 = load i32, i32* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 %26)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"0: %i\0A\00"
@.str.1 = [7 x i8] c"1: %i\0A\00"
@.str.2 = [7 x i8] c"2: %i\0A\00"
@.str.3 = [7 x i8] c"3: %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 15)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 17)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 42)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 poison)
ret i32 0
}