// File: /workspace/github_cpp_makefile_star2_O2/flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::try_next_endpoint()
void NetInput::try_next_endpoint() {
    if (next_endpoint == tcp::resolver::iterator()) {
        // No more addresses to try
        connection_failed();
        return;
    }

    tcp::endpoint endpoint = *next_endpoint++;

    auto self(shared_from_this());
    socket.async_connect(endpoint, [this, self, endpoint](const boost::system::error_code &ec) {
        if (!ec) {
            connection_established(endpoint);
        } else if (ec == boost::asio::error::operation_aborted) {
            return;
        } else {
            std::cerr << what() << ": connection to " << endpoint << " failed: " << ec.message() << std::endl;
            socket.close();
            try_next_endpoint();
        }
    });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2a8, %rsp            # imm = 0x2A8
movq %rdi, %r14
leaq 0x3d0(%rdi), %rbx
xorps %xmm0, %xmm0
leaq 0xc0(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %rbx, %rdi
callq 0x21024
movl %eax, %ebp
leaq 0xc8(%rsp), %rdi
callq 0x14e02
testb %bpl, %bpl
je 0x1cd27
movq %r14, %rdi
callq 0x124bc
jmp 0x1d02a
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x1efd4
movq (%r15), %rax
movq (%rax), %rax
imulq $0x60, 0x10(%r15), %rcx
movups (%rax,%rcx), %xmm0
movups 0xc(%rax,%rcx), %xmm1
movaps %xmm0, 0x20(%rsp)
movups %xmm1, 0x2c(%rsp)
leaq 0xc8(%rsp), %rbx
movq %rbx, %rdi
callq 0x14e02
leaq 0x8(%r14), %rsi
leaq 0x80(%rsp), %r12
movq %r12, %rdi
callq 0x1824e
leaq 0x48(%rsp), %r15
movq %r14, -0x8(%r15)
movq %r15, %rdi
movq %r12, %rsi
callq 0x14dce
movups 0x2c(%rsp), %xmm0
movups %xmm0, 0x1c(%r15)
andl $0x0, 0x8(%rsp)
movaps 0x20(%rsp), %xmm0
movups %xmm0, 0x10(%r15)
movb $0x0, 0xc(%rsp)
leaq 0x4d3d9(%rip), %rax     # 0x6a190
movq %rax, 0x10(%rsp)
leaq 0x318(%r14), %r12
cmpl $-0x1, 0x318(%r14)
jne 0x1cf27
xorl %eax, %eax
cmpw $0x2, 0x20(%rsp)
setne %al
leal 0x2(,%rax,8), %eax
leaq 0xc0(%rsp), %rdx
movl %eax, (%rdx)
movq 0x310(%r14), %rdi
leaq 0x8(%rsp), %rcx
movq %r12, %rsi
callq 0x1fdaa
testb $0x1, 0xc(%rsp)
je 0x1cf27
addq $0x330, %r14            # imm = 0x330
movaps 0x40(%rsp), %xmm0
leaq 0x270(%rsp), %rbx
movaps %xmm0, -0x10(%rbx)
movq 0x50(%rsp), %rax
movq %rax, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%rsp)
movups 0x10(%r15), %xmm0
movups 0x1c(%r15), %xmm1
movups %xmm0, 0x8(%rbx)
movups %xmm1, 0x14(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, 0x28(%rbx)
leaq 0x1b8(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x20162
leaq 0x170(%rsp), %rdi
movq %r15, %rsi
callq 0x20162
movq 0x10(%r15), %rax
movq 0x28(%r15), %rcx
movq 0x20(%rcx), %r14
movq %r15, %rdi
callq *0x18(%rax)
leaq 0x27a58(%rip), %rdx     # 0x448e3
leaq 0x140(%rsp), %rdi
movq %rax, %rsi
callq *%r14
leaq 0x26c04(%rip), %rsi     # 0x43aa4
leaq 0x27a3d(%rip), %rcx     # 0x448e4
leaq 0x90(%rsp), %rdi
leaq 0x140(%rsp), %rdx
leaq 0x6(%rsp), %r8
callq 0x20124
leaq 0x1e8(%rsp), %rdi
leaq 0x260(%rsp), %rsi
callq 0x1e0a4
leaq 0x230(%rsp), %rdi
leaq 0x26c21(%rip), %rdx     # 0x43b06
leaq 0x170(%rsp), %rsi
xorl %ecx, %ecx
callq 0x1480e
movq 0xb0(%rsp), %rcx
movq 0x18(%rcx), %rax
testq %rax, %rax
je 0x1d03c
leaq 0x1032(%rip), %rsi      # 0x1df42
leaq 0x90(%rsp), %rdi
leaq 0x1e8(%rsp), %rdx
callq *%rax
jmp 0x1d0eb
movq 0x310(%r14), %r13
leaq 0x40(%rsp), %rsi
movq %rsi, 0xc0(%rsp)
movl $0xa8, %edi
xorl %eax, %eax
callq 0x13dbd
movq %rax, %rbp
movq %rax, 0xc8(%rsp)
movl 0x318(%r14), %eax
andq $0x0, (%rbp)
leaq 0x1455(%rip), %rcx      # 0x1e3ba
movq %rcx, 0x8(%rbp)
andl $0x0, 0x10(%rbp)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x18(%rbp)
andq $0x0, 0x28(%rbp)
leaq 0x340c(%rip), %rcx      # 0x2038e
movq %rcx, 0x30(%rbp)
movl %eax, 0x38(%rbp)
movaps 0x40(%rsp), %xmm0
movups %xmm0, 0x40(%rbp)
movq 0x50(%rsp), %rax
andq $0x0, 0x50(%rsp)
movq %rax, 0x50(%rbp)
andq $0x0, 0x48(%rsp)
addq $0x330, %r14            # imm = 0x330
movups 0x10(%r15), %xmm0
movups 0x1c(%r15), %xmm1
movups %xmm1, 0x64(%rbp)
movups %xmm0, 0x58(%rbp)
movq %rbp, %rdi
addq $0x78, %rdi
movq %r14, %rsi
callq 0x14776
addq $0x28, %r13
movq %rbp, 0xd0(%rsp)
leaq 0x20(%rsp), %r8
cmpw $0x2, (%r8)
pushq $0x10
popq %rax
pushq $0x1c
popq %r9
cmoveq %rax, %r9
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x2029c
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
leaq 0xc0(%rsp), %rdi
callq 0x1e3aa
leaq 0x50(%rsp), %rdi
callq 0x14e02
leaq 0x88(%rsp), %rdi
callq 0x14e02
addq $0x2a8, %rsp            # imm = 0x2A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rcx), %r13
leaq 0xc0(%rsp), %rdi
leaq 0x1e8(%rsp), %rsi
callq 0x1df18
leaq 0x7(%rsp), %rax
movq %rax, 0x1a0(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x1d076
movq 0x8(%rax), %rdi
jmp 0x1d078
xorl %edi, %edi
movl $0x88, %esi
callq 0x146b8
movq %rax, %r14
leaq 0x1a0(%rsp), %r15
andq $0x0, 0x10(%r15)
movq %rax, %rdi
addq $0x8, %rdi
leaq 0xc0(%rsp), %rsi
callq 0x1df18
leaq 0x122d(%rip), %rax      # 0x1e2da
movq %rax, (%r14)
leaq 0x18(%rsp), %r12
movq %r14, (%r12)
andq $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x1e35e
leaq 0x90(%rsp), %rdi
movq %r12, %rsi
callq *%r13
leaq 0x18(%rsp), %rdi
callq 0x146a0
leaq 0xc0(%rsp), %rdi
callq 0x1defe
leaq 0x1e8(%rsp), %rdi
callq 0x1defe
leaq 0x90(%rsp), %rdi
callq 0x1468e
leaq 0x140(%rsp), %rdi
callq 0x1468e
leaq 0x170(%rsp), %rdi
callq 0x1468e
leaq 0x1b8(%rsp), %rdi
callq 0x1468e
movq %rbx, %rdi
callq 0x14e02
jmp 0x1d013
movq %rax, %r14
leaq 0x18(%rsp), %rdi
callq 0x146a0
jmp 0x1d14b
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0x1defe
jmp 0x1d15d
movq %rax, %r14
leaq 0x1e8(%rsp), %rdi
callq 0x1defe
jmp 0x1d17c
movq %rax, %r14
leaq 0x1f8(%rsp), %rdi
callq 0x14e02
leaq 0x90(%rsp), %rdi
callq 0x1468e
jmp 0x1d18e
movq %rax, %r14
leaq 0x140(%rsp), %rdi
callq 0x1468e
jmp 0x1d1a0
movq %rax, %r14
leaq 0x170(%rsp), %rdi
callq 0x1468e
leaq 0x1b8(%rsp), %rdi
callq 0x1468e
movq %rbx, %rdi
callq 0x14e02
jmp 0x1d1d9
movq %rax, %r14
leaq 0xc0(%rsp), %rdi
callq 0x1e3aa
jmp 0x1d1d9
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0x14e02
leaq 0x88(%rsp), %rdi
callq 0x14e02
movq %r14, %rdi
callq 0xfba0