// File: 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
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x188(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8bc0
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x8bf0
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x8c20
testb $0x1, %al
jne 0x53f2
jmp 0x5959
leaq -0x20(%rbp), %rdi
callq 0x8c60
movq %rax, %rsi
leaq -0x48(%rbp), %rdi
callq 0x4150
leaq -0x90(%rbp), %rdi
callq 0xf940
jmp 0x5415
leaq -0xd8(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4150
jmp 0x5427
leaq -0x90(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x115e0
movl %eax, -0x18c(%rbp)
jmp 0x5442
leaq -0xd8(%rbp), %rdi
callq 0x4200
movl -0x18c(%rbp), %eax
testl %eax, %eax
je 0x54d0
jmp 0x545a
movl -0x18c(%rbp), %eax
subl $0x1, %eax
je 0x563a
jmp 0x546b
movl -0x18c(%rbp), %eax
subl $0x2, %eax
je 0x57a4
jmp 0x5908
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x594e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5942
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x4200
jmp 0x5942
movl $0x48, %edi
movq 0x16ac4(%rip), %rsi     # 0x1bfa0
callq 0x45f0
movq %rax, %rcx
movq %rcx, -0x1a0(%rbp)
movb $0x0, -0xe1(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x198(%rbp)
je 0x552d
movq -0x1a0(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
movb $0x1, -0xe1(%rbp)
callq 0x12ab0
jmp 0x551d
movq -0x1a0(%rbp), %rax
movq %rax, -0x198(%rbp)
jmp 0x552d
movq -0x198(%rbp), %rax
movq %rax, -0xa8(%rbp)
xorl %eax, %eax
cmpq -0xa8(%rbp), %rax
jne 0x55ae
movq 0x16a73(%rip), %rdi     # 0x1bfc0
leaq 0xdedf(%rip), %rsi      # 0x13433
callq 0x4310
movq %rax, -0x1a8(%rbp)
jmp 0x5562
movq -0x1a8(%rbp), %rdi
movq 0x16a40(%rip), %rsi     # 0x1bfb0
callq 0x4340
jmp 0x5577
jmp 0x55ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
testb $0x1, -0xe1(%rbp)
jne 0x5596
jmp 0x55a9
movq -0xe0(%rbp), %rdi
movq 0x169fc(%rip), %rsi     # 0x1bfa0
callq 0x41e0
jmp 0x5942
movq -0xa8(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq -0x108(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4150
jmp 0x55ce
movq -0x1b0(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x111e0
jmp 0x55e3
leaq -0x108(%rbp), %rdi
callq 0x4200
movq -0x188(%rbp), %rdi
movq -0xa8(%rbp), %rax
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %rsi
callq 0x8760
jmp 0x5612
jmp 0x591f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x4200
jmp 0x5942
movl $0x48, %edi
movq 0x1695a(%rip), %rsi     # 0x1bfa0
callq 0x45f0
movq %rax, %rcx
movq %rcx, -0x1c0(%rbp)
movb $0x0, -0x119(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x1b8(%rbp)
je 0x5697
movq -0x1c0(%rbp), %rdi
movq %rdi, -0x118(%rbp)
movb $0x1, -0x119(%rbp)
callq 0x8c80
jmp 0x5687
movq -0x1c0(%rbp), %rax
movq %rax, -0x1b8(%rbp)
jmp 0x5697
movq -0x1b8(%rbp), %rax
movq %rax, -0xb0(%rbp)
xorl %eax, %eax
cmpq -0xb0(%rbp), %rax
jne 0x5718
movq 0x16909(%rip), %rdi     # 0x1bfc0
leaq 0xdd75(%rip), %rsi      # 0x13433
callq 0x4310
movq %rax, -0x1c8(%rbp)
jmp 0x56cc
movq -0x1c8(%rbp), %rdi
movq 0x168d6(%rip), %rsi     # 0x1bfb0
callq 0x4340
jmp 0x56e1
jmp 0x5718
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
testb $0x1, -0x119(%rbp)
jne 0x5700
jmp 0x5713
movq -0x118(%rbp), %rdi
movq 0x16892(%rip), %rsi     # 0x1bfa0
callq 0x41e0
jmp 0x5942
movq -0xb0(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq -0x140(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4150
jmp 0x5738
movq -0x1d0(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x111e0
jmp 0x574d
leaq -0x140(%rbp), %rdi
callq 0x4200
movq -0x188(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rax, -0x148(%rbp)
leaq -0x148(%rbp), %rsi
callq 0x8760
jmp 0x577c
jmp 0x591f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x140(%rbp), %rdi
callq 0x4200
jmp 0x5942
movl $0x48, %edi
movq 0x167f0(%rip), %rsi     # 0x1bfa0
callq 0x45f0
movq %rax, %rcx
movq %rcx, -0x1e0(%rbp)
movb $0x0, -0x151(%rbp)
xorl %eax, %eax
cmpq $0x0, %rcx
movq %rax, -0x1d8(%rbp)
je 0x5801
movq -0x1e0(%rbp), %rdi
movq %rdi, -0x150(%rbp)
movb $0x1, -0x151(%rbp)
callq 0x8ce0
jmp 0x57f1
movq -0x1e0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x5801
movq -0x1d8(%rbp), %rax
movq %rax, -0xb8(%rbp)
xorl %eax, %eax
cmpq -0xb8(%rbp), %rax
jne 0x5882
movq 0x1679f(%rip), %rdi     # 0x1bfc0
leaq 0xdc0b(%rip), %rsi      # 0x13433
callq 0x4310
movq %rax, -0x1e8(%rbp)
jmp 0x5836
movq -0x1e8(%rbp), %rdi
movq 0x1676c(%rip), %rsi     # 0x1bfb0
callq 0x4340
jmp 0x584b
jmp 0x5882
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
testb $0x1, -0x151(%rbp)
jne 0x586a
jmp 0x587d
movq -0x150(%rbp), %rdi
movq 0x16728(%rip), %rsi     # 0x1bfa0
callq 0x41e0
jmp 0x5942
movq -0xb8(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x178(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4150
jmp 0x58a2
movq -0x1f0(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x111e0
jmp 0x58b7
leaq -0x178(%rbp), %rdi
callq 0x4200
movq -0x188(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq %rax, -0x180(%rbp)
leaq -0x180(%rbp), %rsi
callq 0x8760
jmp 0x58e6
jmp 0x591f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x178(%rbp), %rdi
callq 0x4200
jmp 0x5942
movq 0x166b1(%rip), %rdi     # 0x1bfc0
leaq 0xdb42(%rip), %rsi      # 0x13458
callq 0x4310
jmp 0x591d
jmp 0x591f
leaq -0x90(%rbp), %rdi
callq 0x8850
leaq -0x48(%rbp), %rdi
callq 0x4200
leaq -0x20(%rbp), %rdi
callq 0x8d40
jmp 0x53dc
leaq -0x90(%rbp), %rdi
callq 0x8850
leaq -0x48(%rbp), %rdi
callq 0x4200
jmp 0x5962
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x98(%rbp), %rdi
callq 0x4520
nop