// File: /workspace/github_cpp_makefile_star2_O3/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 0x185ac
leaq 0x288(%r14), %rsi
leaq 0x2a8(%r14), %rdx
leaq 0x48(%rsp), %rdi
movl $0x20, %ecx
callq 0x2142c
movq %r14, (%rsp)
movq 0x30(%rsp), %rcx
movq 0x38(%rsp), %rax
movq %rcx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
testq %rax, %rax
je 0x1e0f7
movq 0x52e97(%rip), %rcx     # 0x70f80
cmpb $0x0, (%rcx)
je 0x1e0f3
incl 0x8(%rax)
jmp 0x1e0f7
lock
incl 0x8(%rax)
movq 0x2c8(%r14), %r15
movq %rsp, %rax
movq %rax, 0x18(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x1e11a
movq 0x8(%rax), %rdi
jmp 0x1e11c
xorl %edi, %edi
movl $0x100, %esi            # imm = 0x100
callq 0x136c4
movq %rax, %r12
movq %rax, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
movq 0x2d0(%r14), %rax
movq 0x2d8(%r14), %rbx
testq %rbx, %rbx
je 0x1e15f
movq 0x52e2f(%rip), %rcx     # 0x70f80
cmpb $0x0, (%rcx)
je 0x1e15b
incl 0xc(%rbx)
jmp 0x1e15f
lock
incl 0xc(%rbx)
xorl %ecx, %ecx
movq 0x28(%r15), %rdx
movq %rdx, 0x40(%rsp)
movq $0x0, (%r12)
leaq 0x1281(%rip), %rdx      # 0x1f3fa
movq %rdx, 0x8(%r12)
movl %ecx, 0x10(%r12)
movl %ecx, 0x18(%r12)
movb $0x0, 0x1c(%r12)
leaq 0x5019b(%rip), %rcx     # 0x6e330
movq %rcx, 0x20(%r12)
movq %rax, 0x28(%r12)
movq %rbx, 0x30(%r12)
testq %rbx, %rbx
je 0x1e1be
movq 0x52dd0(%rip), %rax     # 0x70f80
cmpb $0x0, (%rax)
je 0x1e1ba
incl 0xc(%rbx)
jmp 0x1e1be
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 0x1640a
leaq 0x88(%r12), %rdi
leaq 0x98(%r12), %rax
movq %rax, 0x88(%r12)
movq 0x98(%rsp), %rsi
movq 0xa0(%rsp), %rdx
addq %rsi, %rdx
callq 0x1640a
addq $0x2e0, %r14            # imm = 0x2E0
addq $0x28, %r15
movq 0x40(%rsp), %rax
movq %rax, 0xa8(%r12)
movaps (%rsp), %xmm0
movups %xmm0, 0xb0(%r12)
movq 0x10(%rsp), %rax
xorl %r13d, %r13d
movq %r13, 0x10(%rsp)
movq %rax, 0xc0(%r12)
movq %r13, 0x8(%rsp)
movq %r12, %rdi
addq $0xc8, %rdi
movq %r14, %rsi
callq 0x140a4
movq %r13, 0xf8(%r12)
movq %r12, 0x28(%rsp)
testq %rbx, %rbx
je 0x1e2c8
movq 0x52ce0(%rip), %rax     # 0x70f80
cmpb $0x0, (%rax)
je 0x1e2b0
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
jmp 0x1e2ba
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rbx)
cmpl $0x1, %eax
jne 0x1e2c8
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq 0x28(%rsp), %rsi
movq %r15, %rdi
callq 0x217fe
leaq 0x20(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x18(%rsp), %rdi
callq 0x1f9ee
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1e2f9
callq 0x14590
leaq 0xa8(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e31a
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0xe650
leaq 0x88(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x1e33b
movq 0x88(%rsp), %rsi
incq %rsi
callq 0xe650
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1e34a
callq 0x14590
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1e407
movq %rax, %r14
jmp 0x1e3c3
movq %rax, %r14
movq (%r13), %rdi
cmpq %rbp, %rdi
je 0x1e383
movq (%rbp), %rsi
incq %rsi
callq 0xe650
jmp 0x1e383
movq %rax, %r14
addq $0x28, %r12
movq %r12, %rdi
callq 0x217c8
testq %rbx, %rbx
je 0x1e3c3
movq 0x52be5(%rip), %rax     # 0x70f80
cmpb $0x0, (%rax)
jne 0x1e3ac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rbx)
jmp 0x1e3b5
movl 0xc(%rbx), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rbx)
cmpl $0x1, %eax
jne 0x1e3c3
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
leaq 0x18(%rsp), %rdi
callq 0x1f9ee
jmp 0x1e3d2
movq %rax, %r14
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1e3e1
callq 0x14590
leaq 0x48(%rsp), %rdi
callq 0x214ca
jmp 0x1e3f0
movq %rax, %r14
movq 0x38(%rsp), %rdi
testq %rdi, %rdi
je 0x1e3ff
callq 0x14590
movq %r14, %rdi
callq 0xeb40
movq %rax, %rdi
callq 0xf7cb
nop