LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18dde
movl %eax, %ebp
callq 0x3060
cvtsi2sd %eax, %xmm0
divsd 0x18caf(%rip), %xmm0    # 0x24260
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x10acc
cvtss2sd %xmm0, %xmm0
movsd (%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0xb612
movl %ebp, %eax
imull %eax, %eax
xorps %xmm0, %xmm0
cvtsi2sd %rax, %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x11850
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 0xb708
movq 0x239af(%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 0x18f15(%rip), %rsi     # 0x2455f
movl $0xb, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
callq 0x108c2
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x31e0
movq %rax, %rbx
leaq 0x18c30(%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 0xb6cf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x16e360, %edi         # imm = 0x16E360
callq 0x3260
movq 0x238e8(%rip), %rbx     # 0x2efc8
leaq 0x19150(%rip), %rsi     # 0x24837
movl $0x4, %edx
movq %rbx, %rdi
callq 0x31e0
leaq 0x1b0a8(%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 0xb733
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31b0
movq %rbx, %rdi
callq 0x32f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x201ee(%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 0x15a34(%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 0x15a18(%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 0x18587(%rip), %rsi     # 0x273f1
movl $0x3, %edx
movq %rax, %rdi
callq 0x31e0
shll $0x15, %r12d
addl $0x30000000, %r12d      # imm = 0x30000000
sarl $0x18, %r12d
callq 0x10728
movl %eax, %ebp
cmpb $0x30, %al
je 0xeef8
jle 0xee86
movsbl %bpl, %eax
cmpl %eax, %r12d
jl 0xee86
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 0x154c7(%rip), %rsi     # 0x24391
movl $0x4, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x178c5(%rip), %rsi     # 0x267a3
movl $0x3, %edx
movq %rbx, %rdi
callq 0x31e0
movzbl %bpl, %eax
addl $-0x30, %eax
movw %ax, (%r14)
jmp 0xef47
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 0x1546b(%rip), %rsi     # 0x24391
movl $0x4, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x17869(%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_O1/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 0xf155
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 0xf192
incq %rcx
cmpq $0x1e, %rcx
jne 0xf190
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpl $0x0, 0x4(%rdi)
jle 0xf20e
xorl %r14d, %r14d
movq 0x10(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0xf202
callq 0x3240
incq %r14
movslq 0x4(%rbx), %rax
cmpq %rax, %r14
jl 0xf1f0
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0xf21c
callq 0x3240
movq 0x8(%rbx), %rdi
addq $0x8, %rsp
testq %rdi, %rdi
je 0xf231
popq %rbx
popq %r14
jmp 0x3240
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
movsbl (%rdi), %eax
testl %eax, %eax
sete %bl
je 0x103cf
addl $-0x30, %eax
cmpl $0x9, %eax
ja 0x10319
leaq 0x1(%rdi), %rax
movsbl (%rax), %ecx
testl %ecx, %ecx
sete %bl
je 0x103cf
addl $-0x30, %ecx
incq %rax
cmpl $0xa, %ecx
jb 0x10300
testb %dl, %dl
je 0x103d7
movq 0x1ecc8(%rip), %r14     # 0x2eff0
leaq 0x148d1(%rip), %rsi     # 0x24c00
movl $0x3d, %edx
movq %r14, %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 0x148d4(%rip), %rsi     # 0x24c3e
movl $0x12, %edx
movq %r14, %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
movq 0x1ec33(%rip), %r14     # 0x2efd8
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x32d0
movabsq $0x7fffffffffffffff, %rsi # imm = 0x7FFFFFFFFFFFFFFF
movq %r14, %rdi
movl $0xa, %edx
callq 0x30e0
jmp 0x103d7
callq 0x3290
movl %eax, (%r14)
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x102dc
testb %al, %al
je 0x1049b
movl (%r12), %eax
cmpl (%r15), %eax
setge %cl
cmpl (%r14), %eax
setle %al
andb %cl, %al
xorb $0x1, %bl
orb %al, %bl
jne 0x1049d
movq 0x1ebcb(%rip), %rbx     # 0x2eff0
leaq 0x14825(%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 0x147d7(%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_O1/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 0x1e85e(%rip), %rax     # 0x2efb0
movq (%rax), %rdi
callq 0x3200
xorl %edi, %edi
movq %rbx, %rsi
callq 0x31c0
testl %eax, %eax
js 0x107ba
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 0x107c8
leaq -0x9(%rbp), %rsi
movl $0x1, %edx
xorl %edi, %edi
callq 0x3270
testq %rax, %rax
js 0x107d6
leaq -0x50(%rbp), %rdx
orb $0xa, 0xc(%rdx)
xorl %edi, %edi
movl $0x1, %esi
callq 0x3220
testl %eax, %eax
js 0x107e4
movb -0x9(%rbp), %al
addq $0x48, %rsp
popq %rbx
popq %rbp
retq
leaq 0x144d4(%rip), %rdi     # 0x24c95
callq 0x3140
jmp 0x10768
leaq 0x144d2(%rip), %rdi     # 0x24ca1
callq 0x3140
jmp 0x10783
leaq 0x144d5(%rip), %rdi     # 0x24cb2
callq 0x3140
jmp 0x10798
leaq 0x144ce(%rip), %rdi     # 0x24cb9
callq 0x3140
jmp 0x107b0
nop
// File: /workspace/github_cpp_makefile_star2_O1/MichaelXanth[P]RPG_Game/Living/Living.cpp
// Function: Living::ChangeHealth(unsigned int)
void Living::ChangeHealth(unsigned int difference)
{
    if(healthPower - difference == 0 || healthPower - difference > healthPower)//checks if the health power is smaller than 0 and if so it sets it to 0
    {
        healthPower = 0;
        faint = true;
    }
    else
    {
        healthPower -= difference;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl 0x28(%rdi), %eax
subl %esi, %eax
jbe 0x108a0
movl %eax, 0x28(%rdi)
jmp 0x108ab
movl $0x0, 0x28(%rdi)
movb $0x1, 0x34(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10b2c
shrq $0x3, %rax
movl %eax, 0xf8(%rdi)
movl 0xf8(%rdi), %ecx
movq 0x58(%rdi), %rax
subq 0x50(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10b49
movl %eax, 0xf8(%rdi)
movl 0xf8(%rdi), %ecx
movq 0x70(%rdi), %rax
subq 0x68(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10b66
movl %eax, 0xf8(%rdi)
movl 0xf8(%rdi), %ecx
movq 0x88(%rdi), %rax
subq 0x80(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10b89
movl %eax, 0xf8(%rdi)
movl 0xf8(%rdi), %ecx
movq 0xa0(%rdi), %rax
subq 0x98(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10bac
movl %eax, 0xf8(%rdi)
movl 0xf8(%rdi), %ecx
movq 0xb8(%rdi), %rax
subq 0xb0(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10bcf
movl %eax, 0xf8(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10c0c
movq %rax, (%rsi)
addq $0x8, 0x70(%rbx)
jmp 0x10c1a
leaq 0x68(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17aa8
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x70(%rbx), %rax
subq 0x68(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10c3d
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10c68
movq %rax, (%rsi)
addq $0x8, 0x58(%rbx)
jmp 0x10c76
leaq 0x50(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17be4
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x58(%rbx), %rax
subq 0x50(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10c99
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10cc4
movq %rax, (%rsi)
addq $0x8, 0x40(%rbx)
jmp 0x10cd2
leaq 0x38(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17d20
decl 0xe8(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x40(%rbx), %rax
subq 0x38(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10cf5
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10d29
movq %rax, (%rsi)
addq $0x8, 0x88(%rbx)
jmp 0x10d3a
leaq 0x80(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17e5c
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0x88(%rbx), %rax
subq 0x80(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10d63
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10d97
movq %rax, (%rsi)
addq $0x8, 0xb8(%rbx)
jmp 0x10da8
leaq 0xb0(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x17f98
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0xb8(%rbx), %rax
subq 0xb0(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10dd1
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10e05
movq %rax, (%rsi)
addq $0x8, 0xa0(%rbx)
jmp 0x10e16
leaq 0x98(%rbx), %rdi
leaq 0x8(%rsp), %rdx
callq 0x180d4
decl 0xec(%rbx)
movl 0xf8(%rbx), %ecx
movq 0xa0(%rbx), %rax
subq 0x98(%rbx), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x10e3f
movl %eax, 0xf8(%rbx)
addq $0x10, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10e7e
movq (%rdi), %rax
callq *0x60(%rax)
movl (%r14), %eax
movq 0x68(%rbx), %rcx
movq 0x70(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10ea2
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0x70(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10ef4
movq (%rdi), %rax
callq *0x60(%rax)
movl (%r14), %eax
movq 0x50(%rbx), %rcx
movq 0x58(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10f18
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0x58(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10f6a
movq (%rdi), %rax
callq *0x60(%rax)
movl (%r14), %eax
movq 0x38(%rbx), %rcx
movq 0x40(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x10f8e
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0x40(%rbx)
incl 0xe8(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10fe6
movq (%rdi), %rax
callq *0x20(%rax)
movl (%r14), %eax
movq 0x80(%rbx), %rcx
movq 0x88(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x11010
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0x88(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x1106c
movq (%rdi), %rax
callq *0x20(%rax)
movl (%r14), %eax
movq 0xb0(%rbx), %rcx
movq 0xb8(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x11096
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0xb8(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x110f2
movq (%rdi), %rax
callq *0x20(%rax)
movl (%r14), %eax
movq 0x98(%rbx), %rcx
movq 0xa0(%rbx), %rdx
leaq (%rcx,%rax,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x1111c
leaq (%rcx,%rax,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0xa0(%rbx)
incl 0xec(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x10b0e
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11201
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 0x1121f
movl %eax, 0x28(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x11593
cmpl $0x2, %edx
je 0x11567
cmpl $0x1, %edx
jne 0x115d6
leal -0x1(%r14), %eax
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x11552
movq (%rdi), %rax
callq *0x60(%rax)
movl %r14d, %esi
shlq $0x3, %rsi
addq 0x38(%rbx), %rsi
movq 0x40(%rbx), %rdx
addq $0x40, %rbx
jmp 0x115bd
leal -0x1(%r14), %eax
movq 0x68(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x1157e
movq (%rdi), %rax
callq *0x60(%rax)
movl %r14d, %esi
shlq $0x3, %rsi
addq 0x68(%rbx), %rsi
movq 0x70(%rbx), %rdx
addq $0x70, %rbx
jmp 0x115bd
leal -0x1(%r14), %eax
movq 0x50(%rbx), %rcx
movq (%rcx,%rax,8), %rdi
testq %rdi, %rdi
je 0x115aa
movq (%rdi), %rax
callq *0x60(%rax)
movl %r14d, %esi
shlq $0x3, %rsi
addq 0x50(%rbx), %rsi
movq 0x58(%rbx), %rdx
addq $0x58, %rbx
cmpq %rdx, %rsi
je 0x115ce
leaq -0x8(%rsi), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, (%rbx)
movb $0x1, %al
jmp 0x115d8
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10718
addl %eax, 0x10c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x1071c
addl %eax, 0x108(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
callq 0x10720
addss 0x11c(%rbx), %xmm0
movss %xmm0, 0x11c(%rbx)
movq 0x98(%rbx), %rax
movq (%rax,%r14,8), %rdi
testq %rdi, %rdi
je 0x1165a
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x98(%rbx), %rax
movq 0xa0(%rbx), %rdx
leaq (%rax,%r14,8), %rsi
addq $0x8, %rsi
cmpq %rdx, %rsi
je 0x11681
leaq (%rax,%r14,8), %rdi
subq %rsi, %rdx
callq 0x32b0
addq $-0x8, 0xa0(%rbx)
incl 0xec(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10886
addl $0x5, 0x114(%rbx)
addl $0x5, 0x2c(%rbx)
addl $0x5, 0x28(%rbx)
addl $0x5, 0x10c(%rbx)
addl $0x3, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xea64(%rip), %xmm0     # 0x27010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10886
addl $0x5, 0x114(%rbx)
addl $0x5, 0x2c(%rbx)
addl $0x5, 0x28(%rbx)
addl $0x5, 0x10c(%rbx)
addl $0x5, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xe6d0(%rip), %xmm0     # 0x27028
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10886
addl $0x5, 0x114(%rbx)
addl $0x5, 0x2c(%rbx)
addl $0x5, 0x28(%rbx)
addl $0x3, 0x10c(%rbx)
addl $0x5, 0x108(%rbx)
cvtss2sd 0x11c(%rbx), %xmm0
addsd 0xe30c(%rip), %xmm0     # 0x27010
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x18f87
movl %eax, 0x28(%rdi)
movl 0x50(%rdi), %eax
testl %eax, %eax
je 0x18fa6
decl %eax
movl %eax, 0x50(%rdi)
jne 0x18fa6
movss 0x44(%rdi), %xmm0
movss %xmm0, 0x60(%rdi)
movl $0x0, 0x44(%rdi)
movl 0x48(%rdi), %eax
testl %eax, %eax
je 0x18fc4
decl %eax
movl %eax, 0x48(%rdi)
jne 0x18fc4
movq 0x38(%rdi), %rax
movq %rax, 0x54(%rdi)
movq $0x0, 0x38(%rdi)
movl 0x4c(%rdi), %eax
testl %eax, %eax
je 0x18fdf
decl %eax
movl %eax, 0x4c(%rdi)
jne 0x18fdf
movl 0x40(%rdi), %eax
movl %eax, 0x5c(%rdi)
movl $0x0, 0x40(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x190ec
shrq $0x3, %rax
movl %eax, 0x1ec(%rdi)
movl 0x1ec(%rdi), %ecx
movq 0xc8(%rdi), %rax
subq 0xc0(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x1910f
movl %eax, 0x1ec(%rdi)
movl 0x1ec(%rdi), %ecx
movq 0xe0(%rdi), %rax
subq 0xd8(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x19132
movl %eax, 0x1ec(%rdi)
movl 0x1ec(%rdi), %ecx
movq 0xf8(%rdi), %rax
subq 0xf0(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x19155
movl %eax, 0x1ec(%rdi)
movl 0x1ec(%rdi), %ecx
movq 0x110(%rdi), %rax
subq 0x108(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x19178
movl %eax, 0x1ec(%rdi)
movl 0x1ec(%rdi), %ecx
movq 0x128(%rdi), %rax
subq 0x120(%rdi), %rax
sarq $0x3, %rax
cmpq %rcx, %rax
jbe 0x1919b
movl %eax, 0x1ec(%rdi)
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 0x3e30
leaq 0xa8(%rbx), %r14
movl $0x138, %edx            # imm = 0x138
movq %r14, %rdi
xorl %esi, %esi
callq 0x30d0
movaps 0xdc75(%rip), %xmm0     # 0x270e0
movups %xmm0, 0x1e0(%rbx)
movl $0x0, 0x1f0(%rbx)
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x195d8
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x198c4
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x19b8e
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x19e54
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x1a0bc
leaq -0x1c(%rbp), %rsi
movl $0xa, (%rsi)
movq %rbx, %rdi
callq 0x1a4a6
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x194fd
jmp 0x194fd
jmp 0x194fd
jmp 0x194fd
jmp 0x194fd
movq %rax, %r15
movq 0x1b0(%rbx), %rdi
testq %rdi, %rdi
je 0x19511
callq 0x3170
movq 0x198(%rbx), %rdi
testq %rdi, %rdi
je 0x19522
callq 0x3170
movq 0x180(%rbx), %rdi
testq %rdi, %rdi
je 0x19533
callq 0x3170
movq 0x168(%rbx), %rdi
testq %rdi, %rdi
je 0x19544
callq 0x3170
movq 0x150(%rbx), %rdi
testq %rdi, %rdi
je 0x19555
callq 0x3170
movq 0x138(%rbx), %rdi
testq %rdi, %rdi
je 0x19566
callq 0x3170
movq 0x120(%rbx), %rdi
testq %rdi, %rdi
je 0x19577
callq 0x3170
movq 0x108(%rbx), %rdi
testq %rdi, %rdi
je 0x19588
callq 0x3170
movq 0xf0(%rbx), %rdi
testq %rdi, %rdi
je 0x19599
callq 0x3170
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x195aa
callq 0x3170
movq 0xc0(%rbx), %rdi
testq %rdi, %rdi
je 0x195bb
callq 0x3170
movq (%r14), %rdi
testq %rdi, %rdi
je 0x195c8
callq 0x3170
movq %rbx, %rdi
callq 0x3bfc
movq %r15, %rdi
callq 0x32f0
// File: /workspace/github_cpp_makefile_star2_O1/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 0x10ade
movl %eax, %ebx
movq %r14, %rdi
callq 0x10aee
movl %eax, %r13d
movq %r14, %rdi
callq 0x10ad6
movl %eax, %r12d
movq %r14, %rdi
callq 0x10ae6
cmpl %r13d, %ebx
jne 0x210fb
xorl %ebx, %ebx
cmpl %eax, %r12d
jne 0x21105
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, (%r15)
jne 0x21105
movq 0xdfaf(%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 0x6204(%rip), %rsi      # 0x27276
movl $0x20, %edx
movq %rax, %rdi
callq 0x31e0
leaq -0x48(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x108c2
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0x6757(%rip), %rsi      # 0x27800
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 0x210ef
callq 0x3170
movl $0x2625a0, %edi         # imm = 0x2625A0
callq 0x3260
jmp 0x21105
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 0x2112b
callq 0x3170
movq %rbx, %rdi
callq 0x32f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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:
cmpl $0x0, 0xb49d(%rip)      # 0x12370
jle 0x6f0b
xorl %eax, %eax
cmpl $0x0, 0xb496(%rip)      # 0x12374
jle 0x6efc
movq (%rdi,%rax,8), %rcx
xorl %edx, %edx
movl $0x0, (%rcx,%rdx,4)
incq %rdx
movslq 0xb47d(%rip), %rsi      # 0x12374
cmpq %rsi, %rdx
jl 0x6ee6
incq %rax
movslq 0xb46a(%rip), %rcx      # 0x12370
cmpq %rcx, %rax
jl 0x6ed7
retq
// File: /workspace/github_cpp_makefile_star2_O1/cmaureir[P]strip-packing/scattersearch.cpp
// Function: is_in(solution, std::vector<solution, std::allocator<solution>>)
bool is_in(solution tmp, vector<solution> tmp_sols)
{
    bool all = true;
    for (int i = 0; i < (int)tmp_sols.size(); i++) {
        for (int j = 0; j < (int)tmp.items.size(); j++) {
            if(tmp.items[j] != tmp_sols[i].items[j]){
                all = false;
            }
            if(!all){
                break;
            }
        }
    }
    return all;
}

// Assembly:
movq (%rsi), %rcx
movq 0x8(%rsi), %rax
subq %rcx, %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %rdx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
testl %edx, %edx
jle 0x7173
pushq %rbp
pushq %r14
pushq %rbx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
subq %rsi, %rdi
shrq $0x2, %rdi
movslq %edi, %r8
andl $0x7fffffff, %edx       # imm = 0x7FFFFFFF
movb $0x1, %al
xorl %r9d, %r9d
xorl %r10d, %r10d
testl %edi, %edi
jle 0x7165
leaq (%r10,%r10,2), %r11
shlq $0x5, %r11
movq (%rcx,%r11), %r11
movl $0x1, %ebx
movl -0x4(%rsi,%rbx,4), %ebp
cmpl -0x4(%r11,%rbx,4), %ebp
movzbl %al, %eax
cmovnel %r9d, %eax
testb $0x1, %al
je 0x7165
leaq 0x1(%rbx), %r14
cmpq %r8, %rbx
movq %r14, %rbx
jl 0x7145
incq %r10
cmpq %rdx, %r10
jne 0x7130
popq %rbx
popq %r14
popq %rbp
jmp 0x7175
movb $0x1, %al
andb $0x1, %al
retq
// File: /workspace/github_cpp_makefile_star2_O1/cmaureir[P]strip-packing/scattersearch.cpp
// Function: place_item(int, int, int, int, int, int**)
void place_item(int item, int item_w, int item_h, int a, int b, int **strip){
    //cout << "place_item()" << endl;
    for (int i = a; i < a + item_w; i++) {
        for (int j = b; j < b + item_h; j++) {
            strip[i][j] = item;
        }
    }
}

// Assembly:
testl %esi, %esi
jle 0x71ac
addl %ecx, %esi
movslq %r8d, %rax
addl %edx, %r8d
movslq %r8d, %r8
movslq %ecx, %rcx
movslq %esi, %rsi
testl %edx, %edx
jle 0x71a4
movq (%r9,%rcx,8), %r10
movq %rax, %r11
movl %edi, (%r10,%r11,4)
incq %r11
cmpq %r8, %r11
jl 0x7198
incq %rcx
cmpq %rsi, %rcx
jl 0x718d
retq
// File: /workspace/github_cpp_makefile_star2_O1/cmaureir[P]strip-packing/scattersearch.cpp
// Function: save_best_solution(std::vector<solution, std::allocator<solution>>)
void save_best_solution(vector<solution> tmp)
{
    //cout << "save_best_solution()" << endl;
    sort_solutions(tmp);
    best = tmp[0];
    fitness_calculation_one(best);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x6f19
movq (%rbx), %rbx
leaq 0xa9c6(%rip), %r14      # 0x122f8
movq %r14, %rdi
movq %rbx, %rsi
callq 0x53b8
leaq 0x18(%rbx), %rsi
leaq 0xa9c8(%rip), %rdi      # 0x12310
callq 0x53b8
leaq 0x30(%rbx), %rsi
leaq 0xa9d0(%rip), %rdi      # 0x12328
callq 0x53b8
movups 0x48(%rbx), %xmm0
movups %xmm0, 0xa9d8(%rip)     # 0x12340
movq 0x58(%rbx), %rax
movq %rax, 0xa9dd(%rip)      # 0x12350
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x71ad
// File: /workspace/github_cpp_makefile_star2_O1/cmaureir[P]strip-packing/scattersearch.cpp
// Function: refset_modification(std::vector<solution, std::allocator<solution>>)
void refset_modification(vector<solution> tmp_sols)
{
    //cout << "refset_modification()" << endl;

    int i;
    vector<solution> tmp;

    // Adding «new_set» elements
    for (i = 0; i < b*(b-1)/2; i++) {
        tmp.push_back(tmp_sols[i]);
    }

    // Adding previous «refset» elements
    for (i = 0; i < b; i++) {
        tmp.push_back(refset[i]);
    }

    // Sorting «tmp» solutions
    sort_solutions(tmp);

    // Removing all «refset« values
    refset.clear();

    // Adding new «b» «refset» values
    for (i = 0; i < b; i++) {
        refset.push_back(tmp[i]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movq %rsp, %r14
movaps %xmm0, (%r14)
movq $0x0, 0x10(%r14)
xorl %r15d, %r15d
movq (%rbx), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0x8b20
addq $0x60, %r15
cmpq $0x10e0, %r15           # imm = 0x10E0
jne 0x8147
xorl %r14d, %r14d
movq %rsp, %rbx
movq 0xa141(%rip), %rsi      # 0x122b0
addq %r14, %rsi
movq %rbx, %rdi
callq 0x8b20
addq $0x60, %r14
cmpq $0x3c0, %r14            # imm = 0x3C0
jne 0x8168
movq %rsp, %rdi
callq 0x6f19
movq 0xa11a(%rip), %rsi      # 0x122b0
leaq 0xa113(%rip), %rbx      # 0x122b0
movq %rbx, %rdi
callq 0xc2fc
xorl %r14d, %r14d
movq (%rsp), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x8b20
addq $0x60, %r14
cmpq $0x3c0, %r14            # imm = 0x3C0
jne 0x81a8
movq %rsp, %rdi
callq 0x4e76
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x81dc
jmp 0x81dc
jmp 0x81dc
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4e76
movq %rbx, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O1/cmaureir[P]strip-packing/scattersearch.cpp
// Function: shift_left(solution)
solution shift_left(solution tmp)
{
    int n = (int)tmp.items.size();
    int value = tmp.items[0];
    for (int i = 0; i < n; i++) {
        tmp.items[i] = tmp.items[i+1];
    }
    tmp.items[n-1] = value;
    return tmp;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %r15
movq 0x8(%rsi), %r12
movq %r12, %r13
subq %r15, %r13
movq %r13, %rax
shrq $0x2, %rax
movl (%r15), %ebp
testl %eax, %eax
jle 0x8234
leaq 0x4(%r15), %rsi
movabsq $0x1fffffffc, %rdx      # imm = 0x1FFFFFFFC
andq %r13, %rdx
movq %r15, %rdi
callq 0x43f0
shlq $0x1e, %r13
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
addq %r13, %rax
sarq $0x1e, %rax
movl %ebp, (%r15,%rax)
movq %r15, (%rbx)
movq %r12, 0x8(%rbx)
movq 0x10(%r14), %rax
movq %rax, 0x10(%rbx)
xorl %eax, %eax
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq 0x18(%r14), %rcx
movq %rcx, 0x18(%rbx)
movq 0x20(%r14), %rcx
movq %rcx, 0x20(%rbx)
movq 0x28(%r14), %rcx
movq %rcx, 0x28(%rbx)
movq %rax, 0x28(%r14)
movups %xmm0, 0x18(%r14)
movq 0x30(%r14), %rcx
movq %rcx, 0x30(%rbx)
movq 0x38(%r14), %rcx
movq %rcx, 0x38(%rbx)
movq 0x40(%r14), %rcx
movq %rcx, 0x40(%rbx)
movq %rax, 0x40(%r14)
movups %xmm0, 0x30(%r14)
movq 0x58(%r14), %rax
movq %rax, 0x58(%rbx)
movups 0x48(%r14), %xmm0
movups %xmm0, 0x48(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq