#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 *, char *);
int main() {
  char *names[5];
  names[0] = "Andrew";
  names[1] = "Mark";
  names[2] = "Chris";
  names[3] = "Tom";
  names[4] = "Daniel";
  printf("%s\n", names[3]);
  char *names2[5] = {"Darren", "Bill", "Richard", "Kyle", "Lee"};
  printf("%s\n", names2[0]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xec0(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xebb(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xeb4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xe94(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xe90(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe8a(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe87(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe81(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    -0x60(%rbp),%rsi
lea    0xe55(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xeec(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Andrew\00"
@.str.1 = [5 x i8] c"Mark\00"
@.str.2 = [6 x i8] c"Chris\00"
@.str.3 = [4 x i8] c"Tom\00"
@.str.4 = [7 x i8] c"Daniel\00"
@.str.5 = [4 x i8] c"%s\0A\00"
@.str.6 = [7 x i8] c"Darren\00"
@.str.7 = [5 x i8] c"Bill\00"
@.str.8 = [8 x i8] c"Richard\00"
@.str.9 = [5 x i8] c"Kyle\00"
@.str.10 = [4 x i8] c"Lee\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca [5 x i8*]
store i32 0, i32* %1
%4 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %4
%5 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8** %5
%6 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8** %6
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 3
%10 = load i8*, i8** %9
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %10)
%12 = bitcast [5 x i8*]* %3 to i8*
%13 = bitcast i8* %12 to [5 x i8*]*
%14 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i32 0, i32 0
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0), i8** %14
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i32 0, i32 1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i32 0, i32 2
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %13, i32 0, i32 4
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.10, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds [5 x i8*], [5 x i8*]* %3, i64 0, i64 0
%20 = load i8*, i8** %19
%21 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0), i8* %20)
ret i32 0
}

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