// File: /workspace/github_cpp_makefile_star2_O3/arisKoutsou[P]oopproj/./src/livings/Hero.cpp
// Function: Hero::handleUseCase()
bool Hero :: handleUseCase() {
  if (!this->getInventory().hasPotions()) {
    cout << "You have no Potions at the moment." << endl;
    return false;
  }
  inventory.printPotions();
  string name;

  cout << endl
       << "Please enter the name of the potion you want to use"
       << endl << endl << "> ";

  getline(cin, name);        
  for (list<Potion*> :: const_iterator it = potions.begin() ;
       it != potions.end() ; it++ ) {
    if (name == (*it)->getName()) {
      this->use(name);
      return true;
    }
  }

  return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
leaq 0xc0(%rdi), %r14
movq %r14, %rdi
callq 0xca82
testb %al, %al
je 0x1751d
movq %r14, %rdi
callq 0xee68
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq 0xdc1b(%rip), %rdi      # 0x24fc0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %esi
movq 0xdc00(%rip), %rdi      # 0x24fc0
callq 0x4040
movq %rax, %rdi
callq 0x41b0
movq %rax, %r14
leaq 0x4bdd(%rip), %rsi      # 0x1bfb4
movl $0x33, %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 0x3c30(%rip), %rsi      # 0x1b06c
movl $0x2, %edx
movq %rax, %rdi
callq 0x42f0
movq 0xdb80(%rip), %rdi      # 0x24fd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
movl $0xa, %esi
callq 0x4270
movsbl %al, %edx
movq 0xdb65(%rip), %rdi      # 0x24fd0
movq %rsp, %rsi
callq 0x4460
movq %rbx, 0x20(%rsp)
addq $0x78, %rbx
leaq 0x28(%rsp), %r14
movq %rbx, %r13
movq (%r13), %r13
cmpq %rbx, %r13
setne %bpl
je 0x17500
movq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x1a7d8
movq 0x8(%rsp), %rdx
cmpq 0x30(%rsp), %rdx
jne 0x174c7
movq 0x28(%rsp), %r15
testq %rdx, %rdx
je 0x174d1
movq (%rsp), %rdi
movq %r15, %rsi
callq 0x42b0
testl %eax, %eax
sete %r12b
jmp 0x174d4
movq 0x28(%rsp), %r15
xorl %r12d, %r12d
jmp 0x174d4
movb $0x1, %r12b
leaq 0x38(%rsp), %rax
cmpq %rax, %r15
je 0x174ee
movq 0x38(%rsp), %rsi
incq %rsi
movq %r15, %rdi
callq 0x42a0
testb %r12b, %r12b
je 0x17484
movq %rsp, %rsi
movq 0x20(%rsp), %rdi
callq 0x14e18
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17561
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
jmp 0x17561
movq 0xda9c(%rip), %rbx      # 0x24fc0
leaq 0x4df6(%rip), %rsi      # 0x1c321
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
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17576
jmp 0x17576
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x17594
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x42a0
movq %rbx, %rdi
callq 0x4430