#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(char *);
int /*<<< orphan*/ ReadString(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char Message[255], c;
  while (1) {
    printf("Enter option: ");
    scanf("%c", &c);
    if (c == 'c' || c == 'd') {
      scanf("%c", &c);
      if (c == ' ') {
        ReadString(Message);
        Encrypt(Message);
        printf("%s\n", Message);
      }
    } else if (c == 'q')
      return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea8(%rip),%rdi
lea    -0x111(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x111(%rbp),%eax
cmp    $0x63,%eax
je     1193 <main+0x53>
movsbl -0x111(%rbp),%eax
cmp    $0x64,%eax
jne    11e8 <main+0xa8>
lea    0xe75(%rip),%rdi
lea    -0x111(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x111(%rbp),%eax
cmp    $0x20,%eax
jne    11e3 <main+0xa3>
lea    -0x110(%rbp),%rdi
call   1030 <ReadString@plt>
lea    -0x110(%rbp),%rdi
call   1050 <Encrypt@plt>
lea    -0x110(%rbp),%rsi
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1208 <main+0xc8>
movsbl -0x111(%rbp),%eax
cmp    $0x71,%eax
jne    1203 <main+0xc3>
xor    %eax,%eax
add    $0x120,%rsp
pop    %rbp
ret
jmp    1208 <main+0xc8>
jmp    1152 <main+0x12>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x118,%rsp
lea    0xe9b(%rip),%r14
lea    0xea3(%rip),%r15
lea    0xf(%rsp),%rbx
lea    0x10(%rsp),%r12
jmp    1184 <main+0x34>
nopl   0x0(%rax,%rax,1)
cmp    $0x71,%al
je     11d2 <main+0x82>
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
movzbl 0xf(%rsp),%eax
lea    -0x63(%rax),%ecx
cmp    $0x1,%cl
ja     1180 <main+0x30>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1070 <scanf@plt>
cmpb   $0x20,0xf(%rsp)
jne    1184 <main+0x34>
mov    %r12,%rdi
call   1040 <ReadString@plt>
mov    %r12,%rdi
call   1060 <Encrypt@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
jmp    1184 <main+0x34>
xor    %eax,%eax
add    $0x118,%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 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [255 x i8]
%3 = alloca i8
store i32 0, i32* %1
br label %4
4: ; preds = %0, %33
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%7 = load i8, i8* %3
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 99
br i1 %9, label %14, label %10
10: ; preds = %4
%11 = load i8, i8* %3
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 100
br i1 %13, label %14, label %27
14: ; preds = %10, %4
%15 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %3)
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 32
br i1 %18, label %19, label %26
19: ; preds = %14
%20 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%21 = call i32 @ReadString(i8* %20)
%22 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%23 = call i32 @Encrypt(i8* %22)
%24 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %24)
br label %26
26: ; preds = %19, %14
br label %33
27: ; preds = %10
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 113
br i1 %30, label %31, label %32
31: ; preds = %27
ret i32 0
32: ; preds = %27
br label %33
33: ; preds = %32, %26
br label %4
}

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