// File: nurseiit[P]cpp-server/./include/asio/buffers_iterator.hpp
// Function: asio::buffers_iterator<asio::const_buffers_1, char>::advance(long)
void advance(std::ptrdiff_t n)
  {
    if (n > 0)
    {
      ASIO_ASSERT(current_ != end_ && "iterator out of bounds");
      for (;;)
      {
        std::ptrdiff_t current_buffer_balance
          = current_buffer_.size() - current_buffer_position_;

        // Check if the advance can be satisfied by the current buffer.
        if (current_buffer_balance > n)
        {
          position_ += n;
          current_buffer_position_ += n;
          return;
        }

        // Update position.
        n -= current_buffer_balance;
        position_ += current_buffer_balance;

        // Move to next buffer. If it is empty then it will be skipped on the
        // next iteration of this loop.
        if (++current_ == end_)
        {
          ASIO_ASSERT(n == 0 && "iterator out of bounds");
          current_buffer_ = buffer_type();
          current_buffer_position_ = 0;
          return;
        }
        current_buffer_ = *current_;
        current_buffer_position_ = 0;
      }
    }
    else if (n < 0)
    {
      std::size_t abs_n = -n;
      ASIO_ASSERT(position_ >= abs_n && "iterator out of bounds");
      for (;;)
      {
        // Check if the advance can be satisfied by the current buffer.
        if (current_buffer_position_ >= abs_n)
        {
          position_ -= abs_n;
          current_buffer_position_ -= abs_n;
          return;
        }

        // Update position.
        abs_n -= current_buffer_position_;
        position_ -= current_buffer_position_;

        // Check if we've reached the beginning of the buffers.
        if (current_ == begin_)
        {
          ASIO_ASSERT(abs_n == 0 && "iterator out of bounds");
          current_buffer_position_ = 0;
          return;
        }

        // Find the previous non-empty buffer.
        buffer_sequence_iterator_type iter = current_;
        while (iter != begin_)
        {
          --iter;
          buffer_type buffer = *iter;
          std::size_t buffer_size = buffer.size();
          if (buffer_size > 0)
          {
            current_ = iter;
            current_buffer_ = buffer;
            current_buffer_position_ = buffer_size;
            break;
          }
        }
      }
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x10(%rbp)
jle 0x16ba3
movq -0x58(%rbp), %rdx
movq 0x20(%rdx), %rcx
xorl %eax, %eax
cmpq 0x28(%rdx), %rcx
movb %al, -0x59(%rbp)
je 0x16a7d
movb $0x1, %al
movb %al, -0x59(%rbp)
jmp 0x16a7d
movb -0x59(%rbp), %al
testb $0x1, %al
jne 0x16a86
jmp 0x16a88
jmp 0x16aa7
leaq 0x1bcd(%rip), %rdi      # 0x1865c
leaq 0x1bf3(%rip), %rsi      # 0x18689
movl $0x19b, %edx            # imm = 0x19B
leaq 0x1c0b(%rip), %rcx      # 0x186ad
callq 0x5290
jmp 0x16aa9
movq -0x58(%rbp), %rdi
callq 0x158c0
movq -0x58(%rbp), %rcx
subq 0x10(%rcx), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jle 0x16ae9
movq -0x58(%rbp), %rax
movq -0x10(%rbp), %rcx
addq 0x30(%rax), %rcx
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rcx
addq 0x10(%rax), %rcx
movq %rcx, 0x10(%rax)
jmp 0x16d25
movq -0x58(%rbp), %rcx
movq -0x18(%rbp), %rdx
movq -0x10(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x10(%rbp)
movq -0x18(%rbp), %rax
addq 0x30(%rcx), %rax
movq %rax, 0x30(%rcx)
movq 0x20(%rcx), %rax
addq $0x10, %rax
movq %rax, 0x20(%rcx)
cmpq 0x28(%rcx), %rax
jne 0x16b80
xorl %eax, %eax
cmpq $0x0, -0x10(%rbp)
movb %al, -0x5a(%rbp)
jne 0x16b2d
movb $0x1, %al
movb %al, -0x5a(%rbp)
jmp 0x16b2d
movb -0x5a(%rbp), %al
testb $0x1, %al
jne 0x16b36
jmp 0x16b38
jmp 0x16b57
leaq 0x1c27(%rip), %rdi      # 0x18766
leaq 0x1b43(%rip), %rsi      # 0x18689
movl $0x1b1, %edx            # imm = 0x1B1
leaq 0x1b5b(%rip), %rcx      # 0x186ad
callq 0x5290
leaq -0x28(%rbp), %rdi
callq 0x16a20
movq -0x58(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, (%rax)
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
jmp 0x16d25
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movq $0x0, 0x10(%rax)
jmp 0x16aa9
cmpq $0x0, -0x10(%rbp)
jge 0x16d23
movq -0x58(%rbp), %rax
xorl %ecx, %ecx
subq -0x10(%rbp), %rcx
movq %rcx, -0x30(%rbp)
movq 0x30(%rax), %rcx
xorl %eax, %eax
cmpq -0x30(%rbp), %rcx
movb %al, -0x5b(%rbp)
jb 0x16bd2
movb $0x1, %al
movb %al, -0x5b(%rbp)
jmp 0x16bd2
movb -0x5b(%rbp), %al
testb $0x1, %al
jne 0x16bdb
jmp 0x16bdd
jmp 0x16bfc
leaq 0x1b4f(%rip), %rdi      # 0x18733
leaq 0x1a9e(%rip), %rsi      # 0x18689
movl $0x1bd, %edx            # imm = 0x1BD
leaq 0x1ab6(%rip), %rcx      # 0x186ad
callq 0x5290
jmp 0x16bfe
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
cmpq -0x30(%rbp), %rax
jb 0x16c33
movq -0x58(%rbp), %rax
movq -0x30(%rbp), %rdx
movq 0x30(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x30(%rax)
movq -0x30(%rbp), %rdx
movq 0x10(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x10(%rax)
jmp 0x16d25
movq -0x58(%rbp), %rcx
movq 0x10(%rcx), %rdx
movq -0x30(%rbp), %rax
subq %rdx, %rax
movq %rax, -0x30(%rbp)
movq 0x10(%rcx), %rdx
movq 0x30(%rcx), %rax
subq %rdx, %rax
movq %rax, 0x30(%rcx)
movq 0x20(%rcx), %rax
cmpq 0x18(%rcx), %rax
jne 0x16caa
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0x5c(%rbp)
jne 0x16c72
movb $0x1, %al
movb %al, -0x5c(%rbp)
jmp 0x16c72
movb -0x5c(%rbp), %al
testb $0x1, %al
jne 0x16c7b
jmp 0x16c7d
jmp 0x16c9c
leaq 0x1ade(%rip), %rdi      # 0x18762
leaq 0x19fe(%rip), %rsi      # 0x18689
movl $0x1cf, %edx            # imm = 0x1CF
leaq 0x1a16(%rip), %rcx      # 0x186ad
callq 0x5290
movq -0x58(%rbp), %rax
movq $0x0, 0x10(%rax)
jmp 0x16d25
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x58(%rbp), %rcx
movq -0x38(%rbp), %rax
cmpq 0x18(%rcx), %rax
je 0x16d1e
movq -0x38(%rbp), %rax
addq $-0x10, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x158c0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jbe 0x16d1c
movq -0x58(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x20(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, (%rax)
movq -0x40(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rax)
jmp 0x16d1e
jmp 0x16cb6
jmp 0x16bfe
jmp 0x16d25
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)