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

/* Variables and functions */
scalar_t__ isBigEndian();
int /*<<< orphan*/ printNum(int);
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Austin Parrish\n");
  if (isBigEndian() == 0) {
    printf("Computer is Little endian \n");
  } else {
    printf("Computer is Big endian \n");
  }
  long long test = 1;
  printf("sizeof(short) = %d\n", (int)sizeof(short));
  printf("sizeof(int) = %d\n", (int)sizeof(int));
  printf("sizeof(long) = %d\n", (int)sizeof(long));
  printf("sizeof(long long) = %u\n", (int)sizeof(test));
  printf("Dec\tHex\t\tBinary\n");
  for (int i = -3; i <= 10; i++) {
    printNum(i);
    printf("\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <isBigEndian@plt>
cmp    $0x0,%rax
jne    1171 <main+0x41>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    117f <main+0x4f>
lea    0xeb4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movq   $0x1,-0x10(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xeb7(%rip),%rdi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xfffffffd,-0x14(%rbp)
cmpl   $0xa,-0x14(%rbp)
jg     1216 <main+0xe6>
mov    -0x14(%rbp),%edi
call   1050 <printNum@plt>
lea    0xe29(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11e8 <main+0xb8>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef9(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1050 <isBigEndian@plt>
test   %rax,%rax
lea    0xf1a(%rip),%rax
lea    0xeeb(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
lea    0xe7b(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe7c(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe7b(%rip),%rdi
mov    $0x8,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xea7(%rip),%rdi
call   1040 <puts@plt>
mov    $0xfffffffd,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xfffffffe,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xffffffff,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x3,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x5,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x6,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x7,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x9,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0xa,%edi
call   1070 <printNum@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"Austin Parrish\0A\00"
@.str.1 = [28 x i8] c"Computer is Little endian \0A\00"
@.str.2 = [25 x i8] c"Computer is Big endian \0A\00"
@.str.3 = [20 x i8] c"sizeof(short) = %d\0A\00"
@.str.4 = [18 x i8] c"sizeof(int) = %d\0A\00"
@.str.5 = [19 x i8] c"sizeof(long) = %d\0A\00"
@.str.6 = [24 x i8] c"sizeof(long long) = %u\0A\00"
@.str.7 = [17 x i8] c"Dec\09Hex\09\09Binary\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%5 = call i64 (...) @isBigEndian()
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %11
9: ; preds = %0
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.2, i64 0, i64 0))
br label %11
11: ; preds = %9, %7
store i64 1, i64* %2
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 2)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 4)
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 8)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 8)
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
store i32 -3, i32* %3
br label %17
17: ; preds = %24, %11
%18 = load i32, i32* %3
%19 = icmp sle i32 %18, 10
br i1 %19, label %20, label %27
20: ; preds = %17
%21 = load i32, i32* %3
%22 = call i32 @printNum(i32 %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %24
24: ; preds = %20
%25 = load i32, i32* %3
%26 = add nsw i32 %25, 1
store i32 %26, i32* %3
br label %17
27: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [20 x i8] c"sizeof(short) = %d\0A\00"
@.str.4 = [18 x i8] c"sizeof(int) = %d\0A\00"
@.str.5 = [19 x i8] c"sizeof(long) = %d\0A\00"
@.str.6 = [24 x i8] c"sizeof(long long) = %u\0A\00"
@str = [15 x i8] c"Austin Parrish\00"
@str.9 = [24 x i8] c"Computer is Big endian \00"
@str.10 = [16 x i8] c"Dec\09Hex\09\09Binary\00"
@str.11 = [27 x i8] c"Computer is Little endian \00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i64 (...) @isBigEndian()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @str.11, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str.9, i64 0, i64 0)
%5 = tail call i32 @puts(i8* dereferenceable(1) %4)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 2)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0), i32 4)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 8)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.6, i64 0, i64 0), i32 8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.10, i64 0, i64 0))
%11 = tail call i32 @printNum(i32 -3)
%12 = tail call i32 @putchar(i32 10)
%13 = tail call i32 @printNum(i32 -2)
%14 = tail call i32 @putchar(i32 10)
%15 = tail call i32 @printNum(i32 -1)
%16 = tail call i32 @putchar(i32 10)
%17 = tail call i32 @printNum(i32 0)
%18 = tail call i32 @putchar(i32 10)
%19 = tail call i32 @printNum(i32 1)
%20 = tail call i32 @putchar(i32 10)
%21 = tail call i32 @printNum(i32 2)
%22 = tail call i32 @putchar(i32 10)
%23 = tail call i32 @printNum(i32 3)
%24 = tail call i32 @putchar(i32 10)
%25 = tail call i32 @printNum(i32 4)
%26 = tail call i32 @putchar(i32 10)
%27 = tail call i32 @printNum(i32 5)
%28 = tail call i32 @putchar(i32 10)
%29 = tail call i32 @printNum(i32 6)
%30 = tail call i32 @putchar(i32 10)
%31 = tail call i32 @printNum(i32 7)
%32 = tail call i32 @putchar(i32 10)
%33 = tail call i32 @printNum(i32 8)
%34 = tail call i32 @putchar(i32 10)
%35 = tail call i32 @printNum(i32 9)
%36 = tail call i32 @putchar(i32 10)
%37 = tail call i32 @printNum(i32 10)
%38 = tail call i32 @putchar(i32 10)
ret i32 0
}