// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libwebp/src/dec/buffer_dec.c
// Function: WebPCopyDecBufferPixels
VP8StatusCode WebPCopyDecBufferPixels(const WebPDecBuffer* const src_buf,
                                      WebPDecBuffer* const dst_buf) {
  assert(src_buf != NULL && dst_buf != NULL);
  assert(src_buf->colorspace == dst_buf->colorspace);

  dst_buf->width = src_buf->width;
  dst_buf->height = src_buf->height;
  if (CheckDecBuffer(dst_buf) != VP8_STATUS_OK) {
    return VP8_STATUS_INVALID_PARAM;
  }
  if (WebPIsRGBMode(src_buf->colorspace)) {
    const WebPRGBABuffer* const src = &src_buf->u.RGBA;
    const WebPRGBABuffer* const dst = &dst_buf->u.RGBA;
    WebPCopyPlane(src->rgba, src->stride, dst->rgba, dst->stride,
                  src_buf->width * kModeBpp[src_buf->colorspace],
                  src_buf->height);
  } else {
    const WebPYUVABuffer* const src = &src_buf->u.YUVA;
    const WebPYUVABuffer* const dst = &dst_buf->u.YUVA;
    WebPCopyPlane(src->y, src->y_stride, dst->y, dst->y_stride,
                  src_buf->width, src_buf->height);
    WebPCopyPlane(src->u, src->u_stride, dst->u, dst->u_stride,
                  (src_buf->width + 1) / 2, (src_buf->height + 1) / 2);
    WebPCopyPlane(src->v, src->v_stride, dst->v, dst->v_stride,
                  (src_buf->width + 1) / 2, (src_buf->height + 1) / 2);
    if (WebPIsAlphaMode(src_buf->colorspace)) {
      WebPCopyPlane(src->a, src->a_stride, dst->a, dst->a_stride,
                    src_buf->width, src_buf->height);
    }
  }
  return VP8_STATUS_OK;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0xce19c
movq %rsi, %r14
testq %rsi, %rsi
je 0xce19c
movq %rdi, %rbx
movl (%rdi), %r15d
cmpl (%r14), %r15d
jne 0xce1bb
movl 0x4(%rbx), %eax
movl %eax, 0x4(%r14)
movl 0x8(%rbx), %eax
movl %eax, 0x8(%r14)
movq %r14, %rdi
callq 0xce1da
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
jne 0xce18a
movq 0x10(%rbx), %rdi
movq 0x10(%r14), %rdx
movl 0x4(%rbx), %r8d
cmpl $0xa, %r15d
jbe 0xce168
movl 0x8(%rbx), %r9d
movl 0x30(%rbx), %esi
movl 0x30(%r14), %ecx
callq 0x582e0
movq 0x18(%rbx), %rdi
movl 0x34(%rbx), %esi
movq 0x18(%r14), %rdx
movl 0x34(%r14), %ecx
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %r9d
movl %eax, %r8d
incl %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
incl %r8d
sarl %r8d
movl %r9d, %eax
incl %eax
shrl $0x1f, %eax
addl %eax, %r9d
incl %r9d
sarl %r9d
callq 0x582e0
movq 0x20(%rbx), %rdi
movl 0x38(%rbx), %esi
movq 0x20(%r14), %rdx
movl 0x38(%r14), %ecx
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %r9d
movl %eax, %r8d
incl %r8d
shrl $0x1f, %r8d
addl %eax, %r8d
incl %r8d
sarl %r8d
movl %r9d, %eax
incl %eax
shrl $0x1f, %eax
addl %eax, %r9d
incl %r9d
sarl %r9d
callq 0x582e0
movl (%rbx), %ecx
cmpl $0xc, %ecx
ja 0xce190
movl $0x103a, %eax           # imm = 0x103A
btl %ecx, %eax
jae 0xce190
movq 0x28(%rbx), %rdi
movl 0x3c(%rbx), %esi
movq 0x28(%r14), %rdx
movl 0x3c(%r14), %ecx
movl 0x4(%rbx), %r8d
movl 0x8(%rbx), %r9d
jmp 0xce183
movl 0x8(%rbx), %r9d
movl 0x18(%rbx), %esi
movl 0x18(%r14), %ecx
leaq 0x5b523(%rip), %rax     # 0x12969d
movzbl (%r15,%rax), %eax
imull %eax, %r8d
callq 0x582e0
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
addl $-0xb, %ecx
xorl %eax, %eax
cmpl $-0x4, %ecx
jae 0xce14f
jmp 0xce18a
leaq 0x5b3d8(%rip), %rdi     # 0x12957b
leaq 0x5b3f4(%rip), %rsi     # 0x12959e
leaq 0x5b402(%rip), %rcx     # 0x1295b3
movl $0x10f, %edx            # imm = 0x10F
callq 0x55710
leaq 0x5b449(%rip), %rdi     # 0x12960b
leaq 0x5b3d5(%rip), %rsi     # 0x12959e
leaq 0x5b3e3(%rip), %rcx     # 0x1295b3
movl $0x110, %edx            # imm = 0x110
callq 0x55710