#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*/ mpb_clear_screen();
int /*<<< orphan*/ mpb_create_passwd();
int mpb_get_choice();
int /*<<< orphan*/ printf(char *);
int mpb_recreate_passwd(void) {
  int choice = -1;
  printf("\nPress "
         "\033[31m"
         "1"
         "\033[0m"
         " to change the key.\n");
  printf("Or press any others key to back the system.\n\n\n>>");
  choice = mpb_get_choice();
  printf("\n");
  switch (choice) {
  case '1':
    mpb_create_passwd();
    break;
  default:
    break;
  }
  mpb_clear_screen();
  return 0;
}


x86 assembly (clang, -O0):
<mpb_recreate_passwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
lea    0xec4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1050 <mpb_get_choice@plt>
mov    %eax,-0x4(%rbp)
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
sub    $0x31,%eax
jne    119a <mpb_recreate_passwd+0x5a>
jmp    118e <mpb_recreate_passwd+0x4e>
mov    $0x0,%al
call   1030 <mpb_create_passwd@plt>
jmp    119f <mpb_recreate_passwd+0x5f>
jmp    119f <mpb_recreate_passwd+0x5f>
mov    $0x0,%al
call   1060 <mpb_clear_screen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpb_recreate_passwd>:
push   %rbx
lea    0xec9(%rip),%rdi
call   1040 <puts@plt>
lea    0xe8c(%rip),%rdi
call   1060 <printf@plt>
xor    %eax,%eax
call   1070 <mpb_get_choice@plt>
mov    %eax,%ebx
mov    $0xa,%edi
call   1030 <putchar@plt>
cmp    $0x31,%ebx
jne    1198 <mpb_recreate_passwd+0x38>
xor    %eax,%eax
call   1050 <mpb_create_passwd@plt>
xor    %eax,%eax
call   1080 <mpb_clear_screen@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"\0APress \1B[31m1\1B[0m to change the key.\0A\00"
@.str.1 = [49 x i8] c"Or press any others key to back the system.\0A\0A\0A>>\00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @mpb_recreate_passwd() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @mpb_get_choice()
store i32 %4, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %1
switch i32 %6, label %9 [
i32 49, label %7
]
7: ; preds = %0
%8 = call i32 (...) @mpb_create_passwd()
br label %10
9: ; preds = %0
br label %10
10: ; preds = %9, %7
%11 = call i32 (...) @mpb_clear_screen()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [49 x i8] c"Or press any others key to back the system.\0A\0A\0A>>\00"
@str = [37 x i8] c"\0APress \1B[31m1\1B[0m to change the key.\00"
define i32 @mpb_recreate_passwd() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (...) @mpb_get_choice()
%4 = tail call i32 @putchar(i32 10)
%5 = icmp eq i32 %3, 49
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = tail call i32 (...) @mpb_create_passwd()
br label %8
8: ; preds = %0, %6
%9 = tail call i32 (...) @mpb_clear_screen()
ret i32 0
}