#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 EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int vector_a[] = {10, 20, 30, 40, 50};
  int vector_b[10] = {10, 20, 30, 40, 50};
  int vector_c[10] = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110};
  int vector_d[10] = {0};
  int vector_e[10] = {};
  int vector_f[10] = {[7] = 77, 1, [1] = 10, [5] = 50, 8, 9};
  for (int i = 0; i < 10; i++)
    printf("[%d] = %d\n", i, vector_f[i]);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0xa,-0x50(%rbp)
movl   $0x14,-0x4c(%rbp)
movl   $0x1e,-0x48(%rbp)
movl   $0x28,-0x44(%rbp)
movl   $0x32,-0x40(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xe81(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    -0xb0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    -0xe0(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    -0x110(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movl   $0xa,-0x10c(%rbp)
movl   $0x32,-0xfc(%rbp)
movl   $0x8,-0xf8(%rbp)
movl   $0x9,-0xf4(%rbp)
movl   $0x1,-0xf0(%rbp)
movl   $0x0,-0x114(%rbp)
cmpl   $0xa,-0x114(%rbp)
jge    125f <main+0x12f>
mov    -0x114(%rbp),%esi
movslq -0x114(%rbp),%rax
mov    -0x110(%rbp,%rax,4),%edx
lea    0xe02(%rip),%rdi
call   1030 <printf@plt>
mov    -0x114(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x114(%rbp)
jmp    121e <main+0xee>
mov    0x2d7a(%rip),%rax
mov    (%rax),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x5,%esi
mov    $0x32,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x6,%esi
mov    $0x8,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x9,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
xor    %edx,%edx
call   1030 <printf@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.vector_a = [5 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50]
@__const.main.vector_c = [10 x i32] [i32 10, i32 20, i32 30, i32 40, i32 50, i32 60, i32 70, i32 80, i32 90, i32 100]
@.str = [11 x i8] c"[%d] = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [10 x i32]
%4 = alloca [10 x i32]
%5 = alloca [10 x i32]
%6 = alloca [10 x i32]
%7 = alloca [10 x i32]
%8 = alloca i32
store i32 0, i32* %1
%9 = bitcast [5 x i32]* %2 to i8*
%10 = bitcast [10 x i32]* %3 to i8*
%11 = bitcast i8* %10 to [10 x i32]*
%12 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 0
store i32 10, i32* %12
%13 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 1
store i32 20, i32* %13
%14 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 2
store i32 30, i32* %14
%15 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 3
store i32 40, i32* %15
%16 = getelementptr inbounds [10 x i32], [10 x i32]* %11, i32 0, i32 4
store i32 50, i32* %16
%17 = bitcast [10 x i32]* %4 to i8*
%18 = bitcast [10 x i32]* %5 to i8*
%19 = bitcast [10 x i32]* %6 to i8*
%20 = bitcast [10 x i32]* %7 to i8*
%21 = bitcast i8* %20 to [10 x i32]*
%22 = getelementptr inbounds [10 x i32], [10 x i32]* %21, i32 0, i32 1
store i32 10, i32* %22
%23 = getelementptr inbounds [10 x i32], [10 x i32]* %21, i32 0, i32 5
store i32 50, i32* %23
%24 = getelementptr inbounds [10 x i32], [10 x i32]* %21, i32 0, i32 6
store i32 8, i32* %24
%25 = getelementptr inbounds [10 x i32], [10 x i32]* %21, i32 0, i32 7
store i32 9, i32* %25
%26 = getelementptr inbounds [10 x i32], [10 x i32]* %21, i32 0, i32 8
store i32 1, i32* %26
store i32 0, i32* %8
br label %27
27: ; preds = %37, %0
%28 = load i32, i32* %8
%29 = icmp slt i32 %28, 10
br i1 %29, label %30, label %40
30: ; preds = %27
%31 = load i32, i32* %8
%32 = load i32, i32* %8
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds [10 x i32], [10 x i32]* %7, i64 0, i64 %33
%35 = load i32, i32* %34
%36 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %31, i32 %35)
br label %37
37: ; preds = %30
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
store i32 %39, i32* %8
br label %27
40: ; preds = %27
%41 = load i32, i32* @EXIT_SUCCESS
ret i32 %41
}

LLVM IR (-O2):
@.str = [11 x i8] c"[%d] = %d\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 1, i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 2, i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 3, i32 0)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 4, i32 0)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 5, i32 50)
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 6, i32 8)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 7, i32 9)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 8, i32 1)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 9, i32 0)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}