// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::GameUnit()
GameUnit::GameUnit() {
    // First Level
    const char *path = "game/Game_Details.txt";
    ifstream in;
    in.open(path);
    if ( ! in )
        cout << "GD: Error reading from file..." << endl;
    string cleanHeader;
    getline(in,cleanHeader,';');
    in >> GameUnit::currentTurn >> ::roundNumber >> ::numberOfPlayers;
    in.close();

    // Second Level
    path = "game/Real_Order.txt";
    ifstream ina;
    vector<string> HeroesNames;
    ina.open(path);
    if ( ! ina )
        cout << "RO: Error reading from file..." << endl;
    getline(ina,cleanHeader,';');
    string word;
    while ( ina >> word )
        HeroesNames.push_back(word);
    ina.close();
    load(HeroesNames);
    turnOrder = realOrder;
    shuffle();
    mainMenu(turnOrder[currentTurn]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x488, %rsp            # imm = 0x488
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
leaq -0x4a8(%rbp), %rdi
callq 0x32a0
leaq 0x5660(%rip), %rsi      # 0x9068
leaq -0x4a8(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x31b0
movq -0x4a8(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x488(%rbp,%rax)
je 0x3a47
movq 0xa58d(%rip), %rdi      # 0xdfc0
leaq 0x5644(%rip), %rsi      # 0x907e
callq 0x3270
movq %rax, %rdi
callq 0x3150
leaq -0x68(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x4a8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
pushq $0x3b
popq %rdx
callq 0x3420
leaq 0x30(%rbx), %rsi
leaq -0x4a8(%rbp), %rdi
callq 0x31a0
leaq 0xa80f(%rip), %rsi      # 0xe290
movq %rax, %rdi
callq 0x31a0
leaq 0xa804(%rip), %rsi      # 0xe294
movq %rax, %rdi
callq 0x31a0
leaq -0x4a8(%rbp), %rdi
callq 0x3070
leaq -0x2a0(%rbp), %rdi
callq 0x32a0
xorps %xmm0, %xmm0
movaps %xmm0, -0x40(%rbp)
andq $0x0, -0x30(%rbp)
leaq 0x55da(%rip), %rsi      # 0x909d
leaq -0x2a0(%rbp), %rdi
pushq $0x8
popq %rdx
callq 0x31b0
movq -0x2a0(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x280(%rbp,%rax)
je 0x3b02
movq 0xa4d2(%rip), %rdi      # 0xdfc0
leaq 0x5be3(%rip), %rsi      # 0x96d8
callq 0x3270
movq %rax, %rdi
callq 0x3150
leaq -0x2a0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
pushq $0x3b
popq %rdx
callq 0x3420
leaq -0x88(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x2a0(%rbp), %r15
leaq -0x98(%rbp), %r12
leaq -0x40(%rbp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0x32d0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3b60
movq %r13, %rdi
movq %r12, %rsi
callq 0x56c8
jmp 0x3b3a
leaq -0x2a0(%rbp), %rdi
callq 0x3070
leaq -0x58(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5704
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x3c74
leaq -0x58(%rbp), %rdi
callq 0x5758
movq %r14, %rdi
movq %rbx, %rsi
callq 0x5784
movq %rbx, %rdi
callq 0x3f34
movslq 0x30(%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %rbx, %rdi
callq 0x3f4a
leaq -0x98(%rbp), %rdi
callq 0x3130
leaq -0x40(%rbp), %rdi
callq 0x5758
leaq -0x2a0(%rbp), %rdi
callq 0x30a0
leaq -0x78(%rbp), %rdi
callq 0x3130
leaq -0x4a8(%rbp), %rdi
callq 0x30a0
addq $0x488, %rsp            # imm = 0x488
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq -0x58(%rbp), %rdi
callq 0x5758
jmp 0x3c26
jmp 0x3c1e
movq %rax, %r15
jmp 0x3c5c
movq %rax, %r15
jmp 0x3c50
movq %rax, %r15
jmp 0x3c32
jmp 0x3c23
movq %rax, %r15
jmp 0x3c47
movq %rax, %r15
leaq -0x98(%rbp), %rdi
callq 0x3130
leaq -0x40(%rbp), %rdi
callq 0x5758
leaq -0x2a0(%rbp), %rdi
callq 0x30a0
leaq -0x78(%rbp), %rdi
callq 0x3130
leaq -0x4a8(%rbp), %rdi
callq 0x30a0
movq %r14, %rdi
callq 0x5a50
movq %rbx, %rdi
callq 0x5a50
movq %r15, %rdi
callq 0x33f0