#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, 90, 2};
  char *names[] = {"Alan", "Frank", "Mary", "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_ages = ages;
  char **cur_names = names;
  for (i = 0; i < count; i++) {
    printf("%s is %d years old\n", cur_names[i], cur_ages[i]);
  }
  printf("---\n");
  for (i = 0; i < count; i++) {
    printf("%s is %d years old\n", *(cur_names + i), *(cur_ages + i));
  }
  printf("---\n");
  for (cur_names = names, cur_ages = ages; (cur_ages - ages) < count;
       cur_names++, cur_ages++) {
    printf("%s is %d years old\n", *cur_names, *cur_ages);
  }
  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    0xe9f(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe94(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe8e(%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    0xe56(%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    0xe52(%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    0xe0f(%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    0xdee(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x68(%rbp)
mov    -0x68(%rbp),%eax
cmp    -0x64(%rbp),%eax
jge    12a5 <main+0x185>
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    0xdbb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x68(%rbp)
jmp    1266 <main+0x146>
lea    0xd9a(%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    1317 <main+0x1f7>
mov    -0x78(%rbp),%rax
mov    (%rax),%rsi
mov    -0x70(%rbp),%rax
mov    (%rax),%edx
lea    0xd58(%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    12c3 <main+0x1a3>
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    0xee8(%rip),%rbp
lea    0xec7(%rip),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb3(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea0(%rip),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe8c(%rip),%rsi
mov    %rbp,%rdi
mov    $0x5a,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe7b(%rip),%rsi
mov    %rbp,%rdi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe96(%rip),%rdi
call   1030 <puts@plt>
lea    0xe76(%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    0xe14(%rip),%rsi
mov    %rsi,%rbx
mov    $0x5a,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
lea    0xe00(%rip),%rsi
mov    %rsi,%r14
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe1b(%rip),%rdi
call   1030 <puts@plt>
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
mov    %rbx,%rsi
mov    $0x5a,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xdb5(%rip),%rdi
call   1030 <puts@plt>
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
mov    %rbx,%rsi
mov    $0x5a,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r14,%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 90, i32 2]
@.str = [5 x i8] c"Alan\00"
@.str.1 = [6 x i8] c"Frank\00"
@.str.2 = [5 x i8] c"Mary\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 = [20 x i8] c"%s is %d years old\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 ([5 x i8], [5 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 ([5 x i8], [5 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 ([20 x i8], [20 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))
store i32 0, i32* %9
br label %62
62: ; preds = %78, %60
%63 = load i32, i32* %9
%64 = load i32, i32* %8
%65 = icmp slt i32 %63, %64
br i1 %65, label %66, label %81
66: ; preds = %62
%67 = load i8**, i8*** %11
%68 = load i32, i32* %9
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8*, i8** %67, i64 %69
%71 = load i8*, i8** %70
%72 = load i32*, i32** %10
%73 = load i32, i32* %9
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %72, i64 %74
%76 = load i32, i32* %75
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %71, i32 %76)
br label %78
78: ; preds = %66
%79 = load i32, i32* %9
%80 = add nsw i32 %79, 1
store i32 %80, i32* %9
br label %62
81: ; preds = %62
%82 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
%83 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
store i8** %83, i8*** %11
%84 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %84, i32** %10
br label %85
85: ; preds = %101, %81
%86 = load i32*, i32** %10
%87 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%88 = ptrtoint i32* %86 to i64
%89 = ptrtoint i32* %87 to i64
%90 = sub i64 %88, %89
%91 = sdiv exact i64 %90, 4
%92 = load i32, i32* %8
%93 = sext i32 %92 to i64
%94 = icmp slt i64 %91, %93
br i1 %94, label %95, label %106
95: ; preds = %85
%96 = load i8**, i8*** %11
%97 = load i8*, i8** %96
%98 = load i32*, i32** %10
%99 = load i32, i32* %98
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* %97, i32 %99)
br label %101
101: ; preds = %95
%102 = load i8**, i8*** %11
%103 = getelementptr inbounds i8*, i8** %102, i32 1
store i8** %103, i8*** %11
%104 = load i32*, i32** %10
%105 = getelementptr inbounds i32, i32* %104, i32 1
store i32* %105, i32** %10
br label %85
106: ; preds = %85
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"Alan\00"
@.str.1 = [6 x i8] c"Frank\00"
@.str.2 = [5 x i8] c"Mary\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 = [20 x i8] c"%s is %d years old\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 ([5 x i8], [5 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 ([5 x i8], [5 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 90)
%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 ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 23)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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 ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 90)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 23)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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)
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 90)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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)
%20 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.9, i64 0, i64 0))
%21 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 23)
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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)
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 12)
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 90)
%25 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 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)
ret i32 0
}