// File: /workspace/github_c_makefile_star2_O3/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 0xcd357
movq %rsi, %r14
testq %rsi, %rsi
je 0xcd357
movq %rdi, %rbx
movl (%rdi), %r12d
cmpl (%r14), %r12d
jne 0xcd376
movl 0x4(%rbx), %r15d
movl %r15d, 0x4(%r14)
movl 0x8(%rbx), %ebp
movl %ebp, 0x8(%r14)
movq %r14, %rdi
callq 0xcd395
movl %eax, %ecx
movl $0x2, %eax
testl %ecx, %ecx
jne 0xcd342
movq 0x10(%rbx), %rdi
movq 0x10(%r14), %rdx
cmpl $0xa, %r12d
jbe 0xcd31e
movl 0x30(%rbx), %esi
movl 0x30(%r14), %ecx
movl %r15d, %r8d
movl %ebp, %r9d
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 0xcd34b
movl $0x103a, %eax           # imm = 0x103A
btl %ecx, %eax
jae 0xcd34b
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 0xcd33b
movl 0x18(%rbx), %esi
movl 0x18(%r14), %ecx
leaq 0x5b591(%rip), %rax     # 0x1288bd
movzbl (%r12,%rax), %eax
imull %eax, %r15d
movl %r15d, %r8d
movl %ebp, %r9d
callq 0x582e0
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
addl $-0xb, %ecx
xorl %eax, %eax
cmpl $-0x4, %ecx
jae 0xcd305
jmp 0xcd342
leaq 0x5b43d(%rip), %rdi     # 0x12879b
leaq 0x5b459(%rip), %rsi     # 0x1287be
leaq 0x5b467(%rip), %rcx     # 0x1287d3
movl $0x10f, %edx            # imm = 0x10F
callq 0x55710
leaq 0x5b4ae(%rip), %rdi     # 0x12882b
leaq 0x5b43a(%rip), %rsi     # 0x1287be
leaq 0x5b448(%rip), %rcx     # 0x1287d3
movl $0x110, %edx            # imm = 0x110
callq 0x55710