// File: /workspace/github_c_makefile_star2_O2/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
testq %rdi, %rdi
je 0xc6738
movq %rsi, %r14
testq %rsi, %rsi
je 0xc6738
movq %rdi, %rbx
movl (%rdi), %r12d
cmpl (%r14), %r12d
jne 0xc6757
movl 0x4(%rbx), %ebp
movl %ebp, 0x4(%r14)
movl 0x8(%rbx), %r15d
movl %r15d, 0x8(%r14)
movq %r14, %rdi
callq 0xc6776
testl %eax, %eax
je 0xc6645
pushq $0x2
popq %rax
jmp 0xc6723
movq 0x10(%rbx), %rdi
movq 0x10(%r14), %rdx
cmpl $0xa, %r12d
jbe 0xc6700
movl 0x30(%rbx), %esi
movl 0x30(%r14), %ecx
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x59590
movq 0x18(%rbx), %rdi
movl 0x34(%rbx), %esi
movq 0x18(%r14), %r8
movl 0x34(%r14), %ecx
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %r9d
incl %eax
pushq $0x2
popq %rbp
cltd
idivl %ebp
movl %eax, %r10d
incl %r9d
movl %r9d, %eax
cltd
idivl %ebp
movq %r8, %rdx
movl %r10d, %r8d
movl %eax, %r9d
callq 0x59590
movq 0x20(%rbx), %rdi
movl 0x38(%rbx), %esi
movq 0x20(%r14), %r8
movl 0x38(%r14), %ecx
movl 0x4(%rbx), %eax
movl 0x8(%rbx), %r9d
incl %eax
cltd
idivl %ebp
movl %eax, %r10d
incl %r9d
movl %r9d, %eax
cltd
idivl %ebp
movq %r8, %rdx
movl %r10d, %r8d
movl %eax, %r9d
callq 0x59590
movl (%rbx), %ecx
cmpl $0xc, %ecx
ja 0xc672c
movl $0x103a, %eax           # imm = 0x103A
btl %ecx, %eax
jae 0xc672c
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 0xc671c
movl 0x18(%rbx), %esi
movl 0x18(%r14), %ecx
leaq 0x5202f(%rip), %rax     # 0x11873d
movzbl (%r12,%rax), %eax
imull %eax, %ebp
movl %ebp, %r8d
movl %r15d, %r9d
callq 0x59590
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl $-0xb, %ecx
xorl %eax, %eax
cmpl $-0x4, %ecx
jae 0xc66e7
jmp 0xc6723
leaq 0x51edc(%rip), %rdi     # 0x11861b
leaq 0x51ef8(%rip), %rsi     # 0x11863e
leaq 0x51f06(%rip), %rcx     # 0x118653
movl $0x10f, %edx            # imm = 0x10F
callq 0x56770
leaq 0x51f4d(%rip), %rdi     # 0x1186ab
leaq 0x51ed9(%rip), %rsi     # 0x11863e
leaq 0x51ee7(%rip), %rcx     # 0x118653
movl $0x110, %edx            # imm = 0x110
callq 0x56770