#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[] = {"Juan", "Perez", "Maria", "July", "Matias"};
  int count = sizeof(ages) / sizeof(int);
  int i = 0;
  for (i = count, i--; i >= 0; i--) {
    printf("%s has %d years alive.\n", names[i], ages[i]);
  }
  printf("---------------------------------------\n");
  int *cur_age = ages;
  char **cur_name = names;
  for (i = count, i--; i >= 0; i--) {
    printf("%s is %d years old.\n", *(cur_name + i), *(cur_age + i));
  }
  printf("----------------------------------------\n");
  for (cur_name = (names + (count - 1)), cur_age = (ages + (count - 1));
       (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    0xe9f(%rip),%rax
mov    %rax,-0x58(%rbp)
lea    0xe9a(%rip),%rax
mov    %rax,-0x50(%rbp)
lea    0xe95(%rip),%rax
mov    %rax,-0x48(%rbp)
lea    0xe8f(%rip),%rax
mov    %rax,-0x40(%rbp)
movl   $0x5,-0x64(%rbp)
movl   $0x0,-0x68(%rbp)
mov    -0x64(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x68(%rbp)
jl     11f3 <main+0xd3>
movslq -0x68(%rbp),%rax
mov    -0x60(%rbp,%rax,8),%rsi
movslq -0x68(%rbp),%rax
mov    -0x30(%rbp,%rax,4),%edx
lea    0xe53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x68(%rbp)
jmp    11bc <main+0x9c>
lea    0xe65(%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)
mov    -0x64(%rbp),%eax
mov    %eax,-0x68(%rbp)
mov    -0x68(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x68(%rbp)
cmpl   $0x0,-0x68(%rbp)
jl     125d <main+0x13d>
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    0xe01(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x68(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x68(%rbp)
jmp    1220 <main+0x100>
lea    0xdfa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x60(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
lea    -0x30(%rbp),%rax
mov    -0x64(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
shl    $0x2,%rcx
add    %rcx,%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
jl     12ef <main+0x1cf>
mov    -0x78(%rbp),%rax
mov    (%rax),%rsi
mov    -0x70(%rbp),%rax
mov    (%rax),%edx
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x78(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x78(%rbp)
mov    -0x70(%rbp),%rax
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x70(%rbp)
jmp    129b <main+0x17b>
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    0xeeb(%rip),%rbp
lea    0xedd(%rip),%r14
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xebf(%rip),%r15
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x59,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea0(%rip),%r12
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe81(%rip),%r13
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe63(%rip),%rbx
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe95(%rip),%rdi
call   1030 <puts@plt>
lea    0xe73(%rip),%rbp
mov    %rbp,%rdi
mov    %r14,%rsi
mov    $0x2,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    $0x59,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    $0xc,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %r13,%rsi
mov    $0x2b,%edx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    $0x17,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe27(%rip),%rdi
call   1030 <puts@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 = [5 x i8] c"Juan\00"
@.str.1 = [6 x i8] c"Perez\00"
@.str.2 = [6 x i8] c"Maria\00"
@.str.3 = [5 x i8] c"July\00"
@.str.4 = [7 x i8] c"Matias\00"
@.str.5 = [24 x i8] c"%s has %d years alive.\0A\00"
@.str.6 = [41 x i8] c"---------------------------------------\0A\00"
@.str.7 = [21 x i8] c"%s is %d years old.\0A\00"
@.str.8 = [42 x i8] c"----------------------------------------\0A\00"
@.str.9 = [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 ([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 ([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 ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8** %19
store i32 5, i32* %8
store i32 0, i32* %9
%20 = load i32, i32* %8
store i32 %20, i32* %9
%21 = load i32, i32* %9
%22 = add nsw i32 %21, -1
store i32 %22, i32* %9
br label %23
23: ; preds = %36, %2
%24 = load i32, i32* %9
%25 = icmp sge i32 %24, 0
br i1 %25, label %26, label %39
26: ; preds = %23
%27 = load i32, i32* %9
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 %28
%30 = load i8*, i8** %29
%31 = load i32, i32* %9
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 %32
%34 = load i32, i32* %33
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i8* %30, i32 %34)
br label %36
36: ; preds = %26
%37 = load i32, i32* %9
%38 = add nsw i32 %37, -1
store i32 %38, i32* %9
br label %23
39: ; preds = %23
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0))
%41 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
store i32* %41, i32** %10
%42 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
store i8** %42, i8*** %11
%43 = load i32, i32* %8
store i32 %43, i32* %9
%44 = load i32, i32* %9
%45 = add nsw i32 %44, -1
store i32 %45, i32* %9
br label %46
46: ; preds = %61, %39
%47 = load i32, i32* %9
%48 = icmp sge i32 %47, 0
br i1 %48, label %49, label %64
49: ; preds = %46
%50 = load i8**, i8*** %11
%51 = load i32, i32* %9
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = load i32*, i32** %10
%56 = load i32, i32* %9
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.7, i64 0, i64 0), i8* %54, i32 %59)
br label %61
61: ; preds = %49
%62 = load i32, i32* %9
%63 = add nsw i32 %62, -1
store i32 %63, i32* %9
br label %46
64: ; preds = %46
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0))
%66 = getelementptr inbounds [5 x i8*], [5 x i8*]* %7, i64 0, i64 0
%67 = load i32, i32* %8
%68 = sub nsw i32 %67, 1
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds i8*, i8** %66, i64 %69
store i8** %70, i8*** %11
%71 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%72 = load i32, i32* %8
%73 = sub nsw i32 %72, 1
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %71, i64 %74
store i32* %75, i32** %10
br label %76
76: ; preds = %92, %64
%77 = load i32*, i32** %10
%78 = getelementptr inbounds [5 x i32], [5 x i32]* %6, i64 0, i64 0
%79 = ptrtoint i32* %77 to i64
%80 = ptrtoint i32* %78 to i64
%81 = sub i64 %79, %80
%82 = sdiv exact i64 %81, 4
%83 = load i32, i32* %8
%84 = sext i32 %83 to i64
%85 = icmp sge i64 %82, %84
br i1 %85, label %86, label %97
86: ; preds = %76
%87 = load i8**, i8*** %11
%88 = load i8*, i8** %87
%89 = load i32*, i32** %10
%90 = load i32, i32* %89
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.9, i64 0, i64 0), i8* %88, i32 %90)
br label %92
92: ; preds = %86
%93 = load i8**, i8*** %11
%94 = getelementptr inbounds i8*, i8** %93, i32 -1
store i8** %94, i8*** %11
%95 = load i32*, i32** %10
%96 = getelementptr inbounds i32, i32* %95, i32 -1
store i32* %96, i32** %10
br label %76
97: ; preds = %76
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"Juan\00"
@.str.1 = [6 x i8] c"Perez\00"
@.str.2 = [6 x i8] c"Maria\00"
@.str.3 = [5 x i8] c"July\00"
@.str.4 = [7 x i8] c"Matias\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 = [40 x i8] c"---------------------------------------\00"
@str.10 = [41 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 ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
%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 ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 89)
%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 ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 43)
%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, i64 0, i64 0), i32 23)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, 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 ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 2)
%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 ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 89)
%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 ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 43)
%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, i64 0, i64 0), i32 23)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.10, i64 0, i64 0))
ret i32 0
}