#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(void) {
  int vc[5];
  vc[0] = 1;
  vc[1] = 2;
  vc[2] = 3;
  vc[3] = 4;
  vc[4] = 5;
  printf("vc[0] = %d\n", vc[0]);
  printf("vc[1] = %d\n", vc[1]);
  printf("vc[2] = %d\n", vc[2]);
  printf("vc[3] = %d\n", vc[3]);
  printf("vc[4] = %d\n", vc[4]);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x20(%rbp)
movl   $0x2,-0x1c(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x4,-0x14(%rbp)
movl   $0x5,-0x10(%rbp)
mov    -0x20(%rbp),%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x1c(%rbp),%esi
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x18(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"vc[0] = %d\0A\00"
@.str.1 = [12 x i8] c"vc[1] = %d\0A\00"
@.str.2 = [12 x i8] c"vc[2] = %d\0A\00"
@.str.3 = [12 x i8] c"vc[3] = %d\0A\00"
@.str.4 = [12 x i8] c"vc[4] = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 2)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i32 4)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32 5)
ret i32 0
}