// File: arisKoutsou[P]oopproj/./src/inventory/Inventory.cpp
// Function: Inventory::printItems()
void Inventory :: printItems() {
  if (this->getCurrentItems() == 0) {
    cout << endl << "No items in the inventory" << endl << endl;
    return;
  } else {
    list<Item*> :: const_iterator it = items.begin();
    vector<Weapon*> weapons;
    vector<Armor*> armors;
    vector<Potion*> potions;
    for ( ; it != items.end(); ++it) {
      string kind = (*it)->kindOf();
      if (kind == "Weapon") {
	weapons.push_back(static_cast<Weapon*>(*it));
      } else if (kind == "Armor") {
	armors.push_back(static_cast<Armor*>(*it));
      } else if (kind == "Potion") {
	potions.push_back(static_cast<Potion*>(*it));
      }
    }
    printWeapons(weapons);
    printArmors(armors);
    printPotions(potions);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x14c30
cmpl $0x0, %eax
jne 0x15ac9
movq 0x2a535(%rip), %rdi     # 0x3ffc0
movq 0x2a50e(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, %rdi
leaq 0x190d7(%rip), %rsi     # 0x2eb78
callq 0x52f0
movq %rax, %rdi
movq 0x2a4f0(%rip), %rsi     # 0x3ffa0
callq 0x5330
movq %rax, %rdi
movq 0x2a4e1(%rip), %rsi     # 0x3ffa0
callq 0x5330
jmp 0x15d0f
movq -0xc0(%rbp), %rdi
addq $0x8, %rdi
callq 0x17da0
movq %rax, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x17dd0
leaq -0x30(%rbp), %rdi
callq 0x17df0
leaq -0x48(%rbp), %rdi
callq 0x17e10
leaq -0x60(%rbp), %rdi
callq 0x17e30
movq -0xc0(%rbp), %rdi
addq $0x8, %rdi
callq 0x17e50
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x17dd0
leaq -0x10(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x17c00
testb $0x1, %al
jne 0x15b3c
jmp 0x15c9f
leaq -0x10(%rbp), %rdi
callq 0x17c60
movq (%rax), %rsi
movq (%rsi), %rax
movq 0x18(%rax), %rax
leaq -0x90(%rbp), %rdi
callq *%rax
jmp 0x15b5a
leaq 0x19031(%rip), %rsi     # 0x2eb92
leaq -0x90(%rbp), %rdi
callq 0x8e10
movb %al, -0xc1(%rbp)
jmp 0x15b75
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x15b81
jmp 0x15be5
leaq -0x10(%rbp), %rdi
callq 0x17c60
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x17e80
jmp 0x15ba6
jmp 0x15c85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x15cf2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x55d0
jmp 0x15cf2
leaq 0x18fad(%rip), %rsi     # 0x2eb99
leaq -0x90(%rbp), %rdi
callq 0x8e10
movb %al, -0xc2(%rbp)
jmp 0x15c00
movb -0xc2(%rbp), %al
testb $0x1, %al
jne 0x15c0c
jmp 0x15c33
leaq -0x10(%rbp), %rdi
callq 0x17c60
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
leaq -0x48(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x17eb0
jmp 0x15c31
jmp 0x15c83
leaq 0x192c5(%rip), %rsi     # 0x2eeff
leaq -0x90(%rbp), %rdi
callq 0x8e10
movb %al, -0xc3(%rbp)
jmp 0x15c4e
movb -0xc3(%rbp), %al
testb $0x1, %al
jne 0x15c5a
jmp 0x15c81
leaq -0x10(%rbp), %rdi
callq 0x17c60
movq (%rax), %rax
movq %rax, -0xb8(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x17ee0
jmp 0x15c7f
jmp 0x15c81
jmp 0x15c83
jmp 0x15c85
leaq -0x90(%rbp), %rdi
callq 0x55d0
leaq -0x10(%rbp), %rdi
callq 0x17f10
jmp 0x15b05
movq -0xc0(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x14db0
jmp 0x15cb1
movq -0xc0(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x151c0
jmp 0x15cc3
movq -0xc0(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x15570
jmp 0x15cd5
leaq -0x60(%rbp), %rdi
callq 0x17f30
leaq -0x48(%rbp), %rdi
callq 0x17f90
leaq -0x30(%rbp), %rdi
callq 0x17ff0
jmp 0x15d0f
leaq -0x60(%rbp), %rdi
callq 0x17f30
leaq -0x48(%rbp), %rdi
callq 0x17f90
leaq -0x30(%rbp), %rdi
callq 0x17ff0
jmp 0x15d18
addq $0xd0, %rsp
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x5550
nopw %cs:(%rax,%rax)