#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*/ clear();
int getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ printf_menu();
void tutorial() {
  printf_menu();
  printf("\t\t\t\t "
         "\x1b[34m"
         "TUTORIAL"
         "\x1b[0m"
         "\n\n\t\t\t\t'a' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " Left\n\t\t\t\t'd' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " Right\n\t\t\t\t'w' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " Up\n\t\t\t\t's' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " Down\n\t\t\t\t'k' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " shots\n\t\t\t\t'p' "
         "\x1b[31m"
         "->"
         "\x1b[0m"
         " pause\n\n\n\t\t\t\tPress "
         "\x1b[32m"
         "ENTER"
         "\x1b[0m"
         "\n");
  while (getch() != 10)
    ;
  clear();
}


x86 assembly (clang, -O0):
<tutorial>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <printf_menu@plt>
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getch@plt>
cmp    $0xa,%eax
je     116c <tutorial+0x2c>
jmp    1157 <tutorial+0x17>
mov    $0x0,%al
call   1060 <clear@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tutorial>:
push   %rax
xor    %eax,%eax
call   1050 <printf_menu@plt>
lea    0xeb1(%rip),%rdi
call   1030 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
call   1040 <getch@plt>
cmp    $0xa,%eax
jne    1160 <tutorial+0x20>
xor    %eax,%eax
pop    %rcx
jmp    1060 <clear@plt>

LLVM IR (-O0):
@.str = [203 x i8] c"\09\09\09\09 \1B[34mTUTORIAL\1B[0m\0A\0A\09\09\09\09'a' \1B[31m->\1B[0m Left\0A\09\09\09\09'd' \1B[31m->\1B[0m Right\0A\09\09\09\09'w' \1B[31m->\1B[0m Up\0A\09\09\09\09's' \1B[31m->\1B[0m Down\0A\09\09\09\09'k' \1B[31m->\1B[0m shots\0A\09\09\09\09'p' \1B[31m->\1B[0m pause\0A\0A\0A\09\09\09\09Press \1B[32mENTER\1B[0m\0A\00"
define void @tutorial() {
%1 = call i32 (...) @printf_menu()
%2 = call i32 @printf(i8* getelementptr inbounds ([203 x i8], [203 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %6, %0
%4 = call i32 (...) @getch()
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %7
6: ; preds = %3
br label %3
7: ; preds = %3
%8 = call i32 (...) @clear()
ret void
}

LLVM IR (-O2):
@str = [202 x i8] c"\09\09\09\09 \1B[34mTUTORIAL\1B[0m\0A\0A\09\09\09\09'a' \1B[31m->\1B[0m Left\0A\09\09\09\09'd' \1B[31m->\1B[0m Right\0A\09\09\09\09'w' \1B[31m->\1B[0m Up\0A\09\09\09\09's' \1B[31m->\1B[0m Down\0A\09\09\09\09'k' \1B[31m->\1B[0m shots\0A\09\09\09\09'p' \1B[31m->\1B[0m pause\0A\0A\0A\09\09\09\09Press \1B[32mENTER\1B[0m\00"
define void @tutorial() {
%1 = tail call i32 (...) @printf_menu()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([202 x i8], [202 x i8]* @str, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
%4 = tail call i32 (...) @getch()
%5 = icmp eq i32 %4, 10
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = tail call i32 (...) @clear()
ret void
}