// File: /workspace/github_cpp_makefile_star2_O1/flightaware[P]beast-splitter/beast_output.cc
// Function: beast::SocketConnector::connection_established(boost::asio::ip::basic_endpoint<boost::asio::ip::tcp> const&)
void SocketConnector::connection_established(const tcp::endpoint &endpoint) {
        auto self(shared_from_this());

        std::cerr << host << ":" << port_or_service << ": connected to " << endpoint << " 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);
            schedule_reconnect();
        });

        new_output->start();
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x2ce24
movq 0x128(%rbx), %rsi
movq 0x130(%rbx), %rdx
movq 0x4b057(%rip), %rdi     # 0x72fd8
callq 0xf730
movq %rax, %r15
leaq 0x2808a(%rip), %rsi     # 0x5001a
movl $0x1, %edx
movq %rax, %rdi
callq 0xf730
movq 0x148(%rbx), %rsi
movq 0x150(%rbx), %rdx
movq %r15, %rdi
callq 0xf730
movq %rax, %r15
leaq 0x29514(%rip), %rsi     # 0x514d1
movl $0xf, %edx
movq %rax, %rdi
callq 0xf730
movq %r15, %rdi
movq %r14, %rsi
callq 0x22d53
movq %rax, %r15
leaq 0x29ea1(%rip), %rsi     # 0x51e80
movl $0xf, %edx
movq %rax, %rdi
callq 0xf730
leaq 0x170(%rbx), %r14
movq %r15, %rdi
movq %r14, %rsi
callq 0x11ffc
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0xf5f0
movsbl %al, %esi
movq %r15, %rdi
callq 0xf040
movq %rax, %rdi
callq 0xf470
movq 0x18(%rbx), %rsi
leaq 0x68(%rbx), %rdx
movq %rsp, %rdi
movq %r14, %rcx
callq 0x2b678
movq 0x168(%rbx), %r12
movq (%rsp), %r13
movq 0x8(%rsp), %r15
testq %r15, %r15
je 0x28067
movq 0x4af29(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x28062
incl 0x8(%r15)
jmp 0x28067
lock
incl 0x8(%r15)
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movl $0x20, %edi
callq 0xf620
leaq -0x21ad(%rip), %rcx     # 0x25ed8
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movq %r13, 0x10(%rax)
movq %r15, 0x18(%rax)
movq %rax, 0x20(%rsp)
leaq 0x4c88(%rip), %rax      # 0x2cd2c
movq %rax, 0x38(%rsp)
leaq 0x4c98(%rip), %rax      # 0x2cd48
movq %rax, 0x30(%rsp)
leaq 0x81(%rsp), %rdi
movq %r14, %rsi
callq 0x11c78
leaq 0x20(%rsp), %rsi
leaq 0x81(%rsp), %rdx
movq %r12, %rdi
callq 0x10db4
movl %eax, %ebp
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x280f5
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r14
testq %r14, %r14
je 0x2811f
movq 0x4ae71(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x2811a
incl 0x8(%r14)
jmp 0x2811f
lock
incl 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movl $0x20, %edi
callq 0xf620
movq %rbx, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
movl %ebp, 0x18(%rax)
leaq 0x60(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x2d75(%rip), %rax      # 0x2aec8
movq %rax, 0x18(%rsi)
leaq 0x2da6(%rip), %rax      # 0x2af04
movq %rax, 0x10(%rsi)
addq $0xc0, %r15
movq %r15, %rdi
callq 0x2c662
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x2818a
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %r15
movq 0x10(%rsp), %r12
movq 0x18(%rsp), %r14
testq %r14, %r14
je 0x281b4
movq 0x4addc(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x281af
incl 0x8(%r14)
jmp 0x281b4
lock
incl 0x8(%r14)
xorps %xmm0, %xmm0
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movl $0x20, %edi
callq 0xf620
movq %rbx, (%rax)
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
movl %ebp, 0x18(%rax)
leaq 0x40(%rsp), %rsi
movq %rax, (%rsi)
leaq 0x2dc2(%rip), %rax      # 0x2afaa
movq %rax, 0x18(%rsi)
leaq 0x2dd7(%rip), %rax      # 0x2afca
movq %rax, 0x10(%rsi)
addq $0xe0, %r15
movq %r15, %rdi
callq 0x2c736
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x2821f
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq (%rsp), %rdi
callq 0x25a14
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x28237
callq 0x1581a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x28246
callq 0x1581a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28305
jmp 0x28305
jmp 0x28305
movq %rax, %rbx
jmp 0x282f4
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x282ad
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x282ad
jmp 0x28305
jmp 0x282b4
movq %rax, %rbx
movq 0x70(%rsp), %rax
testq %rax, %rax
je 0x282ad
leaq 0x60(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %r14d, %r14d
jmp 0x282b7
jmp 0x28305
movq %rax, %rbx
testq %r14, %r14
je 0x282f4
movq %r14, %rdi
jmp 0x282ef
movq %rax, %rbx
jmp 0x282e7
jmp 0x2830d
movq %rax, %rbx
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x282e4
leaq 0x20(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
xorl %r15d, %r15d
testq %r15, %r15
je 0x282f4
movq %r15, %rdi
callq 0x1581a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x28310
callq 0x1581a
jmp 0x28310
movq %rax, %rdi
callq 0x10886
movq %rax, %rbx
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2831f
callq 0x1581a
movq %rbx, %rdi
callq 0xfb40
nop