// File: /workspace/github_cpp_makefile_star2_O1/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::load(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>)
void GameUnit::load(vector<string> _heroes) {
    for (std::string i : _heroes) {
        Hero s;
        Warrior *s1;
        Thief *s2;
        Necromancer *s3;
        switch ( s.typeFromFile(i)) {
            case 0:
                s1 = new(nothrow) Warrior();
                if ( nullptr == s1 ) cout << "Error: memory could not be allocated" << endl;
                s1->load(i);
                realOrder.push_back(s1);
                break;
            case 1:
                s2 = new(nothrow) Thief();
                if ( nullptr == s2 ) cout << "Error: memory could not be allocated" << endl;
                s2->load(i);
                realOrder.push_back(s2);
                break;
            case 2:
                s3 = new(nothrow) Necromancer();
                if ( nullptr == s3 ) cout << "Error: memory could not be allocated" << endl;
                s3->load(i);
                realOrder.push_back(s3);
                break;
            default:
                cout << "Load failed!";
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdi, -0x58(%rbp)
movq (%rsi), %r13
movq 0x8(%rsi), %rbx
cmpq %rbx, %r13
je 0x415c
leaq -0x120(%rbp), %r15
leaq -0xd8(%rbp), %r12
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
addq %rsi, %rdx
leaq -0x50(%rbp), %rdi
callq 0x693a
movq %r15, %rdi
callq 0x839c
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x693a
movq %r15, %rdi
movq %r12, %rsi
callq 0x9be2
movl %eax, %r14d
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x3e69
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3290
testl %r14d, %r14d
je 0x3ec7
cmpl $0x1, %r14d
je 0x3ea4
cmpl $0x2, %r14d
jne 0x3ef1
movl $0x48, %edi
movq 0xc112(%rip), %rsi      # 0xff98
callq 0x3480
testq %rax, %rax
je 0x408a
movq %rax, %r14
movq %rax, %rdi
callq 0x68f8
jmp 0x408d
movl $0x48, %edi
movq 0xc0e8(%rip), %rsi      # 0xff98
callq 0x3480
testq %rax, %rax
je 0x3f0e
movq %rax, %r14
movq %rax, %rdi
callq 0x68b6
jmp 0x3f11
movl $0x48, %edi
movq 0xc0c5(%rip), %rsi      # 0xff98
callq 0x3480
testq %rax, %rax
je 0x3fcc
movq %rax, %r14
movq %rax, %rdi
callq 0xa7dc
jmp 0x3fcf
movl $0xc, %edx
movq 0xc0c3(%rip), %rdi      # 0xffc0
leaq 0x7554(%rip), %rsi      # 0xb458
callq 0x32d0
jmp 0x412e
xorl %r14d, %r14d
testq %r14, %r14
jne 0x3f60
movl $0x24, %edx
movq 0xc09e(%rip), %rdi      # 0xffc0
leaq 0x750a(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xc08b(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xc06d(%rip), %rdi      # 0xffc0
callq 0x3030
movq %rax, %rdi
callq 0x31b0
leaq -0x88(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x98(%rbp), %rdi
callq 0x693a
movq %r14, %rdi
leaq -0x98(%rbp), %rsi
callq 0x9866
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x3fb6
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6d04
jmp 0x412e
xorl %r14d, %r14d
testq %r14, %r14
jne 0x401e
movl $0x24, %edx
movq 0xbfe0(%rip), %rdi      # 0xffc0
leaq 0x744c(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xbfcd(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xbfaf(%rip), %rdi      # 0xffc0
callq 0x3030
movq %rax, %rdi
callq 0x31b0
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0xb8(%rbp), %rdi
callq 0x693a
movq %r14, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x9866
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4074
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6d04
jmp 0x412e
xorl %r14d, %r14d
testq %r14, %r14
jne 0x40dc
movl $0x24, %edx
movq 0xbf22(%rip), %rdi      # 0xffc0
leaq 0x738e(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xbf0f(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xbef1(%rip), %rdi      # 0xffc0
callq 0x3030
movq %rax, %rdi
callq 0x31b0
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
leaq -0x78(%rbp), %rdi
callq 0x693a
movq %r14, %rdi
leaq -0x78(%rbp), %rsi
callq 0x9866
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x411d
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6d04
movq %r15, %rdi
callq 0x6850
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x414f
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
addq $0x20, %r13
cmpq %rbx, %r13
jne 0x3df4
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4172
jmp 0x4172
movq %rax, %rbx
movq 0xbe1c(%rip), %rsi      # 0xff98
movq %r14, %rdi
callq 0x3170
jmp 0x4218
jmp 0x4215
jmp 0x4215
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x4218
movq -0x88(%rbp), %rsi
jmp 0x420b
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4218
movq -0xa8(%rbp), %rsi
jmp 0x420b
jmp 0x4215
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4218
movq -0x68(%rbp), %rsi
jmp 0x420b
movq %rax, %rbx
jmp 0x4224
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x4218
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3290
jmp 0x4218
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x6850
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x423d
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3420
nop