// File: /workspace/github_cpp_makefile_star2_O3/davmac314[P]dinit/src/dinit.cc
// Function: dinit_main(int, char**)
int dinit_main(int argc, char **argv)
{
    using namespace std;
    
    am_system_mgr = (getpid() == 1);
    am_system_init = (getuid() == 0);
    
    struct options opts;

    // if we are PID 1 and user id 0, we are *most probably* the system init. (Or on linux at least, we
    // could instead be in a container; then we expect -o argument and unset this then).
    opts.process_sys_args = am_system_mgr && am_system_init;

    const char * &env_file = opts.env_file;
    bool &control_socket_path_set = opts.control_socket_path_set;
    bool &env_file_set = opts.env_file_set;
    bool &log_specified = opts.log_specified;
    service_dir_opt &service_dir_opts = opts.service_dir_opts;
    list<const char *> &services_to_start = opts.services_to_start;

    for (int i = 1; i < argc; i++) {
        int p = process_commandline_arg(argv, argc, i, opts);
        if (p == -1) {
            // clean exit
            return 0;
        }
        if (p == 1) {
            // error exit
            return 1;
        }
    }

    if (am_system_mgr) {
        // setup STDIN, STDOUT, STDERR so that we can use them
        int onefd = open("/dev/console", O_RDONLY, 0);
        if (onefd != -1) {
            dup2(onefd, 0);
        }
        int twofd = open("/dev/console", O_RDWR, 0);
        if (twofd != -1) {
            dup2(twofd, 1);
            dup2(twofd, 2);
        }
        
        if (onefd > 2) close(onefd);
        if (twofd > 2) close(twofd);

        if (! env_file_set) {
            env_file = env_file_path;
        }

        // we will assume an empty cgroups root path
        #if SUPPORT_CGROUPS
        have_cgroups_path = true;
        #endif
    }

    /* Set up signal handlers etc */
    sigset_t sigwait_set;
    if (am_system_mgr) {
        // Block all signals in system manager mode - don't want to chance provoking a signal that
        // will suspend or terminate the process
        sigfillset(&sigwait_set);
    }
    else {
        sigemptyset(&sigwait_set);
        sigaddset(&sigwait_set, SIGCHLD);
        sigaddset(&sigwait_set, SIGINT);
        sigaddset(&sigwait_set, SIGTERM);
    }
    sigprocmask(SIG_BLOCK, &sigwait_set, &orig_signal_mask);

    // Terminal access control signals - we ignore these so that dinit can't be
    // suspended if it writes to the terminal after some other process has claimed
    // ownership of it.
    signal(SIGTSTP, SIG_IGN);
    signal(SIGTTIN, SIG_IGN);
    signal(SIGTTOU, SIG_IGN);
    
    signal(SIGPIPE, SIG_IGN);
    
    event_loop.init();

    if (!am_system_init && !control_socket_path_set) {
        const char * rundir = getenv("XDG_RUNTIME_DIR");
        const char * sockname = "dinitctl";
        if (rundir == nullptr) {
            rundir = service_dir_opt::get_user_home();
            sockname = ".dinitctl";
        }
        if (rundir != nullptr) {
            control_socket_str = rundir;
            control_socket_str.push_back('/');
            control_socket_str += sockname;
            control_socket_path = control_socket_str.c_str();
        }
    }
    
    if (services_to_start.empty()) {
        services_to_start.push_back("boot");
    }

    // Set up signal handlers
    callback_signal_handler sigterm_watcher {sigterm_cb};
    callback_signal_handler sigint_watcher;
    callback_signal_handler sigquit_watcher;

    if (am_system_mgr) {
        sigint_watcher.set_cb_func(sigint_reboot_cb);
        sigquit_watcher.set_cb_func(sigquit_cb);
    }
    else {
        sigint_watcher.set_cb_func(sigterm_cb);
    }

    sigint_watcher.add_watch(event_loop, SIGINT);
    sigterm_watcher.add_watch(event_loop, SIGTERM);
    
    if (am_system_mgr) {
        // PID 1: we may ask for console input; SIGQUIT exec's shutdown
        console_input_io.add_watch(event_loop, STDIN_FILENO, dasynq::IN_EVENTS, false);
        sigquit_watcher.add_watch(event_loop, SIGQUIT);
        // (If not PID 1, we instead just let SIGQUIT perform the default action.)
    }

    init_log(log_is_syslog);
    log_flush_timer.add_timer(event_loop, dasynq::clock_type::MONOTONIC);

    #if SUPPORT_CGROUPS
    if (!have_cgroups_path) {
        find_cgroup_path();
        // We will press on if the cgroup root path could not be identified, since services might
        // not require cgroups anyway and/or might only specify absolute cgroups paths.
    }
    #endif

    // Try to open control socket (may fail due to readonly filesystem, we ignore that if we are
    // system init)
    if (!open_control_socket(!am_system_init)) {
        flush_log();
        return EXIT_FAILURE;
    }
    
#ifdef __linux__
    if (am_system_mgr) {
        // Disable non-critical kernel output to console
        klogctl(6 /* SYSLOG_ACTION_CONSOLE_OFF */, nullptr, 0);
        // Make ctrl+alt+del combination send SIGINT to PID 1 (this process)
        reboot(RB_DISABLE_CAD);
    }

    // Mark ourselves as a subreaper. This means that if a process we start double-forks, the
    // orphaned child will re-parent to us rather than to PID 1 (although that could be us too).
    prctl(PR_SET_CHILD_SUBREAPER, 1);
#elif defined(__FreeBSD__) || defined(__DragonFly__)
    // Documentation (man page) for this kind-of sucks. PROC_REAP_ACQUIRE "acquires the reaper status for
    // the current process" but does that mean the first two arguments still need valid values to be
    // supplied? We'll play it safe and explicitly target our own process:
    procctl(P_PID, getpid(), PROC_REAP_ACQUIRE, NULL);
#endif
    
    service_dir_opts.build_paths(am_system_init);

    // Start requested services

    services = new dirload_service_set(std::move(service_dir_opts.get_paths()));

    setup_log_console_handoff(services);

    if (am_system_init) {
        log(loglevel_t::NOTICE, false, "Starting system");
    }
    
    // If a log file was specified, open it now.
    if (log_specified) {
        setup_external_log();
        if (!am_system_init && !external_log_open) {
            flush_log(); // flush console messages
            return EXIT_FAILURE;
        }
    }

    if (env_file != nullptr) {
        read_env_file(env_file, true, main_env, false);
    }

    for (auto svc : services_to_start) {
        try {
            services->start_service(svc);
            // Note in general if we fail to start a service we don't need any special error handling,
            // since we either leave other services running or, if it was the only service, then no
            // services will be running and we will process normally (reboot if system process,
            // exit if user process).
        }
        catch (service_not_found &snf) {
            log(loglevel_t::ERROR, snf.service_name, ": could not find service description.");
        }
        catch (service_description_exc &sde) {
            log_service_load_failure(sde);
        }
        catch (service_load_exc &sle) {
            log(loglevel_t::ERROR, sle.service_name, ": error loading: ", sle.exc_description);
        }
        catch (std::bad_alloc &badalloce) {
            log(loglevel_t::ERROR, "Out of memory when trying to start service: ", svc, ".");
            break;
        }
    }

    // Notify readiness just before the event loop starts (and after services
    // are scheduled to start). If the socket is not ready yet (may be in case
    // of read-only file system), we will report it when it is.
    control_socket_ready();
    
    run_event_loop:
    
    // Process events until all services have terminated.
    while (services->count_active_services() != 0) {
        event_loop.run();
    }

    shutdown_type_t shutdown_type = services->get_shutdown_type();
    if (shutdown_type == shutdown_type_t::REMAIN) {
        goto run_event_loop;
    }
    
    if (am_system_mgr) {
        log_msg_begin(loglevel_t::NOTICE, "No more active services.");
        
        if (shutdown_type == shutdown_type_t::REBOOT) {
            log_msg_end(" Will reboot.");
        }
        if (shutdown_type == shutdown_type_t::SOFTREBOOT) {
            log_msg_end(" Will soft-reboot.");
        }
        else if (shutdown_type == shutdown_type_t::HALT) {
            log_msg_end(" Will halt.");
        }
        else if (shutdown_type == shutdown_type_t::POWEROFF) {
            log_msg_end(" Will power down.");
        }
        else if (shutdown_type == shutdown_type_t::KEXEC) {
            log_msg_end(" Will kexec.");
        }
        else if (shutdown_type == shutdown_type_t::NONE) {
            log_msg_end(" Will handle boot failure.");
        }
    }

    flush_log();
    bool need_log_flush = false;
    close_control_socket();
    
    if (am_system_mgr) {
        if (shutdown_type == shutdown_type_t::SOFTREBOOT) {
            sync(); // Sync to minimise data loss in case soft-boot fails

            execv(dinit_exec, argv);
            log(loglevel_t::ERROR, error_exec_dinit, strerror(errno));

            // if we get here, soft reboot failed; reboot normally
            log(loglevel_t::ERROR, "Could not soft-reboot. Will attempt reboot.");
            shutdown_type = shutdown_type_t::REBOOT;
            need_log_flush = true;
        }

        if (shutdown_type == shutdown_type_t::NONE) {
            // Services all stopped but there was no shutdown issued. Inform user, wait for ack, and
            // re-start boot sequence.
            sync(); // Sync to minimise data loss if user elects to power off / hard reset
            if (auto_recovery) {
                try {
                    services->start_service("recovery");
                }
                catch (std::exception &exc) {
                    log(loglevel_t::ERROR, "Unable to start recovery service: ", exc.what());
                    // As the following prompt UI could be inaccessible flush the log again already
                    flush_log();
                }
            }
            confirm_restart_boot();
            if (services->count_active_services() != 0) {
                // Recovery service started
                goto run_event_loop;
            }
            shutdown_type = services->get_shutdown_type();
            if (shutdown_type == shutdown_type_t::NONE) {
                try {
                    services->start_service("boot");
                    goto run_event_loop; // yes, the "evil" goto
                }
                catch (...) {
                    // Couldn't start boot service, let's reboot the system
                    log(loglevel_t::ERROR, "Could not start 'boot' service. Will attempt reboot.");
                    need_log_flush = true;
                    shutdown_type = shutdown_type_t::REBOOT;
                }
            }
        }
        
        if (need_log_flush) {
            // In case of error since the log was previously flushed, flush again now
            flush_log();
        }

        const char * cmd_arg;
        if (shutdown_type == shutdown_type_t::HALT) {
            cmd_arg = "-h";
        }
        else if (shutdown_type == shutdown_type_t::REBOOT) {
            cmd_arg = "-r";
        }
        else if (shutdown_type == shutdown_type_t::KEXEC) {
            cmd_arg = "-k";
        }
        else {
            // power off.
            cmd_arg = "-p";
        }
        
        // Fork and execute dinit-reboot.
        execl(shutdown_exec.c_str(), shutdown_exec.c_str(), "--system", cmd_arg, nullptr);
        log(loglevel_t::ERROR, error_exec_sd, strerror(errno));
        
        // PID 1 must not actually exit, although we should never reach this point:
        while (true) {
            event_loop.run();
        }
    }
    else if (shutdown_type == shutdown_type_t::REBOOT) {
        // Non-system-process. If we got SIGINT, let's die due to it:
        sigset_t sigwait_set_int;
        sigemptyset(&sigwait_set_int);
        sigaddset(&sigwait_set_int, SIGINT);
        raise(SIGINT);
        sigprocmask(SIG_UNBLOCK, &sigwait_set_int, NULL);
    }
    
    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x358, %rsp            # imm = 0x358
movq %rsi, %r14
movl %edi, %ebp
callq 0x8930
cmpl $0x1, %eax
sete 0x3d84f(%rip)           # 0x46d10
callq 0x82d0
xorl %ecx, %ecx
testl %eax, %eax
sete 0x3d840(%rip)           # 0x46d11
sete %cl
leaq 0x18(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%rax)
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
leaq 0x48(%rsp), %r13
xorl %edx, %edx
movq %rdx, -0x40(%r13)
movl $0x0, -0x38(%r13)
movq %r13, 0x8(%r13)
movq %r13, (%r13)
movb 0x3d808(%rip), %al      # 0x46d10
testb %al, %al
cmovel %edx, %ecx
movq %rdx, 0x10(%r13)
movb %cl, -0x35(%r13)
movl $0x1, 0x60(%rsp)
cmpl $0x2, %ebp
jl 0x9ba1
leaq 0x2b0(%rsp), %r15
movl $0x1, %r13d
movq %r14, 0x2b0(%rsp)
movl %ebp, 0x230(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x188(%rsp)
leaq 0x230(%rsp), %rax
movq %rax, 0x190(%rsp)
movq %r15, 0x198(%rsp)
movslq %r13d, %rbx
movq (%r14,%rbx,8), %r12
movzbl (%r12), %eax
cmpl $0x2d, %eax
je 0x95c8
testl %eax, %eax
je 0x9d19
cmpb $0x1, 0x13(%rsp)
jne 0x959f
movq %r12, %rdi
leaq 0x2a4ca(%rip), %rsi     # 0x33a5c
callq 0x8880
testl %eax, %eax
jne 0x9a26
movl $0x18, %edi
callq 0x8600
movq (%r14,%rbx,8), %rcx
movq %rcx, 0x10(%rax)
movq %rax, %rdi
leaq 0x48(%rsp), %rsi
callq 0x8060
incq 0x58(%rsp)
jmp 0x9a26
movq %r15, %rbx
movq %r12, %rdi
leaq 0x29ca4(%rip), %rsi     # 0x33279
callq 0x8880
testl %eax, %eax
je 0x9609
movb 0x1(%r12), %r15b
cmpb $0x65, %r15b
jne 0x963e
cmpb $0x0, 0x2(%r12)
je 0x9609
movq %r12, %rdi
leaq 0x29cb8(%rip), %rsi     # 0x332b3
callq 0x8880
testl %eax, %eax
jne 0x965f
jmp 0x9698
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x2e, %edx
cmpl %ebp, %r13d
jge 0x9d2a
movslq %r13d, %rax
movq (%r14,%rax,8), %rax
cmpb $0x0, (%rax)
je 0x9d2a
movb $0x1, 0x11(%rsp)
movq %rax, 0x8(%rsp)
jmp 0x9a23
movq %r12, %rdi
leaq 0x29c6b(%rip), %rsi     # 0x332b3
callq 0x8880
testl %eax, %eax
je 0x9698
cmpb $0x64, %r15b
jne 0x965f
cmpb $0x0, 0x2(%r12)
je 0x9698
movq %r12, %rdi
leaq 0x29b6c(%rip), %rsi     # 0x331d5
callq 0x8880
testl %eax, %eax
je 0x96d0
cmpb $0x73, %r15b
jne 0x96dc
cmpb $0x0, 0x2(%r12)
je 0x96d0
movq %r12, %rdi
leaq 0x29c6b(%rip), %rsi     # 0x332f5
callq 0x8880
testl %eax, %eax
jne 0x96fd
jmp 0x9733
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x32, %edx
cmpl %ebp, %r13d
jge 0xa26e
movslq %r13d, %rax
movq (%r14,%rax,8), %rsi
cmpb $0x0, (%rsi)
je 0xa26e
leaq 0x18(%rsp), %rdi
callq 0xd186
movq %rbx, %r15
jmp 0x9a26
movb $0x1, 0x3d63a(%rip)     # 0x46d11
jmp 0x9a23
movq %r12, %rdi
leaq 0x29c0f(%rip), %rsi     # 0x332f5
callq 0x8880
testl %eax, %eax
je 0x9733
cmpb $0x6d, %r15b
jne 0x96fd
cmpb $0x0, 0x2(%r12)
je 0x9733
movq %r12, %rdi
leaq 0x29bfb(%rip), %rsi     # 0x33302
callq 0x8880
testl %eax, %eax
je 0x9744
cmpb $0x75, %r15b
jne 0x9750
cmpb $0x0, 0x2(%r12)
je 0x9744
movq %r12, %rdi
leaq 0x29be1(%rip), %rsi     # 0x33309
callq 0x8880
testl %eax, %eax
jne 0x9771
jmp 0x97a7
movb $0x1, 0x3d5d6(%rip)     # 0x46d10
movb $0x0, 0x13(%rsp)
jmp 0x9a23
movb $0x0, 0x3d5c6(%rip)     # 0x46d11
jmp 0x9a23
movq %r12, %rdi
leaq 0x29baf(%rip), %rsi     # 0x33309
callq 0x8880
testl %eax, %eax
je 0x97a7
cmpb $0x6f, %r15b
jne 0x9771
cmpb $0x0, 0x2(%r12)
je 0x97a7
movq %r12, %rdi
leaq 0x29b9a(%rip), %rsi     # 0x33315
callq 0x8880
testl %eax, %eax
je 0x97b8
cmpb $0x72, %r15b
jne 0x97c4
cmpb $0x0, 0x2(%r12)
je 0x97b8
movq %r12, %rdi
leaq 0x29b89(%rip), %rsi     # 0x33325
callq 0x8880
testl %eax, %eax
jne 0x97e5
jmp 0x9826
xorl %eax, %eax
movb %al, 0x3d561(%rip)      # 0x46d10
movb %al, 0x13(%rsp)
jmp 0x9a23
movb $0x1, 0x3d561(%rip)     # 0x46d20
jmp 0x9a23
movq %r12, %rdi
leaq 0x29b57(%rip), %rsi     # 0x33325
callq 0x8880
testl %eax, %eax
je 0x9826
cmpb $0x70, %r15b
jne 0x97e5
cmpb $0x0, 0x2(%r12)
je 0x9826
movq %r12, %rdi
leaq 0x29b76(%rip), %rsi     # 0x33365
callq 0x8880
testl %eax, %eax
je 0x985d
cmpb $0x46, %r15b
jne 0x9907
cmpb $0x0, 0x2(%r12)
je 0x985d
movq %r12, %rdi
leaq 0x29bfe(%rip), %rsi     # 0x33412
callq 0x8880
testl %eax, %eax
jne 0x9930
jmp 0x99d0
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x31, %edx
cmpl %ebp, %r13d
jge 0xa376
movslq %r13d, %rax
movq (%r14,%rax,8), %rax
cmpb $0x0, (%rax)
je 0xa376
movq %rax, 0x3cd95(%rip)     # 0x465e8
movb $0x1, 0x10(%rsp)
jmp 0x9a23
incl %r13d
movl %r13d, 0x60(%rsp)
cmpl %ebp, %r13d
jge 0xa3a4
movq $0x0, 0xe0(%rsp)
movslq %r13d, %rax
movq (%r14,%rax,8), %rdi
leaq 0xe0(%rsp), %rsi
movl $0xa, %edx
callq 0x81b0
movq 0xe0(%rsp), %rcx
movq 0x2b0(%rsp), %rdx
movslq 0x60(%rsp), %rsi
cmpq (%rdx,%rsi,8), %rcx
je 0xa382
cmpb $0x0, (%rcx)
jne 0xa382
movl %eax, 0x3cd1f(%rip)     # 0x465e0
movl %eax, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x8390
movl 0x3cd0b(%rip), %edi     # 0x465e0
testl %edi, %edi
je 0xa3b5
testl %eax, %eax
js 0xa3b5
movq %rbx, %r15
cmpl $0x3, %edi
jl 0x9a26
orl $0x1, %eax
movl $0x2, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8390
jmp 0x9a26
movq %r12, %rdi
leaq 0x29b01(%rip), %rsi     # 0x33412
callq 0x8880
testl %eax, %eax
je 0x99d0
cmpb $0x6c, %r15b
jne 0x9930
cmpb $0x0, 0x2(%r12)
je 0x99d0
movq %r12, %rdi
leaq 0x29b12(%rip), %rsi     # 0x3344c
callq 0x8880
testl %eax, %eax
je 0x9a0b
cmpb $0x71, %r15b
jne 0x9959
cmpb $0x0, 0x2(%r12)
je 0x9a0b
movq %r12, %rdi
leaq 0x29af1(%rip), %rsi     # 0x33454
callq 0x8880
testl %eax, %eax
je 0x9a41
movq %r12, %rdi
leaq 0x29aea(%rip), %rsi     # 0x33464
callq 0x8880
testl %eax, %eax
je 0x9a7b
movq %r12, %rdi
leaq 0x29adf(%rip), %rsi     # 0x33470
callq 0x8880
testl %eax, %eax
je 0x9ab7
cmpb $0x62, %r15b
jne 0x9af8
cmpb $0x0, 0x2(%r12)
je 0x9ab7
movq %r12, %rdi
leaq 0x29af2(%rip), %rsi     # 0x334b0
callq 0x8880
testl %eax, %eax
jne 0x9b19
jmp 0x9b5a
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x2e, %edx
cmpl %ebp, %r13d
jge 0xa3d7
movslq %r13d, %rax
movq (%r14,%rax,8), %rax
cmpb $0x0, (%rax)
je 0xa3d7
movq %rax, 0x3cbf3(%rip)     # 0x465f0
movb $0x1, %al
movb %al, 0x3d30d(%rip)      # 0x46d12
movb %al, 0x12(%rsp)
jmp 0x9a23
leaq 0x3ccbe(%rip), %rax     # 0x466d0
movb $0x0, (%rax)
leaq 0x3ccac(%rip), %rax     # 0x466c8
movl $0x4, 0x4(%rax)
movq %rbx, %r15
movl 0x60(%rsp), %r13d
incl %r13d
movl %r13d, 0x60(%rsp)
cmpl %ebp, %r13d
jl 0x9534
jmp 0x9b96
leaq 0x188(%rsp), %rdi
leaq 0x29a04(%rip), %rsi     # 0x33454
leaq 0xe0(%rsp), %rdx
callq 0xb3a6
testb %al, %al
je 0xa3e3
movq %rbx, %r15
movl 0xe0(%rsp), %eax
leaq 0x3cc52(%rip), %rcx     # 0x466c8
movl %eax, 0x4(%rcx)
jmp 0x9a26
leaq 0x188(%rsp), %rdi
leaq 0x299da(%rip), %rsi     # 0x33464
leaq 0xe0(%rsp), %rdx
callq 0xb3a6
testb %al, %al
je 0xa3e3
movq %rbx, %r15
movl 0xe0(%rsp), %eax
leaq 0x3cc18(%rip), %rcx     # 0x466c8
movl %eax, (%rcx)
jmp 0x9a26
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x31, %edx
cmpl %ebp, %r13d
jge 0xa3ed
movslq %r13d, %rax
movq (%r14,%rax,8), %rsi
cmpb $0x0, (%rsi)
je 0xa3ed
movq %rbx, %r15
leaq 0x3d159(%rip), %rdi     # 0x46c40
callq 0x8850
movb $0x1, 0x3d16d(%rip)     # 0x46c60
jmp 0x9a26
movq %r12, %rdi
leaq 0x299ae(%rip), %rsi     # 0x334b0
callq 0x8880
testl %eax, %eax
je 0x9b5a
cmpb $0x74, %r15b
jne 0x9b19
cmpb $0x0, 0x2(%r12)
je 0x9b5a
movq %r12, %rdi
leaq 0x299c5(%rip), %rsi     # 0x334e8
callq 0x8880
testl %eax, %eax
je 0xa405
movq %r12, %rdi
leaq 0x299b8(%rip), %rsi     # 0x334f2
callq 0x8880
testl %eax, %eax
je 0xa411
movq %rbx, %r15
cmpb $0x0, 0x13(%rsp)
jne 0x9a26
jmp 0xa436
incl %r13d
movl %r13d, 0x60(%rsp)
movl $0x2d, %edx
cmpl %ebp, %r13d
jge 0xa3f9
movslq %r13d, %rax
movq (%r14,%rax,8), %rcx
cmpb $0x0, (%rcx)
je 0xa3f9
movq %rbx, %r15
leaq (%r14,%rax,8), %rsi
leaq 0x48(%rsp), %rdi
callq 0xd1ac
jmp 0x9a26
movb 0x3d174(%rip), %al      # 0x46d10
leaq 0x48(%rsp), %r13
testb $0x1, %al
je 0x9c3c
leaq 0x29474(%rip), %rdi     # 0x33024
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x8450
movl %eax, %ebp
cmpl $-0x1, %eax
je 0x9bcb
movl %ebp, %edi
xorl %esi, %esi
callq 0x8590
leaq 0x29452(%rip), %rdi     # 0x33024
movl $0x2, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0x8450
movl %eax, %r15d
cmpl $-0x1, %eax
je 0x9c02
movl %r15d, %edi
movl $0x1, %esi
callq 0x8590
movl %r15d, %edi
movl $0x2, %esi
callq 0x8590
cmpl $0x3, %ebp
jl 0x9c0e
movl %ebp, %edi
callq 0x8b60
cmpl $0x3, %r15d
jl 0x9c1c
movl %r15d, %edi
callq 0x8b60
cmpb $0x0, 0x11(%rsp)
jne 0x9c2f
leaq 0x29f29(%rip), %rax     # 0x33b53
movq %rax, 0x8(%rsp)
movb $0x1, 0x3d02a(%rip)     # 0x46c60
movb 0x3d0d4(%rip), %al      # 0x46d10
testb $0x1, %al
je 0x9c4f
leaq 0x230(%rsp), %rdi
callq 0x81a0
jmp 0x9c86
leaq 0x230(%rsp), %r15
movq %r15, %rdi
callq 0x8770
movq %r15, %rdi
movl $0x11, %esi
callq 0x8970
movq %r15, %rdi
movl $0x2, %esi
callq 0x8970
movq %r15, %rdi
movl $0xf, %esi
callq 0x8970
leaq 0x3cf13(%rip), %rdx     # 0x46ba0
leaq 0x230(%rsp), %rsi
xorl %edi, %edi
callq 0x8280
movl $0x1, %esi
movl $0x14, %edi
callq 0x8710
movl $0x1, %esi
movl $0x15, %edi
callq 0x8710
movl $0x1, %esi
movl $0x16, %edi
callq 0x8710
movl $0x1, %esi
movl $0xd, %edi
callq 0x8710
leaq 0x3cd51(%rip), %rdi     # 0x46a30
callq 0xdacc
cmpb $0x0, 0x3d026(%rip)     # 0x46d11
jne 0x9da6
cmpb $0x0, 0x10(%rsp)
jne 0x9da6
leaq 0x2932e(%rip), %rdi     # 0x33031
callq 0x8730
testq %rax, %rax
je 0x9d36
movq %rax, %r12
leaq 0x2932b(%rip), %r15     # 0x33042
jmp 0x9d4a
movl $0x2a, %edx
leaq 0x29d0c(%rip), %rsi     # 0x33a31
jmp 0xa275
leaq 0x29553(%rip), %rsi     # 0x33284
jmp 0xa275
callq 0x2fb38
movq %rax, %r12
testq %rax, %rax
je 0x9da6
leaq 0x292f7(%rip), %r15     # 0x33041
movq 0x3ced7(%rip), %r13     # 0x46c28
leaq 0x3cec8(%rip), %rbp     # 0x46c20
movq %r12, %rdi
callq 0x8230
movq %rbp, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
movq %rax, %r8
callq 0x89a0
leaq 0x48(%rsp), %r13
leaq 0x3cea1(%rip), %rdi     # 0x46c20
movl $0x2f, %esi
callq 0x8510
leaq 0x3ce90(%rip), %rdi     # 0x46c20
movq %r15, %rsi
callq 0x8b50
movq 0x3ce81(%rip), %rax     # 0x46c20
movq %rax, 0x3c842(%rip)     # 0x465e8
cmpq %r13, 0x48(%rsp)
jne 0x9dd2
movl $0x18, %edi
callq 0x8600
leaq 0x2928d(%rip), %rcx     # 0x3304b
movq %rcx, 0x10(%rax)
movq %rax, %rdi
movq %r13, %rsi
callq 0x8060
incq 0x58(%rsp)
xorl %eax, %eax
movl %eax, 0x190(%rsp)
leaq 0x3b226(%rip), %rcx     # 0x45008
movq %rcx, 0x188(%rsp)
leaq 0xc89(%rip), %rdx       # 0xaa7a
movq %rdx, 0x228(%rsp)
leaq 0x2b0(%rsp), %rsi
movl %eax, 0x8(%rsi)
movl %eax, 0xe8(%rsp)
leaq 0xc8a(%rip), %rdi       # 0xaa9c
cmpb $0x0, 0x3cef7(%rip)     # 0x46d10
cmovneq %rdi, %rax
leaq 0xc67(%rip), %rdi       # 0xaa8b
cmoveq %rdx, %rdi
movq %rcx, (%rsi)
movq %rdi, 0xa0(%rsi)
andb $-0x20, 0xc(%rsi)
movq %rcx, 0xe0(%rsp)
movq %rax, 0x180(%rsp)
movl $0x32, 0x18(%rsi)
movl $0x2, 0x20(%rsi)
leaq 0x3cbd5(%rip), %rdi     # 0x46a30
movl $0x2, %edx
callq 0xe134
leaq 0x188(%rsp), %rsi
andb $-0x20, 0xc(%rsi)
movl $0x32, 0x18(%rsi)
movl $0xf, 0x20(%rsi)
leaq 0x3cbaa(%rip), %rdi     # 0x46a30
movl $0xf, %edx
callq 0xe134
cmpb $0x1, 0x3ce79(%rip)     # 0x46d10
jne 0x9f03
andb $-0x20, 0x3cdfc(%rip)   # 0x46c9c
leaq 0x3cde9(%rip), %rsi     # 0x46c90
movq $0x32, 0x3cdf6(%rip) # 0x46ca8
movl $0x1, 0x3cdf4(%rip)     # 0x46cb0
leaq 0x3cb6d(%rip), %rdi     # 0x46a30
xorl %edx, %edx
movl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xe198
leaq 0xe0(%rsp), %rsi
andb $-0x20, 0xc(%rsi)
movl $0x32, 0x18(%rsi)
movl $0x3, 0x20(%rsi)
leaq 0x3cb37(%rip), %rdi     # 0x46a30
movl $0x3, %edx
callq 0xe134
movzbl 0x3ce08(%rip), %edi     # 0x46d12
xorl $0x1, %edi
callq 0x2e0ec
andb $-0x20, 0x3cdab(%rip)   # 0x46cc4
leaq 0x3cd98(%rip), %rsi     # 0x46cb8
movl $0x32, 0x3cda6(%rip)    # 0x46cd0
movabsq $0x100000000, %rax      # imm = 0x100000000
movq %rax, 0x3cdc5(%rip)     # 0x46d00
leaq 0x3caee(%rip), %rdi     # 0x46a30
movl $0x1, %edx
callq 0xe26c
cmpb $0x0, 0x3cd0d(%rip)     # 0x46c60
jne 0xa07b
leaq 0x29e54(%rip), %rdi     # 0x33db4
xorl %esi, %esi
xorl %eax, %eax
callq 0x8450
cmpl $-0x1, %eax
je 0xa07b
movl %eax, 0x4(%rsp)
movl $0x40, %r12d
movl $0x40, %edi
callq 0x8600
movq %rax, %rsi
leaq 0x60(%rsp), %rcx
movq %rax, (%rcx)
addq $0x40, %rax
movq %rax, 0x10(%rcx)
movq %rax, 0x8(%rcx)
xorl %ebp, %ebp
xorl %r15d, %r15d
xorl %ebx, %ebx
addq %rbx, %rsi
movq %r12, %rdx
subq %rbx, %rdx
movl 0x4(%rsp), %edi
callq 0x88f0
cmpq $-0x1, %rax
je 0xa2e3
testq %rax, %rax
je 0xa2f1
movq $-0x1, %r13
movq 0x60(%rsp), %rsi
movq %rbx, %rcx
movq %rax, %rdx
movb (%rsi,%rcx), %dil
cmpb $0xa, %dil
jne 0x9fea
movq %rcx, %r13
jmp 0xa008
cmpq $-0x1, %r13
jne 0xa045
movq $-0x1, %r13
cmpb $0x3a, %dil
jne 0xa008
incq %rbp
cmpq $0x2, %rbp
cmoveq %rcx, %r15
incq %rcx
decq %rdx
jne 0x9fdb
cmpq $-0x1, %r13
jne 0xa2f7
addq %rax, %rbx
cmpq %r12, %rbx
leaq 0x48(%rsp), %r13
jne 0x9fa4
addq %r12, %r12
leaq 0x60(%rsp), %rdi
movq %r12, %rsi
callq 0xd9d6
movq 0x60(%rsp), %rsi
jmp 0x9fa4
leaq 0x29d7a(%rip), %rsi     # 0x33dc6
movl $0x2, %edi
callq 0x2e33a
movl 0x4(%rsp), %edi
leaq 0x48(%rsp), %r13
callq 0x8b60
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa07b
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x8620
movzbl 0x3cc8f(%rip), %edi     # 0x46d11
xorl $0x1, %edi
callq 0xaaea
testb %al, %al
je 0xa267
cmpb $0x1, 0x3cc77(%rip)     # 0x46d10
jne 0xa0b0
movl $0x6, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x8b70
xorl %edi, %edi
callq 0x8500
movl $0x24, %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x87d0
movzbl 0x3cc49(%rip), %esi     # 0x46d11
leaq 0x18(%rsp), %rdi
callq 0x2fb88
movl $0x60, %edi
callq 0x8600
movq %rax, %rcx
addq $0x10, %rcx
movq %rcx, 0x18(%rax)
movq %rcx, 0x10(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movl $0x0, 0x8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rax)
movq %rcx, 0x40(%rax)
movw $0x1, 0x28(%rax)
leaq 0x3b160(%rip), %rdx     # 0x45270
addq $0x10, %rdx
movq %rdx, (%rax)
movups 0x30(%rsp), %xmm1
movups %xmm1, 0x48(%rax)
movq 0x40(%rsp), %rdx
movq %rdx, 0x58(%rax)
movq %rcx, 0x40(%rsp)
movups %xmm0, 0x30(%rsp)
movq %rax, 0x3cbde(%rip)     # 0x46d18
movq %rax, %rdi
callq 0x2e20d
cmpb $0x1, 0x3cbc8(%rip)     # 0x46d11
jne 0xa15e
leaq 0x28efe(%rip), %rdx     # 0x33050
movl $0x1, %edi
xorl %esi, %esi
callq 0x2e40d
cmpb $0x1, 0x12(%rsp)
jne 0xa180
callq 0xae62
cmpb $0x0, 0x3cba0(%rip)     # 0x46d11
jne 0xa180
cmpb $0x0, 0x3ca1e(%rip)     # 0x46b98
je 0xa267
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0xa19d
leaq 0x3ec7f(%rip), %rdx     # 0x48e10
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x30850
movq 0x48(%rsp), %rbx
cmpq %r13, %rbx
je 0xa49d
leaq 0x28eed(%rip), %r15     # 0x3309f
movq 0x10(%rbx), %rsi
movq %rsi, 0x60(%rsp)
movq 0x3cb56(%rip), %r12     # 0x46d18
movq (%r12), %rax
movq %r12, %rdi
callq *0x10(%rax)
movq %rax, %rdi
callq 0x22b92
movq %r12, %rdi
callq 0xd37e
movq (%rbx), %rbx
cmpq %r13, %rbx
jne 0xa1b2
jmp 0xa49d
movq %rax, %r12
cmpl $0x5, %edx
jne 0xa21a
movq %r12, %rdi
callq 0x8210
movq (%rax), %rsi
movl $0x3, %edi
callq 0x2e412
movq %r15, %rdi
callq 0x2e53c
callq 0x8a50
leaq 0x48(%rsp), %r13
jmp 0xa1dc
cmpl $0x4, %edx
jne 0xa23b
movq %r12, %rdi
callq 0x8210
movq %rax, %rdi
callq 0xb651
callq 0x8a50
leaq 0x48(%rsp), %r13
jmp 0xa1dc
cmpl $0x3, %edx
jne 0xa47d
movq %r12, %rdi
callq 0x8210
movq (%rax), %rdi
leaq 0x20(%rax), %rsi
callq 0xb077
callq 0x8a50
leaq 0x48(%rsp), %r13
jmp 0xa1dc
callq 0xade4
jmp 0xa286
leaq 0x2904d(%rip), %rsi     # 0x332c2
movq 0x3bd6c(%rip), %rdi     # 0x45fe8
callq 0x86c0
leaq 0x48(%rsp), %r13
movl $0x1, %r14d
movq 0x48(%rsp), %rdi
cmpq %r13, %rdi
je 0xa2ab
movq (%rdi), %rbx
movl $0x18, %esi
callq 0x8620
movq %rbx, %rdi
cmpq %r13, %rbx
jne 0xa296
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xd3f0
movq -0x18(%rbx), %rdi
testq %rdi, %rdi
je 0xa2ce
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x8620
movl %r14d, %eax
addq $0x358, %rsp            # imm = 0x358
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x4(%rsp), %edi
callq 0x8b60
jmp 0xa064
incq %rbx
movq %rbx, %r13
movl 0x4(%rsp), %edi
callq 0x8b60
cmpq $0x2, %rbp
jb 0xa35b
movq %r13, %rax
subq %r15, %rax
cmpq $0x1, %rax
je 0xa35b
movq 0x60(%rsp), %rax
cmpb $0x2f, 0x1(%rax,%r15)
jne 0xa35b
movq $0x0, 0x3c91e(%rip) # 0x46c48
leaq 0x3c90f(%rip), %rdi     # 0x46c40
movq 0x3c908(%rip), %rax     # 0x46c40
movb $0x0, (%rax)
addq $0x2, %r15
subq %r15, %r13
addq 0x60(%rsp), %r15
movq %r15, %rsi
movq %r13, %rdx
callq 0x8080
movb $0x1, 0x3c907(%rip)     # 0x46c60
jmp 0xa36c
leaq 0x29a9b(%rip), %rsi     # 0x33dfd
movl $0x2, %edi
callq 0x2e33a
leaq 0x48(%rsp), %r13
jmp 0xa064
leaq 0x28fb6(%rip), %rsi     # 0x33333
jmp 0xa275
movq 0x3bc5f(%rip), %rdi     # 0x45fe8
leaq 0x28fe0(%rip), %rsi     # 0x33370
movl $0x37, %edx
callq 0x86c0
leaq 0x48(%rsp), %r13
jmp 0xa286
movl $0x2e, %edx
leaq 0x29033(%rip), %rsi     # 0x333e3
jmp 0xa275
movq 0x3bc2c(%rip), %rdi     # 0x45fe8
leaq 0x28fe5(%rip), %rsi     # 0x333a8
movl $0x3a, %edx
callq 0x86c0
leaq 0x48(%rsp), %r13
jmp 0xa286
leaq 0x2903f(%rip), %rsi     # 0x3341d
jmp 0xa275
leaq 0x48(%rsp), %r13
jmp 0xa286
leaq 0x2908a(%rip), %rsi     # 0x3347e
jmp 0xa275
leaq 0x290ba(%rip), %rsi     # 0x334ba
jmp 0xa275
callq 0xb564
leaq 0x48(%rsp), %r13
jmp 0xa42e
movq 0x3bb68(%rip), %rdi     # 0x45f80
leaq 0x290da(%rip), %rsi     # 0x334f9
movl $0x51a, %edx            # imm = 0x51A
callq 0x86c0
leaq 0x48(%rsp), %r13
xorl %r14d, %r14d
jmp 0xa28c
movq 0x3bbab(%rip), %rdi     # 0x45fe8
leaq 0x295d0(%rip), %rsi     # 0x33a14
movl $0x1c, %edx
callq 0x86c0
leaq 0x48(%rsp), %r13
movq 0x2b0(%rsp), %rax
movslq 0x60(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x3bb7d(%rip), %rdi     # 0x45fe8
callq 0x85e0
movq %rax, %rdi
callq 0x82b0
jmp 0xa286
cmpl $0x2, %edx
jne 0xaa5e
movq %r12, %rdi
callq 0x8210
leaq 0x60(%rsp), %rdi
callq 0xb04d
callq 0x8a50
callq 0xb09d
movq 0x3c86f(%rip), %r12     # 0x46d18
leaq 0x28c15(%rip), %r15     # 0x330c5
movq 0x3bac9(%rip), %rbp     # 0x45f80
leaq 0x3c572(%rip), %r13     # 0x46a30
cmpl $0x0, 0x8(%r12)
je 0xa4dc
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xb75a
movq 0x3c83e(%rip), %r12     # 0x46d18
jmp 0xa4be
movzbl 0x29(%r12), %ebx
cmpq $0x1, %rbx
je 0xa4be
cmpb $0x1, 0x3c821(%rip)     # 0x46d10
jne 0xa523
movl $0x1, %edi
movq %r15, %rsi
callq 0x2e412
cmpb $0x6, %bl
ja 0xa523
movzbl %bl, %eax
movl $0x7d, %ecx
btl %eax, %ecx
jae 0xa523
leaq 0x29cd1(%rip), %rax     # 0x341e8
movslq (%rax,%rbx,4), %rdi
addq %rax, %rdi
callq 0x2e53c
callq 0xade4
callq 0xb0fd
cmpb $0x1, 0x3c7dc(%rip)     # 0x46d10
jne 0xa8c5
testl %ebx, %ebx
jne 0xa84a
callq 0x85b0
cmpb $0x1, 0x3c7d2(%rip)     # 0x46d20
leaq 0x60(%rsp), %rbx
jne 0xa57d
movq 0x3c7bc(%rip), %r12     # 0x46d18
movq (%r12), %rax
movq %r12, %rdi
leaq 0x2aa97(%rip), %rsi     # 0x35001
callq *0x10(%rax)
movq %rax, %rdi
callq 0x22b92
movq %r12, %rdi
callq 0xd37e
movl $0x41, %edx
movq %rbp, %rdi
leaq 0x2962f(%rip), %rsi     # 0x33bbb
callq 0x86c0
xorl %edi, %edi
movq %rbx, %rsi
callq 0x8690
testl %eax, %eax
je 0xa5f1
movl $0x8, %edx
movq %rbp, %rdi
leaq 0x2964f(%rip), %rsi     # 0x33bfd
callq 0x86c0
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x85d0
movsbl %al, %esi
movq %rbp, %rdi
callq 0x8040
movq %rax, %rdi
callq 0x8410
movq 0x3c736(%rip), %rdi     # 0x46d18
movl $0x2, %esi
callq 0xd442
jmp 0xa78c
andb $-0x3, 0x6c(%rsp)
xorl %edi, %edi
movl $0x2, %esi
movq %rbx, %rdx
callq 0x87b0
xorl %edi, %edi
movl $0x3, %esi
xorl %eax, %eax
callq 0x8390
movl %eax, %r12d
movl %eax, %edx
orl $0x800, %edx            # imm = 0x800
xorl %edi, %edi
movl $0x4, %esi
xorl %eax, %eax
callq 0x8390
movl $0x44, %edx
movq %rbp, %rdi
leaq 0x295cb(%rip), %rsi     # 0x33c06
callq 0x86c0
movq %rbp, %rdi
callq 0x8410
leaq 0x3c641(%rip), %rdi     # 0x46c90
movq %r13, %rsi
movl $0x1, %edx
callq 0xd486
movq %r13, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xb75a
cmpb $0x0, 0x3c6b2(%rip)     # 0x46d22
jne 0xa67f
movq 0x3c69f(%rip), %rax     # 0x46d18
cmpb $0x0, 0x29(%rax)
je 0xa65c
leaq 0x3c60a(%rip), %rdi     # 0x46c90
movq %r13, %rsi
xorl %edx, %edx
callq 0xd486
cmpb $0x1, 0x3c68b(%rip)     # 0x46d22
jne 0xa76a
movb $0x0, 0x3c67e(%rip)     # 0x46d22
movl $0x1, %edx
xorl %edi, %edi
leaq 0x3(%rsp), %rsi
callq 0x88f0
cmpl $0x1, %eax
jne 0xa761
movl $0x1, %edx
movq %rbp, %rdi
leaq 0x29416(%rip), %rsi     # 0x33ae3
callq 0x86c0
movzbl 0x3(%rsp), %eax
andl $-0x21, %eax
cmpl $0x4f, %eax
jg 0xa701
cmpl $0x45, %eax
jne 0xa62c
movq 0x3c629(%rip), %r15     # 0x46d18
movq (%r15), %rax
movq %r15, %rdi
leaq 0x2a905(%rip), %rsi     # 0x35001
callq *0x10(%rax)
jmp 0xa74a
cmpl $0x50, %eax
je 0xa7e0
cmpl $0x53, %eax
je 0xa761
cmpl $0x52, %eax
jne 0xa62c
jmp 0xa7d2
movq %rax, %rdi
callq 0x8210
movl $0x22, %edx
movq %rbp, %rdi
leaq 0x29517(%rip), %rsi     # 0x33c4b
callq 0x86c0
leaq 0x28985(%rip), %r15     # 0x330c5
callq 0x8a50
jmp 0xa62c
movq %rax, %rdi
callq 0x22b92
movq %r15, %rdi
callq 0xd37e
leaq 0x28964(%rip), %r15     # 0x330c5
xorl %edi, %edi
xorl %esi, %esi
callq 0x8960
orb $0x2, 0x6c(%rsp)
xorl %edi, %edi
xorl %esi, %esi
movq %rbx, %rdx
callq 0x87b0
xorl %edi, %edi
movl $0x4, %esi
movl %r12d, %edx
xorl %eax, %eax
callq 0x8390
movq 0x3c585(%rip), %r12     # 0x46d18
cmpl $0x0, 0x8(%r12)
jne 0xa4be
movb 0x29(%r12), %bl
testb %bl, %bl
jne 0xa8aa
movq (%r12), %rax
movq %r12, %rdi
leaq 0x28891(%rip), %rsi     # 0x3304b
callq *0x10(%rax)
movq %rax, %rdi
callq 0x22b92
movq %r12, %rdi
callq 0xd37e
jmp 0xa4d3
movq 0x3c53f(%rip), %rdi     # 0x46d18
movl $0x4, %esi
jmp 0xa7ec
movq 0x3c531(%rip), %rdi     # 0x46d18
movl $0x3, %esi
callq 0xd442
jmp 0xa761
movq %rax, %r12
cmpl $0x6, %edx
jne 0xaa5e
movq %r12, %rdi
callq 0x8210
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
movq %rax, %r15
movl $0x3, %edi
leaq 0x2894f(%rip), %rsi     # 0x33171
callq 0x2e412
movq %r15, %rdi
callq 0x2e53c
callq 0xade4
callq 0x8a50
leaq 0x28885(%rip), %r15     # 0x330c5
leaq 0x60(%rsp), %rbx
jmp 0xa57d
cmpl $0x5, %ebx
jne 0xa8aa
callq 0x85b0
leaq 0x29649(%rip), %rdi     # 0x33ea4
movq %r14, %rsi
callq 0x8570
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %rbx
leaq 0x29637(%rip), %rsi     # 0x33eb0
movl $0x3, %edi
callq 0x2e412
movq %rbx, %rdi
callq 0x2e53c
leaq 0x288b3(%rip), %rsi     # 0x33145
movl $0x3, %edi
callq 0x2e33a
callq 0xade4
leaq 0x28924(%rip), %rcx     # 0x331cc
jmp 0xa918
addb $-0x2, %bl
cmpb $0x4, %bl
ja 0xa911
movzbl %bl, %eax
leaq 0x29948(%rip), %rdx     # 0x34204
movslq (%rdx,%rax,4), %rcx
addq %rdx, %rcx
jmp 0xa918
xorl %r14d, %r14d
cmpb $0x4, %bl
leaq 0x48(%rsp), %r13
jne 0xa28c
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x8770
movq %r15, %rdi
movl $0x2, %esi
callq 0x8970
movl $0x2, %edi
callq 0x8610
xorl %r14d, %r14d
movl $0x1, %edi
movq %r15, %rsi
xorl %edx, %edx
callq 0x8280
jmp 0xa28c
leaq 0x288ba(%rip), %rcx     # 0x331d2
leaq 0x295af(%rip), %rdi     # 0x33ece
leaq 0x288af(%rip), %rdx     # 0x331d5
movq %rdi, %rsi
xorl %r8d, %r8d
xorl %eax, %eax
callq 0x8750
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %rbx
leaq 0x29594(%rip), %rsi     # 0x33edd
movl $0x3, %edi
callq 0x2e412
movq %rbx, %rdi
callq 0x2e53c
leaq 0x3c0ce(%rip), %rbx     # 0x46a30
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xb75a
jmp 0xa962
jmp 0xaa5b
jmp 0xaa5b
jmp 0xaa5b
movq %rax, %r12
callq 0x8a50
jmp 0xaa5e
jmp 0xaa72
jmp 0xaa5b
jmp 0xaa5b
movq %rdx, %r12
movq %rax, %r15
movl $0xffffffff, 0x4(%rsp)  # imm = 0xFFFFFFFF
jmp 0xa9d6
jmp 0xa9d0
jmp 0xa9d0
jmp 0xa9d0
jmp 0xa9d0
movq %rdx, %r12
movq %rax, %r15
jmp 0xa9ed
jmp 0xaa5b
jmp 0xaa5b
jmp 0xaa5b
jmp 0xaa5b
movq %rdx, %r12
movq %rax, %r15
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0xa9ed
movq 0x70(%rsp), %rsi
subq %rdi, %rsi
callq 0x8620
movq %r15, %rdi
cmpl $0x2, %r12d
jne 0xaa29
callq 0x8210
movl 0x4(%rsp), %edi
cmpl $-0x1, %edi
leaq 0x48(%rsp), %r13
je 0xaa0e
callq 0x8b60
leaq 0x2940d(%rip), %rsi     # 0x33e22
movl $0x2, %edi
callq 0x2e33a
callq 0x8a50
jmp 0xa07b
callq 0xb74e
jmp 0xaa72
jmp 0xaa5b
jmp 0xaa5b
movq %rax, %rdi
callq 0x8210
leaq 0x28751(%rip), %rsi     # 0x33194
movl $0x3, %edi
callq 0x2e33a
callq 0x8a50
jmp 0xa89c
jmp 0xaa5b
jmp 0xaa5b
movq %rax, %r12
leaq 0x8(%rsp), %rdi
callq 0xb7e4
movq %r12, %rdi
callq 0x8ab0
jmp 0xaa72
movq %rax, %rdi
callq 0xb74e