// File: hobbitsyfeet[P]Turn/inventory.cc
// Function: Inventory::loadInventory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Inventory::loadInventory(string unitName){
  Item temp;
  ifstream fin;
  fin.open(("./saves/" + unitName +"Inv").c_str());
  //for each item in file get stats and overwrite temp
  while(!fin.eof()){
    fin>>temp;
    //push into Inventory
    pickUp(temp);
  }
  fin.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3b0, %rsp            # imm = 0x3B0
movq %rsi, -0x380(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x378(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x370(%rbp)
callq 0x3450
movq -0x370(%rbp), %rdx
leaq 0x20de(%rip), %rsi      # 0x121d4
leaq -0x88(%rbp), %rdi
callq 0x47d0
jmp 0x10104
leaq -0xc1(%rbp), %rdi
movq %rdi, -0x388(%rbp)
callq 0x3450
movq -0x388(%rbp), %rdx
leaq 0x215f(%rip), %rsi      # 0x12284
leaq -0xc0(%rbp), %rdi
callq 0x47d0
jmp 0x10133
movq %rsp, %rax
movl $0x0, 0x10(%rax)
movl $0x14, 0x8(%rax)
movl $0x0, (%rax)
leaq -0x68(%rbp), %rdi
leaq -0x88(%rbp), %rsi
leaq -0xc0(%rbp), %rdx
movl $0x1, %ecx
xorl %r9d, %r9d
movl %r9d, %r8d
callq 0x8690
jmp 0x1016e
leaq -0xc0(%rbp), %rdi
callq 0x31c0
leaq -0xc1(%rbp), %rdi
callq 0x32d0
leaq -0x88(%rbp), %rdi
callq 0x31c0
leaq -0x89(%rbp), %rdi
callq 0x32d0
leaq -0x2d0(%rbp), %rdi
callq 0x3300
jmp 0x101ac
movq -0x380(%rbp), %rdx
leaq 0x2134(%rip), %rsi      # 0x122ee
leaq -0x310(%rbp), %rdi
callq 0x7dd0
jmp 0x101c8
leaq 0x26fd(%rip), %rdx      # 0x128cc
leaq -0x2f0(%rbp), %rdi
leaq -0x310(%rbp), %rsi
callq 0xcc10
jmp 0x101e4
leaq -0x2f0(%rbp), %rdi
callq 0x3130
movq %rax, %rsi
leaq -0x2d0(%rbp), %rdi
movl $0x8, %edx
callq 0x31d0
jmp 0x10206
leaq -0x2f0(%rbp), %rdi
callq 0x31c0
leaq -0x310(%rbp), %rdi
callq 0x31c0
movq -0x2d0(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x2d0(%rbp,%rax), %rdi
callq 0x34a0
movb %al, -0x389(%rbp)
jmp 0x1023e
movb -0x389(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1024f
jmp 0x10393
leaq -0x2d0(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x8e60
jmp 0x10261
leaq -0x368(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x7c30
jmp 0x10273
movq -0x378(%rbp), %rdi
leaq -0x368(%rbp), %rsi
callq 0xfc10
jmp 0x10288
leaq -0x368(%rbp), %rdi
callq 0x4b00
jmp 0x1021e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x102f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x102dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x31c0
leaq -0xc1(%rbp), %rdi
callq 0x32d0
leaq -0x88(%rbp), %rdi
callq 0x31c0
leaq -0x89(%rbp), %rdi
callq 0x32d0
jmp 0x103d4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x103cb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x103bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x10365
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x2f0(%rbp), %rdi
callq 0x31c0
leaq -0x310(%rbp), %rdi
callq 0x31c0
jmp 0x103bf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x368(%rbp), %rdi
callq 0x4b00
jmp 0x103bf
leaq -0x2d0(%rbp), %rdi
callq 0x30a0
jmp 0x103a1
leaq -0x2d0(%rbp), %rdi
callq 0x30b0
leaq -0x68(%rbp), %rdi
callq 0x4b00
addq $0x3b0, %rsp            # imm = 0x3B0
popq %rbp
retq
leaq -0x2d0(%rbp), %rdi
callq 0x30b0
leaq -0x68(%rbp), %rdi
callq 0x4b00
movq -0x98(%rbp), %rdi
callq 0x3440