#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 get_value(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int prologue(char *str) {
  printf("\nYou are about to exit the %s...\n", str);
  printf("If you want to pass one step ahead press [0], repeat the step press "
         "[1], ");
  printf("for summary press [2]\n");
  printf("Use your keyboard.\n");
  return get_value("%u", 0, 3);
}


x86 assembly (clang, -O0):
<prologue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf19(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf22(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf28(%rip),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1040 <get_value@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prologue>:
push   %rax
mov    %rdi,%rsi
lea    0xec5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed9(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xf18(%rip),%rdi
call   1030 <puts@plt>
lea    0xf22(%rip),%rdi
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
xor    %esi,%esi
mov    $0x3,%edx
pop    %rax
jmp    1050 <get_value@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"\0AYou are about to exit the %s...\0A\00"
@.str.1 = [74 x i8] c"If you want to pass one step ahead press [0], repeat the step press [1], \00"
@.str.2 = [23 x i8] c"for summary press [2]\0A\00"
@.str.3 = [20 x i8] c"Use your keyboard.\0A\00"
@.str.4 = [3 x i8] c"%u\00"
define i32 @prologue(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%8 = call i32 @get_value(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 3)
ret i32 %8
}

LLVM IR (-O2):
@.str = [34 x i8] c"\0AYou are about to exit the %s...\0A\00"
@.str.1 = [74 x i8] c"If you want to pass one step ahead press [0], repeat the step press [1], \00"
@.str.4 = [3 x i8] c"%u\00"
@str = [22 x i8] c"for summary press [2]\00"
@str.5 = [19 x i8] c"Use your keyboard.\00"
define i32 @prologue(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([74 x i8], [74 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @get_value(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 0, i32 3)
ret i32 %6
}