// File: /workspace/github_cpp_makefile_star2_O3/king1600[P]cordpp/src/ssl.cc
// Function: cordpp::SSLClient::read_handler(boost::system::error_code const&, unsigned long)
void SSLClient::read_handler(const Error &err, size_t bytes) {
  // close on error
  if (err) { close(err); return; }
  
  // get the action from the task queue
  const BufferAction action = std::move(queue.front());
  queue.pop_front();

  // fix read_n incomplete size
  bytes += remaining;
  remaining = 0;

  // give the action its requested data
  const Buffer buf(
    asio::buffers_begin(buffer.data()),
    asio::buffers_begin(buffer.data()) + bytes);
  buffer.consume(bytes);
  action(std::move(buf));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rdi, %rbx
cmpb $0x1, 0x4(%rsi)
jne 0x25dad
movq %rbx, %rdi
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x26030
movq %rdx, %r14
leaq 0x258(%rbx), %rdi
movq 0x268(%rbx), %rax
xorps %xmm1, %xmm1
movaps %xmm1, 0x80(%rsp)
movq $0x0, 0x90(%rsp)
movq 0x18(%rax), %r12
movq %r12, 0x98(%rsp)
movq 0x10(%rax), %r13
testq %r13, %r13
je 0x25e04
movups (%rax), %xmm0
addq $0x10, %rax
movaps %xmm0, 0x80(%rsp)
movq %r13, 0x90(%rsp)
movups %xmm1, (%rax)
callq 0x2d8c4
addq 0x10(%rbx), %r14
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq 0x68(%rbx), %rdx
movq 0x80(%rbx), %rsi
leaq 0x108(%rsp), %rcx
movq %rdx, (%rcx)
subq %rdx, %rsi
movq %rsi, 0x8(%rcx)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
movaps %xmm0, 0xe0(%rsp)
movq %rax, 0xf0(%rsp)
movq %rcx, 0xd8(%rsp)
leaq 0x118(%rsp), %rdi
movq %rdi, 0xe8(%rsp)
movups -0x10(%rdi), %xmm0
movaps %xmm0, 0xc0(%rsp)
leaq 0x108(%rsp), %r8
leaq 0xf8(%rsp), %r9
movq %rdx, (%r9)
movq %rsi, 0x8(%r9)
leaq 0x118(%rsp), %r15
movq %rdx, (%r15)
movq %rsi, 0x8(%r15)
movq %rax, 0x10(%r15)
movq %r9, 0x18(%r15)
cmoveq %r8, %r9
cmpq %rax, 0xc8(%rsp)
cmoveq %rdi, %rcx
movq %rcx, 0xe0(%rsp)
movq %r9, 0x20(%r15)
movq %r8, 0x28(%r15)
movq %rax, 0x30(%r15)
movq %r15, %rdi
movq %r14, %rsi
callq 0x3839c
movq 0x30(%r15), %rax
movq %rax, 0x68(%rsp)
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
movups 0x20(%r15), %xmm2
movups %xmm2, 0x58(%rsp)
movups %xmm1, 0x48(%rsp)
movups %xmm0, 0x38(%rsp)
movq 0xf0(%rsp), %rax
movq %rax, 0x30(%rsp)
movaps 0xc0(%rsp), %xmm0
movaps 0xd0(%rsp), %xmm1
movaps 0xe0(%rsp), %xmm2
movups %xmm2, 0x20(%rsp)
movups %xmm1, 0x10(%rsp)
movups %xmm0, (%rsp)
leaq 0xa8(%rsp), %rdi
leaq 0x7f(%rsp), %rsi
callq 0x2d90c
movq 0x80(%rbx), %rax
cmpq %rax, 0x70(%rbx)
jae 0x25f53
movq 0xa0(%rbx), %rcx
movq %rcx, 0x60(%rbx)
movq %rax, 0x70(%rbx)
movq 0x68(%rbx), %rcx
leaq (%rcx,%r14), %rdx
movl %eax, %esi
subl %ecx, %esi
cmpq %rax, %rdx
cmovbeq %r14, %rsi
movslq %esi, %rax
addq %rcx, %rax
movq %rax, 0x68(%rbx)
testq %r13, %r13
je 0x25fd5
leaq 0x80(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq *%r12
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x25fa5
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x25fc4
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
callq 0xa240
jmp 0x26028
movq %rax, %rbx
jmp 0x26001
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
testq %rdi, %rdi
je 0x26001
movq 0xb8(%rsp), %rsi
subq %rdi, %rsi
callq 0xa5d0
movq 0x90(%rsp), %rax
testq %rax, %rax
je 0x26020
leaq 0x80(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xaa30
movq %rax, %rdi
callq 0xd3a3