// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::load(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool Hero::load(string newName) {
    setName(newName);
    string path = "Heros/" + newName + "/Details.txt";
    ifstream in;
    in.open(path);
    if ( ! in ) {
        cout << "HERO: Error reading from file..." << endl;
        return 0;
    }
    string cleanHeader;
    getline(in,cleanHeader,';');

    //Hero @param
    int bd,wz,arc,vmp,zmb,_type;
    double _gold;
    bool _is,_DG,_SA;
    in >> _is >> bd >> wz >> arc >> vmp >> zmb >> _type >> _gold >> _DG >> _SA;

    army->buildArmy(bd,wz,arc,vmp,zmb);
    this->isAlive = _is;
    this->gotDG = _DG;
    this->usedSA = _SA;
    setGold(_gold);
    setType(_type);
    in.close();
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x298, %rsp            # imm = 0x298
movq %rsi, %r14
movq %rdi, %rbx
leaq -0xa0(%rbp), %r15
movq %r15, %rdi
callq 0x32f0
leaq 0x8(%rbx), %rdi
movq %r15, %rsi
callq 0x3180
leaq -0xa0(%rbp), %rdi
callq 0x3130
leaq 0x18c7(%rip), %rsi      # 0x9729
leaq -0x2a8(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x823b
leaq 0x178d(%rip), %rdx      # 0x9608
leaq -0x80(%rbp), %rdi
movq %r15, %rsi
callq 0x58b3
leaq -0x2a8(%rbp), %rdi
callq 0x3130
leaq -0x2a8(%rbp), %rdi
callq 0x32a0
leaq -0x2a8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3240
movq -0x2a8(%rbp), %rax
movq -0x18(%rax), %rax
movl -0x288(%rbp,%rax), %r14d
testb $0x5, %r14b
je 0x7eeb
movq 0x60ee(%rip), %rdi      # 0xdfc0
leaq 0x17fd(%rip), %rsi      # 0x96d6
callq 0x3270
movq %rax, %rdi
callq 0x3150
jmp 0x7ffd
leaq -0x50(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x2a8(%rbp), %rdi
leaq -0x60(%rbp), %rsi
pushq $0x3b
popq %rdx
callq 0x3420
leaq -0x2a8(%rbp), %rdi
leaq -0x1b(%rbp), %rsi
callq 0x3230
leaq -0x34(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x2c(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x28(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x24(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x40(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
leaq -0x1a(%rbp), %rsi
movq %rax, %rdi
callq 0x3230
leaq -0x19(%rbp), %rsi
movq %rax, %rdi
callq 0x3230
movq 0x40(%rbx), %rdi
movl -0x34(%rbp), %esi
movl -0x30(%rbp), %edx
movl -0x2c(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x24(%rbp), %r9d
callq 0x6510
movb -0x1b(%rbp), %al
movb %al, 0x3a(%rbx)
movb -0x1a(%rbp), %al
movb %al, 0x38(%rbx)
movb -0x19(%rbp), %al
movb %al, 0x39(%rbx)
movsd -0x40(%rbp), %xmm0
movsd 0x163d(%rip), %xmm1     # 0x9600
minsd %xmm0, %xmm1
xorpd %xmm2, %xmm2
cmpltsd %xmm2, %xmm0
andnpd %xmm1, %xmm0
movlpd %xmm0, 0x30(%rbx)
movl -0x20(%rbp), %eax
cmpl $0x3, %eax
pushq $0x3
popq %rcx
cmovbl %eax, %ecx
movl %ecx, 0x28(%rbx)
leaq -0x2a8(%rbp), %rdi
callq 0x3070
leaq -0x60(%rbp), %rdi
callq 0x3130
testb $0x5, %r14b
sete %bl
leaq -0x2a8(%rbp), %rdi
callq 0x30a0
leaq -0x80(%rbp), %rdi
callq 0x3130
movl %ebx, %eax
addq $0x298, %rsp            # imm = 0x298
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x804d
movq %rax, %rbx
jmp 0x8065
movq %rax, %rbx
leaq -0x2a8(%rbp), %rdi
jmp 0x8069
movq %rax, %rbx
leaq -0xa0(%rbp), %rdi
jmp 0x8069
movq %rax, %rbx
jmp 0x8059
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x3130
leaq -0x2a8(%rbp), %rdi
callq 0x30a0
leaq -0x80(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0