// File: theuni[P]libbtcnet/src/handler.cpp
// Function: CConnectionHandlerInt::Bind(CConnection)
bool CConnectionHandlerInt::Bind(CConnection conn)
{
    assert(IsEventThread());
    ConnID id = GetNextConnectionIndex();
    std::unique_ptr<CConnListener> listener(new CConnListener(*this, m_event_base, id, std::move(conn)));
    bool ret = listener->Bind();
    if (ret) {
        optional_lock(m_bind_mutex, m_enable_threading);
        auto it = m_binds.emplace_hint(m_binds.end(), id, std::move(listener));
        it->second->Enable();
    }
    return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
movq %rsi, -0x1e0(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0xe790
testb $0x1, %al
jne 0xfbc0
jmp 0xfbc2
jmp 0xfbe1
leaq 0x15cd4(%rip), %rdi     # 0x2589d
leaq 0x15bbf(%rip), %rsi     # 0x2578f
movl $0x15c, %edx            # imm = 0x15C
leaq 0x161da(%rip), %rcx     # 0x25db6
callq 0x52e0
movq -0x1d8(%rbp), %rdi
callq 0xee20
movq %rax, -0x18(%rbp)
movl $0x198, %edi            # imm = 0x198
callq 0x5400
movq -0x1e0(%rbp), %rsi
movq %rax, %rcx
movq -0x1d8(%rbp), %rax
movq %rcx, -0x200(%rbp)
movq %rcx, -0x208(%rbp)
movb $0x1, -0x1a5(%rbp)
addq $0x190, %rax            # imm = 0x190
movq %rax, -0x1f8(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq -0x198(%rbp), %rdi
movq %rdi, -0x1e8(%rbp)
callq 0x11a70
movq -0x200(%rbp), %rdi
movq -0x1d8(%rbp), %rsi
movq -0x1f8(%rbp), %rdx
movq -0x1f0(%rbp), %rcx
movq -0x1e8(%rbp), %r8
callq 0x21e10
jmp 0xfc76
movq -0x208(%rbp), %rsi
movb $0x0, -0x1a5(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0x218(%rbp)
callq 0x11af0
leaq -0x198(%rbp), %rdi
callq 0x68f0
movq -0x218(%rbp), %rdi
callq 0x11b20
movq %rax, %rdi
callq 0x21f40
movb %al, -0x209(%rbp)
jmp 0xfcbc
movb -0x209(%rbp), %al
andb $0x1, %al
movb %al, -0x1a6(%rbp)
testb $0x1, -0x1a6(%rbp)
je 0xfdfe
movq -0x1d8(%rbp), %rax
movq %rax, %rsi
addq $0x118, %rsi            # imm = 0x118
movzbl 0xec(%rax), %edx
andl $0x1, %edx
leaq -0x1b8(%rbp), %rdi
callq 0x11290
jmp 0xfd00
movq -0x1d8(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x228(%rbp)
callq 0x11b90
movq %rax, -0x1d0(%rbp)
leaq -0x1c8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x11bc0
movq -0x228(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
leaq -0x18(%rbp), %rdx
leaq -0x20(%rbp), %rcx
callq 0x11b40
movq %rax, -0x220(%rbp)
jmp 0xfd55
movq -0x220(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq -0x1c0(%rbp), %rdi
callq 0x11be0
movq %rax, %rdi
addq $0x8, %rdi
callq 0x11b20
movq %rax, %rdi
callq 0x22140
jmp 0xfd85
leaq -0x1b8(%rbp), %rdi
callq 0x11310
jmp 0xfdfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x68f0
testb $0x1, -0x1a5(%rbp)
jne 0xfdbc
jmp 0xfdc8
movq -0x208(%rbp), %rdi
callq 0x53e0
jmp 0xfe2d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
jmp 0xfe24
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x1a0(%rbp)
movl %eax, -0x1a4(%rbp)
leaq -0x1b8(%rbp), %rdi
callq 0x11310
jmp 0xfe24
movb -0x1a6(%rbp), %al
movb %al, -0x229(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x11c00
movb -0x229(%rbp), %al
andb $0x1, %al
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
leaq -0x20(%rbp), %rdi
callq 0x11c00
movq -0x1a0(%rbp), %rdi
callq 0x5710
nopl (%rax)