int main(void) {
  const char *mytalents[5] = {
      "Adding numbers swiftly", "Multiplying accurately", "Stashing data",
      "Following instructions to the letter", "Understanding the C language"};
  char yourtalents[5][40] = {"Walking in a straight line", "Sleeping",
                             "Watching television", "Mailing letters",
                             "Reading email"};
  int i;
  puts("Let's compare talents.");
  printf("%-36s %-25s\n", "My Talents", "Your Talents");
  for (i = 0; i < 5; i++)
    printf("%-36s %-25s\n", mytalents[i], yourtalents[i]);
  printf("\nsizeof mytalents: %zd, sizeof yourtalents: %zd\n",
         sizeof(mytalents), sizeof(yourtalents));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1050 <memset@plt>
lea    0xe97(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xea3(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeaf(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xeb2(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x100(%rbp),%rdi
lea    0xf49(%rip),%rsi
mov    $0xc8,%edx
call   1060 <memcpy@plt>
lea    0xec6(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xecf(%rip),%rdi
lea    0xed5(%rip),%rsi
lea    0xed9(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x104(%rbp)
cmpl   $0x5,-0x104(%rbp)
jge    1235 <main+0xf5>
movslq -0x104(%rbp),%rax
mov    -0x30(%rbp,%rax,8),%rsi
movslq -0x104(%rbp),%rax
lea    -0x100(%rbp),%rdx
imul   $0x28,%rax,%rax
add    %rax,%rdx
lea    0xe7b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    11e5 <main+0xa5>
lea    0xe7e(%rip),%rdi
mov    $0x28,%esi
mov    $0xc8,%edx
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xc8,%rsp
lea    0xfaf(%rip),%rsi
mov    %rsp,%r14
mov    $0xc8,%edx
mov    %r14,%rdi
call   1050 <memcpy@plt>
lea    0xf26(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xf2f(%rip),%rbx
lea    0xf35(%rip),%rsi
lea    0xf39(%rip),%rdx
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7b(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x28(%rsp),%rdx
lea    0xe79(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x50(%rsp),%rdx
lea    0xe7a(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0x78(%rsp),%rdx
lea    0xe72(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xa0(%rsp),%rdx
lea    0xe7e(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xec6(%rip),%rdi
mov    $0x28,%esi
mov    $0xc8,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Adding numbers swiftly\00"
@.str.1 = [23 x i8] c"Multiplying accurately\00"
@.str.2 = [14 x i8] c"Stashing data\00"
@.str.3 = [37 x i8] c"Following instructions to the letter\00"
@.str.4 = [29 x i8] c"Understanding the C language\00"
@__const.main.yourtalents = [5 x [40 x i8]] [[40 x i8] c"Walking in a straight line\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Sleeping\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Watching television\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Mailing letters\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Reading email\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str.5 = [23 x i8] c"Let's compare talents.\00"
@.str.6 = [13 x i8] c"%-36s %-25s\0A\00"
@.str.7 = [11 x i8] c"My Talents\00"
@.str.8 = [13 x i8] c"Your Talents\00"
@.str.9 = [49 x i8] c"\0Asizeof mytalents: %zd, sizeof yourtalents: %zd\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i8*]
%3 = alloca [5 x [40 x i8]]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [5 x i8*]* %2 to i8*
%6 = bitcast i8* %5 to [5 x i8*]*
%7 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 0
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 1
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 2
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 3
store i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [5 x i8*], [5 x i8*]* %6, i32 0, i32 4
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i32 0, i32 0), i8** %11
%12 = bitcast [5 x [40 x i8]]* %3 to i8*
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %4
br label %15
15: ; preds = %28, %0
%16 = load i32, i32* %4
%17 = icmp slt i32 %16, 5
br i1 %17, label %18, label %31
18: ; preds = %15
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [5 x i8*], [5 x i8*]* %2, i64 0, i64 %20
%22 = load i8*, i8** %21
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %3, i64 0, i64 %24
%26 = getelementptr inbounds [40 x i8], [40 x i8]* %25, i64 0, i64 0
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* %22, i8* %26)
br label %28
28: ; preds = %18
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %15
31: ; preds = %15
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i64 40, i64 200)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"Adding numbers swiftly\00"
@.str.1 = [23 x i8] c"Multiplying accurately\00"
@.str.2 = [14 x i8] c"Stashing data\00"
@.str.3 = [37 x i8] c"Following instructions to the letter\00"
@.str.4 = [29 x i8] c"Understanding the C language\00"
@__const.main.yourtalents = [5 x [40 x i8]] [[40 x i8] c"Walking in a straight line\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Sleeping\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Watching television\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Mailing letters\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", [40 x i8] c"Reading email\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"]
@.str.5 = [23 x i8] c"Let's compare talents.\00"
@.str.6 = [13 x i8] c"%-36s %-25s\0A\00"
@.str.7 = [11 x i8] c"My Talents\00"
@.str.8 = [13 x i8] c"Your Talents\00"
@.str.9 = [49 x i8] c"\0Asizeof mytalents: %zd, sizeof yourtalents: %zd\0A\00"
define i32 @main() {
%1 = alloca [5 x [40 x i8]]
%2 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %1, i64 0, i64 0, i64 0
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%6 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %1, i64 0, i64 1, i64 0
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %1, i64 0, i64 2, i64 0
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* %8)
%10 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %1, i64 0, i64 3, i64 0
%11 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i8* %10)
%12 = getelementptr inbounds [5 x [40 x i8]], [5 x [40 x i8]]* %1, i64 0, i64 4, i64 0
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.4, i64 0, i64 0), i8* %12)
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i64 40, i64 200)
ret i32 0
}