// File: /workspace/github_cpp_makefile_star2_O3/arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: createHeroes(int)
void createHeroes(int numberOfHeroes) {
  bool warriorSelected = false;
  bool sorcererSelected = false;
  bool paladinSelected = false;
  for (int i = 0; i != numberOfHeroes; ++i) {
    cout << "Please enter a class for hero " << i + 1
	 << " ( possible classes are ";
    if (!warriorSelected) cout << "Warrior ";
    if (!sorcererSelected) cout << "Sorcerer ";
    if (!paladinSelected) cout << "Paladin ";
    cout << ")" << endl << endl << "> ";
    string heroClass;
    getline(cin, heroClass);
    transform(heroClass.begin(), heroClass.end(),
	      heroClass.begin(), :: tolower);
    if (!(heroClass == "warrior"
	  || heroClass == "paladin"
	  || heroClass == "sorcerer")
	) {
      cout << endl <<  "That's not a valid class!" << endl << endl;
      --i;
      continue;
    }

    if (heroClass == "warrior" && warriorSelected) {
      cout << endl
	   << "Warrior is already selected. Please select one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }
    if (heroClass == "sorcerer" && sorcererSelected) {
      cout << endl
	   << "Sorcerer is already selected. Please selecet one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }
    if (heroClass == "paladin" && paladinSelected) {
      cout << endl
	   << "Paladin is already selected. Please select one of the "
	   << "available classes" << endl << endl;
      --i;
      continue;
    }

    cout << endl << "Please enter a name for your hero"
	 << endl << endl << "> ";
    string name;
    getline(cin, name);
    cout << endl;
    Hero* hero;
    if (heroClass == "warrior") {
      warriorSelected = true;
      hero = new Warrior(gameGrid, name);
    } else if (heroClass == "sorcerer") {
      sorcererSelected = true;
      hero = new Sorcerer(gameGrid, name);
    } else if (heroClass == "paladin") {
      paladinSelected = true;
      hero = new Paladin(gameGrid, name);
    }

    heroes.push_back(hero);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movl %edi, 0x64(%rsp)
testl %edi, %edi
je 0xa3cb
leaq 0x50(%rsp), %r15
movq $0x0, 0x10(%rsp)
movq 0x1b467(%rip), %r14     # 0x24fc0
movq $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
xorl %r12d, %r12d
movl $0x1e, %edx
movq %r14, %rdi
leaq 0x11d13(%rip), %rsi     # 0x1b88f
callq 0x42f0
leal 0x1(%r12), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x4420
movl $0x18, %edx
movq %rax, %rdi
leaq 0x11d0f(%rip), %rsi     # 0x1b8ae
callq 0x42f0
testb $0x1, 0x10(%rsp)
jne 0x9bbf
movl $0x8, %edx
movq %r14, %rdi
leaq 0x11d0d(%rip), %rsi     # 0x1b8c7
callq 0x42f0
testb $0x1, 0x8(%rsp)
jne 0x9bda
movl $0x9, %edx
movq %r14, %rdi
leaq 0x11cfb(%rip), %rsi     # 0x1b8d0
callq 0x42f0
testb $0x1, (%rsp)
jne 0x9bf4
movl $0x8, %edx
movq %r14, %rdi
leaq 0x11ceb(%rip), %rsi     # 0x1b8da
callq 0x42f0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x119c8(%rip), %rsi     # 0x1b5cb
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 $0x2, %edx
movq %rax, %rdi
leaq 0x11404(%rip), %rsi     # 0x1b06c
callq 0x42f0
movq %r15, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq 0x1b349(%rip), %rcx     # 0x24fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %edx
movq 0x1b32b(%rip), %rdi     # 0x24fd0
leaq 0x40(%rsp), %rsi
callq 0x4460
movq 0x48(%rsp), %rbx
testq %rbx, %rbx
je 0x9cd9
movq 0x40(%rsp), %r13
xorl %r15d, %r15d
movsbl (%r13,%r15), %edi
callq 0x4370
movb %al, (%r13,%r15)
incq %r15
cmpq %r15, %rbx
jne 0x9cc1
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x11bfb(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
je 0x9dbd
movq %rbx, %rdi
leaq 0x11bec(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
je 0x9dbd
movq %rbx, %rdi
leaq 0x11bdd(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
je 0x9dbd
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
leaq 0x50(%rsp), %r15
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movl $0x19, %edx
movq %rax, %rdi
leaq 0x11b9b(%rip), %rsi     # 0x1b8fc
callq 0x42f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
jmp 0xa3a9
movq %rbx, %rdi
leaq 0x11b1c(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
setne %al
movq 0x10(%rsp), %rcx
notb %cl
orb %al, %cl
testb $0x1, %cl
leaq 0x50(%rsp), %r15
jne 0x9e98
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, %r13
movl $0x36, %edx
movq %rax, %rdi
leaq 0x11af5(%rip), %rsi     # 0x1b916
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x11b18(%rip), %rsi     # 0x1b94d
callq 0x42f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movb $0x1, %cl
movq %rcx, 0x10(%rsp)
movq %rax, %rdi
callq 0x41b0
jmp 0xa3a9
movq %rbx, %rdi
leaq 0x11a51(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
setne %al
movq 0x8(%rsp), %rcx
notb %cl
orb %al, %cl
testb $0x1, %cl
jne 0x9f6e
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, %r13
movl $0x38, %edx
movq %rax, %rdi
leaq 0x11a68(%rip), %rsi     # 0x1b95f
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x11a42(%rip), %rsi     # 0x1b94d
callq 0x42f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movb $0x1, %cl
movq %rcx, 0x8(%rsp)
movq %rax, %rdi
callq 0x41b0
jmp 0xa3a9
movq %rbx, %rdi
leaq 0x11973(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
setne %al
movq (%rsp), %rcx
notb %cl
orb %al, %cl
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
testb $0x1, %cl
jne 0xa042
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movl $0x36, %edx
movq %rax, %rdi
leaq 0x119cc(%rip), %rsi     # 0x1b998
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x1196d(%rip), %rsi     # 0x1b94d
callq 0x42f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movb $0x1, %cl
movq %rcx, (%rsp)
movq %rax, %rdi
callq 0x41b0
jmp 0xa3a9
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r14, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movl $0x21, %edx
movq %rax, %rdi
leaq 0x1195e(%rip), %rsi     # 0x1b9cf
callq 0x42f0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %r13, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movl $0x2, %edx
movq %rax, %rdi
leaq 0x10f95(%rip), %rsi     # 0x1b06c
callq 0x42f0
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movb $0x0, 0x30(%rsp)
movq 0x1aed5(%rip), %rcx     # 0x24fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %edx
movq 0x1aeb7(%rip), %rdi     # 0x24fd0
leaq 0x20(%rsp), %rsi
callq 0x4460
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 0x40(%rsp), %rbx
movq %rbx, %rdi
leaq 0x1178a(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
je 0xa21b
movq %rbx, %rdi
leaq 0x11783(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
je 0xa2b2
movq %rbx, %rdi
leaq 0x11764(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
jne 0xa357
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r12
movq 0x1b398(%rip), %rbx     # 0x25540
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x1123c(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x19710
addq $0x20, %rsp
movq %r12, 0x18(%rsp)
movq 0x68(%rsp), %rdi
movb $0x1, %al
movq %rax, (%rsp)
leaq 0x78(%rsp), %rcx
jmp 0xa344
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r12
movq 0x1b311(%rip), %rbx     # 0x25540
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x111ac(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x19530
addq $0x20, %rsp
movq %r12, 0x18(%rsp)
movq 0xa8(%rsp), %rdi
movb $0x1, %al
movq %rax, 0x10(%rsp)
leaq 0xb8(%rsp), %rcx
jmp 0xa344
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r12
movq 0x1b27a(%rip), %rbx     # 0x25540
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r12, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x11115(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x1935c
addq $0x20, %rsp
movq %r12, 0x18(%rsp)
movq 0x88(%rsp), %rdi
movb $0x1, %al
movq %rax, 0x8(%rsp)
leaq 0x98(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0xa357
movq (%rax), %rsi
incq %rsi
callq 0x42a0
movq 0x1af3a(%rip), %rsi     # 0x25298
cmpq 0x1af3b(%rip), %rsi     # 0x252a0
je 0xa379
movq 0x18(%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1af21(%rip)     # 0x25298
jmp 0xa38a
leaq 0x1af10(%rip), %rdi     # 0x25290
leaq 0x18(%rsp), %rdx
callq 0xc7c4
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa3a6
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
movl %ebp, %r12d
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xa3c0
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
cmpl 0x64(%rsp), %r12d
jne 0x9b6d
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xa3fc
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa45c
jmp 0xa42a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xa428
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa45c
movq %rax, %rbx
jmp 0xa45c
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xa45c
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa45c
movq %rax, %rbx
movl $0x168, %esi            # imm = 0x168
movq %r12, %rdi
callq 0x42a0
jmp 0xa470
jmp 0xa46d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0xa48c
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x50(%rsp), %r15
jmp 0xa496
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r15, %rdi
je 0xa4ad
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430