#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ ages;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int ages[] = {23, 43, 12, 89, 2};
  char *names[] = {"Allan", "Frank", "Marry", "John", "Lisa"};
  int count = sizeof(ages) / sizeof(int);
  int i = 0;
  for (i = 0; i < count; i++) {
    printf("%s has %d years alive.\n", names[i], ages[i]);
  }
  printf("---\n");
  int *cur_age = ages;
  char **cur_name = names;
  for (i = 0; i < count; i++) {
    printf("%s is %d years old.\n", *(cur_name + i), *(cur_age + i));
  }
  printf("---\n");
  for (cur_name = names, cur_age = ages; (cur_age - ages) < count;
       cur_name++, cur_age++) {
    printf("%s lived %d years so far.\n", *cur_name, *cur_age);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xec0(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xebd(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xebb(%rip),%eax
mov    %eax,-0x20(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
lea    0xea5(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xea0(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe9b(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe96(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe90(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x5,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    11ed <main+0xcd>
movslq -0x68(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rsi
movslq -0x68(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe58(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    11b4 <main+0x94>
lea    0xe54(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
lea    -0x60(%rbp),%rax
mov    %rax,-0x78(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    1251 <main+0x131>
mov    -0x78(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x70(%rbp),%rax
movslq -0x68(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xe11(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1212 <main+0xf2>
lea    0xdf0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rax
mov    %rax,-0x78(%rbp)
lea    -0x30(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
lea    -0x30(%rbp),%rcx
sub    %rcx,%rax
sar    $0x2,%rax
movslq -0x64(%rbp),%rcx
cmp    %rcx,%rax
jge    12c3 <main+0x1a3>
mov    -0x78(%rbp),%rax
mov    (%rax),%rsi
mov    -0x70(%rbp),%rax
mov    (%rax),%edx
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x78(%rbp)
mov    -0x70(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x70(%rbp)
jmp    126f <main+0x14f>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
lea    0xeea(%rip),%rbp
lea    0xec7(%rip),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb4(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea1(%rip),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8e(%rip),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x59,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7a(%rip),%rsi
mov    %rbp,%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb1(%rip),%rbp
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xe72(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %r13,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    $0x59,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r14,%rdi
lea    0xe03(%rip),%rbx
mov    %rbx,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
call   1030 <puts@plt>
lea    0xe17(%rip),%rbp
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
lea    0xda0(%rip),%rsi
mov    $0x59,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.ages = [5 x i32] [i32 23, i32 43, i32 12, i32 89, i32 2]
@.str = [6 x i8] c"Allan\00"
@.str.1 = [6 x i8] c"Frank\00"
@.str.2 = [6 x i8] c"Marry\00"
@.str.3 = [5 x i8] c"John\00"
@.str.4 = [5 x i8] c"Lisa\00"
@.str.5 = [24 x i8] c"%s has %d years alive.\0A\00"
@.str.6 = [5 x i8] c"---\0A\00"
@.str.7 = [21 x i8] c"%s is %d years old.\0A\00"
@.str.8 = [27 x i8] c"%s lived %d years so far.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [5 x i32]
%7 = alloca [5 x i8*]
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = bitcast [5 x i32]* %6 to i8*
%13 = bitcast [5 x i8*]* %7 to i8*
%14 = bitcast i8* %13 to [5 x i8*]*
%15 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 0
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 3
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds [5 x i8*], [5 x i8*]* %14, i32 0, i32 4
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i32 0, i32 0), i8** %19
store i32 5, i32* %8
store i32 0, i32* %9
store i32 0, i32* %9
br label %20
20: ; preds = %34, %2
%21 = load i32, i32* %9
%22 = load i32, i32* %8
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %37
24: ; preds = %20
%25 = load i32, i32* %9
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 %26
%28 = load i8*, i8** %27
%29 = load i32, i32* %9
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 %30
%32 = load i32, i32* %31
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %28, i32 %32)
br label %34
34: ; preds = %24
%35 = load i32, i32* %9
%36 = add nsw i32 %35, 1
store i32 %36, i32* %9
br label %20
37: ; preds = %20
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%39 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %39, i32** %10
%40 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
store i8** %40, i8*** %11
store i32 0, i32* %9
br label %41
41: ; preds = %57, %37
%42 = load i32, i32* %9
%43 = load i32, i32* %8
%44 = icmp slt i32 %42, %43
br i1 %44, label %45, label %60
45: ; preds = %41
%46 = load i8**, i8*** %11
%47 = load i32, i32* %9
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = load i32*, i32** %10
%52 = load i32, i32* %9
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i32, i32* %51, i64 %53
%55 = load i32, i32* %54
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* %50, i32 %55)
br label %57
57: ; preds = %45
%58 = load i32, i32* %9
%59 = add nsw i32 %58, 1
store i32 %59, i32* %9
br label %41
60: ; preds = %41
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%62 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
store i8** %62, i8*** %11
%63 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %63, i32** %10
br label %64
64: ; preds = %80, %60
%65 = load i32*, i32** %10
%66 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%67 = ptrtoint i32* %65 to i64
%68 = ptrtoint i32* %66 to i64
%69 = sub i64 %67, %68
%70 = sdiv exact i64 %69, 4
%71 = load i32, i32* %8
%72 = sext i32 %71 to i64
%73 = icmp slt i64 %70, %72
br i1 %73, label %74, label %85
74: ; preds = %64
%75 = load i8**, i8*** %11
%76 = load i8*, i8** %75
%77 = load i32*, i32** %10
%78 = load i32, i32* %77
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* %76, i32 %78)
br label %80
80: ; preds = %74
%81 = load i8**, i8*** %11
%82 = getelementptr inbounds i8*, i8** %81, i32 1
store i8** %82, i8*** %11
%83 = load i32*, i32** %10
%84 = getelementptr inbounds i32, i32* %83, i32 1
store i32* %84, i32** %10
br label %64
85: ; preds = %64
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"Allan\00"
@.str.1 = [6 x i8] c"Frank\00"
@.str.2 = [6 x i8] c"Marry\00"
@.str.3 = [5 x i8] c"John\00"
@.str.4 = [5 x i8] c"Lisa\00"
@.str.5 = [24 x i8] c"%s has %d years alive.\0A\00"
@.str.7 = [21 x i8] c"%s is %d years old.\0A\00"
@.str.8 = [27 x i8] c"%s lived %d years so far.\0A\00"
@str.9 = [4 x i8] c"---\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 23)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 43)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 12)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 89)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 2)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.9, i64 0, i64 0))
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 23)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 43)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 12)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 89)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 2)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.9, i64 0, i64 0))
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 23)
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 43)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 12)
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 89)
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 2)
ret i32 0
}