// File: /workspace/github_cpp_makefile_star2_O1/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 0x1dbec(%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 0x14056(%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 0x1403e(%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 0x14028(%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 0x14024(%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 0x14011(%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 0x13ff9(%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 0x13fee(%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 0x13ff5(%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 0x13a6b(%rip), %rsi     # 0x1b06c
movl $0x2, %edx
movq %rbx, %rdi
callq 0x42f0
movq 0x1d9bb(%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 0x4d80
leaq 0x13f67(%rip), %rsi     # 0x1b5cd
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movl $0x10, %edx
callq 0x42d0
leaq 0x13f5c(%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 0x13f58(%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 0x13f4c(%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 0x13f3a(%rip), %rsi     # 0x1b677
movl $0x39, %edx
movq %rax, %rdi
callq 0x42f0
leaq 0x13f60(%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 0x13f5a(%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 0x13f53(%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, %rbx
movq (%rax), %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 0x8(%rsp), %esi
leaq 0x48(%rsp), %rdi
callq 0x4420
movq %rax, %rbx
leaq 0x13f05(%rip), %rsi     # 0x1b748
movl $0x1, %edx
movq %rax, %rdi
callq 0x42f0
movl 0x4(%rsp), %esi
movq %rbx, %rdi
callq 0x4420
movq %rax, %r14
leaq 0x13ee2(%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, %rbx
movq (%rax), %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 0x13e6c(%rip), %rsi     # 0x1b737
leaq 0x48(%rsp), %rbx
movl $0x12, %edx
movq %rbx, %rdi
callq 0x42f0
movq 0x48(%rsp), %rax
addq -0x18(%rax), %rbx
movq %rbx, %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 0x7a49
movl $0x2, %r15d
leaq 0x13e17(%rip), %r12     # 0x1b743
movsd 0x38(%rsp), %xmm0
callq 0x4db4
movl %eax, %ebx
movsd 0x30(%rsp), %xmm0
callq 0x4db4
movl %eax, %r13d
movsd 0x40(%rsp), %xmm0
callq 0x4db4
testb %bl, %bl
je 0x7971
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13de5(%rip), %rsi     # 0x1b74a
callq 0x42f0
xorl %r13d, %r13d
xorl %ebp, %ebp
jmp 0x7983
movl %eax, %ebp
movl $0x6, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
testb %r13b, %r13b
je 0x799e
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13db3(%rip), %rsi     # 0x1b74a
callq 0x42f0
jmp 0x79f6
movl $0x6, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x42f0
testb %bpl, %bpl
je 0x79f6
movl $0x5, %edx
movq %r14, %rdi
leaq 0x13d88(%rip), %rsi     # 0x1b74a
callq 0x42f0
movl $0x5, %edi
movl $0xf, %esi
callq 0x4dee
movq %r14, %rdi
movl %eax, %esi
callq 0x4420
movl $0x1, %edx
movq %rax, %rdi
leaq 0x13d59(%rip), %rsi     # 0x1b748
callq 0x42f0
jmp 0x7a06
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, %r15
addl %eax, %eax
cltq
cmpq %rax, %r15
jne 0x792c
leaq 0x48(%rsp), %rdi
callq 0x4360
movq 0x1d566(%rip), %rdi     # 0x24fc0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq 0x1d54b(%rip), %rbx     # 0x24fc0
movq %rbx, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x13cc1(%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 0x142d0(%rip), %r14     # 0x1bdae
leaq 0x10(%rsp), %r15
leaq 0x13671(%rip), %r12     # 0x1b15b
leaq 0x137f1(%rip), %r13     # 0x1b2e2
movq 0x1d4d8(%rip), %rbp     # 0x24fd0
movq %r15, %rdi
movq %r14, %rsi
callq 0x40d0
testl %eax, %eax
je 0x7b5a
movq %r15, %rdi
movq %r12, %rsi
callq 0x40d0
testl %eax, %eax
je 0x7b5a
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 0x7af8
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7b76
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
movq 0x1d43b(%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 0x7be3
jmp 0x7be3
jmp 0x7be3
jmp 0x7be3
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x7be6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x7be6
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4390
movq %rbx, %rdi
callq 0x4430