// File: /workspace/github_cpp_makefile_star2_O1/flightaware[P]beast-splitter/beast_input_net.cc
// Function: beast::NetInput::start_reading(boost::system::error_code const&)
void NetInput::start_reading(const boost::system::error_code &ec) {
    if (ec) {
        assert(ec == boost::asio::error::operation_aborted);
        return;
    }

    auto self(std::static_pointer_cast<NetInput>(shared_from_this()));
    std::shared_ptr<helpers::bytebuf> buf;

    buf.swap(readbuf);
    if (buf) {
        buf->resize(read_buffer_size);
    } else {
        buf = std::make_shared<helpers::bytebuf>(read_buffer_size);
    }

    socket.async_read_some(boost::asio::buffer(*buf), [this, self, buf](const boost::system::error_code &ec, std::size_t len) {
        if (ec) {
            readbuf = buf;
            handle_error(ec);
        } else {
            buf->resize(len);
            parse_input(*buf);
            check_framing_errors();
            readbuf = buf;

            start_reading();
        }
    });
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
cmpb $0x1, 0x4(%rsi)
jne 0x20346
cmpl $0x7d, (%rsi)
jne 0x20327
movq 0x8(%rsi), %rax
movabsq $-0x70502de1da3a1f65, %rcx # imm = 0x8FAFD21E25C5E09B
cmpq %rcx, 0x8(%rax)
je 0x20620
leaq 0x30e03(%rip), %rdi     # 0x51131
leaq 0x311ea(%rip), %rsi     # 0x5151f
leaq 0x311f6(%rip), %rcx     # 0x51532
movl $0x88, %edx
callq 0xf440
movq %rdi, %r15
leaq 0x8(%rdi), %rsi
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x19994
movq (%r14), %r12
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x2037b
movq 0x52c13(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x20377
incl 0x8(%rcx)
jmp 0x2037b
lock
incl 0x8(%rcx)
movq %rcx, 0x40(%rsp)
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x2038f
callq 0x1581a
movq 0x3e8(%r15), %r13
movq 0x3f0(%r15), %rbp
xorps %xmm0, %xmm0
movups %xmm0, 0x3e8(%r15)
testq %r13, %r13
je 0x203c4
movq 0x280(%r15), %rsi
movq %r13, %rdi
callq 0x1c9ea
movq %r14, %rsi
movq %rbp, %rdx
jmp 0x2041b
leaq 0x280(%r15), %rcx
leaq 0x18(%rsp), %rdi
movq $0x0, -0x8(%rdi)
leaq 0x10(%rsp), %rsi
leaq 0x48(%rsp), %rdx
callq 0x1db0e
movq 0x10(%rsp), %r13
movq 0x18(%rsp), %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
testq %rbp, %rbp
je 0x20406
movq %rbp, %rdi
callq 0x1581a
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x20415
callq 0x1581a
movq %r14, %rsi
movq %rbx, %rdx
movq (%r13), %rbx
movq 0x8(%r13), %r14
xorl %ebp, %ebp
movq %r14, 0x70(%rsp)
subq %rbx, %r14
cmovneq %rbx, %rbp
movq %r15, 0x10(%rsp)
movq %r12, 0x18(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x20(%rsp)
testq %rcx, %rcx
je 0x2045f
movq 0x52b2f(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x2045b
incl 0x8(%rcx)
jmp 0x2045f
lock
incl 0x8(%rcx)
movq %r13, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
testq %rdx, %rdx
je 0x20483
movq 0x52b0b(%rip), %rax     # 0x72f80
cmpb $0x0, (%rax)
je 0x2047f
incl 0x8(%rdx)
jmp 0x20483
lock
incl 0x8(%rdx)
movq %rdx, 0x8(%rsp)
movq 0x310(%r15), %r13
movq %rsi, 0x48(%rsp)
movq %fs:-0x8, %rax
testq %rax, %rax
je 0x204a8
movq 0x8(%rax), %rdi
jmp 0x204aa
xorl %edi, %edi
movl $0xb0, %esi
callq 0x148a2
movq %rax, %r12
leaq 0x28(%r13), %rax
movq %rax, 0x68(%rsp)
leaq 0x318(%r15), %rax
movq %rax, 0x60(%rsp)
leaq 0x330(%r15), %rsi
movq %r12, 0x50(%rsp)
xorl %eax, %eax
movq %rax, 0x58(%rsp)
movl 0x318(%r15), %ecx
movb 0x31c(%r15), %dl
movq %rax, (%r12)
leaq 0x2158(%rip), %rdi      # 0x22650
movq %rdi, 0x8(%r12)
movl %eax, 0x10(%r12)
movups 0x30(%r13), %xmm0
movups %xmm0, 0x18(%r12)
movq %rax, 0x28(%r12)
leaq 0x4403(%rip), %rdi      # 0x2491c
movq %rdi, 0x30(%r12)
movl %ecx, 0x38(%r12)
movb %dl, 0x3c(%r12)
movq %rbp, 0x40(%r12)
movq %r14, 0x48(%r12)
movl %eax, 0x50(%r12)
movq 0x10(%rsp), %rcx
movq %rcx, 0x58(%r12)
movq 0x18(%rsp), %rcx
movq %rcx, 0x60(%r12)
movq %rax, 0x68(%r12)
movq 0x20(%rsp), %rcx
movq %rax, 0x20(%rsp)
movq %rcx, 0x68(%r12)
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %rcx
movq %rcx, 0x70(%r12)
movq %rax, 0x78(%r12)
movq 0x30(%rsp), %rcx
movq %rax, 0x30(%rsp)
movq %rcx, 0x78(%r12)
movq %rax, 0x28(%rsp)
movq %r12, %rdi
subq $-0x80, %rdi
callq 0x15310
movq %r12, 0x58(%rsp)
movb 0x31c(%r15), %al
shrb $0x4, %al
cmpq %rbx, 0x70(%rsp)
sete %cl
andb %al, %cl
movzbl %cl, %eax
movl %eax, (%rsp)
movq 0x68(%rsp), %rdi
movq 0x60(%rsp), %rsi
xorl %edx, %edx
movq %r12, %rcx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x246a4
leaq 0x50(%rsp), %rax
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x48(%rsp), %rdi
callq 0x2296c
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x205f3
callq 0x1581a
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x20602
callq 0x1581a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x20611
callq 0x1581a
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x20620
callq 0x1581a
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20631
movq %rax, %r15
movq %rbp, 0x8(%rsp)
jmp 0x20661
jmp 0x2064c
movq %rax, %r15
leaq 0x48(%rsp), %rdi
callq 0x2296c
jmp 0x20657
movq %rax, %rdi
callq 0x10886
movq %rax, %r15
leaq 0x10(%rsp), %rdi
callq 0x20ae6
cmpq $0x0, 0x8(%rsp)
je 0x20673
movq 0x8(%rsp), %rdi
callq 0x1581a
cmpq $0x0, 0x40(%rsp)
je 0x20685
movq 0x40(%rsp), %rdi
callq 0x1581a
movq %r15, %rdi
callq 0xfb40
nop