#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 */
int /*<<< orphan*/ printChar(char);
int /*<<< orphan*/ printInt(int);
int /*<<< orphan*/ print_arr(int *, int);
int /*<<< orphan*/ str_arr(char *, int);
void main() {
  int i = 5;
  int array[5] = {10, 20, 32, 42, 16};
  char name[7] = "Gregory";
  str_arr(name, 7);
  printChar('\n');
  for (i = 0; i < 5; i++) {
    printInt(array[i]);
    printChar(' ');
  }
  print_arr(array, 5);
  printChar('\n');
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x5,-0x4(%rbp)
mov    0xeaa(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xea7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xea5(%rip),%eax
mov    %eax,-0x10(%rbp)
mov    0xea0(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xe9a(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xe92(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x27(%rbp),%rdi
mov    $0x7,%esi
call   1060 <str_arr@plt>
mov    $0xa,%edi
call   1050 <printChar@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    11d9 <main+0x99>
movslq -0x4(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    11aa <main+0x6a>
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <print_arr@plt>
mov    $0xa,%edi
call   1050 <printChar@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xec6(%rip),%eax
mov    %eax,0x20(%rsp)
movaps 0xeab(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x79726f67,0xb(%rsp)
79
movl   $0x67657247,0x8(%rsp)
67
lea    0x8(%rsp),%rdi
mov    $0x7,%esi
call   1060 <str_arr@plt>
mov    $0xa,%edi
call   1050 <printChar@plt>
mov    $0xa,%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
mov    $0x14,%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
mov    $0x20,%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
mov    $0x2a,%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
mov    $0x10,%edi
call   1030 <printInt@plt>
mov    $0x20,%edi
call   1050 <printChar@plt>
lea    0x10(%rsp),%rdi
mov    $0x5,%esi
call   1040 <print_arr@plt>
mov    $0xa,%edi
call   1050 <printChar@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [5 x i32] [i32 10, i32 20, i32 32, i32 42, i32 16]
@__const.main.name = [7 x i8] c"Gregory"
define void @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [7 x i8]
store i32 5, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
%5 = bitcast [7 x i8]* %3 to i8*
%6 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%7 = call i32 @str_arr(i8* %6, i32 7)
%8 = call i32 @printChar(i8 signext 10)
store i32 0, i32* %1
br label %9
9: ; preds = %19, %0
%10 = load i32, i32* %1
%11 = icmp slt i32 %10, 5
br i1 %11, label %12, label %22
12: ; preds = %9
%13 = load i32, i32* %1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printInt(i32 %16)
%18 = call i32 @printChar(i8 signext 32)
br label %19
19: ; preds = %12
%20 = load i32, i32* %1
%21 = add nsw i32 %20, 1
store i32 %21, i32* %1
br label %9
22: ; preds = %9
%23 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%24 = call i32 @print_arr(i32* %23, i32 5)
%25 = call i32 @printChar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@__const.main.array = [5 x i32] [i32 10, i32 20, i32 32, i32 42, i32 16]
@__const.main.name = [7 x i8] c"Gregory"
define void @main() {
%1 = alloca [5 x i32]
%2 = alloca [7 x i8]
%3 = bitcast [5 x i32]* %1 to i8*
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%5 = call i32 @str_arr(i8* %4, i32 7)
%6 = call i32 @printChar(i8 signext 10)
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%8 = call i32 @printInt(i32 10)
%9 = call i32 @printChar(i8 signext 32)
%10 = call i32 @printInt(i32 20)
%11 = call i32 @printChar(i8 signext 32)
%12 = call i32 @printInt(i32 32)
%13 = call i32 @printChar(i8 signext 32)
%14 = call i32 @printInt(i32 42)
%15 = call i32 @printChar(i8 signext 32)
%16 = call i32 @printInt(i32 16)
%17 = call i32 @printChar(i8 signext 32)
%18 = call i32 @print_arr(i32* %7, i32 5)
%19 = call i32 @printChar(i8 signext 10)
ret void
}