int main(void) {
  char dwarf[7][8] = {"bashful", "doc",    "dopey", "grumpy",
                      "happy",   "sneezy", "sleepy"};
  const char *seven[] = {"bashful", "doc",    "dopey", "grumpy",
                         "happy",   "sneezy", "sleepy"};
  int x;
  for (x = 0; x < 7; x++)
    printf("%15s - %-10s\n", dwarf[x], seven[x]);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
lea    -0x80(%rbp),%rdi
lea    0x2c7e(%rip),%rsi
mov    $0x38,%edx
call   1050 <memcpy@plt>
movl   $0x0,-0x84(%rbp)
cmpl   $0x7,-0x84(%rbp)
jge    11c3 <main+0x93>
movslq -0x84(%rbp),%rax
lea    -0x40(%rbp),%rsi
shl    $0x3,%rax
add    %rax,%rsi
movslq -0x84(%rbp),%rax
mov    -0x80(%rbp,%rax,8),%rdx
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1176 <main+0x46>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    0xefe(%rip),%rax
mov    %rax,0x30(%rsp)
movaps 0xee2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeaa(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x30(%rsp),%r14
lea    0x20(%rsp),%r15
lea    0x10(%rsp),%r12
lea    0xef5(%rip),%rbx
lea    0xec1(%rip),%rdx
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x8(%rsp),%rsi
lea    0xeb0(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xea3(%rip),%rdx
mov    %rbx,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x18(%rsp),%rsi
lea    0xe90(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe86(%rip),%rdx
mov    %rbx,%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
lea    0xe73(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xe69(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.dwarf = [7 x [8 x i8]] [[8 x i8] c"bashful\00", [8 x i8] c"doc\00\00\00\00\00", [8 x i8] c"dopey\00\00\00", [8 x i8] c"grumpy\00\00", [8 x i8] c"happy\00\00\00", [8 x i8] c"sneezy\00\00", [8 x i8] c"sleepy\00\00"]
@.str = [8 x i8] c"bashful\00"
@.str.1 = [4 x i8] c"doc\00"
@.str.2 = [6 x i8] c"dopey\00"
@.str.3 = [7 x i8] c"grumpy\00"
@.str.4 = [6 x i8] c"happy\00"
@.str.5 = [7 x i8] c"sneezy\00"
@.str.6 = [7 x i8] c"sleepy\00"
@__const.main.seven = [7 x i8*] [i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i32 0, i32 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i32 0, i32 0)]
@.str.7 = [14 x i8] c"%15s - %-10s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x [8 x i8]]
%3 = alloca [7 x i8*]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [7 x [8 x i8]]* %2 to i8*
%6 = bitcast [7 x i8*]* %3 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %20, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 7
br i1 %9, label %10, label %23
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %2, i64 0, i64 %12
%14 = getelementptr inbounds [8 x i8], [8 x i8]* %13, i64 0, i64 0
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [7 x i8*], [7 x i8*]* %3, i64 0, i64 %16
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* %18)
br label %20
20: ; preds = %10
%21 = load i32, i32* %4
%22 = add nsw i32 %21, 1
store i32 %22, i32* %4
br label %7
23: ; preds = %7
%24 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@__const.main.dwarf = [7 x [8 x i8]] [[8 x i8] c"bashful\00", [8 x i8] c"doc\00\00\00\00\00", [8 x i8] c"dopey\00\00\00", [8 x i8] c"grumpy\00\00", [8 x i8] c"happy\00\00\00", [8 x i8] c"sneezy\00\00", [8 x i8] c"sleepy\00\00"]
@.str = [8 x i8] c"bashful\00"
@.str.1 = [4 x i8] c"doc\00"
@.str.2 = [6 x i8] c"dopey\00"
@.str.3 = [7 x i8] c"grumpy\00"
@.str.4 = [6 x i8] c"happy\00"
@.str.5 = [7 x i8] c"sneezy\00"
@.str.6 = [7 x i8] c"sleepy\00"
@.str.7 = [14 x i8] c"%15s - %-10s\0A\00"
define i32 @main() {
%1 = alloca [7 x [8 x i8]]
%2 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 1, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 2, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
%8 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 3, i64 0
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
%10 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 4, i64 0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%12 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 5, i64 0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %12, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%14 = getelementptr inbounds [7 x [8 x i8]], [7 x [8 x i8]]* %1, i64 0, i64 6, i64 0
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.7, i64 0, i64 0), i8* %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 (...) @getchar()
ret i32 0
}