LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 0x127d8
movl %eax, %ebp
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0x11bc1(%rip), %xmm0    # 0x1b260
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xd076
cvtss2sd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x96fa
movl %ebp, %eax
imull %eax, %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0xdb56
addl %ebp, %eax
cvtsi2sd %rax, %xmm1
movsd (%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x3300
cvttsd2si %xmm0, %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
jmp 0x9783
movq 0x1d8c7(%rip), %rdi     # 0x26fc8
callq 0x30d0
leaq 0x11e52(%rip), %rsi     # 0x1b55f
movq %rax, %rdi
callq 0x31d0
movq %rax, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0xced6
movq %r14, %rdi
movq %r15, %rsi
callq 0x3190
leaq 0x11b76(%rip), %rsi     # 0x1b2b0
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0x8(%rsp), %rdi
callq 0x30c0
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x32a0
movq 0x1d863(%rip), %rbx     # 0x26fc8
leaq 0x120cb(%rip), %rsi     # 0x1b837
movq %rbx, %rdi
callq 0x31d0
leaq 0x14028(%rip), %rsi     # 0x1d7a3
movq %rbx, %rdi
callq 0x31d0
movb $0x1, %al
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3330
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O2/MichaelXanth[P]RPG_Game/Game/Game.cpp
// Function: Game::DisplayActions(unsigned int const&, bool)
void Game::DisplayActions(const unsigned int& arrow, bool inventoryActions)
{
    if (!inventoryActions && arrow == 0)
        cout << "\033[1;33m~> Attack\033[0m                        " << endl;
    else if (!inventoryActions)
        cout << "   Attack                        " << endl;

    if (!inventoryActions && arrow == 1)
        cout << "\033[1;33m~> Use Spell\033[0m                        " << endl;
    else if (!inventoryActions)
        cout << "   Use Spell                        " << endl;

    if ((!inventoryActions && arrow == 2) || (inventoryActions && arrow == 0))
        cout << "\033[1;33m~> Change Armor\033[0m                        " << endl;
    else
        cout << "   Change Armor                        " << endl;

    if ((!inventoryActions && arrow == 3) || (inventoryActions && arrow == 1))
        cout << "\033[1;33m~> Change Weapon\033[0m                        " << endl;
    else
        cout << "   Change Weapon                        " << endl;

    if ((!inventoryActions && arrow == 4) || (inventoryActions && arrow == 2))
        cout << "\033[1;33m~> Drink Potion\033[0m                        " << endl;
    else
        cout << "   Drink Potion                        " << endl;
    cout << "                                           " << endl;
    cout << "                                           \n\033[2A";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movl (%rsi), %eax
testl %eax, %eax
setne %cl
orb %bpl, %cl
cmpb $0x1, %cl
jne 0x9b5b
testb %bpl, %bpl
je 0x9b6b
testl %eax, %eax
je 0x9bbc
leaq 0x11ba6(%rip), %rsi     # 0x1b6ff
jmp 0x9bc3
movq 0x1d466(%rip), %rdi     # 0x26fc8
leaq 0x11abf(%rip), %rsi     # 0x1b628
jmp 0x9b79
movq 0x1d456(%rip), %rdi     # 0x26fc8
leaq 0x11adc(%rip), %rsi     # 0x1b655
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
cmpl $0x1, (%rbx)
jne 0x9b94
leaq 0x11ae5(%rip), %rsi     # 0x1b677
jmp 0x9b9b
leaq 0x11b0c(%rip), %rsi     # 0x1b6a7
movq 0x1d426(%rip), %rdi     # 0x26fc8
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
movl %ebp, %eax
xorb $0x1, %al
movzbl %al, %eax
addl %eax, %eax
cmpl %eax, (%rbx)
jne 0x9b52
leaq 0x11b09(%rip), %rsi     # 0x1b6cc
movq 0x1d3fe(%rip), %r14     # 0x26fc8
movq %r14, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
xorb $0x1, %bpl
movzbl %bpl, %r15d
leal 0x1(,%r15,2), %eax
cmpl %eax, (%rbx)
leaq 0x11b34(%rip), %rax     # 0x1b727
leaq 0x11b61(%rip), %rsi     # 0x1b75b
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leal 0x2(,%r15,2), %eax
cmpl %eax, (%rbx)
leaq 0x11b65(%rip), %rax     # 0x1b784
leaq 0x11b91(%rip), %rsi     # 0x1b7b7
cmoveq %rax, %rsi
movq %r14, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0x11b9e(%rip), %rsi     # 0x1b7df
movq %r14, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0x11bb3(%rip), %rsi     # 0x1b80b
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x31d0
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rsi, %r14
movl 0x8(%rsi), %r12d
subl (%rsi), %r12d
movq 0x1b480(%rip), %r15     # 0x26fc8
movq %r15, %rdi
callq 0x30d0
leaq 0xfce5(%rip), %rsi      # 0x1b83c
movq %r15, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0xfced(%rip), %rsi      # 0x1b85b
movq %r15, %rdi
callq 0x31d0
movq 0x8(%r14), %rsi
subq (%r14), %rsi
sarq $0x3, %rsi
movq %rax, %rdi
callq 0x3120
leaq 0x12891(%rip), %rsi     # 0x1e421
movq %rax, %rdi
callq 0x31d0
shll $0x15, %r12d
addl $0x30000000, %r12d      # imm = 0x30000000
sarl $0x18, %r12d
callq 0xcd74
movl %eax, %ebp
cmpb $0x30, %al
je 0xbbf4
jle 0xbba7
movzbl %bpl, %r15d
cmpl %r15d, %r12d
jl 0xbba7
movq 0x1b404(%rip), %r14     # 0x26fc8
movq %r14, %rdi
callq 0x30d0
leaq 0xf7be(%rip), %rsi      # 0x1b391
movq %rax, %rdi
callq 0x31d0
leaq 0x11bc1(%rip), %rsi     # 0x1d7a3
movq %r14, %rdi
callq 0x31d0
addl $-0x30, %r15d
movw %r15w, (%rbx)
jmp 0xbc21
movq 0x1b3cd(%rip), %rbx     # 0x26fc8
movq %rbx, %rdi
callq 0x30d0
leaq 0xf787(%rip), %rsi      # 0x1b391
movq %rax, %rdi
callq 0x31d0
leaq 0x11b8a(%rip), %rsi     # 0x1d7a3
movq %rbx, %rdi
callq 0x31d0
cmpb $0x30, %bpl
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movabsq $0x1e00000032, %rax     # imm = 0x1E00000032
movq %rax, (%rdi)
movl $0xf0, %edi
callq 0x3030
movq %rax, 0x10(%rbx)
xorl %r15d, %r15d
pushq $0x32
popq %r14
cmpq $0x1e, %r15
je 0xbfc1
movq %r14, %rdi
callq 0x3030
movq 0x10(%rbx), %rcx
movq %rax, (%rcx,%r15,8)
incq %r15
jmp 0xbfa6
pushq $0x8
popq %rdi
callq 0x3030
movq %rax, 0x8(%rbx)
orq $-0x1, 0x18(%rbx)
movb $0x0, 0x20(%rbx)
movq 0x10(%rbx), %rsi
pushq $0x1e
popq %rdx
pushq $0x32
popq %rcx
popq %rbx
popq %r14
popq %r15
jmp 0xbfea
// File: /workspace/github_cpp_makefile_star2_O2/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
xorl %r14d, %r14d
movslq 0x4(%rbx), %rax
movq 0x10(%rbx), %rdi
cmpq %rax, %r14
jge 0xc040
movq (%rdi,%r14,8), %rdi
testq %rdi, %rdi
je 0xc03b
callq 0x3260
incq %r14
jmp 0xc020
testq %rdi, %rdi
je 0xc04a
callq 0x3260
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0xc05f
popq %rbx
popq %r14
jmp 0x3260
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/MichaelXanth[P]RPG_Game/Grid/Grid.cpp
// Function: Grid::BuildGrid()
void Grid::BuildGrid(void)
{
    int marketP[2];
    // Detemines how many lines and rows the market will have
    marketBlocks[0] = (rand() % 4) + 1;
    marketBlocks[1] = (rand() % 5) + 1;
    marketP[0]      =  rand() % (verticalSize   - marketBlocks[0] + 1);
    marketP[1]      =  rand() % (horizontalSize - marketBlocks[1] + 1);

    // Marks the spaces the market fills with 'M'
    for (int i = marketP[0]; i < marketBlocks[0] + marketP[0]; i++)
        for (int j = marketP[1]; j < marketBlocks[1] + marketP[1]; j++)
            grid[i][j] = 'M';

    int  heroP[2];
    bool heroPlaced = false;

    // Detemines the hero location
    while(heroPlaced != true) {
        heroP[0] = rand() % verticalSize;
        heroP[1] = rand() % horizontalSize;

        if (grid[heroP[0]][heroP[1]] == ' ') {
            grid[heroP[0]][heroP[1]] = 'H';
            heroLoc[0] = heroP[0];
            heroLoc[1] = heroP[1];
            heroPlaced = true;
        }
    }

    // Determines where non-accessible blocks are placed
    for(int i = 0; i < verticalSize; i++) {
        float chance = 0.1;

        for(int j = 0; j < horizontalSize; j++)
            if (grid[i][j] == ' ' && (double)rand() / RAND_MAX < chance)
                grid[i][j] = 'X';
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x3060
pushq $0x4
popq %rcx
cltd
idivl %ecx
incl %edx
movq 0x8(%rbx), %rax
movl %edx, (%rax)
callq 0x3060
pushq $0x5
popq %rcx
cltd
idivl %ecx
incl %edx
movq 0x8(%rbx), %rax
movl %edx, 0x4(%rax)
callq 0x3060
movl 0x4(%rbx), %ecx
movq 0x8(%rbx), %rdx
subl (%rdx), %ecx
incl %ecx
cltd
idivl %ecx
movl %edx, %ebp
callq 0x3060
movl (%rbx), %esi
movq 0x8(%rbx), %rcx
subl 0x4(%rcx), %esi
incl %esi
cltd
idivl %esi
movslq %edx, %rax
movslq %ebp, %rdx
movq %rdx, %rsi
movslq (%rcx), %r8
addq %rdx, %r8
movq %rax, %rdi
cmpq %r8, %rsi
jl 0xc0e9
jmp 0xc0fa
movq 0x10(%rbx), %rcx
movq (%rcx,%rsi,8), %rcx
movb $0x4d, (%rcx,%rdi)
incq %rdi
movq 0x8(%rbx), %rcx
movslq 0x4(%rcx), %r8
addq %rax, %r8
cmpq %r8, %rdi
jl 0xc0d6
incq %rsi
jmp 0xc0c6
movb $0x1, %r14b
testb $0x1, %r14b
je 0xc139
callq 0x3060
cltd
idivl 0x4(%rbx)
movl %edx, %ebp
callq 0x3060
cltd
idivl (%rbx)
movq 0x10(%rbx), %rax
movslq %ebp, %rcx
movq (%rax,%rcx,8), %rax
movslq %edx, %rcx
cmpb $0x20, (%rax,%rcx)
jne 0xc0fd
movb $0x48, (%rax,%rcx)
movl %ebp, 0x18(%rbx)
movl %ecx, 0x1c(%rbx)
xorl %r14d, %r14d
jmp 0xc0fd
xorl %r14d, %r14d
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jge 0xc195
xorl %r15d, %r15d
movslq (%rbx), %rax
cmpq %rax, %r15
jge 0xc190
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
cmpb $0x20, (%rax,%r15)
jne 0xc18b
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0xf0f0(%rip), %xmm0     # 0x1b260
movsd 0xf808(%rip), %xmm1     # 0x1b980
ucomisd %xmm0, %xmm1
jbe 0xc18b
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rax
movb $0x58, (%rax,%r15)
incq %r15
jmp 0xc148
incq %r14
jmp 0xc13c
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %rax
movsbl (%rax), %r14d
testl %r14d, %r14d
je 0xcb47
leal -0x30(%r14), %ecx
incq %rax
cmpl $0xa, %ecx
jb 0xcaca
testb %dl, %dl
je 0xcb4e
movq 0x1a506(%rip), %rbx     # 0x26ff0
leaq 0xf10f(%rip), %rsi      # 0x1bc00
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0xf136(%rip), %rsi      # 0x1bc3e
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
movq 0x1a4b9(%rip), %rbx     # 0x26fd8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
callq 0x3310
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
pushq $0xa
popq %rdx
movq %rbx, %rdi
callq 0x3110
jmp 0xcb4e
callq 0x32d0
movl %eax, (%rbx)
testb %r14b, %r14b
sete %al
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movl %r8d, %edx
callq 0xcac0
testb %al, %al
je 0xcbca
movl (%r12), %eax
cmpl (%r15), %eax
setge %cl
cmpl (%r14), %eax
setle %al
andb %cl, %al
xorb $0x1, %bl
orb %al, %bl
jne 0xcbcc
movq 0x1a454(%rip), %rbx     # 0x26ff0
leaq 0xf0ae(%rip), %rsi      # 0x1bc51
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq 0xf084(%rip), %rsi      # 0x1bc3e
movq %rbx, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x1a212(%rip), %rax     # 0x26fb0
movq (%rax), %rdi
callq 0x3220
xorl %edi, %edi
movq %rbx, %rsi
callq 0x3200
testl %eax, %eax
js 0xce02
leaq -0x50(%rbp), %rdx
andb $-0xb, 0xc(%rdx)
movw $0x100, 0x16(%rdx)      # imm = 0x100
xorl %edi, %edi
xorl %esi, %esi
callq 0x3240
testl %eax, %eax
js 0xce10
leaq -0x9(%rbp), %rsi
pushq $0x1
popq %rdx
xorl %edi, %edi
callq 0x32b0
testq %rax, %rax
js 0xce1e
leaq -0x50(%rbp), %rdx
orb $0xa, 0xc(%rdx)
pushq $0x1
popq %rsi
xorl %edi, %edi
callq 0x3240
testl %eax, %eax
js 0xce2c
movb -0x9(%rbp), %al
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0xee8c(%rip), %rdi      # 0x1bc95
callq 0x3170
jmp 0xcdb4
leaq 0xee8a(%rip), %rdi      # 0x1bca1
callq 0x3170
jmp 0xcdcf
leaq 0xee8d(%rip), %rdi      # 0x1bcb2
callq 0x3170
jmp 0xcde2
leaq 0xee86(%rip), %rdi      # 0x1bcb9
callq 0x3170
jmp 0xcdf8
nop
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0xf8(%rdi)
movq 0x40(%rdi), %rax
subq 0x38(%rdi), %rax
je 0xd0d7
shrq $0x3, %rax
movl %eax, 0xf8(%rdi)
movl %eax, %eax
jmp 0xd0d9
xorl %eax, %eax
movq 0x58(%rdi), %rcx
subq 0x50(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0xd0f2
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0x70(%rdi), %rcx
subq 0x68(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0xd10b
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0x88(%rdi), %rcx
subq 0x80(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0xd12a
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0xa0(%rdi), %rcx
subq 0x98(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0xd149
movl %ecx, 0xf8(%rdi)
movl %ecx, %eax
movq 0xb8(%rdi), %rcx
subq 0xb0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0xd166
movl %ecx, 0xf8(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0x68, %rdi
movq %rax, %rsi
callq 0x113b0
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd1bf
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0x50, %rdi
movq %rax, %rsi
callq 0x113ce
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x58(%rbx), %rax
subq 0x50(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd205
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0x38, %rdi
movq %rax, %rsi
callq 0x113ec
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x40(%rbx), %rax
subq 0x38(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd24b
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0x80, %rdi
movq %rax, %rsi
callq 0x1140a
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x88(%rbx), %rax
subq 0x80(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd29a
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0xb0, %rdi
movq %rax, %rsi
callq 0x11428
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0xb8(%rbx), %rax
subq 0xb0(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd2e8
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %rbx
leaq 0x8(%rsp), %rax
movq %rsi, (%rax)
addq $0x98, %rdi
movq %rax, %rsi
callq 0x11446
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0xa0(%rbx), %rax
subq 0x98(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0xd336
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x68(%rdi), %r14
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 (%r15), %eax
movq 0x68(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd37f
movq (%rdi), %rax
callq *0x60(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x11464
incl 0xe8(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x50(%rdi), %r14
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 (%r15), %eax
movq 0x50(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd3e1
movq (%rdi), %rax
callq *0x60(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x1149e
incl 0xe8(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
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 (%r15), %eax
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd443
movq (%rdi), %rax
callq *0x60(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x114d8
incl 0xe8(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x80(%rdi), %r14
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 (%r15), %eax
movq 0x80(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd4ae
movq (%rdi), %rax
callq *0x20(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x11512
incl 0xec(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xb0(%rdi), %r14
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 (%r15), %eax
movq 0xb0(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd51a
movq (%rdi), %rax
callq *0x20(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x1154c
incl 0xec(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x98(%rdi), %r14
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 (%r15), %eax
movq 0x98(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0xd586
movq (%rdi), %rax
callq *0x20(%rax)
movq (%r14), %rcx
movl (%r15), %eax
leaq (%rcx,%rax,8), %rsi
movq %r14, %rdi
callq 0x11586
incl 0xec(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0xd0b8
nop
// File: /workspace/github_cpp_makefile_star2_O2/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), %esi
imull $0xa, %esi, %eax
pushq $0x64
popq %rcx
xorl %edx, %edx
divl %ecx
addl %esi, %eax
cmpl 0x114(%rdi), %eax
jae 0xd666
movl %eax, 0x104(%rdi)
movl 0x28(%rdi), %esi
imull $0xa, %esi, %eax
xorl %edx, %edx
divl %ecx
addl %esi, %eax
cmpl 0x2c(%rdi), %eax
jae 0xd67a
movl %eax, 0x28(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd8c1
cmpl $0x2, %edx
je 0xd88e
cmpl $0x1, %edx
jne 0xd8f6
leal -0x1(%r14), %ecx
movq 0x38(%rbx), %rax
addq $0x38, %rbx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0xd879
movq (%rdi), %rax
callq *0x60(%rax)
movq (%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
addq $-0x8, %rsi
movq %rbx, %rdi
callq 0x114d8
jmp 0xd8f2
leal -0x1(%r14), %ecx
movq 0x68(%rbx), %rax
addq $0x68, %rbx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0xd8ac
movq (%rdi), %rax
callq *0x60(%rax)
movq (%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
addq $-0x8, %rsi
movq %rbx, %rdi
callq 0x11464
jmp 0xd8f2
leal -0x1(%r14), %ecx
movq 0x50(%rbx), %rax
addq $0x50, %rbx
movq (%rax,%rcx,8), %rdi
testq %rdi, %rdi
je 0xd8df
movq (%rdi), %rax
callq *0x60(%rax)
movq (%rbx), %rax
movl %r14d, %ecx
leaq (%rax,%rcx,8), %rsi
addq $-0x8, %rsi
movq %rbx, %rdi
callq 0x1149e
movb $0x1, %al
jmp 0xd8f8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x98(%rdi), %r14
movl %esi, %r15d
movq 0x98(%rdi), %rax
movq (%rax,%r15,8), %rdi
callq 0xcd66
addl %eax, 0x10c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0xcd6a
addl %eax, 0x108(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r15,8), %rdi
callq 0xcd6e
addss 0x11c(%rbx), %xmm0
movss %xmm0, 0x11c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r15,8), %rdi
testq %rdi, %rdi
je 0xd985
movq (%rdi), %rax
callq *0x20(%rax)
movq (%r14), %rax
leaq (%rax,%r15,8), %rsi
movq %r14, %rdi
callq 0x11586
incl 0xec(%rbx)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcea2
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
paddd 0xbe93(%rip), %xmm0     # 0x1e010
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd 0xbe8e(%rip), %xmm0     # 0x1e020
movq %xmm0, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xbe86(%rip), %xmm0     # 0x1e030
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcea2
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
movdqa 0xbbe7(%rip), %xmm1     # 0x1e010
paddd %xmm1, %xmm0
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd %xmm1, %xmm0
movq %xmm0, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xbbf2(%rip), %xmm0     # 0x1e048
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcea2
addl $0x5, 0x114(%rbx)
movq 0x28(%rbx), %xmm0
paddd 0xb93b(%rip), %xmm0     # 0x1e010
movq %xmm0, 0x28(%rbx)
movq 0x108(%rbx), %xmm0
paddd 0xb976(%rip), %xmm0     # 0x1e060
movq %xmm0, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xb92e(%rip), %xmm0     # 0x1e030
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movl $0x64, %esi
xorl %edx, %edx
divl %esi
addl %ecx, %eax
cmpl 0x2c(%rdi), %eax
jae 0x12973
movl %eax, 0x28(%rdi)
movl 0x50(%rdi), %eax
testl %eax, %eax
je 0x1298f
decl %eax
movl %eax, 0x50(%rdi)
jne 0x1298f
movss 0x44(%rdi), %xmm0
movss %xmm0, 0x60(%rdi)
andl $0x0, 0x44(%rdi)
movl 0x48(%rdi), %eax
testl %eax, %eax
je 0x129aa
decl %eax
movl %eax, 0x48(%rdi)
jne 0x129aa
movq 0x38(%rdi), %rax
movq %rax, 0x54(%rdi)
andq $0x0, 0x38(%rdi)
movl 0x4c(%rdi), %eax
testl %eax, %eax
je 0x129c2
decl %eax
movl %eax, 0x4c(%rdi)
jne 0x129c2
movl 0x40(%rdi), %eax
movl %eax, 0x5c(%rdi)
andl $0x0, 0x40(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
andl $0x0, 0x1ec(%rdi)
movq 0xb0(%rdi), %rax
subq 0xa8(%rdi), %rax
je 0x12acd
shrq $0x3, %rax
movl %eax, 0x1ec(%rdi)
movl %eax, %eax
jmp 0x12acf
xorl %eax, %eax
movq 0xc8(%rdi), %rcx
subq 0xc0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x12aee
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0xe0(%rdi), %rcx
subq 0xd8(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x12b0d
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0xf8(%rdi), %rcx
subq 0xf0(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x12b2c
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0x110(%rdi), %rcx
subq 0x108(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x12b4b
movl %ecx, 0x1ec(%rdi)
movl %ecx, %eax
movq 0x128(%rdi), %rcx
subq 0x120(%rdi), %rcx
sarq $0x3, %rcx
cmpq %rax, %rcx
jbe 0x12b68
movl %ecx, 0x1ec(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
callq 0x3d44
leaq 0xa8(%rbx), %r14
movl $0x138, %edx            # imm = 0x138
movq %r14, %rdi
xorl %esi, %esi
callq 0x3100
movaps 0xb378(%rip), %xmm0     # 0x1e110
movups %xmm0, 0x1e0(%rbx)
andl $0x0, 0x1f0(%rbx)
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x12f0e
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x1317c
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x133dc
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x13634
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x13836
leaq -0x2c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x13b56
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x12e2b
jmp 0x12e2b
jmp 0x12e2b
jmp 0x12e2b
jmp 0x12e2b
movq %rax, -0x38(%rbp)
leaq 0x1b0(%rbx), %rdi
leaq 0x198(%rbx), %r15
leaq 0x180(%rbx), %r12
leaq 0x168(%rbx), %r13
leaq 0x150(%rbx), %rax
movq %rax, -0x40(%rbp)
leaq 0x138(%rbx), %rax
movq %rax, -0x48(%rbp)
leaq 0x120(%rbx), %rax
movq %rax, -0x50(%rbp)
leaq 0x108(%rbx), %rax
movq %rax, -0x58(%rbp)
leaq 0xf0(%rbx), %rax
movq %rax, -0x60(%rbp)
leaq 0xd8(%rbx), %rax
movq %rax, -0x68(%rbp)
leaq 0xc0(%rbx), %rax
movq %rax, -0x70(%rbp)
callq 0x19340
movq %r15, %rdi
callq 0x19340
movq %r12, %rdi
callq 0x19340
movq %r13, %rdi
callq 0x19340
movq -0x40(%rbp), %rdi
callq 0x19340
movq -0x48(%rbp), %rdi
callq 0x19340
movq -0x50(%rbp), %rdi
callq 0x11740
movq -0x58(%rbp), %rdi
callq 0x1170c
movq -0x60(%rbp), %rdi
callq 0x116d8
movq -0x68(%rbp), %rdi
callq 0x116a4
movq -0x70(%rbp), %rdi
callq 0x11670
movq %r14, %rdi
callq 0x1163c
movq %rbx, %rdi
callq 0x3a78
movq -0x38(%rbp), %rdi
callq 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O2/MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::AddArmors(int const&)
void Market::AddArmors(const int& num)
{
    string armorName;
    Armor* tmpArmor;

    for (int i = 0; i < num; i++)
    {
        unsigned int level;

        if ( ((double)rand() / RAND_MAX) < 0.7 )
            level = rand() % 30 + 1;
        else
            level = rand() % 70 + 31;

        armorName = name.armorsNames[rand() % name.armorsNames.size()];

        tmpArmor = new Armor(armorName , ((rand() % 2) + 3) * level , level , (unsigned int)(level * (4.0 / 2.0)));

        armorsArray.push_back(tmpArmor);

        if (minItemPrice > tmpArmor->GetPrice())
            minItemPrice = tmpArmor->GetPrice();
    }

    if (mostItems < armorsArray.size())
        mostItems = armorsArray.size();

    if (minPrice > minItemPrice)
        minPrice = minItemPrice;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movq %rsi, %r14
movq %rdi, %rbx
movb $0x0, (%rax)
leaq 0x120(%rdi), %rax
movq %rax, -0x48(%rbp)
xorl %r15d, %r15d
leaq -0x70(%rbp), %r12
cmpl (%r14), %r15d
jge 0x13c8e
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0x76b7(%rip), %xmm0     # 0x1b260
movsd %xmm0, -0x50(%rbp)
callq 0x3060
movsd -0x50(%rbp), %xmm1
movsd 0x6450(%rip), %xmm0     # 0x1a010
ucomisd %xmm1, %xmm0
pushq $0x1e
popq %rcx
ja 0x13bcc
pushq $0x46
popq %rcx
cltd
idivl %ecx
leal 0x1(%rdx), %eax
addl $0x1f, %edx
movsd 0x6433(%rip), %xmm0     # 0x1a010
ucomisd %xmm1, %xmm0
cmoval %eax, %edx
movl %edx, -0x2c(%rbp)
callq 0x3060
cltq
movq 0x30(%rbx), %rsi
movq 0x38(%rbx), %rcx
subq %rsi, %rcx
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
shlq $0x5, %rdx
addq %rdx, %rsi
movq %r12, %rdi
callq 0x30f0
pushq $0x38
popq %rdi
callq 0x31e0
movq %rax, %r13
callq 0x3060
cltd
pushq $0x2
popq %rcx
idivl %ecx
addl $0x3, %edx
movl -0x2c(%rbp), %eax
imull %eax, %edx
movl %edx, -0x40(%rbp)
addl %eax, %eax
movl %eax, -0x3c(%rbp)
movq %r13, %rdi
movq %r12, %rsi
leaq -0x40(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
leaq -0x3c(%rbp), %r8
callq 0xccb8
movq %r13, -0x38(%rbp)
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x11428
movl 0x1e4(%rbx), %r13d
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
cmpl %eax, %r13d
jbe 0x13c86
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, 0x1e4(%rbx)
incl %r15d
jmp 0x13b8f
movl 0x1ec(%rbx), %ecx
movq 0x128(%rbx), %rax
subq 0x120(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x13cb1
movl %eax, 0x1ec(%rbx)
movl 0x1e4(%rbx), %eax
cmpl %eax, 0x1e8(%rbx)
jbe 0x13cc5
movl %eax, 0x1e8(%rbx)
leaq -0x70(%rbp), %rdi
callq 0x30c0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r13, %rdi
callq 0x31b0
jmp 0x13ced
movq %rax, %rbx
leaq -0x70(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3330
// File: /workspace/github_cpp_makefile_star2_O2/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 0xd088
movl %eax, %ebx
movq %r14, %rdi
callq 0xd098
movl %eax, %r13d
movq %r14, %rdi
callq 0xd080
movl %eax, %r12d
movq %r14, %rdi
callq 0xd090
cmpl %r13d, %ebx
jne 0x1828c
xorl %ebx, %ebx
cmpl %eax, %r12d
jne 0x18296
pushq $-0x1
popq %rbx
cmpb $0x1, (%r15)
jne 0x18296
movq 0xedc1(%rip), %rdi      # 0x26ff0
callq 0x30d0
leaq 0x606b(%rip), %rsi      # 0x1e2a6
movq %rax, %rdi
callq 0x31d0
movq %rax, %r15
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0xced6
movq %r15, %rdi
movq %r12, %rsi
callq 0x3190
leaq 0x65c9(%rip), %rsi      # 0x1e830
movq %rax, %rdi
callq 0x31d0
movq %rax, %rdi
callq 0x30d0
leaq -0x48(%rbp), %rdi
callq 0x30c0
movl $0x2625a0, %edi         # imm = 0x2625A0
callq 0x32a0
jmp 0x18296
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 -0x48(%rbp), %rdi
callq 0x30c0
movq %rbx, %rdi
callq 0x3330
nop
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: print_input_file()
void print_input_file(){
    int i;

    cout << "Strip width: " << strip_width << endl;
    cout << "id\theight\twidth" << endl;
    for(i = 0; i < (int)bs.size(); i++)
    {
        cout << bs.at(i).id << "\t";
        cout << bs.at(i).height << "\t";
        cout << bs.at(i).width << endl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq 0xb9cc(%rip), %rbx      # 0x10fd8
leaq 0x5aa4(%rip), %rsi      # 0xb0b7
movq %rbx, %rdi
callq 0x4240
movl 0xbd4f(%rip), %esi      # 0x11370
movq %rax, %rdi
callq 0x4410
movq %rax, %rdi
callq 0x4100
leaq 0x5a8d(%rip), %rsi      # 0xb0c5
movq %rbx, %rdi
callq 0x4240
movq %rax, %rdi
callq 0x4100
xorl %r14d, %r14d
pushq $0xc
popq %r13
leaq 0xbd02(%rip), %r15      # 0x11358
leaq 0x5ce7(%rip), %r12      # 0xb344
movq 0xbcfc(%rip), %rax      # 0x11360
subq 0xbced(%rip), %rax      # 0x11358
cqto
idivq %r13
cltq
cmpq %rax, %r14
jge 0x56db
movq %r15, %rdi
movq %r14, %rsi
callq 0x7420
movl (%rax), %esi
movq %rbx, %rdi
callq 0x4410
movq %rax, %rdi
movq %r12, %rsi
callq 0x4240
movq %r15, %rdi
movq %r14, %rsi
callq 0x7420
movl 0x4(%rax), %esi
movq %rbx, %rdi
callq 0x4410
movq %rax, %rdi
movq %r12, %rsi
callq 0x4240
movq %r15, %rdi
movq %r14, %rsi
callq 0x7420
movl 0x8(%rax), %esi
movq %rbx, %rdi
callq 0x4410
movq %rax, %rdi
callq 0x4100
incq %r14
jmp 0x565d
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cmaureir[P]strip-packing/scattersearch.cpp
// Function: print_solutions(std::vector<solution, std::allocator<solution>>)
void print_solutions(vector<solution> tmp){

    for (int i = 0; i < (int)tmp.size(); i++)
    {
        cout << "Solution " << i << ":\t";
        for (int j = 0; j < (int)tmp[i].items.size(); j++)
        {
            cout << tmp[i].items[j] <<  " ";
        }
        cout << " | " << tmp[i].height << " | " << tmp[i].p << "%" << endl;
    }

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r14d, %r14d
movq 0xae5e(%rip), %r15      # 0x10fd8
leaq 0x4f14(%rip), %rbp      # 0xb095
movq 0x8(%rbx), %rax
subq (%rbx), %rax
cqto
pushq $0x60
popq %rcx
idivq %rcx
cltq
cmpq %rax, %r14
jge 0x6260
movq %r15, %rdi
leaq 0x5194(%rip), %rsi      # 0xb339
callq 0x4240
movq %rax, %rdi
movl %r14d, %esi
callq 0x4410
movq %rax, %rdi
leaq 0x5184(%rip), %rsi      # 0xb343
callq 0x4240
imulq $0x60, %r14, %r13
xorl %r12d, %r12d
movq (%rbx), %rcx
movq (%rcx,%r13), %rax
movq 0x8(%rcx,%r13), %rcx
subq %rax, %rcx
shrq $0x2, %rcx
movslq %ecx, %rcx
cmpq %rcx, %r12
jge 0x6202
movl (%rax,%r12,4), %esi
movq %r15, %rdi
callq 0x4410
movq %rax, %rdi
movq %rbp, %rsi
callq 0x4240
incq %r12
jmp 0x61cb
movq %r15, %rdi
leaq 0x4ec9(%rip), %r12      # 0xb0d5
movq %r12, %rsi
callq 0x4240
movq (%rbx), %rcx
movl 0x4c(%rcx,%r13), %esi
movq %rax, %rdi
callq 0x4410
movq %rax, %rdi
movq %r12, %rsi
callq 0x4240
movq (%rbx), %rcx
movss 0x48(%rcx,%r13), %xmm0
movq %rax, %rdi
callq 0x41a0
movq %rax, %rdi
leaq 0x4e8e(%rip), %rsi      # 0xb0d9
callq 0x4240
movq %rax, %rdi
callq 0x4100
incq %r14
jmp 0x6181
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq