#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*/ printf(char *, ...);
void reportAlphabet(unsigned char alphabet[], unsigned int alphabetsize) {
  unsigned int i;
  printf("ALPHABET:\n");
  for (i = 0; i < alphabetsize; i++) {
    if ((alphabet[i] >= 32) && (alphabet[i] <= 126)) {
      printf("(%c)", alphabet[i]);
    } else {
      printf("(#%u)", alphabet[i]);
    }
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<reportAlphabet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    11b2 <reportAlphabet+0xa2>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     1186 <reportAlphabet+0x76>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%eax
cmp    $0x7e,%eax
jg     1186 <reportAlphabet+0x76>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
lea    0xe91(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    119f <reportAlphabet+0x8f>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
movzbl (%rax,%rcx,1),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11a4 <reportAlphabet+0x94>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1134 <reportAlphabet+0x24>
lea    0xe50(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportAlphabet>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r12
lea    0xec7(%rip),%rdi
call   1040 <puts@plt>
test   %ebp,%ebp
je     1194 <reportAlphabet+0x64>
mov    %ebp,%ebp
lea    0xeaa(%rip),%r14
lea    0xea8(%rip),%r15
xor    %ebx,%ebx
jmp    1180 <reportAlphabet+0x50>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
je     1194 <reportAlphabet+0x64>
movzbl (%r12,%rbx,1),%esi
lea    -0x20(%rsi),%eax
mov    %r14,%rdi
cmp    $0x5f,%al
jb     1170 <reportAlphabet+0x40>
mov    %r15,%rdi
jmp    1170 <reportAlphabet+0x40>
mov    $0xa,%edi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ALPHABET:\0A\00"
@.str.1 = [5 x i8] c"(%c)\00"
@.str.2 = [6 x i8] c"(#%u)\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @reportAlphabet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %5
br label %7
7: ; preds = %44, %2
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = icmp ult i32 %8, %9
br i1 %10, label %11, label %47
11: ; preds = %7
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = icmp sge i32 %17, 32
br i1 %18, label %19, label %35
19: ; preds = %11
%20 = load i8*, i8** %3
%21 = load i32, i32* %5
%22 = zext i32 %21 to i64
%23 = getelementptr inbounds i8, i8* %20, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = icmp sle i32 %25, 126
br i1 %26, label %27, label %35
27: ; preds = %19
%28 = load i8*, i8** %3
%29 = load i32, i32* %5
%30 = zext i32 %29 to i64
%31 = getelementptr inbounds i8, i8* %28, i64 %30
%32 = load i8, i8* %31
%33 = zext i8 %32 to i32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i32 %33)
br label %43
35: ; preds = %19, %11
%36 = load i8*, i8** %3
%37 = load i32, i32* %5
%38 = zext i32 %37 to i64
%39 = getelementptr inbounds i8, i8* %36, i64 %38
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 %41)
br label %43
43: ; preds = %35, %27
br label %44
44: ; preds = %43
%45 = load i32, i32* %5
%46 = add i32 %45, 1
store i32 %46, i32* %5
br label %7
47: ; preds = %7
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [5 x i8] c"(%c)\00"
@.str.2 = [6 x i8] c"(#%u)\00"
@str = [10 x i8] c"ALPHABET:\00"
define void @reportAlphabet(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = icmp eq i32 %1, 0
br i1 %4, label %18, label %5
5: ; preds = %2
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %16, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add i8 %10, -32
%13 = icmp ult i8 %12, 95
%14 = select i1 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %14, i32 %11)
%16 = add nuw nsw i64 %8, 1
%17 = icmp eq i64 %16, %6
br i1 %17, label %18, label %7
18: ; preds = %7, %2
%19 = tail call i32 @putchar(i32 10)
ret void
}