// File: /workspace/github_cpp_makefile_star2_O3/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 0x414b
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 0x6930
movq %r15, %rdi
callq 0x837e
leaq -0xc8(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6930
movq %r15, %rdi
movq %r12, %rsi
callq 0x9baa
movl %eax, %r14d
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x3e6d
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3290
testl %r14d, %r14d
je 0x3ece
cmpl $0x1, %r14d
je 0x3ea8
cmpl $0x2, %r14d
jne 0x3ef8
movl $0x48, %edi
movq 0xc10e(%rip), %rsi      # 0xff98
callq 0x3480
movq %rax, %r14
testq %rax, %rax
je 0x4081
movq %r14, %rdi
callq 0x68ee
jmp 0x40cb
movl $0x48, %edi
movq 0xc0e4(%rip), %rsi      # 0xff98
callq 0x3480
movq %rax, %r14
testq %rax, %rax
je 0x3f15
movq %r14, %rdi
callq 0x68ac
jmp 0x3f5f
movl $0x48, %edi
movq 0xc0be(%rip), %rsi      # 0xff98
callq 0x3480
movq %rax, %r14
testq %rax, %rax
je 0x3fcb
movq %r14, %rdi
callq 0xa7a4
jmp 0x4015
movl $0xc, %edx
movq 0xc0bc(%rip), %rdi      # 0xffc0
leaq 0x754d(%rip), %rsi      # 0xb458
callq 0x32d0
jmp 0x411d
movl $0x24, %edx
movq 0xc09f(%rip), %rdi      # 0xffc0
leaq 0x750b(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xc08c(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xc06e(%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 0x6930
movq %r14, %rdi
leaq -0x98(%rbp), %rsi
callq 0x982e
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x3fb5
movq -0x88(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6cd8
jmp 0x411d
movl $0x24, %edx
movq 0xbfe9(%rip), %rdi      # 0xffc0
leaq 0x7455(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xbfd6(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xbfb8(%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 0x6930
movq %r14, %rdi
leaq -0xb8(%rbp), %rsi
callq 0x982e
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x406b
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6cd8
jmp 0x411d
movl $0x24, %edx
movq 0xbf33(%rip), %rdi      # 0xffc0
leaq 0x739f(%rip), %rsi      # 0xb433
callq 0x32d0
movq 0xbf20(%rip), %rcx      # 0xffc0
movq (%rcx), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x3260
movsbl %al, %esi
movq 0xbf02(%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 0x6930
movq %r14, %rdi
leaq -0x78(%rbp), %rsi
callq 0x982e
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x410c
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3290
movq %r14, -0x30(%rbp)
movq -0x58(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x6cd8
movq %r15, %rdi
callq 0x6846
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x413e
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
addq $0x20, %r13
cmpq %rbx, %r13
jne 0x3df8
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x4161
jmp 0x4161
movq %rax, %rbx
movq 0xbe2d(%rip), %rsi      # 0xff98
movq %r14, %rdi
callq 0x3170
jmp 0x4207
jmp 0x4204
jmp 0x4204
movq %rax, %rbx
movq -0x98(%rbp), %rdi
leaq -0x88(%rbp), %rax
cmpq %rax, %rdi
je 0x4207
movq -0x88(%rbp), %rsi
jmp 0x41fa
movq %rax, %rbx
movq -0xb8(%rbp), %rdi
leaq -0xa8(%rbp), %rax
cmpq %rax, %rdi
je 0x4207
movq -0xa8(%rbp), %rsi
jmp 0x41fa
jmp 0x4204
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x4207
movq -0x68(%rbp), %rsi
jmp 0x41fa
movq %rax, %rbx
jmp 0x4213
movq %rax, %rbx
movq -0xd8(%rbp), %rdi
leaq -0xc8(%rbp), %rax
cmpq %rax, %rdi
je 0x4207
movq -0xc8(%rbp), %rsi
incq %rsi
callq 0x3290
jmp 0x4207
movq %rax, %rbx
leaq -0x120(%rbp), %rdi
callq 0x6846
movq -0x50(%rbp), %rdi
leaq -0x40(%rbp), %rax
cmpq %rax, %rdi
je 0x422c
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x3290
movq %rbx, %rdi
callq 0x3420