// File: /workspace/github_cpp_makefile_star2_O3/MichaelXanth[P]RPG_Game/Market/Market.cpp
// Function: Market::isAbleToBuy(Hero const*, bool const&)
int Market::isAbleToBuy(const Hero* hero, const bool& info = true)
{
    int buyState = 2;
    bool found = false;

    if (hero->GetMoney() == 0) {
        if (info) {
            if (lightingSpellsForSale || fireSpellsForSale || iceSpellsForSale || weaponsForSale || potionsForSale || armorsForSale) {
                
                DisplayMarket(false, hero, 3);
                cerr << endl;
                cerr << "-------------------------------" << endl << endl;
                cerr << "\033[35mWarning:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m has no money. The minimum required amount is: " << minPrice << endl;
                usleep(2500000);
            
            } else
                cerr << endl << "\033[31mError:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m has no money. The minimum required amount is: " << minPrice << endl;
        }
        return -1;
    }

    if (hero->GetMoney() < minPrice) {
        if (info) {
            if (lightingSpellsForSale || fireSpellsForSale || iceSpellsForSale || weaponsForSale || potionsForSale || armorsForSale) {

                DisplayMarket(false,hero,3);
                cerr << endl;
                cerr << "-------------------------------" << endl << endl;
                cerr << "\033[35mWarning:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m doesn't have enough money. The minimum required amount is: " << minPrice << endl;
                usleep(2500000);
            
            } else
                cerr << endl << "\033[31mError:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m doesn't have enough money. The minimum required amount is: " << minPrice << endl;
        }
        return -1;
    }

    if (hero->GetAvailableItemSlots() == 0 || hero->GetMoney() < minItemPrice) {
        if (hero->GetAvailableSpellSlots() == 0 || hero->GetMoney() < minSpellPrice) {
            if (info) {
                if (lightingSpellsForSale || fireSpellsForSale || iceSpellsForSale || weaponsForSale || potionsForSale || armorsForSale) {
                    
                    DisplayMarket(false,hero,3);
                    cerr << endl;
                    cerr << "-------------------------------" << endl << endl;
                    cerr << "\033[35mWarning:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m doesn't have any other available Item and Spell slots." << endl;
                    usleep(2500000);
                
                } else
                    cerr << endl << "\033[31mError:\033[0m Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m doesn't have enough money. The minimum required amount is: " << minPrice << endl;
            }
            return -1;
        }
        buyState = 0;   //Means that he can buy Spells only
    
    } else if (hero->GetAvailableSpellSlots() == 0 || hero->GetMoney() < minSpellPrice) {
        buyState = 1;   //Means that he can buy Items only
    }

    if (buyState != 1) {
        
        unsigned int i;

        for (i = 0; i < iceSpellsArray.size() && !canBeBought(iceSpellsArray[i],hero); i++)
            ;
        if (i < iceSpellsArray.size())
            found = true;

        for (i = 0; i < fireSpellsArray.size() && !canBeBought(fireSpellsArray[i],hero); i++)
            ;
        if (i < fireSpellsArray.size())
            found = true;

        for (i = 0; i < lightingSpellsArray.size() && !canBeBought(lightingSpellsArray[i],hero); i++)
            ;
        if (i < lightingSpellsArray.size())
            found = true;
    }

    if (buyState != 0) {

        unsigned int i;

        for (i = 0; i < weaponsArray.size() && !canBeBought(weaponsArray[i],hero); i++)
            ;
        if (i < weaponsArray.size())
            found = true;

        for (i = 0; i < armorsArray.size() && !canBeBought(armorsArray[i],hero); i++)
            ;
        if (i < armorsArray.size())
            found = true;

        for (i = 0; i < potionsArray.size() && !canBeBought(potionsArray[i],hero); i++)
            ;
        if (i < potionsArray.size())
            found = true;
    }

    if (!found) {
        if (info) {
            cerr << endl << "\033[31mError:\033[0m There are no available Items or Spells for Hero \033[38;5;220m" << hero->Living::GetName() << "\033[0m to buy." << endl;
            usleep(3000000);
        }
        return -1;
    }

    return buyState;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
movq %rsi, %rdi
callq 0x10a4e
testl %eax, %eax
je 0x1aefc
movq %r13, %rdi
callq 0x10a4e
cmpl 0x1e8(%r15), %eax
jae 0x1b019
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, (%r14)
jne 0x1b5df
cmpl $0x0, 0x1c8(%r15)
jne 0x1b304
cmpl $0x0, 0x1cc(%r15)
jne 0x1b304
cmpl $0x0, 0x1d0(%r15)
jne 0x1b304
cmpl $0x0, 0x1d4(%r15)
jne 0x1b304
cmpl $0x0, 0x1d8(%r15)
jne 0x1b304
cmpl $0x0, 0x1dc(%r15)
jne 0x1b304
movq 0x141a7(%rip), %r12     # 0x2eff0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %rax, %r12
leaq 0xc42b(%rip), %rsi      # 0x272a6
movl $0x20, %edx
movq %rax, %rdi
callq 0x31e0
movq %r13, %rsi
leaq -0x70(%rbp), %r13
movq %r13, %rdi
callq 0x10812
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xc416(%rip), %rsi      # 0x272c7
movl $0x40, %edx
movq %rax, %rdi
callq 0x31e0
movl 0x1e8(%r15), %esi
movq %r14, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rax), %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
jmp 0x1b177
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, (%r14)
jne 0x1b5df
cmpl $0x0, 0x1c8(%r15)
jne 0x1b1cd
cmpl $0x0, 0x1cc(%r15)
jne 0x1b1cd
cmpl $0x0, 0x1d0(%r15)
jne 0x1b1cd
cmpl $0x0, 0x1d4(%r15)
jne 0x1b1cd
cmpl $0x0, 0x1d8(%r15)
jne 0x1b1cd
cmpl $0x0, 0x1dc(%r15)
jne 0x1b1cd
movq 0x1408a(%rip), %r12     # 0x2eff0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %rax, %r12
leaq 0xc30e(%rip), %rsi      # 0x272a6
movl $0x20, %edx
movq %rax, %rdi
callq 0x31e0
movq %r13, %rsi
leaq -0x70(%rbp), %r13
movq %r13, %rdi
callq 0x10812
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xc2a4(%rip), %rsi      # 0x27272
movl $0x33, %edx
movq %rax, %rdi
callq 0x31e0
movl 0x1e8(%r15), %esi
movq %r14, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rax), %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
jmp 0x1b177
movq %r13, %rdi
callq 0x10a2e
testl %eax, %eax
movq %r15, -0x38(%rbp)
je 0x1b03e
movq %r13, %rdi
callq 0x10a4e
cmpl 0x1e4(%r15), %eax
jae 0x1b192
movq %r13, %rdi
callq 0x10a26
testl %eax, %eax
je 0x1b05f
movq %r13, %rdi
callq 0x10a4e
cmpl 0x1e0(%r15), %eax
jae 0x1b43b
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
cmpb $0x1, (%r14)
jne 0x1b5df
cmpl $0x0, 0x1c8(%r15)
jne 0x1b4a7
cmpl $0x0, 0x1cc(%r15)
jne 0x1b4a7
cmpl $0x0, 0x1d0(%r15)
jne 0x1b4a7
cmpl $0x0, 0x1d4(%r15)
jne 0x1b4a7
cmpl $0x0, 0x1d8(%r15)
jne 0x1b4a7
cmpl $0x0, 0x1dc(%r15)
jne 0x1b4a7
movq 0x13f27(%rip), %r12     # 0x2eff0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %rax, %r12
leaq 0xc1ab(%rip), %rsi      # 0x272a6
movl $0x20, %edx
movq %rax, %rdi
callq 0x31e0
movq %r13, %rsi
leaq -0x70(%rbp), %r13
movq %r13, %rdi
callq 0x10812
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xc196(%rip), %rsi      # 0x272c7
movl $0x40, %edx
movq %rax, %rdi
callq 0x31e0
movl 0x1e8(%r15), %esi
movq %r14, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rax), %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 -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b5df
callq 0x3170
jmp 0x1b5df
movq %r13, %rdi
callq 0x10a26
movl $0x1, %ebx
testl %eax, %eax
je 0x1b5f0
movq %r13, %rdi
callq 0x10a4e
movl $0x2, %ecx
xorl %edx, %edx
movl $0x0, %esi
cmpl 0x1e0(%r15), %eax
jae 0x1b43f
jmp 0x1b71b
leaq -0x70(%rbp), %rsi
movb $0x0, (%rsi)
movq %r15, %rdi
movq %r13, %rdx
movl $0x3, %ecx
callq 0x1b982
movq 0x13e05(%rip), %r12     # 0x2eff0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0xc038(%rip), %rsi      # 0x27252
movl $0x1f, %edx
movq %r12, %rdi
callq 0x31e0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %r13, %r14
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x91bc(%rip), %rsi      # 0x2443f
movl $0x22, %edx
movq %r12, %rdi
callq 0x31e0
leaq -0x70(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x10812
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xbfb9(%rip), %rsi      # 0x27272
movl $0x33, %edx
movq %rax, %rdi
callq 0x31e0
movl 0x1e8(%r15), %esi
movq %r14, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rax), %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
jmp 0x1b5c3
leaq -0x70(%rbp), %rsi
movb $0x0, (%rsi)
movq %r15, %rdi
movq %r13, %rdx
movl $0x3, %ecx
callq 0x1b982
movq 0x13cce(%rip), %r12     # 0x2eff0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0xbf01(%rip), %rsi      # 0x27252
movl $0x1f, %edx
movq %r12, %rdi
callq 0x31e0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq %r13, %r14
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r13, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x9085(%rip), %rsi      # 0x2443f
movl $0x22, %edx
movq %r12, %rdi
callq 0x31e0
leaq -0x70(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x10812
movq (%r13), %rsi
movq 0x8(%r13), %rdx
movq %r12, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xbed7(%rip), %rsi      # 0x272c7
movl $0x40, %edx
movq %rax, %rdi
callq 0x31e0
movl 0x1e8(%r15), %esi
movq %r14, %rdi
callq 0x30f0
movq %rax, %r14
movq (%rax), %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
jmp 0x1b5c3
xorl %ecx, %ecx
movb $0x1, %dl
movl %edx, -0x3c(%rbp)
movl %ecx, -0x2c(%rbp)
movq %r14, -0x78(%rbp)
movq 0xd8(%r15), %rax
movq 0xe0(%r15), %rcx
cmpq %rax, %rcx
je 0x1b5f7
movl $0x1, %r14d
xorl %ebx, %ebx
movq %rax, %rcx
movq (%rcx,%rbx,8), %rsi
movq %r13, %rdx
callq 0x1fac0
movq 0xd8(%r15), %rcx
movq 0xe0(%r15), %rdx
testb %al, %al
jne 0x1b5fc
movl %r14d, %ebx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r14d
cmpq %rbx, %rax
ja 0x1b46b
jmp 0x1b5fc
leaq -0x70(%rbp), %rsi
movb $0x0, (%rsi)
movq %r15, %rdi
movq %r13, %rdx
movl $0x3, %ecx
callq 0x1b982
movq 0x13b2b(%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
leaq 0xbd5f(%rip), %rsi      # 0x27252
movl $0x1f, %edx
movq %r15, %rdi
callq 0x31e0
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, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %r12, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
leaq 0x8ee7(%rip), %rsi      # 0x2443f
movl $0x22, %edx
movq %r15, %rdi
callq 0x31e0
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq %r13, %rsi
callq 0x10812
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xbd79(%rip), %rsi      # 0x27308
movl $0x3b, %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 -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b5d5
callq 0x3170
movl $0x2625a0, %edi         # imm = 0x2625A0
callq 0x3260
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %esi, %esi
jmp 0x1b71b
xorl %ebx, %ebx
movq %rcx, %rdx
subq %rcx, %rdx
movq %rdx, -0x48(%rbp)
movq 0xc0(%r15), %rax
movq 0xc8(%r15), %rcx
cmpq %rax, %rcx
je 0x1b65b
movl $0x1, %r15d
xorl %r12d, %r12d
movq %rax, %rcx
movq (%rcx,%r12,8), %rsi
movq %r13, %rdx
callq 0x1fac0
movq -0x38(%rbp), %rdx
movq 0xc0(%rdx), %rcx
movq 0xc8(%rdx), %r14
testb %al, %al
jne 0x1b661
movl %r15d, %r12d
movq %r14, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r15d
cmpq %r12, %rax
ja 0x1b622
jmp 0x1b661
xorl %r12d, %r12d
movq %rcx, %r14
movq %r13, -0x50(%rbp)
subq %rcx, %r14
sarq $0x3, -0x48(%rbp)
sarq $0x3, %r14
movq -0x38(%rbp), %rcx
movq 0xa8(%rcx), %rax
movq 0xb0(%rcx), %rcx
cmpq %rax, %rcx
je 0x1b6ce
movl $0x1, %r13d
xorl %r15d, %r15d
movq %rax, %rcx
movq (%rcx,%r15,8), %rsi
movq -0x50(%rbp), %rdx
callq 0x1fac0
movq -0x38(%rbp), %rdx
movq 0xa8(%rdx), %rcx
movq 0xb0(%rdx), %rdx
testb %al, %al
jne 0x1b6d4
movl %r13d, %r15d
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r13d
cmpq %r15, %rax
ja 0x1b694
jmp 0x1b6d4
xorl %r15d, %r15d
movq %rcx, %rdx
cmpq %r12, %r14
seta %al
cmpq %rbx, -0x48(%rbp)
seta %sil
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
seta %cl
orb %al, %sil
orb %cl, %sil
cmpb $0x0, -0x3c(%rbp)
je 0x1b70c
movl -0x2c(%rbp), %ebx
testb %sil, %sil
je 0x1b887
jmp 0x1b5df
movl -0x2c(%rbp), %ebx
movq -0x50(%rbp), %r13
movq -0x38(%rbp), %r15
movq -0x78(%rbp), %r14
movl %esi, -0x3c(%rbp)
movq %r14, -0x78(%rbp)
movl %ebx, -0x2c(%rbp)
movq 0xf0(%r15), %rax
movq 0xf8(%r15), %rcx
cmpq %rax, %rcx
je 0x1b778
movl $0x1, %r14d
xorl %ebx, %ebx
movq %rax, %rcx
movq (%rcx,%rbx,8), %rsi
movq %r13, %rdx
callq 0x1fb12
movq 0xf0(%r15), %rcx
movq 0xf8(%r15), %rdx
testb %al, %al
jne 0x1b77d
movl %r14d, %ebx
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r14d
cmpq %rbx, %rax
ja 0x1b743
jmp 0x1b77d
xorl %ebx, %ebx
movq %rcx, %rdx
subq %rcx, %rdx
movq %rdx, -0x48(%rbp)
movq 0x120(%r15), %rax
movq 0x128(%r15), %rcx
cmpq %rax, %rcx
je 0x1b7dc
movl $0x1, %r15d
xorl %r12d, %r12d
movq %rax, %rcx
movq (%rcx,%r12,8), %rsi
movq %r13, %rdx
callq 0x1fb12
movq -0x38(%rbp), %rdx
movq 0x120(%rdx), %rcx
movq 0x128(%rdx), %r14
testb %al, %al
jne 0x1b7e2
movl %r15d, %r12d
movq %r14, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r15d
cmpq %r12, %rax
ja 0x1b7a3
jmp 0x1b7e2
xorl %r12d, %r12d
movq %rcx, %r14
movq %r13, -0x50(%rbp)
subq %rcx, %r14
sarq $0x3, -0x48(%rbp)
sarq $0x3, %r14
movq -0x38(%rbp), %rcx
movq 0x108(%rcx), %rax
movq 0x110(%rcx), %rcx
cmpq %rax, %rcx
je 0x1b84f
movl $0x1, %r13d
xorl %r15d, %r15d
movq %rax, %rcx
movq (%rcx,%r15,8), %rsi
movq -0x50(%rbp), %rdx
callq 0x1fb12
movq -0x38(%rbp), %rdx
movq 0x108(%rdx), %rcx
movq 0x110(%rdx), %rdx
testb %al, %al
jne 0x1b855
movl %r13d, %r15d
movq %rdx, %rax
subq %rcx, %rax
sarq $0x3, %rax
incl %r13d
cmpq %r15, %rax
ja 0x1b815
jmp 0x1b855
xorl %r15d, %r15d
movq %rcx, %rdx
cmpq %r12, %r14
seta %al
cmpq %rbx, -0x48(%rbp)
seta %sil
subq %rcx, %rdx
sarq $0x3, %rdx
cmpq %r15, %rdx
seta %cl
orb %al, %sil
orb -0x3c(%rbp), %sil
orb %cl, %sil
testb $0x1, %sil
movl -0x2c(%rbp), %ebx
jne 0x1b5df
movl $0xffffffff, %ebx       # imm = 0xFFFFFFFF
movq -0x78(%rbp), %rax
cmpb $0x1, (%rax)
jne 0x1b5df
movq 0x13750(%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 0xba73(%rip), %rsi      # 0x27344
movl $0x4b, %edx
movq %rax, %rdi
callq 0x31e0
leaq -0x70(%rbp), %r12
movq %r12, %rdi
movq -0x50(%rbp), %rsi
callq 0x10812
movq (%r12), %rsi
movq 0x8(%r12), %rdx
movq %r15, %rdi
callq 0x31e0
movq %rax, %r14
leaq 0xba87(%rip), %rsi      # 0x27390
movl $0xc, %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 -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b94f
callq 0x3170
movl $0x2dc6c0, %edi         # imm = 0x2DC6C0
jmp 0x1b5da
jmp 0x1b965
jmp 0x1b965
jmp 0x1b965
jmp 0x1b965
jmp 0x1b965
jmp 0x1b965
movq %rax, %rbx
leaq -0x60(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1b97a
callq 0x3170
movq %rbx, %rdi
callq 0x32f0