int main() {
  char names[4][3][10] = {"Bob",    "Bill",  "Bret", "Dan",  "Dave",  "Don",
                          "George", "Harry", "John", "Mike", "Steve", "Vern"};
  int a, b;
  for (b = 0; b < 3; b++)
    for (a = 0; a < 4; a++)
      printf("%s\n", names[a][b]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x78,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x88(%rbp)
cmpl   $0x3,-0x88(%rbp)
jge    11d0 <main+0xb0>
movl   $0x0,-0x84(%rbp)
cmpl   $0x4,-0x84(%rbp)
jge    11b7 <main+0x97>
movslq -0x84(%rbp),%rax
lea    -0x80(%rbp),%rsi
imul   $0x1e,%rax,%rax
add    %rax,%rsi
movslq -0x88(%rbp),%rax
imul   $0xa,%rax,%rax
add    %rax,%rsi
lea    0xedc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x84(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x84(%rbp)
jmp    1168 <main+0x48>
jmp    11bc <main+0x9c>
mov    -0x88(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x88(%rbp)
jmp    1151 <main+0x31>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
mov    0xf51(%rip),%rax
mov    %rax,0x70(%rsp)
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe8d(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x50(%rsp),%rbx
mov    %rsp,%rdi
call   1030 <puts@plt>
lea    0x1e(%rsp),%rdi
call   1030 <puts@plt>
lea    0x3c(%rsp),%rdi
call   1030 <puts@plt>
lea    0x5a(%rsp),%rdi
call   1030 <puts@plt>
lea    0xa(%rsp),%rdi
call   1030 <puts@plt>
lea    0x28(%rsp),%rdi
call   1030 <puts@plt>
lea    0x46(%rsp),%rdi
call   1030 <puts@plt>
lea    0x64(%rsp),%rdi
call   1030 <puts@plt>
lea    0x14(%rsp),%rdi
call   1030 <puts@plt>
lea    0x32(%rsp),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0x6e(%rsp),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.names = [4 x [3 x [10 x i8]]] [[3 x [10 x i8]] [[10 x i8] c"Bob\00\00\00\00\00\00\00", [10 x i8] c"Bill\00\00\00\00\00\00", [10 x i8] c"Bret\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"Dan\00\00\00\00\00\00\00", [10 x i8] c"Dave\00\00\00\00\00\00", [10 x i8] c"Don\00\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"George\00\00\00\00", [10 x i8] c"Harry\00\00\00\00\00", [10 x i8] c"John\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"Mike\00\00\00\00\00\00", [10 x i8] c"Steve\00\00\00\00\00", [10 x i8] c"Vern\00\00\00\00\00\00"]]
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x [3 x [10 x i8]]]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [4 x [3 x [10 x i8]]]* %2 to i8*
store i32 0, i32* %4
br label %6
6: ; preds = %26, %0
%7 = load i32, i32* %4
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %29
9: ; preds = %6
store i32 0, i32* %3
br label %10
10: ; preds = %22, %9
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 4
br i1 %12, label %13, label %25
13: ; preds = %10
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %2, i64 0, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [3 x [10 x i8]], [3 x [10 x i8]]* %16, i64 0, i64 %18
%20 = getelementptr inbounds [10 x i8], [10 x i8]* %19, i64 0, i64 0
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %20)
br label %22
22: ; preds = %13
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %10
25: ; preds = %10
br label %26
26: ; preds = %25
%27 = load i32, i32* %4
%28 = add nsw i32 %27, 1
store i32 %28, i32* %4
br label %6
29: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@__const.main.names = [4 x [3 x [10 x i8]]] [[3 x [10 x i8]] [[10 x i8] c"Bob\00\00\00\00\00\00\00", [10 x i8] c"Bill\00\00\00\00\00\00", [10 x i8] c"Bret\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"Dan\00\00\00\00\00\00\00", [10 x i8] c"Dave\00\00\00\00\00\00", [10 x i8] c"Don\00\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"George\00\00\00\00", [10 x i8] c"Harry\00\00\00\00\00", [10 x i8] c"John\00\00\00\00\00\00"], [3 x [10 x i8]] [[10 x i8] c"Mike\00\00\00\00\00\00", [10 x i8] c"Steve\00\00\00\00\00", [10 x i8] c"Vern\00\00\00\00\00\00"]]
define i32 @main() {
%1 = alloca [4 x [3 x [10 x i8]]]
%2 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 0, i64 0, i64 0
%3 = call i32 @puts(i8* %2)
%4 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 1, i64 0, i64 0
%5 = call i32 @puts(i8* %4)
%6 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 2, i64 0, i64 0
%7 = call i32 @puts(i8* %6)
%8 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 3, i64 0, i64 0
%9 = call i32 @puts(i8* %8)
%10 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 0, i64 1, i64 0
%11 = call i32 @puts(i8* %10)
%12 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 1, i64 1, i64 0
%13 = call i32 @puts(i8* %12)
%14 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 2, i64 1, i64 0
%15 = call i32 @puts(i8* %14)
%16 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 3, i64 1, i64 0
%17 = call i32 @puts(i8* %16)
%18 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 0, i64 2, i64 0
%19 = call i32 @puts(i8* %18)
%20 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 1, i64 2, i64 0
%21 = call i32 @puts(i8* %20)
%22 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 2, i64 2, i64 0
%23 = call i32 @puts(i8* %22)
%24 = getelementptr inbounds [4 x [3 x [10 x i8]]], [4 x [3 x [10 x i8]]]* %1, i64 0, i64 3, i64 2, i64 0
%25 = call i32 @puts(i8* %24)
ret i32 0
}