// File: /workspace/github_cpp_makefile_star2_O2/kaiming[P]Chamber-Crawler-3k/Board/board.cc
// Function: Board::attackEnemy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
std::string Board::attackEnemy(std::string direction) {
    std::shared_ptr<WalkableTile> target = validDest(player, direction);
    std::string message = "";

    // Check if valid destination
    if (target == nullptr) {
        return "Invalid Attack Target. ";
    }

    // Check if destination is occupied by an enemy
    if (target->getOccupant() != nullptr) {
        std::string merchantStatus = "";

        // Check if target is merchant, if merchants are not hostile
        if (!merchantAgro && std::dynamic_pointer_cast<Merchant>(target->getOccupant())) {
            // Merchants are now hostile
            merchantAgro = true;
            merchantStatus = "Merchants are now hostile. ";
        }

        // Begin attack sequence and store resulting enemy state
        double enemyOgHP = target->getOccupant()->getHP();
        bool EnemyKilled = std::dynamic_pointer_cast<Enemy>(target->getOccupant())->getAttacked(*(std::dynamic_pointer_cast<Player>(player->getOccupant())));
    
        if (EnemyKilled) {
            // Enemy killed, determine Enemy type to generate gold dropped

            // Check if target is dragon
            if (target->getOccupant()->getRace() == "Dragon") {
                // Dragon Type, drop nothing
                
                // Remove this dragon from dragons
                for (auto it = dragonHoards[floorNum-1].begin(); it != dragonHoards[floorNum-1].end(); ++it) {
                    if (std::dynamic_pointer_cast<DragonHoard>((*it)->getGold())->getDragon() == target->getOccupant()) {
                        std::dynamic_pointer_cast<DragonHoard>((*it)->getGold())->getDragon()->setState(false);
                    }
                }
                
                message = "Dragon killed. " + merchantStatus;

                // Remove enemy + move player to old spot
                target->setOccupant(nullptr);
                player = player->move(target);

            } else {
                
                std::string eRace = target->getOccupant()->getRace();
                message = eRace + " killed. ";

                // Check if target is human or merchant
                if (target->getOccupant()->getRace() == "Human") {
                    // Human type, drop 2 Normal Piles
                    playerPtr->setGold(playerPtr->getGold() + 2);
                    message += "Normal hoard picked up. ";

                    // RNG a second pile nearby
                    std::shared_ptr<WalkableTile> destination = nullptr;
                    std::vector<std::string> directions;
                    directions.push_back("no");
                    directions.push_back("ea");
                    directions.push_back("so");
                    directions.push_back("we");
                    directions.push_back("ne");
                    directions.push_back("nw");
                    directions.push_back("se");
                    directions.push_back("sw");
                    int i = 0;

                    do {
                        // Exit case in event that no suitable location found
                        if (i > 80) {
                            destination = nullptr;
                            break;
                        } else {
                            i++;
                        }
                        
                        int rng = std::rand() % directions.size();

                        destination = validDest(target, directions[rng]);

                    } while (!destination || !isUnoccupied(destination)); 

                    destination->setGold(std::make_shared<Gold>("Normal Hoard", 2));

                } else if (target->getOccupant()->getRace() == "Merchant") {
                    // Merchant Type, drop Merchant Hoard
                    playerPtr->setGold(playerPtr->getGold() + 4);
                    message += "Merchant Hoard picked up. ";

                } else {
                    // Other type, RNG gold
                    if (std::rand() % 2 == 0) {
                        // Small pile
                        playerPtr->setGold(playerPtr->getGold() + 1);
                        message += "Small Hoard picked up. ";
                    } else {
                        // Normal pile
                        playerPtr->setGold(playerPtr->getGold() + 2);
                        message += "Normal Hoard picked up. ";
                    }
                }

                message += merchantStatus;

                // Remove this enemy from enemies
                for (auto it = enemies[floorNum-1].begin(); it != enemies[floorNum-1].end(); ++it) {
                    if ((*it)->getOccupant() == target->getOccupant()) {
                        enemies[floorNum-1].erase(it); 
                    }
                }

                // Remove enemy + move player to old spot
                target->setOccupant(nullptr);
                player = player->move(target);
                
            }

        } else {
            std::stringstream dealt, left;
            dealt << std::fixed << std::setprecision(2) << enemyOgHP - target->getOccupant()->getHP();
            left << std::fixed << std::setprecision(2) << target->getOccupant()->getHP();

            message = target->getOccupant()->getRace() + " attacked for " + dealt.str() + "HP (" + left.str() + "HP remaining). "  + merchantStatus;
        }
    } else {
        message = "No Enemy to Attack. ";
    }

    return message;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x578, %rsp            # imm = 0x578
movq %rdx, %r14
movq %rsi, %r13
movq %rdi, %r15
leaq 0xb8(%rsi), %r12
leaq 0xd0(%rsp), %rdi
movq %r12, %rsi
callq 0x7500
leaq 0xd8(%rsp), %rbx
leaq 0x3b0(%rsp), %rdi
movq %r14, %rsi
callq 0x52b0
leaq 0x20(%rsp), %rdi
leaq 0xd0(%rsp), %rdx
leaq 0x3b0(%rsp), %rcx
movq %r13, 0x38(%rsp)
movq %r13, %rsi
callq 0xdb38
leaq 0x3b0(%rsp), %rdi
callq 0x5100
leaq 0xd8(%rsp), %rdi
callq 0x6c00
leaq 0x9bab(%rip), %rsi      # 0x18e8f
leaq 0x68(%rsp), %rdi
leaq 0x3d0(%rsp), %rdx
callq 0x67bc
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0xf60e
leaq 0x3d0(%rsp), %rdi
callq 0x17424
leaq 0x3d8(%rsp), %rdi
movq -0x8(%rdi), %rbx
callq 0x6c00
testq %rbx, %rbx
je 0xf62a
leaq 0x9b5d(%rip), %rsi      # 0x18e8f
leaq 0xe0(%rsp), %rdi
leaq 0x3d0(%rsp), %rdx
callq 0x67bc
movq 0x38(%rsp), %rax
cmpb $0x0, 0x10c(%rax)
jne 0xf3c1
movq 0x20(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x17424
leaq 0x3d0(%rsp), %rbx
leaq 0x100(%rsp), %rsi
movq %rbx, %rdi
callq 0x12574
movq (%rbx), %rbx
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
testq %rbx, %rbx
je 0xf3c1
movq 0x38(%rsp), %rax
movb $0x1, 0x10c(%rax)
leaq 0x9a11(%rip), %rsi      # 0x18dc5
leaq 0xe0(%rsp), %rdi
callq 0x53d0
movq 0x20(%rsp), %rsi
leaq 0x3d0(%rsp), %rdi
callq 0x17424
movq 0x3d0(%rsp), %rdi
callq 0x135da
movsd %xmm0, 0x30(%rsp)
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
movq 0x20(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x17424
leaq 0x3d0(%rsp), %rbx
leaq 0x100(%rsp), %rsi
movq %rbx, %rdi
callq 0x125c9
movq (%rbx), %rbx
movq (%r12), %rsi
leaq 0x40(%rsp), %rdi
callq 0x17424
movq %rsp, %r14
leaq 0x40(%rsp), %rsi
movq %r14, %rdi
callq 0x12494
movq (%r14), %rsi
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
movl %eax, %ebx
leaq 0x8(%rsp), %rdi
callq 0x6c00
leaq 0x48(%rsp), %rdi
callq 0x6c00
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
testb %bl, %bl
je 0xf640
movq 0x20(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x17424
movq %r12, 0x88(%rsp)
movq %r15, 0x30(%rsp)
movq 0x100(%rsp), %rsi
movq (%rsi), %rax
leaq 0x3d0(%rsp), %rdi
callq *(%rax)
leaq 0x9924(%rip), %rsi      # 0x18de1
leaq 0x3d0(%rsp), %rbx
movq %rbx, %rdi
callq 0x6801
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5100
leaq 0x108(%rsp), %rdi
callq 0x6c00
testb %bpl, %bpl
movq 0x38(%rsp), %r15
je 0xf8c0
movslq 0x108(%r15), %rax
movq 0x70(%r15), %rcx
imulq $0x18, %rax, %rdx
movq -0x18(%rcx,%rdx), %r14
movq %rsp, %rbp
leaq 0x3d0(%rsp), %r13
cltq
imulq $0x18, %rax, %rax
cmpq -0x10(%rcx,%rax), %r14
je 0xfc6d
movq (%r14), %rsi
movq %rbp, %rdi
callq 0x1745c
leaq 0x100(%rsp), %rdi
movq %rbp, %rsi
callq 0x1243f
movq 0x100(%rsp), %rsi
movq %r13, %rdi
callq 0x151f8
movq 0x20(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0x17424
movq 0x3d0(%rsp), %rbx
movq 0x40(%rsp), %r12
leaq 0x48(%rsp), %rdi
callq 0x6c00
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
leaq 0x8(%rsp), %rdi
callq 0x6c00
cmpq %r12, %rbx
jne 0xf5fa
movq (%r14), %rsi
movq %rbp, %rdi
callq 0x1745c
leaq 0x100(%rsp), %rdi
movq %rbp, %rsi
callq 0x1243f
movq 0x100(%rsp), %rsi
movq %r13, %rdi
callq 0x151f8
movq 0x3d0(%rsp), %rdi
xorl %esi, %esi
callq 0x13644
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
leaq 0x8(%rsp), %rdi
callq 0x6c00
addq $0x10, %r14
movl 0x108(%r15), %eax
movq 0x70(%r15), %rcx
jmp 0xf511
leaq 0x9798(%rip), %rsi      # 0x18dad
leaq 0x3d0(%rsp), %rdx
movq %r15, %rdi
callq 0x67bc
jmp 0x1001e
leaq 0x985f(%rip), %rsi      # 0x18e90
leaq 0x68(%rsp), %rdi
callq 0x53d0
jmp 0xffda
leaq 0x3d0(%rsp), %rdi
callq 0x5160
leaq 0x100(%rsp), %rdi
callq 0x5160
movq 0x3e0(%rsp), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x3f8(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x3f8(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x3e8(%rsp,%rax)
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x17424
movq (%rsp), %rdi
callq 0x135da
leaq 0x3e0(%rsp), %rdi
movsd 0x30(%rsp), %xmm1
subsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x5320
leaq 0x8(%rsp), %rdi
callq 0x6c00
movq 0x110(%rsp), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x128(%rsp,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x128(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x118(%rsp,%rax)
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x17424
movq (%rsp), %rdi
callq 0x135da
leaq 0x110(%rsp), %rdi
callq 0x5320
leaq 0x8(%rsp), %rdi
callq 0x6c00
movq 0x20(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x17424
movq 0xb0(%rsp), %rsi
movq (%rsi), %rax
leaq 0x330(%rsp), %rdi
callq *(%rax)
leaq 0x9718(%rip), %rdx      # 0x18e6c
leaq 0x350(%rsp), %rdi
leaq 0x330(%rsp), %rsi
callq 0x123fc
leaq 0x3e8(%rsp), %rsi
leaq 0x310(%rsp), %rdi
callq 0x5300
leaq 0x370(%rsp), %rdi
leaq 0x350(%rsp), %rsi
leaq 0x310(%rsp), %rdx
callq 0x124e9
leaq 0x96d9(%rip), %rdx      # 0x18e7b
leaq 0x390(%rsp), %rdi
leaq 0x370(%rsp), %rsi
callq 0x123fc
leaq 0x118(%rsp), %rsi
leaq 0x2f0(%rsp), %rdi
callq 0x5300
leaq 0x90(%rsp), %rdi
leaq 0x390(%rsp), %rsi
leaq 0x2f0(%rsp), %rdx
callq 0x124e9
leaq 0x9690(%rip), %rdx      # 0x18e80
leaq 0x40(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0x123fc
movq %rsp, %rdi
leaq 0x40(%rsp), %rsi
leaq 0xe0(%rsp), %rdx
callq 0x12555
leaq 0x68(%rsp), %rdi
movq %rsp, %rbx
movq %rbx, %rsi
callq 0x5270
movq %rbx, %rdi
callq 0x5100
leaq 0x40(%rsp), %rdi
callq 0x5100
leaq 0x90(%rsp), %rdi
callq 0x5100
leaq 0x2f0(%rsp), %rdi
callq 0x5100
leaq 0x390(%rsp), %rdi
callq 0x5100
leaq 0x370(%rsp), %rdi
callq 0x5100
leaq 0x310(%rsp), %rdi
callq 0x5100
leaq 0x350(%rsp), %rdi
callq 0x5100
leaq 0x330(%rsp), %rdi
callq 0x5100
leaq 0xb8(%rsp), %rdi
callq 0x6c00
leaq 0x100(%rsp), %rdi
callq 0x5180
leaq 0x3d0(%rsp), %rdi
callq 0x5180
jmp 0xffcd
movq 0x20(%rsp), %rsi
leaq 0x100(%rsp), %rdi
callq 0x17424
movq 0x100(%rsp), %rsi
movq (%rsi), %rax
leaq 0x3d0(%rsp), %rdi
callq *(%rax)
leaq 0x108(%rsp), %rdi
callq 0x6c00
leaq 0x94f3(%rip), %rdx      # 0x18dee
leaq 0x100(%rsp), %rdi
leaq 0x3d0(%rsp), %rsi
callq 0x1261e
leaq 0x68(%rsp), %rdi
leaq 0x100(%rsp), %rbx
movq %rbx, %rsi
callq 0x5270
movq %rbx, %rdi
callq 0x5100
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x17424
movq (%rsp), %rsi
movq (%rsi), %rax
leaq 0x100(%rsp), %rdi
callq *(%rax)
leaq 0x94a6(%rip), %rsi      # 0x18df8
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
callq 0x6801
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5100
leaq 0x8(%rsp), %rdi
callq 0x6c00
testb %bpl, %bpl
je 0xfd35
movq 0xf8(%r15), %rbx
movq %rbx, %rdi
callq 0x15c44
addl $0x2, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x15c48
leaq 0x945c(%rip), %rsi      # 0x18dfe
leaq 0x68(%rsp), %rdi
callq 0x53c0
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, (%rsp)
andq $0x0, 0x10(%rsp)
leaq 0x8939(%rip), %rsi      # 0x18301
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x8906(%rip), %rsi      # 0x18307
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x88ca(%rip), %rsi      # 0x18304
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x8897(%rip), %rsi      # 0x1830a
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x8861(%rip), %rsi      # 0x1830d
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x882b(%rip), %rsi      # 0x18310
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x87f5(%rip), %rsi      # 0x18313
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %rdi
callq 0x5100
leaq 0x87bf(%rip), %rsi      # 0x18316
leaq 0x100(%rsp), %rdi
leaq 0x90(%rsp), %rdx
callq 0x67bc
movq %rsp, %rdi
leaq 0x100(%rsp), %rsi
callq 0x1269e
leaq 0x100(%rsp), %r14
movq %r14, %rdi
callq 0x5100
pushq $0x51
popq %r13
leaq 0x2d0(%rsp), %rbp
leaq 0x558(%rsp), %rbx
subl $0x1, %r13d
jb 0xfdaf
callq 0x5090
cltq
movq 0x8(%rsp), %rcx
subq (%rsp), %rcx
sarq $0x5, %rcx
xorl %edx, %edx
divq %rcx
movq %rdx, %r12
movq %rbp, %rdi
leaq 0x20(%rsp), %rsi
callq 0x7500
movslq %r12d, %rsi
shlq $0x5, %rsi
addq (%rsp), %rsi
movq %rbx, %rdi
callq 0x52b0
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0xdb38
leaq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0x12f92
leaq 0x108(%rsp), %rdi
callq 0x6c00
movq %rbx, %rdi
callq 0x5100
leaq 0x2d8(%rsp), %rdi
callq 0x6c00
cmpq $0x0, 0x40(%rsp)
je 0xfba0
leaq 0x2c0(%rsp), %r12
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0x7500
movq %r12, %rsi
callq 0xe256
movl %eax, %r12d
leaq 0x2c8(%rsp), %rdi
callq 0x6c00
testb %r12b, %r12b
je 0xfba0
jmp 0xfdd6
leaq 0x9174(%rip), %rsi      # 0x18de8
leaq 0x3d0(%rsp), %rdi
leaq 0xe0(%rsp), %rdx
callq 0x6867
leaq 0x68(%rsp), %rdi
leaq 0x3d0(%rsp), %rbx
movq %rbx, %rsi
callq 0x5270
movq %rbx, %rdi
callq 0x5100
movq 0x20(%rsp), %rdi
xorpd %xmm0, %xmm0
leaq 0x2a0(%rsp), %rsi
movapd %xmm0, (%rsi)
callq 0x17436
movq 0x30(%rsp), %r15
movq 0x88(%rsp), %r12
leaq 0x2a8(%rsp), %rdi
callq 0x6c00
movq (%r12), %rbx
leaq 0x2e0(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x7500
leaq 0x3d0(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1748a
leaq 0x3d0(%rsp), %rsi
movq %r12, %rdi
callq 0x12f92
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x2e8(%rsp), %rdi
callq 0x6c00
jmp 0xffcd
movq 0x20(%rsp), %rsi
movq %rsp, %rdi
callq 0x17424
movq (%rsp), %rsi
movq (%rsi), %rax
leaq 0x100(%rsp), %rdi
callq *(%rax)
leaq 0x90bd(%rip), %rsi      # 0x18e17
leaq 0x100(%rsp), %rbx
movq %rbx, %rdi
callq 0x6801
movl %eax, %ebp
movq %rbx, %rdi
callq 0x5100
leaq 0x8(%rsp), %rdi
callq 0x6c00
testb %bpl, %bpl
je 0xfe2e
movq 0xf8(%r15), %rbx
movq %rbx, %rdi
callq 0x15c44
addl $0x4, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x15c48
leaq 0x9076(%rip), %rsi      # 0x18e20
jmp 0xfe77
xorpd %xmm0, %xmm0
leaq 0x100(%rsp), %rsi
movapd %xmm0, (%rsi)
leaq 0x40(%rsp), %rdi
callq 0x12f92
leaq 0x108(%rsp), %rdi
callq 0x6c00
movq 0x40(%rsp), %rbx
leaq 0x100(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x87fa(%rip), %rsi      # 0x185ea
leaq 0xc0(%rsp), %rdi
callq 0x9c63
leaq 0xc0(%rsp), %rsi
movq %rbx, %rdi
callq 0x1746e
leaq 0xc8(%rsp), %rdi
callq 0x6c00
movq %rsp, %rdi
callq 0x6bde
leaq 0x48(%rsp), %rdi
callq 0x6c00
jmp 0xfe81
callq 0x5090
movq 0xf8(%r15), %rbx
testb $0x1, %al
jne 0xfe5b
movq %rbx, %rdi
callq 0x15c44
incl %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x15c48
leaq 0x8fe2(%rip), %rsi      # 0x18e3b
jmp 0xfe77
movq %rbx, %rdi
callq 0x15c44
addl $0x2, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x15c48
leaq 0x8fdc(%rip), %rsi      # 0x18e53
leaq 0x68(%rsp), %rdi
callq 0x53c0
leaq 0x68(%rsp), %rdi
leaq 0xe0(%rsp), %rsi
callq 0x53e0
movslq 0x108(%r15), %rax
movq 0x58(%r15), %rcx
imulq $0x18, %rax, %rdx
movq -0x18(%rcx,%rdx), %r14
leaq 0x8(%rsp), %r12
leaq 0x100(%rsp), %r13
movq %rsp, %rbp
cltq
imulq $0x18, %rax, %rax
cmpq -0x10(%rcx,%rax), %r14
je 0xff36
movq (%r14), %rsi
movq %r13, %rdi
callq 0x17424
movq 0x20(%rsp), %rsi
movq %rbp, %rdi
callq 0x17424
movq 0x100(%rsp), %rbx
movq (%rsp), %r15
movq %r12, %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
cmpq %r15, %rbx
movq 0x38(%rsp), %rbx
jne 0xff26
movslq 0x108(%rbx), %rax
movq 0x58(%rbx), %rcx
imulq $0x18, %rax, %rax
leaq (%rcx,%rax), %rdi
addq $-0x18, %rdi
movq %r14, %rsi
callq 0x12550
addq $0x10, %r14
movl 0x108(%rbx), %eax
movq 0x58(%rbx), %rcx
jmp 0xfeb7
movq 0x20(%rsp), %rdi
xorpd %xmm0, %xmm0
leaq 0x290(%rsp), %rsi
movapd %xmm0, (%rsi)
callq 0x17436
leaq 0x298(%rsp), %rdi
callq 0x6c00
movq 0x88(%rsp), %r12
movq (%r12), %rbx
leaq 0x2b0(%rsp), %r14
leaq 0x20(%rsp), %rsi
movq %r14, %rdi
callq 0x7500
leaq 0x100(%rsp), %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x1748a
movq 0x30(%rsp), %r15
leaq 0x100(%rsp), %rsi
movq %r12, %rdi
callq 0x12f92
leaq 0x108(%rsp), %rdi
callq 0x6c00
leaq 0x2b8(%rsp), %rdi
callq 0x6c00
leaq 0x3d0(%rsp), %rdi
callq 0x5100
leaq 0xe0(%rsp), %rdi
callq 0x5100
leaq 0x10(%r15), %rcx
movq %rcx, (%r15)
leaq 0x78(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0xfffd
movq %rdx, (%r15)
movq 0x78(%rsp), %rcx
movq %rcx, 0x10(%r15)
jmp 0x10005
movupd (%rax), %xmm0
movupd %xmm0, (%rcx)
movq 0x70(%rsp), %rcx
movq %rcx, 0x8(%r15)
movq %rax, 0x68(%rsp)
andq $0x0, 0x70(%rsp)
movb $0x0, 0x78(%rsp)
leaq 0x68(%rsp), %rdi
callq 0x5100
leaq 0x28(%rsp), %rdi
callq 0x6c00
movq %r15, %rax
addq $0x578, %rsp            # imm = 0x578
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
leaq 0xc8(%rsp), %rdi
jmp 0x1027e
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
jmp 0x10075
jmp 0x1008a
movq %rax, %r15
leaq 0x100(%rsp), %rdi
callq 0x5100
jmp 0x10283
movq %rax, %r15
jmp 0x10283
jmp 0x100de
jmp 0x102fe
movq %rax, %r15
leaq 0x2e8(%rsp), %rdi
jmp 0x102e5
movq %rax, %r15
leaq 0x2a8(%rsp), %rdi
jmp 0x102e5
jmp 0x102b9
movq %rax, %r15
leaq 0x2b8(%rsp), %rdi
jmp 0x102f7
movq %rax, %r15
leaq 0x298(%rsp), %rdi
jmp 0x102f7
movq %rax, %r15
leaq 0x8(%rsp), %rdi
jmp 0x102f7
jmp 0x102fe
jmp 0x102fe
jmp 0x101ac
jmp 0x102b9
jmp 0x102b9
movq %rax, %r15
leaq 0x40(%rsp), %rdi
callq 0x5100
jmp 0x10116
movq %rax, %r15
leaq 0x90(%rsp), %rdi
callq 0x5100
jmp 0x10128
movq %rax, %r15
leaq 0x2f0(%rsp), %rdi
callq 0x5100
jmp 0x1013a
movq %rax, %r15
leaq 0x390(%rsp), %rdi
callq 0x5100
jmp 0x1014c
movq %rax, %r15
leaq 0x370(%rsp), %rdi
callq 0x5100
leaq 0x310(%rsp), %rdi
callq 0x5100
leaq 0x350(%rsp), %rdi
callq 0x5100
leaq 0x330(%rsp), %rdi
callq 0x5100
leaq 0xb8(%rsp), %rdi
jmp 0x101d9
movq %rax, %r15
jmp 0x10159
movq %rax, %r15
jmp 0x10166
movq %rax, %r15
jmp 0x10173
movq %rax, %r15
jmp 0x10180
jmp 0x101a2
jmp 0x101a2
movq %rax, %r15
jmp 0x101de
movq %rax, %r15
jmp 0x101eb
movq %rax, %r15
jmp 0x10226
jmp 0x102b9
jmp 0x102b9
jmp 0x102b9
jmp 0x10259
jmp 0x10259
jmp 0x102fe
jmp 0x101d1
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x6c00
leaq 0x100(%rsp), %rdi
callq 0x5180
leaq 0x3d0(%rsp), %rdi
callq 0x5180
jmp 0x1030e
movq %rax, %r15
leaq 0x8(%rsp), %rdi
callq 0x6c00
leaq 0x48(%rsp), %rdi
callq 0x6c00
jmp 0x10219
movq %rax, %r15
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
jmp 0x102e5
jmp 0x102b9
movq %rax, %r15
leaq 0x3d8(%rsp), %rdi
jmp 0x102e5
jmp 0x102b9
jmp 0x10259
movq %rax, %r15
leaq 0x2c8(%rsp), %rdi
jmp 0x1027e
movq %rax, %r15
jmp 0x1031b
movq %rax, %r15
jmp 0x10276
movq %rax, %r15
leaq 0x558(%rsp), %rdi
callq 0x5100
leaq 0x2d8(%rsp), %rdi
callq 0x6c00
movq %rsp, %rdi
callq 0x6bde
leaq 0x48(%rsp), %rdi
jmp 0x102f7
movq %rax, %r15
jmp 0x10325
movq %rax, %r15
leaq 0x3b0(%rsp), %rdi
callq 0x5100
jmp 0x1032a
movq %rax, %r15
jmp 0x1032a
jmp 0x102be
jmp 0x102b9
jmp 0x102c3
jmp 0x102fe
movq %rax, %r15
jmp 0x1030e
movq %rax, %r15
jmp 0x102d3
movq %rax, %r15
leaq 0x3d8(%rsp), %rdi
callq 0x6c00
leaq 0x108(%rsp), %rdi
callq 0x6c00
leaq 0x8(%rsp), %rdi
callq 0x6c00
jmp 0x1030e
movq %rax, %r15
leaq 0x108(%rsp), %rdi
callq 0x6c00
jmp 0x10301
movq %rax, %r15
leaq 0x3d0(%rsp), %rdi
callq 0x5100
leaq 0xe0(%rsp), %rdi
callq 0x5100
leaq 0x68(%rsp), %rdi
callq 0x5100
leaq 0x28(%rsp), %rbx
movq %rbx, %rdi
callq 0x6c00
movq %r15, %rdi
callq 0x5390