LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: 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
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
andb $0x1, %al
movb %al, -0x19(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1e317
movq -0x10(%rbp), %rax
movsbl (%rax), %edi
callq 0x4220
cmpl $0x0, %eax
jne 0x1e306
testb $0x1, -0x19(%rbp)
je 0x1e300
movq 0x2fd62(%rip), %rdi     # 0x4dff0
leaq 0x1fa3f(%rip), %rsi     # 0x3dcd4
callq 0x4260
movq %rax, %rdi
movq 0x2fd14(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq 0x2fd40(%rip), %rdi     # 0x4dff0
leaq 0x1fa5b(%rip), %rsi     # 0x3dd12
callq 0x4260
movq %rax, %rdi
movq 0x2fcf2(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq 0x2fd06(%rip), %rax     # 0x4dfd8
movq (%rax), %rax
movq 0x2fcfc(%rip), %rdi     # 0x4dfd8
addq -0x18(%rax), %rdi
xorl %esi, %esi
callq 0x4420
callq 0x1e400
movq %rax, %rsi
movq 0x2fce2(%rip), %rdi     # 0x4dfd8
movl $0xa, %edx
callq 0x4170
movb $0x0, -0x1(%rbp)
jmp 0x1e32c
movq -0x10(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x10(%rbp)
jmp 0x1e25f
movq -0x28(%rbp), %rdi
callq 0x43d0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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
subq $0x30, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movb -0x29(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0x1e240
testb $0x1, %al
jne 0x1e37f
movb $0x0, -0x1(%rbp)
jmp 0x1e3f1
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x1e39b
movq -0x18(%rbp), %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x1e3eb
testb $0x1, -0x29(%rbp)
je 0x1e3e5
movq 0x2fc48(%rip), %rdi     # 0x4dff0
leaq 0x1f976(%rip), %rsi     # 0x3dd25
callq 0x4260
movq %rax, %rdi
movq 0x2fbfa(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq 0x2fc26(%rip), %rdi     # 0x4dff0
leaq 0x1f941(%rip), %rsi     # 0x3dd12
callq 0x4260
movq %rax, %rdi
movq 0x2fbd8(%rip), %rsi     # 0x4dfb8
callq 0x4290
movb $0x0, -0x1(%rbp)
jmp 0x1e3f1
jmp 0x1e3ed
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x40, %rsp
movb $0x0, -0x1(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x3c, %edx
callq 0x4140
movq 0x2f765(%rip), %rax     # 0x4dfa8
movq (%rax), %rdi
callq 0x4300
xorl %edi, %edi
leaq -0x40(%rbp), %rsi
callq 0x42e0
cmpl $0x0, %eax
jge 0x1e867
leaq 0x1f507(%rip), %rdi     # 0x3dd69
callq 0x41e0
movl -0x34(%rbp), %eax
andl $-0x3, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
andl $-0x9, %eax
movl %eax, -0x34(%rbp)
movb $0x1, -0x29(%rbp)
movb $0x0, -0x2a(%rbp)
xorl %esi, %esi
leaq -0x40(%rbp), %rdx
movl %esi, %edi
callq 0x4330
cmpl $0x0, %eax
jge 0x1e89f
leaq 0x1f4db(%rip), %rdi     # 0x3dd75
callq 0x41e0
xorl %edi, %edi
leaq -0x1(%rbp), %rsi
movl $0x1, %edx
callq 0x43a0
cmpq $0x0, %rax
jge 0x1e8c1
leaq 0x1f4ca(%rip), %rdi     # 0x3dd86
callq 0x41e0
movl -0x34(%rbp), %eax
orl $0x2, %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
orl $0x8, %eax
movl %eax, -0x34(%rbp)
xorl %edi, %edi
movl $0x1, %esi
leaq -0x40(%rbp), %rdx
callq 0x4330
cmpl $0x0, %eax
jge 0x1e8f4
leaq 0x1f49e(%rip), %rdi     # 0x3dd8d
callq 0x41e0
movb -0x1(%rbp), %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl 0x28(%rax), %eax
subl -0xc(%rbp), %eax
cmpl $0x0, %eax
je 0x1e9fd
movq -0x18(%rbp), %rcx
movl 0x28(%rcx), %eax
subl -0xc(%rbp), %eax
cmpl 0x28(%rcx), %eax
jbe 0x1ea0e
movq -0x18(%rbp), %rax
movl $0x0, 0x28(%rax)
movb $0x1, 0x34(%rax)
jmp 0x1ea1d
movq -0x18(%rbp), %rax
movl -0xc(%rbp), %edx
movl 0x28(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x28(%rax)
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, 0xf8(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x10(%rbp)
addq $0x38, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
jae 0x1ef47
movq -0x18(%rbp), %rdi
addq $0x38, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x18(%rbp), %rdi
movl 0xf8(%rdi), %eax
movq %rax, -0x20(%rbp)
addq $0x50, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x1ef84
movq -0x18(%rbp), %rdi
addq $0x50, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x18(%rbp), %rdi
movl 0xf8(%rdi), %eax
movq %rax, -0x28(%rbp)
addq $0x68, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x1efc1
movq -0x18(%rbp), %rdi
addq $0x68, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x18(%rbp), %rdi
movl 0xf8(%rdi), %eax
movq %rax, -0x30(%rbp)
addq $0x80, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f004
movq -0x18(%rbp), %rdi
addq $0x80, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x18(%rbp), %rdi
movl 0xf8(%rdi), %eax
movq %rax, -0x38(%rbp)
addq $0x98, %rdi
callq 0x26ea0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f047
movq -0x18(%rbp), %rdi
addq $0x98, %rdi
callq 0x26ea0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
movq -0x18(%rbp), %rdi
movl 0xf8(%rdi), %eax
movq %rax, -0x40(%rbp)
addq $0xb0, %rdi
callq 0x26ec0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f08a
movq -0x18(%rbp), %rdi
addq $0xb0, %rdi
callq 0x26ec0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x40, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x68, %rdi
leaq -0x10(%rbp), %rsi
callq 0x26ee0
movq -0x20(%rbp), %rdi
movl 0xe8(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xe8(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0x68, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f151
movq -0x20(%rbp), %rdi
addq $0x68, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x50, %rdi
leaq -0x10(%rbp), %rsi
callq 0x26f50
movq -0x20(%rbp), %rdi
movl 0xe8(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xe8(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0x50, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f1d1
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x38, %rdi
leaq -0x10(%rbp), %rsi
callq 0x26fc0
movq -0x20(%rbp), %rdi
movl 0xe8(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xe8(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0x38, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f251
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x80, %rdi
leaq -0x10(%rbp), %rsi
callq 0x27030
movq -0x20(%rbp), %rdi
movl 0xec(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xec(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0x80, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f2da
movq -0x20(%rbp), %rdi
addq $0x80, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0xb0, %rdi
leaq -0x10(%rbp), %rsi
callq 0x270a0
movq -0x20(%rbp), %rdi
movl 0xec(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xec(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0xb0, %rdi
callq 0x26ec0
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f35a
movq -0x20(%rbp), %rdi
addq $0xb0, %rdi
callq 0x26ec0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x20(%rbp)
addq $0x98, %rdi
leaq -0x10(%rbp), %rsi
callq 0x27110
movq -0x20(%rbp), %rdi
movl 0xec(%rdi), %eax
addl $-0x1, %eax
movl %eax, 0xec(%rdi)
movl 0xf8(%rdi), %eax
movq %rax, -0x18(%rbp)
addq $0x98, %rdi
callq 0x26ea0
movq %rax, %rcx
movq -0x18(%rbp), %rax
cmpq %rcx, %rax
jae 0x1f3da
movq -0x20(%rbp), %rdi
addq $0x98, %rdi
callq 0x26ea0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movl %ecx, 0xf8(%rax)
addq $0x20, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x68, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27180
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0x68, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27180
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f44c
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x68, %rax
movq %rax, -0x48(%rbp)
addq $0x68, %rdi
callq 0x27210
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27240
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x27280
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x271a0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xe8(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x50, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x272c0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0x50, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x272c0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f52c
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x50, %rax
movq %rax, -0x48(%rbp)
addq $0x50, %rdi
callq 0x27350
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27380
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x273c0
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x272e0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xe8(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27400
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0x38, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27400
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f60c
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x60(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x38, %rax
movq %rax, -0x48(%rbp)
addq $0x38, %rdi
callq 0x27490
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x274c0
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x27500
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x27420
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xe8(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xe8(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x80, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27540
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0x80, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27540
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f6f2
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x48(%rbp)
addq $0x80, %rdi
callq 0x275d0
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27600
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x27640
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x27560
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xec(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xec(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0xb0, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27680
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0xb0, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x27680
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f7e2
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0xb0, %rax
movq %rax, -0x48(%rbp)
addq $0xb0, %rdi
callq 0x27710
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27740
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x27780
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x276a0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xec(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xec(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x98, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x40(%rbp), %rdi
shrl %eax
addl 0x110(%rdi), %eax
movl %eax, 0x110(%rdi)
addq $0x98, %rdi
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x1f8d2
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x98, %rax
movq %rax, -0x48(%rbp)
addq $0x98, %rdi
callq 0x27850
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27880
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x278c0
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x277e0
movq -0x40(%rbp), %rdi
movq %rax, -0x30(%rbp)
movl 0xec(%rdi), %eax
addl $0x1, %eax
movl %eax, 0xec(%rdi)
callq 0x1eef0
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::GetNumberOfSpells(unsigned int) const
unsigned int Hero::GetNumberOfSpells(unsigned int typeOfSpell) const
{
    switch(typeOfSpell)
    {
        case 1:
            return lightingSpellsArray.size();

        case 2:
            return iceSpellsArray.size();

        case 3:
            return fireSpellsArray.size();
        
        default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x18(%rbp)
subl $0x1, %eax
je 0x1fa58
jmp 0x1fa44
movl -0x18(%rbp), %eax
subl $0x2, %eax
je 0x1fa6a
jmp 0x1fa4e
movl -0x18(%rbp), %eax
subl $0x3, %eax
je 0x1fa7c
jmp 0x1fa8e
movq -0x20(%rbp), %rdi
addq $0x38, %rdi
callq 0x26e20
movl %eax, -0x4(%rbp)
jmp 0x1fa95
movq -0x20(%rbp), %rdi
addq $0x68, %rdi
callq 0x26e60
movl %eax, -0x4(%rbp)
jmp 0x1fa95
movq -0x20(%rbp), %rdi
addq $0x50, %rdi
callq 0x26e40
movl %eax, -0x4(%rbp)
jmp 0x1fa95
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x104(%rcx), %eax
movl %eax, -0xc(%rbp)
imull $0xa, 0x104(%rcx), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movl -0xc(%rbp), %eax
addl %edx, %eax
cmpl 0x114(%rcx), %eax
jae 0x1fb90
movq -0x18(%rbp), %rax
movl 0x104(%rax), %ecx
imull $0xa, 0x104(%rax), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movq -0x18(%rbp), %rax
addl %edx, %ecx
movl %ecx, 0x104(%rax)
movq -0x18(%rbp), %rcx
movl 0x28(%rcx), %eax
movl %eax, -0x1c(%rbp)
imull $0xa, 0x28(%rcx), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movl -0x1c(%rbp), %eax
addl %edx, %eax
cmpl 0x2c(%rcx), %eax
jae 0x1fbd2
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
imull $0xa, 0x28(%rax), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movq -0x18(%rbp), %rax
addl %edx, %ecx
movl %ecx, 0x28(%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::GetSpellFromSlot(unsigned int, unsigned int)
Spell* Hero::GetSpellFromSlot(const unsigned int slotNum, const unsigned int typeOfSpell) //checks if the spell exists and then it returns it
{
    switch(typeOfSpell)
    {
        case 1:
            return lightingSpellsArray[slotNum];

        case 2:
            return iceSpellsArray[slotNum];

        case 3:
            return fireSpellsArray[slotNum];
        
        default:
        return 0;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $0x1, %eax
je 0x1fc1b
jmp 0x1fc07
movl -0x1c(%rbp), %eax
subl $0x2, %eax
je 0x1fc36
jmp 0x1fc11
movl -0x1c(%rbp), %eax
subl $0x3, %eax
je 0x1fc51
jmp 0x1fc6c
movq -0x28(%rbp), %rdi
addq $0x38, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x27400
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1fc74
movq -0x28(%rbp), %rdi
addq $0x68, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x27180
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1fc74
movq -0x28(%rbp), %rdi
addq $0x50, %rdi
movl -0x14(%rbp), %eax
movl %eax, %esi
callq 0x272c0
movq (%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0x1fc74
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x98, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rdi
callq 0x1e7c0
movq -0x40(%rbp), %rdi
addl 0x10c(%rdi), %eax
movl %eax, 0x10c(%rdi)
addq $0x98, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rdi
callq 0x1e7e0
movq -0x40(%rbp), %rdi
addl 0x108(%rdi), %eax
movl %eax, 0x108(%rdi)
addq $0x98, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rdi
callq 0x1e800
movq -0x40(%rbp), %rdi
addss 0x11c(%rdi), %xmm0
movss %xmm0, 0x11c(%rdi)
addq $0x98, %rdi
movl -0xc(%rbp), %eax
movl %eax, %esi
callq 0x277c0
movq (%rax), %rax
movq %rax, -0x38(%rbp)
cmpq $0x0, %rax
je 0x206ce
movq -0x38(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq -0x40(%rbp), %rdi
movq %rdi, %rax
addq $0x98, %rax
movq %rax, -0x48(%rbp)
addq $0x98, %rdi
callq 0x27850
movq %rax, -0x28(%rbp)
movl -0xc(%rbp), %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x27880
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x278c0
movq -0x48(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x277e0
movq %rax, %rcx
movq -0x40(%rbp), %rax
movq %rcx, -0x30(%rbp)
movl 0xec(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0xec(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x1e9b0
movq -0x10(%rbp), %rax
movl 0x114(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x114(%rax)
movl 0x2c(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x2c(%rax)
movl 0x28(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x28(%rax)
movl 0x10c(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x10c(%rax)
movl 0x108(%rax), %ecx
addl $0x3, %ecx
movl %ecx, 0x108(%rax)
movss 0x11c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x12dc0(%rip), %xmm1    # 0x400a0
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x10(%rbp)
callq 0x1e9b0
movq -0x10(%rbp), %rax
movl 0x114(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x114(%rax)
movl 0x2c(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x2c(%rax)
movl 0x28(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x28(%rax)
movl 0x10c(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x10c(%rax)
movl 0x108(%rax), %ecx
addl $0x5, %ecx
movl %ecx, 0x108(%rax)
movss 0x11c(%rax), %xmm0
cvtss2sd %xmm0, %xmm0
movsd 0x122f8(%rip), %xmm1    # 0x400b8
addsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, 0x11c(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x18(%rbp)
movl 0x28(%rcx), %eax
movl %eax, -0xc(%rbp)
imull $0x5, 0x28(%rcx), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movl -0xc(%rbp), %eax
addl %edx, %eax
cmpl 0x2c(%rcx), %eax
jae 0x2e9be
movq -0x18(%rbp), %rax
movl 0x28(%rax), %ecx
imull $0x5, 0x28(%rax), %eax
movl $0x64, %esi
xorl %edx, %edx
divl %esi
movl %eax, %edx
movq -0x18(%rbp), %rax
addl %edx, %ecx
movl %ecx, 0x28(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x50(%rax)
jbe 0x2e9f3
movq -0x18(%rbp), %rax
movl 0x50(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x50(%rax)
cmpl $0x0, 0x50(%rax)
jne 0x2e9f1
movq -0x18(%rbp), %rax
movss 0x44(%rax), %xmm0
movss %xmm0, 0x60(%rax)
xorps %xmm0, %xmm0
movss %xmm0, 0x44(%rax)
jmp 0x2e9f3
movq -0x18(%rbp), %rax
cmpl $0x0, 0x48(%rax)
jbe 0x2ea30
movq -0x18(%rbp), %rax
movl 0x48(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x48(%rax)
cmpl $0x0, 0x48(%rax)
jne 0x2ea2e
movq -0x18(%rbp), %rax
movl 0x38(%rax), %ecx
movl %ecx, 0x54(%rax)
movl 0x3c(%rax), %ecx
movl %ecx, 0x58(%rax)
movl $0x0, 0x38(%rax)
movl $0x0, 0x3c(%rax)
jmp 0x2ea30
movq -0x18(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jbe 0x2ea60
movq -0x18(%rbp), %rax
movl 0x4c(%rax), %ecx
addl $-0x1, %ecx
movl %ecx, 0x4c(%rax)
cmpl $0x0, 0x4c(%rax)
jne 0x2ea5e
movq -0x18(%rbp), %rax
movl 0x40(%rax), %ecx
movl %ecx, 0x5c(%rax)
movl $0x0, 0x40(%rax)
jmp 0x2ea60
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x18(%rbp)
movl $0x0, 0x1ec(%rdi)
movl 0x1ec(%rdi), %eax
movq %rax, -0x10(%rbp)
addq $0xa8, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x10(%rbp), %rax
cmpq %rcx, %rax
jae 0x2ed7d
movq -0x18(%rbp), %rdi
addq $0xa8, %rdi
callq 0x26e20
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
movq -0x18(%rbp), %rdi
movl 0x1ec(%rdi), %eax
movq %rax, -0x20(%rbp)
addq $0xc0, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x20(%rbp), %rax
cmpq %rcx, %rax
jae 0x2edc0
movq -0x18(%rbp), %rdi
addq $0xc0, %rdi
callq 0x26e40
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
movq -0x18(%rbp), %rdi
movl 0x1ec(%rdi), %eax
movq %rax, -0x28(%rbp)
addq $0xd8, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x28(%rbp), %rax
cmpq %rcx, %rax
jae 0x2ee03
movq -0x18(%rbp), %rdi
addq $0xd8, %rdi
callq 0x26e60
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
movq -0x18(%rbp), %rdi
movl 0x1ec(%rdi), %eax
movq %rax, -0x30(%rbp)
addq $0xf0, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x30(%rbp), %rax
cmpq %rcx, %rax
jae 0x2ee46
movq -0x18(%rbp), %rdi
addq $0xf0, %rdi
callq 0x26e80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
movq -0x18(%rbp), %rdi
movl 0x1ec(%rdi), %eax
movq %rax, -0x38(%rbp)
addq $0x108, %rdi            # imm = 0x108
callq 0x26ea0
movq %rax, %rcx
movq -0x38(%rbp), %rax
cmpq %rcx, %rax
jae 0x2ee89
movq -0x18(%rbp), %rdi
addq $0x108, %rdi            # imm = 0x108
callq 0x26ea0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
movq -0x18(%rbp), %rdi
movl 0x1ec(%rdi), %eax
movq %rax, -0x40(%rbp)
addq $0x120, %rdi            # imm = 0x120
callq 0x26ec0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
jae 0x2eecc
movq -0x18(%rbp), %rdi
addq $0x120, %rdi            # imm = 0x120
callq 0x26ec0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movl %ecx, 0x1ec(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::ResetForSaleProds()
void Market::ResetForSaleProds(void)
{
    lightingSpellsForSale = 0;
    fireSpellsForSale = 0;
    iceSpellsForSale = 0;
    weaponsForSale = 0;
    potionsForSale = 0;
    armorsForSale = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movl $0x0, 0x1c8(%rax)
movl $0x0, 0x1cc(%rax)
movl $0x0, 0x1d0(%rax)
movl $0x0, 0x1d4(%rax)
movl $0x0, 0x1d8(%rax)
movl $0x0, 0x1dc(%rax)
popq %rbp
retq
nopw (%rax,%rax)
// File: MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::canBeBought(Spell const*, Hero const*)
bool Market::canBeBought(const Spell* spell, const Hero* hero)
{
    if (hero->GetMoney() < spell->GetPrice())
        return false;

    if (hero->Living::GetLevel() < spell->GetMinReqLevel())
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1eeb0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jae 0x36429
movb $0x0, -0x1(%rbp)
jmp 0x36452
movq -0x20(%rbp), %rdi
callq 0x1ea90
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movl %eax, %ecx
movl -0x28(%rbp), %eax
cmpl %ecx, %eax
jae 0x3644e
movb $0x0, -0x1(%rbp)
jmp 0x36452
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::canBeBought(Item const*, Hero const*)
bool Market::canBeBought(const Item* item, const Hero* hero)
{
    if (hero->GetMoney() < item->GetPrice())
        return false;

    if (hero->Living::GetLevel() < item->GetMinReqLevel())
        return false;

    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x1eeb0
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movl %eax, %ecx
movl -0x24(%rbp), %eax
cmpl %ecx, %eax
jae 0x36499
movb $0x0, -0x1(%rbp)
jmp 0x364c2
movq -0x20(%rbp), %rdi
callq 0x1ea90
movl %eax, -0x28(%rbp)
movq -0x18(%rbp), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
movl %eax, %ecx
movl -0x28(%rbp), %eax
cmpl %ecx, %eax
jae 0x364be
movb $0x0, -0x1(%rbp)
jmp 0x364c2
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x2, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1ee30
movl %eax, -0x58(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1ee70
movl %eax, %ecx
movl -0x58(%rbp), %eax
cmpl %ecx, %eax
jne 0x383cf
movq -0x18(%rbp), %rdi
callq 0x1ee10
movl %eax, -0x5c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1ee50
movl %eax, %ecx
movl -0x5c(%rbp), %eax
cmpl %ecx, %eax
jne 0x383c6
movq -0x20(%rbp), %rax
testb $0x1, (%rax)
je 0x383bd
movq 0x15cca(%rip), %rdi     # 0x4dff0
movq 0x15c8b(%rip), %rsi     # 0x4dfb8
callq 0x4290
movq %rax, %rdi
leaq 0x7faa(%rip), %rsi      # 0x402e6
callq 0x4260
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rsi
leaq -0x48(%rbp), %rdi
movq %rdi, -0x70(%rbp)
callq 0x1ea60
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
callq 0x4210
movq %rax, -0x68(%rbp)
jmp 0x38369
movq -0x68(%rbp), %rdi
leaq 0x84fc(%rip), %rsi      # 0x40870
callq 0x4260
movq %rax, -0x80(%rbp)
jmp 0x3837f
movq -0x80(%rbp), %rdi
movq 0x15c2e(%rip), %rsi     # 0x4dfb8
callq 0x4290
jmp 0x38391
leaq -0x48(%rbp), %rdi
callq 0x4160
movl $0x2625a0, %edi         # imm = 0x2625A0
callq 0x4390
jmp 0x383bd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x4160
jmp 0x3840e
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x38402
movl $0x0, -0x24(%rbp)
jmp 0x383fc
movq -0x18(%rbp), %rdi
callq 0x1ee10
movl %eax, -0x84(%rbp)
movq -0x18(%rbp), %rdi
callq 0x1ee50
movl %eax, %ecx
movl -0x84(%rbp), %eax
cmpl %ecx, %eax
jne 0x383fa
movl $0x1, -0x24(%rbp)
jmp 0x383fc
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x4440
nopw (%rax,%rax)
// File: cmaureir[P]strip-packing/scattersearch.cpp
// Function: read_input_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void read_input_file(string path){
    ifstream file(path.c_str());
    string value;
    int line_number = 0;
    strip_height=0;
    box tmp;
    while (file.good())
    {
        if (line_number == 0)
        {
            for (int i = 0; i < 4; i++)
            {
                getline(file, value, ',');
            }
        }

        else
        {
            // ID as the line counter
            tmp.id = line_number;

            // Second element "Height"
            getline(file, value, ',');
            tmp.height = atoi(value.c_str());

            // Third element "Width"
            getline(file, value, ',');
            tmp.width = atoi(value.c_str());

            // Empty value
            getline(file, value, ',');
            if(line_number == 1)
            {
                strip_width = atoi(value.c_str());
            }
            strip_height += tmp.height;
            bs.push_back(tmp);
        }

        line_number++;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
callq 0x4100
movq %rax, %rsi
leaq -0x210(%rbp), %rdi
movl $0x8, %edx
callq 0x4580
leaq -0x230(%rbp), %rdi
callq 0x4420
movl $0x0, -0x234(%rbp)
movl $0x0, 0x1a794(%rip)     # 0x2241c
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x44f0
movb %al, -0x251(%rbp)
jmp 0x7ca8
movb -0x251(%rbp), %al
testb $0x1, %al
jne 0x7cb7
jmp 0x7e32
cmpl $0x0, -0x234(%rbp)
jne 0x7d34
movl $0x0, -0x250(%rbp)
cmpl $0x4, -0x250(%rbp)
jge 0x7d2f
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x2c, %edx
callq 0x45a0
jmp 0x7ced
jmp 0x7cef
movl -0x250(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x250(%rbp)
jmp 0x7cca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x248(%rbp)
movl %eax, -0x24c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x4190
leaq -0x210(%rbp), %rdi
callq 0x40a0
jmp 0x7e53
jmp 0x7e1e
movl -0x234(%rbp), %eax
movl %eax, -0x240(%rbp)
leaq -0x210(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movl $0x2c, %edx
callq 0x45a0
jmp 0x7d5a
leaq -0x230(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x4100
movq %rax, %rdi
callq 0x4490
movq -0x260(%rbp), %rsi
movl %eax, -0x23c(%rbp)
leaq -0x210(%rbp), %rdi
movl $0x2c, %edx
callq 0x45a0
jmp 0x7d95
leaq -0x230(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x4100
movq %rax, %rdi
callq 0x4490
movq -0x268(%rbp), %rsi
movl %eax, -0x238(%rbp)
leaq -0x210(%rbp), %rdi
movl $0x2c, %edx
callq 0x45a0
jmp 0x7dd0
cmpl $0x1, -0x234(%rbp)
jne 0x7df3
leaq -0x230(%rbp), %rdi
callq 0x4100
movq %rax, %rdi
callq 0x4490
movl %eax, 0x1a625(%rip)     # 0x22418
movl -0x23c(%rbp), %ecx
movl 0x1a61d(%rip), %eax     # 0x2241c
addl %ecx, %eax
movl %eax, 0x1a615(%rip)     # 0x2241c
leaq 0x1a5f2(%rip), %rdi     # 0x22400
leaq -0x240(%rbp), %rsi
callq 0xbbe0
jmp 0x7e1c
jmp 0x7e1e
movl -0x234(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x234(%rbp)
jmp 0x7c88
leaq -0x230(%rbp), %rdi
callq 0x4190
leaq -0x210(%rbp), %rdi
callq 0x40a0
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x248(%rbp), %rdi
callq 0x4550
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq 0x1a169(%rip), %rdi     # 0x21fd8
leaq 0xf231(%rip), %rsi      # 0x170a7
callq 0x42e0
movq %rax, %rdi
movl 0x1a594(%rip), %esi     # 0x22418
callq 0x4520
movq %rax, %rdi
movq 0x1a105(%rip), %rsi     # 0x21f98
callq 0x4320
movq 0x1a139(%rip), %rdi     # 0x21fd8
leaq 0xf20f(%rip), %rsi      # 0x170b5
callq 0x42e0
movq %rax, %rdi
movq 0x1a0e3(%rip), %rsi     # 0x21f98
callq 0x4320
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0x8(%rbp)
leaq 0x1a532(%rip), %rdi     # 0x22400
callq 0xbc50
movq %rax, %rcx
movl -0x8(%rbp), %eax
cmpl %ecx, %eax
jge 0x7f78
movslq -0x4(%rbp), %rsi
leaq 0x1a514(%rip), %rdi     # 0x22400
callq 0xbc80
movl (%rax), %esi
movq 0x1a0de(%rip), %rdi     # 0x21fd8
callq 0x4520
movq %rax, %rdi
leaq 0xf42b(%rip), %rsi      # 0x17334
callq 0x42e0
movslq -0x4(%rbp), %rsi
leaq 0x1a4e7(%rip), %rdi     # 0x22400
callq 0xbc80
movl 0x4(%rax), %esi
movq 0x1a0b0(%rip), %rdi     # 0x21fd8
callq 0x4520
movq %rax, %rdi
leaq 0xf3fd(%rip), %rsi      # 0x17334
callq 0x42e0
movslq -0x4(%rbp), %rsi
leaq 0x1a4b9(%rip), %rdi     # 0x22400
callq 0xbc80
movl 0x8(%rax), %esi
movq 0x1a082(%rip), %rdi     # 0x21fd8
callq 0x4520
movq %rax, %rdi
movq 0x1a033(%rip), %rsi     # 0x21f98
callq 0x4320
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x7ec1
addq $0x10, %rsp
popq %rbp
retq
nop