// File: /workspace/github_cpp_makefile_star2_O3/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketListener::accept_connection()
void SocketListener::accept_connection() {
        auto self(shared_from_this());

        acceptor.async_accept(socket, peer, [this, self](const boost::system::error_code &ec) {
            if (!ec) {
                std::cerr << endpoint << ": accepted a connection from " << peer << " with settings " << initial_settings << std::endl;
                SocketOutput::pointer new_output = SocketOutput::create(service, std::move(socket), initial_settings);

                modes::FilterDistributor::handle h = distributor.add_client(std::bind(&SocketOutput::write, new_output, std::placeholders::_1), initial_settings.to_filter());

                new_output->set_settings_notifier([this, self, h](const Settings &newsettings) { distributor.update_client_filter(h, newsettings.to_filter()); });

                new_output->set_close_notifier([this, self, h] { distributor.remove_client(h); });

                new_output->start();
            } else {
                if (ec == boost::system::errc::operation_canceled)
                    return;
                std::cerr << endpoint << ": accept error: " << ec.message() << std::endl;
            }

            accept_connection();
        });
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x50, %rsp
movq %rdi, %r14
leaq 0x40(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2af68
movq %r14, 0x10(%rsp)
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x253b0
movq 0x4bbde(%rip), %rcx     # 0x70f80
cmpb $0x0, (%rcx)
je 0x253ac
incl 0x8(%rax)
jmp 0x253b0
lock
incl 0x8(%rax)
movq 0x18(%r14), %rbx
leaq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x253d2
movq 0x8(%rax), %rdi
jmp 0x253d4
xorl %edi, %edi
movl $0xb0, %esi
callq 0x136c4
movq %rax, %r15
leaq 0x88(%r14), %rax
leaq 0xd8(%r14), %rcx
leaq 0x38(%r14), %rsi
movq %r15, 0x30(%rsp)
movl 0x20(%r14), %edx
movb 0x24(%r14), %dil
xorl %r8d, %r8d
movq %r8, (%r15)
leaq 0x2217(%rip), %r9       # 0x27624
movq %r9, 0x8(%r15)
movl $0x0, 0x10(%r15)
movups 0x30(%rbx), %xmm0
movups %xmm0, 0x18(%r15)
movq %r8, 0x28(%r15)
leaq 0x4a53(%rip), %r9       # 0x29e80
movq %r9, 0x30(%r15)
movl %edx, 0x38(%r15)
movb %dil, 0x3c(%r15)
movl $0xffffffff, 0x40(%r15) # imm = 0xFFFFFFFF
movq %rax, 0x48(%r15)
movl 0x30(%r14), %eax
movl %eax, 0x50(%r15)
movq %rcx, 0x58(%r15)
movq $0x1c, 0x60(%r15)
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x68(%r15)
movq 0x20(%rsp), %rax
movq %r8, 0x20(%rsp)
movq %rax, 0x78(%r15)
movq %r8, 0x18(%rsp)
movq %r15, %rdi
subq $-0x80, %rdi
callq 0x140a4
addq $0x28, %rbx
movq %r15, 0x38(%rsp)
cmpl $-0x1, 0x90(%r14)
je 0x25505
movq 0x4c5e4(%rip), %rax     # 0x71a80
movabsq $-0x70502de1da3a1f65, %rcx # imm = 0x8FAFD21E25C5E09B
cmpq %rcx, %rax
je 0x254d9
movabsq $-0x4d54ee85da8120f3, %rcx # imm = 0xB2AB117A257EDF0D
cmpq %rcx, %rax
je 0x254d9
movq 0x4c5b7(%rip), %rax     # 0x71a78
leaq 0x4c5b0(%rip), %rdi     # 0x71a78
movl $0x1, %esi
callq *0x30(%rax)
movl $0x1, %ecx
testb %al, %al
je 0x254e3
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x18(%r15)
leaq 0x4c58a(%rip), %rax     # 0x71a78
movq %rax, 0x20(%r15)
movq (%rbx), %rax
movq 0x28(%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1413c
jmp 0x25529
addq $0x20, %r14
movl $0x0, (%rsp)
movq %rbx, %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r15, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x22d82
leaq 0x30(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x28(%rsp), %rdi
callq 0x278ae
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x2554d
callq 0x14590
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x2555c
callq 0x14590
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x25577
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x278ae
jmp 0x25582
movq %rax, %rdi
callq 0xf7cb
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x25591
callq 0x14590
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x255a0
callq 0x14590
movq %rbx, %rdi
callq 0xeb40