// File: /workspace/github_cpp_makefile_star2_O3/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 0x1954(%rip), %rsi      # 0xb208
leaq 0x1952(%rip), %rdx      # 0xb20d
leaq -0x90(%rbp), %rdi
callq 0x351a
leaq -0x60(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0x19e2(%rip), %rsi      # 0xb2b8
leaq 0x19e4(%rip), %rdx      # 0xb2c1
leaq -0x70(%rbp), %rdi
callq 0x351a
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 0x5a20
addq $0x20, %rsp
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x992b
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9943
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x368(%rbp), %rdi
callq 0x2220
leaq 0x19cc(%rip), %rsi      # 0xb322
leaq -0xb0(%rbp), %rdi
movq %r14, %rdx
callq 0x58c9
leaq 0x1e68(%rip), %rsi      # 0xb7d4
leaq -0xb0(%rbp), %rdi
callq 0x2350
leaq -0x38(%rbp), %rbx
movq %rbx, -0x10(%rbx)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x999c
movq %rdx, -0x48(%rbp)
movq (%rcx), %rdx
movq %rdx, -0x38(%rbp)
jmp 0x99a2
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 0x99e3
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a02
movq -0xa0(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x368(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x348(%rbp,%rax)
jne 0x9afc
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 0x5ff9
movq %rbx, -0x108(%rbp)
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x347c
movq %r14, -0xe8(%rbp)
movq -0x140(%rbp), %rsi
movq -0x138(%rbp), %rdx
addq %rsi, %rdx
leaq -0xe8(%rbp), %rdi
callq 0x347c
movq 0xd(%r15), %rax
movq %rax, 0x3d(%rbx)
movups (%r15), %xmm0
movups %xmm0, 0x30(%rbx)
movq -0x50(%rbp), %rdi
movq %r13, %rsi
callq 0xa046
movq -0xe8(%rbp), %rdi
cmpq %r14, %rdi
je 0x9ac8
movq -0xd8(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x108(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9ae3
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2200
movq -0x368(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x348(%rbp,%rax)
je 0x9a3e
leaq -0x368(%rbp), %rdi
callq 0x2080
leaq -0x368(%rbp), %rdi
callq 0x2090
leaq -0x130(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9b33
movq -0x130(%rbp), %rsi
incq %rsi
callq 0x2200
leaq -0x150(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9b52
movq -0x150(%rbp), %rsi
incq %rsi
callq 0x2200
addq $0x348, %rsp            # imm = 0x348
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x9c0e
movq %rax, %r14
movq -0x48(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9b86
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x9b86
movq %rax, %r14
leaq -0xa0(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9c11
movq -0xa0(%rbp), %rsi
jmp 0x9bf3
jmp 0x9c0e
movq %rax, %r14
jmp 0x9c1d
movq %rax, %r14
movq -0x70(%rbp), %rdi
cmpq %r15, %rdi
je 0x9bc3
movq -0x60(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x9bc3
movq %rax, %r14
movq -0x90(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9c29
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x9c29
movq %rax, %r14
movq -0x108(%rbp), %rdi
cmpq %rbx, %rdi
je 0x9c11
movq -0xf8(%rbp), %rsi
incq %rsi
callq 0x2200
jmp 0x9c11
movq %rax, %r14
leaq -0x108(%rbp), %rdi
callq 0x5884
jmp 0x9c11
movq %rax, %r14
leaq -0x368(%rbp), %rdi
callq 0x2090
leaq -0x160(%rbp), %rdi
callq 0x5884
movq %r14, %rdi
callq 0x2310
nop