// File: /workspace/github_cpp_makefile_star2_O1/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 0xa33b
leaq 0x50(%rsp), %r12
movq $0x0, 0x38(%rsp)
movq 0x1b4b2(%rip), %r14     # 0x24fc0
movq $0x0, 0x30(%rsp)
movq $0x0, 0x28(%rsp)
xorl %r15d, %r15d
movl $0x1e, %edx
movq %r14, %rdi
leaq 0x11d5d(%rip), %rsi     # 0x1b88f
callq 0x42f0
leal 0x1(%r15), %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x4420
movl $0x18, %edx
movq %rax, %rdi
leaq 0x11d5a(%rip), %rsi     # 0x1b8ae
callq 0x42f0
testb $0x1, 0x38(%rsp)
jne 0x9b74
movl $0x8, %edx
movq %r14, %rdi
leaq 0x11d58(%rip), %rsi     # 0x1b8c7
callq 0x42f0
testb $0x1, 0x30(%rsp)
jne 0x9b8f
movl $0x9, %edx
movq %r14, %rdi
leaq 0x11d46(%rip), %rsi     # 0x1b8d0
callq 0x42f0
testb $0x1, 0x28(%rsp)
jne 0x9baa
movl $0x8, %edx
movq %r14, %rdi
leaq 0x11d35(%rip), %rsi     # 0x1b8da
callq 0x42f0
movl $0x1, %edx
movq %r14, %rdi
leaq 0x11a12(%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 0x1144e(%rip), %rsi     # 0x1b06c
callq 0x42f0
movq %r12, 0x40(%rsp)
movq $0x0, 0x48(%rsp)
movb $0x0, 0x50(%rsp)
movq 0x1b393(%rip), %rcx     # 0x24fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %edx
movq 0x1b375(%rip), %rdi     # 0x24fd0
leaq 0x40(%rsp), %rsi
callq 0x4460
movq 0x48(%rsp), %rbx
testq %rbx, %rbx
je 0x9c8f
movq 0x40(%rsp), %r13
xorl %r12d, %r12d
movsbl (%r13,%r12), %edi
callq 0x4370
movb %al, (%r13,%r12)
incq %r12
cmpq %r12, %rbx
jne 0x9c77
leaq 0x40(%rsp), %r12
movq %r12, %rdi
leaq 0x11c45(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
je 0x9d60
movq %r12, %rdi
leaq 0x11c36(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
je 0x9d60
movq %r12, %rdi
leaq 0x11c27(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
je 0x9d60
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
leaq 0x50(%rsp), %r12
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 0x11be5(%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, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4270
jmp 0x9f9a
movq 0x38(%rsp), %rax
movl %eax, %ebx
notb %bl
movq %r12, %rdi
leaq 0x11b70(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
setne %al
orb %bl, %al
testb $0x1, %al
movq %r12, %r13
leaq 0x50(%rsp), %r12
jne 0x9e25
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 0x11b4e(%rip), %rsi     # 0x1b916
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x11b71(%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, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4270
jmp 0x9f9a
movq 0x30(%rsp), %rax
movl %eax, %ebx
notb %bl
movq %r13, %rdi
leaq 0x11abb(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
setne %al
orb %bl, %al
testb $0x1, %al
jne 0x9ee2
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 0x11ada(%rip), %rsi     # 0x1b95f
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x11ab4(%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, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4270
jmp 0x9f9a
movq 0x28(%rsp), %rax
movl %eax, %ebx
notb %bl
movq %r13, %rdi
leaq 0x119f6(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
setne %al
movq (%r14), %rcx
movq -0x18(%rcx), %rdi
addq %r14, %rdi
orb %bl, %al
testb $0x1, %al
jne 0x9fd4
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 0x11a56(%rip), %rsi     # 0x1b998
callq 0x42f0
movl $0x11, %edx
movq %r13, %rdi
leaq 0x119f7(%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, %rbp
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq %rbp, %rdi
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0x9fc4
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
cmpl 0x64(%rsp), %r15d
jne 0x9b23
jmp 0xa33b
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 0x119cc(%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 0x11003(%rip), %rsi     # 0x1b06c
callq 0x42f0
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq $0x0, 0x10(%rsp)
movb $0x0, 0x18(%rsp)
movq 0x1af43(%rip), %rcx     # 0x24fd0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %edx
movq 0x1af25(%rip), %rdi     # 0x24fd0
leaq 0x8(%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 0x117f8(%rip), %rsi     # 0x1b8e3
callq 0x40d0
testl %eax, %eax
je 0xa1ad
movq %rbx, %rdi
leaq 0x117f1(%rip), %rsi     # 0x1b8f3
callq 0x40d0
testl %eax, %eax
je 0xa243
movq %rbx, %rdi
leaq 0x117d2(%rip), %rsi     # 0x1b8eb
callq 0x40d0
testl %eax, %eax
jne 0xa2e7
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r15
movq 0x1b406(%rip), %rbx     # 0x25540
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x112aa(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x196a8
addq $0x20, %rsp
movq %r15, (%rsp)
movq 0x68(%rsp), %rdi
movb $0x1, %al
movq %rax, 0x28(%rsp)
leaq 0x78(%rsp), %rcx
jmp 0xa2d4
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r15
movq 0x1b37f(%rip), %rbx     # 0x25540
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x1121a(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x194bc
addq $0x20, %rsp
movq %r15, (%rsp)
movq 0xa8(%rsp), %rdi
movb $0x1, %al
movq %rax, 0x38(%rsp)
leaq 0xb8(%rsp), %rcx
jmp 0xa2d4
movl $0x168, %edi            # imm = 0x168
callq 0x4290
movq %rax, %r15
movq 0x1b2e9(%rip), %rbx     # 0x25540
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %r13
movq %r13, %rdi
callq 0x4cf0
subq $0x8, %rsp
movq %r15, %rdi
movq %rbx, %rsi
movq %r13, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1f4, %r9d            # imm = 0x1F4
movsd 0x11184(%rip), %xmm0    # 0x1b428
movl $0x64, %eax
pushq %rax
pushq %rax
pushq $0xc8
callq 0x192e0
addq $0x20, %rsp
movq %r15, (%rsp)
movq 0x88(%rsp), %rdi
movb $0x1, %al
movq %rax, 0x30(%rsp)
leaq 0x98(%rsp), %rcx
movq %rcx, %rax
cmpq %rcx, %rdi
je 0xa2e7
movq (%rax), %rsi
incq %rsi
callq 0x42a0
movq 0x1afaa(%rip), %rsi     # 0x25298
cmpq 0x1afab(%rip), %rsi     # 0x252a0
je 0xa308
movq (%rsp), %rax
movq %rax, (%rsi)
addq $0x8, 0x1af92(%rip)     # 0x25298
jmp 0xa317
leaq 0x1af81(%rip), %rdi     # 0x25290
movq %rsp, %rdx
callq 0xc790
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa333
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
movl %ebp, %r15d
jmp 0x9fad
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 0xa36c
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa3cc
jmp 0xa39a
movq %rax, %rbx
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0xa398
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa3cc
movq %rax, %rbx
jmp 0xa3cc
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0xa3cc
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0xa3cc
movq %rax, %rbx
movl $0x168, %esi            # imm = 0x168
movq %r15, %rdi
callq 0x42a0
jmp 0xa3e0
jmp 0xa3dd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xa3fc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x42a0
leaq 0x50(%rsp), %r12
jmp 0xa406
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r12, %rdi
je 0xa41d
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430