#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*/ banner(char);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ parse(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int main(int argc, char *argv[]) {
  if (argc != 2) {
    fputs("./a.out <uppercases>\n", stderr);
    exit(0);
  }
  int i;
  for (i = 0; 'A' <= argv[1][i] && argv[1][i] <= 'Z'; i++)
    parse(banner(argv[1][i]));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     117c <main+0x3c>
mov    0x2e79(%rip),%rax
mov    (%rax),%esi
lea    0xe90(%rip),%rdi
call   1030 <fputs@plt>
xor    %edi,%edi
call   1060 <exit@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
xor    %eax,%eax
mov    $0x41,%ecx
cmp    %edx,%ecx
mov    %al,-0x15(%rbp)
jg     11be <main+0x7e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    11ce <main+0x8e>
jmp    11f8 <main+0xb8>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <banner@plt>
mov    %eax,%edi
call   1050 <parse@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1183 <main+0x43>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
cmp    $0x2,%edi
jne    118d <main+0x4d>
mov    %rsi,%r14
mov    0x8(%rsi),%rax
mov    (%rax),%al
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     1183 <main+0x43>
mov    $0x1,%ebx
nop
movsbl %al,%edi
call   1040 <banner@plt>
mov    %eax,%edi
call   1050 <parse@plt>
mov    0x8(%r14),%rax
movzbl (%rax,%rbx,1),%eax
lea    -0x41(%rax),%ecx
add    $0x1,%rbx
cmp    $0x1a,%cl
jb     1160 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e4c(%rip),%rax
mov    (%rax),%esi
lea    0xe63(%rip),%rdi
call   1030 <fputs@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"./a.out <uppercases>\0A\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = load i32, i32* @stderr
%11 = call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %2
store i32 0, i32* %6
br label %14
14: ; preds = %46, %13
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp sle i32 65, %22
br i1 %23, label %24, label %34
24: ; preds = %14
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = load i32, i32* %6
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = icmp sle i32 %32, 90
br label %34
34: ; preds = %24, %14
%35 = phi i1 [ false, %14 ], [ %33, %24 ]
br i1 %35, label %36, label %49
36: ; preds = %34
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = load i32, i32* %6
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds i8, i8* %39, i64 %41
%43 = load i8, i8* %42
%44 = call i32 @banner(i8 signext %43)
%45 = call i32 @parse(i32 %44)
br label %46
46: ; preds = %36
%47 = load i32, i32* %6
%48 = add nsw i32 %47, 1
store i32 %48, i32* %6
br label %14
49: ; preds = %34
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"./a.out <uppercases>\0A\00"
@stderr = global i32 0
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = add i8 %7, -65
%9 = icmp ult i8 %8, 26
br i1 %9, label %14, label %25
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = tail call i32 @fputs(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = tail call i32 @exit(i32 0)
unreachable
14: ; preds = %4, %14
%15 = phi i64 [ %19, %14 ], [ 0, %4 ]
%16 = phi i8 [ %22, %14 ], [ %7, %4 ]
%17 = tail call i32 @banner(i8 signext %16)
%18 = tail call i32 @parse(i32 %17)
%19 = add nuw i64 %15, 1
%20 = load i8*, i8** %5
%21 = getelementptr inbounds i8, i8* %20, i64 %19
%22 = load i8, i8* %21
%23 = add i8 %22, -65
%24 = icmp ult i8 %23, 26
br i1 %24, label %14, label %25
25: ; preds = %14, %4
ret i32 0
}