// File: kaiming[P]Chamber-Crawler-3k/main.cc
// Function: main
int main(int argc, char* argv[]) {
    bool restart = true;

    while (restart) {
        restart = false;

        std::ifstream infile;
        std::vector<std::vector<std::vector<std::shared_ptr<Tile>>>> floors;
        std::vector<std::shared_ptr<WalkableTile>> playerSpawns;
        std::vector<std::vector<std::shared_ptr<WalkableTile>>> enemies;
        std::vector<std::vector<std::shared_ptr<WalkableTile>>> dragonHoards;
        std::vector<bool> filled;
        int winner = -1; // code 0 for restart, code 1 for win, code 2 for loss

        // if no file is passed in command line
        if (argc == 1) {
            try { 
                infile.open("./default.txt");
            } catch (...) {
               std::cerr << "Error reading in default file" << std::endl;
               infile.close();
               return 1;
            }
            
        } else { // if there are at least one command line argument (only take the first one and try to open it as a file)
            try {
                // get file name 
                const std::string fileName {argv[1]};

                infile.open(fileName);
            } catch (...) {
                std::cerr << "Error reading in given file" << std::endl;
                infile.close();
                return 1;
            }
        } 

        // read in file for floor plan
        readFloorPlan(infile, floors, playerSpawns, enemies, dragonHoards, filled);

        // close file
        infile.close();

        TextDisplay td;

        // Ask player to enter one of the specified races or quit
        std::string race, in;

        std::cout << "Welcome to ChamberCrawler3000, prepare to enter the unknown!" << std::endl;
        
        // Extra Features menu
        std::cout << "Enter settings menu? (y or n): ";
        std::cin >> in;

        while (in != "y" && in != "n") {
            std::cerr << "Invalid option" << std::endl;
            std::cout << "Enter here: ";

            if (std::cin.fail()) {
                if (std::cin.eof()) return 0;

                std::cin.clear();
                std::cin.ignore();
            }

            std::cin >> in;
        }

        int seed = -1;
        bool enemyTracking = false;
        int radius = -1;

        if (in == "y") {
            std::cout << "Settings menu"<< std::endl;
            
            // Get seed
            std::cout << "Enter seed (int) or -1 to skip: ";
            std::cin >> seed;
            
            while (std::cin.fail()) {
                if (std::cin.eof()) return 0;

                std::cin.clear();
                std::cin.ignore();
                std::cout << "Invalid int."<< std::endl;
                std::cout << "Enter seed (int) or -1 to skip:";
                std::cin >> seed;
            }

            if (seed != -1) {
                std::cout << "Seed entered: " << std::to_string(seed) << std::endl;
            }


            // Get enemy tracking option
            std::cout << "Enable Enemy Tracking? (y or n): ";

            std::cin >> in;

            while (in != "y" && in != "n") {
                std::cerr << "Invalid option" << std::endl;
                std::cout << "Enter here: ";

                if (std::cin.fail()) {
                    if (std::cin.eof()) return 0;

                    std::cin.clear();
                    std::cin.ignore();
                }
                
                std::cin >> in;
            }

            if (in == "y") {
                enemyTracking = true;
                std::cout << "Enemy Tracking Enabled" << std::endl;
            } else if (in == "n") {
                enemyTracking = false;
                std::cout << "Enemy Tracking Disabled" << std::endl;
            }

            
            // If enemy tracking option activated, get difficulty
            if (enemyTracking) {
                std::cout << "Set Enemy Tracking difficulty (e, m, h): ";
                std::cin >> in;

                while (in != "e" && in != "m" && in != "h") {
                    std::cerr << "Invalid option" << std::endl;
                    std::cout << "Enter here: ";

                    if (std::cin.fail()) {
                        if (std::cin.eof()) return 0;

                        std::cin.clear();
                        std::cin.ignore();
                    }

                    std::cin >> in;
                }

                if (in == "e") {
                    radius = 2;
                    std::cout << "Enemy Tracking Difficulty: Easy (radius 2)" << std::endl;
                } else if (in == "m") {
                    radius = 3;
                    std::cout << "Enemy Tracking Difficulty: Medium (radius 3)" << std::endl;
                } else if (in == "h") {
                    radius = 4;
                    std::cout << "Enemy Tracking Difficulty: Hard (radius 4)" << std::endl;
                }

            }

            std::cout << "End of Settings menu." << std::endl;

        } else if (race == "n") {
            // Continue
            std::cout << "Settings menu bypassed." << std::endl;

        }



        std::cout << "Choose your character: Shade 's' (default), Drow 'd', Vampire 'v', Goblin 'g', Troll 't'" << std::endl;
        std::cout << "Enter here: ";

        std::getline(std::cin, race);
        std::getline(std::cin, race);



        while (race != "" && race != "s" && race != "d" && race != "v" && race != "g" && race != "t") {
            std::cerr << "Invalid race" << std::endl;
            std::cout << "Enter here: ";

            if (std::cin.fail()) {
                if (std::cin.eof()) return 0;

                std::cin.clear();
                std::cin.ignore();
            }

            std::cin >> std::noskipws >> race;
        }

        if (race == "q") {
            return 0; // NOTE: MAYBE HAVE IT SO A NEW GAME STARTS??
        } else if (race == "r") {
            restart = true; // Sort of useless LOL
            continue;
        } else if (race == "") { // default race
            race = "s";
        }

        std::cout << "Race selected: " + race << std::endl;
/*
    int seed = -1;
        bool enemyTracking = false;
        int radius = -1;
*/

        Board b = Board {floors, filled, playerSpawns, enemies, dragonHoards, race, seed, enemyTracking, radius};


        td.drawFloor(std::cout, b, "The adventure begins");

        std::string cmd;

        while (true) {
            std::cout << "Enter command: ";
            getline(std::cin, cmd);

            // break clause
            if (std::cin.fail()) {
                if (std::cin.eof()) {
                    return 0;
                }
            }

            // Process commands
            std::string message;

            if (cmd == "no" || cmd == "so" || cmd == "ea" || cmd == "we" || cmd == "ne" || cmd == "nw" || cmd == "se" || cmd == "sw") {
                // Move player in given direction
                message = b.movePlayer(cmd);

                if (message == "Dungeon cleared. You win!") {
                    // Game Won by Player
                    winner = 1;

                    break;
                } 

            } else if (static_cast<int>(cmd.length()) == 4 && cmd[0] == 'u') {
                // Use potion in given direction
                message = b.usePotion(cmd.substr(cmd.length() - 2));

            } else if (static_cast<int>(cmd.length()) == 4 && cmd[0] == 'a') {
                // Attack enemy in the given direction
                message = b.attackEnemy(cmd.substr(cmd.length() - 2));

            } else if (cmd == "f") {
                // Freeze enemies
                bool isFrozen = b.toggleFreeze();

                message = "Enemies Frozen: ";
                
                if (isFrozen) {
                    message += "Enabled ";
                 } else {
                    message += "Disabled ";
                 }

            } else if (cmd == "r") {
                // Restart game
                std::cout << "Resetting the game..." << std::endl;
                restart = true;
                winner = 0;

                break;
            } else if (cmd == "q") {
                // Quit Game
                std::cout << "You gave up! Better luck next time!" << std::endl;;

                return 0;
            } else {
                // Invalid Command
                std::cerr << "Invalid Command" << std::endl;
                continue;
            }

            // Move Enemies
            if (message.length () > 30 && message.substr(message.length()-26) == "Proceeding to next floor. ") {

            } else {
                std::string e_message = b.moveEnemies();

                if (e_message.length() == 0) {
                    e_message = "Enemies moved.";
                }

                message +=e_message;
            }
            

            td.drawFloor(std::cout, b, message);

            if (message.length() > 12 && message.substr(message.length()-10) == "Game Over!") {
                // Player killed and lost
                winner = 2;
                break;
            }

        } // End of Command Interpreter

        if (winner == 1) {
            // Print winner stuff
            
            std::cout << "Congratulations! You won!" << std::endl;
        } else if (winner == 2) {
            // Print loser stuff
            
            std::cout << "You have been defeated!" << std::endl;

        }

        if (winner != 0) {
            // Ask Player if they want to play again
            std::cout << "Play again? y or n" << std::endl;
            std::string replay = "";
            
            while (replay != "y" && replay != "n") {
                if (replay != "") {
                    std::cerr << "Invalid Answer" << std::endl;
                }
                
                std::cin >> replay;

                if (std::cin.fail()) {
                    if (std::cin.eof()) return 0;

                    std::cin.clear();
                    std::cin.ignore();
                }
            }

            if (replay == "y") {
                restart = true;
            }
        }

    } // End of restart loop

    

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x930, %rsp            # imm = 0x930
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x1, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x8941
movb $0x0, -0x11(%rbp)
leaq -0x220(%rbp), %rdi
callq 0x6380
leaq -0x238(%rbp), %rdi
callq 0x8970
leaq -0x250(%rbp), %rdi
callq 0x8990
leaq -0x268(%rbp), %rdi
callq 0x89b0
leaq -0x280(%rbp), %rdi
callq 0x89b0
leaq -0x2a8(%rbp), %rdi
callq 0x89d0
movl $0xffffffff, -0x2ac(%rbp) # imm = 0xFFFFFFFF
cmpl $0x1, -0x8(%rbp)
jne 0x697a
leaq 0x36756(%rip), %rsi     # 0x3d004
leaq -0x220(%rbp), %rdi
movl $0x8, %edx
callq 0x61d0
jmp 0x68c1
jmp 0x6975
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
movq -0x2b8(%rbp), %rdi
callq 0x6120
movq 0x53705(%rip), %rdi     # 0x59ff0
leaq 0x36720(%rip), %rsi     # 0x3d012
callq 0x62e0
movq %rax, -0x720(%rbp)
jmp 0x6900
movq -0x720(%rbp), %rdi
movq 0x536a2(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6915
leaq -0x220(%rbp), %rdi
callq 0x6090
jmp 0x6923
movl $0x1, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
callq 0x64c0
jmp 0x6954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
callq 0x64c0
jmp 0x6970
jmp 0x8852
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x88f7
jmp 0x88f7
jmp 0x6ab5
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x730(%rbp)
leaq -0x2e1(%rbp), %rdi
movq %rdi, -0x728(%rbp)
callq 0x6550
movq -0x730(%rbp), %rsi
movq -0x728(%rbp), %rdx
leaq -0x2e0(%rbp), %rdi
callq 0x8a00
jmp 0x69b8
leaq -0x2e1(%rbp), %rdi
callq 0x6340
leaq -0x220(%rbp), %rdi
leaq -0x2e0(%rbp), %rsi
movl $0x8, %edx
callq 0x6280
jmp 0x69de
leaq -0x2e0(%rbp), %rdi
callq 0x61c0
jmp 0x6ab3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x2e1(%rbp), %rdi
callq 0x6340
jmp 0x6a2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x2e0(%rbp), %rdi
callq 0x61c0
movq -0x2b8(%rbp), %rdi
callq 0x6120
movq 0x535b0(%rip), %rdi     # 0x59ff0
leaq 0x365e9(%rip), %rsi     # 0x3d030
callq 0x62e0
movq %rax, -0x738(%rbp)
jmp 0x6a55
movq -0x738(%rbp), %rdi
movq 0x5354d(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6a6a
leaq -0x220(%rbp), %rdi
callq 0x6090
jmp 0x6a78
movl $0x1, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
callq 0x64c0
jmp 0x6aa9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
callq 0x64c0
jmp 0x6aae
jmp 0x8852
jmp 0x88f7
jmp 0x6ab5
leaq -0x220(%rbp), %rdi
leaq -0x238(%rbp), %rsi
leaq -0x250(%rbp), %rdx
leaq -0x268(%rbp), %rcx
leaq -0x280(%rbp), %r8
leaq -0x2a8(%rbp), %r9
callq 0xdc50
jmp 0x6ae6
leaq -0x220(%rbp), %rdi
callq 0x6090
jmp 0x6af4
leaq -0x308(%rbp), %rdi
callq 0x6430
leaq -0x328(%rbp), %rdi
callq 0x6430
movq 0x534b5(%rip), %rdi     # 0x59fc8
leaq 0x36532(%rip), %rsi     # 0x3d04c
callq 0x62e0
movq %rax, -0x740(%rbp)
jmp 0x6b28
movq -0x740(%rbp), %rdi
movq 0x5347a(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6b3d
movq 0x53484(%rip), %rdi     # 0x59fc8
leaq 0x3653e(%rip), %rsi     # 0x3d089
callq 0x62e0
jmp 0x6b52
movq 0x5347f(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x6b67
jmp 0x6b69
leaq 0x36539(%rip), %rsi     # 0x3d0a9
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x741(%rbp)
jmp 0x6b84
movb -0x741(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x742(%rbp)
jne 0x6b99
jmp 0x6bc2
leaq 0x36853(%rip), %rsi     # 0x3d3f3
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x743(%rbp)
jmp 0x6bb4
movb -0x743(%rbp), %al
movb %al, -0x742(%rbp)
jmp 0x6bc2
movb -0x742(%rbp), %al
testb $0x1, %al
jne 0x6bd1
jmp 0x6cdf
movq 0x53418(%rip), %rdi     # 0x59ff0
leaq 0x364cc(%rip), %rsi     # 0x3d0ab
callq 0x62e0
movq %rax, -0x750(%rbp)
jmp 0x6bed
movq -0x750(%rbp), %rdi
movq 0x533b5(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6c02
movq 0x533bf(%rip), %rdi     # 0x59fc8
leaq 0x364aa(%rip), %rsi     # 0x3d0ba
callq 0x62e0
jmp 0x6c17
movq 0x533ba(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x751(%rbp)
jmp 0x6c35
movb -0x751(%rbp), %al
testb $0x1, %al
jne 0x6c44
jmp 0x6cc5
movq 0x5338d(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x752(%rbp)
jmp 0x6c62
movb -0x752(%rbp), %al
testb $0x1, %al
jne 0x6c6e
jmp 0x6c9b
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x88df
movq 0x53336(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x6cb5
movq 0x5331c(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x6cc3
jmp 0x6cc5
movq 0x5330c(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x6cda
jmp 0x6b69
movl $0xffffffff, -0x32c(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0x32d(%rbp)
movl $0xffffffff, -0x334(%rbp) # imm = 0xFFFFFFFF
leaq 0x363a8(%rip), %rsi     # 0x3d0a9
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x753(%rbp)
jmp 0x6d15
movb -0x753(%rbp), %al
testb $0x1, %al
jne 0x6d24
jmp 0x748e
movq 0x5329d(%rip), %rdi     # 0x59fc8
leaq 0x36395(%rip), %rsi     # 0x3d0c7
callq 0x62e0
movq %rax, -0x760(%rbp)
jmp 0x6d40
movq -0x760(%rbp), %rdi
movq 0x53262(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6d55
movq 0x5326c(%rip), %rdi     # 0x59fc8
leaq 0x36372(%rip), %rsi     # 0x3d0d5
callq 0x62e0
jmp 0x6d6a
movq 0x53267(%rip), %rdi     # 0x59fd8
leaq -0x32c(%rbp), %rsi
callq 0x61b0
jmp 0x6d7f
jmp 0x6d81
movq 0x53250(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x761(%rbp)
jmp 0x6d9f
movb -0x761(%rbp), %al
testb $0x1, %al
jne 0x6dae
jmp 0x6e76
movq 0x53223(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x762(%rbp)
jmp 0x6dcc
movb -0x762(%rbp), %al
testb $0x1, %al
jne 0x6dd8
jmp 0x6dee
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
movq 0x531e3(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x6e08
movq 0x531c9(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x6e16
movq 0x531ab(%rip), %rdi     # 0x59fc8
leaq 0x362d2(%rip), %rsi     # 0x3d0f6
callq 0x62e0
movq %rax, -0x770(%rbp)
jmp 0x6e32
movq -0x770(%rbp), %rdi
movq 0x53170(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6e47
movq 0x5317a(%rip), %rdi     # 0x59fc8
leaq 0x362ae(%rip), %rsi     # 0x3d103
callq 0x62e0
jmp 0x6e5c
movq 0x53175(%rip), %rdi     # 0x59fd8
leaq -0x32c(%rbp), %rsi
callq 0x61b0
jmp 0x6e71
jmp 0x6d81
cmpl $-0x1, -0x32c(%rbp)
je 0x6f15
movq 0x5313e(%rip), %rdi     # 0x59fc8
leaq 0x36292(%rip), %rsi     # 0x3d123
callq 0x62e0
movq %rax, -0x778(%rbp)
jmp 0x6e9f
movl -0x32c(%rbp), %esi
leaq -0x358(%rbp), %rdi
callq 0x8b10
jmp 0x6eb3
movq -0x778(%rbp), %rdi
leaq -0x358(%rbp), %rsi
callq 0x62a0
movq %rax, -0x780(%rbp)
jmp 0x6ecf
movq -0x780(%rbp), %rdi
movq 0x530d3(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6ee4
leaq -0x358(%rbp), %rdi
callq 0x61c0
jmp 0x6f15
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x61c0
jmp 0x88df
movq 0x530ac(%rip), %rdi     # 0x59fc8
leaq 0x3620f(%rip), %rsi     # 0x3d132
callq 0x62e0
jmp 0x6f2a
movq 0x530a7(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x6f3f
jmp 0x6f41
leaq 0x36161(%rip), %rsi     # 0x3d0a9
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x781(%rbp)
jmp 0x6f5c
movb -0x781(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x782(%rbp)
jne 0x6f71
jmp 0x6f9a
leaq 0x3647b(%rip), %rsi     # 0x3d3f3
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x783(%rbp)
jmp 0x6f8c
movb -0x783(%rbp), %al
movb %al, -0x782(%rbp)
jmp 0x6f9a
movb -0x782(%rbp), %al
testb $0x1, %al
jne 0x6fa9
jmp 0x709d
movq 0x53040(%rip), %rdi     # 0x59ff0
leaq 0x360f4(%rip), %rsi     # 0x3d0ab
callq 0x62e0
movq %rax, -0x790(%rbp)
jmp 0x6fc5
movq -0x790(%rbp), %rdi
movq 0x52fdd(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x6fda
movq 0x52fe7(%rip), %rdi     # 0x59fc8
leaq 0x360d2(%rip), %rsi     # 0x3d0ba
callq 0x62e0
jmp 0x6fef
movq 0x52fe2(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x791(%rbp)
jmp 0x700d
movb -0x791(%rbp), %al
testb $0x1, %al
jne 0x7019
jmp 0x7083
movq 0x52fb8(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x792(%rbp)
jmp 0x7037
movb -0x792(%rbp), %al
testb $0x1, %al
jne 0x7043
jmp 0x7059
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
movq 0x52f78(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x7073
movq 0x52f5e(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x7081
jmp 0x7083
movq 0x52f4e(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x7098
jmp 0x6f41
leaq 0x36005(%rip), %rsi     # 0x3d0a9
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x793(%rbp)
jmp 0x70b8
movb -0x793(%rbp), %al
testb $0x1, %al
jne 0x70c4
jmp 0x70fe
movb $0x1, -0x32d(%rbp)
movq 0x52ef6(%rip), %rdi     # 0x59fc8
leaq 0x3607b(%rip), %rsi     # 0x3d154
callq 0x62e0
movq %rax, -0x7a0(%rbp)
jmp 0x70e7
movq -0x7a0(%rbp), %rdi
movq 0x52ebb(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x70fc
jmp 0x7161
leaq 0x362ee(%rip), %rsi     # 0x3d3f3
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x7a1(%rbp)
jmp 0x7119
movb -0x7a1(%rbp), %al
testb $0x1, %al
jne 0x7125
jmp 0x715f
movb $0x0, -0x32d(%rbp)
movq 0x52e95(%rip), %rdi     # 0x59fc8
leaq 0x36031(%rip), %rsi     # 0x3d16b
callq 0x62e0
movq %rax, -0x7b0(%rbp)
jmp 0x7148
movq -0x7b0(%rbp), %rdi
movq 0x52e5a(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x715d
jmp 0x715f
jmp 0x7161
testb $0x1, -0x32d(%rbp)
je 0x745b
movq 0x52e53(%rip), %rdi     # 0x59fc8
leaq 0x36007(%rip), %rsi     # 0x3d183
callq 0x62e0
jmp 0x7183
movq 0x52e4e(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x7198
jmp 0x719a
leaq 0x36127(%rip), %rsi     # 0x3d2c8
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x7b1(%rbp)
jmp 0x71b5
movb -0x7b1(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7b2(%rbp)
jne 0x71ca
jmp 0x7223
leaq 0x35fdc(%rip), %rsi     # 0x3d1ad
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x7b3(%rbp)
jmp 0x71e5
movb -0x7b3(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x7b2(%rbp)
jne 0x71fa
jmp 0x7223
leaq 0x35fae(%rip), %rsi     # 0x3d1af
leaq -0x328(%rbp), %rdi
callq 0x8ab0
movb %al, -0x7b4(%rbp)
jmp 0x7215
movb -0x7b4(%rbp), %al
movb %al, -0x7b2(%rbp)
jmp 0x7223
movb -0x7b2(%rbp), %al
testb $0x1, %al
jne 0x7232
jmp 0x7326
movq 0x52db7(%rip), %rdi     # 0x59ff0
leaq 0x35e6b(%rip), %rsi     # 0x3d0ab
callq 0x62e0
movq %rax, -0x7c0(%rbp)
jmp 0x724e
movq -0x7c0(%rbp), %rdi
movq 0x52d54(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x7263
movq 0x52d5e(%rip), %rdi     # 0x59fc8
leaq 0x35e49(%rip), %rsi     # 0x3d0ba
callq 0x62e0
jmp 0x7278
movq 0x52d59(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x7c1(%rbp)
jmp 0x7296
movb -0x7c1(%rbp), %al
testb $0x1, %al
jne 0x72a2
jmp 0x730c
movq 0x52d2f(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x7c2(%rbp)
jmp 0x72c0
movb -0x7c2(%rbp), %al
testb $0x1, %al
jne 0x72cc
jmp 0x72e2
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
movq 0x52cef(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x72fc
movq 0x52cd5(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x730a
jmp 0x730c
movq 0x52cc5(%rip), %rdi     # 0x59fd8
leaq -0x328(%rbp), %rsi
callq 0x63e0
jmp 0x7321
jmp 0x719a
leaq 0x35f9b(%rip), %rsi     # 0x3d2c8
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x7c3(%rbp)
jmp 0x7341
movb -0x7c3(%rbp), %al
testb $0x1, %al
jne 0x734d
jmp 0x738d
movl $0x2, -0x334(%rbp)
movq 0x52c6a(%rip), %rdi     # 0x59fc8
leaq 0x35e4c(%rip), %rsi     # 0x3d1b1
callq 0x62e0
movq %rax, -0x7d0(%rbp)
jmp 0x7373
movq -0x7d0(%rbp), %rdi
movq 0x52c2f(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x7388
jmp 0x7459
leaq 0x35e19(%rip), %rsi     # 0x3d1ad
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x7d1(%rbp)
jmp 0x73a8
movb -0x7d1(%rbp), %al
testb $0x1, %al
jne 0x73b4
jmp 0x73f1
movl $0x3, -0x334(%rbp)
movq 0x52c03(%rip), %rdi     # 0x59fc8
leaq 0x35e10(%rip), %rsi     # 0x3d1dc
callq 0x62e0
movq %rax, -0x7e0(%rbp)
jmp 0x73da
movq -0x7e0(%rbp), %rdi
movq 0x52bc8(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x73ef
jmp 0x7457
leaq 0x35db7(%rip), %rsi     # 0x3d1af
leaq -0x328(%rbp), %rdi
callq 0x8ae0
movb %al, -0x7e1(%rbp)
jmp 0x740c
movb -0x7e1(%rbp), %al
testb $0x1, %al
jne 0x7418
jmp 0x7455
movl $0x4, -0x334(%rbp)
movq 0x52b9f(%rip), %rdi     # 0x59fc8
leaq 0x35dd9(%rip), %rsi     # 0x3d209
callq 0x62e0
movq %rax, -0x7f0(%rbp)
jmp 0x743e
movq -0x7f0(%rbp), %rdi
movq 0x52b64(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x7453
jmp 0x7455
jmp 0x7457
jmp 0x7459
jmp 0x745b
movq 0x52b66(%rip), %rdi     # 0x59fc8
leaq 0x35dcb(%rip), %rsi     # 0x3d234
callq 0x62e0
movq %rax, -0x7f8(%rbp)
jmp 0x7477
movq -0x7f8(%rbp), %rdi
movq 0x52b2b(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x748c
jmp 0x74ea
leaq 0x35f5e(%rip), %rsi     # 0x3d3f3
leaq -0x308(%rbp), %rdi
callq 0x8ae0
movb %al, -0x7f9(%rbp)
jmp 0x74a9
movb -0x7f9(%rbp), %al
testb $0x1, %al
jne 0x74b5
jmp 0x74e8
movq 0x52b0c(%rip), %rdi     # 0x59fc8
leaq 0x35d87(%rip), %rsi     # 0x3d24a
callq 0x62e0
movq %rax, -0x808(%rbp)
jmp 0x74d1
movq -0x808(%rbp), %rdi
movq 0x52ad1(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x74e6
jmp 0x74e8
jmp 0x74ea
movq 0x52ad7(%rip), %rdi     # 0x59fc8
leaq 0x35d6a(%rip), %rsi     # 0x3d262
callq 0x62e0
movq %rax, -0x810(%rbp)
jmp 0x7506
movq -0x810(%rbp), %rdi
movq 0x52a9c(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x751b
movq 0x52aa6(%rip), %rdi     # 0x59fc8
leaq 0x35b91(%rip), %rsi     # 0x3d0ba
callq 0x62e0
jmp 0x7530
movq 0x52aa1(%rip), %rdi     # 0x59fd8
leaq -0x308(%rbp), %rsi
callq 0x6080
jmp 0x7545
movq 0x52a8c(%rip), %rdi     # 0x59fd8
leaq -0x308(%rbp), %rsi
callq 0x6080
jmp 0x755a
jmp 0x755c
leaq 0x368d4(%rip), %rsi     # 0x3de37
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x811(%rbp)
jmp 0x7577
movb -0x811(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x812(%rbp)
jne 0x758f
jmp 0x767e
leaq 0x35d59(%rip), %rsi     # 0x3d2ef
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x813(%rbp)
jmp 0x75aa
movb -0x813(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x812(%rbp)
jne 0x75c2
jmp 0x767e
leaq 0x35ba0(%rip), %rsi     # 0x3d169
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x814(%rbp)
jmp 0x75dd
movb -0x814(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x812(%rbp)
jne 0x75f5
jmp 0x767e
leaq 0x35cbf(%rip), %rsi     # 0x3d2bb
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x815(%rbp)
jmp 0x7610
movb -0x815(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x812(%rbp)
jne 0x7625
jmp 0x767e
leaq 0x36a6b(%rip), %rsi     # 0x3e097
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x816(%rbp)
jmp 0x7640
movb -0x816(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x812(%rbp)
jne 0x7655
jmp 0x767e
leaq 0x3676a(%rip), %rsi     # 0x3ddc6
leaq -0x308(%rbp), %rdi
callq 0x8ab0
movb %al, -0x817(%rbp)
jmp 0x7670
movb -0x817(%rbp), %al
movb %al, -0x812(%rbp)
jmp 0x767e
movb -0x812(%rbp), %al
testb $0x1, %al
jne 0x768d
jmp 0x779d
movq 0x5295c(%rip), %rdi     # 0x59ff0
leaq 0x35c22(%rip), %rsi     # 0x3d2bd
callq 0x62e0
movq %rax, -0x820(%rbp)
jmp 0x76a9
movq -0x820(%rbp), %rdi
movq 0x528f9(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x76be
movq 0x52903(%rip), %rdi     # 0x59fc8
leaq 0x359ee(%rip), %rsi     # 0x3d0ba
callq 0x62e0
jmp 0x76d3
movq 0x528fe(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x821(%rbp)
jmp 0x76f1
movb -0x821(%rbp), %al
testb $0x1, %al
jne 0x76fd
jmp 0x7767
movq 0x528d4(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x822(%rbp)
jmp 0x771b
movb -0x822(%rbp), %al
testb $0x1, %al
jne 0x7727
jmp 0x773d
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
movq 0x52894(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x7757
movq 0x5287a(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x7765
jmp 0x7767
movq 0x5286a(%rip), %rdi     # 0x59fd8
leaq 0x14bb(%rip), %rsi      # 0x8c30
callq 0x64d0
movq %rax, -0x830(%rbp)
jmp 0x7783
movq -0x830(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x63e0
jmp 0x7798
jmp 0x755c
leaq 0x35b26(%rip), %rsi     # 0x3d2ca
leaq -0x308(%rbp), %rdi
callq 0x8ae0
movb %al, -0x831(%rbp)
jmp 0x77b8
movb -0x831(%rbp), %al
testb $0x1, %al
jne 0x77c4
jmp 0x77da
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x883a
leaq 0x35c21(%rip), %rsi     # 0x3d402
leaq -0x308(%rbp), %rdi
callq 0x8ae0
movb %al, -0x832(%rbp)
jmp 0x77f5
movb -0x832(%rbp), %al
testb $0x1, %al
jne 0x7801
jmp 0x7814
movb $0x1, -0x11(%rbp)
movl $0x2, -0x2c0(%rbp)
jmp 0x883a
leaq 0x3661c(%rip), %rsi     # 0x3de37
leaq -0x308(%rbp), %rdi
callq 0x8ae0
movb %al, -0x833(%rbp)
jmp 0x782f
movb -0x833(%rbp), %al
testb $0x1, %al
jne 0x783b
jmp 0x7852
leaq 0x35aad(%rip), %rsi     # 0x3d2ef
leaq -0x308(%rbp), %rdi
callq 0x6420
jmp 0x7850
jmp 0x7852
jmp 0x7854
jmp 0x7856
leaq 0x35a6f(%rip), %rsi     # 0x3d2cc
leaq -0x378(%rbp), %rdi
leaq -0x308(%rbp), %rdx
callq 0x8c60
jmp 0x7872
movq 0x5274f(%rip), %rdi     # 0x59fc8
leaq -0x378(%rbp), %rsi
callq 0x62a0
movq %rax, -0x840(%rbp)
jmp 0x788e
movq -0x840(%rbp), %rdi
movq 0x52714(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x78a3
leaq -0x378(%rbp), %rdi
callq 0x61c0
leaq -0x4a0(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x8d70
jmp 0x78c4
leaq -0x4c8(%rbp), %rdi
leaq -0x2a8(%rbp), %rsi
callq 0x8e60
jmp 0x78d9
leaq -0x4e0(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x8ff0
jmp 0x78ee
leaq -0x4f8(%rbp), %rdi
leaq -0x268(%rbp), %rsi
callq 0x90e0
jmp 0x7903
leaq -0x510(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x90e0
jmp 0x7918
leaq -0x530(%rbp), %rdi
leaq -0x308(%rbp), %rsi
callq 0x6130
jmp 0x792d
movl -0x32c(%rbp), %ecx
movl -0x334(%rbp), %esi
movzbl -0x32d(%rbp), %edx
movq %rsp, %rax
movl %esi, 0x18(%rax)
andl $0x1, %edx
movl %edx, 0x10(%rax)
movl %ecx, 0x8(%rax)
leaq -0x530(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x488(%rbp), %rdi
leaq -0x4a0(%rbp), %rsi
leaq -0x4c8(%rbp), %rdx
leaq -0x4e0(%rbp), %rcx
leaq -0x4f8(%rbp), %r8
leaq -0x510(%rbp), %r9
callq 0x22e50
jmp 0x798a
leaq -0x530(%rbp), %rdi
callq 0x61c0
leaq -0x510(%rbp), %rdi
callq 0x91d0
leaq -0x4f8(%rbp), %rdi
callq 0x91d0
leaq -0x4e0(%rbp), %rdi
callq 0x9230
leaq -0x4c8(%rbp), %rdi
callq 0x9290
leaq -0x4a0(%rbp), %rdi
callq 0x92b0
leaq -0x551(%rbp), %rdi
movq %rdi, -0x848(%rbp)
callq 0x6550
movq -0x848(%rbp), %rdx
leaq 0x358e9(%rip), %rsi     # 0x3d2dc
leaq -0x550(%rbp), %rdi
callq 0x8a00
jmp 0x7a01
movq 0x525c0(%rip), %rsi     # 0x59fc8
leaq -0x2e2(%rbp), %rdi
leaq -0x488(%rbp), %rdx
leaq -0x550(%rbp), %rcx
callq 0x3b230
jmp 0x7a24
leaq -0x550(%rbp), %rdi
callq 0x61c0
leaq -0x551(%rbp), %rdi
callq 0x6340
leaq -0x578(%rbp), %rdi
callq 0x6430
jmp 0x7a4a
movq 0x52577(%rip), %rdi     # 0x59fc8
leaq 0x35899(%rip), %rsi     # 0x3d2f1
callq 0x62e0
jmp 0x7a5f
movq 0x52572(%rip), %rdi     # 0x59fd8
leaq -0x578(%rbp), %rsi
callq 0x6080
jmp 0x7a74
movq 0x5255d(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x849(%rbp)
jmp 0x7a92
movb -0x849(%rbp), %al
testb $0x1, %al
jne 0x7aa1
jmp 0x7c29
movq 0x52530(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x84a(%rbp)
jmp 0x7abf
movb -0x84a(%rbp), %al
testb $0x1, %al
jne 0x7ace
jmp 0x7c27
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x8822
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x378(%rbp), %rdi
callq 0x61c0
jmp 0x88df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7bbc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7bb0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7ba4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7b98
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7b8c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x61c0
leaq -0x510(%rbp), %rdi
callq 0x91d0
leaq -0x4f8(%rbp), %rdi
callq 0x91d0
leaq -0x4e0(%rbp), %rdi
callq 0x9230
leaq -0x4c8(%rbp), %rdi
callq 0x9290
leaq -0x4a0(%rbp), %rdi
callq 0x92b0
jmp 0x88df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x7bff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x550(%rbp), %rdi
callq 0x61c0
leaq -0x551(%rbp), %rdi
callq 0x6340
jmp 0x88d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x88c7
jmp 0x7c29
leaq -0x598(%rbp), %rdi
callq 0x6430
leaq 0x356c5(%rip), %rsi     # 0x3d301
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x84b(%rbp)
jmp 0x7c50
movb -0x84b(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7c60
leaq 0x3569d(%rip), %rsi     # 0x3d304
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x84c(%rbp)
jmp 0x7c7b
movb -0x84c(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7c8b
leaq 0x35675(%rip), %rsi     # 0x3d307
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x84d(%rbp)
jmp 0x7ca6
movb -0x84d(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7cb6
leaq 0x3564d(%rip), %rsi     # 0x3d30a
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x84e(%rbp)
jmp 0x7cd1
movb -0x84e(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7ce1
leaq 0x35625(%rip), %rsi     # 0x3d30d
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x84f(%rbp)
jmp 0x7cfc
movb -0x84f(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7d08
leaq 0x35601(%rip), %rsi     # 0x3d310
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x850(%rbp)
jmp 0x7d23
movb -0x850(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7d2f
leaq 0x355dd(%rip), %rsi     # 0x3d313
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x851(%rbp)
jmp 0x7d4a
movb -0x851(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7d56
leaq 0x355b9(%rip), %rsi     # 0x3d316
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x852(%rbp)
jmp 0x7d71
movb -0x852(%rbp), %al
testb $0x1, %al
jne 0x7d80
jmp 0x7e69
leaq -0x5d8(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0x6130
jmp 0x7d95
leaq -0x5b8(%rbp), %rdi
leaq -0x488(%rbp), %rsi
leaq -0x5d8(%rbp), %rdx
callq 0x26450
jmp 0x7db1
leaq -0x598(%rbp), %rdi
movq %rdi, -0x860(%rbp)
leaq -0x5b8(%rbp), %rsi
movq %rsi, -0x868(%rbp)
callq 0x63c0
movq -0x868(%rbp), %rdi
callq 0x61c0
leaq -0x5d8(%rbp), %rdi
callq 0x61c0
movq -0x860(%rbp), %rdi
leaq 0x35521(%rip), %rsi     # 0x3d319
callq 0x8ae0
movb %al, -0x853(%rbp)
jmp 0x7e05
movb -0x853(%rbp), %al
testb $0x1, %al
jne 0x7e11
jmp 0x7e64
movl $0x1, -0x2ac(%rbp)
movl $0xf, -0x2c0(%rbp)
jmp 0x84ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
jmp 0x8512
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x5d8(%rbp), %rdi
callq 0x61c0
jmp 0x8512
jmp 0x81f8
leaq -0x578(%rbp), %rdi
callq 0x6460
cmpl $0x4, %eax
jne 0x7f4f
xorl %eax, %eax
movl %eax, %esi
leaq -0x578(%rbp), %rdi
callq 0x65d0
movq %rax, -0x870(%rbp)
jmp 0x7e97
movq -0x870(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x75, %eax
jne 0x7f4f
leaq -0x578(%rbp), %rdi
movq %rdi, -0x878(%rbp)
callq 0x6460
movq -0x878(%rbp), %rsi
movq %rax, %rdx
addq $-0x2, %rdx
leaq -0x618(%rbp), %rdi
movq $-0x1, %rcx
callq 0x6310
jmp 0x7ee0
leaq -0x5f8(%rbp), %rdi
leaq -0x488(%rbp), %rsi
leaq -0x618(%rbp), %rdx
callq 0x2d550
jmp 0x7efc
leaq -0x598(%rbp), %rdi
leaq -0x5f8(%rbp), %rsi
callq 0x63c0
leaq -0x5f8(%rbp), %rdi
callq 0x61c0
leaq -0x618(%rbp), %rdi
callq 0x61c0
jmp 0x81f6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x618(%rbp), %rdi
callq 0x61c0
jmp 0x8512
leaq -0x578(%rbp), %rdi
callq 0x6460
cmpl $0x4, %eax
jne 0x8035
xorl %eax, %eax
movl %eax, %esi
leaq -0x578(%rbp), %rdi
callq 0x65d0
movq %rax, -0x880(%rbp)
jmp 0x7f7d
movq -0x880(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jne 0x8035
leaq -0x578(%rbp), %rdi
movq %rdi, -0x888(%rbp)
callq 0x6460
movq -0x888(%rbp), %rsi
movq %rax, %rdx
addq $-0x2, %rdx
leaq -0x658(%rbp), %rdi
movq $-0x1, %rcx
callq 0x6310
jmp 0x7fc6
leaq -0x638(%rbp), %rdi
leaq -0x488(%rbp), %rsi
leaq -0x658(%rbp), %rdx
callq 0x27e00
jmp 0x7fe2
leaq -0x598(%rbp), %rdi
leaq -0x638(%rbp), %rsi
callq 0x63c0
leaq -0x638(%rbp), %rdi
callq 0x61c0
leaq -0x658(%rbp), %rdi
callq 0x61c0
jmp 0x81f4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x658(%rbp), %rdi
callq 0x61c0
jmp 0x8512
leaq 0x3603e(%rip), %rsi     # 0x3e07a
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x889(%rbp)
jmp 0x8050
movb -0x889(%rbp), %al
testb $0x1, %al
jne 0x805c
jmp 0x80cf
leaq -0x488(%rbp), %rdi
callq 0x250b0
movb %al, -0x88a(%rbp)
jmp 0x8070
movb -0x88a(%rbp), %al
andb $0x1, %al
movb %al, -0x659(%rbp)
leaq 0x352ae(%rip), %rsi     # 0x3d333
leaq -0x598(%rbp), %rdi
callq 0x6420
jmp 0x8093
testb $0x1, -0x659(%rbp)
je 0x80b3
leaq 0x352a1(%rip), %rsi     # 0x3d344
leaq -0x598(%rbp), %rdi
callq 0x62b0
jmp 0x80b1
jmp 0x80ca
leaq 0x35293(%rip), %rsi     # 0x3d34d
leaq -0x598(%rbp), %rdi
callq 0x62b0
jmp 0x80c8
jmp 0x80ca
jmp 0x81f2
leaq 0x3532c(%rip), %rsi     # 0x3d402
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x88b(%rbp)
jmp 0x80ea
movb -0x88b(%rbp), %al
testb $0x1, %al
jne 0x80f6
jmp 0x8144
movq 0x51ecb(%rip), %rdi     # 0x59fc8
leaq 0x35253(%rip), %rsi     # 0x3d357
callq 0x62e0
movq %rax, -0x898(%rbp)
jmp 0x8112
movq -0x898(%rbp), %rdi
movq 0x51e90(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x8127
movb $0x1, -0x11(%rbp)
movl $0x0, -0x2ac(%rbp)
movl $0xf, -0x2c0(%rbp)
jmp 0x84ce
leaq 0x3517f(%rip), %rsi     # 0x3d2ca
leaq -0x578(%rbp), %rdi
callq 0x8ae0
movb %al, -0x899(%rbp)
jmp 0x815f
movb -0x899(%rbp), %al
testb $0x1, %al
jne 0x816b
jmp 0x81b2
movq 0x51e56(%rip), %rdi     # 0x59fc8
leaq 0x351f4(%rip), %rsi     # 0x3d36d
callq 0x62e0
movq %rax, -0x8a8(%rbp)
jmp 0x8187
movq -0x8a8(%rbp), %rdi
movq 0x51e1b(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x819c
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x84ce
movq 0x51e37(%rip), %rdi     # 0x59ff0
leaq 0x351d1(%rip), %rsi     # 0x3d391
callq 0x62e0
movq %rax, -0x8b0(%rbp)
jmp 0x81ce
movq -0x8b0(%rbp), %rdi
movq 0x51dd4(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x81e3
movl $0xe, -0x2c0(%rbp)
jmp 0x84ce
jmp 0x81f4
jmp 0x81f6
jmp 0x81f8
leaq -0x598(%rbp), %rdi
callq 0x6460
movq %rax, %rcx
movb $0x0, -0x681(%rbp)
xorl %eax, %eax
cmpq $0x1e, %rcx
movb %al, -0x8b1(%rbp)
jbe 0x8282
leaq -0x598(%rbp), %rdi
movq %rdi, -0x8c0(%rbp)
callq 0x6460
movq -0x8c0(%rbp), %rsi
movq %rax, %rdx
addq $-0x1a, %rdx
leaq -0x680(%rbp), %rdi
movq $-0x1, %rcx
callq 0x6310
jmp 0x8252
movb $0x1, -0x681(%rbp)
leaq 0x35a57(%rip), %rsi     # 0x3dcb7
leaq -0x680(%rbp), %rdi
callq 0x8ae0
movb %al, -0x8c1(%rbp)
jmp 0x8274
movb -0x8c1(%rbp), %al
movb %al, -0x8b1(%rbp)
jmp 0x8282
movb -0x8b1(%rbp), %al
movb %al, -0x8c2(%rbp)
testb $0x1, -0x681(%rbp)
jne 0x8299
jmp 0x82a5
leaq -0x680(%rbp), %rdi
callq 0x61c0
movb -0x8c2(%rbp), %al
testb $0x1, %al
jne 0x82b1
jmp 0x82e4
jmp 0x8366
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
testb $0x1, -0x681(%rbp)
jne 0x82d3
jmp 0x82df
leaq -0x680(%rbp), %rdi
callq 0x61c0
jmp 0x8512
leaq -0x6a8(%rbp), %rdi
leaq -0x488(%rbp), %rsi
callq 0x29ad0
jmp 0x82f9
leaq -0x6a8(%rbp), %rdi
callq 0x6460
cmpq $0x0, %rax
jne 0x8345
leaq 0x3508f(%rip), %rsi     # 0x3d3a1
leaq -0x6a8(%rbp), %rdi
callq 0x6420
jmp 0x8320
jmp 0x8345
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x6a8(%rbp), %rdi
callq 0x61c0
jmp 0x8512
leaq -0x598(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
callq 0x63f0
jmp 0x835a
leaq -0x6a8(%rbp), %rdi
callq 0x61c0
leaq -0x6c8(%rbp), %rdi
leaq -0x598(%rbp), %rsi
callq 0x6130
jmp 0x837b
movq 0x51c46(%rip), %rsi     # 0x59fc8
leaq -0x2e2(%rbp), %rdi
leaq -0x488(%rbp), %rdx
leaq -0x6c8(%rbp), %rcx
callq 0x3b230
jmp 0x839e
leaq -0x6c8(%rbp), %rdi
callq 0x61c0
leaq -0x598(%rbp), %rdi
callq 0x6460
movq %rax, %rcx
movb $0x0, -0x6e9(%rbp)
xorl %eax, %eax
cmpq $0xc, %rcx
movb %al, -0x8c3(%rbp)
jbe 0x8434
leaq -0x598(%rbp), %rdi
movq %rdi, -0x8d0(%rbp)
callq 0x6460
movq -0x8d0(%rbp), %rsi
movq %rax, %rdx
addq $-0xa, %rdx
leaq -0x6e8(%rbp), %rdi
movq $-0x1, %rcx
callq 0x6310
jmp 0x8404
movb $0x1, -0x6e9(%rbp)
leaq 0x35a6c(%rip), %rsi     # 0x3de7e
leaq -0x6e8(%rbp), %rdi
callq 0x8ae0
movb %al, -0x8d1(%rbp)
jmp 0x8426
movb -0x8d1(%rbp), %al
movb %al, -0x8c3(%rbp)
jmp 0x8434
movb -0x8c3(%rbp), %al
movb %al, -0x8d2(%rbp)
testb $0x1, -0x6e9(%rbp)
jne 0x844b
jmp 0x8457
leaq -0x6e8(%rbp), %rdi
callq 0x61c0
movb -0x8d2(%rbp), %al
testb $0x1, %al
jne 0x8463
jmp 0x84c4
movl $0x2, -0x2ac(%rbp)
movl $0xf, -0x2c0(%rbp)
jmp 0x84ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x6c8(%rbp), %rdi
callq 0x61c0
jmp 0x8512
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
testb $0x1, -0x6e9(%rbp)
jne 0x84b6
jmp 0x84c2
leaq -0x6e8(%rbp), %rdi
callq 0x61c0
jmp 0x8512
movl $0x0, -0x2c0(%rbp)
leaq -0x598(%rbp), %rdi
callq 0x61c0
movl -0x2c0(%rbp), %eax
movl %eax, -0x8d8(%rbp)
testl %eax, %eax
je 0x850d
jmp 0x84ec
movl -0x8d8(%rbp), %eax
subl $0xe, %eax
je 0x7a48
jmp 0x84fd
movl -0x8d8(%rbp), %eax
subl $0xf, %eax
je 0x8523
jmp 0x8822
jmp 0x7a48
leaq -0x598(%rbp), %rdi
callq 0x61c0
jmp 0x88c7
cmpl $0x1, -0x2ac(%rbp)
jne 0x855f
movq 0x51a95(%rip), %rdi     # 0x59fc8
leaq 0x34e76(%rip), %rsi     # 0x3d3b0
callq 0x62e0
movq %rax, -0x8e0(%rbp)
jmp 0x8548
movq -0x8e0(%rbp), %rdi
movq 0x51a5a(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x855d
jmp 0x859d
cmpl $0x2, -0x2ac(%rbp)
jne 0x859b
movq 0x51a59(%rip), %rdi     # 0x59fc8
leaq 0x34e54(%rip), %rsi     # 0x3d3ca
callq 0x62e0
movq %rax, -0x8e8(%rbp)
jmp 0x8584
movq -0x8e8(%rbp), %rdi
movq 0x51a1e(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x8599
jmp 0x859b
jmp 0x859d
cmpl $0x0, -0x2ac(%rbp)
je 0x8818
movq 0x51a17(%rip), %rdi     # 0x59fc8
leaq 0x34e2a(%rip), %rsi     # 0x3d3e2
callq 0x62e0
movq %rax, -0x8f0(%rbp)
jmp 0x85c6
movq -0x8f0(%rbp), %rdi
movq 0x519dc(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x85db
leaq -0x711(%rbp), %rdi
movq %rdi, -0x8f8(%rbp)
callq 0x6550
movq -0x8f8(%rbp), %rdx
leaq 0x3583b(%rip), %rsi     # 0x3de37
leaq -0x710(%rbp), %rdi
callq 0x8a00
jmp 0x860a
leaq -0x711(%rbp), %rdi
callq 0x6340
leaq 0x34a8c(%rip), %rsi     # 0x3d0a9
leaq -0x710(%rbp), %rdi
callq 0x8ab0
movb %al, -0x8f9(%rbp)
jmp 0x8631
movb -0x8f9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x8fa(%rbp)
jne 0x8646
jmp 0x866f
leaq 0x34da6(%rip), %rsi     # 0x3d3f3
leaq -0x710(%rbp), %rdi
callq 0x8ab0
movb %al, -0x8fb(%rbp)
jmp 0x8661
movb -0x8fb(%rbp), %al
movb %al, -0x8fa(%rbp)
jmp 0x866f
movb -0x8fa(%rbp), %al
testb $0x1, %al
jne 0x867e
jmp 0x87c9
leaq 0x357b2(%rip), %rsi     # 0x3de37
leaq -0x710(%rbp), %rdi
callq 0x8ab0
movb %al, -0x8fc(%rbp)
jmp 0x8699
movb -0x8fc(%rbp), %al
testb $0x1, %al
jne 0x86a5
jmp 0x871e
movq 0x51944(%rip), %rdi     # 0x59ff0
leaq 0x34d42(%rip), %rsi     # 0x3d3f5
callq 0x62e0
movq %rax, -0x908(%rbp)
jmp 0x86c1
movq -0x908(%rbp), %rdi
movq 0x518e1(%rip), %rsi     # 0x59fb0
callq 0x6320
jmp 0x86d6
jmp 0x871e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x711(%rbp), %rdi
callq 0x6340
jmp 0x88c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x2b8(%rbp)
movl %eax, -0x2bc(%rbp)
leaq -0x710(%rbp), %rdi
callq 0x61c0
jmp 0x88c7
movq 0x518b3(%rip), %rdi     # 0x59fd8
leaq -0x710(%rbp), %rsi
callq 0x63e0
jmp 0x8733
movq 0x5189e(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6030
movb %al, -0x909(%rbp)
jmp 0x8751
movb -0x909(%rbp), %al
testb $0x1, %al
jne 0x875d
jmp 0x87c4
movq 0x51874(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x6580
movb %al, -0x90a(%rbp)
jmp 0x877b
movb -0x90a(%rbp), %al
testb $0x1, %al
jne 0x8787
jmp 0x879a
movl $0x0, -0x4(%rbp)
movl $0x1, -0x2c0(%rbp)
jmp 0x87fe
movq 0x51837(%rip), %rdi     # 0x59fd8
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
xorl %esi, %esi
callq 0x6500
jmp 0x87b4
movq 0x5181d(%rip), %rdi     # 0x59fd8
callq 0x6570
jmp 0x87c2
jmp 0x87c4
jmp 0x8616
leaq 0x348d9(%rip), %rsi     # 0x3d0a9
leaq -0x710(%rbp), %rdi
callq 0x8ae0
movb %al, -0x90b(%rbp)
jmp 0x87e4
movb -0x90b(%rbp), %al
testb $0x1, %al
jne 0x87f0
jmp 0x87f4
movb $0x1, -0x11(%rbp)
movl $0x0, -0x2c0(%rbp)
leaq -0x710(%rbp), %rdi
callq 0x61c0
movl -0x2c0(%rbp), %eax
testl %eax, %eax
jne 0x8822
jmp 0x8816
jmp 0x8818
movl $0x0, -0x2c0(%rbp)
leaq -0x578(%rbp), %rdi
callq 0x61c0
leaq -0x488(%rbp), %rdi
callq 0x9310
leaq -0x328(%rbp), %rdi
callq 0x61c0
leaq -0x308(%rbp), %rdi
callq 0x61c0
leaq -0x2a8(%rbp), %rdi
callq 0x9290
leaq -0x280(%rbp), %rdi
callq 0x91d0
leaq -0x268(%rbp), %rdi
callq 0x91d0
leaq -0x250(%rbp), %rdi
callq 0x9230
leaq -0x238(%rbp), %rdi
callq 0x92b0
leaq -0x220(%rbp), %rdi
callq 0x60b0
movl -0x2c0(%rbp), %eax
movl %eax, -0x910(%rbp)
testl %eax, %eax
je 0x88c2
jmp 0x88ac
movl -0x910(%rbp), %eax
subl $0x1, %eax
je 0x8941
jmp 0x88bd
jmp 0x683d
jmp 0x683d
leaq -0x578(%rbp), %rdi
callq 0x61c0
leaq -0x488(%rbp), %rdi
callq 0x9310
leaq -0x328(%rbp), %rdi
callq 0x61c0
leaq -0x308(%rbp), %rdi
callq 0x61c0
leaq -0x2a8(%rbp), %rdi
callq 0x9290
leaq -0x280(%rbp), %rdi
callq 0x91d0
leaq -0x268(%rbp), %rdi
callq 0x91d0
leaq -0x250(%rbp), %rdi
callq 0x9230
leaq -0x238(%rbp), %rdi
callq 0x92b0
leaq -0x220(%rbp), %rdi
callq 0x60b0
jmp 0x894d
movl -0x4(%rbp), %eax
addq $0x930, %rsp            # imm = 0x930
popq %rbp
retq
movq -0x2b8(%rbp), %rdi
callq 0x6540
movq %rax, %rdi
callq 0x89f0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)