// File: theuni[P]libbtcnet/src/dnsconn.cpp
// Function: CDNSConnection::OnConnectFailure(short, int)
void CDNSConnection::OnConnectFailure(short event, int /*error*/)
{
    assert(!m_request);
    assert(m_iter != m_resolved.end());
    assert(!m_resolved.empty());

    CConnection resolved(m_connection.GetOptions(), m_connection.GetNetConfig(), m_iter->ai_addr, m_iter->ai_addrlen);
    if (++m_iter == m_resolved.end())
        m_resolved.clear();
    OnConnectionFailure(ConnectionFailureType::CONNECT, event, std::move(resolved), m_iter != m_resolved.end() || m_retries != 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x420, %rsp            # imm = 0x420
movw %si, %ax
movq %rdi, -0x8(%rbp)
movw %ax, -0xa(%rbp)
movl %edx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x398(%rbp)
addq $0x2e0, %rdi            # imm = 0x2E0
callq 0x19d10
testb $0x1, %al
jne 0x19926
jmp 0x19928
jmp 0x19947
leaq 0xccc1(%rip), %rdi      # 0x265f0
leaq 0xccc5(%rip), %rsi      # 0x265fb
movl $0x60, %edx
leaq 0xce17(%rip), %rcx      # 0x26759
callq 0x52e0
movq -0x398(%rbp), %rdi
movq %rdi, %rax
addq $0x2d8, %rax            # imm = 0x2D8
movq %rax, -0x3a0(%rbp)
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x180c0
movq -0x3a0(%rbp), %rdi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x17fb0
testb $0x1, %al
jne 0x19984
jmp 0x19986
jmp 0x199a5
leaq 0xcdb1(%rip), %rdi      # 0x2673e
leaq 0xcc67(%rip), %rsi      # 0x265fb
movl $0x61, %edx
leaq 0xcdb9(%rip), %rcx      # 0x26759
callq 0x52e0
movq -0x398(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x180f0
xorb $-0x1, %al
testb $0x1, %al
jne 0x199c0
jmp 0x199c2
jmp 0x199e1
leaq 0xcd61(%rip), %rdi      # 0x2672a
leaq 0xcc2b(%rip), %rsi      # 0x265fb
movl $0x62, %edx
leaq 0xcd7d(%rip), %rcx      # 0x26759
callq 0x52e0
movq -0x398(%rbp), %rdi
addq $0x18, %rdi
movq %rdi, -0x3b0(%rbp)
callq 0xa9c0
movq -0x3b0(%rbp), %rdi
movups (%rax), %xmm0
movups 0x10(%rax), %xmm1
movups 0x1c(%rax), %xmm2
movups %xmm2, -0x1a4(%rbp)
movaps %xmm1, -0x1b0(%rbp)
movaps %xmm0, -0x1c0(%rbp)
callq 0xa9e0
movq %rax, %rsi
leaq -0x1f8(%rbp), %rdi
callq 0x6fb0
movq -0x398(%rbp), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0x17f30
movq %rax, -0x3a8(%rbp)
jmp 0x19a4f
movq -0x398(%rbp), %rdi
movq -0x3a8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x3c0(%rbp)
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0x17f30
movq %rax, -0x3b8(%rbp)
jmp 0x19a7d
movq -0x3c0(%rbp), %rdx
movq -0x3b8(%rbp), %rax
movl 0x10(%rax), %ecx
movups -0x1a4(%rbp), %xmm0
movq %rsp, %rax
movups %xmm0, 0x1c(%rax)
movaps -0x1c0(%rbp), %xmm0
movaps -0x1b0(%rbp), %xmm1
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x190(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0xa6b0
jmp 0x19ac6
leaq -0x1f8(%rbp), %rdi
callq 0x6930
movq -0x398(%rbp), %rdi
addq $0x2d8, %rdi            # imm = 0x2D8
callq 0x17e70
movq %rax, -0x3c8(%rbp)
jmp 0x19aee
movq -0x398(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x180c0
movq %rax, -0x3d0(%rbp)
jmp 0x19b0a
movq -0x3c8(%rbp), %rdi
movq -0x3d0(%rbp), %rax
movq %rax, -0x210(%rbp)
leaq -0x210(%rbp), %rsi
callq 0x17f80
movb %al, -0x3d1(%rbp)
jmp 0x19b33
movb -0x3d1(%rbp), %al
testb $0x1, %al
jne 0x19b3f
jmp 0x19b90
movq -0x398(%rbp), %rdi
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x18050
jmp 0x19b54
jmp 0x19b90
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x200(%rbp)
movl %eax, -0x204(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x6930
jmp 0x19ca7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x200(%rbp)
movl %eax, -0x204(%rbp)
jmp 0x19c9b
movswl -0xa(%rbp), %eax
movl %eax, -0x3ec(%rbp)
leaq -0x388(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x11a70
movq -0x398(%rbp), %rdi
movq %rdi, %rax
addq $0x2d8, %rax            # imm = 0x2D8
movq %rax, -0x3e8(%rbp)
addq $0x2d0, %rdi            # imm = 0x2D0
callq 0x180c0
movq %rax, -0x3e0(%rbp)
jmp 0x19bd9
movq -0x3e8(%rbp), %rdi
movq -0x3e0(%rbp), %rax
movq %rax, -0x390(%rbp)
leaq -0x390(%rbp), %rsi
callq 0x17fb0
movb %al, -0x3ed(%rbp)
jmp 0x19c02
movb -0x3ed(%rbp), %cl
movb $0x1, %al
testb $0x1, %cl
movb %al, -0x3ee(%rbp)
jne 0x19c2e
jmp 0x19c17
movq -0x398(%rbp), %rax
cmpl $0x0, 0x2c8(%rax)
setne %al
movb %al, -0x3ee(%rbp)
movl -0x3ec(%rbp), %edx
movq -0x398(%rbp), %rdi
movb -0x3ee(%rbp), %al
movzbl %al, %r8d
andl $0x1, %r8d
movl $0x1, %esi
leaq -0x388(%rbp), %rcx
callq 0x1b200
jmp 0x19c5c
leaq -0x388(%rbp), %rdi
callq 0x68f0
leaq -0x190(%rbp), %rdi
callq 0x68f0
addq $0x420, %rsp            # imm = 0x420
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x200(%rbp)
movl %eax, -0x204(%rbp)
leaq -0x388(%rbp), %rdi
callq 0x68f0
leaq -0x190(%rbp), %rdi
callq 0x68f0
movq -0x200(%rbp), %rdi
callq 0x5710
nopw %cs:(%rax,%rax)