// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/io_dec.c
// Function: EmitRescaledRGB
static int EmitRescaledRGB(const VP8Io* const io, WebPDecParams* const p) {
  const int mb_h = io->mb_h;
  const int uv_mb_h = (mb_h + 1) >> 1;
  int j = 0, uv_j = 0;
  int num_lines_out = 0;
  while (j < mb_h) {
    const int y_lines_in =
        WebPRescalerImport(p->scaler_y, mb_h - j,
                           io->y + (size_t)j * io->y_stride, io->y_stride);
    j += y_lines_in;
    if (WebPRescaleNeededLines(p->scaler_u, uv_mb_h - uv_j)) {
      const int u_lines_in = WebPRescalerImport(
          p->scaler_u, uv_mb_h - uv_j, io->u + (size_t)uv_j * io->uv_stride,
          io->uv_stride);
      const int v_lines_in = WebPRescalerImport(
          p->scaler_v, uv_mb_h - uv_j, io->v + (size_t)uv_j * io->uv_stride,
          io->uv_stride);
      (void)v_lines_in;   // remove a gcc warning
      assert(u_lines_in == v_lines_in);
      uv_j += u_lines_in;
    }
    num_lines_out += ExportRGB(p, p->last_y + num_lines_out);
  }
  return num_lines_out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r13
movl 0x10(%rdi), %eax
movq %rax, 0x20(%rsp)
incl %eax
sarl %eax
movl %eax, 0x18(%rsp)
xorl %r15d, %r15d
xorl %r14d, %r14d
xorl %ebp, %ebp
movq %rdi, 0x10(%rsp)
movq 0x20(%rsp), %rax
movl %eax, %esi
subl %ebp, %esi
jle 0xca18f
movq 0x30(%rbx), %rdi
movslq %ebp, %rdx
movslq 0x30(%r13), %rcx
imulq %rcx, %rdx
addq 0x18(%r13), %rdx
callq 0xc7ac8
movl %eax, 0x1c(%rsp)
movq 0x38(%rbx), %rdi
movl 0x18(%rsp), %r12d
subl %r14d, %r12d
movl %r12d, %esi
callq 0xc7ab5
testl %eax, %eax
je 0xca0c2
movl %ebp, 0x8(%rsp)
movq 0x38(%rbx), %rdi
movslq %r14d, %rbp
movslq 0x34(%r13), %rcx
movq %rcx, %rdx
imulq %rbp, %rdx
addq 0x20(%r13), %rdx
movl %r12d, %esi
callq 0xc7ac8
movq %r13, %rsi
movl %eax, %r13d
movq 0x40(%rbx), %rdi
movslq 0x34(%rsi), %rcx
movq %rcx, %rdx
imulq %rbp, %rdx
addq 0x28(%rsi), %rdx
movl %r12d, %esi
callq 0xc7ac8
cmpl %eax, %r13d
jne 0xca1df
addl %r13d, %r14d
movl %r14d, 0xc(%rsp)
movl 0x8(%rsp), %ebp
jmp 0xca0c7
movl %r14d, 0xc(%rsp)
addl 0x1c(%rsp), %ebp
movl %ebp, 0x8(%rsp)
movl 0x20(%rbx), %r13d
leal (%r15,%r13), %eax
movq (%rbx), %rbp
movl (%rbp), %ecx
leaq 0xa774c(%rip), %rdx     # 0x171830
movq (%rdx,%rcx,8), %r14
cltq
movslq 0x18(%rbp), %r12
imulq %rax, %r12
addq 0x10(%rbp), %r12
movq 0x30(%rbx), %rdi
movl 0x40(%rdi), %eax
cmpl 0x38(%rdi), %eax
jge 0xca17c
cmpl $0x0, 0x18(%rdi)
jg 0xca17c
movq 0x38(%rbx), %rax
movl 0x40(%rax), %ecx
cmpl 0x38(%rax), %ecx
jge 0xca17c
movl 0x18(%rax), %eax
testl %eax, %eax
jg 0xca17c
leal (%r15,%r13), %ecx
movq (%rbx), %rdx
cmpl 0x8(%rdx), %ecx
jge 0xca1a1
movq 0x40(%rbx), %rcx
cmpl 0x18(%rcx), %eax
jne 0xca1c0
callq 0xd345e
movq 0x38(%rbx), %rdi
callq 0xd345e
movq 0x40(%rbx), %rdi
callq 0xd345e
movq 0x30(%rbx), %rax
movq 0x38(%rbx), %rcx
movq 0x48(%rax), %rdi
movq 0x48(%rcx), %rsi
movq 0x40(%rbx), %rcx
movq 0x48(%rcx), %rdx
movl 0x34(%rax), %r8d
movq %r12, %rcx
callq *%r14
movslq 0x18(%rbp), %rax
addq %rax, %r12
incl %r15d
jmp 0xca0f6
movq 0x10(%rsp), %r13
movl 0xc(%rsp), %r14d
movl 0x8(%rsp), %ebp
jmp 0xca025
movl %r15d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ed8d(%rip), %rdi     # 0x118f35
leaq 0x4ed01(%rip), %rsi     # 0x118eb0
leaq 0x4eda9(%rip), %rcx     # 0x118f5f
movl $0x173, %edx            # imm = 0x173
callq 0x56770
leaq 0x4edc1(%rip), %rdi     # 0x118f88
leaq 0x4ece2(%rip), %rsi     # 0x118eb0
leaq 0x4ed8a(%rip), %rcx     # 0x118f5f
movl $0x174, %edx            # imm = 0x174
callq 0x56770
leaq 0x4ecf8(%rip), %rdi     # 0x118ede
leaq 0x4ecc3(%rip), %rsi     # 0x118eb0
leaq 0x4ed03(%rip), %rcx     # 0x118ef7
movl $0x192, %edx            # imm = 0x192
callq 0x56770