int main() {
  char names[3][20] = {"wzz", "kk", "xx"};
  int i;
  for (i = 0; i < 3; i++) {
    printf("Hello %s !\n", names[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x3c,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    1180 <main+0x60>
movslq -0x44(%rbp),%rax
lea    -0x40(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    114b <main+0x2b>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x40,%rsp
movups 0xf10(%rip),%xmm0
movups %xmm0,0x2c(%rsp)
movaps 0xef8(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xedc(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xec0(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xef1(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.names = [3 x [20 x i8]] [[20 x i8] c"wzz\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"kk\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"xx\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [12 x i8] c"Hello %s !\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x [20 x i8]]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [3 x [20 x i8]]* %2 to i8*
store i32 0, i32* %3
br label %5
5: ; preds = %14, %0
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 3
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %2, i64 0, i64 %10
%12 = getelementptr inbounds [20 x i8], [20 x i8]* %11, i64 0, i64 0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %8
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %5
17: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@__const.main.names = [3 x [20 x i8]] [[20 x i8] c"wzz\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"kk\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"xx\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [12 x i8] c"Hello %s !\0A\00"
define i32 @main() {
%1 = alloca [3 x [20 x i8]]
%2 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %1, i64 0, i64 1, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [3 x [20 x i8]], [3 x [20 x i8]]* %1, i64 0, i64 2, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}