// File: /workspace/github_cpp_makefile_star2_O1/davmac314[P]dinit/src/baseproc-service.cc
// Function: base_process_service::start_ps_process(std::vector<char const*, std::allocator<char const*>> const&, bool)
bool base_process_service::start_ps_process(const std::vector<const char *> &cmd, bool on_console) noexcept
{
    // In general, you can't tell whether fork/exec is successful. We use a pipe to communicate
    // success/failure from the child to the parent. The pipe is set CLOEXEC so a successful
    // exec closes the pipe, and the parent sees EOF. If the exec is unsuccessful, the errno
    // is written to the pipe, and the parent can read it.

    event_loop.get_time(last_start_time, clock_type::MONOTONIC);

    int pipefd[2];
    if (bp_sys::pipe2(pipefd, O_CLOEXEC)) {
        log(loglevel_t::ERROR, get_name(), ": can't create status check pipe: ", strerror(errno));
        return false;
    }

    int input_fd;
    if (!get_input_fd(&input_fd)) {
        return false;
    }

    const char * logfile = this->logfile.c_str();
    if (this->log_type == log_type_id::LOGFILE || this->log_type == log_type_id::NONE) {
        // Note: if log_type == NONE, logfile should be empty.
        if (*logfile == 0) {
            logfile = "/dev/null";
        }
    }
    else /* log_type_id::BUFFER or ::PIPE */ {
        if (this->log_output_fd == -1) {
            int logfd[2];
            // Note: we set CLOEXEC on the file descriptors here; when the output file descriptor is dup'd
            // to stdout, this will be effectively removed for the output end
            if (bp_sys::pipe2(logfd, O_CLOEXEC)) {
                log(loglevel_t::ERROR, get_name(), ": can't create output pipe: ", strerror(errno));
                goto out_p;
            }
            this->log_input_fd = logfd[0];
            this->log_output_fd = logfd[1];
            if (this->log_type == log_type_id::BUFFER) {
                try {
                    this->log_output_listener.add_watch(event_loop, logfd[0], dasynq::IN_EVENTS,
                            false /* not enabled */);
                }
                catch (...) {
                    log(loglevel_t::ERROR, get_name(), ": can't add output watch (insufficient resources)");
                    bp_sys::close(this->log_input_fd);
                    bp_sys::close(this->log_output_fd);
                    this->log_input_fd = -1;
                    this->log_output_fd = -1;
                    goto out_p;
                }
            }
        }
        // (More is done below, after we have performed additional setup)
    }

    {
        bool child_status_registered = false;
        control_conn_t *control_conn = nullptr;

        int control_socket[2] = {-1, -1};
        int notify_pipe[2] = {-1, -1};
        bool have_notify = !notification_var.empty() || force_notification_fd != -1;
        ready_notify_watcher * rwatcher = have_notify ? get_ready_watcher() : nullptr;
        bool ready_watcher_registered = false;

        if (onstart_flags.pass_cs_fd) {
            if (dinit_socketpair(AF_UNIX, SOCK_STREAM, /* protocol */ 0, control_socket, SOCK_NONBLOCK)) {
                log(loglevel_t::ERROR, get_name(), ": can't create control socket: ", strerror(errno));
                goto out_lfd;
            }

            // Make the server side socket close-on-exec:
            int fdflags = bp_sys::fcntl(control_socket[0], F_GETFD);
            bp_sys::fcntl(control_socket[0], F_SETFD, fdflags | FD_CLOEXEC);

            try {
                control_conn = new control_conn_t(event_loop, services, control_socket[0]);
            }
            catch (std::exception &exc) {
                log(loglevel_t::ERROR, get_name(), ": can't launch process; out of memory");
                goto out_cs;
            }
        }

        if (have_notify) {
            // Create a notification pipe:
            if (bp_sys::pipe2(notify_pipe, 0) != 0) {
                log(loglevel_t::ERROR, get_name(), ": can't create notification pipe: ", strerror(errno));
                goto out_cs_h;
            }

            // Set the read side as close-on-exec:
            int fdflags = bp_sys::fcntl(notify_pipe[0], F_GETFD);
            bp_sys::fcntl(notify_pipe[0], F_SETFD, fdflags | FD_CLOEXEC);

            // add, but don't yet enable, readiness watcher:
            try {
                rwatcher->add_watch(event_loop, notify_pipe[0], dasynq::IN_EVENTS, false);
                ready_watcher_registered = true;
            }
            catch (std::exception &exc) {
                log(loglevel_t::ERROR, get_name(), ": can't add notification watch: ", exc.what());
                goto out_cs_h;
            }
        }

        if (log_type == log_type_id::BUFFER) {
            // Set watcher enabled if space in buffer
            if (log_buf_size > 0) {
                // Append a "restarted" message to buffer contents
                const char *restarting_msg = "\n(dinit: note: service restarted)\n";
                unsigned restarting_msg_len = strlen(restarting_msg);
                bool trailing_nl = log_buffer[log_buf_size - 1] == '\n';
                if (trailing_nl) {
                    ++restarting_msg; // trim leading newline
                    --restarting_msg_len;
                }
                if (log_buf_size + restarting_msg_len >= log_buf_max) {
                    goto skip_enable_log_watch;
                }
                if (!ensure_log_buffer_backing(log_buf_size + restarting_msg_len)) {
                    goto skip_enable_log_watch;
                }
                memcpy(log_buffer.data() + log_buf_size, restarting_msg, restarting_msg_len);
                log_buf_size += restarting_msg_len;
            }
            log_output_listener.set_enabled(event_loop, true);
        }
        skip_enable_log_watch: ;

        // Set up complete, now fork and exec:

        pid_t forkpid;

        try {
            child_status_listener.add_watch(event_loop, pipefd[0], dasynq::IN_EVENTS);
            child_status_registered = true;

            // We specify a high priority (i.e. low priority value) so that process termination is
            // handled early. This means we have always recorded that the process is terminated by the
            // time that we handle events that might otherwise cause us to signal the process, so we
            // avoid sending a signal to an invalid (and possibly recycled) process ID.
            forkpid = child_listener.fork(event_loop, reserved_child_watch, dasynq::DEFAULT_PRIORITY - 10);
            reserved_child_watch = true;
        }
        catch (std::exception &e) {
            log(loglevel_t::ERROR, get_name(), ": could not fork: ", e.what());
            goto out_cs_h;
        }

        if (forkpid == 0) {
            const char * working_dir_c = service_dsc_dir;
            if (!working_dir.empty()) working_dir_c = working_dir.c_str();
            after_fork(getpid());
            run_proc_params run_params{cmd.data(), working_dir_c, logfile, pipefd[1], run_as_uid, run_as_gid, rlimits};
            run_params.on_console = on_console;
            run_params.in_foreground = !onstart_flags.shares_console;
            run_params.unmask_sigint = onstart_flags.unmask_intr;
            run_params.csfd = control_socket[1];
            run_params.socket_fd = socket_fd;
            run_params.notify_fd = notify_pipe[1];
            run_params.force_notify_fd = force_notification_fd;
            run_params.notify_var = notification_var.c_str();
            run_params.env_file = env_file.c_str();
            run_params.output_fd = log_output_fd;
            run_params.input_fd = input_fd;
            run_params.nice_is_set = nice_is_set;
            run_params.nice = nice;
            #if SUPPORT_CGROUPS
            run_params.run_in_cgroup = run_in_cgroup.c_str();
            #endif
            #if SUPPORT_CAPABILITIES
            run_params.cap_iab = cap_iab.get();
            run_params.secbits = secbits;
            run_params.no_new_privs = onstart_flags.no_new_privs;
            #endif
            #if SUPPORT_IOPRIO
            run_params.ioprio = ioprio;
            #endif
            #if SUPPORT_OOM_ADJ
            run_params.oom_adj_is_set = oom_adj_is_set;
            run_params.oom_adj = oom_adj;
            #endif
            run_child_proc(run_params);
        }
        else {
            // Parent process
            pid = forkpid;

            bp_sys::close(pipefd[1]); // close the 'other end' fd
            if (control_socket[1] != -1) bp_sys::close(control_socket[1]);
            if (notify_pipe[1] != -1) bp_sys::close(notify_pipe[1]);
            notification_fd = notify_pipe[0];
            waiting_for_execstat = true;
            return true;
        }

        // Failure exit:

        out_cs_h:
        if (child_status_registered) {
            child_status_listener.deregister(event_loop);
        }

        if (notify_pipe[0] != -1) bp_sys::close(notify_pipe[0]);
        if (notify_pipe[1] != -1) bp_sys::close(notify_pipe[1]);
        if (ready_watcher_registered) {
            rwatcher->deregister(event_loop);
        }

        if (onstart_flags.pass_cs_fd) {
            delete control_conn;

            out_cs:
            bp_sys::close(control_socket[0]);
            bp_sys::close(control_socket[1]);
        }
    }

    out_lfd:
    if (log_input_fd != -1) {
        log_output_listener.deregister(event_loop);
        bp_sys::close(log_input_fd);
        bp_sys::close(log_output_fd);
        log_input_fd = -1;
        log_output_fd = -1;
    }

    out_p:
    bp_sys::close(pipefd[0]);
    bp_sys::close(pipefd[1]);

    return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x438(%rdi), %rsi
movl $0x1, %edi
callq 0x8560
leaq 0x98(%rsp), %rdi
movl $0x80000, %esi          # imm = 0x80000
callq 0x83e0
testl %eax, %eax
je 0x26884
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl $0x3, %edi
callq 0x2e63a
leaq 0xf610(%rip), %rdi      # 0x35e82
callq 0x2e73d
movq %r14, %rdi
callq 0x2e759
jmp 0x26eb5
movq (%rbx), %rax
leaq 0xac(%rsp), %rsi
movq %rbx, %rdi
callq *0x80(%rax)
testb %al, %al
je 0x26eb5
movq 0x2a0(%rbx), %r14
cmpl $0x1, 0x298(%rbx)
ja 0x268c1
cmpb $0x0, (%r14)
leaq 0xf3dc(%rip), %rax      # 0x35c97
cmoveq %rax, %r14
jmp 0x268ce
cmpl $-0x1, 0x4ec(%rbx)
je 0x26b92
movq %r14, 0xb8(%rsp)
movq $-0x1, %rax
movq %rax, 0x80(%rsp)
movq %rax, 0x88(%rsp)
cmpq $0x0, 0x4c0(%rbx)
setne %al
cmpl $-0x1, 0x4b0(%rbx)
setne %r13b
orb %al, %r13b
cmpb $0x1, %r13b
jne 0x2691d
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x90(%rax)
movq %rax, %r14
jmp 0x26920
xorl %r14d, %r14d
testb $0x40, 0x2e(%rbx)
jne 0x2698e
movq $0x0, 0x90(%rsp)
testb %r13b, %r13b
je 0x269eb
leaq 0x88(%rsp), %rdi
xorl %esi, %esi
callq 0x83e0
testl %eax, %eax
je 0x26ec9
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %r15
movq 0x8(%rbx), %rsi
movl $0x3, %edi
callq 0x2e63a
leaq 0xf5c4(%rip), %rdi      # 0x35f3a
callq 0x2e73d
movq %r15, %rdi
callq 0x2e759
xorl %r13d, %r13d
xorl %r12d, %r12d
jmp 0x26db9
leaq 0x80(%rsp), %rcx
movl $0x1, %edi
movl $0x801, %esi            # imm = 0x801
xorl %edx, %edx
callq 0x8520
testl %eax, %eax
je 0x26be2
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl $0x3, %r12d
movl $0x3, %edi
callq 0x2e63a
leaq 0xf51b(%rip), %rdi      # 0x35ef4
callq 0x2e73d
movq %r14, %rdi
callq 0x2e759
jmp 0x26e4d
xorl %r13d, %r13d
cmpl $0x2, 0x298(%rbx)
jne 0x26ab8
movl 0x2d0(%rbx), %eax
testl %eax, %eax
je 0x26aa0
movl %r13d, 0xa0(%rsp)
movq %r14, 0x78(%rsp)
leal -0x1(%rax), %ecx
movq 0x2d8(%rbx), %rdx
xorl %r14d, %r14d
cmpb $0xa, (%rdx,%rcx)
leaq 0xf551(%rip), %rcx      # 0x35f7f
leaq 0xf549(%rip), %r13      # 0x35f7e
cmoveq %rcx, %r13
setne %r14b
leal (%r14,%rax), %esi
addl $0x21, %esi
movl $0x6, %r12d
cmpl 0x2cc(%rbx), %esi
jae 0x26a84
movq %rbx, %rdi
callq 0x27186
testb %al, %al
je 0x26a84
addl $0x21, %r14d
movl 0x2d0(%rbx), %edi
addq 0x2d8(%rbx), %rdi
movl %r14d, %edx
movq %r13, %rsi
callq 0x84d0
addl %r14d, 0x2d0(%rbx)
xorl %r12d, %r12d
cmpl $0x6, %r12d
movq 0x78(%rsp), %r14
movl 0xa0(%rsp), %r13d
je 0x26ab8
testl %r12d, %r12d
jne 0x26e4d
leaq 0x408(%rbx), %rdi
leaq 0x1ff82(%rip), %rsi     # 0x46a30
movl $0x1, %edx
callq 0xd9d0
leaq 0x380(%rbx), %rsi
movl 0x98(%rsp), %edx
andb $-0x20, 0x38c(%rbx)
movl $0x32, 0x398(%rbx)
movl %edx, 0x39c(%rbx)
movl $0x1, 0x3a0(%rbx)
xorl %r12d, %r12d
leaq 0x1ff3f(%rip), %rdi     # 0x46a30
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
callq 0xe744
leaq 0x338(%rbx), %rdi
movb 0x4f4(%rbx), %al
andb $0x4, %al
shrb $0x2, %al
movb $0x1, %r12b
movzbl %al, %edx
leaq 0x1ff0a(%rip), %rsi     # 0x46a30
movl $0x28, %ecx
callq 0x2575c
orb $0x4, 0x4f4(%rbx)
testl %eax, %eax
je 0x26c53
movl %eax, 0x4d8(%rbx)
movl 0x9c(%rsp), %edi
callq 0x8b60
movl 0x84(%rsp), %edi
cmpl $-0x1, %edi
je 0x26b62
callq 0x8b60
movl 0x8c(%rsp), %edi
cmpl $-0x1, %edi
je 0x26b73
callq 0x8b60
movl 0x88(%rsp), %eax
movl %eax, 0x4e8(%rbx)
orb $-0x80, 0x10c(%rbx)
movl $0x1, %r12d
jmp 0x26e4d
leaq 0x80(%rsp), %rdi
movl $0x80000, %esi          # imm = 0x80000
callq 0x83e0
testl %eax, %eax
je 0x26f4f
callq 0x8050
movl (%rax), %edi
callq 0x81d0
movq %rax, %r14
movq 0x8(%rbx), %rsi
movl $0x3, %edi
callq 0x2e63a
leaq 0xf2d5(%rip), %rdi      # 0x35ea5
callq 0x2e73d
movq %r14, %rdi
callq 0x2e759
jmp 0x26e9d
movl 0x80(%rsp), %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x8390
movl 0x80(%rsp), %edi
orl $0x1, %eax
movl $0x2, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8390
movq %r14, %r12
movl $0x510, %edi            # imm = 0x510
callq 0x8600
movq 0x148(%rbx), %rdx
movb $0x1, %r14b
movl 0x80(%rsp), %ecx
leaq 0x1fdfe(%rip), %rsi     # 0x46a30
movq %rax, %rdi
movq %rax, 0x90(%rsp)
callq 0xc000
testb %r14b, %r14b
movq %r12, %r14
jne 0x26932
jmp 0x26e32
leaq 0x258(%rbx), %rax
cmpq $0x0, 0x260(%rbx)
leaq 0x100(%rbx), %rcx
cmoveq %rcx, %rax
movq (%rax), %rax
movq %rax, 0xb0(%rsp)
callq 0x8930
movq (%rbx), %rcx
movq %rbx, %rdi
movl %eax, %esi
callq *0x60(%rcx)
movq (%r15), %rdx
movq 0x4a8(%rbx), %rax
movq %rax, 0xa0(%rsp)
movzwl 0x2e(%rbx), %ecx
movl %ecx, %edi
shrb $0x5, %dil
andb $0x1, %dil
testb $0x10, %cl
movl 0x4e4(%rbx), %r9d
movl 0x4b0(%rbx), %eax
movl %eax, 0xa8(%rsp)
movq %r14, 0x78(%rsp)
movq 0x4b8(%rbx), %r14
movq 0x278(%rbx), %r10
movl 0x4ec(%rbx), %r11d
movb 0x2f0(%rbx), %r15b
movl 0x2f4(%rbx), %r12d
movl %r13d, %eax
movq 0x318(%rbx), %r13
movb 0x2f8(%rbx), %r8b
movzwl 0x2fa(%rbx), %ecx
leaq 0xc8(%rsp), %rsi
movq %rdx, (%rsi)
movq 0xb0(%rsp), %rdx
movq %rdx, 0x8(%rsi)
movq 0xb8(%rsp), %rdx
movq %rdx, 0x10(%rsi)
movq %r10, 0x18(%rsi)
movq %r13, 0x20(%rsi)
movl %eax, %r13d
movb %bpl, 0x28(%rsi)
sete 0x29(%rsi)
movb %dil, 0x2a(%rsi)
movb %r15b, 0x2b(%rsi)
movl %r12d, 0x2c(%rsi)
movb %r8b, 0x30(%rsi)
movw %cx, 0x32(%rsi)
movl 0x9c(%rsp), %eax
movl %eax, 0x34(%rsi)
movl 0x84(%rsp), %eax
movl %eax, 0x38(%rsi)
movl %r9d, 0x3c(%rsi)
movl 0x8c(%rsp), %eax
movl %eax, 0x40(%rsi)
movl 0xa8(%rsp), %eax
movl %eax, 0x44(%rsi)
movl %r11d, 0x48(%rsi)
movq %r14, 0x50(%rsi)
movq 0x78(%rsp), %r14
movq 0xa0(%rsp), %rax
movq %rax, 0x58(%rsi)
leaq 0x300(%rbx), %rax
movq %rax, 0x60(%rsi)
movl 0xac(%rsp), %eax
movl %eax, 0x68(%rsi)
movl $0xe, %ecx
movq %rsp, %rdi
rep  movsq (%rsi), %es:(%rdi)
movq %rbx, %rdi
callq 0x2f0c8
movb $0x1, %r12b
testb %r12b, %r12b
je 0x26dd7
leaq 0x380(%rbx), %rsi
movl 0x39c(%rbx), %edx
leaq 0x1fc5e(%rip), %rdi     # 0x46a30
callq 0xda6a
movl 0x88(%rsp), %edi
cmpl $-0x1, %edi
je 0x26de8
callq 0x8b60
movl 0x8c(%rsp), %edi
cmpl $-0x1, %edi
je 0x26df9
callq 0x8b60
testb %r13b, %r13b
je 0x26e11
movl 0x1c(%r14), %edx
leaq 0x1fc27(%rip), %rdi     # 0x46a30
movq %r14, %rsi
callq 0xda6a
testb $0x40, 0x2e(%rbx)
movq 0x90(%rsp), %rax
je 0x26e4a
testq %rax, %rax
je 0x26e32
movq 0x90(%rsp), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movl 0x80(%rsp), %edi
callq 0x8b60
movl 0x84(%rsp), %edi
callq 0x8b60
xorl %r12d, %r12d
cmpl $0x3, %r12d
je 0x26e5a
movb $0x1, %al
testl %r12d, %r12d
jne 0x26eb7
cmpl $-0x1, 0x4f0(%rbx)
je 0x26e9d
leaq 0x408(%rbx), %rsi
movl 0x424(%rbx), %edx
leaq 0x1fbb9(%rip), %rdi     # 0x46a30
callq 0xda6a
movl 0x4f0(%rbx), %edi
callq 0x8b60
movl 0x4ec(%rbx), %edi
callq 0x8b60
movq $-0x1, 0x4ec(%rbx)
movl 0x98(%rsp), %edi
callq 0x8b60
movl 0x9c(%rsp), %edi
callq 0x8b60
xorl %eax, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0x88(%rsp), %edi
movl $0x1, %esi
xorl %eax, %eax
callq 0x8390
movl 0x88(%rsp), %edi
orl $0x1, %eax
xorl %r12d, %r12d
movl $0x2, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x8390
movl 0x88(%rsp), %edx
andb $-0x20, 0xc(%r14)
movl $0x32, 0x18(%r14)
movl %edx, 0x1c(%r14)
movl $0x1, 0x20(%r14)
movb $0x1, %r13b
leaq 0x1fb0f(%rip), %rdi     # 0x46a30
movq %r14, %rsi
movl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xe744
cmpl $0x5, %r12d
je 0x26986
testl %r12d, %r12d
je 0x269ee
jmp 0x26e4d
movl 0x80(%rsp), %edx
movl %edx, 0x4f0(%rbx)
movl 0x84(%rsp), %eax
movl %eax, 0x4ec(%rbx)
cmpl $0x2, 0x298(%rbx)
jne 0x268ce
andb $-0x20, 0x414(%rbx)
leaq 0x408(%rbx), %rsi
movl $0x32, 0x420(%rbx)
movl %edx, 0x424(%rbx)
movl $0x1, 0x428(%rbx)
leaq 0x1fa8b(%rip), %rdi     # 0x46a30
movl $0x1, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0xe744
jmp 0x268ce
movq %rax, %rdi
callq 0x8210
movq 0x8(%rbx), %rsi
movl $0x3, %edi
callq 0x2e63a
leaq 0xeee8(%rip), %rdi      # 0x35ec2
callq 0x2e759
movl 0x4f0(%rbx), %edi
callq 0x8b60
movl 0x4ec(%rbx), %edi
callq 0x8b60
movq $-0x1, 0x4ec(%rbx)
callq 0x8a50
jmp 0x26e9d
movq %rax, 0x78(%rsp)
cmpl $0x2, %edx
jne 0x270fa
movq 0x78(%rsp), %rdi
callq 0x8210
leaq 0x8(%rbx), %r13
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movq %r13, %rdi
callq 0x27160
callq 0x8a50
movl $0x5, %r12d
xorl %r13d, %r13d
jmp 0x26f37
movq %rdx, %r14
movq %rax, 0x78(%rsp)
movl $0x510, %esi            # imm = 0x510
movq 0x90(%rsp), %rdi
callq 0x8620
jmp 0x27079
movq %rdx, %r14
movq %rax, 0x78(%rsp)
cmpl $0x2, %r14d
jne 0x270fa
movq 0x78(%rsp), %rdi
callq 0x8210
movq 0x8(%rbx), %rsi
movl $0x3, %edi
callq 0x2e63a
leaq 0xee76(%rip), %rdi      # 0x35f14
callq 0x2e759
callq 0x8a50
movq $0x0, 0x90(%rsp)
xorl %r14d, %r14d
jmp 0x26c42
movq %rax, 0x78(%rsp)
cmpl $0x2, %edx
jne 0x270fa
movq 0x78(%rsp), %rdi
callq 0x8210
leaq 0x8(%rbx), %r15
movq (%rax), %rcx
movq %rax, %rdi
callq *0x10(%rcx)
leaq 0xc0(%rsp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
callq 0x27240
callq 0x8a50
jmp 0x26db9
movq 0x78(%rsp), %rdi
callq 0xb8be
movq %rax, %rdi
callq 0xb8be