#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*/ dispBytes(char *, int);
int /*<<< orphan*/ dispLongs(char *, int);
int /*<<< orphan*/ dispWords(char *, int);
int /*<<< orphan*/ printf(char *);
main(void) {
  char cArr[128];
  short ii;
  for (ii = 0; ii < 128; ii++)
    cArr[ii] = ii;
  printf("\nBytes\n");
  dispBytes(cArr, 128);
  printf("\nwords\n");
  dispWords(cArr, 64);
  printf("\nLongs\n");
  dispLongs(cArr, 32);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movl   $0x0,-0x4(%rbp)
movw   $0x0,-0x92(%rbp)
movswl -0x92(%rbp),%eax
cmp    $0x80,%eax
jge    119c <main+0x5c>
mov    -0x92(%rbp),%ax
mov    %al,%cl
movswq -0x92(%rbp),%rax
ff
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0x92(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0x92(%rbp)
jmp    115b <main+0x1b>
lea    0xe5d(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x80,%esi
call   1050 <dispBytes@plt>
lea    0xe48(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x40,%esi
call   1060 <dispWords@plt>
lea    0xe33(%rip),%rdi
call   1040 <printf@plt>
lea    -0x90(%rbp),%rdi
mov    $0x20,%esi
call   1030 <dispLongs@plt>
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
movaps 0xeb1(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xeb6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xebe(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xec2(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xec6(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xeca(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xece(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
lea    0xed2(%rip),%rdi
call   1040 <puts@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x80,%esi
call   1050 <dispBytes@plt>
lea    0xebd(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x40,%esi
call   1060 <dispWords@plt>
lea    0xeab(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <dispLongs@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"\0ABytes\0A\00"
@.str.1 = [8 x i8] c"\0Awords\0A\00"
@.str.2 = [8 x i8] c"\0ALongs\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [128 x i8]
%3 = alloca i16
store i32 0, i32* %1
store i16 0, i16* %3
br label %4
4: ; preds = %14, %0
%5 = load i16, i16* %3
%6 = sext i16 %5 to i32
%7 = icmp slt i32 %6, 128
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = load i16, i16* %3
%10 = trunc i16 %9 to i8
%11 = load i16, i16* %3
%12 = sext i16 %11 to i64
%13 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 %12
store i8 %10, i8* %13
br label %14
14: ; preds = %8
%15 = load i16, i16* %3
%16 = add i16 %15, 1
store i16 %16, i16* %3
br label %4
17: ; preds = %4
%18 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%19 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%20 = call i32 @dispBytes(i8* %19, i32 128)
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%22 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%23 = call i32 @dispWords(i8* %22, i32 64)
%24 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%25 = getelementptr inbounds [128 x i8], [128 x i8]* %2, i64 0, i64 0
%26 = call i32 @dispLongs(i8* %25, i32 32)
%27 = load i32, i32* %1
ret i32 %27
}

LLVM IR (-O2):
@str = [7 x i8] c"\0ABytes\00"
@str.3 = [7 x i8] c"\0Awords\00"
@str.4 = [7 x i8] c"\0ALongs\00"
define i32 @main() {
%1 = alloca [128 x i8]
%2 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 0
%3 = bitcast [128 x i8]* %1 to <16 x i8>*
store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, <16 x i8>* %3
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 16
%5 = bitcast i8* %4 to <16 x i8>*
store <16 x i8> <i8 16, i8 17, i8 18, i8 19, i8 20, i8 21, i8 22, i8 23, i8 24, i8 25, i8 26, i8 27, i8 28, i8 29, i8 30, i8 31>, <16 x i8>* %5
%6 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 32
%7 = bitcast i8* %6 to <16 x i8>*
store <16 x i8> <i8 32, i8 33, i8 34, i8 35, i8 36, i8 37, i8 38, i8 39, i8 40, i8 41, i8 42, i8 43, i8 44, i8 45, i8 46, i8 47>, <16 x i8>* %7
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 48
%9 = bitcast i8* %8 to <16 x i8>*
store <16 x i8> <i8 48, i8 49, i8 50, i8 51, i8 52, i8 53, i8 54, i8 55, i8 56, i8 57, i8 58, i8 59, i8 60, i8 61, i8 62, i8 63>, <16 x i8>* %9
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 64
%11 = bitcast i8* %10 to <16 x i8>*
store <16 x i8> <i8 64, i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79>, <16 x i8>* %11
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 80
%13 = bitcast i8* %12 to <16 x i8>*
store <16 x i8> <i8 80, i8 81, i8 82, i8 83, i8 84, i8 85, i8 86, i8 87, i8 88, i8 89, i8 90, i8 91, i8 92, i8 93, i8 94, i8 95>, <16 x i8>* %13
%14 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 96
%15 = bitcast i8* %14 to <16 x i8>*
store <16 x i8> <i8 96, i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111>, <16 x i8>* %15
%16 = getelementptr inbounds [128 x i8], [128 x i8]* %1, i64 0, i64 112
%17 = bitcast i8* %16 to <16 x i8>*
store <16 x i8> <i8 112, i8 113, i8 114, i8 115, i8 116, i8 117, i8 118, i8 119, i8 120, i8 121, i8 122, i8 123, i8 124, i8 125, i8 126, i8 127>, <16 x i8>* %17
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%19 = call i32 @dispBytes(i8* %2, i32 128)
%20 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.3, i64 0, i64 0))
%21 = call i32 @dispWords(i8* %2, i32 64)
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.4, i64 0, i64 0))
%23 = call i32 @dispLongs(i8* %2, i32 32)
ret i32 0
}