int main() {
  char name[5][20] = {"Ram", "Mason", "Akbar", "Emma", "David"};
  int age[5] = {7, 9, 5, 10, 14};
  int class[5] = {2, 4, 1, 5, 9};
  int i = 0;
  for (i = 0; i < 5; i++) {
    printf("%s is %d years old and studies in %d Class\n", name[i], age[i],
           class[i]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x64,%edx
call   1040 <memcpy@plt>
mov    0xf22(%rip),%rax
mov    %rax,-0x90(%rbp)
mov    0xf1c(%rip),%rax
mov    %rax,-0x88(%rbp)
mov    0xf17(%rip),%eax
mov    %eax,-0x80(%rbp)
mov    0xf1d(%rip),%rax
mov    %rax,-0xb0(%rbp)
mov    0xf17(%rip),%rax
mov    %rax,-0xa8(%rbp)
mov    0xf12(%rip),%eax
mov    %eax,-0xa0(%rbp)
movl   $0x0,-0xb4(%rbp)
movl   $0x0,-0xb4(%rbp)
cmpl   $0x5,-0xb4(%rbp)
jge    1205 <main+0xe5>
movslq -0xb4(%rbp),%rax
lea    -0x70(%rbp),%rsi
imul   $0x14,%rax,%rax
add    %rax,%rsi
movslq -0xb4(%rbp),%rax
mov    -0x90(%rbp,%rax,4),%edx
movslq -0xb4(%rbp),%rax
mov    -0xb0(%rbp,%rax,4),%ecx
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    11a8 <main+0x88>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    0xf43(%rip),%eax
mov    %eax,0x60(%rsp)
movaps 0xf28(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf0c(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xef0(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xed4(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xeb8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xe9c(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0x50(%rsp),%r14
lea    0xef0(%rip),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    $0x7,%edx
mov    $0x2,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x14(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x9,%edx
mov    $0x4,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x28(%rsp),%rsi
mov    %rbx,%rdi
mov    $0x5,%edx
mov    $0x1,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0x3c(%rsp),%rsi
mov    %rbx,%rdi
mov    $0xa,%edx
mov    $0x5,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xe,%edx
mov    $0x9,%ecx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.name = [5 x [20 x i8]] [[20 x i8] c"Ram\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Mason\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Akbar\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Emma\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"David\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@__const.main.age = [5 x i32] [i32 7, i32 9, i32 5, i32 10, i32 14]
@__const.main.class = [5 x i32] [i32 2, i32 4, i32 1, i32 5, i32 9]
@.str = [44 x i8] c"%s is %d years old and studies in %d Class\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x [20 x i8]]
%3 = alloca [5 x i32]
%4 = alloca [5 x i32]
%5 = alloca i32
store i32 0, i32* %1
%6 = bitcast [5 x [20 x i8]]* %2 to i8*
%7 = bitcast [5 x i32]* %3 to i8*
%8 = bitcast [5 x i32]* %4 to i8*
store i32 0, i32* %5
store i32 0, i32* %5
br label %9
9: ; preds = %26, %0
%10 = load i32, i32* %5
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %29
12: ; preds = %9
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %2, i64 0, i64 %14
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
%17 = load i32, i32* %5
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [5 x i32], [5 x i32]* %3, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = load i32, i32* %5
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %4, i64 0, i64 %22
%24 = load i32, i32* %23
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %20, i32 %24)
br label %26
26: ; preds = %12
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %9
29: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@__const.main.name = [5 x [20 x i8]] [[20 x i8] c"Ram\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Mason\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Akbar\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"Emma\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [20 x i8] c"David\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str = [44 x i8] c"%s is %d years old and studies in %d Class\0A\00"
define i32 @main() {
%1 = alloca [5 x [20 x i8]]
%2 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%3 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %2, i32 7, i32 2)
%4 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 1, i64 0
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %4, i32 9, i32 4)
%6 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 2, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %6, i32 5, i32 1)
%8 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 3, i64 0
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %8, i32 10, i32 5)
%10 = getelementptr inbounds [5 x [20 x i8]], [5 x [20 x i8]]* %1, i64 0, i64 4, i64 0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i8* %10, i32 14, i32 9)
ret i32 0
}