// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x348, %rsp            # imm = 0x348
movq %rsi, %r14
movq %rdi, -0x50(%rbp)
leaq -0x80(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x1994(%rip), %rsi      # 0xb208
leaq 0x1992(%rip), %rdx      # 0xb20d
leaq -0x90(%rbp), %rdi
callq 0x34e4
leaq -0x60(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x1a22(%rip), %rsi      # 0xb2b8
leaq 0x1a24(%rip), %rdx      # 0xb2c1
leaq -0x70(%rbp), %rdi
callq 0x34e4
subq $0x8, %rsp
xorl %eax, %eax
leaq -0x160(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0x70(%rbp), %rdx
movl $0x1, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq %rax
pushq $0x14
pushq %rax
callq 0x5a08
addq $0x20, %rsp
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x98eb
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9903
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x368(%rbp), %rdi
callq 0x2230
leaq 0x1a0c(%rip), %rsi      # 0xb322
leaq -0xb0(%rbp), %rdi
movq %r14, %rdx
callq 0x58b7
leaq 0x1e98(%rip), %rsi      # 0xb7c4
leaq -0xb0(%rbp), %rdi
callq 0x2360
leaq -0x38(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x995c
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x9962
movups (%rcx), %xmm0
movups %xmm0, (%rbx)
movq 0x8(%rax), %rdx
movq %rdx, -0x40(%rbp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq -0x48(%rbp), %rsi
leaq -0x368(%rbp), %rdi
movl $0x8, %edx
callq 0x2160
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x99a3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99c2
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x368(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x348(%rbp,%rax)
jne 0x9abc
leaq -0xf8(%rbp), %rbx
leaq -0xd8(%rbp), %r14
leaq -0x120(%rbp), %r15
leaq -0x160(%rbp), %r12
leaq -0x108(%rbp), %r13
leaq -0x368(%rbp), %rdi
movq %r12, %rsi
callq 0x5fe1
movq %rbx, -0x108(%rbp)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x344a
movq %r14, -0xe8(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x344a
movq 0xd(%r15), %rax
movq %rax, 0x3d(%rbx)
movups (%r15), %xmm0
movups %xmm0, 0x30(%rbx)
movq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0xa014
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x9a88
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x108(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9aa3
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2210
movq -0x368(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x348(%rbp,%rax)
je 0x99fe
leaq -0x368(%rbp), %rdi
callq 0x2080
leaq -0x368(%rbp), %rdi
callq 0x2090
leaq -0x130(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9af3
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x2210
leaq -0x150(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9b12
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x2210
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9bce
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9b46
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9b46
movq %rax, %r14
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9bd1
movq -0xa0(%rbp), %rsi
jmp 0x9bb3
jmp 0x9bce
movq %rax, %r14
jmp 0x9bdd
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x9b83
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9b83
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9be9
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9be9
movq %rax, %r14
movq -0x108(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9bd1
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2210
jmp 0x9bd1
movq %rax, %r14
leaq -0x108(%rbp), %rdi
callq 0x5872
jmp 0x9bd1
movq %rax, %r14
leaq -0x368(%rbp), %rdi
callq 0x2090
leaq -0x160(%rbp), %rdi
callq 0x5872
movq %r14, %rdi
callq 0x2320
nop