LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::mkdir()
bool GameUnit::mkdir() {
    try {
        string comand = "mkdir game";
        const char *runComand = comand.c_str();
        system(runComand);
    } catch( std::exception &e ) {
        cout << "Error creating directory!" << endl;
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
leaq 0x4955(%rip), %rsi      # 0x9465
leaq -0x38(%rbp), %rdi
leaq -0x11(%rbp), %rdx
callq 0x38f0
movq -0x38(%rbp), %rdi
callq 0x3220
leaq -0x38(%rbp), %rdi
callq 0x3130
movb $0x1, %al
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3130
jmp 0x4b51
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x4b8b
movq %rbx, %rdi
callq 0x3100
movq 0x945a(%rip), %rdi      # 0xdfc0
leaq 0x4903(%rip), %rsi      # 0x9470
callq 0x3270
movq %rax, %rdi
callq 0x3150
callq 0x3390
xorl %eax, %eax
jmp 0x4b31
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x5858
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::getHeroByName(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Hero *GameUnit::getHeroByName(string heroName) {
    for (int i = 0; i < ::numberOfPlayers; ++ i)
        if ( realOrder[i]->getName() == heroName )
            return realOrder[i];
    return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r15
movq %rdi, %r14
leaq -0x48(%rbp), %r12
xorl %ebx, %ebx
movslq 0x8ecc(%rip), %rax      # 0xe294
cmpq %rax, %rbx
jge 0x5404
movq (%r14), %rax
movq (%rax,%rbx,8), %rsi
movq %r12, %rdi
callq 0x6c44
movq %r12, %rdi
movq %r15, %rsi
callq 0x5a17
movl %eax, %r13d
movq %r12, %rdi
callq 0x3130
incq %rbx
testb %r13b, %r13b
je 0x53c1
movq (%r14), %rax
movq -0x8(%rax,%rbx,8), %rax
jmp 0x5406
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::nextTurn()
void GameUnit::nextTurn() {
    int check = currentTurn;
    if ( check + 1 >= ::numberOfPlayers ) {
        currentTurn = 0;
        ::roundNumber ++;
        mainMenu(turnOrder[currentTurn]);
    } else {
        currentTurn ++;
        mainMenu(turnOrder[currentTurn]);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movslq 0x30(%rdi), %rax
incq %rax
cmpl 0x8e6d(%rip), %eax      # 0xe294
jge 0x5436
movl %eax, 0x30(%rdi)
shlq $0x3, %rax
addq 0x18(%rdi), %rax
jmp 0x5444
andl $0x0, 0x30(%rdi)
incl 0x8e50(%rip)            # 0xe290
movq 0x18(%rdi), %rax
movq (%rax), %rsi
popq %rbp
jmp 0x3f4a
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::showHeroes()
void GameUnit::showHeroes() {
    for (int i = 0; i < ::numberOfPlayers; ++ i) {
        if ( realOrder[i]->getName() != turnOrder[currentTurn]->getName()) {
            cout << realOrder[i]->getName() << " ";
            cout << realOrder[i]->displayType() << endl;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq -0x48(%rbp), %r14
leaq -0x68(%rbp), %r15
movslq 0x8e20(%rip), %rax      # 0xe294
cmpq %rax, %r12
jge 0x552e
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x6c44
movslq 0x30(%rbx), %rax
movq 0x18(%rbx), %rcx
movq (%rcx,%rax,8), %rsi
movq %r15, %rdi
callq 0x6c44
movq %r14, %rdi
movq %r15, %rsi
callq 0x5a43
movl %eax, %r13d
movq %r15, %rdi
callq 0x3130
movq %r14, %rdi
callq 0x3130
testb %r13b, %r13b
je 0x5526
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x6c44
movq 0x8ae7(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
leaq 0x42ca(%rip), %rsi      # 0x97b5
callq 0x3270
movq %r14, %rdi
callq 0x3130
movq (%rbx), %rax
movq (%rax,%r12,8), %rsi
movq %r14, %rdi
callq 0x7348
movq 0x8ab2(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
movq %r14, %rdi
callq 0x3130
incq %r12
jmp 0x546d
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5541
jmp 0x5541
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::eraseKilled()
void GameUnit::eraseKilled() {
    unsigned long size = realOrder.size();
    for (int i = 0; i < size; i ++) {
        if ( realOrder[i]->inLife() == 0 && realOrder[i]->showArmy() == "." ) {
            realOrder[i]->rmdir();
            realOrder[i]->~Hero();
            realOrder.erase(realOrder.begin() + i);
            ::numberOfPlayers --;
        }
    }
    realOrder.shrink_to_fit();
    turnOrder.shrink_to_fit();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %r13
subq (%rdi), %r13
sarq $0x3, %r13
xorl %r15d, %r15d
leaq -0x48(%rbp), %r14
subq $0x1, %r13
jb 0x55e8
movq (%rbx), %rax
movq (%rax,%r15), %rsi
cmpb $0x0, 0x3a(%rsi)
jne 0x55e2
movq %r14, %rdi
callq 0x70ca
movq %r14, %rdi
leaq 0x3afa(%rip), %rsi      # 0x909b
callq 0x58ee
movl %eax, %r12d
movq %r14, %rdi
callq 0x3130
testb %r12b, %r12b
je 0x55e2
movq (%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x7d5e
movq (%rbx), %rax
movq (%rax,%r15), %rdi
callq 0x5866
movq (%rbx), %rsi
addq %r15, %rsi
movq %rbx, %rdi
callq 0x58fe
decl 0x8cb2(%rip)            # 0xe294
addq $0x8, %r15
jmp 0x557c
movq %rbx, %rdi
callq 0x5f4e
addq $0x18, %rbx
movq %rbx, %rdi
callq 0x5f4e
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/GameUnit.cpp
// Function: GameUnit::getTurnOrder[abi:cxx11]()
string GameUnit::getTurnOrder() {
    string turnList = "";
    for (Hero *i : turnOrder)
        turnList += i->getName() + " ";
    return turnList;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x3f01(%rip), %rsi      # 0x952b
leaq -0x68(%rbp), %r14
movq %r14, %rdx
callq 0x38f0
movq 0x18(%r15), %r13
movq 0x20(%r15), %r12
leaq -0x48(%rbp), %r15
cmpq %r12, %r13
je 0x5686
movq (%r13), %rsi
movq %r15, %rdi
callq 0x6c44
movq %r14, %rdi
movq %r15, %rsi
leaq 0x4155(%rip), %rdx      # 0x97b5
callq 0x58b3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3460
movq %r14, %rdi
callq 0x3130
movq %r15, %rdi
callq 0x3130
addq $0x8, %r13
jmp 0x5642
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x56b7
movq %rax, %r14
jmp 0x56ae
movq %rax, %r14
leaq -0x68(%rbp), %rdi
callq 0x3130
leaq -0x48(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3130
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::Army()
Army::Army() {
    try {
        realArmy = {new Zombie(),new Vampire(),new Archer(),
                    new Wizard(),new BlackDragon()};
        vector<int> vect(6); // emty armyList
        armyList = vect;
        vect.clear();
    }
    catch( std::bad_alloc &exc ) {
        cout << exc.what() << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x8888
movq %r13, -0x58(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x87d0
movq %r13, -0x50(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x86d4
movq %r13, -0x48(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x8600
movq %r13, -0x40(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r13
movq %rax, %rdi
callq 0x8520
leaq -0x30(%rbp), %rdx
movq %r13, -0x8(%rdx)
leaq -0x58(%rbp), %rsi
movq %r14, %rdi
callq 0x68e0
leaq -0x58(%rbp), %rdi
pushq $0x6
popq %rsi
leaq -0x29(%rbp), %rdx
callq 0x6608
leaq -0x58(%rbp), %rsi
movq %rbx, %rdi
callq 0x665a
movq -0x58(%rbp), %rax
cmpq %rax, -0x50(%rbp)
je 0x616b
movq %rax, -0x50(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x6864
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %r12
movq %rax, %r15
leaq -0x58(%rbp), %rdi
callq 0x6864
jmp 0x61b7
jmp 0x61b1
jmp 0x619e
jmp 0x619e
jmp 0x619e
jmp 0x619e
movq %rdx, %r12
movq %rax, %r15
pushq $0x18
popq %rsi
movq %r13, %rdi
callq 0x3290
jmp 0x61b7
movq %rdx, %r12
movq %rax, %r15
cmpl $0x1, %r12d
jne 0x61f9
movq %r15, %rdi
callq 0x3100
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq 0x7deb(%rip), %rdi      # 0xdfc0
movq %rax, %rsi
callq 0x3270
movq %rax, %rdi
callq 0x3150
callq 0x3390
jmp 0x6174
movq %rax, %r15
jmp 0x61f9
movq %rax, %r15
callq 0x3390
movq %r14, %rdi
callq 0x68a2
movq %rbx, %rdi
callq 0x6864
movq %r15, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x5858
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::getArmySize()
int Army::getArmySize() {
    int size = 0;
    for (int i : armyList)
        size += i;
    return size;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x6244
addl (%rcx), %eax
addq $0x4, %rcx
jmp 0x6237
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::showArmy[abi:cxx11]()
string Army::showArmy() {
    string showArmy = "",t = " \t\r\f\v";
    Creature c;
    for (int i = 5; i >= 0; i --) {
        if ( armyList[i] != 0 ) {
            showArmy += std::to_string(armyList[i]);
            showArmy += " " + c.creaType(i) + " ";
        }
    }
    showArmy.erase(showArmy.find_last_not_of(t) + 1);
    showArmy += ".";
    return showArmy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, -0x38(%rbp)
movq %rdi, %rbx
leaq 0x32b1(%rip), %rsi      # 0x952b
leaq -0x58(%rbp), %rdx
callq 0x38f0
leaq 0x329c(%rip), %rsi      # 0x9526
leaq -0x58(%rbp), %rdi
leaq -0x78(%rbp), %rdx
movq %rbx, -0x30(%rbp)
callq 0x38f0
leaq -0x90(%rbp), %rdi
callq 0x82b4
pushq $0x5
popq %r15
leaq -0x78(%rbp), %r12
leaq -0xb0(%rbp), %r13
leaq -0xd0(%rbp), %rbx
testl %r15d, %r15d
js 0x6354
movl %r15d, %eax
movq -0x38(%rbp), %rcx
movq (%rcx), %rcx
movl (%rcx,%rax,4), %esi
testl %esi, %esi
je 0x634c
movq %r12, %rdi
callq 0x672e
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3460
movq %r12, %rdi
callq 0x3130
movq %r13, %rdi
leaq -0x90(%rbp), %rsi
movl %r15d, %edx
callq 0x83d6
movq %rbx, %rdi
leaq 0x34a6(%rip), %r14      # 0x97b5
movq %r14, %rsi
movq %r13, %rdx
callq 0x678e
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x58b3
movq -0x30(%rbp), %rdi
movq %r12, %rsi
callq 0x3460
movq %r12, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x3130
movq %r13, %rdi
callq 0x3130
decl %r15d
jmp 0x62bd
leaq -0x58(%rbp), %rsi
pushq $-0x1
popq %rbx
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3430
leaq 0x1(%rax), %rsi
movq %r14, %rdi
movq %rbx, %rdx
callq 0x3080
leaq 0x2d1b(%rip), %rsi      # 0x909b
movq %r14, %rdi
callq 0x3450
leaq -0x58(%rbp), %rdi
callq 0x3130
movq %r14, %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x63d0
movq %rax, %rbx
jmp 0x63f6
jmp 0x63d0
jmp 0x63d0
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3130
jmp 0x63c2
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x3130
jmp 0x63d8
movq %rax, %rbx
jmp 0x63ed
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
jmp 0x63e8
movq %rax, %rbx
leaq -0x78(%rbp), %rdi
callq 0x3130
leaq -0x58(%rbp), %rdi
callq 0x3130
movq -0x30(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::saveArmy[abi:cxx11]()
std::string Army::saveArmy() {
    std::string saveArmy = "";
    for (int i = 4; i >= 0; i --) {
        saveArmy += std::to_string(armyList[i]);
        if ( i != 0 )
            saveArmy += " ";
        else
            saveArmy += "";
    }
    return saveArmy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x30ad(%rip), %rsi      # 0x952b
leaq -0x48(%rbp), %r12
movq %r12, %rdx
callq 0x38f0
pushq $0x4
popq %r13
leaq 0x3320(%rip), %r15      # 0x97b5
testl %r13d, %r13d
js 0x64da
movl %r13d, %eax
movq (%r14), %rcx
movl (%rcx,%rax,4), %esi
movq %r12, %rdi
callq 0x672e
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3460
movq %r12, %rdi
callq 0x3130
subl $0x1, %r13d
movq %r15, %rsi
leaq 0x305f(%rip), %rax      # 0x952b
cmovbq %rax, %rsi
movq %rbx, %rdi
callq 0x3450
jmp 0x6495
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x64fc
movq %rax, %r14
leaq -0x48(%rbp), %rdi
callq 0x3130
jmp 0x64ff
movq %rax, %r14
movq %rbx, %rdi
callq 0x3130
movq %r14, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Army.cpp
// Function: Army::reBuild()
void Army::reBuild() {
    for(Creature* i : realArmy)
        delete i;
    realArmy = {new Zombie(),new Vampire(),new Archer(),
                new Wizard(),new BlackDragon()};

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x18(%rdi), %rbx
movq 0x18(%rdi), %r14
movq 0x20(%rdi), %r15
cmpq %r15, %r14
je 0x655c
movq (%r14), %rdi
testq %rdi, %rdi
je 0x6556
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %r14
jmp 0x6543
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x8888
movq %r14, -0x40(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x87d0
movq %r14, -0x38(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x86d4
movq %r14, -0x30(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x8600
movq %r14, -0x28(%rbp)
pushq $0x18
popq %rdi
callq 0x3280
movq %rax, %r14
movq %rax, %rdi
callq 0x8520
leaq -0x18(%rbp), %rdx
movq %r14, -0x8(%rdx)
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x68e0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x65f2
jmp 0x65f2
jmp 0x65f2
jmp 0x65f2
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x3290
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::Hero(Hero&)
Hero::Hero(Hero &another) {
    setName(another.getName());
    this->type = another.getType();
    this->gold = another.getGold();
    this->army = another.army;
    isAlive = another.isAlive;;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x6ec1(%rip), %rax      # 0xda68
movq %rax, (%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x8(%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %r15
leaq 0x8(%rdi), %r14
movb $0x0, 0x18(%rdi)
addq $0x8, %rsi
leaq -0x38(%rbp), %rdi
callq 0x32f0
leaq -0x38(%rbp), %rsi
movq %r14, %rdi
callq 0x3180
leaq -0x38(%rbp), %rdi
callq 0x3130
movl 0x28(%r15), %eax
movl %eax, 0x28(%rbx)
movsd 0x30(%r15), %xmm0
movsd %xmm0, 0x30(%rbx)
movq 0x40(%r15), %rax
movq %rax, 0x40(%rbx)
movb 0x3a(%r15), %al
movb %al, 0x3a(%rbx)
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x3130
jmp 0x6c21
movq %rax, %rbx
movq %r14, %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::mkdir()
bool Hero::mkdir() {
    errno = 0;
    try {
        string command = "mkdir -p Heros/" + getName();
        auto runCommand = command.c_str();
        int dir_result = system(runCommand);
        if ( dir_result != 0 && errno != EEXIST )
            return 0;
    }
    catch( std::exception &e ) {
        cout << "Error creating directory!n" << endl;
        return 0;
    }
    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
callq 0x3030
movq %rax, %rbx
andl $0x0, (%rax)
addq $0x8, %r14
leaq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x32f0
leaq 0x2715(%rip), %rsi      # 0x96f7
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x678e
leaq -0x30(%rbp), %rdi
callq 0x3130
movq -0x50(%rbp), %rdi
callq 0x3220
testl %eax, %eax
je 0x700a
cmpl $0x11, (%rbx)
jne 0x700e
movb $0x1, %bl
jmp 0x7010
xorl %ebx, %ebx
leaq -0x50(%rbp), %rdi
callq 0x3130
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0x703a
movq %rdx, %r14
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
jmp 0x7047
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x7081
movq %rbx, %rdi
callq 0x3100
movq 0x6f64(%rip), %rdi      # 0xdfc0
leaq 0x26a4(%rip), %rsi      # 0x9707
callq 0x3270
movq %rax, %rdi
callq 0x3150
callq 0x3390
xorl %ebx, %ebx
jmp 0x7019
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x5858
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::buyCreature(double, int, int, int)
bool Hero::buyCreature(double budget,int creatureType,int quantity,int unitPrice) {
    Creature c;
    if ( quantity > 0 && budget > 0 && creatureType >= 0 ) {
        army->addUnit(creatureType,quantity);
        this->gold -= unitPrice * quantity;
        c.~Creature();
        return true;
    } else return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, %r14d
movl %edx, %r15d
movl %esi, %r12d
movsd %xmm0, -0x30(%rbp)
movq %rdi, %rbx
leaq -0x48(%rbp), %rdi
callq 0x82b4
testl %r15d, %r15d
setg %al
xorpd %xmm0, %xmm0
movsd -0x30(%rbp), %xmm1
ucomisd %xmm0, %xmm1
seta %cl
testl %r12d, %r12d
setns %r13b
andb %al, %r13b
andb %cl, %r13b
cmpb $0x1, %r13b
jne 0x7220
movq 0x40(%rbx), %rdi
movl %r12d, %esi
movl %r15d, %edx
callq 0x6246
imull %r15d, %r14d
cvtsi2sd %r14d, %xmm0
movsd 0x30(%rbx), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x30(%rbx)
movl %r13d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::showHero()
void Hero::showHero() {
    cout << getName() << " ";
    cout << displayType() << ":" << endl;
    cout << getGold() << endl;
    if ( showArmy() != "." )
        cout << showArmy() << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x32f0
movq 0x6d69(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
leaq 0x254f(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
leaq -0x30(%rbp), %rdi
callq 0x3130
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7348
movq 0x6d37(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
leaq 0x2003(%rip), %rsi      # 0x929b
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3150
leaq -0x30(%rbp), %rdi
callq 0x3130
movsd 0x30(%rbx), %xmm0
movq 0x6d03(%rip), %rdi      # 0xdfc0
callq 0x3370
movq %rax, %rdi
callq 0x3150
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70ca
leaq 0x1dbf(%rip), %rsi      # 0x909b
movq %r14, %rdi
callq 0x822e
movl %eax, %r14d
leaq -0x30(%rbp), %rdi
callq 0x3130
testb %r14b, %r14b
je 0x7324
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70ca
movq 0x6cb5(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
leaq -0x30(%rbp), %rdi
callq 0x3130
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x7333
jmp 0x7333
jmp 0x7333
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::displayType[abi:cxx11]()
string Hero::displayType() {
    switch ( type ) {
        case 0:
            return "Warrior";

        case 1:
            return "Thief";

        case 2:
            return "Necromancer";

        default:
            return "UnknownType";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x28(%rsi), %eax
cmpl $0x2, %eax
je 0x737c
cmpl $0x1, %eax
je 0x736f
testl %eax, %eax
jne 0x7389
leaq 0x23c7(%rip), %rsi      # 0x9730
leaq -0xc(%rbp), %rdx
jmp 0x7394
leaq 0x23c2(%rip), %rsi      # 0x9738
leaq -0xb(%rbp), %rdx
jmp 0x7394
leaq 0x23bb(%rip), %rsi      # 0x973e
leaq -0xa(%rbp), %rdx
jmp 0x7394
leaq 0x23ba(%rip), %rsi      # 0x974a
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x38f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::showHeroFight()
void Hero::showHeroFight() {
    cout << getName() << " ";
    cout << displayType() << ":" << endl;
    if ( showArmy() != "." )
        cout << showArmy() << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rsi
leaq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x32f0
movq 0x6bf5(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
leaq 0x23db(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
leaq -0x30(%rbp), %rdi
callq 0x3130
movq %r14, %rdi
movq %rbx, %rsi
callq 0x7348
movq 0x6bc3(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
leaq 0x1e8f(%rip), %rsi      # 0x929b
movq %rax, %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3150
leaq -0x30(%rbp), %rdi
callq 0x3130
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70ca
leaq 0x1c64(%rip), %rsi      # 0x909b
movq %r14, %rdi
callq 0x822e
movl %eax, %r14d
leaq -0x30(%rbp), %rdi
callq 0x3130
testb %r14b, %r14b
je 0x747f
leaq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x70ca
movq 0x6b5a(%rip), %rdi      # 0xdfc0
movq %r14, %rsi
callq 0x3260
movq %rax, %rdi
callq 0x3150
leaq -0x30(%rbp), %rdi
callq 0x3130
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x748e
jmp 0x748e
jmp 0x748e
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::save()
void Hero::save() {
    ofstream out;
    out.open("Heros/" + getName() + "/Details.txt");
    out << "live|B:W:A:V:Z|type|gold|DG|SA;" << endl;
    out << isAlive << " " << saveArmy() << " " << getType() << " " << gold << " " << gotDG << " " << usedSA;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x260, %rsp            # imm = 0x260
movq %rdi, %rbx
leaq -0x270(%rbp), %rdi
callq 0x33c0
leaq 0x8(%rbx), %rsi
leaq -0x50(%rbp), %rdi
callq 0x32f0
leaq 0x1b6a(%rip), %rsi      # 0x9729
leaq -0x70(%rbp), %rdi
leaq -0x50(%rbp), %rdx
callq 0x678e
leaq 0x1a35(%rip), %rdx      # 0x9608
leaq -0x30(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x58b3
leaq -0x270(%rbp), %rdi
leaq -0x30(%rbp), %rsi
pushq $0x10
popq %rdx
callq 0x3140
leaq -0x30(%rbp), %rdi
callq 0x3130
leaq -0x70(%rbp), %rdi
callq 0x3130
leaq -0x50(%rbp), %rdi
callq 0x3130
leaq 0x1a00(%rip), %rsi      # 0x9615
leaq -0x270(%rbp), %rdi
callq 0x3270
movq %rax, %rdi
callq 0x3150
movzbl 0x3a(%rbx), %esi
leaq -0x270(%rbp), %rdi
callq 0x33a0
leaq 0x1b75(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
movq %rax, %r14
leaq -0x30(%rbp), %rdi
movq %rbx, %rsi
callq 0x8076
leaq -0x30(%rbp), %rsi
movq %r14, %rdi
callq 0x3260
leaq 0x1b4b(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
movl 0x28(%rbx), %esi
movq %rax, %rdi
callq 0x33e0
leaq 0x1b31(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
movsd 0x30(%rbx), %xmm0
movq %rax, %rdi
callq 0x3370
leaq 0x1b15(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
movzbl 0x38(%rbx), %esi
movq %rax, %rdi
callq 0x33a0
leaq 0x1afa(%rip), %rsi      # 0x97b5
movq %rax, %rdi
callq 0x3270
movzbl 0x39(%rbx), %esi
movq %rax, %rdi
callq 0x33a0
leaq -0x30(%rbp), %rdi
callq 0x3130
leaq -0x270(%rbp), %rdi
callq 0x3320
addq $0x260, %rsp            # imm = 0x260
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x7d19
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
jmp 0x7d03
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x3130
jmp 0x7d11
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0x7d25
jmp 0x7d19
movq %rax, %rbx
jmp 0x7d2a
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
leaq -0x270(%rbp), %rdi
callq 0x3320
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::rmdir()
void Hero::rmdir() {
    isAlive = false;
    try {
        string command = "rm -rf Heros/" + getName();
        const char *runCommand = command.c_str();
        system(runCommand);
    }
    catch( std::exception &e ) {
        cout << "Error deleting directory!n" << endl;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movb $0x0, 0x3a(%rdi)
leaq 0x8(%rdi), %rsi
leaq -0x30(%rbp), %rdi
callq 0x32f0
leaq 0x19a1(%rip), %rsi      # 0x9722
leaq -0x50(%rbp), %rdi
leaq -0x30(%rbp), %rdx
callq 0x678e
leaq -0x30(%rbp), %rdi
callq 0x3130
movq -0x50(%rbp), %rdi
callq 0x3220
leaq -0x50(%rbp), %rdi
callq 0x3130
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rdx, %r14
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
jmp 0x7dc8
movq %rdx, %r14
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x3130
jmp 0x7dd5
movq %rdx, %r14
movq %rax, %rbx
cmpl $0x1, %r14d
jne 0x7e0d
movq %rbx, %rdi
callq 0x3100
movq 0x61d6(%rip), %rdi      # 0xdfc0
leaq 0x16cf(%rip), %rsi      # 0x94c0
callq 0x3270
movq %rax, %rdi
callq 0x3150
callq 0x3390
jmp 0x7da9
movq %rax, %rbx
callq 0x3390
movq %rbx, %rdi
callq 0x33f0
movq %rax, %rdi
callq 0x5858
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Hero.cpp
// Function: Hero::typeFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int Hero::typeFromFile(string heroName) {
    string path = "Heros/" + heroName + "/Details.txt";
    ifstream in;
    in.open(path);
    if ( ! in ) {
        cout << "HERO: Error reading from file..." << endl;
        return -1;
    }
    string cleanHeader;
    getline(in,cleanHeader,';');
    int  type;
    //Hero @param
    int bd,wz,arc,vmp,zmb;
    double _gold;
    bool _is;
    in >> _is >> bd >> wz >> arc >> vmp >> zmb >> type >> _gold;
    in.close();

    return type;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rsi, %rdx
leaq 0x1681(%rip), %rsi      # 0x9729
leaq -0x278(%rbp), %rbx
movq %rbx, %rdi
callq 0x823b
leaq 0x154a(%rip), %rdx      # 0x9608
leaq -0x70(%rbp), %rdi
movq %rbx, %rsi
callq 0x58b3
leaq -0x278(%rbp), %rdi
callq 0x3130
leaq -0x278(%rbp), %rdi
callq 0x32a0
leaq -0x278(%rbp), %rdi
leaq -0x70(%rbp), %rsi
pushq $0x8
popq %rdx
callq 0x3240
movq -0x278(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x258(%rbp,%rax)
je 0x812d
movq 0x5eaf(%rip), %rdi      # 0xdfc0
leaq 0x15be(%rip), %rsi      # 0x96d6
callq 0x3270
movq %rax, %rdi
callq 0x3150
pushq $-0x1
popq %rbx
jmp 0x81cc
leaq -0x40(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x278(%rbp), %rdi
leaq -0x50(%rbp), %rsi
pushq $0x3b
popq %rdx
callq 0x3420
leaq -0x278(%rbp), %rdi
leaq -0x9(%rbp), %rsi
callq 0x3230
leaq -0x24(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x1c(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x18(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x14(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x10(%rbp), %rsi
movq %rax, %rdi
callq 0x31a0
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
callq 0x31c0
leaq -0x278(%rbp), %rdi
callq 0x3070
movl -0x10(%rbp), %ebx
leaq -0x50(%rbp), %rdi
callq 0x3130
leaq -0x278(%rbp), %rdi
callq 0x30a0
leaq -0x70(%rbp), %rdi
callq 0x3130
movl %ebx, %eax
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %rbp
retq
jmp 0x8205
movq %rax, %rbx
jmp 0x821d
movq %rax, %rbx
leaq -0x278(%rbp), %rdi
jmp 0x8221
movq %rax, %rbx
jmp 0x8211
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x3130
leaq -0x278(%rbp), %rdi
callq 0x30a0
leaq -0x70(%rbp), %rdi
callq 0x3130
movq %rbx, %rdi
callq 0x33f0
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Creature.cpp
// Function: Creature::Creature(Creature&)
Creature::Creature(Creature &another) {
    if ( another.attackPoints > 1 && another.defendPoints > 1 && another.cost > 50 && another.cType != Unknown &&
         another.attackPoints < 10 && another.defendPoints > 10 && another.cost > 200 ) {
        this->attackPoints = another.attackPoints;
        this->defendPoints = another.defendPoints;
        this->cost = another.cost;
        this->cType = another.cType;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x57b5(%rip), %rax      # 0xda90
movq %rax, (%rdi)
movl 0x8(%rsi), %eax
cmpl $0x2, %eax
jl 0x831c
movl 0xc(%rsi), %ecx
cmpl $0x2, %ecx
jl 0x831c
movl 0x10(%rsi), %edx
cmpl $0x33, %edx
jl 0x831c
cmpl $0xc9, %edx
jb 0x831c
cmpl $0xb, %ecx
jb 0x831c
cmpl $0x9, %eax
ja 0x831c
movl 0x14(%rsi), %esi
cmpl $0x5, %esi
je 0x831c
movl %eax, 0x8(%rdi)
movl %ecx, 0xc(%rdi)
movl %edx, 0x10(%rdi)
movl %esi, 0x14(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Creature.cpp
// Function: Creature::creaType[abi:cxx11](int)
string Creature::creaType(int vtype) {
    switch ( vtype ) {
        case 0:
            return "Zombie";
        case 1:
            return "Archer";
        case 2:
            return "Vampire";
        case 3:
            return "Wizard";
        case 4:
            return "Black_Dragon";
        default:
            return "Unknown";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpl $0x4, %edx
ja 0x8437
movl %edx, %eax
leaq 0x138b(%rip), %rcx      # 0x9778
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x13d2(%rip), %rsi      # 0x97cf
leaq -0xe(%rbp), %rdx
jmp 0x8442
leaq 0x13e2(%rip), %rsi      # 0x97ec
leaq -0xa(%rbp), %rdx
jmp 0x8442
leaq 0x13c6(%rip), %rsi      # 0x97dd
leaq -0xc(%rbp), %rdx
jmp 0x8442
leaq 0x13c1(%rip), %rsi      # 0x97e5
leaq -0xb(%rbp), %rdx
jmp 0x8442
leaq 0x13a5(%rip), %rsi      # 0x97d6
leaq -0xd(%rbp), %rdx
jmp 0x8442
leaq 0x13bb(%rip), %rsi      # 0x97f9
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x38f0
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Thief.cpp
// Function: Thief::specialAbility(Hero&)
bool Thief::specialAbility(Hero &toRob) {
    if ( isAlive ) {
        if ( toRob.getGold() > 70 ) {
            this->addGold(70);
            toRob.setGold(toRob.getGold() - 70.0);
            return 1;
        } else {
            addGold(toRob.getGold());
            toRob.setGold(0.0);
            return 1;
        }
    }
    std::cout << "You died!" << endl;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movb 0x3a(%rdi), %bl
cmpb $0x1, %bl
jne 0x8a1c
movq %rsi, %r14
movq %rdi, %r15
movq %rsi, %rdi
callq 0x6c6a
ucomisd 0xe48(%rip), %xmm0      # 0x9840
jbe 0x8a39
movsd 0xe3e(%rip), %xmm0      # 0x9840
movq %r15, %rdi
callq 0x7d3e
movq %r14, %rdi
callq 0x6c6a
addsd 0xe2e(%rip), %xmm0      # 0x9848
jmp 0x8a4d
movq 0x559d(%rip), %rdi      # 0xdfc0
leaq 0xe26(%rip), %rsi       # 0x9850
callq 0x3270
movq %rax, %rdi
callq 0x3150
jmp 0x8a55
movq %r14, %rdi
callq 0x6c6a
movq %r15, %rdi
callq 0x7d3e
xorpd %xmm0, %xmm0
movq %r14, %rdi
callq 0x70a6
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Warrior.cpp
// Function: Warrior::specialAbility(Hero&)
bool Warrior::specialAbility(Hero &s) {
    if ( isAlive ) {
        addGold(50);
        cout << "Gold added successfully" << endl;
        return true;
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb 0x3a(%rdi), %bl
cmpb $0x1, %bl
jne 0x8b66
movsd 0xd22(%rip), %xmm0      # 0x9868
callq 0x7d3e
movq 0x546e(%rip), %rdi      # 0xdfc0
leaq 0xd17(%rip), %rsi       # 0x9870
callq 0x3270
movq %rax, %rdi
callq 0x3150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Serfati[P]Heroes-of-Might-and-Magic-3/Necromancer.cpp
// Function: Necromancer::specialAbility(Hero&)
bool Necromancer::specialAbility(Hero &s) {
    if ( isAlive ) {
        army->addUnit(0,1);
        cout << "Zombie added ‫‪successfully‬‬" << endl;
        return 1;
    }
    return 0;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movb 0x3a(%rdi), %bl
cmpb $0x1, %bl
jne 0x8c3b
movq 0x40(%rdi), %rdi
pushq $0x1
popq %rdx
xorl %esi, %esi
callq 0x6246
movq 0x5399(%rip), %rdi      # 0xdfc0
leaq 0xc63(%rip), %rsi       # 0x9891
callq 0x3270
movq %rax, %rdi
callq 0x3150
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/enigma.cpp
// Function: Enigma::~Enigma()
Enigma::~Enigma(){
  delete plugb_ref;
  delete config_obj;
  for(auto iterator=rotor_vector.begin();iterator!=rotor_vector.end();iterator++){
    delete *iterator;
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %r14
testq %r14, %r14
je 0x269d
movq %r14, %rdi
callq 0x2904
pushq $0x38
popq %rsi
movq %r14, %rdi
callq 0x2130
movq (%rbx), %r14
testq %r14, %r14
je 0x26b9
leaq 0x28(%r14), %rdi
callq 0x299a
pushq $0x48
popq %rsi
movq %r14, %rdi
callq 0x2130
leaq 0x10(%rbx), %r14
movq 0x10(%rbx), %r13
pushq $0x60
popq %r15
cmpq 0x18(%rbx), %r13
je 0x26f8
movq (%r13), %r12
testq %r12, %r12
je 0x26e7
movq %r12, %rdi
callq 0x291a
movq %r12, %rdi
movq %r15, %rsi
callq 0x2130
addq $0x8, %r13
jmp 0x26d0
movq %r14, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x29ce
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/enigma.cpp
// Function: Enigma::encrypt(int&)
void Enigma::encrypt(int& code){

  int len = rotor_vector.size();
  
  plugb_ref->mapping(code,PB);             //plugboard forward mapping
  
  if (len!=0){
    Rotor* r_last = rotor_vector[len-1];
    r_last->shift_ground(RUN);             //rotate the right-hand rotor before circuit closes
    
    for (int j=len-1;j>0;j--){
      if ((rotor_vector[j])->get_notch_stat()){    //if notch is reached, engage the rotor on the left
	rotor_vector[j-1]->shift_ground(RUN);
	rotor_vector[j]->set_notch_stat(false);
      }
      }
    for(int j=len-1;j>=0;j--){
      rotor_vector[j]->encrypting(code,FORWARD);    //rotor forward mapping
    }
  }

  plugb_ref->mapping(code,RF);                     //reflector mapping
    
  if(len!=0){
    for(int j=0;j<len;j++){
      rotor_vector[j]->encrypting(code,BACKWARD);      //rotor backward mapping
    }
  }

  plugb_ref->mapping(code,PB);                   //plugboard backward mapping

  cout << static_cast<char>(code+CONVERSION);        //print result to output stream
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
movq 0x18(%r14), %r15
subq 0x10(%r14), %r15
shrq $0x3, %r15
pushq $0x64
popq %rdx
callq 0x3b06
testl %r15d, %r15d
je 0x27ed
leal -0x1(%r15), %r12d
movslq %r15d, %rax
movq 0x10(%r14), %rcx
movq -0x8(%rcx,%rax,8), %rdi
pushq $-0x2
popq %rbp
movl %ebp, %esi
callq 0x3db4
movq %r12, %r13
testl %r13d, %r13d
jle 0x27ae
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rdi
callq 0x3f62
testb %al, %al
je 0x278e
movq 0x10(%r14), %rax
movq -0x8(%rax,%r13,8), %rdi
movl %ebp, %esi
callq 0x3db4
movq 0x10(%r14), %rax
movq (%rax,%r13,8), %rdi
xorl %esi, %esi
callq 0x3ef8
decq %r13
jmp 0x2759
movl %r12d, %eax
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %rdi
movq %rbx, %rsi
movl $0x3e8, %edx            # imm = 0x3E8
callq 0x3efe
decl %r12d
testl %r12d, %r12d
jns 0x2793
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0xc8, %edx
callq 0x3b06
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
cmpq %r12, %r15
je 0x27fe
movq 0x10(%r14), %rax
movq (%rax,%r12,8), %rdi
movq %rbx, %rsi
movl $0x7d0, %edx            # imm = 0x7D0
callq 0x3efe
incq %r12
jmp 0x27ce
movq 0x8(%r14), %rdi
movq %rbx, %rsi
movl $0xc8, %edx
callq 0x3b06
movq 0x8(%r14), %rdi
pushq $0x64
popq %rdx
movq %rbx, %rsi
callq 0x3b06
movb (%rbx), %al
addb $0x41, %al
movsbl %al, %esi
movq 0x47ad(%rip), %rdi      # 0x6fc8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2150
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/enigma.cpp
// Function: Enigma::run()
void Enigma::run(){
  char charac;
  int code;
  int count = 0;
  
  while(cin >> ws >> charac){ 
    if((charac>=CONVERSION)&&(charac<=CONVERSION+25)){        
      code = static_cast<int>(charac)-CONVERSION;
      encrypt(code);
      count ++;
    }else{
      cerr << charac;
      throw INVALID_INPUT_CHARACTER;
    }
  }
  if ((count==0)&&(cin.fail())){           
    cerr << "The input file";
    throw ERROR_OPENING_CONFIGURATION_FILE;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
xorl %ebp, %ebp
movq 0x4792(%rip), %rbx      # 0x6fd8
leaq 0xb(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %rbx, %rdi
callq 0x20f0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2160
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x2894
movzbl 0xb(%rsp), %eax
leal -0x41(%rax), %ecx
cmpb $0x19, %cl
ja 0x28b3
addl $-0x41, %eax
movl %eax, 0xc(%rsp)
movq %r14, %rdi
movq %r12, %rsi
callq 0x270a
decl %ebp
jmp 0x2850
testl %ebp, %ebp
jne 0x28a6
movq (%rbx), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%rbx,%rax)
jne 0x28e1
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movsbl %al, %esi
movq 0x4733(%rip), %rdi      # 0x6ff0
callq 0x2150
pushq $0x4
popq %rdi
callq 0x20a0
movl $0x2, (%rax)
movq 0x46d9(%rip), %rsi      # 0x6fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
movq 0x4708(%rip), %rdi      # 0x6ff0
leaq 0x18b3(%rip), %rsi      # 0x41a2
callq 0x2110
pushq $0x4
popq %rdi
callq 0x20a0
movl $0xb, (%rax)
jmp 0x28d0
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::Config(int, char**)
Config::Config(int arg_ct,char**arg_vl){      
  arg_count = arg_ct;
  arg_value = arg_vl;
  rotor_count = 0;
  
  if ((arg_ct < 3)||(arg_ct ==4))
    throw INSUFFICIENT_NUMBER_OF_PARAMETERS;
  
  int last_index = arg_ct-1;
  plugboard_file = arg_vl[1];
  reflector_file = arg_vl[2];
  
  if (arg_ct > 3){
    rotor_pos_file = arg_vl[last_index];
    for (int i=3;i<last_index;i++){
      rotor_files.push_back(arg_value[i]);
      rotor_count++;
    }
  }
  check_pb_file();
  check_rf_file();

  if(arg_ct >3){
    for (int i=0;i<rotor_count;i++){
      check_rot_file(rotor_files[i],i);   
    }
    check_rot_pos_file();
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x28(%rdi), %rbx
andq $0x0, 0x38(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rdi)
movl %esi, (%rdi)
movq %rdx, 0x8(%rdi)
andl $0x0, 0x10(%rdi)
cmpl $0x3, %esi
jl 0x2c0f
movl %esi, %r15d
cmpl $0x4, %esi
je 0x2c0f
movq %rdi, %r14
movq 0x8(%rdx), %rax
movq %rax, 0x18(%rdi)
movq 0x10(%rdx), %rax
movq %rax, 0x20(%rdi)
jb 0x2bc7
leal -0x1(%r15), %r12d
movq (%rdx,%r12,8), %rax
movq %rax, 0x40(%r14)
shlq $0x3, %r12
pushq $0x18
popq %r13
cmpq %r13, %r12
je 0x2bc7
movq 0x8(%r14), %rsi
addq %r13, %rsi
movq %rbx, %rdi
callq 0x3742
incl 0x10(%r14)
addq $0x8, %r13
jmp 0x2ba9
movq %r14, %rdi
callq 0x2c48
movq %r14, %rdi
callq 0x2ee6
cmpl $0x4, %r15d
jb 0x2c05
xorl %r15d, %r15d
movslq 0x10(%r14), %rax
cmpq %rax, %r15
jge 0x2bfd
movq (%rbx), %rax
movq (%rax,%r15,8), %rsi
movl %r15d, %edx
callq 0x3194
incq %r15
jmp 0x2be0
movq %r14, %rdi
callq 0x35b0
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x4
popq %rdi
callq 0x20a0
movl $0x1, (%rax)
movq 0x438c(%rip), %rsi      # 0x6fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
jmp 0x2c34
jmp 0x2c34
jmp 0x2c34
movq %rax, %r14
movq %rbx, %rdi
callq 0x299a
movq %r14, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::check_rot_pos_file()
void Config::check_rot_pos_file(){
  ifstream input;
  int buffer;
  int count = 0;
  char charac;
  
  input.open(rotor_pos_file);

  while((count<rotor_count)&&(input>>buffer)){
    input.get(charac);
    if(!isspace(charac)){
      cerr << "Non-numeric character in rotor position file: rotor.pos" <<endl;
      throw NON_NUMERIC_CHARACTER;
    } 
    if((buffer<0)||(buffer>25)){
      cerr << "Invalid index in rotor position file: rotor.pos" <<endl;
      throw INVALID_INDEX;
    }count++;
  }
  if((input.fail())&&(!input.eof())){
    cerr << "Non-numeric character in rotor position file: rotor.pos" <<endl;
    throw NON_NUMERIC_CHARACTER;
  }
  if(count<rotor_count){
    cerr << "No starting position for rotor " << count;
    throw NO_ROTOR_STARTING_POSITION;
  }
  input.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movq %rdi, %r14
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x2140
movq 0x40(%r14), %rsi
pushq $0x8
popq %rbx
movq %r15, %rdi
movl %ebx, %edx
callq 0x20d0
xorl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0xc(%rsp), %r12
leaq 0xb(%rsp), %r13
cmpl 0x10(%r14), %ebp
jge 0x3636
movq %r15, %rdi
movq %r12, %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3636
movq %r15, %rdi
movq %r13, %rsi
callq 0x2170
movsbl 0xb(%rsp), %edi
callq 0x2030
testl %eax, %eax
je 0x367d
cmpl $0x1a, 0xc(%rsp)
jae 0x369c
incl %ebp
jmp 0x35f3
movq 0x10(%rsp), %rax
movq -0x18(%rax), %rax
movl 0x30(%rsp,%rax), %eax
testb $0x5, %al
setne %cl
testb $0x2, %al
sete %al
testb %al, %cl
jne 0x367d
cmpl 0x10(%r14), %ebp
jl 0x36d5
leaq 0x10(%rsp), %rdi
callq 0x2040
leaq 0x10(%rsp), %rdi
callq 0x2050
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x396c(%rip), %rdi      # 0x6ff0
leaq 0xe14(%rip), %rsi       # 0x449f
callq 0x2110
movq %rax, %rdi
callq 0x2090
pushq $0x4
jmp 0x36b9
movq 0x394d(%rip), %rdi      # 0x6ff0
leaq 0xe2d(%rip), %rsi       # 0x44d7
callq 0x2110
movq %rax, %rdi
callq 0x2090
pushq $0x3
popq %rbx
pushq $0x4
popq %rdi
callq 0x20a0
movl %ebx, (%rax)
movq 0x38e5(%rip), %rsi      # 0x6fb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x21b0
movq 0x3914(%rip), %rdi      # 0x6ff0
leaq 0xe24(%rip), %rsi       # 0x4507
callq 0x2110
movq %rax, %rdi
movl %ebp, %esi
callq 0x21c0
jmp 0x36ba
jmp 0x36f6
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x21d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/config.cpp
// Function: Config::get_file(int)
const char* Config::get_file(int filecode){
  switch(filecode){
  case PB: 
    return plugboard_file;
  case RF:
    return reflector_file;
  case RP:
    return rotor_pos_file; 
  default: return "No files found!";
  }
}

// Assembly:
cmpl $0x12c, %esi            # imm = 0x12C
je 0x372b
cmpl $0xc8, %esi
je 0x3726
cmpl $0x64, %esi
jne 0x3730
movq 0x18(%rdi), %rax
retq
movq 0x20(%rdi), %rax
retq
movq 0x40(%rdi), %rax
retq
leaq 0xa94(%rip), %rax       # 0x41cb
retq
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/plugboard_reflector.cpp
// Function: Plugboard_Reflector::store_config_pr(int)
void Plugboard_Reflector::store_config_pr(int store_code){
  ifstream in_put;
  in_put.open(config_pr->get_file(store_code));      //to get the file name from the Config class
  
  vector<int>* buffer_vec;
  int buffer;

  if(store_code == PB){
    buffer_vec = &swap_config;
  }
  if(store_code == RF){
    buffer_vec = &ref_config;
  }
  while(in_put>>buffer){
    buffer_vec->push_back(buffer);
  }
  in_put.close();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x218, %rsp            # imm = 0x218
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2140
movq 0x30(%rbx), %rdi
movl %ebp, %esi
callq 0x370c
leaq 0x10(%rsp), %rdi
pushq $0x8
popq %rdx
movq %rax, %rsi
callq 0x20d0
leaq 0x18(%rbx), %r14
cmpl $0xc8, %ebp
cmovneq %rbx, %r14
leaq 0x10(%rsp), %rbx
leaq 0xc(%rsp), %r15
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20c0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x3acb
movq %r14, %rdi
movq %r15, %rsi
callq 0x3760
jmp 0x3aa5
leaq 0x10(%rsp), %rdi
callq 0x2040
leaq 0x10(%rsp), %rdi
callq 0x2050
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3af1
jmp 0x3af1
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x21d0
// File: /workspace/github_cpp_makefile_star2_O2/yuroitaki[P]enigma_machine/rotor.cpp
// Function: Rotor::Rotor(Config*, int)
Rotor::Rotor(Config* config_rotor, int rotor_idt){
  config_rot = config_rotor;
  rotor_id = rotor_idt;
  notch_reached = false;
  store_encrypt(rotor_id);
  create_key();
  shift_ground(SETUP);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
leaq 0x8(%rdi), %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x38(%rdi)
movups %xmm0, 0x28(%rdi)
movups %xmm0, 0x18(%rdi)
andq $0x0, 0x48(%rdi)
movups %xmm0, 0x8(%rdi)
movq %rsi, (%rdi)
movl %edx, 0x54(%rdi)
movb $0x0, 0x58(%rdi)
movl %edx, %esi
callq 0x3bee
movq %r14, %rdi
callq 0x3d7e
pushq $-0x1
popq %rsi
movq %r14, %rdi
callq 0x3db4
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %r15
leaq 0x38(%r14), %rdi
addq $0x20, %r14
callq 0x2966
movq %r14, %rdi
callq 0x2966
movq %rbx, %rdi
callq 0x2966
movq %r15, %rdi
callq 0x21d0