// File: /workspace/github_cpp_makefile_star2_O1/flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::try_to_connect()
void NetInput::try_to_connect(void) {
    auto self(shared_from_this());

    tcp::resolver::query query(host, port_or_service);
    resolver.async_resolve(query, [this, self](const boost::system::error_code &ec, tcp::resolver::iterator it) {
        if (!ec) {
            next_endpoint = it;
            try_next_endpoint();
        } else if (ec == boost::asio::error::operation_aborted) {
            return;
        } else {
            std::cerr << what() << ": could not resolve address: " << ec.message() << std::endl;
            connection_failed();
            return;
        }
    });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %r14
leaq 0x8(%rdi), %rsi
leaq 0x30(%rsp), %rdi
callq 0x19994
leaq 0x288(%r14), %rsi
leaq 0x2a8(%r14), %rdx
leaq 0x48(%rsp), %rdi
movl $0x20, %ecx
callq 0x22c3c
movq %r14, (%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1f7c5
movq 0x537c9(%rip), %rcx     # 0x72f80
cmpb $0x0, (%rcx)
je 0x1f7c1
incl 0x8(%rax)
jmp 0x1f7c5
lock
incl 0x8(%rax)
movq 0x2c8(%r14), %r15
movq %rsp, %rax
movq %rax, 0x18(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x1f7e8
movq 0x8(%rax), %rdi
jmp 0x1f7ea
xorl %edi, %edi
movl $0x100, %esi            # imm = 0x100
callq 0x148a2
movq %rax, %r12
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x2d0(%r14), %rax
movq 0x2d8(%r14), %rbx
testq %rbx, %rbx
je 0x1f82d
movq 0x53761(%rip), %rcx     # 0x72f80
cmpb $0x0, (%rcx)
je 0x1f829
incl 0xc(%rbx)
jmp 0x1f82d
lock
incl 0xc(%rbx)
xorl %ecx, %ecx
movq 0x28(%r15), %rdx
movq %rdx, 0x40(%rsp)
movq $0x0, (%r12)
leaq 0x12c3(%rip), %rdx      # 0x20b0a
movq %rdx, 0x8(%r12)
movl %ecx, 0x10(%r12)
movl %ecx, 0x18(%r12)
movb $0x0, 0x1c(%r12)
leaq 0x509ad(%rip), %rcx     # 0x70210
movq %rcx, 0x20(%r12)
movq %rax, 0x28(%r12)
movq %rbx, 0x30(%r12)
testq %rbx, %rbx
je 0x1f88c
movq 0x53702(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x1f888
incl 0xc(%rbx)
jmp 0x1f88c
lock
incl 0xc(%rbx)
movups 0x48(%rsp), %xmm0
movups 0x58(%rsp), %xmm1
movups 0x68(%rsp), %xmm2
movups %xmm2, 0x58(%r12)
movups %xmm1, 0x48(%r12)
movups %xmm0, 0x38(%r12)
leaq 0x68(%r12), %r13
leaq 0x78(%r12), %rbp
movq %rbp, 0x68(%r12)
movq 0x78(%rsp), %rsi
movq 0x80(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x17760
leaq 0x88(%r12), %rdi
leaq 0x98(%r12), %rax
movq %rax, 0x88(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
callq 0x17760
addq $0x2e0, %r14            # imm = 0x2E0
addq $0x28, %r15
movq 0x40(%rsp), %rax
movq %rax, 0xa8(%r12)
movq (%rsp), %rax
movq %rax, 0xb0(%r12)
movq 0x8(%rsp), %rax
movq %rax, 0xb8(%r12)
xorl %r13d, %r13d
movq %r13, 0xc0(%r12)
movq 0x10(%rsp), %rax
movq %r13, 0x10(%rsp)
movq %rax, 0xc0(%r12)
movq %r13, 0x8(%rsp)
movq %r12, %rdi
addq $0xc8, %rdi
movq %r14, %rsi
callq 0x15310
movq %r13, 0xf8(%r12)
movq %r12, 0x28(%rsp)
testq %rbx, %rbx
je 0x1f9aa
movq 0x535fe(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x1f992
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
jmp 0x1f99c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rbx)
cmpl $0x1, %eax
jne 0x1f9aa
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x23024
leaq 0x20(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x18(%rsp), %rdi
callq 0x210f8
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1f9db
callq 0x1581a
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1f9fc
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xf650
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1fa1d
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xf650
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1fa2c
callq 0x1581a
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1fae9
movq %rax, %r14
jmp 0x1faa5
movq %rax, %r14
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0x1fa65
movq (%rbp), %rsi
incq %rsi
callq 0xf650
jmp 0x1fa65
movq %rax, %r14
addq $0x28, %r12
movq %r12, %rdi
callq 0x22fee
testq %rbx, %rbx
je 0x1faa5
movq 0x53503(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
jne 0x1fa8e
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rbx)
jmp 0x1fa97
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
cmpl $0x1, %eax
jne 0x1faa5
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
leaq 0x18(%rsp), %rdi
callq 0x210f8
jmp 0x1fab4
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1fac3
callq 0x1581a
leaq 0x48(%rsp), %rdi
callq 0x22cda
jmp 0x1fad2
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1fae1
callq 0x1581a
movq %r14, %rdi
callq 0xfb40
movq %rax, %rdi
callq 0x10886
nop