// File: Agusyc[P]CTRPG/src/battle.cpp
// Function: Battle::attack()
int Battle::attack() {
    unsigned int choice;
    if (playerTurn) {
        // The player attacks.
        bool exitLoop = false;
        Attack attack;

        while (!exitLoop) {
            cout << "Attacks: " << endl;

            for (unsigned int i = 0; i < player.attacks.size(); i++) {
                cout << i+1 << ". " << player.attacks.at(i).name << endl;
            }

            cout << player.attacks.size() + 1 << ". Go back" << endl;

            cout << "Your choice: ";

            cin >> choice;

            cout << endl;

            if (choice == player.attacks.size() + 1) {
                return 1;
            }

            if (choice > player.attacks.size() || choice < 1) {
                printMessage("That's not a valid choice...");
                cout << endl;
                continue;
            }

            attack = player.attacks.at(choice - 1);

            if (player.mana < attack.mana) {
                printMessage(string("You don't have enough ") + YELLOW + string("mana ") + WHITE + string("to use that attack!"));
                continue;
            }

            if (player.stamina < attack.stamina) {
                printMessage(string("You don't have enough ") + YELLOW + string("stamina ") + WHITE + string("to use that attack!"));
                continue;
            }

            exitLoop = true;
        }

        // Decrease the user mana and stamina
        player.mana -= attack.mana;
        player.stamina -= attack.stamina;

        // Calculate how much damage is dealt to the enemy
        int damage = (attack.damage + attack.magicDamage + player.attack) - enemy.defense;

        if (damage <= 0) {
            // The attack doesn't do anything
            printMessage("Man... That attack is so lame that it doesn't do anything.");
        } else {
            // The attack is powerful enough to do something
            bool critical = false;
            // 5 % chance of a critical hit
            if (rand() % 100 < 5) {
                critical = true;
                damage *= 2;
            }

            stringstream ss;
            if (critical)
                ss << "With a " << BOLD << "critical hit, ";
            ss << "You deal " << GREEN << damage << WHITE << " to " << RED << enemy.name << WHITE << " with " << YELLOW << attack.name << WHITE  << "!" << endl << "It now has " << GREEN << enemy.hp - damage << WHITE << " HP." << endl;

            printMessage(ss.str());

            enemy.hp -= damage;
        }
    } else {
        // The enemy attacks
        stringstream ss;
        ss << RED << enemy.name << WHITE << " has to attack!";

        printMessage(ss.str());

        bool enemyAttacks = rand() % 2;
        if (enemyAttacks) {
            Attack attack;
            bool exitLoop = false;

            // This loop ensures that the enemy doesn't choose an attack that it can't use because of mana or stamina.
            while (!exitLoop) {
                attack = enemy.attacks.at(rand() % enemy.attacks.size());

                if (enemy.mana >= attack.mana && enemy.stamina >= attack.stamina) {
                    exitLoop = true;
                }
            }

            // Decrease enemy's mana and stamina
            enemy.mana -= attack.mana;
            enemy.stamina -= attack.stamina;

            // Calculate how much damage is dealt to the player
            int damage = (attack.damage + attack.magicDamage + enemy.attack) - player.defense;

            if (defending)
                damage -= player.shieldDefense;

            if (damage <= 0) {
                // The attack doesn't do anything
                ss << RED << enemy.name << WHITE << " tries to hurt you with " << YELLOW << attack.name << WHITE <<  "... But it can't!";
                printMessage(ss.str());
            } else {
                // The attack is powerful enough...
                bool critical = false;
                // 5 % chance of a critical hit
                if (rand() % 100 < 5) {
                    critical = true;
                    damage *= 2;
                }

                // Reset the stringstream
                ss.str("");
                ss.clear();

                if (critical)
                    ss << "With a critical hit, ";
                ss << RED << enemy.name << WHITE << " deals you " << GREEN << damage << WHITE << " with " << YELLOW << attack.name << WHITE << "!"  << endl << "You now have " << GREEN << player.hp - damage << WHITE << " HP." << endl;

                printMessage(ss.str());

                player.hp -= damage;
            }
        } else {
            // The enemy decides not to attack
            printMessage("But it is resting...\n");
        }
    }

    // When the player wins
    if (enemy.hp <= 0) {
        printMessage("You win!");
        over = true;
        if (player.xp + enemy.xp < player.goal) {
            player.xp += enemy.xp;
        } else if (player.xp + enemy.xp >= player.goal) {
            stringstream ss;

            ss << "You leveled up! You are on level " << YELLOW << player.level + 1 << WHITE << " now!";

            player.xp = player.goal - player.xp;

            printMessage(ss.str());

            player.level++;
            player.goal *= 2;

            // To let the user choose what stats to improve
            showLevelUpMenu(parsePlayer());
        }
        // Give the player a random Item:
        Item item;

        bool exitLoop = false;
        while (!exitLoop) {
            item = parseItem(rand() % getItemsNumber());
            if (player.level < item.minLevel || player.level > item.maxLevel) {
                continue;
            }

            exitLoop = true;
        }

        player.items.push_back(item);

        printMessage(string("You found ") + YELLOW + item.name + WHITE + string("!"));

        writeItems();
    }

    // When the enemy wins
    if (player.hp <= 0) {
        printMessage("You lose!");
        over = true;
        exit(0);
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xfb0, %rsp            # imm = 0xFB0
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0xcb0(%rbp)
testb $0x1, 0xd9(%rax)
je 0x54ac
movb $0x0, -0x15(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x8490
movb -0x15(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x45a2
jmp 0x4f49
movq 0x13a27(%rip), %rdi     # 0x17fd0
leaq 0xcb7d(%rip), %rsi      # 0x1112d
callq 0x3290
movq %rax, -0xcb8(%rbp)
jmp 0x45be
movq -0xcb8(%rbp), %rdi
movq 0x139f4(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x45d3
movl $0x0, -0x68(%rbp)
movq -0xcb0(%rbp), %rdi
movl -0x68(%rbp), %eax
movq %rax, -0xcc0(%rbp)
addq $0x48, %rdi
callq 0x84b0
movq %rax, %rcx
movq -0xcc0(%rbp), %rax
cmpq %rcx, %rax
jae 0x46ad
movl -0x68(%rbp), %esi
incl %esi
movq 0x139bd(%rip), %rdi     # 0x17fd0
callq 0x3380
movq %rax, -0xcc8(%rbp)
jmp 0x4621
movq -0xcc8(%rbp), %rdi
leaq 0xcb08(%rip), %rsi      # 0x11137
callq 0x3290
movq %rax, -0xcd0(%rbp)
jmp 0x463d
movq -0xcb0(%rbp), %rdi
addq $0x48, %rdi
movl -0x68(%rbp), %eax
movl %eax, %esi
callq 0x84d0
movq %rax, -0xcd8(%rbp)
jmp 0x465b
movq -0xcd8(%rbp), %rsi
movq -0xcd0(%rbp), %rdi
callq 0x3230
movq %rax, -0xce0(%rbp)
jmp 0x4677
movq -0xce0(%rbp), %rdi
movq 0x1393b(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x468c
jmp 0x468e
movl -0x68(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x68(%rbp)
jmp 0x45da
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x549e
movq -0xcb0(%rbp), %rdi
addq $0x48, %rdi
callq 0x84b0
movq %rax, %rsi
incq %rsi
movq 0x13906(%rip), %rdi     # 0x17fd0
callq 0x30a0
movq %rax, -0xce8(%rbp)
jmp 0x46d8
movq -0xce8(%rbp), %rdi
leaq 0xca54(%rip), %rsi      # 0x1113a
callq 0x3290
movq %rax, -0xcf0(%rbp)
jmp 0x46f4
movq -0xcf0(%rbp), %rdi
movq 0x138be(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x4709
movq 0x138c0(%rip), %rdi     # 0x17fd0
leaq 0xca08(%rip), %rsi      # 0x1111f
callq 0x3290
jmp 0x471e
movq 0x138bb(%rip), %rdi     # 0x17fe0
leaq -0x14(%rbp), %rsi
callq 0x3060
jmp 0x4730
movq 0x13899(%rip), %rdi     # 0x17fd0
movq 0x13882(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x4745
movq -0xcb0(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0xcf8(%rbp)
addq $0x48, %rdi
callq 0x84b0
movq %rax, %rcx
movq -0xcf8(%rbp), %rax
addq $0x1, %rcx
cmpq %rcx, %rax
jne 0x4785
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6c(%rbp)
jmp 0x5482
movq -0xcb0(%rbp), %rdi
movl -0x14(%rbp), %eax
movq %rax, -0xd00(%rbp)
addq $0x48, %rdi
callq 0x84b0
movq %rax, %rcx
movq -0xd00(%rbp), %rax
cmpq %rcx, %rax
ja 0x47b8
cmpl $0x1, -0x14(%rbp)
jae 0x48e2
leaq -0x91(%rbp), %rdi
movq %rdi, -0xd08(%rbp)
callq 0x3540
movq -0xd08(%rbp), %rdx
leaq 0xc96b(%rip), %rsi      # 0x11144
leaq -0x90(%rbp), %rdi
callq 0x33a0
jmp 0x47e7
leaq -0xb9(%rbp), %rdi
movq %rdi, -0xd10(%rbp)
callq 0x3540
movq -0xd10(%rbp), %rdx
leaq 0xc834(%rip), %rsi      # 0x1103c
leaq -0xb8(%rbp), %rdi
callq 0x33a0
jmp 0x4816
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x483b
leaq -0xb8(%rbp), %rdi
callq 0x31b0
leaq -0xb9(%rbp), %rdi
callq 0x32d0
leaq -0x90(%rbp), %rdi
callq 0x31b0
leaq -0x91(%rbp), %rdi
callq 0x32d0
movq 0x1375e(%rip), %rdi     # 0x17fd0
movq 0x13747(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x4880
jmp 0x4594
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x48d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x48b9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x31b0
leaq -0xb9(%rbp), %rdi
callq 0x32d0
leaq -0x90(%rbp), %rdi
callq 0x31b0
leaq -0x91(%rbp), %rdi
callq 0x32d0
jmp 0x549e
movq -0xcb0(%rbp), %rdi
addq $0x48, %rdi
movl -0x14(%rbp), %eax
decl %eax
movl %eax, %esi
callq 0x84d0
movq %rax, -0xd18(%rbp)
jmp 0x4902
movq -0xd18(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x8510
jmp 0x4914
movq -0xcb0(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x30(%rbp), %eax
jge 0x4c2a
leaq -0x161(%rbp), %rdi
movq %rdi, -0xd20(%rbp)
callq 0x3540
movq -0xd20(%rbp), %rdx
leaq 0xc819(%rip), %rsi      # 0x11161
leaq -0x160(%rbp), %rdi
callq 0x33a0
jmp 0x4956
leaq 0xc6d3(%rip), %rdx      # 0x11030
leaq -0x140(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x8280
jmp 0x4972
leaq -0x189(%rbp), %rdi
movq %rdi, -0xd28(%rbp)
callq 0x3540
movq -0xd28(%rbp), %rdx
leaq 0xc7e5(%rip), %rsi      # 0x11178
leaq -0x188(%rbp), %rdi
callq 0x33a0
jmp 0x49a1
leaq -0x120(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x188(%rbp), %rdx
callq 0x81b0
jmp 0x49bd
leaq 0xc678(%rip), %rdx      # 0x1103c
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %rsi
callq 0x8280
jmp 0x49d9
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0xd30(%rbp)
callq 0x3540
movq -0xd30(%rbp), %rdx
leaq 0xc784(%rip), %rsi      # 0x1117e
leaq -0x1b0(%rbp), %rdi
callq 0x33a0
jmp 0x4a08
leaq -0xe0(%rbp), %rdi
leaq -0x100(%rbp), %rsi
leaq -0x1b0(%rbp), %rdx
callq 0x81b0
jmp 0x4a24
leaq -0x1d9(%rbp), %rdi
movq %rdi, -0xd38(%rbp)
callq 0x3540
movq -0xd38(%rbp), %rdx
leaq 0xc5f7(%rip), %rsi      # 0x1103c
leaq -0x1d8(%rbp), %rdi
callq 0x33a0
jmp 0x4a53
leaq -0xe0(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x4a78
leaq -0x1d8(%rbp), %rdi
callq 0x31b0
leaq -0x1d9(%rbp), %rdi
callq 0x32d0
leaq -0xe0(%rbp), %rdi
callq 0x31b0
leaq -0x1b0(%rbp), %rdi
callq 0x31b0
leaq -0x1b1(%rbp), %rdi
callq 0x32d0
leaq -0x100(%rbp), %rdi
callq 0x31b0
leaq -0x120(%rbp), %rdi
callq 0x31b0
leaq -0x188(%rbp), %rdi
callq 0x31b0
leaq -0x189(%rbp), %rdi
callq 0x32d0
leaq -0x140(%rbp), %rdi
callq 0x31b0
leaq -0x160(%rbp), %rdi
callq 0x31b0
leaq -0x161(%rbp), %rdi
callq 0x32d0
jmp 0x4594
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4c19
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4c0d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4bf5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4be9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4bdd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4bc5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4bb9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ba1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x31b0
leaq -0x1d9(%rbp), %rdi
callq 0x32d0
leaq -0xe0(%rbp), %rdi
callq 0x31b0
leaq -0x1b0(%rbp), %rdi
callq 0x31b0
leaq -0x1b1(%rbp), %rdi
callq 0x32d0
leaq -0x100(%rbp), %rdi
callq 0x31b0
leaq -0x120(%rbp), %rdi
callq 0x31b0
leaq -0x188(%rbp), %rdi
callq 0x31b0
leaq -0x189(%rbp), %rdi
callq 0x32d0
leaq -0x140(%rbp), %rdi
callq 0x31b0
leaq -0x160(%rbp), %rdi
callq 0x31b0
leaq -0x161(%rbp), %rdi
callq 0x32d0
jmp 0x549e
movq -0xcb0(%rbp), %rax
movl 0x30(%rax), %eax
cmpl -0x2c(%rbp), %eax
jge 0x4f40
leaq -0x281(%rbp), %rdi
movq %rdi, -0xd40(%rbp)
callq 0x3540
movq -0xd40(%rbp), %rdx
leaq 0xc503(%rip), %rsi      # 0x11161
leaq -0x280(%rbp), %rdi
callq 0x33a0
jmp 0x4c6c
leaq 0xc3bd(%rip), %rdx      # 0x11030
leaq -0x260(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x8280
jmp 0x4c88
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0xd48(%rbp)
callq 0x3540
movq -0xd48(%rbp), %rdx
leaq 0xc4e9(%rip), %rsi      # 0x11192
leaq -0x2a8(%rbp), %rdi
callq 0x33a0
jmp 0x4cb7
leaq -0x240(%rbp), %rdi
leaq -0x260(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x81b0
jmp 0x4cd3
leaq 0xc362(%rip), %rdx      # 0x1103c
leaq -0x220(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x8280
jmp 0x4cef
leaq -0x2d1(%rbp), %rdi
movq %rdi, -0xd50(%rbp)
callq 0x3540
movq -0xd50(%rbp), %rdx
leaq 0xc46e(%rip), %rsi      # 0x1117e
leaq -0x2d0(%rbp), %rdi
callq 0x33a0
jmp 0x4d1e
leaq -0x200(%rbp), %rdi
leaq -0x220(%rbp), %rsi
leaq -0x2d0(%rbp), %rdx
callq 0x81b0
jmp 0x4d3a
leaq -0x2f9(%rbp), %rdi
movq %rdi, -0xd58(%rbp)
callq 0x3540
movq -0xd58(%rbp), %rdx
leaq 0xc2e1(%rip), %rsi      # 0x1103c
leaq -0x2f8(%rbp), %rdi
callq 0x33a0
jmp 0x4d69
leaq -0x200(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x4d8e
leaq -0x2f8(%rbp), %rdi
callq 0x31b0
leaq -0x2f9(%rbp), %rdi
callq 0x32d0
leaq -0x200(%rbp), %rdi
callq 0x31b0
leaq -0x2d0(%rbp), %rdi
callq 0x31b0
leaq -0x2d1(%rbp), %rdi
callq 0x32d0
leaq -0x220(%rbp), %rdi
callq 0x31b0
leaq -0x240(%rbp), %rdi
callq 0x31b0
leaq -0x2a8(%rbp), %rdi
callq 0x31b0
leaq -0x2a9(%rbp), %rdi
callq 0x32d0
leaq -0x260(%rbp), %rdi
callq 0x31b0
leaq -0x280(%rbp), %rdi
callq 0x31b0
leaq -0x281(%rbp), %rdi
callq 0x32d0
jmp 0x4594
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4f2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4f23
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4f0b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4eff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ef3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4edb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4ecf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x4eb7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x2f8(%rbp), %rdi
callq 0x31b0
leaq -0x2f9(%rbp), %rdi
callq 0x32d0
leaq -0x200(%rbp), %rdi
callq 0x31b0
leaq -0x2d0(%rbp), %rdi
callq 0x31b0
leaq -0x2d1(%rbp), %rdi
callq 0x32d0
leaq -0x220(%rbp), %rdi
callq 0x31b0
leaq -0x240(%rbp), %rdi
callq 0x31b0
leaq -0x2a8(%rbp), %rdi
callq 0x31b0
leaq -0x2a9(%rbp), %rdi
callq 0x32d0
leaq -0x260(%rbp), %rdi
callq 0x31b0
leaq -0x280(%rbp), %rdi
callq 0x31b0
leaq -0x281(%rbp), %rdi
callq 0x32d0
jmp 0x549e
movb $0x1, -0x15(%rbp)
jmp 0x4594
movq -0xcb0(%rbp), %rcx
movl -0x30(%rbp), %edx
movl 0x2c(%rcx), %eax
subl %edx, %eax
movl %eax, 0x2c(%rcx)
movl -0x2c(%rbp), %edx
movl 0x30(%rcx), %eax
subl %edx, %eax
movl %eax, 0x30(%rcx)
movl -0x38(%rbp), %eax
addl -0x34(%rbp), %eax
addl 0x20(%rcx), %eax
subl 0x9c(%rcx), %eax
movl %eax, -0x300(%rbp)
cmpl $0x0, -0x300(%rbp)
jg 0x509d
leaq -0x321(%rbp), %rdi
movq %rdi, -0xd60(%rbp)
callq 0x3540
movq -0xd60(%rbp), %rdx
leaq 0xc1f2(%rip), %rsi      # 0x1119b
leaq -0x320(%rbp), %rdi
callq 0x33a0
jmp 0x4fb7
leaq -0x349(%rbp), %rdi
movq %rdi, -0xd68(%rbp)
callq 0x3540
movq -0xd68(%rbp), %rdx
leaq 0xc064(%rip), %rsi      # 0x1103c
leaq -0x348(%rbp), %rdi
callq 0x33a0
jmp 0x4fe6
leaq -0x320(%rbp), %rdi
leaq -0x348(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x500b
leaq -0x348(%rbp), %rdi
callq 0x31b0
leaq -0x349(%rbp), %rdi
callq 0x32d0
leaq -0x320(%rbp), %rdi
callq 0x31b0
leaq -0x321(%rbp), %rdi
callq 0x32d0
jmp 0x547b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x508c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5074
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x348(%rbp), %rdi
callq 0x31b0
leaq -0x349(%rbp), %rdi
callq 0x32d0
leaq -0x320(%rbp), %rdi
callq 0x31b0
leaq -0x321(%rbp), %rdi
callq 0x32d0
jmp 0x549e
movb $0x0, -0x34a(%rbp)
callq 0x30c0
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x5, %edx
jge 0x50cb
movb $0x1, -0x34a(%rbp)
movl -0x300(%rbp), %eax
shll %eax
movl %eax, -0x300(%rbp)
leaq -0x4d8(%rbp), %rdi
callq 0x31d0
jmp 0x50d9
testb $0x1, -0x34a(%rbp)
je 0x5142
leaq -0x4c8(%rbp), %rdi
leaq 0xc0e6(%rip), %rsi      # 0x111d6
callq 0x3290
movq %rax, -0xd70(%rbp)
jmp 0x50fe
movq -0xd70(%rbp), %rdi
leaq 0xc0d2(%rip), %rsi      # 0x111de
callq 0x3290
movq %rax, -0xd78(%rbp)
jmp 0x511a
movq -0xd78(%rbp), %rdi
leaq 0xc11e(%rip), %rsi      # 0x11246
callq 0x3290
jmp 0x512f
jmp 0x5142
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x546d
leaq -0x4c8(%rbp), %rdi
leaq 0xc094(%rip), %rsi      # 0x111e4
callq 0x3290
movq %rax, -0xd80(%rbp)
jmp 0x515e
movq -0xd80(%rbp), %rdi
leaq 0xbfa3(%rip), %rsi      # 0x1110f
callq 0x3290
movq %rax, -0xd88(%rbp)
jmp 0x517a
movq -0xd88(%rbp), %rdi
movl -0x300(%rbp), %esi
callq 0x3520
movq %rax, -0xd90(%rbp)
jmp 0x5195
movq -0xd90(%rbp), %rdi
leaq 0xbe99(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xd98(%rbp)
jmp 0x51b1
movq -0xd98(%rbp), %rdi
leaq 0xc02f(%rip), %rsi      # 0x111ee
callq 0x3290
movq %rax, -0xda0(%rbp)
jmp 0x51cd
movq -0xda0(%rbp), %rdi
leaq 0xbe5b(%rip), %rsi      # 0x11036
callq 0x3290
movq %rax, -0xda8(%rbp)
jmp 0x51e9
movq -0xda8(%rbp), %rdi
movq -0xcb0(%rbp), %rsi
addq $0x78, %rsi
callq 0x3230
movq %rax, -0xdb0(%rbp)
jmp 0x5209
movq -0xdb0(%rbp), %rdi
leaq 0xbe25(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xdb8(%rbp)
jmp 0x5225
movq -0xdb8(%rbp), %rdi
leaq 0xbff3(%rip), %rsi      # 0x11226
callq 0x3290
movq %rax, -0xdc0(%rbp)
jmp 0x5241
movq -0xdc0(%rbp), %rdi
leaq 0xbde1(%rip), %rsi      # 0x11030
callq 0x3290
movq %rax, -0xdc8(%rbp)
jmp 0x525d
movq -0xdc8(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x3230
movq %rax, -0xdd0(%rbp)
jmp 0x5276
movq -0xdd0(%rbp), %rdi
leaq 0xbdb8(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xdd8(%rbp)
jmp 0x5292
movq -0xdd8(%rbp), %rdi
leaq 0xc029(%rip), %rsi      # 0x112c9
callq 0x3290
movq %rax, -0xde0(%rbp)
jmp 0x52ae
movq -0xde0(%rbp), %rdi
movq 0x12d04(%rip), %rsi     # 0x17fc0
callq 0x32b0
movq %rax, -0xde8(%rbp)
jmp 0x52ca
movq -0xde8(%rbp), %rdi
leaq 0xbf1b(%rip), %rsi      # 0x111f3
callq 0x3290
movq %rax, -0xdf0(%rbp)
jmp 0x52e6
movq -0xdf0(%rbp), %rdi
leaq 0xbe1b(%rip), %rsi      # 0x1110f
callq 0x3290
movq %rax, -0xdf8(%rbp)
jmp 0x5302
movq -0xdf8(%rbp), %rdi
movq -0xcb0(%rbp), %rax
movl 0xac(%rax), %esi
movl -0x300(%rbp), %eax
subl %eax, %esi
callq 0x3520
movq %rax, -0xe00(%rbp)
jmp 0x532c
movq -0xe00(%rbp), %rdi
leaq 0xbd02(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xe08(%rbp)
jmp 0x5348
movq -0xe08(%rbp), %rdi
leaq 0xbea9(%rip), %rsi      # 0x111ff
callq 0x3290
movq %rax, -0xe10(%rbp)
jmp 0x5364
movq -0xe10(%rbp), %rdi
movq 0x12c4e(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x5379
leaq -0x4f8(%rbp), %rdi
leaq -0x4d8(%rbp), %rsi
callq 0x3280
jmp 0x538e
leaq -0x519(%rbp), %rdi
movq %rdi, -0xe18(%rbp)
callq 0x3540
movq -0xe18(%rbp), %rdx
leaq 0xbc8d(%rip), %rsi      # 0x1103c
leaq -0x518(%rbp), %rdi
callq 0x33a0
jmp 0x53bd
leaq -0x4f8(%rbp), %rdi
leaq -0x518(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x53e2
leaq -0x518(%rbp), %rdi
callq 0x31b0
leaq -0x519(%rbp), %rdi
callq 0x32d0
leaq -0x4f8(%rbp), %rdi
callq 0x31b0
movq -0xcb0(%rbp), %rax
movl -0x300(%rbp), %edx
movl 0xac(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xac(%rax)
leaq -0x4d8(%rbp), %rdi
callq 0x31e0
jmp 0x547b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5455
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x518(%rbp), %rdi
callq 0x31b0
leaq -0x519(%rbp), %rdi
callq 0x32d0
leaq -0x4f8(%rbp), %rdi
callq 0x31b0
leaq -0x4d8(%rbp), %rdi
callq 0x31e0
jmp 0x549e
movl $0x0, -0x6c(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x8560
movl -0x6c(%rbp), %eax
testl %eax, %eax
je 0x5499
jmp 0x5494
jmp 0x66be
jmp 0x5e7f
leaq -0x58(%rbp), %rdi
callq 0x8560
jmp 0x66ca
leaq -0x6a8(%rbp), %rdi
callq 0x31d0
leaq -0x698(%rbp), %rdi
leaq 0xbb70(%rip), %rsi      # 0x11036
callq 0x3290
movq %rax, -0xe20(%rbp)
jmp 0x54d4
movq -0xe20(%rbp), %rdi
movq -0xcb0(%rbp), %rsi
addq $0x78, %rsi
callq 0x3230
movq %rax, -0xe28(%rbp)
jmp 0x54f4
movq -0xe28(%rbp), %rdi
leaq 0xbb3a(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xe30(%rbp)
jmp 0x5510
movq -0xe30(%rbp), %rdi
leaq 0xbce6(%rip), %rsi      # 0x11204
callq 0x3290
jmp 0x5525
leaq -0x6c8(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0x3280
jmp 0x553a
leaq -0x6e9(%rbp), %rdi
movq %rdi, -0xe38(%rbp)
callq 0x3540
movq -0xe38(%rbp), %rdx
leaq 0xbae1(%rip), %rsi      # 0x1103c
leaq -0x6e8(%rbp), %rdi
callq 0x33a0
jmp 0x5569
leaq -0x6c8(%rbp), %rdi
leaq -0x6e8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x558e
leaq -0x6e8(%rbp), %rdi
callq 0x31b0
leaq -0x6e9(%rbp), %rdi
callq 0x32d0
leaq -0x6c8(%rbp), %rdi
callq 0x31b0
callq 0x30c0
movl $0x2, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
setne %al
andb $0x1, %al
movb %al, -0x6ea(%rbp)
testb $0x1, -0x6ea(%rbp)
je 0x5d51
leaq -0x730(%rbp), %rdi
callq 0x8490
movb $0x0, -0x731(%rbp)
movb -0x731(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x55fe
jmp 0x5709
movq -0xcb0(%rbp), %rax
addq $0xc0, %rax
movq %rax, -0xe50(%rbp)
callq 0x30c0
movq -0xe50(%rbp), %rdi
cltq
movq %rax, -0xe48(%rbp)
callq 0x84b0
movq -0xe50(%rbp), %rdi
movq %rax, %rcx
movq -0xe48(%rbp), %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %rsi
callq 0x84d0
movq %rax, -0xe40(%rbp)
jmp 0x5653
movq -0xe40(%rbp), %rsi
leaq -0x730(%rbp), %rdi
callq 0x8510
jmp 0x5668
movq -0xcb0(%rbp), %rax
movl 0xa4(%rax), %eax
cmpl -0x708(%rbp), %eax
jl 0x5704
movq -0xcb0(%rbp), %rax
movl 0xa8(%rax), %eax
cmpl -0x704(%rbp), %eax
jl 0x5704
movb $0x1, -0x731(%rbp)
jmp 0x5704
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5e6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x56d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x6e8(%rbp), %rdi
callq 0x31b0
leaq -0x6e9(%rbp), %rdi
callq 0x32d0
leaq -0x6c8(%rbp), %rdi
callq 0x31b0
jmp 0x5e6e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5d40
jmp 0x55ed
movq -0xcb0(%rbp), %rax
movl -0x708(%rbp), %edx
movl 0xa4(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xa4(%rax)
movl -0x704(%rbp), %edx
movl 0xa8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0xa8(%rax)
movl -0x710(%rbp), %ecx
addl -0x70c(%rbp), %ecx
addl 0x98(%rax), %ecx
subl 0x24(%rax), %ecx
movl %ecx, -0x738(%rbp)
testb $0x1, 0xda(%rax)
je 0x5774
movq -0xcb0(%rbp), %rax
movl 0x28(%rax), %ecx
movl -0x738(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x738(%rbp)
cmpl $0x0, -0x738(%rbp)
jg 0x5933
leaq -0x698(%rbp), %rdi
leaq 0xb8a7(%rip), %rsi      # 0x11036
callq 0x3290
movq %rax, -0xe58(%rbp)
jmp 0x579d
movq -0xe58(%rbp), %rdi
movq -0xcb0(%rbp), %rsi
addq $0x78, %rsi
callq 0x3230
movq %rax, -0xe60(%rbp)
jmp 0x57bd
movq -0xe60(%rbp), %rdi
leaq 0xb871(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xe68(%rbp)
jmp 0x57d9
movq -0xe68(%rbp), %rdi
leaq 0xba2d(%rip), %rsi      # 0x11214
callq 0x3290
movq %rax, -0xe70(%rbp)
jmp 0x57f5
movq -0xe70(%rbp), %rdi
leaq 0xb82d(%rip), %rsi      # 0x11030
callq 0x3290
movq %rax, -0xe78(%rbp)
jmp 0x5811
movq -0xe78(%rbp), %rdi
leaq -0x730(%rbp), %rsi
callq 0x3230
movq %rax, -0xe80(%rbp)
jmp 0x582d
movq -0xe80(%rbp), %rdi
leaq 0xb801(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xe88(%rbp)
jmp 0x5849
movq -0xe88(%rbp), %rdi
leaq 0xb9d6(%rip), %rsi      # 0x1122d
callq 0x3290
jmp 0x585e
leaq -0x758(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0x3280
jmp 0x5873
leaq -0x779(%rbp), %rdi
movq %rdi, -0xe90(%rbp)
callq 0x3540
movq -0xe90(%rbp), %rdx
leaq 0xb7a8(%rip), %rsi      # 0x1103c
leaq -0x778(%rbp), %rdi
callq 0x33a0
jmp 0x58a2
leaq -0x758(%rbp), %rdi
leaq -0x778(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x58c7
leaq -0x778(%rbp), %rdi
callq 0x31b0
leaq -0x779(%rbp), %rdi
callq 0x32d0
leaq -0x758(%rbp), %rdi
callq 0x31b0
jmp 0x5d2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5916
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x778(%rbp), %rdi
callq 0x31b0
leaq -0x779(%rbp), %rdi
callq 0x32d0
leaq -0x758(%rbp), %rdi
callq 0x31b0
jmp 0x5d40
movb $0x0, -0x77a(%rbp)
callq 0x30c0
movl $0x64, %ecx
cltd
idivl %ecx
cmpl $0x5, %edx
jge 0x5961
movb $0x1, -0x77a(%rbp)
movl -0x738(%rbp), %eax
shll %eax
movl %eax, -0x738(%rbp)
leaq -0x7a1(%rbp), %rdi
movq %rdi, -0xe98(%rbp)
callq 0x3540
movq -0xe98(%rbp), %rdx
leaq 0xb902(%rip), %rsi      # 0x11284
leaq -0x7a0(%rbp), %rdi
callq 0x33a0
jmp 0x5990
leaq -0x6a8(%rbp), %rdi
leaq -0x7a0(%rbp), %rsi
callq 0x3310
jmp 0x59a5
leaq -0x7a0(%rbp), %rdi
callq 0x31b0
leaq -0x7a1(%rbp), %rdi
callq 0x32d0
movq -0x6a8(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x6a8(%rbp,%rax), %rdi
xorl %esi, %esi
callq 0x3500
jmp 0x59d9
testb $0x1, -0x77a(%rbp)
je 0x5a30
leaq -0x698(%rbp), %rdi
leaq 0xb84f(%rip), %rsi      # 0x1123f
callq 0x3290
jmp 0x59f7
jmp 0x5a30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5a1f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x7a0(%rbp), %rdi
callq 0x31b0
leaq -0x7a1(%rbp), %rdi
callq 0x32d0
jmp 0x5d40
leaq -0x698(%rbp), %rdi
leaq 0xb5f8(%rip), %rsi      # 0x11036
callq 0x3290
movq %rax, -0xea0(%rbp)
jmp 0x5a4c
movq -0xea0(%rbp), %rdi
movq -0xcb0(%rbp), %rsi
addq $0x78, %rsi
callq 0x3230
movq %rax, -0xea8(%rbp)
jmp 0x5a6c
movq -0xea8(%rbp), %rdi
leaq 0xb5c2(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xeb0(%rbp)
jmp 0x5a88
movq -0xeb0(%rbp), %rdi
leaq 0xb7bf(%rip), %rsi      # 0x11255
callq 0x3290
movq %rax, -0xeb8(%rbp)
jmp 0x5aa4
movq -0xeb8(%rbp), %rdi
leaq 0xb65d(%rip), %rsi      # 0x1110f
callq 0x3290
movq %rax, -0xec0(%rbp)
jmp 0x5ac0
movq -0xec0(%rbp), %rdi
movl -0x738(%rbp), %esi
callq 0x3520
movq %rax, -0xec8(%rbp)
jmp 0x5adb
movq -0xec8(%rbp), %rdi
leaq 0xb553(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xed0(%rbp)
jmp 0x5af7
movq -0xed0(%rbp), %rdi
leaq 0xb721(%rip), %rsi      # 0x11226
callq 0x3290
movq %rax, -0xed8(%rbp)
jmp 0x5b13
movq -0xed8(%rbp), %rdi
leaq 0xb50f(%rip), %rsi      # 0x11030
callq 0x3290
movq %rax, -0xee0(%rbp)
jmp 0x5b2f
movq -0xee0(%rbp), %rdi
leaq -0x730(%rbp), %rsi
callq 0x3230
movq %rax, -0xee8(%rbp)
jmp 0x5b4b
movq -0xee8(%rbp), %rdi
leaq 0xb4e3(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xef0(%rbp)
jmp 0x5b67
movq -0xef0(%rbp), %rdi
leaq 0xb754(%rip), %rsi      # 0x112c9
callq 0x3290
movq %rax, -0xef8(%rbp)
jmp 0x5b83
movq -0xef8(%rbp), %rdi
movq 0x1242f(%rip), %rsi     # 0x17fc0
callq 0x32b0
movq %rax, -0xf00(%rbp)
jmp 0x5b9f
movq -0xf00(%rbp), %rdi
leaq 0xb6b4(%rip), %rsi      # 0x11261
callq 0x3290
movq %rax, -0xf08(%rbp)
jmp 0x5bbb
movq -0xf08(%rbp), %rdi
leaq 0xb546(%rip), %rsi      # 0x1110f
callq 0x3290
movq %rax, -0xf10(%rbp)
jmp 0x5bd7
movq -0xf10(%rbp), %rdi
movq -0xcb0(%rbp), %rax
movl 0x34(%rax), %esi
movl -0x738(%rbp), %eax
subl %eax, %esi
callq 0x3520
movq %rax, -0xf18(%rbp)
jmp 0x5bfe
movq -0xf18(%rbp), %rdi
leaq 0xb430(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xf20(%rbp)
jmp 0x5c1a
movq -0xf20(%rbp), %rdi
leaq 0xb5d7(%rip), %rsi      # 0x111ff
callq 0x3290
movq %rax, -0xf28(%rbp)
jmp 0x5c36
movq -0xf28(%rbp), %rdi
movq 0x1237c(%rip), %rsi     # 0x17fc0
callq 0x32b0
jmp 0x5c4b
leaq -0x7c8(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0x3280
jmp 0x5c60
leaq -0x7e9(%rbp), %rdi
movq %rdi, -0xf30(%rbp)
callq 0x3540
movq -0xf30(%rbp), %rdx
leaq 0xb3bb(%rip), %rsi      # 0x1103c
leaq -0x7e8(%rbp), %rdi
callq 0x33a0
jmp 0x5c8f
leaq -0x7c8(%rbp), %rdi
leaq -0x7e8(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x5cb4
leaq -0x7e8(%rbp), %rdi
callq 0x31b0
leaq -0x7e9(%rbp), %rdi
callq 0x32d0
leaq -0x7c8(%rbp), %rdi
callq 0x31b0
movq -0xcb0(%rbp), %rax
movl -0x738(%rbp), %edx
movl 0x34(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x34(%rax)
jmp 0x5d2f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5d15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x7e8(%rbp), %rdi
callq 0x31b0
leaq -0x7e9(%rbp), %rdi
callq 0x32d0
leaq -0x7c8(%rbp), %rdi
callq 0x31b0
jmp 0x5d40
leaq -0x730(%rbp), %rdi
callq 0x8560
jmp 0x5e60
leaq -0x730(%rbp), %rdi
callq 0x8560
jmp 0x5e6e
leaq -0x811(%rbp), %rdi
movq %rdi, -0xf38(%rbp)
callq 0x3540
movq -0xf38(%rbp), %rdx
leaq 0xb4fd(%rip), %rsi      # 0x1126f
leaq -0x810(%rbp), %rdi
callq 0x33a0
jmp 0x5d80
leaq -0x839(%rbp), %rdi
movq %rdi, -0xf40(%rbp)
callq 0x3540
movq -0xf40(%rbp), %rdx
leaq 0xb29b(%rip), %rsi      # 0x1103c
leaq -0x838(%rbp), %rdi
callq 0x33a0
jmp 0x5daf
leaq -0x810(%rbp), %rdi
leaq -0x838(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x5dd4
leaq -0x838(%rbp), %rdi
callq 0x31b0
leaq -0x839(%rbp), %rdi
callq 0x32d0
leaq -0x810(%rbp), %rdi
callq 0x31b0
leaq -0x811(%rbp), %rdi
callq 0x32d0
jmp 0x5e60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5e52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5e3a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x838(%rbp), %rdi
callq 0x31b0
leaq -0x839(%rbp), %rdi
callq 0x32d0
leaq -0x810(%rbp), %rdi
callq 0x31b0
leaq -0x811(%rbp), %rdi
callq 0x32d0
jmp 0x5e6e
leaq -0x6a8(%rbp), %rdi
callq 0x31e0
jmp 0x5e7f
leaq -0x6a8(%rbp), %rdi
callq 0x31e0
jmp 0x66ca
movq -0xcb0(%rbp), %rax
cmpl $0x0, 0xac(%rax)
jg 0x6584
leaq -0x861(%rbp), %rdi
movq %rdi, -0xf48(%rbp)
callq 0x3540
movq -0xf48(%rbp), %rdx
leaq 0xb3d1(%rip), %rsi      # 0x11285
leaq -0x860(%rbp), %rdi
callq 0x33a0
jmp 0x5ec2
leaq -0x889(%rbp), %rdi
movq %rdi, -0xf50(%rbp)
callq 0x3540
movq -0xf50(%rbp), %rdx
leaq 0xb159(%rip), %rsi      # 0x1103c
leaq -0x888(%rbp), %rdi
callq 0x33a0
jmp 0x5ef1
leaq -0x860(%rbp), %rdi
leaq -0x888(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x5f16
leaq -0x888(%rbp), %rdi
callq 0x31b0
leaq -0x889(%rbp), %rdi
callq 0x32d0
leaq -0x860(%rbp), %rdi
callq 0x31b0
leaq -0x861(%rbp), %rdi
callq 0x32d0
movq -0xcb0(%rbp), %rcx
movb $0x1, 0xd8(%rcx)
movl 0x3c(%rcx), %eax
addl 0xb0(%rcx), %eax
cmpl 0x40(%rcx), %eax
jge 0x5fd7
movq -0xcb0(%rbp), %rax
movl 0xb0(%rax), %ecx
addl 0x3c(%rax), %ecx
movl %ecx, 0x3c(%rax)
jmp 0x61f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5fc6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x5fae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x888(%rbp), %rdi
callq 0x31b0
leaq -0x889(%rbp), %rdi
callq 0x32d0
leaq -0x860(%rbp), %rdi
callq 0x31b0
leaq -0x861(%rbp), %rdi
callq 0x32d0
jmp 0x66ca
movq -0xcb0(%rbp), %rcx
movl 0x3c(%rcx), %eax
addl 0xb0(%rcx), %eax
cmpl 0x40(%rcx), %eax
jl 0x61f0
leaq -0xa18(%rbp), %rdi
callq 0x31d0
leaq -0xa08(%rbp), %rdi
leaq 0xb284(%rip), %rsi      # 0x1128e
callq 0x3290
movq %rax, -0xf58(%rbp)
jmp 0x6018
movq -0xf58(%rbp), %rdi
leaq 0xb00a(%rip), %rsi      # 0x11030
callq 0x3290
movq %rax, -0xf60(%rbp)
jmp 0x6034
movq -0xf60(%rbp), %rdi
movq -0xcb0(%rbp), %rax
movl 0x38(%rax), %esi
incl %esi
callq 0x3520
movq %rax, -0xf68(%rbp)
jmp 0x6055
movq -0xf68(%rbp), %rdi
leaq 0xafd9(%rip), %rsi      # 0x1103c
callq 0x3290
movq %rax, -0xf70(%rbp)
jmp 0x6071
movq -0xf70(%rbp), %rdi
leaq 0xb231(%rip), %rsi      # 0x112b0
callq 0x3290
jmp 0x6086
movq -0xcb0(%rbp), %rax
movl 0x3c(%rax), %edx
movl 0x40(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x3c(%rax)
leaq -0xa38(%rbp), %rdi
leaq -0xa18(%rbp), %rsi
callq 0x3280
jmp 0x60ad
leaq -0xa59(%rbp), %rdi
movq %rdi, -0xf78(%rbp)
callq 0x3540
movq -0xf78(%rbp), %rdx
leaq 0xaf6e(%rip), %rsi      # 0x1103c
leaq -0xa58(%rbp), %rdi
callq 0x33a0
jmp 0x60dc
leaq -0xa38(%rbp), %rdi
leaq -0xa58(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x6101
leaq -0xa58(%rbp), %rdi
callq 0x31b0
leaq -0xa59(%rbp), %rdi
callq 0x32d0
leaq -0xa38(%rbp), %rdi
callq 0x31b0
movq -0xcb0(%rbp), %rax
movl 0x38(%rax), %ecx
incl %ecx
movl %ecx, 0x38(%rax)
movl 0x40(%rax), %ecx
addl %ecx, %ecx
movl %ecx, 0x40(%rax)
leaq -0xad8(%rbp), %rdi
callq 0xe1d0
jmp 0x614a
movq -0xcb0(%rbp), %rdi
leaq -0xad8(%rbp), %rsi
callq 0x71a0
jmp 0x615f
leaq -0xad8(%rbp), %rdi
callq 0x8170
leaq -0xa18(%rbp), %rdi
callq 0x31e0
jmp 0x61f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x61df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x61ad
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xa58(%rbp), %rdi
callq 0x31b0
leaq -0xa59(%rbp), %rdi
callq 0x32d0
leaq -0xa38(%rbp), %rdi
callq 0x31b0
jmp 0x61df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xad8(%rbp), %rdi
callq 0x8170
leaq -0xa18(%rbp), %rdi
callq 0x31e0
jmp 0x66ca
jmp 0x61f2
leaq -0xb18(%rbp), %rdi
callq 0x8580
movb $0x0, -0xb19(%rbp)
movb -0xb19(%rbp), %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x6216
jmp 0x62b2
callq 0x30c0
movl %eax, -0xf80(%rbp)
callq 0xcde0
movl %eax, -0xf7c(%rbp)
jmp 0x622e
movl -0xf7c(%rbp), %ecx
movl -0xf80(%rbp), %eax
cltd
idivl %ecx
movl %edx, %esi
leaq -0xb60(%rbp), %rdi
callq 0xd1e0
jmp 0x624d
leaq -0xb18(%rbp), %rdi
leaq -0xb60(%rbp), %rsi
callq 0x85a0
leaq -0xb60(%rbp), %rdi
callq 0x85f0
movq -0xcb0(%rbp), %rax
movl 0x38(%rax), %eax
cmpl -0xae4(%rbp), %eax
jl 0x6290
movq -0xcb0(%rbp), %rax
movl 0x38(%rax), %eax
cmpl -0xae0(%rbp), %eax
jle 0x62a6
jmp 0x6205
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6573
movb $0x1, -0xb19(%rbp)
jmp 0x6205
movq -0xcb0(%rbp), %rdi
addq $0x60, %rdi
leaq -0xb18(%rbp), %rsi
callq 0x8610
jmp 0x62cb
leaq -0xc01(%rbp), %rdi
movq %rdi, -0xf88(%rbp)
callq 0x3540
movq -0xf88(%rbp), %rdx
leaq 0xafca(%rip), %rsi      # 0x112b6
leaq -0xc00(%rbp), %rdi
callq 0x33a0
jmp 0x62fa
leaq 0xad2f(%rip), %rdx      # 0x11030
leaq -0xbe0(%rbp), %rdi
leaq -0xc00(%rbp), %rsi
callq 0x8280
jmp 0x6316
leaq -0xbc0(%rbp), %rdi
leaq -0xbe0(%rbp), %rsi
leaq -0xb18(%rbp), %rdx
callq 0x8680
jmp 0x6332
leaq 0xad03(%rip), %rdx      # 0x1103c
leaq -0xba0(%rbp), %rdi
leaq -0xbc0(%rbp), %rsi
callq 0x8280
jmp 0x634e
leaq -0xc29(%rbp), %rdi
movq %rdi, -0xf90(%rbp)
callq 0x3540
movq -0xf90(%rbp), %rdx
leaq 0xaf5a(%rip), %rsi      # 0x112c9
leaq -0xc28(%rbp), %rdi
callq 0x33a0
jmp 0x637d
leaq -0xb80(%rbp), %rdi
leaq -0xba0(%rbp), %rsi
leaq -0xc28(%rbp), %rdx
callq 0x81b0
jmp 0x6399
leaq -0xc51(%rbp), %rdi
movq %rdi, -0xf98(%rbp)
callq 0x3540
movq -0xf98(%rbp), %rdx
leaq 0xac82(%rip), %rsi      # 0x1103c
leaq -0xc50(%rbp), %rdi
callq 0x33a0
jmp 0x63c8
leaq -0xb80(%rbp), %rdi
leaq -0xc50(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x63ed
leaq -0xc50(%rbp), %rdi
callq 0x31b0
leaq -0xc51(%rbp), %rdi
callq 0x32d0
leaq -0xb80(%rbp), %rdi
callq 0x31b0
leaq -0xc28(%rbp), %rdi
callq 0x31b0
leaq -0xc29(%rbp), %rdi
callq 0x32d0
leaq -0xba0(%rbp), %rdi
callq 0x31b0
leaq -0xbc0(%rbp), %rdi
callq 0x31b0
leaq -0xbe0(%rbp), %rdi
callq 0x31b0
leaq -0xc00(%rbp), %rdi
callq 0x31b0
leaq -0xc01(%rbp), %rdi
callq 0x32d0
movq -0xcb0(%rbp), %rdi
callq 0x6f40
jmp 0x6473
leaq -0xb18(%rbp), %rdi
callq 0x85f0
jmp 0x6584
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6567
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x655b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x654f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6543
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x652b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x651f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6507
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc50(%rbp), %rdi
callq 0x31b0
leaq -0xc51(%rbp), %rdi
callq 0x32d0
leaq -0xb80(%rbp), %rdi
callq 0x31b0
leaq -0xc28(%rbp), %rdi
callq 0x31b0
leaq -0xc29(%rbp), %rdi
callq 0x32d0
leaq -0xba0(%rbp), %rdi
callq 0x31b0
leaq -0xbc0(%rbp), %rdi
callq 0x31b0
leaq -0xbe0(%rbp), %rdi
callq 0x31b0
leaq -0xc00(%rbp), %rdi
callq 0x31b0
leaq -0xc01(%rbp), %rdi
callq 0x32d0
leaq -0xb18(%rbp), %rdi
callq 0x85f0
jmp 0x66ca
movq -0xcb0(%rbp), %rax
cmpl $0x0, 0x34(%rax)
jg 0x66b7
leaq -0xc79(%rbp), %rdi
movq %rdi, -0xfa0(%rbp)
callq 0x3540
movq -0xfa0(%rbp), %rdx
leaq 0xad0b(%rip), %rsi      # 0x112c1
leaq -0xc78(%rbp), %rdi
callq 0x33a0
jmp 0x65c4
leaq -0xca1(%rbp), %rdi
movq %rdi, -0xfa8(%rbp)
callq 0x3540
movq -0xfa8(%rbp), %rdx
leaq 0xaa57(%rip), %rsi      # 0x1103c
leaq -0xca0(%rbp), %rdi
callq 0x33a0
jmp 0x65f3
leaq -0xc78(%rbp), %rdi
leaq -0xca0(%rbp), %rsi
movl $0x23, %edx
movl $0x12c, %ecx            # imm = 0x12C
movl $0x1, %r8d
callq 0x10e00
jmp 0x6618
leaq -0xca0(%rbp), %rdi
callq 0x31b0
leaq -0xca1(%rbp), %rdi
callq 0x32d0
leaq -0xc78(%rbp), %rdi
callq 0x31b0
leaq -0xc79(%rbp), %rdi
callq 0x32d0
movq -0xcb0(%rbp), %rax
movb $0x1, 0xd8(%rax)
xorl %edi, %edi
callq 0x3350
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x66a9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x6691
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xca0(%rbp), %rdi
callq 0x31b0
leaq -0xca1(%rbp), %rdi
callq 0x32d0
leaq -0xc78(%rbp), %rdi
callq 0x31b0
leaq -0xc79(%rbp), %rdi
callq 0x32d0
jmp 0x66ca
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xfb0, %rsp            # imm = 0xFB0
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x3530
nopw %cs:(%rax,%rax)