// File: davmac314[P]dinit/src/dinit-monitor.cc
// Function: dinit_monitor_main(int, char**)
int dinit_monitor_main(int argc, char **argv)
{
    bool show_help = argc < 2;
    std::string control_socket_str;
    const char *control_socket_path = nullptr;
    bool user_dinit = (getuid() != 0);  // communicate with user daemon
    bool issue_init = false;  // request initial service state
    bool use_environ = false;  // listening on activation environment changes
    bool exit_after = false;  // exit after first issued command
    const char *str_started = "started";
    const char *str_stopped = "stopped";
    const char *str_failed = "failed";
    const char *str_set = "set";
    const char *str_unset = "unset";

    const char *command_str = nullptr;
    std::vector<const char *> services;

    for (int i = 1; i < argc; i++) {
        if (argv[i][0] == '-') {
            if (strcmp(argv[i], "--help") == 0) {
                show_help = true;
                break;
            }
            else if (strcmp(argv[i], "--version") == 0) {
                std::cout << "Dinit version " << DINIT_VERSION << ".\n";
                return 0;
            }
            else if (strcmp(argv[i], "--exit") == 0 || strcmp(argv[i], "-e") == 0) {
                exit_after = true;
            }
            else if (strcmp(argv[i], "--env") == 0 || strcmp(argv[i], "-E") == 0) {
                use_environ = true;
            }
            else if (strcmp(argv[i], "--system") == 0 || strcmp(argv[i], "-s") == 0) {
                user_dinit = false;
            }
            else if (strcmp(argv[i], "--user") == 0 || strcmp(argv[i], "-u") == 0) {
                user_dinit = true;
            }
            else if (strcmp(argv[i], "--initial") == 0 || strcmp(argv[i], "-i") == 0) {
                issue_init = true;
            }
            else if (strcmp(argv[i], "--socket-path") == 0 || strcmp(argv[i], "-p") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --socket-path/-p should be followed by socket path\n";
                    return 1;
                }
                control_socket_str = argv[i];
            }
            else if (strcmp(argv[i], "--str-started") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --str-started should be followed by an argument\n";
                    return 1;
                }
                str_started = argv[i];
            }
            else if (strcmp(argv[i], "--str-stopped") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --str-stopped should be followed by an argument\n";
                    return 1;
                }
                str_stopped = argv[i];
            }
            else if (strcmp(argv[i], "--str-failed") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --str-failed should be followed by an argument\n";
                    return 1;
                }
                str_failed = argv[i];
            }
            else if (strcmp(argv[i], "--str-set") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --str-set should be followed by an argument\n";
                    return 1;
                }
                str_set = argv[i];
            }
            else if (strcmp(argv[i], "--str-unset") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --str-unset should be followed by an argument\n";
                    return 1;
                }
                str_unset = argv[i];
            }
            else if (strcmp(argv[i], "-c") == 0 || strcmp(argv[i], "--command") == 0) {
                ++i;
                if (i == argc) {
                    std::cerr << "dinit-monitor: --command/-c should be followed by command\n";
                    return 1;
                }
                command_str = argv[i];
            }
        }
        else {
            services.emplace_back(argv[i]);
        }
    }

    if (show_help) {
        std::cout << "dinit-monitor:   monitor Dinit services\n"
                "\n"
                "Usage:\n"
                "    dinit-monitor [options] <service-names|environ-names...>\n"
                "\n"
                "Options:\n"
                "  --help           : show this help\n"
                "  -e, --exit       : exit after the first issued command\n"
                "  -E, --env        : monitor activation environment changes\n"
                "  -s, --system     : monitor system daemon (default if run as root)\n"
                "  -u, --user       : monitor user daemon\n"
                "  -i, --initial    : also execute command for initial service state\n"
                "  --str-started <started-text>\n"
                "                   : specify text describing status when service starts\n"
                "  --str-stopped <stopped-text>\n"
                "                   : specify text describing status when service stops\n"
                "  --str-failed <failed-text>\n"
                "                   : specify text describing status when service fails\n"
                "  --socket-path <path>, -p <path>\n"
                "                   : specify socket for communication with daemon\n"
                "  -c, --command    : specify command to execute on service status change\n"
                "                     (%n for service name, %s for status)\n";
        return 1;
    }

    if (services.empty() && !use_environ) {
        std::cerr << "dinit-monitor: specify at least one service name\n";
        return 1;
    }

    if (command_str == nullptr) {
        std::cerr << "dinit-monitor: command must specified\n";
        return 1;
    }

    std::vector<stringview> command_parts = split_command(command_str);
    if (command_parts.size() == 0) {
        std::cerr << "dinit-monitor: specified command is empty\n";
        return 1;
    }

    // Ignore SIGPIPE to avoid dying due to it, and set up a SIGCHLD handler (but mask it)
    sigset_t signal_mask;
    sigprocmask(SIG_SETMASK, nullptr, &signal_mask);
    sigaddset(&signal_mask, SIGCHLD);
    sigprocmask(SIG_SETMASK, &signal_mask, nullptr);
    signal(SIGPIPE, SIG_IGN);
    signal(SIGCHLD, sigchld_handler);

    // Locate control socket
    if (! control_socket_str.empty()) {
        control_socket_path = control_socket_str.c_str();
    }
    else {
        control_socket_path = get_default_socket_path(control_socket_str, user_dinit);
        if (control_socket_path == nullptr) {
            std::cerr << "dinit-monitor: cannot locate user home directory (set XDG_RUNTIME_DIR, "
                    "HOME, check /etc/passwd file, or specify socket path via -p)\n";
            return 1;
        }
    }

    try {
        int socknum = connect_to_daemon(control_socket_path);

        // Start by querying protocol version:
        cpbuffer_t rbuffer;
        uint16_t protocol_ver = check_protocol_version(min_cp_version, max_cp_version, rbuffer, socknum);

        // Load all services
        std::unordered_map<handle_t, const char *> service_map;
        std::unordered_set<std::string> environ_set;
        std::vector<std::pair<const char *, service_state_t>> service_init_state;
        std::string env_value;

        for (const char *service_name : services) {

            handle_t hndl;
            service_state_t state;

            if (use_environ) {
                environ_set.emplace(service_name);
                continue;
            }

            if (!load_service(socknum, rbuffer, service_name, &hndl, &state)) {
                std::cerr << "dinit-monitor: cannot load service: " << service_name << "\n";
                return 1;
            }

            service_map.emplace(hndl, service_name);
            service_init_state.push_back(std::make_pair(service_name, state));
        }

        if (use_environ) {
            // Request listening on environ events
            request_environ(socknum, rbuffer, protocol_ver);
            if (issue_init) {
                // Get the whole block and see if it's already set
                auto envsz = get_allenv(socknum, rbuffer);
                while (envsz > 0) {
                    bool issued;
                    envsz = read_var_and_issue(socknum, rbuffer, envsz, environ_set, env_value, command_parts, issued, str_set, str_unset);
                    if (issued && exit_after) {
                        return 0;
                    }
                }
            }
        }
        else if (issue_init) {
            // Issue initial status commands if requested
            for (auto state : service_init_state ) {
                if (state.second == service_state_t::STARTED) {
                    issue_command(state.first, nullptr, str_started, command_parts);
                    if (exit_after) {
                        return 0;
                    }
                }
                else if (state.second == service_state_t::STOPPED) {
                    issue_command(state.first, nullptr, str_stopped, command_parts);
                    if (exit_after) {
                        return 0;
                    }
                }
            }
        }

        // Watch information packets; execute notification

        int r = rbuffer.fill_to(socknum, 2);
        while (r > 0) {
            if (rbuffer[0] >= 100) {
                int pktlen = (unsigned char) rbuffer[1];
                fill_buffer_to(rbuffer, socknum, pktlen);

                if (use_environ && rbuffer[0] == (char)cp_info::ENVEVENT) {
                    envvar_len_t envln;
                    rbuffer.extract((char *) &envln, 3, sizeof(envln));
                    rbuffer.consume(pktlen);
                    // this will return 0, we don't want to consume after this
                    bool issued;
                    pktlen = read_var_and_issue(socknum, rbuffer, envln, environ_set, env_value, command_parts, issued, str_set, str_unset);
                    if (issued && exit_after) {
                        return 0;
                    }
                }
                else if (!use_environ && rbuffer[0] == (char)cp_info::SERVICEEVENT) {
                    handle_t ev_handle;
                    rbuffer.extract((char *) &ev_handle, 2, sizeof(ev_handle));
                    service_event_t event = static_cast<service_event_t>(rbuffer[2 + sizeof(ev_handle)]);

                    const char *service_name = service_map.at(ev_handle);
                    const char *event_str;

                    if (event == service_event_t::STARTED) {
                        event_str = str_started;
                    }
                    else if (event == service_event_t::STOPPED) {
                        event_str = str_stopped;
                    }
                    else if (event == service_event_t::FAILEDSTART) {
                        event_str = str_failed;
                    }
                    else {
                        goto consume_packet;
                    }
                    issue_command(service_name, nullptr, event_str, command_parts);
                    if (exit_after) {
                        return 0;
                    }
                }

                consume_packet:

                rbuffer.consume(pktlen);
                r = rbuffer.fill_to(socknum, 2);
            }
            else {
                // Not an information packet?
                std::cerr << "dinit-monitor: protocol error\n";
                return 1;
            }
        }

        if (r == -1) {
            perror("dinit-monitor: read");
        }
        else {
            std::cerr << "dinit-monitor: connection closed by server\n";
        }
        return 1;
    }
    catch (cp_old_client_exception &e) {
        std::cerr << "dinit-monitor: too old (server reports newer protocol version)\n";
    }
    catch (cp_old_server_exception &e) {
        std::cerr << "dinit-monitor: server too old or protocol error\n";
    }
    catch (cp_read_exception &e) {
        std::cerr << "dinit-monitor: control socket read failure or protocol error\n";
    }
    catch (cp_write_exception &e) {
        std::cerr << "dinit-monitor: control socket write error: " << std::strerror(e.errcode) << "\n";
    }
    catch (dinit_protocol_error &e) {
        std::cerr << "dinit-monitor: protocol error\n";
    }
    catch (general_error &ge) {
        std::cerr << "dinit-monitor";
        if (ge.get_action() != nullptr) {
            std::cerr << ": " << ge.get_action();
            std::string &arg = ge.get_arg();
            if (!arg.empty()) {
                std::cerr << " " << arg;
            }
        }
        if (ge.get_err() != 0) {
            std::cerr << ": " << strerror(ge.get_err());
        }
        std::cerr << '\n';
    }

    return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x810, %rsp            # imm = 0x810
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x2, -0x8(%rbp)
setl %al
andb $0x1, %al
movb %al, -0x11(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x3420
movq $0x0, -0x40(%rbp)
callq 0x3140
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x41(%rbp)
movb $0x0, -0x42(%rbp)
movb $0x0, -0x43(%rbp)
movb $0x0, -0x44(%rbp)
leaq 0xa9c9(%rip), %rax      # 0xe0bb
movq %rax, -0x50(%rbp)
leaq 0xaa0c(%rip), %rax      # 0xe109
movq %rax, -0x58(%rbp)
leaq 0xaa4f(%rip), %rax      # 0xe157
movq %rax, -0x60(%rbp)
leaq 0xaa90(%rip), %rax      # 0xe1a3
movq %rax, -0x68(%rbp)
leaq 0xaacb(%rip), %rax      # 0xe1e9
movq %rax, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
leaq -0x90(%rbp), %rdi
callq 0x5b30
movl $0x1, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x3d98
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2d, %eax
jne 0x3d63
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa888(%rip), %rsi      # 0xe008
callq 0x3430
cmpl $0x0, %eax
jne 0x3793
movb $0x1, -0x11(%rbp)
jmp 0x3d98
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa866(%rip), %rsi      # 0xe00f
callq 0x3430
cmpl $0x0, %eax
jne 0x382d
movq 0x12816(%rip), %rdi     # 0x15fd0
leaq 0xa858(%rip), %rsi      # 0xe019
callq 0x32a0
movq %rax, -0x700(%rbp)
jmp 0x37cf
movq -0x700(%rbp), %rdi
leaq 0xb256(%rip), %rsi      # 0xea33
callq 0x32a0
movq %rax, -0x708(%rbp)
jmp 0x37eb
movq -0x708(%rbp), %rdi
leaq 0xa82f(%rip), %rsi      # 0xe028
callq 0x32a0
jmp 0x3800
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x4c0f
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa7e8(%rip), %rsi      # 0xe02b
callq 0x3430
cmpl $0x0, %eax
je 0x386d
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa7cf(%rip), %rsi      # 0xe032
callq 0x3430
cmpl $0x0, %eax
jne 0x3876
movb $0x1, -0x44(%rbp)
jmp 0x3d5d
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa7a9(%rip), %rsi      # 0xe035
callq 0x3430
cmpl $0x0, %eax
je 0x38b6
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa78f(%rip), %rsi      # 0xe03b
callq 0x3430
cmpl $0x0, %eax
jne 0x38bf
movb $0x1, -0x43(%rbp)
jmp 0x3d5b
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa769(%rip), %rsi      # 0xe03e
callq 0x3430
cmpl $0x0, %eax
je 0x38ff
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa752(%rip), %rsi      # 0xe047
callq 0x3430
cmpl $0x0, %eax
jne 0x3908
movb $0x0, -0x41(%rbp)
jmp 0x3d59
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa72c(%rip), %rsi      # 0xe04a
callq 0x3430
cmpl $0x0, %eax
je 0x3948
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa713(%rip), %rsi      # 0xe051
callq 0x3430
cmpl $0x0, %eax
jne 0x3951
movb $0x1, -0x41(%rbp)
jmp 0x3d57
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa6ed(%rip), %rsi      # 0xe054
callq 0x3430
cmpl $0x0, %eax
je 0x3991
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa6d7(%rip), %rsi      # 0xe05e
callq 0x3430
cmpl $0x0, %eax
jne 0x399a
movb $0x1, -0x42(%rbp)
jmp 0x3d55
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa6b1(%rip), %rsi      # 0xe061
callq 0x3430
cmpl $0x0, %eax
je 0x39da
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa69f(%rip), %rsi      # 0xe06f
callq 0x3430
cmpl $0x0, %eax
jne 0x3a3e
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3a1f
movq 0x125f5(%rip), %rdi     # 0x15ff0
leaq 0xa670(%rip), %rsi      # 0xe072
callq 0x32a0
jmp 0x3a09
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq -0x38(%rbp), %rdi
callq 0x3400
jmp 0x3a39
jmp 0x3d53
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa661(%rip), %rsi      # 0xe0b5
callq 0x3430
cmpl $0x0, %eax
jne 0x3abb
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3aa3
movq 0x12571(%rip), %rdi     # 0x15ff0
leaq 0xa63d(%rip), %rsi      # 0xe0c3
callq 0x32a0
jmp 0x3a8d
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x50(%rbp)
jmp 0x3d51
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa632(%rip), %rsi      # 0xe103
callq 0x3430
cmpl $0x0, %eax
jne 0x3b38
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3b20
movq 0x124f4(%rip), %rdi     # 0x15ff0
leaq 0xa60e(%rip), %rsi      # 0xe111
callq 0x32a0
jmp 0x3b0a
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x58(%rbp)
jmp 0x3d4f
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa603(%rip), %rsi      # 0xe151
callq 0x3430
cmpl $0x0, %eax
jne 0x3bb5
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3b9d
movq 0x12477(%rip), %rdi     # 0x15ff0
leaq 0xa5de(%rip), %rsi      # 0xe15e
callq 0x32a0
jmp 0x3b87
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
jmp 0x3d4d
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa5d2(%rip), %rsi      # 0xe19d
callq 0x3430
cmpl $0x0, %eax
jne 0x3c32
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3c1a
movq 0x123fa(%rip), %rdi     # 0x15ff0
leaq 0xa5aa(%rip), %rsi      # 0xe1a7
callq 0x32a0
jmp 0x3c04
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x68(%rbp)
jmp 0x3d4b
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa59b(%rip), %rsi      # 0xe1e3
callq 0x3430
cmpl $0x0, %eax
jne 0x3caf
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3c97
movq 0x1237d(%rip), %rdi     # 0x15ff0
leaq 0xa575(%rip), %rsi      # 0xe1ef
callq 0x32a0
jmp 0x3c81
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x70(%rbp)
jmp 0x3d49
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa568(%rip), %rsi      # 0xe22d
callq 0x3430
cmpl $0x0, %eax
je 0x3cef
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0xa54b(%rip), %rsi      # 0xe230
callq 0x3430
cmpl $0x0, %eax
jne 0x3d47
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %eax
cmpl -0x8(%rbp), %eax
jne 0x3d34
movq 0x122e0(%rip), %rdi     # 0x15ff0
leaq 0xa523(%rip), %rsi      # 0xe23a
callq 0x32a0
jmp 0x3d1e
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x78(%rbp)
jmp 0x3d49
jmp 0x3d4b
jmp 0x3d4d
jmp 0x3d4f
jmp 0x3d51
jmp 0x3d53
jmp 0x3d55
jmp 0x3d57
jmp 0x3d59
jmp 0x3d5b
jmp 0x3d5d
jmp 0x3d5f
jmp 0x3d61
jmp 0x3d82
movq -0x10(%rbp), %rax
movslq -0x94(%rbp), %rcx
leaq (%rax,%rcx,8), %rsi
leaq -0x90(%rbp), %rdi
callq 0x5b50
jmp 0x3d80
jmp 0x3d82
jmp 0x3d84
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
jmp 0x3740
testb $0x1, -0x11(%rbp)
je 0x3dc9
movq 0x1222b(%rip), %rdi     # 0x15fd0
leaq 0xa4c9(%rip), %rsi      # 0xe275
callq 0x32a0
jmp 0x3db3
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
leaq -0x90(%rbp), %rdi
callq 0x5bd0
testb $0x1, %al
jne 0x3ddb
jmp 0x3e0c
testb $0x1, -0x43(%rbp)
jne 0x3e0c
movq 0x12208(%rip), %rdi     # 0x15ff0
leaq 0xa860(%rip), %rsi      # 0xe64f
callq 0x32a0
jmp 0x3df6
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
cmpq $0x0, -0x78(%rbp)
jne 0x3e3e
movq 0x121d6(%rip), %rdi     # 0x15ff0
leaq 0xa860(%rip), %rsi      # 0xe681
callq 0x32a0
jmp 0x3e28
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bee
movq -0x78(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x4c40
jmp 0x3e50
leaq -0xc0(%rbp), %rdi
callq 0x5c10
cmpq $0x0, %rax
jne 0x3ea4
movq 0x12187(%rip), %rdi     # 0x15ff0
leaq 0xa838(%rip), %rsi      # 0xe6a8
callq 0x32a0
jmp 0x3e77
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x4be0
movl $0x2, %edi
xorl %eax, %eax
movl %eax, %esi
leaq -0x140(%rbp), %rdx
callq 0x3120
leaq -0x140(%rbp), %rdi
movl $0x11, %esi
callq 0x3480
movl $0x2, %edi
leaq -0x140(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
callq 0x3120
movl $0xd, %edi
movl $0x1, %esi
callq 0x3340
movl $0x11, %edi
leaq 0xf06(%rip), %rsi       # 0x4e00
callq 0x3340
leaq -0x38(%rbp), %rdi
callq 0x34d0
testb $0x1, %al
jne 0x3f1b
leaq -0x38(%rbp), %rdi
callq 0x30e0
movq %rax, -0x40(%rbp)
jmp 0x3f73
movzbl -0x41(%rbp), %esi
andl $0x1, %esi
leaq -0x38(%rbp), %rdi
callq 0x5c30
movq %rax, -0x710(%rbp)
jmp 0x3f34
movq -0x710(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x3f71
movq 0x120a3(%rip), %rdi     # 0x15ff0
leaq 0xa77f(%rip), %rsi      # 0xe6d3
callq 0x32a0
jmp 0x3f5b
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bd2
jmp 0x3f73
movq -0x40(%rbp), %rdi
callq 0x5d60
movl %eax, -0x714(%rbp)
jmp 0x3f84
movl -0x714(%rbp), %eax
movl %eax, -0x144(%rbp)
leaq -0x54c(%rbp), %rdi
movq %rdi, -0x720(%rbp)
callq 0x5fe0
movq -0x720(%rbp), %rdx
movl -0x144(%rbp), %ecx
movl $0x1, %edi
movl $0x5, %esi
callq 0x6010
movw %ax, -0x716(%rbp)
jmp 0x3fc8
movw -0x716(%rbp), %ax
movw %ax, -0x54e(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x6170
leaq -0x5c0(%rbp), %rdi
callq 0x6190
leaq -0x5d8(%rbp), %rdi
callq 0x61b0
leaq -0x5f8(%rbp), %rdi
callq 0x3420
leaq -0x90(%rbp), %rax
movq %rax, -0x600(%rbp)
movq -0x600(%rbp), %rdi
callq 0x61d0
movq %rax, -0x608(%rbp)
movq -0x600(%rbp), %rdi
callq 0x6200
movq %rax, -0x610(%rbp)
leaq -0x608(%rbp), %rdi
leaq -0x610(%rbp), %rsi
callq 0x6230
testb $0x1, %al
jne 0x4056
jmp 0x4527
leaq -0x608(%rbp), %rdi
callq 0x6270
movq (%rax), %rax
movq %rax, -0x618(%rbp)
testb $0x1, -0x43(%rbp)
je 0x43c8
leaq -0x5c0(%rbp), %rdi
leaq -0x618(%rbp), %rsi
callq 0x6290
movb %dl, -0x729(%rbp)
movq %rax, -0x728(%rbp)
jmp 0x4098
movb -0x729(%rbp), %al
movq -0x728(%rbp), %rcx
movq %rcx, -0x630(%rbp)
movb %al, -0x628(%rbp)
jmp 0x4516
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
jmp 0x410d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
leaq -0x5f8(%rbp), %rdi
callq 0x3190
leaq -0x5d8(%rbp), %rdi
callq 0x6760
leaq -0x5c0(%rbp), %rdi
callq 0x67c0
leaq -0x588(%rbp), %rdi
callq 0x67e0
movl -0xa4(%rbp), %eax
movl %eax, -0x730(%rbp)
movl $0x6, %ecx
cmpl %ecx, %eax
jne 0x4169
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6f8(%rbp)
movq 0x11eb4(%rip), %rdi     # 0x15ff0
leaq 0xa742(%rip), %rsi      # 0xe885
callq 0x32a0
jmp 0x414a
callq 0x34c0
jmp 0x4151
jmp 0x4153
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4bd2
movl -0x730(%rbp), %eax
movl $0x5, %ecx
cmpl %ecx, %eax
jne 0x41a9
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6f0(%rbp)
movq 0x11e5e(%rip), %rdi     # 0x15ff0
leaq 0xa6bb(%rip), %rsi      # 0xe854
callq 0x32a0
jmp 0x41a0
callq 0x34c0
jmp 0x41a7
jmp 0x4153
movl -0x730(%rbp), %eax
movl $0x4, %ecx
cmpl %ecx, %eax
jne 0x41ec
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6e8(%rbp)
movq 0x11e1e(%rip), %rdi     # 0x15ff0
leaq 0xa63d(%rip), %rsi      # 0xe816
callq 0x32a0
jmp 0x41e0
callq 0x34c0
jmp 0x41e7
jmp 0x4153
movl -0x730(%rbp), %eax
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x4271
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6e0(%rbp)
movq 0x11ddb(%rip), %rdi     # 0x15ff0
leaq 0xa5ce(%rip), %rsi      # 0xe7ea
callq 0x32a0
movq %rax, -0x738(%rbp)
jmp 0x422a
movq -0x6e0(%rbp), %rax
movl (%rax), %edi
callq 0x30a0
movq -0x738(%rbp), %rdi
movq %rax, %rsi
callq 0x32a0
movq %rax, -0x740(%rbp)
jmp 0x4250
movq -0x740(%rbp), %rdi
leaq 0xa665(%rip), %rsi      # 0xe8c3
callq 0x32a0
jmp 0x4265
callq 0x34c0
jmp 0x426c
jmp 0x4153
movl -0x730(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x42b4
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6d8(%rbp)
movq 0x11d56(%rip), %rdi     # 0x15ff0
leaq 0xa4dc(%rip), %rsi      # 0xe77d
callq 0x32a0
jmp 0x42a8
callq 0x34c0
jmp 0x42af
jmp 0x4153
movl -0x730(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x4be0
movq -0xa0(%rbp), %rdi
callq 0x30d0
movq %rax, -0x6c8(%rbp)
movq 0x11d0f(%rip), %rdi     # 0x15ff0
leaq 0xa4f4(%rip), %rsi      # 0xe7dc
callq 0x32a0
jmp 0x42ef
movq -0x6c8(%rbp), %rdi
callq 0x6800
movq %rax, -0x748(%rbp)
jmp 0x4304
movq -0x748(%rbp), %rax
cmpq $0x0, %rax
je 0x4aba
movq 0x11cd4(%rip), %rdi     # 0x15ff0
leaq 0xa457(%rip), %rsi      # 0xe77a
callq 0x32a0
movq %rax, -0x750(%rbp)
jmp 0x4331
movq -0x6c8(%rbp), %rdi
callq 0x6800
movq %rax, -0x758(%rbp)
jmp 0x4346
movq -0x758(%rbp), %rsi
movq -0x750(%rbp), %rdi
callq 0x32a0
jmp 0x435b
movq -0x6c8(%rbp), %rdi
callq 0x6820
movq %rax, -0x760(%rbp)
jmp 0x4370
movq -0x760(%rbp), %rax
movq %rax, -0x6d0(%rbp)
movq -0x6d0(%rbp), %rdi
callq 0x34d0
testb $0x1, %al
jne 0x4ab8
movq 0x11c57(%rip), %rdi     # 0x15ff0
leaq 0xa3db(%rip), %rsi      # 0xe77b
callq 0x32a0
movq %rax, -0x768(%rbp)
jmp 0x43ae
movq -0x768(%rbp), %rdi
movq -0x6d0(%rbp), %rsi
callq 0x3270
jmp 0x43c3
jmp 0x4ab8
movl -0x144(%rbp), %edi
movq -0x618(%rbp), %rdx
leaq -0x54c(%rbp), %rsi
leaq -0x61c(%rbp), %rcx
leaq -0x61d(%rbp), %r8
callq 0x4e10
movb %al, -0x769(%rbp)
jmp 0x43f7
movb -0x769(%rbp), %al
testb $0x1, %al
jne 0x4466
jmp 0x4403
movq 0x11be6(%rip), %rdi     # 0x15ff0
leaq 0xa347(%rip), %rsi      # 0xe758
callq 0x32a0
movq %rax, -0x778(%rbp)
jmp 0x441f
movq -0x778(%rbp), %rdi
movq -0x618(%rbp), %rsi
callq 0x32a0
movq %rax, -0x780(%rbp)
jmp 0x443b
movq -0x780(%rbp), %rdi
leaq 0xa47a(%rip), %rsi      # 0xe8c3
callq 0x32a0
jmp 0x4450
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
leaq -0x588(%rbp), %rdi
leaq -0x61c(%rbp), %rsi
leaq -0x618(%rbp), %rdx
callq 0x62d0
movb %dl, -0x789(%rbp)
movq %rax, -0x788(%rbp)
jmp 0x448f
movb -0x789(%rbp), %al
movq -0x788(%rbp), %rcx
movq %rcx, -0x640(%rbp)
movb %al, -0x638(%rbp)
leaq -0x618(%rbp), %rdi
leaq -0x61d(%rbp), %rsi
callq 0x6350
movb %dl, -0x799(%rbp)
movq %rax, -0x798(%rbp)
jmp 0x44cb
movb -0x799(%rbp), %al
movq -0x798(%rbp), %rcx
movq %rcx, -0x660(%rbp)
movb %al, -0x658(%rbp)
movb -0x658(%rbp), %al
movb %al, -0x648(%rbp)
movq -0x660(%rbp), %rax
movq %rax, -0x650(%rbp)
leaq -0x5d8(%rbp), %rdi
leaq -0x650(%rbp), %rsi
callq 0x6320
jmp 0x4514
jmp 0x4516
leaq -0x608(%rbp), %rdi
callq 0x6380
jmp 0x403a
testb $0x1, -0x43(%rbp)
je 0x4620
movl -0x144(%rbp), %edi
movzwl -0x54e(%rbp), %edx
leaq -0x54c(%rbp), %rsi
callq 0x4e80
jmp 0x454c
testb $0x1, -0x42(%rbp)
je 0x461b
movl -0x144(%rbp), %edi
leaq -0x54c(%rbp), %rsi
callq 0x4f30
movq %rax, -0x7a8(%rbp)
jmp 0x4571
movq -0x7a8(%rbp), %rax
movq %rax, -0x668(%rbp)
cmpq $0x0, -0x668(%rbp)
jbe 0x4619
movl -0x144(%rbp), %edi
movq -0x668(%rbp), %rdx
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %rsi
movq %rsp, %rax
movq %rsi, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq -0x669(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x54c(%rbp), %rsi
leaq -0x5c0(%rbp), %rcx
leaq -0x5f8(%rbp), %r8
leaq -0xc0(%rbp), %r9
callq 0x4fe0
movq %rax, -0x7b0(%rbp)
jmp 0x45e1
movq -0x7b0(%rbp), %rax
movq %rax, -0x668(%rbp)
testb $0x1, -0x669(%rbp)
je 0x4614
testb $0x1, -0x44(%rbp)
je 0x4614
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x457f
jmp 0x461b
jmp 0x4740
testb $0x1, -0x42(%rbp)
je 0x473e
leaq -0x5d8(%rbp), %rax
movq %rax, -0x678(%rbp)
movq -0x678(%rbp), %rdi
callq 0x63a0
movq %rax, -0x680(%rbp)
movq -0x678(%rbp), %rdi
callq 0x63d0
movq %rax, -0x688(%rbp)
leaq -0x680(%rbp), %rdi
leaq -0x688(%rbp), %rsi
callq 0x6400
testb $0x1, %al
jne 0x467a
jmp 0x473c
leaq -0x680(%rbp), %rdi
callq 0x6440
movq (%rax), %rcx
movq %rcx, -0x698(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x690(%rbp)
cmpb $0x2, -0x690(%rbp)
jne 0x46e1
movq -0x698(%rbp), %rdi
movq -0x50(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %esi
leaq -0xc0(%rbp), %rcx
callq 0x51e0
jmp 0x46c3
testb $0x1, -0x44(%rbp)
je 0x46df
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x4729
cmpb $0x0, -0x690(%rbp)
jne 0x4727
movq -0x698(%rbp), %rdi
movq -0x58(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %esi
leaq -0xc0(%rbp), %rcx
callq 0x51e0
jmp 0x4709
testb $0x1, -0x44(%rbp)
je 0x4725
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x4727
jmp 0x4729
jmp 0x472b
leaq -0x680(%rbp), %rdi
callq 0x6460
jmp 0x465e
jmp 0x473e
jmp 0x4740
movl -0x144(%rbp), %esi
leaq -0x54c(%rbp), %rdi
movl $0x2, %edx
callq 0x6480
movl %eax, -0x69c(%rbp)
cmpl $0x0, -0x69c(%rbp)
jle 0x4a26
leaq -0x54c(%rbp), %rdi
xorl %esi, %esi
callq 0x64e0
movsbl %al, %eax
cmpl $0x64, %eax
jl 0x49f9
leaq -0x54c(%rbp), %rdi
movq %rdi, -0x7b8(%rbp)
movl $0x1, %esi
callq 0x64e0
movq -0x7b8(%rbp), %rdi
movzbl %al, %eax
movl %eax, -0x6a0(%rbp)
movl -0x144(%rbp), %esi
movl -0x6a0(%rbp), %edx
callq 0x6520
jmp 0x47bf
testb $0x1, -0x43(%rbp)
je 0x48a6
leaq -0x54c(%rbp), %rdi
xorl %esi, %esi
callq 0x64e0
movsbl %al, %eax
cmpl $0x66, %eax
jne 0x48a6
leaq -0x54c(%rbp), %rdi
movq %rdi, -0x7c8(%rbp)
leaq -0x6a2(%rbp), %rsi
movl $0x3, %edx
movl $0x2, %ecx
callq 0x6620
movq -0x7c8(%rbp), %rdi
movl -0x6a0(%rbp), %esi
callq 0x66d0
movq -0x7c8(%rbp), %rsi
movl -0x144(%rbp), %edi
movzwl -0x6a2(%rbp), %eax
movl %eax, %edx
movq -0x68(%rbp), %rcx
movq -0x70(%rbp), %r8
movq %rsp, %rax
movq %r8, 0x10(%rax)
movq %rcx, 0x8(%rax)
leaq -0x6a3(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x5c0(%rbp), %rcx
leaq -0x5f8(%rbp), %r8
leaq -0xc0(%rbp), %r9
callq 0x4fe0
movq %rax, -0x7c0(%rbp)
jmp 0x486f
movq -0x7c0(%rbp), %rax
movl %eax, -0x6a0(%rbp)
testb $0x1, -0x6a3(%rbp)
je 0x48a1
testb $0x1, -0x44(%rbp)
je 0x48a1
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x49c6
testb $0x1, -0x43(%rbp)
jne 0x49c4
leaq -0x54c(%rbp), %rdi
xorl %esi, %esi
callq 0x64e0
movsbl %al, %eax
cmpl $0x64, %eax
jne 0x49c4
leaq -0x54c(%rbp), %rdi
movq %rdi, -0x7e0(%rbp)
leaq -0x6a8(%rbp), %rsi
movq %rsi, -0x7d8(%rbp)
movl $0x2, %edx
movl $0x4, %ecx
callq 0x6620
movq -0x7e0(%rbp), %rdi
movl $0x6, %esi
callq 0x64e0
movq -0x7d8(%rbp), %rsi
movsbl %al, %eax
movl %eax, -0x6ac(%rbp)
leaq -0x588(%rbp), %rdi
callq 0x6730
movq %rax, -0x7d0(%rbp)
jmp 0x492b
movq -0x7d0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x6b8(%rbp)
cmpl $0x0, -0x6ac(%rbp)
jne 0x4952
movq -0x50(%rbp), %rax
movq %rax, -0x6c0(%rbp)
jmp 0x4984
cmpl $0x1, -0x6ac(%rbp)
jne 0x4968
movq -0x58(%rbp), %rax
movq %rax, -0x6c0(%rbp)
jmp 0x4982
cmpl $0x2, -0x6ac(%rbp)
jne 0x497e
movq -0x60(%rbp), %rax
movq %rax, -0x6c0(%rbp)
jmp 0x4980
jmp 0x49c8
jmp 0x4982
jmp 0x4984
movq -0x6b8(%rbp), %rdi
movq -0x6c0(%rbp), %rdx
xorl %r8d, %r8d
movl %r8d, %esi
leaq -0xc0(%rbp), %rcx
callq 0x51e0
jmp 0x49a6
testb $0x1, -0x44(%rbp)
je 0x49c2
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x49c4
jmp 0x49c6
jmp 0x49c8
movl -0x6a0(%rbp), %esi
leaq -0x54c(%rbp), %rdi
callq 0x66d0
movl -0x144(%rbp), %esi
leaq -0x54c(%rbp), %rdi
movl $0x2, %edx
callq 0x6480
movl %eax, -0x69c(%rbp)
jmp 0x4a21
movq 0x115f0(%rip), %rdi     # 0x15ff0
leaq 0x9d76(%rip), %rsi      # 0xe77d
callq 0x32a0
jmp 0x4a0e
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
jmp 0x4a67
jmp 0x475d
cmpl $-0x1, -0x69c(%rbp)
jne 0x4a3f
leaq 0x9d66(%rip), %rdi      # 0xe79c
callq 0x3230
jmp 0x4a3d
jmp 0x4a56
movq 0x115aa(%rip), %rdi     # 0x15ff0
leaq 0x9d63(%rip), %rsi      # 0xe7b0
callq 0x32a0
jmp 0x4a54
jmp 0x4a56
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa8(%rbp)
leaq -0x5f8(%rbp), %rdi
callq 0x3190
leaq -0x5d8(%rbp), %rdi
callq 0x6760
leaq -0x5c0(%rbp), %rdi
callq 0x67c0
leaq -0x588(%rbp), %rdi
callq 0x67e0
jmp 0x4bd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4b46
jmp 0x4aba
movq -0x6c8(%rbp), %rdi
callq 0x6840
movl %eax, -0x7e4(%rbp)
jmp 0x4ace
movl -0x7e4(%rbp), %eax
cmpl $0x0, %eax
je 0x4b27
movq 0x11510(%rip), %rdi     # 0x15ff0
leaq 0x9c93(%rip), %rsi      # 0xe77a
callq 0x32a0
movq %rax, -0x7f0(%rbp)
jmp 0x4af5
movq -0x6c8(%rbp), %rdi
callq 0x6840
movl %eax, -0x7f4(%rbp)
jmp 0x4b09
movl -0x7f4(%rbp), %edi
callq 0x30a0
movq -0x7f0(%rbp), %rdi
movq %rax, %rsi
callq 0x32a0
jmp 0x4b25
jmp 0x4b27
movq 0x114c2(%rip), %rdi     # 0x15ff0
movl $0xa, %esi
callq 0x3320
jmp 0x4b3a
callq 0x34c0
jmp 0x4b41
jmp 0x4153
jmp 0x4be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4b64
jmp 0x4be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4b7f
jmp 0x4be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4b9a
jmp 0x4be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4bb5
jmp 0x4be0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xa0(%rbp)
movl %eax, -0xa4(%rbp)
callq 0x34c0
jmp 0x4bd0
jmp 0x4be0
leaq -0xc0(%rbp), %rdi
callq 0x6860
jmp 0x4bee
leaq -0xc0(%rbp), %rdi
callq 0x6860
jmp 0x4c0f
leaq -0x90(%rbp), %rdi
callq 0x68c0
leaq -0x38(%rbp), %rdi
callq 0x3190
movl -0x4(%rbp), %eax
addq $0x810, %rsp            # imm = 0x810
popq %rbp
retq
leaq -0x90(%rbp), %rdi
callq 0x68c0
leaq -0x38(%rbp), %rdi
callq 0x3190
movq -0xa0(%rbp), %rdi
callq 0x3500
movq %rax, %rdi
callq 0x6850
nopl (%rax,%rax)