// File: /workspace/github_cpp_makefile_star2_O3/arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: generateMap()
void run(void) {  
  clearScreen();

  MainMenu mainMenu;
  string userInput;
  bool firstWelcome = true;

  do {
    if (firstWelcome) {
      mainMenu.welcome();
      firstWelcome = false;
    } else {
      mainMenu.displayMenu();
    }

    userInput = mainMenu.prompt();
    transform(userInput.begin(), userInput.end(),	      
	      userInput.begin(), :: tolower);

    if (userInput == "generatemap") {
      clearScreen();
      generateMap();
    } else if (userInput == "play") {
      play();
    } else if (userInput == "help") {
      clearScreen();
      mainMenu.help();
    } 
    clearScreen();	// When exiting from any case. Print ClearScreen.
  } while (userInput != "quit");
  cout << endl << "Exiting game..." << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x248, %rsp            # imm = 0x248
movq 0x1db88(%rip), %rbx     # 0x24fc0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13ff2(%rip), %rsi     # 0x1b458
movl $0x22, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13fda(%rip), %rsi     # 0x1b47b
movl $0x24, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13fc4(%rip), %rsi     # 0x1b4a0
movl $0x36, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13fc0(%rip), %rsi     # 0x1b4d7
movl $0x27, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13fad(%rip), %rsi     # 0x1b4ff
movl $0x22, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13f95(%rip), %rsi     # 0x1b522
movl $0x2f, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13f8a(%rip), %rsi     # 0x1b552
movl $0x41, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13f91(%rip), %rsi     # 0x1b594
movl $0x38, %edx
movq %rbx, %rdi
callq 0x42f0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13a07(%rip), %rsi     # 0x1b06c
movl $0x2, %edx
movq %rbx, %rdi
callq 0x42f0
movq 0x1d957(%rip), %rdi     # 0x24fd0
leaq 0x8(%rsp), %rsi
callq 0x4160
leaq 0x4(%rsp), %rsi
movq %rax, %rdi
callq 0x4160
leaq 0x40(%rsp), %rsi
movq %rax, %rdi
callq 0x4190
leaq 0x38(%rsp), %rsi
movq %rax, %rdi
callq 0x4190
leaq 0x30(%rsp), %rsi
movq %rax, %rdi
callq 0x4190
leaq 0xf(%rsp), %rdi
xorl %esi, %esi
callq 0x4d88
leaq 0x13f03(%rip), %rsi     # 0x1b5cd
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x42d0
leaq 0x13ef8(%rip), %rsi     # 0x1b5db
movl $0x3d, %edx
movq %r14, %rdi
callq 0x42f0
movq 0x48(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
leaq 0x48(%rsp), %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13ef4(%rip), %rsi     # 0x1b619
movl $0x31, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13ee8(%rip), %rsi     # 0x1b64b
movl $0x2b, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13ed6(%rip), %rsi     # 0x1b677
movl $0x39, %edx
movq %rax, %rdi
callq 0x42f0
leaq 0x13efc(%rip), %rsi     # 0x1b6b1
movl $0x37, %edx
movq %r14, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13ef6(%rip), %rsi     # 0x1b6e9
movl $0x36, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13eef(%rip), %rsi     # 0x1b720
movl $0x16, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movl 0x8(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x4420
movq %rax, %r14
leaq 0x13ea1(%rip), %rsi     # 0x1b748
movl $0x1, %edx
movq %rax, %rdi
callq 0x42f0
movl 0x4(%rsp), %esi
movq %r14, %rdi
callq 0x4420
movq %rax, %r14
leaq 0x13e7e(%rip), %rsi     # 0x1b748
movl $0x1, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x13e08(%rip), %rsi     # 0x1b737
leaq 0x48(%rsp), %r14
movl $0x12, %edx
movq %r14, %rdi
callq 0x42f0
movq 0x48(%rsp), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movl 0x8(%rsp), %eax
imull 0x4(%rsp), %eax
addl %eax, %eax
cmpl $0x2, %eax
je 0x7aab
movl $0x2, %ebx
leaq 0x13db4(%rip), %r12     # 0x1b743
movsd 0x38(%rsp), %xmm0
callq 0x4dbc
movl %eax, %r15d
movsd 0x30(%rsp), %xmm0
callq 0x4dbc
movl %eax, %r13d
movsd 0x40(%rsp), %xmm0
callq 0x4dbc
testb %r15b, %r15b
je 0x79d3
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13d80(%rip), %rsi     # 0x1b74a
callq 0x42f0
xorl %ebp, %ebp
jmp 0x7a00
movl %eax, %ebp
movl $0x6, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
testb %r13b, %r13b
je 0x7a00
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13d51(%rip), %rsi     # 0x1b74a
callq 0x42f0
jmp 0x7a58
movl $0x6, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
testb %bpl, %bpl
je 0x7a58
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13d26(%rip), %rsi     # 0x1b74a
callq 0x42f0
movl $0x5, %edi
movl $0xf, %esi
callq 0x4df6
movq %r14, %rdi
movl %eax, %esi
callq 0x4420
movl $0x1, %edx
movq %rax, %rdi
leaq 0x13cf7(%rip), %rsi     # 0x1b748
callq 0x42f0
jmp 0x7a68
movl $0x6, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
movq 0x48(%rsp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movl 0x8(%rsp), %eax
imull 0x4(%rsp), %eax
addq $0x2, %rbx
addl %eax, %eax
cltq
cmpq %rax, %rbx
jne 0x798f
leaq 0x48(%rsp), %rdi
callq 0x4360
movq 0x1d504(%rip), %rdi     # 0x24fc0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq 0x1d4e9(%rip), %rbx     # 0x24fc0
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13c5f(%rip), %rsi     # 0x1b750
movl $0xf, %edx
movq %rax, %rdi
callq 0x42f0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x1427e(%rip), %r14     # 0x1bdbe
leaq 0x10(%rsp), %r15
leaq 0x1360f(%rip), %r12     # 0x1b15b
leaq 0x1378f(%rip), %r13     # 0x1b2e2
movq 0x1d476(%rip), %rbp     # 0x24fd0
movq %r15, %rdi
movq %r14, %rsi
callq 0x40d0
testl %eax, %eax
je 0x7bbc
movq %r15, %rdi
movq %r12, %rsi
callq 0x40d0
testl %eax, %eax
je 0x7bbc
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movl $0x1a, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x42f0
movq %rbp, %rdi
movq %r15, %rsi
callq 0x4330
jmp 0x7b5a
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7bd8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x1d3d9(%rip), %rax     # 0x24fb8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x50(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x48(%rsp,%rcx)
callq 0x4220
leaq 0x140(%rsp), %rdi
callq 0x40f0
addq $0x248, %rsp            # imm = 0x248
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x7c45
jmp 0x7c45
jmp 0x7c45
jmp 0x7c45
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7c48
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x7c48
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4430