#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*/ CheckForInput();
int /*<<< orphan*/ Command(char);
int /*<<< orphan*/ Fin_Exit();
scalar_t__ Fin_Init();
char *GetInput();
int /*<<< orphan*/ Help();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  char *option;
  if (Fin_Init() < 0)
    exit(1);
  Help();
  while (1) {
    CheckForInput();
    printf("\nSelect Command (and press ENTER): ");
    option = GetInput();
    if (*option == 'Q' || *option == 'q')
      break;
    Command(*option);
  }
  Fin_Exit();
  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)
mov    $0x0,%al
call   10a0 <Fin_Init@plt>
cmp    $0x0,%rax
jge    11b1 <main+0x31>
mov    $0x1,%edi
call   1080 <exit@plt>
mov    $0x0,%al
call   1050 <Help@plt>
mov    $0x0,%al
call   1040 <CheckForInput@plt>
lea    0xe3a(%rip),%rdi
call   1060 <printf@plt>
mov    $0x0,%al
call   1030 <GetInput@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x51,%eax
je     11f6 <main+0x76>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x71,%eax
jne    11fb <main+0x7b>
jmp    120c <main+0x8c>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1090 <Command@plt>
jmp    11b8 <main+0x38>
mov    $0x0,%al
call   1070 <Fin_Exit@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   10a0 <Fin_Init@plt>
test   %rax,%rax
js     11d8 <main+0x58>
xor    %eax,%eax
call   1050 <Help@plt>
lea    0xe65(%rip),%rbx
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <CheckForInput@plt>
mov    %rbx,%rdi
call   1060 <printf@plt>
xor    %eax,%eax
call   1030 <GetInput@plt>
movzbl (%rax),%eax
mov    %eax,%ecx
or     $0x20,%cl
cmp    $0x71,%cl
je     11cd <main+0x4d>
movsbl %al,%edi
call   1090 <Command@plt>
jmp    11a0 <main+0x20>
xor    %eax,%eax
call   1070 <Fin_Exit@plt>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"\0ASelect Command (and press ENTER): \00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 (...) @Fin_Init()
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = call i32 (...) @Help()
br label %13
13: ; preds = %11, %27
%14 = call i32 (...) @CheckForInput()
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%16 = call i8* (...) @GetInput()
store i8* %16, i8** %6
%17 = load i8*, i8** %6
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 81
br i1 %20, label %26, label %21
21: ; preds = %13
%22 = load i8*, i8** %6
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 113
br i1 %25, label %26, label %27
26: ; preds = %21, %13
br label %31
27: ; preds = %21
%28 = load i8*, i8** %6
%29 = load i8, i8* %28
%30 = call i32 @Command(i8 signext %29)
br label %13
31: ; preds = %26
%32 = call i32 (...) @Fin_Exit()
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"\0ASelect Command (and press ENTER): \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @Fin_Init()
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %2
%8 = tail call i32 (...) @Help()
br label %9
9: ; preds = %14, %7
%10 = tail call i32 (...) @CheckForInput()
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%12 = tail call i8* (...) @GetInput()
%13 = load i8, i8* %12
switch i8 %13, label %14 [
i8 81, label %16
i8 113, label %16
]
14: ; preds = %9
%15 = tail call i32 @Command(i8 signext %13)
br label %9
16: ; preds = %9, %9
%17 = tail call i32 (...) @Fin_Exit()
ret i32 0
}