// File: theuni[P]libbtcnet/src/resolveonly.cpp
// Function: CResolveOnly::Resolve()
void CResolveOnly::Resolve()
{
    assert(!m_request);
    assert(m_connection.IsDNS());

    const CConnectionOptions& opts = m_connection.GetOptions();
    evutil_addrinfo hint;
    memset(&hint, 0, sizeof(hint));
    hint.ai_socktype = SOCK_STREAM;
    hint.ai_protocol = IPPROTO_TCP;
    hint.ai_flags = EVUTIL_AI_NUMERICSERV;
    hint.ai_flags |= opts.doResolve == CConnectionOptions::NO_RESOLVE ? EVUTIL_AI_NUMERICHOST : EVUTIL_AI_ADDRCONFIG;

    if (m_connection.CanResolve() && SetResolveFamily(opts.nFamily, &hint))
        m_request = CDNSResolve::Resolve(m_handler.GetDNSBase(), m_connection.GetHost().c_str(), std::to_string(m_connection.GetPort()).c_str(), &hint);
    else
        OnResolveFailure(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
addq $0x190, %rdi            # imm = 0x190
callq 0x19d10
testb $0x1, %al
jne 0x2264c
jmp 0x2264e
jmp 0x2266d
leaq 0x3f9b(%rip), %rdi      # 0x265f0
leaq 0x4d88(%rip), %rsi      # 0x273e4
movl $0x16, %edx
leaq 0x4d90(%rip), %rcx      # 0x273f8
callq 0x52e0
movq -0xa0(%rbp), %rdi
addq $0x10, %rdi
callq 0x9c70
testb $0x1, %al
jne 0x22683
jmp 0x22685
jmp 0x226a4
leaq 0x4d89(%rip), %rdi      # 0x27415
leaq 0x4d51(%rip), %rsi      # 0x273e4
movl $0x17, %edx
leaq 0x4d59(%rip), %rcx      # 0x273f8
callq 0x52e0
movq -0xa0(%rbp), %rdi
addq $0x10, %rdi
callq 0xa9c0
movq %rax, -0x10(%rbp)
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x5220
movq -0xa0(%rbp), %rdi
movl $0x1, -0x38(%rbp)
movl $0x6, -0x34(%rbp)
movl $0x400, -0x40(%rbp)     # imm = 0x400
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edx
movl $0x20, %eax
movl $0x4, %ecx
cmpl $0x1, %edx
cmovel %ecx, %eax
orl -0x40(%rbp), %eax
movl %eax, -0x40(%rbp)
addq $0x10, %rdi
callq 0xacc0
testb $0x1, %al
jne 0x22713
jmp 0x2284f
movq -0x10(%rbp), %rax
movl 0x28(%rax), %edi
leaq -0x40(%rbp), %rsi
callq 0x181b0
testb $0x1, %al
jne 0x2272c
jmp 0x2284f
movq -0xa0(%rbp), %rax
movq 0x198(%rax), %rdi
callq 0xe810
movq -0xa0(%rbp), %rsi
movq %rax, -0xc8(%rbp)
addq $0x10, %rsi
movq %rsi, -0xb8(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x9d90
movq -0xc0(%rbp), %rdi
callq 0x5190
movq -0xb8(%rbp), %rdi
movq %rax, -0xb0(%rbp)
callq 0x9fb0
movw %ax, -0xa2(%rbp)
jmp 0x22790
movw -0xa2(%rbp), %ax
movzwl %ax, %esi
leaq -0x88(%rbp), %rdi
callq 0xb160
jmp 0x227a8
leaq -0x88(%rbp), %rdi
callq 0x5190
movq -0xa0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
movq -0xb0(%rbp), %rcx
movq %rax, %r8
leaq -0x48(%rbp), %rdi
leaq -0x40(%rbp), %r9
callq 0x18220
jmp 0x227db
movq -0xa0(%rbp), %rdi
addq $0x190, %rdi            # imm = 0x190
leaq -0x48(%rbp), %rsi
callq 0x19d30
leaq -0x48(%rbp), %rdi
callq 0x17270
leaq -0x88(%rbp), %rdi
callq 0x52a0
leaq -0x68(%rbp), %rdi
callq 0x52a0
jmp 0x2285d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
jmp 0x22844
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x52a0
leaq -0x68(%rbp), %rdi
callq 0x52a0
jmp 0x22866
movq -0xa0(%rbp), %rdi
xorl %esi, %esi
callq 0x22880
addq $0xd0, %rsp
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0x5710
nopw %cs:(%rax,%rax)