LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: theuni[P]libbtcnet/src/bareconn.cpp
// Function: CBareConnection::conn_event(bufferevent*, short, void*)
void CBareConnection::conn_event(bufferevent* bev, short event, void* ctx)
{
    assert(bev != nullptr);
    assert(ctx != nullptr);
    CBareConnection* data = static_cast<CBareConnection*>(ctx);
    if ((event & BEV_EVENT_CONNECTED) != 0)
        data->OnConnectSuccess(std::move(data->m_bev));
    else {
        evutil_socket_t sock = bufferevent_getfd(bev);
        (void)sock;
        // sock may be BAD_SOCKET here if it wasn't successfully created.
        int error = evutil_socket_geterror(sock);
        data->m_bev.free();
        data->OnConnectFailure(event, error);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x19e00
jmp 0x19e1f
leaq 0xcbe6(%rip), %rdi      # 0x269ed
leaq 0xc9bd(%rip), %rsi      # 0x267cb
movl $0x12, %edx
leaq 0xc9c2(%rip), %rcx      # 0x267dc
callq 0x52e0
cmpq $0x0, -0x18(%rbp)
je 0x19e28
jmp 0x19e47
leaq 0xc6ff(%rip), %rdi      # 0x2652e
leaq 0xc995(%rip), %rsi      # 0x267cb
movl $0x13, %edx
leaq 0xc99a(%rip), %rcx      # 0x267dc
callq 0x52e0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movswl -0xa(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x19e71
movq -0x20(%rbp), %rdi
movq -0x20(%rbp), %rsi
addq $0x8, %rsi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x19ea8
movq -0x8(%rbp), %rdi
callq 0x51d0
movl %eax, -0x24(%rbp)
callq 0x5050
movl (%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a0a0
movq -0x20(%rbp), %rdi
movw -0xa(%rbp), %cx
movl -0x28(%rbp), %edx
movq (%rdi), %rax
movswl %cx, %esi
callq *0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nop
// File: theuni[P]libbtcnet/src/bareconn.cpp
// Function: CBareConnection::BareConnect(event_type<event_base> const&, int, int, sockaddr*, int, timeval const&)
void CBareConnection::BareConnect(const event_type<event_base>& base, int bev_opts, evutil_socket_t socket, sockaddr* addr, int addrlen, const timeval& connTimeout)
{
    assert(!m_bev);
    assert(addr != nullptr);
    assert(addrlen > 0);

    m_bev = event_type<bufferevent>(bufferevent_socket_new(base, socket, bev_opts));

    int ret;
    ret = bufferevent_disable(m_bev, EV_READ | EV_WRITE);
    assert(ret == 0);
    (void)ret;
    ret = bufferevent_set_timeouts(m_bev, &connTimeout, &connTimeout);
    assert(ret == 0);
    (void)ret;
    bufferevent_setcb(m_bev, nullptr, nullptr, conn_event, this);
    bufferevent_socket_connect(m_bev, addr, addrlen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movl %r9d, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x8, %rdi
callq 0x1a0e0
testb $0x1, %al
jne 0x19ee9
jmp 0x19eeb
jmp 0x19f0a
leaq 0xc930(%rip), %rdi      # 0x26822
leaq 0xc8d2(%rip), %rsi      # 0x267cb
movl $0x23, %edx
leaq 0xc924(%rip), %rcx      # 0x26829
callq 0x52e0
cmpq $0x0, -0x20(%rbp)
je 0x19f13
jmp 0x19f32
leaq 0xc97d(%rip), %rdi      # 0x26897
leaq 0xc8aa(%rip), %rsi      # 0x267cb
movl $0x24, %edx
leaq 0xc8fc(%rip), %rcx      # 0x26829
callq 0x52e0
cmpl $0x0, -0x24(%rbp)
jle 0x19f3a
jmp 0x19f59
leaq 0xc966(%rip), %rdi      # 0x268a7
leaq 0xc883(%rip), %rsi      # 0x267cb
movl $0x25, %edx
leaq 0xc8d5(%rip), %rcx      # 0x26829
callq 0x52e0
movq -0x10(%rbp), %rdi
callq 0x10f40
movq %rax, %rdi
movl -0x18(%rbp), %esi
movl -0x14(%rbp), %edx
callq 0x56d0
movq %rax, %rsi
leaq -0x30(%rbp), %rdi
callq 0x1a100
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
leaq -0x30(%rbp), %rsi
callq 0x1a150
leaq -0x30(%rbp), %rdi
callq 0x1a070
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a1a0
movq %rax, %rdi
movl $0x6, %esi
callq 0x55e0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x19fbb
jmp 0x19fda
leaq 0xc8f1(%rip), %rdi      # 0x268b3
leaq 0xc802(%rip), %rsi      # 0x267cb
movl $0x2b, %edx
leaq 0xc854(%rip), %rcx      # 0x26829
callq 0x52e0
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a1a0
movq %rax, %rdi
movq 0x10(%rbp), %rsi
movq 0x10(%rbp), %rdx
callq 0x55d0
movl %eax, -0x34(%rbp)
cmpl $0x0, -0x34(%rbp)
jne 0x1a002
jmp 0x1a021
leaq 0xc8aa(%rip), %rdi      # 0x268b3
leaq 0xc7bb(%rip), %rsi      # 0x267cb
movl $0x2e, %edx
leaq 0xc80d(%rip), %rcx      # 0x26829
callq 0x52e0
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a1a0
movq -0x40(%rbp), %r8
movq %rax, %rdi
xorl %eax, %eax
movl %eax, %edx
leaq -0x260(%rip), %rcx      # 0x19de0
movq %rdx, %rsi
callq 0x5410
movq -0x40(%rbp), %rdi
addq $0x8, %rdi
callq 0x1a1a0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movl -0x24(%rbp), %edx
callq 0x54b0
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::DisconnectInt(int)
void ConnectionBase::DisconnectInt(int /*reason*/)
{
    DEBUG_PRINT(LOGINFO, "id:", m_id, "disconnecting");
    m_disconnect_func.del();
    m_reconnect_func.del();
    m_disconnect_wait_func.del();
    m_check_write_buffer_func.del();
    m_ping_timeout_func.del();
    m_first_data_func.del();
    {
        BufferEventLocker lock(m_bev);
        bufferevent_disable(m_bev, EV_READ | EV_WRITE);
        bufferevent_setcb(m_bev, nullptr, nullptr, nullptr, nullptr);
    }
    bool reconnect = m_connection.GetOptions().fPersistent && this->IsOutgoing();
    m_handler.OnDisconnected(m_id, reconnect);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x40(%rbp)
addq $0x190, %rdx            # imm = 0x190
leaq 0xc2cb(%rip), %rdi      # 0x26a60
leaq 0xb4fa(%rip), %rsi      # 0x25c96
leaq 0xc2cb(%rip), %rcx      # 0x26a6e
callq 0x1c7f0
movq -0x40(%rbp), %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x1b8, %rdi            # imm = 0x1B8
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x208, %rdi            # imm = 0x208
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x280, %rdi            # imm = 0x280
callq 0x23a80
movq -0x40(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
movq %rdi, -0x38(%rbp)
callq 0x1a1a0
movq %rax, %rsi
leaq -0x18(%rbp), %rdi
callq 0x1c730
movq -0x38(%rbp), %rdi
callq 0x1a1a0
movq %rax, -0x30(%rbp)
jmp 0x1a837
movq -0x30(%rbp), %rdi
movl $0x6, %esi
callq 0x55e0
jmp 0x1a847
movq -0x40(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a1a0
movq %rax, -0x48(%rbp)
jmp 0x1a85d
movq -0x48(%rbp), %rdi
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rsi
movq %r8, %rdx
movq %r8, %rcx
callq 0x5410
jmp 0x1a876
leaq -0x18(%rbp), %rdi
callq 0x1c760
movq -0x40(%rbp), %rdi
addq $0x18, %rdi
callq 0xa9c0
movq %rax, %rcx
xorl %eax, %eax
testb $0x1, 0x2(%rcx)
movb %al, -0x49(%rbp)
je 0x1a8a7
movq -0x40(%rbp), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movb %al, -0x49(%rbp)
movq -0x40(%rbp), %rax
movb -0x49(%rbp), %cl
andb $0x1, %cl
movb %cl, -0x25(%rbp)
movq 0x8(%rax), %rdi
movq 0x190(%rax), %rsi
movb -0x25(%rbp), %al
andb $0x1, %al
movzbl %al, %edx
callq 0xeae0
addq $0x50, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x1c760
movq -0x20(%rbp), %rdi
callq 0x5710
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::CheckWriteBufferInt()
void ConnectionBase::CheckWriteBufferInt()
{
    DEBUG_PRINT(LOGVERBOSE, "id:", m_id, "Checking write buffer");
    assert(m_bev);
    bool full = false;
    size_t buflen;
    int maxsend = m_connection.GetOptions().nMaxSendBuffer;
    {
        BufferEventLocker lock(m_bev);
        evbuffer* output = bufferevent_get_output(m_bev);
        buflen = evbuffer_get_length(output);
        if (static_cast<int>(buflen) >= maxsend) {
            full = true;
            bufferevent_setcb(m_bev, read_cb_ptr, write_cb, event_cb, this);
        }
    }
    if (full)
        m_handler.OnWriteBufferFull(m_id, buflen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdx
movq %rdx, -0x48(%rbp)
addq $0x190, %rdx            # imm = 0x190
leaq 0xc048(%rip), %rdi      # 0x26b5a
leaq 0xb17d(%rip), %rsi      # 0x25c96
leaq 0xc04e(%rip), %rcx      # 0x26b6e
callq 0x1c890
movq -0x48(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x19d80
testb $0x1, %al
jne 0x1ab3b
jmp 0x1ab3d
jmp 0x1ab5c
leaq 0xbcdf(%rip), %rdi      # 0x26823
leaq 0xbe2d(%rip), %rsi      # 0x26978
movl $0x114, %edx            # imm = 0x114
leaq 0xc02d(%rip), %rcx      # 0x26b84
callq 0x52e0
movq -0x48(%rbp), %rdi
movb $0x0, -0x9(%rbp)
addq $0x18, %rdi
callq 0xa9c0
movq -0x48(%rbp), %rdi
movl 0x1c(%rax), %eax
movl %eax, -0x1c(%rbp)
addq $0x1a8, %rdi            # imm = 0x1A8
movq %rdi, -0x58(%rbp)
callq 0x1a1a0
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x1c730
movq -0x58(%rbp), %rdi
callq 0x1a1a0
movq %rax, -0x50(%rbp)
jmp 0x1aba2
movq -0x50(%rbp), %rdi
callq 0x5140
movq %rax, -0x60(%rbp)
jmp 0x1abb1
movq -0x60(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x5440
movq %rax, -0x68(%rbp)
jmp 0x1abc8
movq -0x68(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl -0x1c(%rbp), %eax
jl 0x1ac30
movq -0x48(%rbp), %rdi
movb $0x1, -0x9(%rbp)
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a1a0
movq %rax, -0x70(%rbp)
jmp 0x1abf3
movq -0x48(%rbp), %r8
movq -0x70(%rbp), %rdi
movq 0x2a8(%r8), %rsi
leaq 0x18c7(%rip), %rdx      # 0x1c4d0
leaq 0x780(%rip), %rcx       # 0x1b390
callq 0x5410
jmp 0x1ac17
jmp 0x1ac30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1c760
jmp 0x1ac5d
leaq -0x28(%rbp), %rdi
callq 0x1c760
testb $0x1, -0x9(%rbp)
je 0x1ac57
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rdi
movq 0x190(%rax), %rsi
movq -0x18(%rbp), %rdx
callq 0xfac0
addq $0x70, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x5710
nopw %cs:(%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::ResetPingTimeout(int)
void ConnectionBase::ResetPingTimeout(int seconds)
{
    if (seconds != 0) {
        timeval timeout = {seconds, 0};
        m_ping_timeout_func.add(&timeout);
    } else
        m_ping_timeout_func.del();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x1ae13
movq -0x28(%rbp), %rdi
movslq -0xc(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
addq $0x258, %rdi            # imm = 0x258
leaq -0x20(%rbp), %rsi
callq 0x23b10
jmp 0x1ae23
movq -0x28(%rbp), %rdi
addq $0x258, %rdi            # imm = 0x258
callq 0x23a80
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::Retry(long)
void ConnectionBase::Retry(ConnID newId)
{
    m_bev.free();
    m_rate_cfg.free();
    m_bytes_read = 0;
    m_bytes_written = 0;

    m_id = newId;
    DEBUG_PRINT(LOGVERBOSE, "id:", m_id, "queuing reconnect");
    timeval timeout{m_connection.GetOptions().nRetryInterval, 0};
    m_reconnect_func.add(&timeout);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a0a0
movq -0x28(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
callq 0x11590
movq -0x28(%rbp), %rdx
movq $0x0, 0x198(%rdx)
movq $0x0, 0x1a0(%rdx)
movq -0x10(%rbp), %rax
movq %rax, 0x190(%rdx)
addq $0x190, %rdx            # imm = 0x190
leaq 0xb96c(%rip), %rdi      # 0x269d3
leaq 0xac28(%rip), %rsi      # 0x25c96
leaq 0xb964(%rip), %rcx      # 0x269d9
callq 0x1c790
movq -0x28(%rbp), %rdi
addq $0x18, %rdi
callq 0xa9c0
movq -0x28(%rbp), %rdi
movslq 0x20(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
addq $0x1b8, %rdi            # imm = 0x1B8
leaq -0x20(%rbp), %rsi
callq 0x23b10
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::SetRateLimit(CRateLimit const&)
void ConnectionBase::SetRateLimit(const CRateLimit& limit)
{
    assert(m_bev != nullptr);

    event_type<ev_token_bucket_cfg> rate_cfg_new(ev_token_bucket_cfg_new(limit.nMaxReadRate, limit.nMaxBurstRead, limit.nMaxWriteRate, limit.nMaxBurstWrite, nullptr));
    BufferEventLocker lock(m_bev);
    bufferevent_set_rate_limit(m_bev, rate_cfg_new);
    m_rate_cfg.swap(rate_cfg_new);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x40(%rbp)
addq $0x1a8, %rdi            # imm = 0x1A8
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x1c7b0
testb $0x1, %al
jne 0x1b0f6
jmp 0x1b0f8
jmp 0x1b117
leaq 0xb8ec(%rip), %rdi      # 0x269eb
leaq 0xb872(%rip), %rsi      # 0x26978
movl $0x60, %edx
leaq 0xb8ea(%rip), %rcx      # 0x269fc
callq 0x52e0
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdi
movq 0x18(%rax), %rdx
movq 0x10(%rax), %rcx
xorl %eax, %eax
movl %eax, %r8d
callq 0x5640
movq %rax, %rsi
leaq -0x20(%rbp), %rdi
callq 0x11f50
movq -0x40(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a1a0
movq %rax, -0x48(%rbp)
jmp 0x1b156
movq -0x48(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x1c730
jmp 0x1b165
movq -0x40(%rbp), %rdi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a1a0
movq %rax, -0x50(%rbp)
jmp 0x1b17b
leaq -0x20(%rbp), %rdi
callq 0x111a0
movq %rax, -0x58(%rbp)
jmp 0x1b18a
movq -0x58(%rbp), %rsi
movq -0x50(%rbp), %rdi
callq 0x5760
jmp 0x1b199
movq -0x40(%rbp), %rdi
addq $0x1b0, %rdi            # imm = 0x1B0
leaq -0x20(%rbp), %rsi
callq 0x11ff0
jmp 0x1b1af
leaq -0x28(%rbp), %rdi
callq 0x1c760
leaq -0x20(%rbp), %rdi
callq 0x10d00
addq $0x60, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x1b1ea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x1c760
leaq -0x20(%rbp), %rdi
callq 0x10d00
movq -0x30(%rbp), %rdi
callq 0x5710
nopl (%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::event_cb(bufferevent*, short, void*)
void ConnectionBase::event_cb(bufferevent* /*unused*/, short type, void* ctx)
{
    assert(ctx);
    ConnectionBase* base = static_cast<ConnectionBase*>(ctx);
    if (((type & BEV_EVENT_TIMEOUT) != 0) ||
        ((type & BEV_EVENT_EOF) != 0) ||
        ((type & BEV_EVENT_ERROR) != 0))
        base->DisconnectInt(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1b3b0
jmp 0x1b3cf
leaq 0xb7f8(%rip), %rdi      # 0x26baf
leaq 0xb5ba(%rip), %rsi      # 0x26978
movl $0x142, %edx            # imm = 0x142
leaq 0xb8de(%rip), %rcx      # 0x26ca8
callq 0x52e0
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movswl -0xa(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x1b3fb
movswl -0xa(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x1b3fb
movswl -0xa(%rbp), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x1b406
movq -0x20(%rbp), %rdi
xorl %esi, %esi
callq 0x1a770
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::SetSocketOpts(int)
bool ConnectionBase::SetSocketOpts(evutil_socket_t sock)
{
    if (evutil_make_socket_nonblocking(sock) != 0)
        return false;

#ifdef _WIN32
    typedef char sockoptptr;
#else
    typedef void sockoptptr;
#endif
    int type;
    ev_socklen_t length = sizeof(type);
    if (getsockopt(sock, SOL_SOCKET, SO_TYPE, reinterpret_cast<sockoptptr*>(&type), &length) == 0) {
        int set = 1;
        if (type == SOCK_STREAM)
            setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast<sockoptptr*>(&set), sizeof(int));
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %edi
callq 0x5580
cmpl $0x0, %eax
je 0x1b46e
movb $0x0, -0x1(%rbp)
jmp 0x1b4c3
movl $0x4, -0x10(%rbp)
movl -0x8(%rbp), %edi
movl $0x1, %esi
movl $0x3, %edx
leaq -0xc(%rbp), %rcx
leaq -0x10(%rbp), %r8
callq 0x5340
cmpl $0x0, %eax
jne 0x1b4bf
movl $0x1, -0x14(%rbp)
cmpl $0x1, -0xc(%rbp)
jne 0x1b4bd
movl -0x8(%rbp), %edi
movl $0x6, %esi
movl $0x1, %edx
leaq -0x14(%rbp), %rcx
movl $0x4, %r8d
callq 0x5730
jmp 0x1b4bf
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::read_data(evbuffer*, evbuffer_cb_info const*, void*)
void ConnectionBase::read_data(struct evbuffer* /*unused*/, const struct evbuffer_cb_info* info, void* ctx)
{
    assert(ctx);
    if (info->n_added != 0u) {
        ConnectionBase* base = static_cast<ConnectionBase*>(ctx);
        base->m_bytes_read += info->n_added;
        base->m_handler.m_interface.OnBytesRead(base->m_id, info->n_added, base->m_bytes_read);
        DEBUG_PRINT(LOGALL, "id:", base->m_id, "Read:", info->n_added, "bytes. Total:", base->m_bytes_read);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1bf4d
jmp 0x1bf6c
leaq 0xac5b(%rip), %rdi      # 0x26baf
leaq 0xaa1d(%rip), %rsi      # 0x26978
movl $0x12c, %edx            # imm = 0x12C
leaq 0xac4c(%rip), %rcx      # 0x26bb3
callq 0x52e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x1c015
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x198(%rax), %rcx
movq %rcx, 0x198(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc0(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x190(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x198(%rax), %rcx
movq (%rdi), %rax
callq *0x80(%rax)
movq -0x20(%rbp), %rdx
addq $0x190, %rdx            # imm = 0x190
movq -0x10(%rbp), %r8
addq $0x8, %r8
movq -0x20(%rbp), %rax
addq $0x198, %rax            # imm = 0x198
leaq 0xac1e(%rip), %rdi      # 0x26c15
leaq 0x9c98(%rip), %rsi      # 0x25c96
leaq 0xac1a(%rip), %rcx      # 0x26c1f
leaq 0xac19(%rip), %r9       # 0x26c25
movq %rax, (%rsp)
callq 0x1c8b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::wrote_data(evbuffer*, evbuffer_cb_info const*, void*)
void ConnectionBase::wrote_data(struct evbuffer* /*unused*/, const struct evbuffer_cb_info* info, void* ctx)
{
    assert(ctx);
    if (info->n_deleted != 0u) {
        ConnectionBase* base = static_cast<ConnectionBase*>(ctx);
        base->m_bytes_written += info->n_deleted;
        base->m_handler.m_interface.OnBytesWritten(base->m_id, info->n_deleted, base->m_bytes_written);
        DEBUG_PRINT(LOGALL, "id:", base->m_id, "Wrote:", info->n_deleted, "bytes. Total:", base->m_bytes_written);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x1c03d
jmp 0x1c05c
leaq 0xab6b(%rip), %rdi      # 0x26baf
leaq 0xa92d(%rip), %rsi      # 0x26978
movl $0x137, %edx            # imm = 0x137
leaq 0xabdc(%rip), %rcx      # 0x26c33
callq 0x52e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1c105
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x20(%rbp), %rax
addq 0x1a0(%rax), %rcx
movq %rcx, 0x1a0(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq 0xc0(%rax), %rdi
movq -0x20(%rbp), %rax
movq 0x190(%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x20(%rbp), %rax
movq 0x1a0(%rax), %rcx
movq (%rdi), %rax
callq *0x88(%rax)
movq -0x20(%rbp), %rdx
addq $0x190, %rdx            # imm = 0x190
movq -0x10(%rbp), %r8
addq $0x10, %r8
movq -0x20(%rbp), %rax
addq $0x1a0, %rax            # imm = 0x1A0
leaq 0xabaf(%rip), %rdi      # 0x26c96
leaq 0x9ba8(%rip), %rsi      # 0x25c96
leaq 0xabac(%rip), %rcx      # 0x26ca1
leaq 0xab29(%rip), %r9       # 0x26c25
movq %rax, (%rsp)
callq 0x1c8e0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::OnOutgoingConnected(event_type<bufferevent>&&, CConnection)
void ConnectionBase::OnOutgoingConnected(event_type<bufferevent>&& bev, CConnection resolved)
{
    m_bev = std::move(bev);
    DEBUG_PRINT(LOGINFO, "id:", m_id, "outgoing connection: initial:", m_connection.GetHost(), "resolved:", resolved.GetHost());
    InitConnection();

    m_handler.OnOutgoingConnected(m_id, m_connection, std::move(resolved));
    // Don't do anything after OnOutgoingConnected. It may delete *this.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdx, -0x70(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x80(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a150
movq -0x80(%rbp), %rsi
movq %rsi, %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x78(%rbp)
addq $0x18, %rsi
leaq -0x38(%rbp), %rdi
callq 0x9d90
movq -0x70(%rbp), %rsi
leaq -0x58(%rbp), %rdi
callq 0x9d90
jmp 0x1c170
movq -0x78(%rbp), %rdx
movq %rsp, %rax
leaq -0x58(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x9b77(%rip), %rdi      # 0x25cfc
leaq 0x9b0a(%rip), %rsi      # 0x25c96
leaq 0xa976(%rip), %rcx      # 0x26b09
leaq 0xa98d(%rip), %r9       # 0x26b27
leaq -0x38(%rbp), %r8
callq 0x1c830
jmp 0x1c1a5
leaq -0x58(%rbp), %rdi
callq 0x52a0
leaq -0x38(%rbp), %rdi
callq 0x52a0
movq -0x80(%rbp), %rdi
callq 0x1b4d0
movq -0x80(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq 0x8(%rdx), %rdi
movq 0x190(%rdx), %rsi
addq $0x18, %rdx
callq 0xf750
addq $0x90, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1c208
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x52a0
leaq -0x38(%rbp), %rdi
callq 0x52a0
movq -0x60(%rbp), %rdi
callq 0x5710
nopw (%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::OnIncomingConnected(event_type<bufferevent>&&, sockaddr*, int)
void ConnectionBase::OnIncomingConnected(event_type<bufferevent>&& bev, sockaddr* addr, int addrsize)
{
    m_bev = std::move(bev);
    CConnection resolved(m_connection.GetOptions(), m_connection.GetNetConfig(), addr, addrsize);
    DEBUG_PRINT(LOGINFO, "id:", m_id, "incoming connection. bound to:", m_connection.GetHost(), "incoming:", resolved.GetHost());
    InitConnection();

    m_handler.OnIncomingConnected(m_id, m_connection, std::move(resolved));
    // Don't do anything after OnIncomingConnected. It may delete *this.
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x270(%rbp)
movq -0x10(%rbp), %rsi
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a150
movq -0x270(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x268(%rbp)
callq 0xa9c0
movq -0x268(%rbp), %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x1c(%rax), %xmm2
movups %xmm2, -0x1b4(%rbp)
movaps %xmm1, -0x1c0(%rbp)
movaps %xmm0, -0x1d0(%rbp)
callq 0xa9e0
movq %rax, %rsi
leaq -0x208(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0x6fb0
movq -0x260(%rbp), %rsi
movq -0x18(%rbp), %rdx
movl -0x1c(%rbp), %ecx
movups -0x1b4(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x1c(%rax)
movaps -0x1d0(%rbp), %xmm0
movaps -0x1c0(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x198(%rbp), %rdi
callq 0xa6b0
jmp 0x1c2ed
leaq -0x208(%rbp), %rdi
callq 0x6930
movq -0x270(%rbp), %rsi
movq %rsi, %rax
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x278(%rbp)
addq $0x18, %rsi
leaq -0x238(%rbp), %rdi
callq 0x9d90
jmp 0x1c322
leaq -0x258(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0x9d90
jmp 0x1c337
movq -0x278(%rbp), %rdx
movq %rsp, %rax
leaq -0x258(%rbp), %rcx
movq %rcx, (%rax)
leaq 0x9930(%rip), %rdi      # 0x25c82
leaq 0x993d(%rip), %rsi      # 0x25c96
leaq 0xa7d1(%rip), %rcx      # 0x26b31
leaq 0xa7e9(%rip), %r9       # 0x26b50
leaq -0x238(%rbp), %r8
callq 0x1c860
jmp 0x1c375
leaq -0x258(%rbp), %rdi
callq 0x52a0
leaq -0x238(%rbp), %rdi
callq 0x52a0
movq -0x270(%rbp), %rdi
callq 0x1b4d0
jmp 0x1c39b
movq -0x270(%rbp), %rdx
movq 0x8(%rdx), %rdi
movq 0x190(%rdx), %rsi
addq $0x18, %rdx
leaq -0x198(%rbp), %rcx
callq 0xf4c0
jmp 0x1c3bf
leaq -0x198(%rbp), %rdi
callq 0x68f0
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x208(%rbp), %rdi
callq 0x6930
jmp 0x1c452
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0x1c446
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0x1c43a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x258(%rbp), %rdi
callq 0x52a0
leaq -0x238(%rbp), %rdi
callq 0x52a0
leaq -0x198(%rbp), %rdi
callq 0x68f0
movq -0x210(%rbp), %rdi
callq 0x5710
nop
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::Write(unsigned char const*, unsigned long)
bool ConnectionBase::Write(const unsigned char* data, size_t size)
{
    bool ret = bufferevent_write(m_bev, data, size) == 0;
    if (ret)
        m_check_write_buffer_func.active();
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x28(%rbp)
addq $0x1a8, %rdi            # imm = 0x1A8
callq 0x1a1a0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x5240
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
je 0x1c4b9
movq -0x28(%rbp), %rdi
addq $0x230, %rdi            # imm = 0x230
callq 0x23ac0
movb -0x19(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: theuni[P]libbtcnet/src/connectionbase.cpp
// Function: ConnectionBase::write_cb(bufferevent*, void*)
void ConnectionBase::write_cb(bufferevent* bev, void* ctx)
{
    assert(ctx);
    ConnectionBase* base = static_cast<ConnectionBase*>(ctx);
    evbuffer* output = bufferevent_get_output(bev);
    size_t buflen = evbuffer_get_length(output);
    bufferevent_setcb(bev, base->read_cb_ptr, nullptr, event_cb, ctx);
    base->m_handler.OnWriteBufferReady(base->m_id, buflen);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x1c4e9
jmp 0x1c508
leaq 0xa6bf(%rip), %rdi      # 0x26baf
leaq 0xa481(%rip), %rsi      # 0x26978
movl $0x1a4, %edx            # imm = 0x1A4
leaq 0xa8f3(%rip), %rcx      # 0x26df6
callq 0x52e0
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
callq 0x5140
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x5440
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x2a8(%rax), %rsi
movq -0x10(%rbp), %r8
xorl %eax, %eax
movl %eax, %edx
leaq -0x11b8(%rip), %rcx     # 0x1b390
callq 0x5410
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x190(%rax), %rsi
movq -0x28(%rbp), %rdx
callq 0xea70
addq $0x30, %rsp
popq %rbp
retq
nop
// File: theuni[P]libbtcnet/src/message.cpp
// Function: (anonymous namespace)::get_message_length(unsigned char const*)
static inline uint64_t get_message_length(const unsigned char* buf)
{
    return static_cast<const uint64_t>(buf[0]) |
           static_cast<const uint64_t>(buf[1]) << 8 |
           static_cast<const uint64_t>(buf[2]) << 16 |
           static_cast<const uint64_t>(buf[3]) << 24;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movzbl (%rax), %eax
movq -0x8(%rbp), %rcx
movzbl 0x1(%rcx), %ecx
shlq $0x8, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x2(%rcx), %ecx
shlq $0x10, %rcx
orq %rcx, %rax
movq -0x8(%rbp), %rcx
movzbl 0x3(%rcx), %ecx
shlq $0x18, %rcx
orq %rcx, %rax
popq %rbp
retq
nop
// File: theuni[P]libbtcnet/src/proxyconn.cpp
// Function: CProxyConn::Connect()
void CProxyConn::Connect()
{
    assert(m_connection.IsSet());

    const CConnectionOptions& opts = m_connection.GetOptions();

    timeval connTimeout;
    connTimeout.tv_sec = opts.nConnTimeout;
    connTimeout.tv_usec = 0;

    const CConnectionBase& proxy = m_connection.GetProxy();
    assert(proxy.IsSet());

    sockaddr_storage addr_storage;
    int addrlen = sizeof(addr_storage);
    memset(&addr_storage, 0, sizeof(addr_storage));
    sockaddr* addr = reinterpret_cast<sockaddr*>(&addr_storage);
    proxy.GetSockAddr(addr, &addrlen);

    if (m_connection.CanConnectProxy())
        BareConnect(m_event_base, m_handler.GetBevOpts(), BAD_SOCKET, addr, addrlen, connTimeout);
    else
        OnConnectionFailure(ConnectionFailureType::PROXY, 0, m_connection, false);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x248(%rbp)
addq $0x18, %rdi
callq 0xa100
testb $0x1, %al
jne 0x1e959
jmp 0x1e95b
jmp 0x1e97a
leaq 0x7c28(%rip), %rdi      # 0x2658a
leaq 0x86db(%rip), %rsi      # 0x27044
movl $0x1b, %edx
leaq 0x86e1(%rip), %rcx      # 0x27056
callq 0x52e0
movq -0x248(%rbp), %rdi
addq $0x18, %rdi
callq 0xa9c0
movq -0x248(%rbp), %rdi
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movslq 0xc(%rax), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
addq $0x18, %rdi
callq 0xa9a0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0xa100
testb $0x1, %al
jne 0x1e9c5
jmp 0x1e9c7
jmp 0x1e9e6
leaq 0x86ab(%rip), %rdi      # 0x27079
leaq 0x866f(%rip), %rsi      # 0x27044
movl $0x24, %edx
leaq 0x8675(%rip), %rcx      # 0x27056
callq 0x52e0
movl $0x80, -0xac(%rbp)
leaq -0xa8(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x5220
leaq -0xa8(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x28(%rbp), %rdi
movq -0xb8(%rbp), %rsi
leaq -0xac(%rbp), %rdx
callq 0x9cb0
movq -0x248(%rbp), %rdi
addq $0x18, %rdi
callq 0xab90
testb $0x1, %al
jne 0x1ea3e
jmp 0x1ea9c
movq -0x248(%rbp), %rax
movq %rax, %rcx
addq $0x2b0, %rcx            # imm = 0x2B0
movq %rcx, -0x258(%rbp)
movq 0x10(%rax), %rcx
movq %rcx, -0x250(%rbp)
movq 0x8(%rax), %rdi
callq 0x101b0
movq -0x258(%rbp), %rdi
movq -0x250(%rbp), %rsi
movl %eax, %edx
movq -0xb8(%rbp), %r8
movl -0xac(%rbp), %r9d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
leaq -0x20(%rbp), %rax
movq %rax, (%rsp)
callq 0x19eb0
jmp 0x1eb08
movq -0x248(%rbp), %rsi
addq $0x18, %rsi
leaq -0x230(%rbp), %rdi
movq %rdi, -0x260(%rbp)
callq 0xc230
movq -0x248(%rbp), %rdi
movq -0x260(%rbp), %rcx
movl $0x4, %esi
xorl %r8d, %r8d
movl %r8d, %edx
callq 0x1b200
jmp 0x1eada
leaq -0x230(%rbp), %rdi
callq 0x68f0
jmp 0x1eb08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x238(%rbp)
movl %eax, -0x23c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x68f0
jmp 0x1eb11
addq $0x270, %rsp            # imm = 0x270
popq %rbp
retq
movq -0x238(%rbp), %rdi
callq 0x5710
nopl (%rax)
// File: theuni[P]libbtcnet/src/bareproxy.cpp
// Function: CBareProxy::receive_init(bufferevent*, void*)
void CBareProxy::receive_init(bufferevent* bev, void* ctx)
{
    CBareProxy* data = static_cast<CBareProxy*>(ctx);
    const CConnection& conn(data->m_proxy_connection);
    const CProxyAuth& auth(conn.GetProxy().GetAuth());
    char pchRet1[2];
    if (bufferevent_read(bev, pchRet1, sizeof(pchRet1)) != sizeof(pchRet1)) {
        data->ProxyFailure(0);
        return;
    }
    if (pchRet1[0] != 0x05) {
        data->ProxyFailure(0);
        return;
    }

    bool useAuth = pchRet1[1] == 0x02;
    if (useAuth) {
        bufferevent_setcb(bev, check_auth_response, nullptr, event_cb, ctx);
        if (!write_auth(bev, auth)) {
            data->ProxyFailure(0);
            return;
        }
    } else {
        bufferevent_setcb(bev, read_final, nullptr, event_cb, ctx);
        if (!writeproto(bev, conn))
            data->ProxyFailure(0);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0xa9a0
movq %rax, %rdi
callq 0x9c30
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x2a(%rbp), %rsi
movl $0x2, %edx
callq 0x57f0
cmpq $0x2, %rax
je 0x1f181
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x1f22b
movsbl -0x2a(%rbp), %eax
cmpl $0x5, %eax
je 0x1f19a
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x1f22b
movsbl -0x29(%rbp), %eax
cmpl $0x2, %eax
sete %al
andb $0x1, %al
movb %al, -0x2b(%rbp)
testb $0x1, -0x2b(%rbp)
je 0x1f1ee
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %r8
leaq 0x1042(%rip), %rsi      # 0x20200
xorl %eax, %eax
movl %eax, %edx
leaq 0x77(%rip), %rcx        # 0x1f240
callq 0x5410
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x1f9c0
testb $0x1, %al
jne 0x1f1ec
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x1f22b
jmp 0x1f22b
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %r8
leaq 0xa23(%rip), %rsi       # 0x1fc20
xorl %eax, %eax
movl %eax, %edx
leaq 0x38(%rip), %rcx        # 0x1f240
callq 0x5410
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1f2f0
testb $0x1, %al
jne 0x1f229
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x1f22b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: theuni[P]libbtcnet/src/bareproxy.cpp
// Function: CBareProxy::check_auth_response(bufferevent*, void*)
void CBareProxy::check_auth_response(bufferevent* bev, void* ctx)
{
    CBareProxy* data = static_cast<CBareProxy*>(ctx);
    const CConnection& conn(data->m_proxy_connection);
    char pchRetA[2];

    if (bufferevent_read(bev, pchRetA, sizeof(pchRetA)) != sizeof(pchRetA)) {
        data->ProxyFailure(0);
        return;
    }

    if (pchRetA[0] != 0x01 && pchRetA[1] != 0x00) {
        data->ProxyFailure(0);
        return;
    }

    bufferevent_setcb(bev, read_final, nullptr, event_cb, ctx);

    if (!writeproto(bev, conn)) {
        data->ProxyFailure(0);
        return;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x22(%rbp), %rsi
movl $0x2, %edx
callq 0x57f0
cmpq $0x2, %rax
je 0x20249
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x202a3
movsbl -0x22(%rbp), %eax
cmpl $0x1, %eax
je 0x20268
movsbl -0x21(%rbp), %eax
cmpl $0x0, %eax
je 0x20268
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
jmp 0x202a3
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %r8
leaq -0x657(%rip), %rsi      # 0x1fc20
xorl %eax, %eax
movl %eax, %edx
leaq -0x1042(%rip), %rcx     # 0x1f240
callq 0x5410
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x1f2f0
testb $0x1, %al
jne 0x202a3
movq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x1f2b0
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: theuni[P]libbtcnet/src/listener.cpp
// Function: CConnListener::Bind()
bool CConnListener::Bind()
{
    assert(!m_listener);
    assert(m_event_base != nullptr);

    sockaddr_storage addr_storage;
    memset(&addr_storage, 0, sizeof(addr_storage));
    int socklen = sizeof(addr_storage);
    sockaddr* addr = reinterpret_cast<sockaddr*>(&addr_storage);
    m_connection.GetSockAddr(addr, &socklen);

    m_listener.reset(evconnlistener_new_bind(m_event_base, accept_conn, this, LEV_OPT_CLOSE_ON_FREE | LEV_OPT_REUSEABLE, -1, addr, socklen));
    if (!m_listener) {
        m_handler.OnListenFailure(m_id, m_connection);
        return false;
    }
    return true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
addq $0x190, %rdi            # imm = 0x190
callq 0x222f0
testb $0x1, %al
jne 0x21f6c
jmp 0x21f6e
jmp 0x21f8d
leaq 0x52e2(%rip), %rdi      # 0x27257
leaq 0x52e7(%rip), %rsi      # 0x27263
movl $0x20, %edx
leaq 0x52ec(%rip), %rcx      # 0x27274
callq 0x52e0
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rdi
movq $0x0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x22310
testb $0x1, %al
jne 0x21faf
jmp 0x21fb1
jmp 0x21fd0
leaq 0x52d7(%rip), %rdi      # 0x2728f
leaq 0x52a4(%rip), %rsi      # 0x27263
movl $0x21, %edx
leaq 0x52a9(%rip), %rcx      # 0x27274
callq 0x52e0
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x5220
movq -0xb0(%rbp), %rdi
movl $0x80, -0x9c(%rbp)
leaq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
addq $0x18, %rdi
movq -0xa8(%rbp), %rsi
leaq -0x9c(%rbp), %rdx
callq 0x9cb0
movq -0xb0(%rbp), %rax
movq %rax, %rcx
addq $0x190, %rcx            # imm = 0x190
movq %rcx, -0xb8(%rbp)
movq 0x8(%rax), %rdi
callq 0x10f40
movq -0xb0(%rbp), %rdx
movq %rax, %rdi
movq -0xa8(%rbp), %r9
movl -0x9c(%rbp), %eax
leaq 0x78(%rip), %rsi        # 0x220d0
movl $0xa, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movl %eax, (%rsp)
callq 0x53c0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x22330
movq -0xb0(%rbp), %rdi
addq $0x190, %rdi            # imm = 0x190
callq 0x222f0
testb $0x1, %al
jne 0x22093
jmp 0x220b0
movq -0xb0(%rbp), %rdx
movq (%rdx), %rdi
movq 0x10(%rdx), %rsi
addq $0x18, %rdx
callq 0xf0c0
movb $0x0, -0x1(%rbp)
jmp 0x220b4
movb $0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: theuni[P]libbtcnet/src/listener.cpp
// Function: CConnListener::listen_error_cb(evconnlistener*, void*)
void CConnListener::listen_error_cb(evconnlistener* /*unused*/, void* ctx)
{
    assert(ctx != nullptr);
    CConnListener* bind = static_cast<CConnListener*>(ctx);
    bind->m_listener.free();
    bind->m_handler.OnListenFailure(bind->m_id, bind->m_connection);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x22239
jmp 0x22258
leaq 0x42ee(%rip), %rdi      # 0x2652e
leaq 0x501c(%rip), %rsi      # 0x27263
movl $0x44, %edx
leaq 0x508f(%rip), %rcx      # 0x272e2
callq 0x52e0
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
addq $0x190, %rdi            # imm = 0x190
callq 0x223c0
movq -0x18(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rdx
addq $0x18, %rdx
callq 0xf0c0
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: theuni[P]libbtcnet/src/resolveonly.cpp
// Function: CResolveOnly::OnResolveSuccess(CDNSResponse&&)
void CResolveOnly::OnResolveSuccess(CDNSResponse&& response)
{
    m_request.reset(nullptr);
    std::list<CConnection> connections;
    for (auto it = response.begin(); it != response.end(); ++it)
        connections.emplace_back(m_connection.GetOptions(), m_connection.GetNetConfig(), it->ai_addr, it->ai_addrlen);
    m_retries = m_connection.GetOptions().nRetries;
    m_handler.OnResolveComplete(m_id, m_connection, std::move(connections));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x70(%rbp)
addq $0x190, %rdi            # imm = 0x190
xorl %eax, %eax
movl %eax, %esi
callq 0x18460
leaq -0x28(%rbp), %rdi
callq 0x5d80
movq -0x10(%rbp), %rdi
callq 0x18090
movq %rax, -0x68(%rbp)
jmp 0x22973
movq -0x68(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x180c0
movq %rax, -0x78(%rbp)
jmp 0x2298a
movq -0x78(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x17fb0
movb %al, -0x79(%rbp)
jmp 0x229a4
movb -0x79(%rbp), %al
testb $0x1, %al
jne 0x229b0
jmp 0x22a60
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0xa9c0
movq %rax, -0x88(%rbp)
jmp 0x229c6
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0xa9e0
movq %rax, -0x90(%rbp)
jmp 0x229dc
leaq -0x30(%rbp), %rdi
callq 0x17f30
movq %rax, -0x98(%rbp)
jmp 0x229ee
movq -0x98(%rbp), %rax
addq $0x18, %rax
movq %rax, -0xa8(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x17f30
movq %rax, -0xa0(%rbp)
jmp 0x22a12
movq -0xa8(%rbp), %rcx
movq -0x90(%rbp), %rdx
movq -0x88(%rbp), %rsi
movq -0xa0(%rbp), %r8
addq $0x10, %r8
leaq -0x28(%rbp), %rdi
callq 0x22c40
jmp 0x22a3d
jmp 0x22a3f
leaq -0x30(%rbp), %rdi
callq 0x17e70
jmp 0x22a4a
jmp 0x2297b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x22b15
movq -0x70(%rbp), %rdi
addq $0x10, %rdi
callq 0xa9c0
movq %rax, -0xb0(%rbp)
jmp 0x22a76
movq -0x70(%rbp), %rax
movq -0xb0(%rbp), %rcx
movl 0x8(%rcx), %ecx
movl %ecx, 0x188(%rax)
movq 0x8(%rax), %rcx
movq %rcx, -0xc8(%rbp)
movq 0x198(%rax), %rcx
movq %rcx, -0xd0(%rbp)
addq $0x10, %rax
movq %rax, -0xc0(%rbp)
leaq -0x60(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
leaq -0x28(%rbp), %rsi
callq 0x11660
movq -0xd0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
movq -0xb8(%rbp), %rcx
callq 0xe830
jmp 0x22ae5
leaq -0x60(%rbp), %rdi
callq 0x64a0
leaq -0x28(%rbp), %rdi
callq 0x64a0
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x64a0
leaq -0x28(%rbp), %rdi
callq 0x64a0
movq -0x38(%rbp), %rdi
callq 0x5710
nopw (%rax,%rax)
// File: theuni[P]libbtcnet/src/event.cpp
// Function: CEvent::reset(event_type<event_base> const&, int, short, std::function<void ()>&&)
void CEvent::reset(const event_type<event_base>& base, evutil_socket_t sock, short flags, std::function<void()>&& func)
{
    assert(base);
    m_func = std::move(func);
    m_event = event_type<event>(event_new(base, sock, flags, callback, this));
    assert(m_event);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movw %cx, %ax
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movw %ax, -0x16(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
callq 0x23cc0
testb $0x1, %al
jne 0x238d5
jmp 0x238d7
jmp 0x238f6
leaq 0x1f7c(%rip), %rdi      # 0x2585a
leaq 0x3ca7(%rip), %rsi      # 0x2758c
movl $0x26, %edx
leaq 0x3ca9(%rip), %rcx      # 0x2759a
callq 0x52e0
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x23ce0
movq -0x10(%rbp), %rdi
callq 0x10f40
movq -0x30(%rbp), %r8
movq %rax, %rdi
movl -0x14(%rbp), %esi
leaq 0x103(%rip), %rcx       # 0x23a20
movswl -0x16(%rbp), %edx
callq 0x5390
movq %rax, %rsi
leaq -0x28(%rbp), %rdi
callq 0x23d30
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
leaq -0x28(%rbp), %rsi
callq 0x23d80
leaq -0x28(%rbp), %rdi
callq 0x23c30
movq -0x30(%rbp), %rdi
addq $0x20, %rdi
callq 0x23c60
testb $0x1, %al
jne 0x2395f
jmp 0x23961
jmp 0x23980
leaq 0x3c8c(%rip), %rdi      # 0x275f4
leaq 0x3c1d(%rip), %rsi      # 0x2758c
movl $0x29, %edx
leaq 0x3c1f(%rip), %rcx      # 0x2759a
callq 0x52e0
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: iZhangHui[P]CppPrimer/CH10_GenericAlgorithms/examples/ostreamIter2.cc
// Function: main
int main() {
	vector<int> vec;
	istream_iterator<int> in_iter(cin);  // read ints from cin
	istream_iterator<int> eof;           // istream ``end'' iterator
	
	while (in_iter != eof)
		vec.push_back(*in_iter++);
	ostream_iterator<int> out_iter(cout, " ");
	
	for (auto e : vec)
		out_iter = e;  // the assignment writes this element to cout
	cout << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x13e0
movq 0x3d4e(%rip), %rsi      # 0x4fe0
leaq -0x30(%rbp), %rdi
callq 0x1400
jmp 0x129d
leaq -0x50(%rbp), %rdi
callq 0x1430
jmp 0x12a8
jmp 0x12aa
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x1450
movb %al, -0x8d(%rbp)
jmp 0x12bf
movb -0x8d(%rbp), %al
testb $0x1, %al
jne 0x12cb
jmp 0x131c
leaq -0x60(%rbp), %rdi
leaq -0x30(%rbp), %rsi
xorl %edx, %edx
callq 0x14f0
jmp 0x12dc
leaq -0x60(%rbp), %rdi
callq 0x1530
movq %rax, -0x98(%rbp)
jmp 0x12ee
movq -0x98(%rbp), %rsi
leaq -0x20(%rbp), %rdi
callq 0x1480
jmp 0x1300
jmp 0x12aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x16b0
jmp 0x13d1
movq 0x3cad(%rip), %rsi      # 0x4fd0
leaq 0x1cda(%rip), %rdx      # 0x3004
leaq -0x70(%rbp), %rdi
callq 0x1550
jmp 0x1335
leaq -0x20(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x1580
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rdi
callq 0x15b0
movq %rax, -0x88(%rbp)
leaq -0x80(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x15e0
testb $0x1, %al
jne 0x1370
jmp 0x13a0
leaq -0x80(%rbp), %rdi
callq 0x1620
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
leaq -0x70(%rbp), %rdi
leaq -0x8c(%rbp), %rsi
callq 0x1640
jmp 0x1393
jmp 0x1395
leaq -0x80(%rbp), %rdi
callq 0x1690
jmp 0x135a
movq 0x3c29(%rip), %rdi      # 0x4fd0
movq 0x3c12(%rip), %rsi      # 0x4fc0
callq 0x10e0
jmp 0x13b5
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x16b0
movl -0x4(%rbp), %eax
addq $0xa0, %rsp
popq %rbp
retq
movq -0x38(%rbp), %rdi
callq 0x1120
nopw (%rax,%rax)
// File: Couragewang[P]50_clss/TcpClient.cc
// Function: main
int main(int argc, char *argv[])
{
    if(argc != 3){
        Usage(argv[0]);
        exit(1);
    }
    std::string ip = argv[1];
    int port = atoi(argv[2]);
    TcpClient *cli = new TcpClient(ip, port);
    cli->InitClient();
    cli->Start();
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpl $0x3, -0x8(%rbp)
je 0x4047f2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0x405f70
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
leaq -0x30(%rbp), %rdi
callq 0x404960
jmp 0x40479a
leaq -0x30(%rbp), %rdi
callq 0x4046e0
jmp 0x4047a5
leaq -0x30(%rbp), %rdi
callq 0x474f10
leaq -0x31(%rbp), %rdi
callq 0x405f90
movl $0x1, %edi
callq 0x4c1e20
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x4047e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x474f10
leaq -0x31(%rbp), %rdi
callq 0x405f90
jmp 0x404949
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x405f70
movq -0xc0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
leaq -0x68(%rbp), %rdi
callq 0x404960
jmp 0x40482a
leaq -0x69(%rbp), %rdi
callq 0x405f90
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x4c12a0
movl %eax, -0x70(%rbp)
movl $0x30, %edi
callq 0x405e00
movq %rax, -0xc8(%rbp)
jmp 0x404856
movb $0x1, -0x99(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4776a0
jmp 0x40486f
movq -0xc8(%rbp), %rdi
movl -0x70(%rbp), %edx
leaq -0x98(%rbp), %rsi
callq 0x404a10
jmp 0x404887
movb $0x0, -0x99(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x474f10
movq -0xc8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rdi
callq 0x404a50
jmp 0x4048b0
movq -0x78(%rbp), %rdi
callq 0x404ac0
jmp 0x4048bb
movl $0x0, -0x4(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x474f10
movl -0x4(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x69(%rbp), %rdi
callq 0x405f90
jmp 0x404949
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x404940
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x404922
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x474f10
testb $0x1, -0x99(%rbp)
jne 0x40492d
jmp 0x40493e
movq -0xc8(%rbp), %rdi
movl $0x30, %esi
callq 0x404f60
jmp 0x404940
leaq -0x68(%rbp), %rdi
callq 0x474f10
movq -0x40(%rbp), %rdi
callq 0x4a6550
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: Couragewang[P]50_clss/./TcpClient.hpp
// Function: TcpClient::InitClient()
void InitClient()
        {
            sock = socket(AF_INET, SOCK_STREAM, 0);
            if(sock < 0){
                std::cerr << "socket error" << std::endl;
                exit(2);
            }
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl $0x2, %edi
movl $0x1, %esi
xorl %edx, %edx
callq 0x52eda0
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
cmpl $0x0, (%rax)
jge 0x404aae
movq $0x5e5320, %rdi         # imm = 0x5E5320
leaq 0x172593(%rip), %rsi    # 0x577023
callq 0x46eb40
movq %rax, %rdi
movq $0x46e420, %rsi         # imm = 0x46E420
callq 0x46d630
movl $0x2, %edi
callq 0x4c1e20
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop