#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 */

/* Variables and functions */
char *getAnimal(int);
char *getElement(int);
char *getYY(int);
int /*<<< orphan*/ printf(char *, int, char *, char *, char *);
int main() {
  int years[] = {1935, 1938, 1968, 1972, 1976, 2017};
  int i;
  for (i = 0; i < 6; ++i) {
    int year = years[i];
    printf("%d is the year of the %s %s (%s).\n", year, getElement(year),
           getAnimal(year), getYY(year));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea4(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x6,-0x24(%rbp)
jge    11da <main+0x9a>
movslq -0x24(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x28(%rbp),%edi
call   1030 <getElement@plt>
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%edi
call   1060 <getAnimal@plt>
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%edi
call   1050 <getYY@plt>
mov    -0x3c(%rbp),%esi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    %rax,%r8
lea    0xe51(%rip),%rdi
call   1040 <printf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1177 <main+0x37>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
mov    $0x78f,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x78f,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x78f,%edi
call   1050 <getYY@plt>
lea    0xe90(%rip),%r14
mov    %r14,%rdi
mov    $0x78f,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
mov    $0x792,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x792,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x792,%edi
call   1050 <getYY@plt>
mov    %r14,%rdi
mov    $0x792,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
mov    $0x7b0,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x7b0,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x7b0,%edi
call   1050 <getYY@plt>
mov    %r14,%rdi
mov    $0x7b0,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
mov    $0x7b4,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x7b4,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x7b4,%edi
call   1050 <getYY@plt>
mov    %r14,%rdi
mov    $0x7b4,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
mov    $0x7b8,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x7b8,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x7b8,%edi
call   1050 <getYY@plt>
mov    %r14,%rdi
mov    $0x7b8,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
mov    $0x7e1,%edi
call   1030 <getElement@plt>
mov    %rax,%r15
mov    $0x7e1,%edi
call   1060 <getAnimal@plt>
mov    %rax,%rbx
mov    $0x7e1,%edi
call   1050 <getYY@plt>
mov    %r14,%rdi
mov    $0x7e1,%esi
mov    %r15,%rdx
mov    %rbx,%rcx
mov    %rax,%r8
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.years = [6 x i32] [i32 1935, i32 1938, i32 1968, i32 1972, i32 1976, i32 2017]
@.str = [35 x i8] c"%d is the year of the %s %s (%s).\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [6 x i32]* %2 to i8*
store i32 0, i32* %3
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 6
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [6 x i32], [6 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = load i32, i32* %4
%16 = call i8* @getElement(i32 %15)
%17 = load i32, i32* %4
%18 = call i8* @getAnimal(i32 %17)
%19 = load i32, i32* %4
%20 = call i8* @getYY(i32 %19)
%21 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %14, i8* %16, i8* %18, i8* %20)
br label %22
22: ; preds = %9
%23 = load i32, i32* %3
%24 = add nsw i32 %23, 1
store i32 %24, i32* %3
br label %6
25: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"%d is the year of the %s %s (%s).\0A\00"
define i32 @main() {
%1 = tail call i8* @getElement(i32 1935)
%2 = tail call i8* @getAnimal(i32 1935)
%3 = tail call i8* @getYY(i32 1935)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1935, i8* %1, i8* %2, i8* %3)
%5 = tail call i8* @getElement(i32 1938)
%6 = tail call i8* @getAnimal(i32 1938)
%7 = tail call i8* @getYY(i32 1938)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1938, i8* %5, i8* %6, i8* %7)
%9 = tail call i8* @getElement(i32 1968)
%10 = tail call i8* @getAnimal(i32 1968)
%11 = tail call i8* @getYY(i32 1968)
%12 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1968, i8* %9, i8* %10, i8* %11)
%13 = tail call i8* @getElement(i32 1972)
%14 = tail call i8* @getAnimal(i32 1972)
%15 = tail call i8* @getYY(i32 1972)
%16 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1972, i8* %13, i8* %14, i8* %15)
%17 = tail call i8* @getElement(i32 1976)
%18 = tail call i8* @getAnimal(i32 1976)
%19 = tail call i8* @getYY(i32 1976)
%20 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 1976, i8* %17, i8* %18, i8* %19)
%21 = tail call i8* @getElement(i32 2017)
%22 = tail call i8* @getAnimal(i32 2017)
%23 = tail call i8* @getYY(i32 2017)
%24 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 2017, i8* %21, i8* %22, i8* %23)
ret i32 0
}