// File: 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
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movq -0x8(%rbp), %rcx
movq %rcx, -0x1e0(%rbp)
movq $-0x1, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, 0x14(%rcx)
subl $0x1, %eax
jne 0x1420a
jmp 0x13f2e
jmp 0x13f30
movq -0x1e0(%rbp), %rdi
addq $0x8, %rdi
callq 0x14430
movq %rax, -0x40(%rbp)
movq %rdx, -0x38(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x14460
movq -0x1e0(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0xb0(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x14510
leaq -0xe8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x14550
leaq -0x158(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
movl $0x38, %edx
callq 0x63a0
leaq -0x190(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
movl $0x38, %edx
callq 0x63a0
movq -0x1e0(%rbp), %rsi
addq $0x10, %rsi
movq -0x160(%rbp), %rcx
movq %rsp, %rax
movq %rax, -0x1e8(%rbp)
movq %rcx, 0x68(%rax)
movups -0x190(%rbp), %xmm0
movups -0x180(%rbp), %xmm1
movups -0x170(%rbp), %xmm2
movups %xmm2, 0x58(%rax)
movups %xmm1, 0x48(%rax)
movups %xmm0, 0x38(%rax)
movq -0x128(%rbp), %rcx
movq %rcx, 0x30(%rax)
movups -0x158(%rbp), %xmm0
movups -0x148(%rbp), %xmm1
movups -0x138(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movups %xmm1, 0x10(%rax)
movups %xmm0, (%rax)
leaq -0x120(%rbp), %rdi
callq 0x14600
leaq -0x120(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x146d0
testb $0x1, %al
jne 0x14041
jmp 0x14070
leaq -0x120(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x14700
movq %rax, %rcx
movq -0x1e0(%rbp), %rax
addq $0x1, %rcx
movq %rcx, 0x18(%rax)
movq $0x0, -0x30(%rbp)
jmp 0x141a7
movq -0x1e0(%rbp), %rdi
addq $0x8, %rdi
callq 0x14730
movq -0x1e0(%rbp), %rdi
movq %rax, -0x1f0(%rbp)
addq $0x8, %rdi
callq 0x14750
movq %rax, %rcx
movq -0x1f0(%rbp), %rax
cmpq %rcx, %rax
jne 0x140c2
movq -0x1e0(%rbp), %rax
movq $-0x1, 0x18(%rax)
movq $0x0, -0x30(%rbp)
jmp 0x141a5
leaq -0xe8(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x14700
movq -0x1e0(%rbp), %rdi
movq %rax, 0x18(%rdi)
movq $0x200, -0x198(%rbp) # imm = 0x200
addq $0x8, %rdi
callq 0x14770
movq -0x1e0(%rbp), %rdi
movq %rax, -0x208(%rbp)
addq $0x8, %rdi
callq 0x14730
movq %rax, %rcx
movq -0x208(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x1a0(%rbp)
leaq -0x198(%rbp), %rdi
leaq -0x1a0(%rbp), %rsi
callq 0xdb20
movq -0x1e0(%rbp), %rdi
movq %rax, -0x1f8(%rbp)
movq $0x10000, -0x1a8(%rbp) # imm = 0x10000
addq $0x8, %rdi
callq 0x14750
movq -0x1e0(%rbp), %rdi
movq %rax, -0x200(%rbp)
addq $0x8, %rdi
callq 0x14730
movq %rax, %rcx
movq -0x200(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x1b0(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b0(%rbp), %rsi
callq 0xda50
movq -0x1f8(%rbp), %rdi
movq %rax, %rsi
callq 0xda50
movq (%rax), %rax
movq %rax, -0x30(%rbp)
jmp 0x141a7
cmpl $0x0, -0x1c(%rbp)
jne 0x141b9
cmpq $0x0, -0x30(%rbp)
jne 0x141b9
jmp 0x14239
movq -0x1e0(%rbp), %rdi
movq (%rdi), %rax
movq %rax, -0x210(%rbp)
addq $0x8, %rdi
movq -0x30(%rbp), %rsi
callq 0x147e0
movq -0x210(%rbp), %rdi
movq %rax, %rcx
movq %rdx, %rax
movq -0x1e0(%rbp), %rdx
movq %rcx, -0x1c0(%rbp)
movq %rax, -0x1b8(%rbp)
leaq -0x1c0(%rbp), %rsi
callq 0x14790
jmp 0x142d7
movq -0x1e0(%rbp), %rdi
addq $0x8, %rdi
movq -0x18(%rbp), %rsi
callq 0x14820
movq -0x10(%rbp), %rdi
callq 0x9930
testb $0x1, %al
jne 0x14232
cmpq $0x0, -0x18(%rbp)
jne 0x14234
jmp 0x14239
jmp 0x13f30
movq -0x1e0(%rbp), %rax
cmpq $-0x1, 0x18(%rax)
jne 0x1425a
leaq -0x1d0(%rbp), %rdi
movl $0x3, %esi
callq 0x14850
jmp 0x14273
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x1d0(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x1c8(%rbp)
movq -0x10(%rbp), %rdi
callq 0x9930
testb $0x1, %al
jne 0x1428e
movq -0x1e0(%rbp), %rax
cmpq $-0x1, 0x18(%rax)
jne 0x14299
xorl %eax, %eax
movq %rax, -0x218(%rbp)
jmp 0x142ab
movq -0x1e0(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x218(%rbp)
movq -0x1e0(%rbp), %rdi
movq -0x218(%rbp), %rax
movq %rax, -0x1d8(%rbp)
addq $0x20, %rdi
movq -0x1d8(%rbp), %rdx
leaq -0x1d0(%rbp), %rsi
callq 0x148a0
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq