#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ menu_switch(char);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ stdin;
void Main_Menu() {
  while (1) {
    char input;
    printf("\n\n\n===========================================================\n"
           "Type the corresponding letter/number of the option you wish to "
           "use:\n\n"
           "[1]: KEY LENGTH FINDING TOOLS\n"
           "[2]: KEY WORD CRACKING TOOLS\n"
           "[3]: DECRYPTION\n"
           "[0]: MANAGE SESSIONS and SAVE FILES\n"
           "[x]: SAVE PROGRESS + EXIT APP\n\n"
           ">>  ");
    scanf("%c", &input);
    menu_switch(input);
    fflush(stdin);
  }
}


x86 assembly (clang, -O0):
<Main_Menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
lea    0xfbc(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1060 <scanf@plt>
movsbl -0x1(%rbp),%edi
call   1030 <menu_switch@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
jmp    1148 <Main_Menu+0x8>

x86 assembly (clang, -O2):
<Main_Menu>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xeb1(%rip),%r14
lea    0xfc1(%rip),%r15
lea    0x7(%rsp),%r12
mov    0x2e86(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1060 <scanf@plt>
movsbl 0x7(%rsp),%edi
call   1030 <menu_switch@plt>
mov    (%rbx),%edi
call   1050 <fflush@plt>
jmp    1170 <Main_Menu+0x30>

LLVM IR (-O0):
@.str = [279 x i8] c"\0A\0A\0A===========================================================\0AType the corresponding letter/number of the option you wish to use:\0A\0A[1]: KEY LENGTH FINDING TOOLS\0A[2]: KEY WORD CRACKING TOOLS\0A[3]: DECRYPTION\0A[0]: MANAGE SESSIONS and SAVE FILES\0A[x]: SAVE PROGRESS + EXIT APP\0A\0A>> \00"
@.str.1 = [3 x i8] c"%c\00"
@stdin = global i32 0
define void @Main_Menu() {
%1 = alloca i8
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* getelementptr inbounds ([279 x i8], [279 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 = call i32 @menu_switch(i8 signext %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
br label %2
}

LLVM IR (-O2):
@.str = [279 x i8] c"\0A\0A\0A===========================================================\0AType the corresponding letter/number of the option you wish to use:\0A\0A[1]: KEY LENGTH FINDING TOOLS\0A[2]: KEY WORD CRACKING TOOLS\0A[3]: DECRYPTION\0A[0]: MANAGE SESSIONS and SAVE FILES\0A[x]: SAVE PROGRESS + EXIT APP\0A\0A>> \00"
@.str.1 = [3 x i8] c"%c\00"
@stdin = global i32 0
define void @Main_Menu() {
%1 = alloca i8
br label %2
2: ; preds = %0, %2
%3 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([279 x i8], [279 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 = call i32 @menu_switch(i8 signext %5)
%7 = load i32, i32* @stdin
%8 = call i32 @fflush(i32 %7)
br label %2
}