// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dsp/lossless.c
// Function: ColorSpaceInverseTransform_C
static void ColorSpaceInverseTransform_C(const VP8LTransform* const transform,
                                         int y_start, int y_end,
                                         const uint32_t* src, uint32_t* dst) {
  const int width = transform->xsize_;
  const int tile_width = 1 << transform->bits_;
  const int mask = tile_width - 1;
  const int safe_width = width & ~mask;
  const int remaining_width = width - safe_width;
  const int tiles_per_row = VP8LSubSampleSize(width, transform->bits_);
  int y = y_start;
  const uint32_t* pred_row =
      transform->data_ + (y >> transform->bits_) * tiles_per_row;

  while (y < y_end) {
    const uint32_t* pred = pred_row;
    VP8LMultipliers m = { 0, 0, 0 };
    const uint32_t* const src_safe_end = src + safe_width;
    const uint32_t* const src_end = src + width;
    while (src < src_safe_end) {
      ColorCodeToMultipliers(*pred++, &m);
      VP8LTransformColorInverse(&m, src, tile_width, dst);
      src += tile_width;
      dst += tile_width;
    }
    if (src < src_end) {  // Left-overs using C-version.
      ColorCodeToMultipliers(*pred++, &m);
      VP8LTransformColorInverse(&m, src, remaining_width, dst);
      src += remaining_width;
      dst += remaining_width;
    }
    ++y;
    if ((y & mask) == 0) pred_row += tiles_per_row;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movq %rcx, -0x18(%rbp)
movq %r8, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rax
movl 0x4(%rax), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0x28(%rbp)
movl -0x28(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x2c(%rbp)
movl -0x24(%rbp), %eax
movl -0x2c(%rbp), %ecx
xorl $-0x1, %ecx
andl %ecx, %eax
movl %eax, -0x30(%rbp)
movl -0x24(%rbp), %eax
subl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x24(%rbp), %edi
movq -0x8(%rbp), %rax
movl 0x4(%rax), %esi
callq 0x14eff0
movl %eax, -0x38(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x3c(%rbp), %edx
movq -0x8(%rbp), %rcx
movl 0x4(%rcx), %ecx
sarl %cl, %edx
movl %edx, %ecx
imull -0x38(%rbp), %ecx
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x3c(%rbp), %eax
cmpl -0x10(%rbp), %eax
jge 0x14efdb
movq -0x48(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x53(%rbp), %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x5a200
movq -0x18(%rbp), %rax
movslq -0x30(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x18(%rbp), %rax
movslq -0x24(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x60(%rbp), %rax
jae 0x14ef47
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %edi
leaq -0x53(%rbp), %rsi
callq 0x14fef0
movq 0xca316(%rip), %rax     # 0x219220
movq -0x18(%rbp), %rsi
movl -0x28(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x53(%rbp), %rdi
callq *%rax
movl -0x28(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x28(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
jmp 0x14eedf
movq -0x18(%rbp), %rax
cmpq -0x68(%rbp), %rax
jae 0x14efad
movq -0x50(%rbp), %rax
movq %rax, %rcx
addq $0x4, %rcx
movq %rcx, -0x50(%rbp)
movl (%rax), %edi
leaq -0x53(%rbp), %rsi
callq 0x14fef0
movq 0xca2ae(%rip), %rax     # 0x219220
movq -0x18(%rbp), %rsi
movl -0x34(%rbp), %edx
movq -0x20(%rbp), %rcx
leaq -0x53(%rbp), %rdi
callq *%rax
movl -0x34(%rbp), %ecx
movq -0x18(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movl -0x34(%rbp), %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
andl -0x2c(%rbp), %eax
cmpl $0x0, %eax
jne 0x14efd6
movl -0x38(%rbp), %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
jmp 0x14ee95
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)