// File: /workspace/github_cpp_makefile_star2_O3/nurseiit[P]cpp-server/./include/asio/impl/read_until.hpp
// Function: asio::detail::read_until_delim_op_v1<asio::basic_stream_socket<asio::ip::tcp, asio::executor>, asio::basic_streambuf_ref<std::allocator<char>>, Session::read_first_line(std::shared_ptr<Session>)::'lambda'(std::error_code const&, unsigned long)>::operator()(std::error_code const&, unsigned long, int)
void operator()(const asio::error_code& ec,
        std::size_t bytes_transferred, int start = 0)
    {
      const std::size_t not_found = (std::numeric_limits<std::size_t>::max)();
      std::size_t bytes_to_read;
      switch (start_ = start)
      {
      case 1:
        for (;;)
        {
          {
            // Determine the range of the data to be searched.
            typedef typename DynamicBuffer_v1::const_buffers_type
              buffers_type;
            typedef buffers_iterator<buffers_type> iterator;
            buffers_type data_buffers = buffers_.data();
            iterator begin = iterator::begin(data_buffers);
            iterator start_pos = begin + search_position_;
            iterator end = iterator::end(data_buffers);

            // Look for a match.
            iterator iter = std::find(start_pos, end, delim_);
            if (iter != end)
            {
              // Found a match. We're done.
              search_position_ = iter - begin + 1;
              bytes_to_read = 0;
            }

            // No match yet. Check if buffer is full.
            else if (buffers_.size() == buffers_.max_size())
            {
              search_position_ = not_found;
              bytes_to_read = 0;
            }

            // Need to read some more data.
            else
            {
              // Next search can start with the new data.
              search_position_ = end - begin;
              bytes_to_read = std::min<std::size_t>(
                    std::max<std::size_t>(512,
                      buffers_.capacity() - buffers_.size()),
                    std::min<std::size_t>(65536,
                      buffers_.max_size() - buffers_.size()));
            }
          }

          // Check if we're done.
          if (!start && bytes_to_read == 0)
            break;

          // Start a new asynchronous read op_v1eration to obtain more data.
          stream_.async_read_some(buffers_.prepare(bytes_to_read),
              ASIO_MOVE_CAST(read_until_delim_op_v1)(*this));
          return; default:
          buffers_.commit(bytes_transferred);
          if (ec || bytes_transferred == 0)
            break;
        }

        const asio::error_code result_ec =
          (search_position_ == not_found)
          ? error::not_found : ec;

        const std::size_t result_n =
          (ec || search_position_ == not_found)
          ? 0 : search_position_;

        handler_(result_ec, result_n);
      }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movl %ecx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movl %ecx, 0x14(%rdi)
movq 0x8(%rdi), %rax
cmpl $0x1, %ecx
jne 0xb1ad
movq 0x28(%rax), %rcx
jmp 0xb1e0
movq 0x28(%rax), %rsi
movq 0x30(%rax), %rcx
subq %rsi, %rcx
cmpq %rdx, %rcx
cmovaeq %rdx, %rcx
movslq %ecx, %rcx
addq %rsi, %rcx
movq %rcx, 0x28(%rax)
movq %rcx, 0x18(%rax)
testq %rdx, %rdx
je 0xb326
cmpl $0x0, (%r14)
jne 0xb326
movq %r14, 0x78(%rsp)
movq 0x10(%rax), %rax
leaq 0xc8(%rsp), %r13
movq %rax, -0x10(%r13)
subq %rax, %rcx
movq %rcx, -0x8(%r13)
leaq 0xb8(%rsp), %r14
movq %r14, %rdx
cmoveq %r13, %rdx
movq 0x18(%rbx), %rsi
leaq 0x100(%rsp), %r12
movq %rax, (%r12)
movq %rcx, 0x8(%r12)
xorl %r15d, %r15d
movq %r15, 0x10(%r12)
movq %r14, 0x18(%r12)
movq %rdx, 0x20(%r12)
movq %r13, 0x28(%r12)
movq %r15, 0x30(%r12)
movq %r12, %rdi
callq 0xb61e
movq %r15, 0x90(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x80(%rsp)
movq 0x8(%r14), %r15
leaq 0x10(%rbx), %rsi
movq %r14, 0x98(%rsp)
movq %r13, 0xa0(%rsp)
movq %r13, 0xa8(%rsp)
movq %r15, 0xb0(%rsp)
movq %r15, 0x68(%rsp)
movaps 0x80(%rsp), %xmm0
movaps 0x90(%rsp), %xmm1
movaps 0xa0(%rsp), %xmm2
movups %xmm2, 0x58(%rsp)
movups %xmm1, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movq 0x30(%r12), %rax
movq %rax, 0x30(%rsp)
movups (%r12), %xmm0
movups 0x10(%r12), %xmm1
movups 0x20(%r12), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xc8(%rsp), %r12
movq %r12, %rdi
callq 0xb7b1
movq 0x30(%r12), %rax
cmpq %r15, %rax
jne 0xb317
movq 0x8(%rbx), %rdx
movq 0x28(%rdx), %rcx
movq 0x40(%rdx), %rax
subq 0x10(%rdx), %rcx
subq %rcx, %rax
jne 0xb32c
movq $-0x1, 0x18(%rbx)
movq $-0x1, %r15
xorl %r12d, %r12d
jmp 0xb35f
incq %rax
movq %rax, 0x18(%rbx)
xorl %r12d, %r12d
movq %rax, %r15
jmp 0xb35f
movq 0x18(%rbx), %r15
jmp 0xb36d
movq %r15, 0x18(%rbx)
movq 0x58(%rdx), %rsi
addq 0x48(%rdx), %rcx
subq %rcx, %rsi
cmpq $0x201, %rsi            # imm = 0x201
movl $0x200, %r12d           # imm = 0x200
cmovaeq %rsi, %r12
cmpq %r12, %rax
cmovbq %rax, %r12
movl $0x10000, %eax          # imm = 0x10000
cmpq %rax, %r12
cmovaeq %rax, %r12
movq 0x78(%rsp), %r14
testl %ebp, %ebp
jne 0xb381
testq %r12, %r12
jne 0xb381
cmpq $-0x1, %r15
je 0xb3c4
movups (%r14), %xmm0
movaps %xmm0, 0x80(%rsp)
jmp 0xb3da
movq (%rbx), %r14
movq 0x8(%rbx), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x8dbc
movq 0x28(%r15), %rax
leaq 0x80(%rsp), %rdx
movq %rax, (%rdx)
movq %r12, 0x8(%rdx)
movq (%r14), %rdi
addq $0x28, %rdi
leaq 0x8(%r14), %rsi
addq $0x20, %r14
xorl %ecx, %ecx
movq %rbx, %r8
movq %r14, %r9
callq 0xb95c
jmp 0xb403
leaq 0x80(%rsp), %rdi
movl $0x3, %esi
callq 0xb416
movq 0x18(%rbx), %r15
xorl %eax, %eax
cmpq $-0x1, %r15
cmoveq %rax, %r15
cmpl $0x0, (%r14)
cmovneq %rax, %r15
addq $0x20, %rbx
leaq 0x80(%rsp), %rsi
movq %rbx, %rdi
movq %r15, %rdx
callq 0xb444
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop