// File: /workspace/github_cpp_makefile_star2_O1/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 0x2ccd6
movq %r14, 0x10(%rsp)
movq (%rbx), %rcx
movq 0x8(%rbx), %rax
movq %rcx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
testq %rax, %rax
je 0x26e82
movq 0x4c10c(%rip), %rcx     # 0x72f80
cmpb $0x0, (%rcx)
je 0x26e7e
incl 0x8(%rax)
jmp 0x26e82
lock
incl 0x8(%rax)
movq 0x18(%r14), %rbx
leaq 0x10(%rsp), %rax
movq %rax, 0x28(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x26ea4
movq 0x8(%rax), %rdi
jmp 0x26ea6
xorl %edi, %edi
movl $0xb0, %esi
callq 0x148a2
movq %rax, %r15
leaq 0x88(%r14), %rax
leaq 0xd8(%r14), %rcx
leaq 0x38(%r14), %rsi
movq %r15, 0x30(%rsp)
xorl %edx, %edx
movq %rdx, 0x38(%rsp)
movl 0x20(%r14), %edi
movb 0x24(%r14), %r8b
movq %rdx, (%r15)
leaq 0x2315(%rip), %r9       # 0x291f8
movq %r9, 0x8(%r15)
movl $0x0, 0x10(%r15)
movups 0x30(%rbx), %xmm0
movups %xmm0, 0x18(%r15)
movq %rdx, 0x28(%r15)
leaq 0x4c33(%rip), %r9       # 0x2bb36
movq %r9, 0x30(%r15)
movl %edi, 0x38(%r15)
movb %r8b, 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)
movq 0x10(%rsp), %rax
movq %rax, 0x68(%r15)
movq 0x18(%rsp), %rax
movq %rax, 0x70(%r15)
movq %rdx, 0x78(%r15)
movq 0x20(%rsp), %rax
movq %rdx, 0x20(%rsp)
movq %rax, 0x78(%r15)
movq %rdx, 0x18(%rsp)
movq %r15, %rdi
subq $-0x80, %rdi
callq 0x15310
addq $0x28, %rbx
movq %r15, 0x38(%rsp)
cmpl $-0x1, 0x90(%r14)
je 0x26fe9
movabsq $0x100000001, %r14      # imm = 0x100000001
movq 0x4caf8(%rip), %rax     # 0x73a80
movabsq $-0x70502de1da3a1f65, %rcx # imm = 0x8FAFD21E25C5E09B
cmpq %rcx, %rax
je 0x26fc7
movabsq $-0x4d54ee85da8120f3, %rcx # imm = 0xB2AB117A257EDF0D
cmpq %rcx, %rax
je 0x26fc7
movq 0x4cacb(%rip), %rax     # 0x73a78
leaq 0x4cac4(%rip), %rdi     # 0x73a78
movl $0x1, %esi
callq *0x30(%rax)
testb %al, %al
movl $0x1, %eax
cmoveq %rax, %r14
movq %r14, 0x18(%r15)
leaq 0x4caa6(%rip), %rax     # 0x73a78
movq %rax, 0x20(%r15)
movq (%rbx), %rax
movq 0x28(%rax), %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x153a8
jmp 0x2700d
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 0x246a4
leaq 0x30(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x28(%rsp), %rdi
callq 0x29486
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x27031
callq 0x1581a
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27040
callq 0x1581a
addq $0x50, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x2705b
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x29486
jmp 0x27066
movq %rax, %rdi
callq 0x10886
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x27075
callq 0x1581a
movq 0x48(%rsp), %rdi
testq %rdi, %rdi
je 0x27084
callq 0x1581a
movq %rbx, %rdi
callq 0xfb40