#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*/ Encrypt();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char input;
  do {
    printf("Enter option: ");
    scanf("%c", &input);
    if (input == 'c' || input == 'd') {
      printf("\033[H\033[J");
      Encrypt();
    }
  } while (input != 'q');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x63,%eax
je     1175 <main+0x45>
movsbl -0x5(%rbp),%eax
cmp    $0x64,%eax
jne    1188 <main+0x58>
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <Encrypt@plt>
jmp    118d <main+0x5d>
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jne    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xec1(%rip),%r14
lea    0xec9(%rip),%r15
lea    0x7(%rsp),%rbx
lea    0xec0(%rip),%r12
jmp    1164 <main+0x34>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmp    $0x71,%al
je     119a <main+0x6a>
mov    %r14,%rdi
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movzbl 0x7(%rsp),%eax
lea    -0x63(%rax),%ecx
cmp    $0x1,%cl
ja     1160 <main+0x30>
mov    %r12,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <Encrypt@plt>
movzbl 0x7(%rsp),%eax
jmp    1160 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter option: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [7 x i8] c"\1B[H\1B[J\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %17, %0
%4 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%6 = load i8, i8* %2
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 99
br i1 %8, label %13, label %9
9: ; preds = %3
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 100
br i1 %12, label %13, label %16
13: ; preds = %9, %3
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%15 = call i32 (...) @Encrypt()
br label %16
16: ; preds = %13, %9
br label %17
17: ; preds = %16
%18 = load i8, i8* %2
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 113
br i1 %20, label %3, label %21
21: ; preds = %17
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter option: \00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [7 x i8] c"\1B[H\1B[J\00"
define i32 @main() {
%1 = alloca i8
br label %2
2: ; preds = %12, %0
%3 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%5 = load i8, i8* %1
%6 = add i8 %5, -99
%7 = icmp ult i8 %6, 2
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 (...) @Encrypt()
%11 = load i8, i8* %1
br label %12
12: ; preds = %8, %2
%13 = phi i8 [ %11, %8 ], [ %5, %2 ]
%14 = icmp eq i8 %13, 113
br i1 %14, label %15, label %2
15: ; preds = %12
ret i32 0
}