LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: split(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t>> const&, char const*)
static string_list_t split(const string_t &str, const char *delim) {
    string_list_t result;
    const string_t delim_string = to_string(delim);
    size_t cursor = 0;
    while (cursor <= str.size()) {
        size_t delim_pos = str.find(delim_string, cursor);
        if (delim_pos == string_t::npos) {
            delim_pos = str.size();
        }
        result.push_back(str.substr(cursor, delim_pos - cursor));
        cursor = delim_pos + delim_string.size();
    }
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq %rdx, %rdi
callq 0x60b0
leaq (%rax,%r15), %rdx
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x8(%rsp), %rdi
movq %r15, %rsi
callq 0x1fe82
leaq 0x38(%rsp), %rbp
movq 0x10(%rsp), %rcx
xorl %r13d, %r13d
leaq 0x28(%rsp), %r15
movq 0x8(%rsp), %rsi
movq %r14, %rdi
movq %r13, %rdx
callq 0x6350
movq %rax, %r12
cmpq $-0x1, %rax
jne 0x1ca7d
movq 0x8(%r14), %r12
movq %r12, %rcx
subq %r13, %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x60c0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xcdb8
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1cab8
movq 0x38(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
movq 0x10(%rsp), %rcx
addq %rcx, %r12
movq %r12, %r13
cmpq 0x8(%r14), %r12
jbe 0x1ca60
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1caea
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x1cb43
movq %rax, %r14
jmp 0x1cb22
movq %rax, %r14
movq 0x28(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1cb22
movq 0x38(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x1cb43
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
movq %rbx, %rdi
callq 0xb1e0
movq %r14, %rdi
callq 0x6360
// File: /workspace/github_cpp_makefile_star2_O3/ridiculousfish[P]docopt_fish/docopt_fish_test.cpp
// Function: build_metadata[abi:cxx11](char const*, char const*, char const*, int)
static metadata_t build_metadata(const char *command, const char *description, const char *condition, int tag) {
    metadata_t result;
    const string_t empty;
    result.command = command ? to_string(command) : empty;
    result.description = description ? to_string(description) : empty;
    result.condition = condition ? to_string(condition) : empty;
    result.tag = tag;
    return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %ecx, %ebp
movq %rdx, %r15
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movl %eax, 0x10(%rdi)
leaq 0x30(%rdi), %rcx
movq %rcx, 0x20(%rdi)
movq %rax, 0x28(%rdi)
movl %eax, 0x30(%rdi)
leaq 0x50(%rdi), %rcx
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movl %eax, 0x50(%rdi)
movl %eax, 0x60(%rdi)
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq %rax, -0x8(%r14)
movl %eax, (%r14)
leaq 0x18(%rsp), %r13
testq %rsi, %rsi
je 0x1cbd5
movq %rsi, %r12
movq %rsi, %rdi
callq 0x60b0
leaq (%rax,%r12), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movq %r12, %rsi
callq 0x1fe82
jmp 0x1cbe8
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movq %r14, %rsi
movq %r14, %rdx
callq 0xf722
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x62f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cc11
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
leaq 0x42d5(%rip), %rdx      # 0x20ef5
movq %rdx, %rsi
callq 0x1fe82
leaq 0x40(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x62f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cc52
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
testq %r15, %r15
je 0x1cc75
movq %r15, %rdi
callq 0x60b0
leaq (%rax,%r15), %rdx
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movq %r15, %rsi
callq 0x1fe82
jmp 0x1cc90
leaq 0x8(%rsp), %rdi
movq %r13, (%rdi)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rax
leaq (%rsi,%rax,4), %rdx
callq 0xf722
leaq 0x20(%rbx), %rdi
leaq 0x8(%rsp), %rsi
callq 0x62f0
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1ccba
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
movl %ebp, 0x60(%rbx)
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1ccd9
movq 0x38(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1ccf0
jmp 0x1cd11
jmp 0x1ccf0
jmp 0x1cd11
movq %rax, %r15
movq 0x8(%rsp), %rdi
cmpq %r13, %rdi
je 0x1cd14
movq 0x18(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
jmp 0x1cd14
movq %rax, %r15
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x1cd30
movq 0x38(%rsp), %rax
leaq 0x4(,%rax,4), %rsi
callq 0x6200
movq %rbx, %rdi
callq 0xaeae
movq %r15, %rdi
callq 0x6360
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Battle/Battle.cpp
// Function: Battle::AttackWithWeapon(Hero&, Monster&)
bool Battle::AttackWithWeapon(Hero& hero, Monster& monster)
{
    unsigned int totalDamage = hero.GetWeaponDamage() + hero.GetStrength();

    if ((double)rand() / RAND_MAX > monster.MonsterGetAvoidance()) {
        monster.ChangeHealth(floor((double)(totalDamage * totalDamage) / (totalDamage + monster.MonsterGetDefence())));
        //changes the monster's health according to the function (damage*damage)/(damage + armor)
        return true;
    
    } else {
        cout << monster.Living::GetName() << " avoided the attack!" << endl;
        usleep(1500000);
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rsi, %rbx
movq %rdi, %r15
callq 0x117ea
movl %eax, %r14d
movq %r15, %rdi
callq 0x10a0c
movl %eax, %ebp
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0x1902b(%rip), %xmm0    # 0x24260
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x18e40
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x10(%rsp)
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb2a1
addl %r14d, %ebp
movl %ebp, %eax
imull %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x18e36
addl %ebp, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movsd 0x8(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x32c0
cvttsd2si %xmm0, %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0xb327
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10812
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x23d09(%rip), %rdi     # 0x2efc8
callq 0x31e0
movq %rax, %rbx
leaq 0x18fe6(%rip), %rsi     # 0x242b4
movl $0x14, %edx
movq %rax, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb31d
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x3260
movsd (%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
seta %al
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x28(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb35e
movq 0x28(%rsp), %rsi
incq %rsi
callq 0x31b0
movq %rbx, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Battle/Battle.cpp
// Function: Battle::MonsterAttack(Monster&, Hero&)
bool Battle::MonsterAttack(Monster& monster ,Hero& hero)//the monster attacks the hero . If the hero doesn't avoid the attack they take damage
{
    unsigned int totalDamage = monster.MonsterGetDamage();

    if ((double)rand() / RAND_MAX > hero.GetAgility()) {
        hero.ChangeHealth(floor((double)(totalDamage * totalDamage) / (totalDamage + hero.GetArmorDefence())));
    
    } else {
        cout << endl << "\033[38;5;220m" << hero.Living::GetName() << "\033[0m avoided the attack!" << endl;
        usleep(1500000);
        cout << "\033[2A";
        cout << "\033[J";
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
callq 0x18e0e
movl %eax, %ebp
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0x18cc7(%rip), %xmm0    # 0x24260
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x10a1c
cvtss2sd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb5fa
movl %ebp, %eax
imull %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x11806
addl %ebp, %eax
xorps %xmm1, %xmm1
cvtsi2sd %rax, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x32c0
cvttsd2si %xmm0, %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0xb6f0
movq 0x239c7(%rip), %r14     # 0x2efc8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %rax, %r14
leaq 0x18f2d(%rip), %rsi     # 0x2455f
movl $0xb, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x10812
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x31e0
movq %rax, %rbx
leaq 0x18c48(%rip), %rsi     # 0x242b0
movl $0x18, %edx
movq %rax, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb6b7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x3260
movq 0x23900(%rip), %rbx     # 0x2efc8
leaq 0x19168(%rip), %rsi     # 0x24837
movl $0x4, %edx
movq %rbx, %rdi
callq 0x31e0
leaq 0x1b0c0(%rip), %rsi     # 0x267a3
movl $0x3, %edx
movq %rbx, %rdi
callq 0x31e0
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xb71b
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
movq %rbx, %rdi
callq 0x32f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Game/Game.cpp
// Function: Game::ChooseMonsterToAttack(std::vector<Monster*, std::allocator<Monster*>>&, short&)
bool Game::ChooseMonsterToAttack(vector<Monster *>& monsters, short& mNum)//the user chooses which monster to attack
{
    char testAction;
    char monSize = '0' + monsters.size();

    cout << endl;
    cout << "Press '0' to cancel the attack" << endl;
    cout << "Choose which monster to attack (1-" << monsters.size() << "): ";

    do {
        testAction = getch();

        if (testAction == '0')
            break;

    } while(testAction < '1' || testAction > monSize); //checks if monster chosen exists

    cout << endl << "\033[3A";
    cout << "\033[J";

    if (testAction == '0')
        return false;

    mNum = testAction - '0';

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movl 0x8(%rsi), %r12d
subl (%rsi), %r12d
movq 0x20284(%rip), %rbx     # 0x2efc8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x15aca(%rip), %rsi     # 0x2483c
movl $0x1e, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x15aae(%rip), %rsi     # 0x2485b
movl $0x22, %edx
movq %rbx, %rdi
callq 0x31e0
movq 0x8(%r15), %rsi
subq (%r15), %rsi
sarq $0x3, %rsi
movq %rbx, %rdi
callq 0x30f0
leaq 0x1864d(%rip), %rsi     # 0x27421
movl $0x3, %edx
movq %rax, %rdi
callq 0x31e0
shll $0x15, %r12d
addl $0x30000000, %r12d      # imm = 0x30000000
sarl $0x18, %r12d
callq 0x10684
movl %eax, %ebp
cmpb $0x30, %al
je 0xee5f
jle 0xedf0
movzbl %bpl, %r15d
cmpl %r15d, %r12d
jl 0xedf0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x1555d(%rip), %rsi     # 0x24391
movl $0x4, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x1795b(%rip), %rsi     # 0x267a3
movl $0x3, %edx
movq %rbx, %rdi
callq 0x31e0
addl $-0x30, %r15d
movw %r15w, (%r14)
jmp 0xeeae
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x15504(%rip), %rsi     # 0x24391
movl $0x4, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x17902(%rip), %rsi     # 0x267a3
movl $0x3, %edx
movq %rbx, %rdi
callq 0x31e0
cmpb $0x30, %bpl
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Grid/Grid.cpp
// Function: Grid::Grid()
Grid::Grid() : horizontalSize(50), verticalSize(30)
{
    grid = new char*[verticalSize];

    for(int i = 0; i < verticalSize; i++)
        grid[i] = new char[horizontalSize];

    marketBlocks = new int[2];
    heroLoc[0]   = -1;
    heroLoc[1]   = -1;
    heroInStore  = false;

    MakeEmpty(grid , verticalSize , horizontalSize); // it fills the grid with spaces
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x1e00000032, %rax     # imm = 0x1E00000032
movq %rax, (%rdi)
movl $0xf0, %edi
callq 0x3030
movq %rax, 0x10(%rbx)
xorl %r14d, %r14d
movl $0x32, %edi
callq 0x3030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
cmpq $0x1e, %r14
jne 0xf0c5
movl $0x8, %edi
callq 0x3030
movq %rax, 0x8(%rbx)
movq $-0x1, 0x18(%rbx)
movb $0x0, 0x20(%rbx)
movq 0x10(%rbx), %rax
xorl %ecx, %ecx
xorl %edx, %edx
movq (%rax,%rcx,8), %rsi
movb $0x20, (%rsi,%rdx)
incq %rdx
cmpq $0x32, %rdx
jne 0xf102
incq %rcx
cmpq $0x1e, %rcx
jne 0xf100
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Grid/Grid.cpp
// Function: Grid::~Grid()
Grid::~Grid()
{
    for(int i = 0; i < verticalSize; i++)
        delete[] grid[i];
    delete[] grid;
    delete[] marketBlocks;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x4(%rdi), %eax
testl %eax, %eax
jle 0xf181
xorl %r14d, %r14d
movq 0x10(%rbx), %rcx
movq (%rcx,%r14,8), %rdi
testq %rdi, %rdi
je 0xf176
callq 0x3240
movl 0x4(%rbx), %eax
incq %r14
movslq %eax, %rcx
cmpq %rcx, %r14
jl 0xf161
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xf18f
callq 0x3240
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0xf1a4
popq %rbx
popq %r14
jmp 0x3240
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Input_Validation/Input_Validation.cpp
// Function: isNumeric(char const*, int&, bool)
bool isNumeric(const char* ch, int& action, bool info)         /** With that function we validate the user's input **/
{
    const char* tmpCh = ch;

    while(*ch) {
        if(!isdigit(*ch)) {
            if(info) {
                cerr << "\n\033[31mError:\033[0m A positive numeric argument should be given." << endl;
                cerr << "Please, try again!" << endl;
                cin.clear();
                cin.ignore(numeric_limits<streamsize>::max(), '\n');
            }
            return false;
        }
        ch++;
    }

    action = atoi(tmpCh);
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movb (%rdi), %cl
testb %cl, %cl
je 0x10264
leaq 0x1(%rdi), %rax
movsbl %cl, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x10274
movb (%rax), %cl
incq %rax
testb %cl, %cl
jne 0x10250
callq 0x3290
movl %eax, (%rbx)
movb $0x1, %bl
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
testb %dl, %dl
je 0x1032f
movq 0x1ed6d(%rip), %rbx     # 0x2eff0
leaq 0x14976(%rip), %rsi     # 0x24c00
movl $0x3d, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x14979(%rip), %rsi     # 0x24c3e
movl $0x12, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq 0x1ecd8(%rip), %r14     # 0x2efd8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0x32d0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movq %r14, %rdi
movl $0xa, %edx
callq 0x30e0
jmp 0x1026d
xorl %ebx, %ebx
jmp 0x1026d
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Input_Validation/Input_Validation.cpp
// Function: isValid(char const*, int&, int const&, int const&, bool)
bool isValid(const char* testAction, int& action, const int& lowerRangeLimit, const int& upperRangeLimit, bool info)
{
    if(!isNumeric(testAction,action,info))
        return false;
    
    else if(action < lowerRangeLimit || action > upperRangeLimit) {
        if(info) {
            cerr << "\n\033[31mError:\033[0m The input is invalid." << endl;
            cerr << "Please, try again!" << endl;
        }
        return false;
    }

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %r8d, %edx
callq 0x1023c
testb %al, %al
je 0x103f3
movl (%r12), %eax
cmpl (%r15), %eax
setge %cl
cmpl (%r14), %eax
setle %al
andb %cl, %al
xorb $0x1, %bl
orb %al, %bl
jne 0x103f5
movq 0x1ec73(%rip), %rbx     # 0x2eff0
leaq 0x148cd(%rip), %rsi     # 0x24c51
movl $0x26, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x1487f(%rip), %rsi     # 0x24c3e
movl $0x12, %edx
movq %rbx, %rdi
callq 0x31e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbx, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Keyboard/Keyboard.cpp
// Function: getch()
char getch()
{
	char buf = 0;
	struct termios old = {0};
	fflush(stdout);
	if(tcgetattr(0,&old)<0)
		perror("tcsetattr()");
	old.c_lflag &= ~ICANON;
	old.c_lflag &= ~ECHO;
	old.c_cc[VMIN] = 1;
	old.c_cc[VTIME] = 0;
	if(tcsetattr(0,TCSANOW,&old) < 0)
		perror("tcsetattr ICANON");
	if(read(0,&buf,1)<0)
		perror("read()");
	old.c_lflag |= ICANON;
	old.c_lflag |= ECHO;
	if(tcsetattr(0,TCSADRAIN,&old)<0)
		perror("tcsetattr ~ICANON");

	return buf;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x48, %rsp
movb $0x0, -0x9(%rbp)
xorps %xmm0, %xmm0
leaq -0x50(%rbp), %rbx
movups %xmm0, 0x2c(%rbx)
movaps %xmm0, 0x20(%rbx)
movaps %xmm0, 0x10(%rbx)
movaps %xmm0, (%rbx)
movq 0x1e902(%rip), %rax     # 0x2efb0
movq (%rax), %rdi
callq 0x3200
xorl %edi, %edi
movq %rbx, %rsi
callq 0x31c0
testl %eax, %eax
js 0x10716
leaq -0x50(%rbp), %rdx
andb $-0xb, 0xc(%rdx)
movw $0x100, 0x16(%rdx)      # imm = 0x100
xorl %edi, %edi
xorl %esi, %esi
callq 0x3220
testl %eax, %eax
js 0x10724
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x3270
testq %rax, %rax
js 0x10732
leaq -0x50(%rbp), %rdx
orb $0xa, 0xc(%rdx)
xorl %edi, %edi
movl $0x1, %esi
callq 0x3220
testl %eax, %eax
js 0x10740
movb -0x9(%rbp), %al
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0x14578(%rip), %rdi     # 0x24c95
callq 0x3140
jmp 0x106c4
leaq 0x14576(%rip), %rdi     # 0x24ca1
callq 0x3140
jmp 0x106df
leaq 0x14579(%rip), %rdi     # 0x24cb2
callq 0x3140
jmp 0x106f4
leaq 0x14572(%rip), %rdi     # 0x24cb9
callq 0x3140
jmp 0x1070c
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RecalcMostItems()
void Hero::RecalcMostItems(void)
{
    mostItems = 0;

    if(mostItems < lightingSpellsArray.size())
        mostItems = lightingSpellsArray.size();

    if(mostItems < fireSpellsArray.size())
        mostItems = fireSpellsArray.size();

    if(mostItems < iceSpellsArray.size())
        mostItems = iceSpellsArray.size();

    if(mostItems < weaponsArray.size())
        mostItems = weaponsArray.size();

    if(mostItems < potionsArray.size())
        mostItems = potionsArray.size();

    if(mostItems < armorsArray.size())
        mostItems = armorsArray.size();
}

// Assembly:
movl $0x0, 0xf8(%rdi)
movq 0x40(%rdi), %rax
subq 0x38(%rdi), %rax
je 0x10a80
shrq $0x3, %rax
movl %eax, 0xf8(%rdi)
movl %eax, %eax
jmp 0x10a82
xorl %eax, %eax
movq 0x58(%rdi), %rcx
subq 0x50(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x10a9b
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0x70(%rdi), %rcx
subq 0x68(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x10ab4
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0x88(%rdi), %rcx
subq 0x80(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x10ad3
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0xa0(%rdi), %rcx
subq 0x98(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x10af2
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0xb8(%rdi), %rcx
subq 0xb0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x10b0f
movl %ecx, 0xf8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewSpell(IceSpell*)
void Hero::AddNewSpell(IceSpell* spell)
{
    iceSpellsArray.push_back(spell);
    availableSpellSlots--;

    if(mostItems < iceSpellsArray.size())
        mostItems = iceSpellsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x70(%rdi), %rsi
cmpq 0x78(%rdi), %rsi
je 0x10b53
movq %rax, (%rsi)
movq 0x70(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x70(%rbx)
jmp 0x10b65
leaq 0x68(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17a90
movq 0x70(%rbx), %rax
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
subq 0x68(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10b84
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewSpell(FireSpell*)
void Hero::AddNewSpell(FireSpell* spell)
{
    fireSpellsArray.push_back(spell);
    availableSpellSlots--;

    if(mostItems < fireSpellsArray.size())
        mostItems = fireSpellsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x58(%rdi), %rsi
cmpq 0x60(%rdi), %rsi
je 0x10bb5
movq %rax, (%rsi)
movq 0x58(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x58(%rbx)
jmp 0x10bc7
leaq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17bcc
movq 0x58(%rbx), %rax
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
subq 0x50(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10be6
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewSpell(LightingSpell*)
void Hero::AddNewSpell(LightingSpell* spell)
{
    lightingSpellsArray.push_back(spell);
    availableSpellSlots--;

    if(mostItems < lightingSpellsArray.size())
        mostItems = lightingSpellsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x40(%rdi), %rsi
cmpq 0x48(%rdi), %rsi
je 0x10c17
movq %rax, (%rsi)
movq 0x40(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x40(%rbx)
jmp 0x10c29
leaq 0x38(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17d08
movq 0x40(%rbx), %rax
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
subq 0x38(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10c48
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewItem(Weapon*)
void Hero::AddNewItem(Weapon* item)
{
    weaponsArray.push_back(item);
    availableItemSlots--;

    if(mostItems < weaponsArray.size())
        mostItems = weaponsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x88(%rdi), %rsi
cmpq 0x90(%rdi), %rsi
je 0x10c85
movq %rax, (%rsi)
movq 0x88(%rbx), %rax
addq $0x8, %rax
movq %rax, 0x88(%rbx)
jmp 0x10c9d
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17e44
movq 0x88(%rbx), %rax
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
subq 0x80(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10cbf
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewItem(Armor*)
void Hero::AddNewItem(Armor* item)
{
    armorsArray.push_back(item);
    availableItemSlots--;

    if(mostItems < armorsArray.size())
        mostItems = armorsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0xb8(%rdi), %rsi
cmpq 0xc0(%rdi), %rsi
je 0x10cfd
movq %rax, (%rsi)
movq 0xb8(%rbx), %rax
addq $0x8, %rax
movq %rax, 0xb8(%rbx)
jmp 0x10d15
leaq 0xb0(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17f80
movq 0xb8(%rbx), %rax
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
subq 0xb0(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10d37
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::AddNewItem(Potion*)
void Hero::AddNewItem(Potion* item)
{
    potionsArray.push_back(item);
    availableItemSlots--;

    if(mostItems < potionsArray.size())
        mostItems = potionsArray.size();
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0xa0(%rdi), %rsi
cmpq 0xa8(%rdi), %rsi
je 0x10d75
movq %rax, (%rsi)
movq 0xa0(%rbx), %rax
addq $0x8, %rax
movq %rax, 0xa0(%rbx)
jmp 0x10d8d
leaq 0x98(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x180bc
movq 0xa0(%rbx), %rax
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
subq 0x98(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10daf
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemoveIceSpell(unsigned int const&)
void Hero::RemoveIceSpell(const unsigned int& row) //removes the spell and gets the money from itt(used when the spell is sold)
{
    money += iceSpellsArray[row]->GetPrice() / 2;

    delete iceSpellsArray[row];

    iceSpellsArray.erase(iceSpellsArray.begin() + row);
    availableSpellSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0x68(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0x68(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x10df5
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x68(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0x70(%rbx), %rdx
cmpq %rdx, %rsi
je 0x10e16
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0x70(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x70(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemoveFireSpell(unsigned int const&)
void Hero::RemoveFireSpell(const unsigned int& row) //removes the spell and gets the money from itt(used when the spell is sold)
{
    money += fireSpellsArray[row]->GetPrice() / 2;

    delete fireSpellsArray[row];

    fireSpellsArray.erase(fireSpellsArray.begin() + row);
    availableSpellSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0x50(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0x50(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x10e73
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x50(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0x58(%rbx), %rdx
cmpq %rdx, %rsi
je 0x10e94
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0x58(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x58(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemoveLightingSpell(unsigned int const&)
void Hero::RemoveLightingSpell(const unsigned int& row) //removes the spell and gets the money from it(used when the spell is sold)
{
    money += lightingSpellsArray[row]->GetPrice() / 2;

    delete lightingSpellsArray[row];

    lightingSpellsArray.erase(lightingSpellsArray.begin() + row);
    availableSpellSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0x38(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x10ef1
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x38(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0x40(%rbx), %rdx
cmpq %rdx, %rsi
je 0x10f12
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0x40(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x40(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemoveWeapon(unsigned int const&)
void Hero::RemoveWeapon(const unsigned int& row) //removes the weapon and gets the money from it(used when the weapon is sold)
{
    money += weaponsArray[row]->GetPrice() / 2;

    delete weaponsArray[row];

    weaponsArray.erase(weaponsArray.begin() + row);
    availableItemSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0x80(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0x80(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x10f78
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x80(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0x88(%rbx), %rdx
cmpq %rdx, %rsi
je 0x10f9f
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0x88(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0x88(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemoveArmor(unsigned int const&)
void Hero::RemoveArmor(const unsigned int& row) //removes the armor and gets the money from it(used when the armor is sold)
{
    money += armorsArray[row]->GetPrice() / 2;

    delete armorsArray[row];

    armorsArray.erase(armorsArray.begin() + row);
    availableItemSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0xb0(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0xb0(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x11008
movq (%rdi), %rax
callq *0x20(%rax)
movq 0xb0(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0xb8(%rbx), %rdx
cmpq %rdx, %rsi
je 0x1102f
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0xb8(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0xb8(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::RemovePotion(unsigned int const&)
void Hero::RemovePotion(const unsigned int& row) //removes the potion and gets the money from it(used when the potion is sold)
{
    money += potionsArray[row]->GetPrice() / 2;

    delete potionsArray[row];

    potionsArray.erase(potionsArray.begin() + row);
    availableItemSlots++;

    RecalcMostItems();
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movl (%rsi), %eax
movq 0x98(%rdi), %rcx
movq (%rcx,%rax,8), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
shrl %eax
addl %eax, 0x110(%rbx)
movl (%r14), %eax
movq 0x98(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x11098
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x98(%rbx), %rcx
movl (%r14), %eax
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
movq 0xa0(%rbx), %rdx
cmpq %rdx, %rsi
je 0x110bf
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0xa0(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0xa0(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10a5e
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::EndTurnRefill()
void Hero::EndTurnRefill(void) //after the turn ends the hero restores 10% HP and MP
{
    if(magicPower + (10*magicPower) / 100 < maxMP)
        magicPower = magicPower + (10*magicPower) / 100;

    if(healthPower + (10*healthPower) / 100 < maxHP)
        healthPower = healthPower + (10*healthPower) / 100;
}

// Assembly:
movl 0x104(%rdi), %ecx
leal (%rcx,%rcx), %eax
leal (%rax,%rax,4), %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
addl %ecx, %eax
cmpl 0x114(%rdi), %eax
jae 0x111a7
movl %eax, 0x104(%rdi)
movl 0x28(%rdi), %ecx
leal (%rcx,%rcx), %eax
leal (%rax,%rax,4), %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
addl %ecx, %eax
cmpl 0x2c(%rdi), %eax
jae 0x111c5
movl %eax, 0x28(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::SpellUsed(unsigned int, unsigned int)
bool Hero::SpellUsed(const unsigned int slotNum , const unsigned int typeOfSpell) //deletes the used spell
{
    availableSpellSlots++;

    switch(typeOfSpell)
    {
        case 1:
            delete lightingSpellsArray[slotNum - 1];
            lightingSpellsArray.erase(lightingSpellsArray.begin() + slotNum - 1);

            return true;

        case 2:
            delete iceSpellsArray[slotNum - 1];
            iceSpellsArray.erase(iceSpellsArray.begin() + slotNum - 1);

            return true;

        case 3:
            delete fireSpellsArray[slotNum - 1];
            fireSpellsArray.erase(fireSpellsArray.begin() + slotNum - 1);

            return true;
    }
    return false;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %r14d
movq %rdi, %rbx
incl 0xe8(%rdi)
cmpl $0x3, %edx
je 0x11539
cmpl $0x2, %edx
je 0x1150d
cmpl $0x1, %edx
jne 0x11582
leal -0x1(%r14), %ecx
movq 0x38(%rbx), %rax
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x114fc
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x38(%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
movq 0x40(%rbx), %rdx
addq $0x40, %rbx
jmp 0x11563
leal -0x1(%r14), %ecx
movq 0x68(%rbx), %rax
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x11528
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x68(%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
movq 0x70(%rbx), %rdx
addq $0x70, %rbx
jmp 0x11563
leal -0x1(%r14), %ecx
movq 0x50(%rbx), %rax
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0x11554
movq (%rdi), %rax
callq *0x60(%rax)
movq 0x50(%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
movq 0x58(%rbx), %rdx
addq $0x58, %rbx
cmpq %rdx, %rsi
je 0x11577
leaq -0x8(%rsi), %rdi
subq %rsi, %rdx
callq 0x32b0
movq (%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, (%rbx)
movb $0x1, %al
jmp 0x11584
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::DrinkPotion(unsigned int)
void Hero::DrinkPotion(const unsigned int slotNum) //adds the potion values to the hero
{

    strength += potionsArray[slotNum]->PotionIncreaseStrength();
    dexterity += potionsArray[slotNum]->PotionIncreaseDexterity();
    agility += potionsArray[slotNum]->PotionIncreaseAgility();

    delete potionsArray[slotNum];

    potionsArray.erase(potionsArray.begin() + slotNum);
    availableItemSlots++;

}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl %esi, %r14d
movq 0x98(%rdi), %rax
movq (%rax,%r14,8), %rdi
callq 0x10674
addl %eax, 0x10c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x10678
addl %eax, 0x108(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1067c
addss 0x11c(%rbx), %xmm0
movss %xmm0, 0x11c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1160d
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x98(%rbx), %rax
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
movq 0xa0(%rbx), %rdx
cmpq %rdx, %rsi
je 0x11634
leaq (%rax,%r14,8), %rdi
subq %rsi, %rdx
callq 0x32b0
movq 0xa0(%rbx), %rdx
addq $-0x8, %rdx
movq %rdx, 0xa0(%rbx)
incl 0xec(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Warrior.cpp
// Function: Warrior::LevelUp()
void Warrior::LevelUp(void)
{
    Living::LevelUp();
    maxMP += 5;
    maxHP += 5;
    healthPower += 5;
    strength += 5;
    dexterity += 3;
    agility += 0.015;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x107de
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
paddd 0xea93(%rip), %xmm0     # 0x27010
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd 0xea8e(%rip), %xmm0     # 0x27020
movq %xmm0, 0x108(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xea83(%rip), %xmm0     # 0x27030
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Paladin.cpp
// Function: Paladin::LevelUp()
void Paladin::LevelUp(void)
{
    Living::LevelUp();
    maxMP += 5;
    maxHP += 5;
    healthPower += 5;
    strength += 5;
    dexterity += 5;
    agility += 0.01;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x107de
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
movdqa 0xe6cf(%rip), %xmm1     # 0x27010
paddd %xmm1, %xmm0
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd %xmm1, %xmm0
movq %xmm0, 0x108(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xe6d7(%rip), %xmm0     # 0x27048
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Heroes/Sorcerer.cpp
// Function: Sorcerer::LevelUp()
void Sorcerer::LevelUp(void)
{
    Living::LevelUp();
    maxMP += 5;
    maxHP += 5;
    healthPower += 5;
    strength += 3;
    dexterity += 5;
    agility += 0.015;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
callq 0x107de
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
paddd 0xe30b(%rip), %xmm0     # 0x27010
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd 0xe346(%rip), %xmm0     # 0x27060
movq %xmm0, 0x108(%rbx)
xorps %xmm0, %xmm0
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xe2fb(%rip), %xmm0     # 0x27030
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Living/Monsters/Monster.cpp
// Function: Monster::EndRound()
void Monster::EndRound(void)
{
    if(healthPower + (5 * healthPower) / 100 < maxHP)//monsters restore 5% health each turn
        healthPower = healthPower + (5 * healthPower) / 100;

    if(avoidanceAffectedForRounds > 0)//reduces the round the effect lasts after the end of a turn
    {
        avoidanceAffectedForRounds--;

        if(avoidanceAffectedForRounds == 0){//sets avoidance to its old value
            avoidance = oldAvoidance;
            oldAvoidance = 0;
        }
    }

    if(damageAffectedForRounds > 0)//reduces the round the effect lasts after the end of a turn
    {
        damageAffectedForRounds--;

        if (damageAffectedForRounds == 0){//sets damage to its old value
            minDamage = oldMinDamage;
            maxDamage = oldMaxDamage;
            oldMinDamage = 0;
            oldMaxDamage = 0;
        }
    }

    if(defenceAffectedForRounds > 0)//reduces the round the effect lasts after the end of a turn
    {
        defenceAffectedForRounds--;

        if (defenceAffectedForRounds == 0){//sets defence to its old value
            defence = oldDefence;
            oldDefence = 0;
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x28(%rdi), %ecx
leal (%rcx,%rcx,4), %eax
imulq $0x51eb851f, %rax, %rax # imm = 0x51EB851F
shrq $0x25, %rax
addl %ecx, %eax
cmpl 0x2c(%rdi), %eax
jae 0x18fb7
movl %eax, 0x28(%rdi)
movl 0x50(%rdi), %eax
testl %eax, %eax
je 0x18fd6
decl %eax
movl %eax, 0x50(%rdi)
jne 0x18fd6
movss 0x44(%rdi), %xmm0
movss %xmm0, 0x60(%rdi)
movl $0x0, 0x44(%rdi)
movl 0x48(%rdi), %eax
testl %eax, %eax
je 0x18ff4
decl %eax
movl %eax, 0x48(%rdi)
jne 0x18ff4
movq 0x38(%rdi), %rax
movq %rax, 0x54(%rdi)
movq $0x0, 0x38(%rdi)
movl 0x4c(%rdi), %eax
testl %eax, %eax
je 0x1900f
decl %eax
movl %eax, 0x4c(%rdi)
jne 0x1900f
movl 0x40(%rdi), %eax
movl %eax, 0x5c(%rdi)
movl $0x0, 0x40(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::RecalcMostItems()
void Market::RecalcMostItems(void)
{
    mostItems = 0;

    if (mostItems < lightingSpellsArray.size())
        mostItems = lightingSpellsArray.size();

    if (mostItems < fireSpellsArray.size())
        mostItems = fireSpellsArray.size();

    if (mostItems < iceSpellsArray.size())
        mostItems = iceSpellsArray.size();

    if (mostItems < weaponsArray.size())
        mostItems = weaponsArray.size();

    if (mostItems < potionsArray.size())
        mostItems = potionsArray.size();

    if (mostItems < armorsArray.size())
        mostItems = armorsArray.size();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, 0x1ec(%rdi)
movq 0xb0(%rdi), %rax
subq 0xa8(%rdi), %rax
je 0x19120
shrq $0x3, %rax
movl %eax, 0x1ec(%rdi)
movl %eax, %eax
jmp 0x19122
xorl %eax, %eax
movq 0xc8(%rdi), %rcx
subq 0xc0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x19141
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0xe0(%rdi), %rcx
subq 0xd8(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x19160
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0xf8(%rdi), %rcx
subq 0xf0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x1917f
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0x110(%rdi), %rcx
subq 0x108(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x1919e
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0x128(%rdi), %rcx
subq 0x120(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x191bb
movl %ecx, 0x1ec(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::Market()
Market::Market() : lightingSpellsForSale(0), fireSpellsForSale(0)   , iceSpellsForSale(0),
                   weaponsForSale(0)       , potionsForSale(0)      , armorsForSale(0)   , 
                   minSpellPrice(INT32_MAX), minItemPrice(INT32_MAX), minPrice(INT32_MAX), 
                   mostItems(0)            , prevLevel(0)
{
    AddLightingSpells(10);
    AddFireSpells(10);
    AddIceSpells(10);
    AddWeapons(10);
    AddPotions(10);
    AddArmors(10);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3e0c
leaq 0xa8(%rbx), %r14
movl $0x138, %edx            # imm = 0x138
movq %r14, %rdi
xorl %esi, %esi
callq 0x30d0
movaps 0xdc85(%rip), %xmm0     # 0x27110
movups %xmm0, 0x1e0(%rbx)
movl $0x0, 0x1f0(%rbx)
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x195f8
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x198e4
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x19bae
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x19e74
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x1a0dc
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x1a4c2
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1951d
jmp 0x1951d
jmp 0x1951d
jmp 0x1951d
jmp 0x1951d
movq %rax, %r15
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x19531
callq 0x3170
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x19542
callq 0x3170
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0x19553
callq 0x3170
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x19564
callq 0x3170
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x19575
callq 0x3170
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x19586
callq 0x3170
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x19597
callq 0x3170
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x195a8
callq 0x3170
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x195b9
callq 0x3170
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x195ca
callq 0x3170
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x195db
callq 0x3170
movq (%r14), %rdi
testq %rdi, %rdi
je 0x195e8
callq 0x3170
movq %rbx, %rdi
callq 0x3bcc
movq %r15, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::isAbleToSell(Hero const*, bool const&)
int Market::isAbleToSell(const Hero* hero, const bool& info = true)
{
    int sellState = 2;

    if (hero->GetAvailableItemSlots() == hero->GetMaxItemsSlots()) {
        if (hero->GetAvailableSpellSlots() == hero->GetMaxSpellsSlots()) {
            if (info) {
                cerr << endl << "\033[31mError:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m doesn't have any Items or Spells for sale." << endl;
                usleep(2500000);
            }
            return -1;
        }
        sellState = 0;   //Means that he can sell Spells only
    
    } else if (hero->GetAvailableSpellSlots() == hero->GetMaxSpellsSlots()) {
        sellState = 1;   //Means that he can buy Items only
    }

    return sellState;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rsi, %rdi
callq 0x10a2e
movl %eax, %ebx
movq %r14, %rdi
callq 0x10a3e
movl %eax, %r13d
movq %r14, %rdi
callq 0x10a26
movl %eax, %r12d
movq %r14, %rdi
callq 0x10a36
cmpl %r13d, %ebx
jne 0x21159
xorl %ebx, %ebx
cmpl %eax, %r12d
jne 0x21163
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, (%r15)
jne 0x21163
movq 0xdf51(%rip), %r15      # 0x2eff0
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r15, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %rax, %r15
leaq 0x61d6(%rip), %rsi      # 0x272a6
movl $0x20, %edx
movq %rax, %rdi
callq 0x31e0
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x10812
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0x6729(%rip), %rsi      # 0x27830
movl $0x2f, %edx
movq %rax, %rdi
callq 0x31e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r14, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2114d
callq 0x3170
movl $0x2625a0, %edi         # imm = 0x2625A0
callq 0x3260
jmp 0x21163
xorl %ebx, %ebx
cmpl %eax, %r12d
setne %bl
incl %ebx
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21189
callq 0x3170
movq %rbx, %rdi
callq 0x32f0
nop
// File: /workspace/github_cpp_makefile_star2_O3/cmaureir[P]strip-packing/scattersearch.cpp
// Function: clear_strip(int**)
void clear_strip(int **strip){
    //cout << "clear_strip()" << endl;
    for (int i = 0; i < strip_width; i++) {
        for (int j = 0; j < strip_height; j++) {
            strip[i][j] = 0;
        }
    }
}

// Assembly:
movl 0xb4ce(%rip), %edx      # 0x12370
testl %edx, %edx
jle 0x6edf
movl 0xb4c8(%rip), %ecx      # 0x12374
xorl %eax, %eax
testl %ecx, %ecx
jle 0x6ed4
movq (%rdi,%rax,8), %rdx
xorl %esi, %esi
movl $0x0, (%rdx,%rsi,4)
incq %rsi
movslq 0xb4ab(%rip), %rcx      # 0x12374
cmpq %rcx, %rsi
jl 0x6eb8
movl 0xb49c(%rip), %edx      # 0x12370
incq %rax
movslq %edx, %rsi
cmpq %rsi, %rax
jl 0x6eae
retq