// File: /workspace/github_cpp_makefile_star2_O1/MichaelXanth[P]RPG_Game/Living/Heroes/Hero.cpp
// Function: Hero::DisplaySpells(Spell*&, unsigned int&, unsigned int&)
bool Hero::DisplaySpells(Spell*& chosenSpell , unsigned int& slotNum , unsigned int& type)
{
    int arrow = 0;
    int column;
    int lines;
    char selection;

    if(!iceSpellsArray.empty())
        column = 0;
    else if(!fireSpellsArray.empty())
        column = 1;
    else if(!lightingSpellsArray.empty())
        column = 2;

    if(iceSpellsArray.size() >= fireSpellsArray.size() && iceSpellsArray.size() >= lightingSpellsArray.size())
        lines = 5 * (iceSpellsArray.size() + 1) - 1;

    if(fireSpellsArray.size() >= iceSpellsArray.size() && fireSpellsArray.size() >= lightingSpellsArray.size())
        lines = 5 * (fireSpellsArray.size() + 1) - 1;

    if(lightingSpellsArray.size() >= iceSpellsArray.size() && lightingSpellsArray.size() >= fireSpellsArray.size())
        lines = 5 * (lightingSpellsArray.size() + 1) - 1;

    do{
        cout << "\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0m" << endl;
        cout << "\033[34m|\033[0m          Ice Spells          \033[34m|\033[0m         Fire Spells          \033[34m|\033[0m       Lighting Spells        \033[34m|\033[0m" << endl;
        cout << "\033[1;33m+\033[0;34m------------------------------\033[1;33m+\033[0;34m------------------------------\033[1;33m+\033[0;34m------------------------------\033[1;33m+\033[0m";

        for(unsigned int i = 0; i < iceSpellsArray.size() || i < fireSpellsArray.size() || i < lightingSpellsArray.size(); i++)
        {
            if(!i)
                cout << endl;
            else
                cout << "\033[34m|                              |                              |                              |\033[0m" << endl;

            if(i < iceSpellsArray.size())
            {
                if(column == 0 && arrow == i)
                    cout << "\033[34m| \033[1;33m~> ";
                else
                    cout << "\033[34m|\033[0m    ";

                cout.width(26);
                cout << left << iceSpellsArray[i]->GetName() << "\033[0;34m|\033[0m" << endl;
                cout << "\033[34m|\033[0m    \u2022 Damage Range: ";
                cout.width(10);
                string str = to_string(iceSpellsArray[i]->GetMinDamage()) + "-" + to_string(iceSpellsArray[i]->GetMaxDamage());
                cout << left << str << "\033[34m|\033[0m" << endl;
                cout << "\033[34m|\033[0m    \u2022 Damage Reduction: ";
                cout.width(6);
                cout << left << iceSpellsArray[i]->GetDamageReduction() << "\033[34m|\033[0m" << endl;
                cout << "\033[34m|\033[0m    \u2022 Affected Rounds: ";
                cout.width(7);
                cout << left << iceSpellsArray[i]->GetRounds() << "\033[34m|\033[0m" << endl;
            }
            else
            {
                cout << "\033[34m|\033[30C|\033[0m" << endl;
                cout << "\033[34m|\033[30C|\033[0m" << endl;
                cout << "\033[34m|\033[30C|\033[0m" << endl;
                cout << "\033[34m|\033[30C|\033[0m" << endl;
            }

            cout << "\033[4A";

            if(i < fireSpellsArray.size())
            {
                if(column == 1 && arrow == i)
                    cout << "\033[32C \033[1;33m~> ";
                else
                    cout << "\033[32C    ";

                cout.width(26);
                cout << left << fireSpellsArray[i]->GetName() << "\033[0;34m|\033[0m" << endl;
                cout << "\033[32C    \u2022 Damage Range: ";
                cout.width(10);
                string str = to_string(fireSpellsArray[i]->GetMinDamage()) + "-" + to_string(fireSpellsArray[i]->GetMaxDamage());
                cout << left << str << "\033[34m|\033[0m" << endl;
                cout << "\033[32C    \u2022 Defence Reduction: ";
                cout.width(5);
                cout << left << fireSpellsArray[i]->GetDefenceReduction() << "\033[34m|\033[0m" << endl;
                cout << "\033[32C    \u2022 Affected Rounds: ";
                cout.width(7);
                cout << left << fireSpellsArray[i]->GetRounds() << "\033[34m|\033[0m" << endl;
            }
            else
            {
                cout << "\033[62C\033[34m|\033[0m" << endl;
                cout << "\033[62C\033[34m|\033[0m" << endl;
                cout << "\033[62C\033[34m|\033[0m" << endl;
                cout << "\033[62C\033[34m|\033[0m" << endl;
            }

            cout << "\033[4A";

            if(i < lightingSpellsArray.size())
            {
                if(column == 2 && arrow == i)
                    cout << "\033[63C \033[1;33m~> ";
                else
                    cout << "\033[63C    ";

                cout.width(26);
                cout << left << lightingSpellsArray[i]->GetName() << "\033[0;34m|\033[0m" << endl;
                cout << "\033[63C    \u2022 Damage Range: ";
                cout.width(10);
                string str = to_string(lightingSpellsArray[i]->GetMinDamage()) + "-" + to_string(lightingSpellsArray[i]->GetMaxDamage());
                cout << left << str << "\033[34m|\033[0m" << endl;
                cout << "\033[63C    \u2022 Avoidance Reduction: ";
                cout.width(3);
                cout << left << lightingSpellsArray[i]->GetAvoidanceReduction() << "\033[34m|\033[0m" << endl;
                cout << "\033[63C    \u2022 Affected Rounds: ";
                cout.width(7);
                cout << left << lightingSpellsArray[i]->GetRounds() << "\033[34m|\033[0m" << endl;
            }
            else
            {
                cout << "\033[93C\033[34m|\033[0m" << endl;
                cout << "\033[93C\033[34m|\033[0m" << endl;
                cout << "\033[93C\033[34m|\033[0m" << endl;
                cout << "\033[93C\033[34m|\033[0m" << endl;
            }
        }
        cout << "\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0;34m==============================\033[1;33m+\033[0m" << endl;
        cout << "Press 'e' to cancel" << endl;

        selection = getch();

        if(selection == 'e')
        {
            cout << "\033[" << lines << "A";
            cout << "\033[J";

            //for(int i = 0; i < lines; i++)
            //    cout << "\033[1A\033[K";

            return false;
        }
        else if(selection == 'w' && arrow) //navigates the menu arrow
            arrow--;
        else if(selection == 'a' && column)
        {
            if(column == 2)
            {
                if(fireSpellsArray.size())
                {
                    column--;

                    if(arrow > fireSpellsArray.size() - 1)
                        arrow = fireSpellsArray.size() - 1;
                }
                else if(iceSpellsArray.size())
                {
                    column -= 2;

                    if(arrow > iceSpellsArray.size() - 1)
                        arrow = iceSpellsArray.size() - 1;
                }
            }
            else if(column == 1)
            {
                if(iceSpellsArray.size())
                {
                    column --;

                    if(arrow > iceSpellsArray.size() - 1)
                        arrow = iceSpellsArray.size() - 1;
                }
            }
        }
        else if(selection == 's')
        {
            if(column == 0 && arrow < iceSpellsArray.size() - 1) //navigates the menu arrow
                arrow++;
            else if(column == 1 && arrow < fireSpellsArray.size() - 1)
                arrow++;
            else if(column == 2 && arrow < lightingSpellsArray.size() - 1)
                arrow++;
        }
        else if(selection == 'd' && column < 2)
        {
            if(column == 0)
            {
                if(fireSpellsArray.size())
                {
                    column++;

                    if(arrow > fireSpellsArray.size() - 1)
                        arrow = fireSpellsArray.size() - 1;
                }
                else if(lightingSpellsArray.size())
                {
                    column += 2;

                    if(arrow > lightingSpellsArray.size() - 1)
                        arrow = lightingSpellsArray.size() - 1;
                }
            }
            else if(column == 1)
            {
                if(lightingSpellsArray.size())
                {
                    column ++;

                    if(arrow > lightingSpellsArray.size() - 1)
                        arrow = lightingSpellsArray.size() - 1;
                }
            }
        }

        if(selection != '\n')
            cout << "\033[" << lines << "A";

    }while(selection != '\n');

    switch(column)
    {
        case 0:
            chosenSpell = iceSpellsArray[arrow];
            type = 2;
            slotNum = arrow + 1;

            break;

        case 1:
            chosenSpell = fireSpellsArray[arrow];
            type = 3;
            slotNum = arrow + 1;

            break;

        case 2:
            chosenSpell = lightingSpellsArray[arrow];
            type = 1;
            slotNum = arrow + 1;

            break;
    }

    cout << "\033[" << lines + 10 << "A";
    cout << "\033[J";

    //for(int i = 0; i < lines + 10; i++)
    //    cout << "\033[1A\033[K";

    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r12
movq 0x58(%rdi), %r9
movq 0x70(%rdi), %rdi
xorl %eax, %eax
subq 0x50(%r12), %r9
sete %al
incl %eax
xorl %r8d, %r8d
subq 0x68(%r12), %rdi
cmovel %eax, %r8d
movl %r8d, 0x24(%rsp)
movq %rdi, %rax
sarq $0x3, %rax
movq %r9, %r10
sarq $0x3, %r10
cmpq %r10, %rax
jb 0x14d8f
movq 0x40(%r12), %r8
subq 0x38(%r12), %r8
cmpq %r8, %rdi
jb 0x14d8f
leal (%rax,%rax,4), %r11d
addl $0x4, %r11d
cmpq %rax, %r10
movq %rdx, 0xc0(%rsp)
movq %rcx, 0xb8(%rsp)
movq %rsi, 0xb0(%rsp)
jb 0x14dc3
movq 0x40(%r12), %rdi
subq 0x38(%r12), %rdi
cmpq %rdi, %r9
jb 0x14dc3
leal (%r10,%r10,4), %r11d
addl $0x4, %r11d
leaq 0x68(%r12), %rcx
movq %rcx, 0x90(%rsp)
leaq 0x50(%r12), %rcx
movq %rcx, 0xa0(%rsp)
leaq 0x38(%r12), %rcx
movq %rcx, 0x98(%rsp)
movq 0x40(%r12), %rdx
subq 0x38(%r12), %rdx
sarq $0x3, %rdx
cmpq %r10, %rdx
leal 0x4(%rdx,%rdx,4), %ecx
cmovbl %r11d, %ecx
cmpq %rax, %rdx
cmovbl %r11d, %ecx
movl %ecx, 0x6c(%rsp)
movq $0x0, 0xa8(%rsp)
movq 0x1a1a7(%rip), %r13     # 0x2efc8
leaq 0x11a51(%rip), %rbx     # 0x26879
movl $0xffffff4f, %r14d      # imm = 0xFFFFFF4F
movl $0xd1b71759, %r15d      # imm = 0xD1B71759
movl $0x93, %edx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x31e0
movq (%r13), %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
movl $0x82, %edx
movq %r13, %rdi
leaq 0x11a92(%rip), %rsi     # 0x2690d
callq 0x31e0
movq (%r13), %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
movl $0x93, %edx
movq %r13, %rdi
leaq 0x11ad9(%rip), %rsi     # 0x26990
callq 0x31e0
xorl %ebx, %ebx
movl %ebx, %ebx
movq 0x70(%r12), %rax
subq 0x68(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x14efd
movq 0x58(%r12), %rax
subq 0x50(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
ja 0x14efd
movq 0x40(%r12), %rax
subq 0x38(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
jbe 0x161fa
testq %rbx, %rbx
je 0x14f16
movl $0x67, %edx
movq %r13, %rdi
leaq 0x11b13(%rip), %rsi     # 0x26a24
callq 0x31e0
movq (%r13), %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
movq 0x70(%r12), %rax
subq 0x68(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
jbe 0x14f7d
cmpl $0x0, 0x24(%rsp)
jne 0x15069
cmpl %ebx, 0xa8(%rsp)
jne 0x15069
movl $0x11, %edx
movq %r13, %rdi
leaq 0x11b14(%rip), %rsi     # 0x26a8c
jmp 0x15078
movl $0x10, %edx
movq %r13, %rdi
leaq 0x11b8b(%rip), %rbp     # 0x26b17
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0x10, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0x10, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0x10, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
jmp 0x1556d
movl $0xe, %edx
movq %r13, %rdi
leaq 0x11a26(%rip), %rsi     # 0x26a9e
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x1a, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x8(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xc, %edx
movq %rax, %rdi
leaq 0xf92c(%rip), %rsi      # 0x24a09
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15125
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x20, %edx
movq %r13, %rdi
leaq 0x11979(%rip), %rsi     # 0x26aad
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r13,%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x151aa
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x151a3
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x151a8
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x151aa
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x15172
addl $-0x3, %eax
jmp 0x151aa
addl $-0x2, %eax
jmp 0x151aa
decl %eax
movl %eax, %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x70(%rsp), %rdi
movl 0x78(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq %r14, %rdi
leaq 0x1205e(%rip), %rsi     # 0x27240
callq 0x3310
leaq 0x58(%rsp), %rsi
movq %rsi, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x1520f
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x15215
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x90(%rsp), %rsi
movl $0xffffff4f, %r14d      # imm = 0xFFFFFF4F
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq (%rsi), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x15293
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x1528c
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x15291
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x15293
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1525b
addl $-0x3, %eax
jmp 0x15293
addl $-0x2, %eax
jmp 0x15293
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq 0x48(%rsp), %rcx
movl $0xf, %esi
leaq 0x58(%rsp), %rbp
cmpq %rbp, %rcx
je 0x152d4
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x15302
movl $0xf, %esi
leaq 0x38(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x152fd
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x15313
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3080
jmp 0x15321
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x31d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x15344
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1534a
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x15383
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x1539a
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x153bc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x31b0
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1019c(%rip), %rsi     # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x24, %edx
movq %r13, %rdi
leaq 0x1169b(%rip), %rsi     # 0x26ace
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x6, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x40(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x10105(%rip), %rsi     # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x23, %edx
movq %r13, %rdi
leaq 0x11629(%rip), %rsi     # 0x26af3
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x7, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x90(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0x1006e(%rip), %rsi     # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x1556d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x4, %edx
movq %r13, %rdi
leaq 0x115ac(%rip), %rsi     # 0x26b28
callq 0x31e0
movq 0x58(%r12), %rax
subq 0x50(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
jbe 0x155c0
cmpl $0x1, 0x24(%rsp)
jne 0x156ac
cmpl %ebx, 0xa8(%rsp)
jne 0x156ac
movl $0x10, %edx
movq %r13, %rdi
leaq 0x11572(%rip), %rsi     # 0x26b2d
jmp 0x156bb
movl $0xf, %edx
movq %r13, %rdi
leaq 0x115d5(%rip), %rbp     # 0x26ba4
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
jmp 0x15bb0
movl $0x9, %edx
movq %r13, %rdi
leaq 0x11483(%rip), %rsi     # 0x26b3e
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x1a, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x8(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xc, %edx
movq %rax, %rdi
leaq 0xf2e9(%rip), %rsi      # 0x24a09
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15768
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x1b, %edx
movq %r13, %rdi
leaq 0x113d1(%rip), %rsi     # 0x26b48
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r13,%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x157ed
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x157e6
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x157eb
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x157ed
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x157b5
addl $-0x3, %eax
jmp 0x157ed
addl $-0x2, %eax
jmp 0x157ed
decl %eax
movl %eax, %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x70(%rsp), %rdi
movl 0x78(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq %r14, %rdi
leaq 0x11a1b(%rip), %rsi     # 0x27240
callq 0x3310
leaq 0x58(%rsp), %rsi
movq %rsi, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15852
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x15858
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl $0xffffff4f, %r14d      # imm = 0xFFFFFF4F
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x158d6
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x158cf
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x158d4
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x158d6
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x1589e
addl $-0x3, %eax
jmp 0x158d6
addl $-0x2, %eax
jmp 0x158d6
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq 0x48(%rsp), %rcx
movl $0xf, %esi
leaq 0x58(%rsp), %rbp
cmpq %rbp, %rcx
je 0x15917
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x15945
movl $0xf, %esi
leaq 0x38(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x15940
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x15956
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3080
jmp 0x15964
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x31d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x15987
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x1598d
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x159c6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x159dd
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x159ff
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x31b0
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xfb59(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x20, %edx
movq %r13, %rdi
leaq 0x110ee(%rip), %rsi     # 0x26b64
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x5, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xfac2(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x1e, %edx
movq %r13, %rdi
leaq 0x11078(%rip), %rsi     # 0x26b85
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x7, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0xa0(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xfa2b(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15bb0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x4, %edx
movq %r13, %rdi
leaq 0x10f69(%rip), %rsi     # 0x26b28
callq 0x31e0
movq 0x40(%r12), %rax
subq 0x38(%r12), %rax
sarq $0x3, %rax
cmpq %rbx, %rax
jbe 0x15c03
cmpl $0x2, 0x24(%rsp)
jne 0x15cef
cmpl %ebx, 0xa8(%rsp)
jne 0x15cef
movl $0x10, %edx
movq %r13, %rdi
leaq 0x10fb6(%rip), %rsi     # 0x26bb4
jmp 0x15cfe
movl $0xf, %edx
movq %r13, %rdi
leaq 0x1101b(%rip), %rbp     # 0x26c2d
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
movl $0xf, %edx
movq %r13, %rdi
movq %rbp, %rsi
callq 0x31e0
movq (%r13), %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
jmp 0x161f3
movl $0x9, %edx
movq %r13, %rdi
leaq 0x10ec7(%rip), %rsi     # 0x26bc5
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x1a, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rsi
movq (%rsi), %rax
movq %rsp, %rdi
callq *0x8(%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xc, %edx
movq %rax, %rdi
leaq 0xeca6(%rip), %rsi      # 0x24a09
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x15dab
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movl $0x1b, %edx
movq %r13, %rdi
leaq 0x10e15(%rip), %rsi     # 0x26bcf
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rax
movq $0xa, 0x10(%r13,%rax)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x15e30
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x15e29
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x15e2e
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x15e30
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x15df8
addl $-0x3, %eax
jmp 0x15e30
addl $-0x2, %eax
jmp 0x15e30
decl %eax
movl %eax, %esi
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
leaq 0x70(%rsp), %r14
movq %r14, %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x70(%rsp), %rdi
movl 0x78(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq %r14, %rdi
leaq 0x113d8(%rip), %rsi     # 0x27240
callq 0x3310
leaq 0x58(%rsp), %rsi
movq %rsi, 0x48(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x15e95
movq %rdx, 0x48(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x58(%rsp)
jmp 0x15e9b
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movl $0xffffff4f, %r14d      # imm = 0xFFFFFF4F
movq 0x8(%rax), %rdx
movq %rdx, 0x50(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
movl %eax, %ebp
movl $0x1, %eax
cmpl $0xa, %ebp
jb 0x15f19
movl $0x4, %eax
movl %ebp, %ecx
cmpl $0x63, %ecx
jbe 0x15f12
cmpl $0x3e7, %ecx            # imm = 0x3E7
jbe 0x15f17
cmpl $0x2710, %ecx           # imm = 0x2710
jb 0x15f19
movl %ecx, %edx
imulq %r15, %rdx
shrq $0x2d, %rdx
addl $0x4, %eax
cmpl $0x1869f, %ecx          # imm = 0x1869F
movl %edx, %ecx
ja 0x15ee1
addl $-0x3, %eax
jmp 0x15f19
addl $-0x2, %eax
jmp 0x15f19
decl %eax
movl %eax, %esi
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0x31f0
movq 0x28(%rsp), %rdi
movl 0x30(%rsp), %esi
movl %ebp, %edx
callq 0xef57
movq 0x48(%rsp), %rcx
movl $0xf, %esi
leaq 0x58(%rsp), %rbp
cmpq %rbp, %rcx
je 0x15f5a
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %r8
movq 0x30(%rsp), %rdx
leaq (%rdx,%r8), %rax
cmpq %rsi, %rax
jbe 0x15f88
movl $0xf, %esi
leaq 0x38(%rsp), %rdi
cmpq %rdi, 0x28(%rsp)
je 0x15f83
movq 0x38(%rsp), %rsi
cmpq %rsi, %rax
jbe 0x15f99
movq 0x28(%rsp), %rsi
leaq 0x48(%rsp), %rdi
callq 0x3080
jmp 0x15fa7
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x31d0
leaq 0x10(%rsp), %rsi
movq %rsi, (%rsp)
movq (%rax), %rdx
leaq 0x10(%rax), %rcx
cmpq %rcx, %rdx
je 0x15fca
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x15fd0
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq %rax, %rdx
addq $0x8, %rdx
movq 0x8(%rax), %rsi
movq %rsi, 0x8(%rsp)
movq %rcx, (%rax)
movq $0x0, (%rdx)
movb $0x0, (%rcx)
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x16009
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x16020
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16042
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x31b0
movq (%r13), %rax
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r13, %rdi
callq 0x31e0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xf516(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x22, %edx
movq %r13, %rdi
leaq 0x10b32(%rip), %rsi     # 0x26beb
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x3, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x50(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xf47f(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movl $0x1e, %edx
movq %r13, %rdi
leaq 0x10abe(%rip), %rsi     # 0x26c0e
callq 0x31e0
movq (%r13), %rax
movq -0x18(%rax), %rcx
movq $0x7, 0x10(%r13,%rcx)
movq -0x18(%rax), %rax
movl 0x18(%r13,%rax), %ecx
andl %r14d, %ecx
orl $0x20, %ecx
movl %ecx, 0x18(%r13,%rax)
movq 0x98(%rsp), %rax
movq (%rax), %rax
movq (%rax,%rbx,8), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl %eax, %esi
movq %r13, %rdi
callq 0x30f0
movq %rax, %rbp
movl $0xa, %edx
movq %rax, %rdi
leaq 0xf3e8(%rip), %rsi      # 0x25593
callq 0x31e0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x3190
movsbl %al, %esi
movq %rbp, %rdi
callq 0x3040
movq %rax, %rdi
callq 0x3100
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x161f3
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
incl %ebx
jmp 0x14ebe
movl $0x93, %edx
movq %r13, %rdi
leaq 0x10670(%rip), %rbx     # 0x26879
movq %rbx, %rsi
callq 0x31e0
movq (%r13), %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
movl $0x13, %edx
movq %r13, %rdi
leaq 0x109f5(%rip), %rsi     # 0x26c3d
callq 0x31e0
movq (%r13), %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
callq 0x10728
cmpb $0x65, %al
je 0x16470
cmpb $0x77, %al
movq 0xa8(%rsp), %r9
jne 0x162e7
testl %r9d, %r9d
je 0x162e7
decl %r9d
movl 0x24(%rsp), %esi
cmpb $0xa, %al
je 0x16493
movl %esi, 0x24(%rsp)
movq %r9, 0xa8(%rsp)
movl $0x2, %edx
movq %r13, %rdi
leaq 0xe11e(%rip), %rsi      # 0x243db
callq 0x31e0
movq %r13, %rdi
movl 0x6c(%rsp), %esi
callq 0x32e0
movl $0x1, %edx
movq %rax, %rdi
leaq 0xe921(%rip), %rsi      # 0x24bfe
callq 0x31e0
jmp 0x14e34
cmpb $0x61, %al
movl 0x24(%rsp), %esi
jne 0x16324
testl %esi, %esi
je 0x16324
cmpl $0x2, %esi
jne 0x16396
movq 0x58(%r12), %rdi
movq 0x50(%r12), %rcx
subq %rcx, %rdi
je 0x163af
sarq $0x3, %rdi
movslq %r9d, %rcx
leaq -0x1(%rdi), %rdx
movl $0x1, %esi
jmp 0x163cf
cmpb $0x73, %al
jne 0x1635c
cmpl $0x2, %esi
je 0x1644b
cmpl $0x1, %esi
jne 0x163e2
movq 0x58(%r12), %rdx
subq 0x50(%r12), %rdx
movslq %r9d, %rcx
sarq $0x3, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x16405
incl %r9d
jmp 0x163a5
cmpb $0x64, %al
jne 0x1629a
cmpl $0x1, %esi
jg 0x1629a
testl %esi, %esi
je 0x16410
movq 0x40(%r12), %rdi
movq 0x38(%r12), %rcx
subq %rcx, %rdi
je 0x163a5
sarq $0x3, %rdi
movslq %r9d, %rcx
leaq -0x1(%rdi), %rdx
movl $0x2, %esi
jmp 0x163cf
movq 0x70(%r12), %rdi
movq 0x68(%r12), %rcx
subq %rcx, %rdi
jne 0x163c2
movl $0x1, %esi
jmp 0x1629a
movq 0x70(%r12), %rdi
movq 0x68(%r12), %rcx
subq %rcx, %rdi
je 0x16466
sarq $0x3, %rdi
movslq %r9d, %rcx
leaq -0x1(%rdi), %rdx
xorl %esi, %esi
cmpq %rcx, %rdx
jae 0x1629a
decl %edi
movl %edi, %r9d
jmp 0x1629a
movq 0x70(%r12), %rdx
subq 0x68(%r12), %rdx
movslq %r9d, %rcx
sarq $0x3, %rdx
decq %rdx
cmpq %rcx, %rdx
jbe 0x16438
incl %r9d
xorl %esi, %esi
jmp 0x1629a
cmpl $0x2, %esi
jne 0x1629a
jmp 0x1644b
movq 0x58(%r12), %rdi
movq 0x50(%r12), %rcx
subq %rcx, %rdi
jne 0x1630f
movq 0x40(%r12), %rdi
movq 0x38(%r12), %rcx
subq %rcx, %rdi
jne 0x16384
jmp 0x163fe
cmpl $0x2, %esi
je 0x1644b
cmpl $0x1, %esi
je 0x1633a
jmp 0x1629a
movslq %r9d, %rdx
movq 0x40(%r12), %rcx
subq 0x38(%r12), %rcx
sarq $0x3, %rcx
decq %rcx
cmpq %rcx, %rdx
adcl $0x0, %r9d
movl $0x2, %esi
jmp 0x1629a
movl %eax, %ebx
movq 0x18b4f(%rip), %rdi     # 0x2efc8
leaq 0xdf5b(%rip), %rsi      # 0x243db
movl $0x2, %edx
callq 0x31e0
movl 0x6c(%rsp), %ebp
jmp 0x16531
testl %esi, %esi
je 0x164c9
cmpl $0x2, %esi
movq 0xc0(%rsp), %rsi
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %r8
movl 0x6c(%rsp), %ebp
movl %eax, %ebx
jne 0x164f6
movl $0x1, %eax
movq 0x98(%rsp), %rdx
jmp 0x16503
movl %eax, %ebx
movl $0x2, %eax
movq 0xc0(%rsp), %rsi
movq 0xb8(%rsp), %rdi
movq 0xb0(%rsp), %r8
movl 0x6c(%rsp), %ebp
movq 0x90(%rsp), %rdx
jmp 0x16503
movl $0x3, %eax
movq 0xa0(%rsp), %rdx
movslq %r9d, %rcx
movq (%rdx), %rdx
movq (%rdx,%rcx,8), %rdx
movq %rdx, (%r8)
movl %eax, (%rdi)
incl %ecx
movl %ecx, (%rsi)
movq 0x18aab(%rip), %rdi     # 0x2efc8
leaq 0xdeb7(%rip), %rsi      # 0x243db
movl $0x2, %edx
callq 0x31e0
addl $0xa, %ebp
cmpb $0x65, %bl
setne %bl
movq 0x18a8a(%rip), %r14     # 0x2efc8
movq %r14, %rdi
movl %ebp, %esi
callq 0x32e0
leaq 0xe6af(%rip), %rsi      # 0x24bfe
movl $0x1, %edx
movq %rax, %rdi
callq 0x31e0
leaq 0x10240(%rip), %rsi     # 0x267a3
movl $0x3, %edx
movq %r14, %rdi
callq 0x31e0
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x165ad
jmp 0x1658c
jmp 0x1658c
jmp 0x165ad
movq %rax, %r14
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x165be
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x31b0
jmp 0x165be
movq %rax, %r14
jmp 0x165d5
jmp 0x165b6
jmp 0x165b6
movq %rax, %r14
leaq 0x58(%rsp), %rbp
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0x165d5
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x31b0
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x16619
movq 0x80(%rsp), %rsi
jmp 0x16611
jmp 0x165fb
jmp 0x165fb
jmp 0x165fb
jmp 0x165fb
jmp 0x165fb
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x16619
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31b0
movq %r14, %rdi
callq 0x32f0
nop