LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/acceptor.cpp
// Function: acceptor::uds_open(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, options const&)
int acceptor::uds_open(const std::string &addr, const options &opt) {
    ::remove(addr.c_str());
    int fd = ::socket(AF_UNIX, SOCK_STREAM, 0);
    if (fd == -1) {
        fprintf(stderr, "reactor: create unix socket fail! %s\n", strerror(errno));
        return -1;
    }
    struct sockaddr_un laddr;
    laddr.sun_family = AF_UNIX;
    ::strcpy(laddr.sun_path, addr.c_str());
    return this->listen(fd,
        reinterpret_cast<sockaddr *>(&laddr), sizeof(laddr),
        opt.backlog);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x78, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq (%rsi), %rdi
callq 0x67a0
movl $0x1, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x60f0
cmpl $-0x1, %eax
je 0x8da9
movl %eax, %ebp
leaq 0xc(%rsp), %rdi
movw $0x1, -0x2(%rdi)
movq (%r15), %rsi
callq 0x6470
movl 0x20(%r14), %r8d
leaq 0xa(%rsp), %rdx
movq %rbx, %rdi
movl %ebp, %esi
movl $0x6e, %ecx
callq 0x6800
addq $0x78, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
callq 0x6b06
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x8d9e
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/acceptor.cpp
// Function: acceptor::on_read()
bool acceptor::on_read() {
    int fd = this->get_fd();
    int conn = -1;
    for (int i = 0; i < 128; ++i) {
        conn = ::accept4(fd, nullptr, nullptr, SOCK_NONBLOCK|SOCK_CLOEXEC);
        if (conn == -1) {
            if (errno == EINTR) {
                continue;
            } else if (errno == EMFILE) {
                // 句柄不足，暂停200毫秒，不然会一直触发事件
                if (this->get_poller()->schedule_timer(this, 200, 0) == 0) {
                    this->get_poller()->remove(fd, ev_handler::ev_all);
                }
            }
            break;
        }
        auto eh = this->new_conn_func();
        if (eh == nullptr) {
            socket::close(conn);
            break;
        }
        eh->set_fd(conn);
        if (eh->on_open() == false)
            eh->on_close();
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x40(%rax)
movl %eax, %ebp
xorl %r12d, %r12d
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
movl $0x80800, %ecx          # imm = 0x80800
callq 0x6250
cmpl $-0x1, %eax
je 0x9105
movl %eax, %r15d
callq *0x30(%rbx)
movq %rax, %r14
testq %rax, %rax
je 0x9119
movq (%r14), %rax
movq %r14, %rdi
movl %r15d, %esi
callq *0x48(%rax)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
testb %al, %al
jne 0x9121
movq (%r14), %rax
movq %r14, %rdi
callq *0x38(%rax)
jmp 0x9121
callq 0x6040
movl (%rax), %eax
cmpl $0x4, %eax
jne 0x9131
cmpl $0x7e, %r12d
jbe 0x912c
jmp 0x9161
movl %r15d, %edi
callq 0x6830
testq %r14, %r14
je 0x9161
cmpl $0x7f, %r12d
jae 0x9161
incl %r12d
jmp 0x90be
cmpl $0x18, %eax
jne 0x9161
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
movl $0xc8, %edx
xorl %ecx, %ecx
callq 0x6540
testl %eax, %eax
jne 0x9161
movq 0x18(%rbx), %rdi
movl %ebp, %esi
movl $0x2005, %edx           # imm = 0x2005
callq 0x6790
movb $0x1, %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/acceptor.cpp
// Function: acceptor::listen(int, sockaddr const*, unsigned int, int)
int acceptor::listen(const int fd,
    const struct sockaddr *addr, socklen_t addrlen,
    const int backlog) {
    if (::bind(fd, addr, addrlen) == -1) {
        socket::close(fd);
        fprintf(stderr, "reactor: bind fail! %s\n", strerror(errno));
        return -1;
    }

    if (::listen(fd, backlog) == -1) {
        socket::close(fd);
        fprintf(stderr, "reactor: listen fail! %s\n", strerror(errno));
        return -1;
    }

    if (this->get_reactor()->add_ev_handler(this, fd, ev_handler::ev_accept) != 0) {
        socket::close(fd);
        fprintf(stderr, "reactor: add accept ev handler fail! %s\n", strerror(errno));
        return -1;
    }
    this->set_fd(fd);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %r8d, %ebp
movl %esi, %ebx
movq %rdi, %r14
movl %esi, %edi
movq %rdx, %rsi
movl %ecx, %edx
callq 0x6080
cmpl $-0x1, %eax
je 0x91fc
movl %ebx, %edi
movl %ebp, %esi
callq 0x6520
cmpl $-0x1, %eax
je 0x9205
movq 0x20(%r14), %rdi
movq %r14, %rsi
movl %ebx, %edx
movl $0x2001, %ecx           # imm = 0x2001
callq 0x65e0
testl %eax, %eax
jne 0x920e
movq (%r14), %rax
movq %r14, %rdi
movl %ebx, %esi
callq *0x48(%rax)
xorl %eax, %eax
popq %rbx
popq %r14
popq %rbp
retq
movl %ebx, %edi
callq 0x6c72
jmp 0x9215
movl %ebx, %edi
callq 0x6c41
jmp 0x9215
movl %ebx, %edi
callq 0x6c10
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x91f7
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: connector::connect(ev_handler*, inet_address const&, int, unsigned long)
int connector::connect(ev_handler *eh,
    const inet_address &remote_addr, 
    const int timeout /*milliseconds*/,
    const size_t rcvbuf_size) {

    int fd = ::socket(AF_INET, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0);
    if (fd == -1)
        return -1;

    // `sysctl -a | grep net.ipv4.tcp_rmem` 返回 min default max
    // 默认内核会在min,max之间动态调整, default是初始值, 如果设置了SO_RCVBUF, 
    // 缓冲区大小不变成固定值, 内核也不会进行动态调整了.
    //
    // 必须在listen/connect之前调用
    // must < `sysctl -a | grep net.core.rmem_max`
    
    if (rcvbuf_size > 0 && socket::set_rcvbuf(fd, rcvbuf_size) == -1) {
        socket::close(fd);
        return -1;
    }
    int ret = ::connect(fd,
        reinterpret_cast<sockaddr *>(remote_addr.get_addr()),
        remote_addr.get_addr_size());

    if (ret == 0) {
        eh->set_fd(fd); // fd 所有权转移, 从此后eh管理fd
        if (eh->on_open() == false) {
            eh->on_close(); 
            return -1;
        }
        return 0;
    } else if (errno == EINPROGRESS) {
        if (timeout < 1) {
            socket::close(fd);
            return -1;
        }
        return this->nblock_connect(eh, fd, timeout);
    }
    socket::close(fd);
    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %r12
movl %ecx, %r14d
movq %rdx, %r13
movq %rsi, %rbx
movq %rdi, 0x8(%rsp)
movl $0x2, %edi
movl $0x80801, %esi          # imm = 0x80801
xorl %edx, %edx
callq 0x60f0
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
cmpl $-0x1, %eax
je 0x9306
movl %eax, %r15d
testq %r12, %r12
je 0x928f
leaq 0x10(%rsp), %rcx
movq %r12, (%rcx)
movl %r15d, %edi
movl $0x1, %esi
movl $0x8, %edx
movl $0x8, %r8d
callq 0x6770
cmpl $-0x1, %eax
je 0x92f9
movl %r15d, %edi
movq %r13, %rsi
movl $0x10, %edx
callq 0x63f0
testl %eax, %eax
je 0x92d3
callq 0x6040
cmpl $0x73, (%rax)
jne 0x92c9
testl %r14d, %r14d
jle 0x92c9
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %r14d, %ecx
callq 0x61c0
movl %eax, %ebp
jmp 0x9306
movl %r15d, %edi
callq 0x6830
jmp 0x9306
movq (%rbx), %rax
movq %rbx, %rdi
movl %r15d, %esi
callq *0x48(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
xorl %ebp, %ebp
testb %al, %al
jne 0x9306
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
jmp 0x9301
movl %r15d, %edi
callq 0x6830
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: connector::nblock_connect(ev_handler*, int, int)
int connector::nblock_connect(ev_handler *eh, const int fd, const int timeout) {
    in_progress_connect *ipc = new in_progress_connect(this, eh);

    ipc->set_fd(fd);
    if (this->get_reactor()->add_ev_handler(ipc, fd, ev_handler::ev_connect) == -1) {
        delete ipc;
        socket::close(fd);
        return -1;
    }
    // 要在同一个poller中注册定时器
    //
    // add_ev_handler 和 schedule_timer 不保证原子性,
    // 有可能schedule_timer的时候 ipc已经触发了I/O事件
    ipc->get_poller()->schedule_timer(ipc, timeout, 0);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movl $0x48, %edi
callq 0x64a0
movq %rax, %r14
movq $-0x1, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax)
movq $0x0, 0x28(%rax)
movq 0x5c8b(%rip), %rax      # 0xefe0
addq $0x10, %rax
movq %rax, (%r14)
movw $0x0, 0x30(%r14)
movb $0x0, 0x32(%r14)
movq %r12, 0x38(%r14)
movq %r15, 0x40(%r14)
movl %ebp, 0x8(%r14)
movq 0x20(%r12), %rdi
movq %r14, %rsi
movl %ebp, %edx
movl $0x2005, %ecx           # imm = 0x2005
callq 0x65e0
cmpl $-0x1, %eax
je 0x93a5
movq 0x18(%r14), %rax
movq 0x20(%rax), %rdi
xorl %ebp, %ebp
movq %r14, %rsi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x6540
jmp 0x93ba
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movl %ebp, %edi
callq 0x6830
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: in_progress_connect::on_read()
virtual bool on_read() {
        if (this->io_ev_trigger)
            return true;
        this->eh->on_connect_fail(err_connect_fail);
        this->get_poller()->cancel_timer(this);
        this->io_ev_trigger = true;
        return false;
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movb 0x31(%rdi), %bl
testb %bl, %bl
jne 0x93fe
movq %rdi, %r14
movq 0x40(%rdi), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x28(%rax)
movq 0x18(%r14), %rax
movq 0x20(%rax), %rdi
movq %r14, %rsi
callq 0x6400
movb $0x1, 0x31(%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: in_progress_connect::on_write()
virtual bool on_write() {
        if (this->io_ev_trigger)
            return true;
        int fd = this->get_fd();
        this->set_fd(-1); // From here on, the `fd` resources will be managed by eh.
        this->get_poller()->cancel_timer(this);
        this->io_ev_trigger = true;

        this->ok = true;
        this->eh->set_fd(fd);
        return true;
    }

// Assembly:
cmpb $0x0, 0x31(%rdi)
jne 0x9452
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rax
callq *0x40(%rax)
movl %eax, %ebp
movq (%rbx), %rax
movq %rbx, %rdi
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq *0x48(%rax)
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x6400
movw $0x101, 0x30(%rbx)      # imm = 0x101
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movl %ebp, %esi
callq *0x48(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
movb $0x1, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: in_progress_connect::on_timeout(long)
virtual bool on_timeout(const int64_t) {
        if (this->io_ev_trigger)
            return false;
        
        this->timeout_trigger = true;
        this->get_poller()->remove(this->get_fd(), ev_handler::ev_all);
        this->eh->on_connect_fail(err_connect_timeout);
        this->on_close();
        return false;
    }

// Assembly:
cmpb $0x0, 0x31(%rdi)
jne 0x949f
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0x32(%rdi)
movq (%rdi), %rax
movq 0x18(%rdi), %r14
callq *0x40(%rax)
movq %r14, %rdi
movl %eax, %esi
movl $0x2005, %edx           # imm = 0x2005
callq 0x6790
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movl $0x1, %esi
callq *0x28(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x38(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/connector.cpp
// Function: in_progress_connect::on_close()
virtual void on_close() {
        // maybe trigger EPOLLHUP | EPOLLERR
        if (this->timeout_trigger == false || this->io_ev_trigger == false) {
            this->eh->on_connect_fail(err_connect_fail);
            this->get_poller()->cancel_timer(this);
        }
        this->destroy();

        // eh部分不能在on_write里边调用, 因为fd对应的eh变化了，在poller中fd对应的eh
        // 没有及时更新, 产生混乱
        if (this->ok == true && this->eh->on_open() == false)
            this->eh->on_close();
        delete this;
    }

// Assembly:
pushq %rbx
movq %rdi, %rbx
cmpb $0x0, 0x32(%rdi)
je 0x94b2
cmpb $0x0, 0x31(%rbx)
jne 0x94d1
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
movl $0x2, %esi
callq *0x28(%rax)
movq 0x18(%rbx), %rax
movq 0x20(%rax), %rdi
movq %rbx, %rsi
callq 0x6400
movl 0x8(%rbx), %edi
cmpl $-0x1, %edi
je 0x94e5
callq 0x6830
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
cmpb $0x1, 0x30(%rbx)
jne 0x950a
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
callq *0x10(%rax)
testb %al, %al
jne 0x950a
movq 0x40(%rbx), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
movq (%rbx), %rax
movq %rbx, %rdi
popq %rbx
jmpq *0x8(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/io_handle.cpp
// Function: io_handle::recv(char*&)
int io_handle::recv(char* &buff) {
    if (this->fd == -1)
        return -1;
    
    int ret = 0;
    do {
        ret = ::recv(this->fd, this->poll->io_buf, this->poll->io_buf_size, 0);
        if (ret > 0) {
            buff = this->poll->io_buf;
            break;
        }
    } while (ret == -1 && errno == EINTR);
    return ret;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
cmpl $-0x1, 0x8(%rdi)
je 0x956a
movq %rsi, %rbx
movq %rdi, %r14
movl 0x8(%r14), %edi
movq 0x18(%r14), %rax
movq 0x10(%rax), %rsi
movslq 0xc(%rax), %rdx
xorl %ecx, %ecx
callq 0x6130
movq %rax, %r15
testl %r15d, %r15d
jg 0x9572
cmpl $-0x1, %r15d
jne 0x957d
callq 0x6040
cmpl $0x4, (%rax)
je 0x9539
jmp 0x957d
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
jmp 0x957d
movq 0x18(%r14), %rax
movq 0x10(%rax), %rax
movq %rax, (%rbx)
movl %r15d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/io_handle.cpp
// Function: io_handle::async_send(char const*, int)
int io_handle::async_send(const char *buff, const int len) {
    char *bf = new char[len];
    ::memcpy(bf, buff, len);
    this->poll->push(async_send::item(this->fd, this->seq, async_send_buf(bf, len)));
    return len;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %r15
movslq %edx, %rbx
testl %ebx, %ebx
movq $-0x1, %rdi
cmovnsq %rbx, %rdi
callq 0x6030
movq %rax, %r12
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x63e0
movq 0x18(%r15), %rax
movl 0x8(%r15), %ecx
movq 0x10(%r15), %rdx
movq %rsp, %rsi
movl %ecx, (%rsi)
movq %rdx, 0x8(%rsi)
movq $0x0, 0x10(%rsi)
movl $0x0, 0x18(%rsi)
movl %ebx, 0x1c(%rsi)
movq %r12, 0x20(%rsi)
movq 0x28(%rax), %rdi
callq 0x6270
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/io_handle.cpp
// Function: io_handle::on_write()
bool io_handle::on_write() {
    if (this->fd == -1)
        return false; // goto on_close
                      
    int n = this->async_send_buf_q->length();
    for (auto i = 0; i < n; ++i) {
        async_send_buf &asb = this->async_send_buf_q->front();
        auto ret = ::send(this->fd, asb.buf + asb.sendn, asb.len - asb.sendn, 0);
        if (ret > 0) {
            this->async_send_buf_size -= ret;
            if (ret == (asb.len - asb.sendn)) {
                delete[] asb.buf;
                this->async_send_buf_q->pop_front();
                continue;
            }
            asb.sendn += ret;
        }
        break;
    }
    if (this->async_send_buf_q->empty() && this->async_send_polling == true) {
        this->poll->remove(this->fd, ev_handler::ev_write);
        this->async_send_polling = false;
        this->on_send_buffer_drained();
    }
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl 0x8(%rdi), %ebp
cmpl $-0x1, %ebp
je 0x9900
movq %rdi, %rbx
movq 0x38(%rdi), %rax
movl 0xc(%rax), %r14d
testl %r14d, %r14d
jle 0x98d2
movq 0x38(%rbx), %rax
movq 0x10(%rax), %r15
movslq 0x4(%rax), %r12
shlq $0x4, %r12
movl 0x8(%rbx), %edi
movslq (%r15,%r12), %rax
movq 0x8(%r15,%r12), %rsi
addq %rax, %rsi
movslq 0x4(%r15,%r12), %rdx
subq %rax, %rdx
xorl %ecx, %ecx
callq 0x6280
testq %rax, %rax
jle 0x98d2
addq %r12, %r15
subl %eax, 0x34(%rbx)
movslq 0x4(%r15), %rdx
movslq (%r15), %rcx
subq %rcx, %rdx
cmpq %rdx, %rax
jne 0x98cd
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x9896
callq 0x6580
movq 0x38(%rbx), %rcx
movl 0xc(%rcx), %esi
testl %esi, %esi
je 0x98c2
movq 0x10(%rcx), %rdx
movslq 0x4(%rcx), %rdi
leal 0x1(%rdi), %eax
shlq $0x4, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rdx,%rdi)
cltd
idivl (%rcx)
movl %edx, 0x4(%rcx)
decl %esi
movl %esi, 0xc(%rcx)
decl %r14d
jne 0x9840
jmp 0x98d2
addl %eax, %ecx
movl %ecx, (%r15)
movq 0x38(%rbx), %rax
cmpl $0x0, 0xc(%rax)
jne 0x9900
cmpb $0x1, 0x30(%rbx)
jne 0x9900
movq 0x18(%rbx), %rdi
movl 0x8(%rbx), %esi
movl $0x4, %edx
callq 0x6790
movb $0x0, 0x30(%rbx)
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x58(%rax)
cmpl $-0x1, %ebp
setne %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/io_handle.cpp
// Function: io_handle::sync_ordered_send(async_send_buf&)
void io_handle::sync_ordered_send(async_send_buf &asb) {
    if (this->fd == -1) {
        delete[] asb.buf;
        return;
    }
    this->async_send_buf_size += (asb.len - asb.sendn);
    if (this->async_send_buf_q != nullptr && !this->async_send_buf_q->empty()) {
        this->async_send_buf_q->push_back(asb);
        return ;
    }

    int ret = 0;
    do {
        ret = ::send(this->fd, asb.buf + asb.sendn, asb.len - asb.sendn, 0);
    } while (ret == -1 && errno == EINTR);

    if (ret > 0) { // partial
        this->async_send_buf_size -= ret;
        if (ret == (asb.len - asb.sendn)) {
            delete[] asb.buf;
            return ;
        }
        asb.sendn += ret;
    }
    if (this->async_send_buf_q == nullptr)
        this->async_send_buf_q = new ringq<async_send_buf>(2);
    this->async_send_buf_q->push_back(asb);
    if (this->async_send_polling == false) {
        this->poll->append(this->fd, ev_handler::ev_write);
        this->async_send_polling = true;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpl $-0x1, 0x8(%rdi)
je 0x99bf
movq %rdi, %r14
movl 0x4(%rbx), %eax
subl (%rbx), %eax
addl %eax, 0x34(%rdi)
movq 0x38(%rdi), %r15
testq %r15, %r15
je 0x9985
movl 0xc(%r15), %eax
testl %eax, %eax
je 0x9985
cmpl (%r15), %eax
jne 0x994b
movq %r15, %rdi
callq 0x6230
movq 0x10(%r15), %rcx
movslq 0x8(%r15), %rdx
leal 0x1(%rdx), %eax
shlq $0x4, %rdx
movq 0x8(%rbx), %rsi
movq %rsi, 0x8(%rcx,%rdx)
movq (%rbx), %rsi
movq %rsi, (%rcx,%rdx)
cltd
idivl (%r15)
movl %edx, 0x8(%r15)
incl 0xc(%r15)
jmp 0x9a7d
callq 0x6040
cmpl $0x4, (%rax)
jne 0x99aa
movl 0x8(%r14), %edi
movslq (%rbx), %rax
movq 0x8(%rbx), %rsi
addq %rax, %rsi
movslq 0x4(%rbx), %rdx
subq %rax, %rdx
xorl %ecx, %ecx
callq 0x6280
movq %rax, %r15
cmpl $-0x1, %r15d
je 0x997b
testl %r15d, %r15d
jle 0x99db
subl %r15d, 0x34(%r14)
movl (%rbx), %eax
movl 0x4(%rbx), %ecx
subl %eax, %ecx
cmpl %r15d, %ecx
jne 0x99d6
movq 0x8(%rbx), %rdi
testq %rdi, %rdi
je 0x9a7d
popq %rbx
popq %r14
popq %r15
jmp 0x6580
addl %r15d, %eax
movl %eax, (%rbx)
cmpq $0x0, 0x38(%r14)
jne 0x9a1f
movl $0x18, %edi
callq 0x64a0
movq %rax, %r15
movl $0x2, (%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%rax)
movl $0x0, 0x14(%rax)
movl $0x20, %edi
callq 0x6030
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movq %rax, 0x10(%r15)
movq %r15, 0x38(%r14)
movq 0x38(%r14), %r15
movl 0xc(%r15), %eax
cmpl (%r15), %eax
jne 0x9a34
movq %r15, %rdi
callq 0x6230
movq 0x10(%r15), %rcx
movslq 0x8(%r15), %rdx
leal 0x1(%rdx), %eax
shlq $0x4, %rdx
movq 0x8(%rbx), %rsi
movq %rsi, 0x8(%rcx,%rdx)
movq (%rbx), %rsi
movq %rsi, (%rcx,%rdx)
cltd
idivl (%r15)
movl %edx, 0x8(%r15)
incl 0xc(%r15)
cmpb $0x0, 0x30(%r14)
jne 0x9a7d
movq 0x18(%r14), %rdi
movl 0x8(%r14), %esi
movl $0x4, %edx
callq 0x6210
movb $0x1, 0x30(%r14)
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %r15, %rdi
callq 0x6480
movq %rbx, %rdi
callq 0x6750
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/io_handle.cpp
// Function: io_handle::destroy()
void io_handle::destroy() {
    ev_handler::destroy();

    if (this->async_send_buf_q != nullptr) {
        int n = this->async_send_buf_q->length();
        for (auto i = 0; i < n; ++i) {
            async_send_buf &asb = this->async_send_buf_q->front();
            delete[] asb.buf;
            this->async_send_buf_q->pop_front();
        }
        delete this->async_send_buf_q;
        this->async_send_buf_size = 0;
        this->async_send_buf_q = nullptr;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x8(%rdi), %edi
cmpl $-0x1, %edi
je 0x9ab1
callq 0x6830
movl $0xffffffff, 0x8(%rbx)  # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movq 0x38(%rbx), %rax
testq %rax, %rax
je 0x9b49
movl 0xc(%rax), %ebp
testl %ebp, %ebp
jle 0x9b1b
movq 0x38(%rbx), %rax
movq 0x10(%rax), %rcx
movslq 0x4(%rax), %rax
shlq $0x4, %rax
movq 0x8(%rcx,%rax), %rdi
testq %rdi, %rdi
je 0x9aeb
callq 0x6580
movq 0x38(%rbx), %rcx
movl 0xc(%rcx), %esi
testl %esi, %esi
je 0x9b17
movq 0x10(%rcx), %rdx
movslq 0x4(%rcx), %rdi
leal 0x1(%rdi), %eax
shlq $0x4, %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rdx,%rdi)
cltd
idivl (%rcx)
movl %edx, 0x4(%rcx)
decl %esi
movl %esi, 0xc(%rcx)
decl %ebp
jne 0x9acc
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x9b3a
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x9b32
callq 0x6580
movq %r14, %rdi
callq 0x6480
movl $0x0, 0x34(%rbx)
movq $0x0, 0x38(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/async_send.cpp
// Function: async_send::~async_send()
async_send::~async_send() {
   if (this->efd != -1)
        ::close(this->efd);
    
   if (this->readq != nullptr)
       delete this->readq;
   if (this->writeq != nullptr)
       delete this->writeq;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x531e(%rip), %rax      # 0xefb0
addq $0x10, %rax
movq %rax, (%rdi)
movl 0x30(%rdi), %edi
cmpl $-0x1, %edi
je 0x9ca6
callq 0x6830
movq 0x68(%rbx), %r14
testq %r14, %r14
je 0x9cc5
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0x9cbd
callq 0x6580
movq %r14, %rdi
callq 0x6480
movq 0x70(%rbx), %rbx
testq %rbx, %rbx
je 0x9ceb
movq 0x10(%rbx), %rdi
testq %rdi, %rdi
je 0x9cdc
callq 0x6580
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x6480
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rdi
callq 0x7444
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/async_send.cpp
// Function: async_send::push(async_send::item const&)
void async_send::push(const async_send::item &asi) {
    this->mtx.lock();
    this->writeq->push_back(asi);
    this->mtx.unlock();

    int expected = 0;
    if (!this->notified.compare_exchange_strong(expected, 1))
        return ;
    int64_t v = 1;
    int ret = 0;
    do {
        ret = ::write(this->efd, (void *)&v, sizeof(v));
    } while (ret == -1 && errno == EINTR);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x38(%rdi), %r14
movq %r14, %rdi
callq 0x6680
testl %eax, %eax
jne 0x9e27
movq 0x70(%rbx), %r12
movl 0xc(%r12), %eax
cmpl (%r12), %eax
jne 0x9d9b
movq %r12, %rdi
callq 0x62d0
movq 0x10(%r12), %rax
movslq 0x8(%r12), %rcx
leaq (%rcx,%rcx,4), %rdx
movl (%r15), %esi
movl %esi, (%rax,%rdx,8)
movq 0x10(%r15), %rsi
movq %rsi, 0x10(%rax,%rdx,8)
movq 0x20(%r15), %rsi
movq %rsi, 0x20(%rax,%rdx,8)
movq 0x18(%r15), %rsi
movq %rsi, 0x18(%rax,%rdx,8)
leal 0x1(%rcx), %eax
cltd
idivl (%r12)
movl %edx, 0x8(%r12)
incl 0xc(%r12)
movq %r14, %rdi
callq 0x6380
movl $0x1, %ecx
xorl %eax, %eax
lock
cmpxchgl %ecx, 0x60(%rbx)
jne 0x9e1b
movq %rsp, %r14
movq $0x1, (%r14)
movl 0x30(%rbx), %edi
movl $0x8, %edx
movq %r14, %rsi
callq 0x6150
cmpl $-0x1, %eax
jne 0x9e1b
callq 0x6040
cmpl $0x4, (%rax)
je 0x9dfc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movl %eax, %edi
callq 0x6320
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/async_send.cpp
// Function: async_send::on_read()
bool async_send::on_read() {
    if (this->readq->empty()) {
        this->mtx.lock();
        std::swap(this->readq, this->writeq);
        this->mtx.unlock();
    }
    for (auto i = 0; i < 256 && !this->readq->empty(); ++i) { // 1次最多处理256个
        async_send::item &asi = this->readq->front();
        poll_desc *pd = this->poll->get_poll_desc(asi.fd);
        if (pd != nullptr && asi.seq == pd->seq) // 保证对象没有释放呢
            pd->eh->sync_ordered_send(asi.asb);
        else
            delete[] asi.asb.buf;
        
        this->readq->pop_front();
    }
    if (!this->readq->empty()) // Ignore readable eventfd, continue
        return true;

    int64_t v = 0;
    int ret = 0;
    do {
        ret = ::read(this->efd, (void *)&v, sizeof(v));
    } while (ret == -1 && errno == EINTR);

    this->notified.store(0);
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movq 0x68(%rdi), %rax
cmpl $0x0, 0xc(%rax)
jne 0x9e6e
leaq 0x38(%rbx), %r14
movq %r14, %rdi
callq 0x6680
testl %eax, %eax
jne 0x9f58
movdqu 0x68(%rbx), %xmm0
pshufd $0x4e, %xmm0, %xmm0     # xmm0 = xmm0[2,3,0,1]
movdqu %xmm0, 0x68(%rbx)
movq %r14, %rdi
callq 0x6380
movl $0x100, %ebp            # imm = 0x100
movq 0x68(%rbx), %rax
cmpl $0x0, 0xc(%rax)
je 0x9f13
movq 0x10(%rax), %rcx
movslq 0x4(%rax), %rax
leaq (%rax,%rax,4), %rax
leaq (%rcx,%rax,8), %r14
movq 0x18(%rbx), %rdi
movl (%r14), %esi
callq 0x6370
testq %rax, %rax
je 0x9ebf
movq 0x8(%r14), %rcx
cmpq 0x8(%rax), %rcx
jne 0x9ebf
movq 0x10(%rax), %rdi
addq $0x18, %r14
movq (%rdi), %rax
movq %r14, %rsi
callq *0x50(%rax)
jmp 0x9ecd
movq 0x20(%r14), %rdi
testq %rdi, %rdi
je 0x9ecd
callq 0x6580
movq 0x68(%rbx), %rcx
movl 0xc(%rcx), %esi
testl %esi, %esi
je 0x9f0b
movq 0x10(%rcx), %rdx
movslq 0x4(%rcx), %rax
leaq (%rax,%rax,4), %rdi
movl $0xffffffff, (%rdx,%rdi,8) # imm = 0xFFFFFFFF
incl %eax
pxor %xmm0, %xmm0
movdqu %xmm0, 0x10(%rdx,%rdi,8)
movq $0x0, 0x20(%rdx,%rdi,8)
cltd
idivl (%rcx)
movl %edx, 0x4(%rcx)
decl %esi
movl %esi, 0xc(%rcx)
decl %ebp
jne 0x9e73
movq 0x68(%rbx), %rax
cmpl $0x0, 0xc(%rax)
jne 0x9f4d
leaq 0x8(%rsp), %r14
movq $0x0, (%r14)
movl 0x30(%rbx), %edi
movl $0x8, %edx
movq %r14, %rsi
callq 0x6640
cmpl $-0x1, %eax
jne 0x9f48
callq 0x6040
cmpl $0x4, (%rax)
je 0x9f29
xorl %eax, %eax
xchgl %eax, 0x60(%rbx)
movb $0x1, %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movl %eax, %edi
callq 0x6320
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/reactor.cpp
// Function: reactor::add_ev_handler(ev_handler*, int, unsigned int)
int reactor::add_ev_handler(ev_handler *eh, const int fd, const uint32_t events) {
    if (fd < 0 || eh == nullptr || events == 0)
        return -1;
    int i = 0;
    if (this->poller_num > 1)
        i = fd % this->poller_num;
    eh->set_reactor(this);
    return this->pollers[i].add(eh, fd, events);
}

// Assembly:
movl %edx, %r8d
testl %edx, %edx
sets %al
testq %rsi, %rsi
sete %dl
testl %ecx, %ecx
sete %r9b
orb %dl, %r9b
orb %al, %r9b
je 0xa340
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl (%rdi), %r9d
cmpl $0x2, %r9d
jl 0xa353
movl %r8d, %eax
xorl %edx, %edx
divl %r9d
jmp 0xa355
xorl %edx, %edx
movq %rdi, 0x20(%rsi)
movq %rdx, %rax
shlq $0x7, %rax
leaq (%rax,%rdx,8), %rax
addq 0x8(%rdi), %rax
movq %rax, %rdi
movl %r8d, %edx
jmp 0x67f0
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/reactor.cpp
// Function: reactor::append_ev(int, unsigned int)
int reactor::append_ev(const int fd, const uint32_t events) {
    if (fd < 0 || events == 0)
        return -1;
    int i = 0;
    if (this->poller_num > 1)
        i = fd % this->poller_num;
    return this->pollers[i].append(fd, events);
}

// Assembly:
movl %edx, %ecx
testl %esi, %esi
sets %al
testl %edx, %edx
sete %dl
orb %al, %dl
je 0xa39e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl (%rdi), %r8d
cmpl $0x2, %r8d
jl 0xa3b0
movl %esi, %eax
xorl %edx, %edx
divl %r8d
jmp 0xa3b2
xorl %edx, %edx
movq %rdx, %rax
shlq $0x7, %rax
leaq (%rax,%rdx,8), %rax
addq 0x8(%rdi), %rax
movq %rax, %rdi
movl %ecx, %edx
jmp 0x6210
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/reactor.cpp
// Function: reactor::remove_ev(int, unsigned int)
int reactor::remove_ev(const int fd, const uint32_t events) {
    if (fd < 0 || events == 0)
        return -1;
    int i = 0;
    if (this->poller_num > 1)
        i = fd % this->poller_num;
    return this->pollers[i].remove(fd, events);
}

// Assembly:
movl %edx, %ecx
testl %esi, %esi
sets %al
testl %edx, %edx
sete %dl
orb %al, %dl
je 0xa3e2
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
movl (%rdi), %r8d
cmpl $0x2, %r8d
jl 0xa3f4
movl %esi, %eax
xorl %edx, %edx
divl %r8d
jmp 0xa3f6
xorl %edx, %edx
movq %rdx, %rax
shlq $0x7, %rax
leaq (%rax,%rdx,8), %rax
addq 0x8(%rdi), %rax
movq %rax, %rdi
movl %ecx, %edx
jmp 0x6790
nop
// File: /workspace/github_cpp_makefile_star2_O1/shaovie[P]reactor/src/reactor.cpp
// Function: reactor::run(bool)
void reactor::run(const bool join) {
    if (!join) {
        for (int i = 0; i < this->poller_num; ++i) {
            std::thread thr(&poller::run, &(this->pollers[i]));
            thr.detach();
        }
        return ;
    }
    std::thread **threads = new std::thread*[this->poller_num]();
    for (int i = 0; i < this->poller_num; ++i) {
        threads[i] = new std::thread(&poller::run, &(this->pollers[i]));
    }
    for (int i = 0; i < this->poller_num; ++i) {
        threads[i]->join();
        delete threads[i];
    }
    delete[] threads;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movslq (%rdi), %rax
testl %esi, %esi
je 0xa4f9
movq %rax, %rcx
shlq $0x3, %rcx
testl %eax, %eax
movq $-0x1, %r15
cmovnsq %rcx, %r15
movq %r15, %rdi
callq 0x6030
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movq %r15, %rdx
callq 0x62c0
cmpl $0x0, (%rbx)
jle 0xa4bb
xorl %ebp, %ebp
leaq 0x8(%rsp), %r12
xorl %r15d, %r15d
movl $0x8, %edi
callq 0x64a0
movq %rax, %r13
movq 0x4b55(%rip), %rax      # 0xefd0
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x8(%rbx), %rax
addq %rbp, %rax
movq %rax, 0x8(%rsp)
movq %r13, %rdi
leaq 0x10(%rsp), %rsi
movq %r12, %rdx
callq 0x60c0
movq %r13, (%r14,%r15,8)
incq %r15
movslq (%rbx), %rax
addq $0x88, %rbp
cmpq %rax, %r15
jl 0xa467
cmpl $0x0, (%rbx)
jle 0xa4ef
xorl %r15d, %r15d
movq (%r14,%r15,8), %rdi
callq 0x6700
movq (%r14,%r15,8), %rdi
testq %rdi, %rdi
je 0xa4e4
cmpq $0x0, (%rdi)
jne 0xa57e
callq 0x6480
incq %r15
movslq (%rbx), %rax
cmpq %rax, %r15
jl 0xa4c3
movq %r14, %rdi
callq 0x6580
jmp 0xa562
testl %eax, %eax
jle 0xa562
xorl %r13d, %r13d
leaq 0x8(%rsp), %r14
leaq 0x10(%rsp), %r15
leaq 0x20(%rsp), %r12
xorl %ebp, %ebp
movq 0x4ab8(%rip), %rax      # 0xefd0
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x8(%rbx), %rax
addq %r13, %rax
movq %rax, 0x20(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x60c0
movq %r14, %rdi
callq 0x6740
cmpq $0x0, 0x8(%rsp)
jne 0xa57e
incq %rbp
movslq (%rbx), %rax
addq $0x88, %r13
cmpq %rax, %rbp
jl 0xa511
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x8(%rsp)
jne 0xa57e
movq %rax, %rbx
jmp 0xa58e
callq 0x6110
movq %rax, %rbx
movq %r13, %rdi
callq 0x6480
movq %rbx, %rdi
callq 0x6750
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/src/wrapper.cpp
// Function: beacon2d_fix
void beacon2d_fix(Beacon2D *b, float tick, float rmsError, int maxTries) {
        Beacon2D estimate = b->Fix<Beacon2D::DifferenceSolver>(tick, rmsError, maxTries);
        //Beacon2D estimate = b->Fix<Beacon2D::RangeSolver>(rmsError);
        // TODO: take these out and return the values
        b->Position(estimate.Position());
        b->Error(estimate.Error());
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0x68, %rsp
movl %esi, %edx
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0xdb60
movsd 0x20(%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
movss 0x40(%r14), %xmm0
movss %xmm0, 0x40(%rbx)
movq 0x10(%r14), %rdi
callq 0xd740
movq (%r14), %rdi
callq 0xd740
addq $0x68, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/range.h
// Function: Beacon<float, 2>::RangeSolver::setCoefficients()
void Beacon<F, D>::RangeSolver::setCoefficients() {
    int n = B.A.rows();
    G.resize(n, D+1);
    h.resize(n, 1);
    G << B.A, Matrix<F, Dynamic, 1>::Constant(n, 1, -0.5);
    h << (1.0 / 2.0) * (
        B.A.array().pow(2.0).matrix().rowwise().sum() -
        B.R.array().pow(2.0).matrix()
    );
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb0, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movslq 0x8(%rax), %r14
leaq 0x10(%rdi), %r12
movl $0x3, %edx
movq %r12, %rdi
movq %r14, %rsi
callq 0xdc60
leaq 0x20(%rbx), %rdi
movl $0x1, %edx
movq %r14, %rsi
callq 0xdc00
movq 0x8(%rbx), %rax
leaq 0x70(%rsp), %r15
movq %r12, (%r15)
movq $0x0, 0x8(%r15)
movl $0x2, %ecx
movq %rcx, 0x10(%r15)
movq 0x8(%rax), %rdx
movq %rdx, 0x18(%r15)
movq 0x10(%rbx), %rsi
movq 0x18(%rbx), %rdi
leaq 0x38(%rsp), %r13
movq %rsi, (%r13)
movq %rdx, 0x8(%r13)
movq %rcx, 0x10(%r13)
movq %r12, 0x18(%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r13)
movq %rdi, 0x30(%r13)
movq (%rax), %rax
leaq 0x10(%rsp), %rcx
movq %rax, (%rcx)
movq %rdx, 0x8(%rcx)
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
movq %rdi, 0x10(%rax)
leaq 0x90(%rsp), %rdi
movq %rax, (%rdi)
movq %rcx, 0x8(%rdi)
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rdi)
movq %r13, 0x18(%rdi)
callq 0xd090
movq %r14, (%r13)
movl $0xbf000000, 0xc(%r13)  # imm = 0xBF000000
leaq 0x38(%rsp), %rsi
movq %r15, %rdi
callq 0xd200
movq 0x8(%rbx), %rdi
movq 0x18(%rdi), %rax
testq %rax, %rax
jle 0xe3a8
movq 0x20(%rbx), %rcx
movq 0x10(%rdi), %rdx
movq (%rdi), %rsi
movq 0x8(%rdi), %rdi
leaq (%rsi,%rdi,4), %rdi
xorl %r8d, %r8d
movss 0x16c90(%rip), %xmm0    # 0x25000
movss (%rsi,%r8,4), %xmm1
mulss %xmm1, %xmm1
movss (%rdi,%r8,4), %xmm2
mulss %xmm2, %xmm2
addss %xmm1, %xmm2
movss (%rdx,%r8,4), %xmm1
mulss %xmm1, %xmm1
subss %xmm1, %xmm2
mulss %xmm0, %xmm2
movss %xmm2, (%rcx,%r8,4)
incq %r8
cmpq %r8, %rax
jne 0xe370
addq $0xb0, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/range.h
// Function: Beacon<float, 2>::RangeSolver::operator()(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::Matrix<float, -1, 1, 0, -1, 1>&) const
int Beacon<F,D>::RangeSolver::operator()(const InputType &X_hat, Ranges &fvec) const {
    Point x = X_hat.transpose().leftCols(D);
    Ranges R_hat = Beacon::calculateRanges(B.A, x);
    fvec << (B.R - R_hat);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movss (%rax), %xmm0
leaq 0x20(%rsp), %rdx
movss %xmm0, (%rdx)
movss 0x4(%rax), %xmm0
movss %xmm0, 0x4(%rdx)
movq 0x8(%rdi), %rsi
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0xd6f0
movq 0x8(%r14), %rax
movq (%r15), %rcx
movq 0x8(%r15), %rdx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
leaq 0x78(%rsp), %r8
movq %rsi, (%r8)
movq %rdx, 0x8(%r8)
movq $0x1, 0x10(%r8)
movq %rbx, 0x18(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r8)
movq %rdi, 0x30(%r8)
movq 0x10(%rax), %rax
leaq 0x40(%rsp), %rdx
movq %rax, 0x8(%rdx)
movq %rcx, 0x10(%rdx)
leaq 0x28(%rsp), %rax
movq %rsi, (%rax)
movq %rdi, 0x10(%rax)
leaq 0x58(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
leaq 0xf(%rsp), %rax
movq %rax, 0x10(%rdi)
movq %r8, 0x18(%rdi)
callq 0xd150
movq 0x10(%rsp), %rdi
callq 0xd740
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb50
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/difference.h
// Function: Beacon<float, 2>::DifferenceSolver::operator()(Eigen::Matrix<float, -1, 1, 0, -1, 1> const&, Eigen::Matrix<float, -1, 1, 0, -1, 1>&) const
int Beacon<F,D>::DifferenceSolver::operator()(const InputType &X_hat, Ranges &fvec) const {
    Point x = X_hat.transpose().leftCols(D);
    int i, j;

    B.R.minCoeff(&i, &j);

    Ranges R_hat = Beacon::calculateRanges(B.A, x);
    R_hat = (R_hat.array() - R_hat[i]).matrix(); 

    fvec << (B.R - R_hat);
    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, %rbx
movq %rdi, %r14
movq (%rsi), %rax
movss (%rax), %xmm0
movss %xmm0, 0x8(%rsp)
movss 0x4(%rax), %xmm0
movss %xmm0, 0xc(%rsp)
movq 0x8(%rdi), %rsi
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0xefb1
cmpq $0x2, %rax
jl 0xefba
movq 0x10(%rsi), %rcx
movss (%rcx), %xmm0
movl $0x1, %edi
xorl %edx, %edx
movss (%rcx,%rdi,4), %xmm1
ucomiss %xmm1, %xmm0
cmovaq %rdi, %rdx
minss %xmm1, %xmm0
incq %rdi
cmpq %rdi, %rax
jne 0xef94
movslq %edx, %r12
jmp 0xefbd
movq $-0x1, %r12
jmp 0xefbd
xorl %r12d, %r12d
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %rdx
movq %r15, %rdi
callq 0xd6f0
movq (%r15), %rax
movq 0x8(%r15), %rcx
movss (%rax,%r12,4), %xmm0
leaq 0x3(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
andq $-0x4, %rdx
cmpq $0x4, %rcx
jl 0xf00e
movaps %xmm0, %xmm1
shufps $0x0, %xmm0, %xmm1      # xmm1 = xmm1[0,0],xmm0[0,0]
xorl %esi, %esi
movaps (%rax,%rsi,4), %xmm2
subps %xmm1, %xmm2
movaps %xmm2, (%rax,%rsi,4)
addq $0x4, %rsi
cmpq %rdx, %rsi
jl 0xeffa
cmpq %rcx, %rdx
jge 0xf029
movss (%rax,%rdx,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xf013
movq 0x8(%r14), %rax
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %rdx
movq (%rbx), %rsi
movq 0x8(%rbx), %rdi
leaq 0x70(%rsp), %r8
movq %rsi, (%r8)
movq %rdx, 0x8(%r8)
movq $0x1, 0x10(%r8)
movq %rbx, 0x18(%r8)
xorps %xmm0, %xmm0
movups %xmm0, 0x20(%r8)
movq %rdi, 0x30(%r8)
movq 0x10(%rax), %rax
leaq 0x38(%rsp), %rdx
movq %rax, 0x8(%rdx)
movq %rcx, 0x10(%rdx)
leaq 0x20(%rsp), %rax
movq %rsi, (%rax)
movq %rdi, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq %rax, (%rdi)
movq %rdx, 0x8(%rdi)
leaq 0x7(%rsp), %rax
movq %rax, 0x10(%rdi)
movq %r8, 0x18(%rdi)
callq 0xd150
movq 0x10(%rsp), %rdi
callq 0xd740
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb50
nop
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/beacon.h
// Function: Beacon<float, 2>::checkSize(int)
void Beacon<F, D>::checkSize(int i) {
    if (i >= A.rows()) {
        A.conservativeResize(i + 1, Eigen::NoChange);
        R.conservativeResize(i + 1);
        R(i) = 0.0;
    } 
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movslq %esi, %r15
cmpq %r15, 0x8(%rdi)
jg 0xf113
movq %rdi, %rbx
leal 0x1(%r15), %eax
movslq %eax, %r14
movl $0x2, %edx
movq %r14, %rsi
callq 0xdbd0
leaq 0x10(%rbx), %rdi
movl $0x1, %ecx
movq %r14, %rsi
movq %r14, %rdx
callq 0xdaa0
movq 0x10(%rbx), %rax
movl $0x0, (%rax,%r15,4)
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/beacon.h
// Function: Beacon<float, 2>::findRow(Eigen::Array<float, 1, 2, 1, 1, 2> const&) const
int Beacon<F, D>::findRow(const Point &a) const {
    int i;
    for (i = 0; i < A.rows(); i++) {
        if (A.row(i).array().isApprox(a)) {
            break;
        }
    }
    return i;
}

// Assembly:
movq 0x8(%rdi), %rcx
testq %rcx, %rcx
jle 0xf18f
movq (%rdi), %rdx
movsd (%rsi), %xmm0
movaps %xmm0, %xmm2
mulps %xmm0, %xmm2
movaps %xmm2, %xmm1
shufps $0x55, %xmm2, %xmm1     # xmm1 = xmm1[1,1],xmm2[1,1]
addss %xmm2, %xmm1
leaq (%rdx,%rcx,4), %rsi
xorl %eax, %eax
movss 0x15ebf(%rip), %xmm2    # 0x25008
movss (%rdx,%rax,4), %xmm3
movss (%rsi,%rax,4), %xmm4
movaps %xmm3, %xmm5
unpcklps %xmm4, %xmm5            # xmm5 = xmm5[0],xmm4[0],xmm5[1],xmm4[1]
subps %xmm0, %xmm5
mulps %xmm5, %xmm5
movaps %xmm5, %xmm6
shufps $0x55, %xmm5, %xmm6     # xmm6 = xmm6[1,1],xmm5[1,1]
addss %xmm5, %xmm6
mulss %xmm3, %xmm3
mulss %xmm4, %xmm4
addss %xmm3, %xmm4
minss %xmm1, %xmm4
mulss %xmm2, %xmm4
ucomiss %xmm4, %xmm6
jbe 0xf18e
incq %rax
cmpq %rax, %rcx
jne 0xf149
movq %rcx, %rax
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/fix.h
// Function: Beacon<float, 2>::estimateError()
void Beacon<F, D>::estimateError() {
    Ranges R_hat;
    int i, j;

    // FIXME FIXME: this no longer works for RangeSolver
    //
    //std::cout << "\n\nR: " << R << "\n";
    R_hat = calculateRanges(A, X);
    //std::cout << "R_hat pre: " << R_hat << "\n";
    R.minCoeff(&i, &j);
    R_hat = (R_hat.array() - R_hat[i]).matrix(); 
    //std::cout << "R_hat post: " << R_hat << "\n";
    Err = meanSquaredError(R_hat);
}

// Assembly:
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
leaq 0x20(%rdi), %rdx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0xd6f0
movups 0x10(%rsp), %xmm0
movq (%rsp), %rdi
movq 0x8(%rsp), %rax
movaps %xmm0, (%rsp)
movq %rdi, 0x10(%rsp)
movq %rax, 0x18(%rsp)
callq 0xd740
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0xf262
cmpq $0x2, %rax
jl 0xf26b
movq 0x10(%rbx), %rcx
movss (%rcx), %xmm0
movl $0x1, %esi
xorl %edx, %edx
movss (%rcx,%rsi,4), %xmm1
ucomiss %xmm1, %xmm0
cmovaq %rsi, %rdx
minss %xmm1, %xmm0
incq %rsi
cmpq %rsi, %rax
jne 0xf245
movslq %edx, %rdx
jmp 0xf26d
movq $-0x1, %rdx
jmp 0xf26d
xorl %edx, %edx
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movss (%rax,%rdx,4), %xmm0
leaq 0x3(%rcx), %rdx
testq %rcx, %rcx
cmovnsq %rcx, %rdx
andq $-0x4, %rdx
cmpq $0x4, %rcx
jl 0xf2ad
movaps %xmm0, %xmm1
shufps $0x0, %xmm0, %xmm1      # xmm1 = xmm1[0,0],xmm0[0,0]
xorl %esi, %esi
movaps (%rax,%rsi,4), %xmm2
subps %xmm1, %xmm2
movaps %xmm2, (%rax,%rsi,4)
addq $0x4, %rsi
cmpq %rdx, %rsi
jl 0xf299
cmpq %rcx, %rdx
jge 0xf2c8
movss (%rax,%rdx,4), %xmm1
subss %xmm0, %xmm1
movss %xmm1, (%rax,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xf2b2
movq %rsp, %rsi
movq %rbx, %rdi
callq 0xd980
movss %xmm0, 0x40(%rbx)
movq (%rsp), %rdi
callq 0xd740
addq $0x20, %rsp
popq %rbx
retq
jmp 0xf2e9
movq %rax, %rbx
movq (%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb50
nop
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/beacon.h
// Function: Beacon<float, 2>::Reading(Eigen::Array<float, 1, 2, 1, 1, 2> const&, float)
int Beacon<F, D>::Reading(const Point &anchor, F range) {
    int i = findRow(anchor);
    Anchor(i, anchor);
    Range(i, range);
    return i;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movss %xmm0, 0x4(%rsp)
movq %rsi, %rbx
movq %rdi, %r14
callq 0xd080
movl %eax, %ebp
movq %r14, %rdi
movl %eax, %esi
callq 0xd7b0
movslq %ebp, %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
leaq (%rax,%r15,4), %rax
movss (%rbx), %xmm0
movss %xmm0, (%rax)
movss 0x4(%rbx), %xmm0
movss %xmm0, (%rax,%rcx,4)
movq %r14, %rdi
movl %r15d, %esi
callq 0xd7b0
movq 0x10(%r14), %rax
movss 0x4(%rsp), %xmm0
movss %xmm0, (%rax,%r15,4)
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/fix.h
// Function: bool Beacon<float, 2>::Update<Beacon<float, 2>::DifferenceSolver>(float, float, int)
bool Beacon<F, D>::Update(F time, F rmsThreshold, int maxTries) {
    if (A.rows() <= D + 1) {
        qfdebug("Not enough readings for a fix");
        return false;
    }
    Beacon b = Fix<Solver>(time, rmsThreshold, maxTries);
    rmsThreshold *= rmsThreshold;
    b.estimateError();
    if (b.Err < rmsThreshold) {
        if (Filter != NULL) {
            Filter->Update(time-Time, b.X);
            X = Filter->Position();
        } else {
            X = b.X;
        }
        qfdebug("Δt=" << (time-Time) << ": " << X << " (" << Err << ") filtered vs " << b.X << " (" << b.Err << ") estimate on " << b.A.rows());
        clipToBound();
        Time = time;
        Err = b.Err;
        Clear();
        return true;
    } else {
        qfdebug("MSE " << b.Err << " exceeded threshold " << rmsThreshold);
        Err = b.Err;
        return false;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x70, %rsp
cmpq $0x4, 0x8(%rdi)
jge 0xfc22
xorl %ebp, %ebp
jmp 0xfd1c
movl %esi, %edx
movq %rdi, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movss %xmm0, 0x8(%rsp)
movss %xmm1, 0xc(%rsp)
callq 0xdb60
movq %r14, %rdi
callq 0xd500
movss 0xc(%rsp), %xmm1
mulss %xmm1, %xmm1
movss 0x50(%rsp), %xmm0
ucomiss %xmm0, %xmm1
seta %bpl
jbe 0xfc9c
movq 0x50(%rbx), %rdi
testq %rdi, %rdi
je 0xfca3
movss 0x8(%rsp), %xmm0
subss 0x44(%rbx), %xmm0
leaq 0x30(%rsp), %rsi
movq (%rdi), %rax
callq *0x20(%rax)
movq 0x50(%rbx), %rdi
movq (%rdi), %rax
callq *0x30(%rax)
movss (%rax), %xmm0
movss %xmm0, 0x20(%rbx)
addq $0x4, %rax
jmp 0xfcb2
movss %xmm0, 0x40(%rbx)
jmp 0xfd08
leaq 0x34(%rsp), %rax
movss -0x4(%rax), %xmm0
movss %xmm0, 0x20(%rbx)
movss (%rax), %xmm0
movss %xmm0, 0x24(%rbx)
movaps 0x30(%rbx), %xmm0
movups 0x34(%rbx), %xmm1
movsd 0x20(%rbx), %xmm2
movss 0x38(%rbx), %xmm3
movlhps %xmm0, %xmm3            # xmm3 = xmm3[0],xmm0[0]
shufps $0xe2, %xmm0, %xmm3     # xmm3 = xmm3[2,0],xmm0[2,3]
maxps %xmm2, %xmm3
movss 0x3c(%rbx), %xmm0
movlhps %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
shufps $0xe2, %xmm1, %xmm0     # xmm0 = xmm0[2,0],xmm1[2,3]
minps %xmm3, %xmm0
movlps %xmm0, 0x20(%rbx)
movss 0x8(%rsp), %xmm0
movss %xmm0, 0x44(%rbx)
movss 0x50(%rsp), %xmm0
movss %xmm0, 0x40(%rbx)
movq %rbx, %rdi
callq 0xd5b0
movq 0x20(%rsp), %rdi
callq 0xd740
movq 0x10(%rsp), %rdi
callq 0xd740
movl %ebp, %eax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
callq 0xd740
movq 0x10(%rsp), %rdi
callq 0xd740
movq %rbx, %rdi
callq 0xdb50
// File: /workspace/github_cpp_makefile_star2_O1/schuyler[P]quickfix/include/quickfix/particle_filter.h
// Function: ParticleFilter<float, 2>::Update(float, Eigen::Array<float, 1, 2, 1, 1, 2> const&)
bool ParticleFilter<F,D>::Update(F dT, const Point &p) {
    weigh(dT, p);
    shuffle();
    X = P.colwise().mean();
    perturb(dT);
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movss %xmm0, 0x10(%rsp)
callq 0xd430
movq %rbx, %rdi
callq 0xd050
xorps %xmm0, %xmm0
cvtsi2ssq 0x10(%rbx), %xmm0
leaq 0x8(%rbx), %r13
movss 0xb881(%rip), %xmm1     # 0x2500c
divss %xmm0, %xmm1
movss %xmm1, 0x14(%rsp)
xorl %ebp, %ebp
leaq 0x50(%rsp), %r14
leaq 0xf(%rsp), %r15
leaq 0x18(%rsp), %r12
movq 0x10(%rbx), %rax
movq %rax, %rcx
imulq %rbp, %rcx
shlq $0x2, %rcx
addq 0x8(%rbx), %rcx
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movq %r13, 0x30(%rsp)
movq $0x0, 0x38(%rsp)
movq %rbp, 0x40(%rsp)
movq %rax, 0x48(%rsp)
testq %rax, %rax
je 0x197fa
movq %rcx, 0x50(%rsp)
movq %rax, 0x60(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0xd560
jmp 0x197fd
xorps %xmm0, %xmm0
mulss 0x14(%rsp), %xmm0
movss %xmm0, 0x28(%rbx,%rbp,4)
incq %rbp
cmpq $0x1, %rbp
je 0x197a6
movq %rbx, %rdi
movss 0x10(%rsp), %xmm0
callq 0xd350
movb $0x1, %al
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop