// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libwebp/src/dsp/lossless.c
// Function: VP8LInverseTransform
void VP8LInverseTransform(const VP8LTransform* const transform,
                          int row_start, int row_end,
                          const uint32_t* const in, uint32_t* const out) {
  const int width = transform->xsize_;
  assert(row_start < row_end);
  assert(row_end <= transform->ysize_);
  switch (transform->type_) {
    case SUBTRACT_GREEN_TRANSFORM:
      VP8LAddGreenToBlueAndRed(in, (row_end - row_start) * width, out);
      break;
    case PREDICTOR_TRANSFORM:
      PredictorInverseTransform_C(transform, row_start, row_end, in, out);
      if (row_end != transform->ysize_) {
        // The last predicted row in this iteration will be the top-pred row
        // for the first row in next iteration.
        memcpy(out - width, out + (row_end - row_start - 1) * width,
               width * sizeof(*out));
      }
      break;
    case CROSS_COLOR_TRANSFORM:
      ColorSpaceInverseTransform_C(transform, row_start, row_end, in, out);
      break;
    case COLOR_INDEXING_TRANSFORM:
      if (in == out && transform->bits_ > 0) {
        // Move packed pixels to the end of unpacked region, so that unpacking
        // can occur seamlessly.
        // Also, note that this is the only transform that applies on
        // the effective width of VP8LSubSampleSize(xsize_, bits_). All other
        // transforms work on effective width of xsize_.
        const int out_stride = (row_end - row_start) * width;
        const int in_stride = (row_end - row_start) *
            VP8LSubSampleSize(transform->xsize_, transform->bits_);
        uint32_t* const src = out + out_stride - in_stride;
        memmove(src, out, in_stride * sizeof(*src));
        ColorIndexInverseTransform_C(transform, row_start, row_end, src, out);
      } else {
        ColorIndexInverseTransform_C(transform, row_start, row_end, in, out);
      }
      break;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %edx, %eax
subl %esi, %eax
jle 0xdb691
movl %edx, %ebp
movq %rdi, %r11
cmpl %edx, 0xc(%rdi)
jl 0xdb6b0
movq %rcx, %r12
movl (%r11), %ecx
cmpq $0x3, %rcx
ja 0xdb657
movq %r8, %rbx
movl %esi, %r15d
movslq 0x8(%r11), %r14
leaq 0x516fa(%rip), %rdx     # 0x12c988
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
movl %ebp, 0x24(%rsp)
jmpq *%rcx
testl %r15d, %r15d
movl %r15d, 0xc(%rsp)
movq %rbx, 0x60(%rsp)
je 0xdb496
movq %rbx, %r8
jmp 0xdb4f5
movq 0xa115b(%rip), %rcx     # 0x17c418
imull %eax, %r14d
movq %r12, %rdi
movl %r14d, %esi
movq %rbx, %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rcx
cmpq %rbx, %r12
je 0xdb433
movq %r11, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r12, %rcx
jmp 0xdb480
movb 0x4(%r11), %cl
movl $0x1, %r13d
shll %cl, %r13d
leal -0x1(%r13), %eax
movl %eax, 0x30(%rsp)
movl %r13d, %edx
negl %edx
andl %r14d, %edx
leal (%r14,%r13), %esi
decl %esi
shrl %cl, %esi
movl %r15d, %eax
sarl %cl, %eax
movq %r14, 0x48(%rsp)
movl %r14d, %ecx
subl %edx, %ecx
movl %esi, 0x8(%rsp)
imull %esi, %eax
cltq
shlq $0x2, %rax
addq 0x10(%r11), %rax
movl %edx, 0x10(%rsp)
movslq %edx, %rdx
movq %rdx, 0x28(%rsp)
movslq %r13d, %rbp
movslq %ecx, %rcx
movq %rcx, 0x40(%rsp)
shlq $0x2, %rbp
movl %r15d, 0xc(%rsp)
movb $0x0, 0x6(%rsp)
movw $0x0, 0x4(%rsp)
cmpl $0x0, 0x10(%rsp)
movq %r12, 0x38(%rsp)
movq %rax, 0x18(%rsp)
jle 0xdb3b8
movq 0x28(%rsp), %rcx
leaq (%r12,%rcx,4), %r14
movq %rax, %r15
movl (%r15), %eax
addq $0x4, %r15
movb %al, 0x4(%rsp)
movb %ah, 0x5(%rsp)
shrl $0x10, %eax
movb %al, 0x6(%rsp)
leaq 0x4(%rsp), %rdi
movq %r12, %rsi
movl %r13d, %edx
movq %rbx, %rcx
callq *0xa1225(%rip)          # 0x17c5d0
addq %rbp, %r12
addq %rbp, %rbx
cmpq %r14, %r12
jb 0xdb381
jmp 0xdb3bb
movq %rax, %r15
movq 0x48(%rsp), %rax
movq 0x38(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
cmpq %rax, %r12
jae 0xdb401
movl (%r15), %eax
movb %al, 0x4(%rsp)
movb %ah, 0x5(%rsp)
shrl $0x10, %eax
movb %al, 0x6(%rsp)
leaq 0x4(%rsp), %rdi
movq %r12, %rsi
movq 0x40(%rsp), %r14
movl %r14d, %edx
movq %rbx, %rcx
callq *0xa11d7(%rip)          # 0x17c5d0
leaq (%r12,%r14,4), %r12
leaq (%rbx,%r14,4), %rbx
movl 0xc(%rsp), %r15d
incl %r15d
testl %r15d, 0x30(%rsp)
movl $0x0, %eax
cmovel 0x8(%rsp), %eax
cltq
movq 0x18(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
cmpl 0x24(%rsp), %r15d
jne 0xdb353
jmp 0xdb657
movl 0x4(%r11), %ecx
testl %ecx, %ecx
jle 0xdb2e3
movl $0x1, %edx
shll %cl, %edx
addl %r14d, %edx
decl %edx
shrl %cl, %edx
movl %r14d, %ecx
imull %eax, %ecx
imull %eax, %edx
movslq %ecx, %rax
leaq (%rbx,%rax,4), %r14
movslq %edx, %rdx
shlq $0x2, %rdx
subq %rdx, %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r11, %r12
callq 0x556d0
movq %r12, %rdi
movl %r15d, %esi
movl %ebp, %edx
movq %r14, %rcx
movq %rbx, %r8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xdb6cf
movl $0xff000000, %eax       # imm = 0xFF000000
addl (%r12), %eax
movl %eax, (%rbx)
cmpl $0x2, %r14d
jl 0xdb4e7
leal -0x1(%r14), %ecx
xorl %edx, %edx
movl $0xff00ff00, %esi       # imm = 0xFF00FF00
movl $0xff00ff, %edi         # imm = 0xFF00FF
movl 0x4(%r12,%rdx,4), %r8d
movl %r8d, %r9d
andl %esi, %r9d
movl %eax, %r10d
andl %esi, %r10d
addl %r9d, %r10d
andl %edi, %r8d
andl %edi, %eax
addl %r8d, %eax
andl %esi, %r10d
andl %edi, %eax
orl %r10d, %eax
movl %eax, 0x4(%rbx,%rdx,4)
incq %rdx
cmpq %rdx, %rcx
jne 0xdb4b7
leaq (%r12,%r14,4), %r12
leaq (%rbx,%r14,4), %r8
movl $0x1, %r15d
movq %r11, 0x58(%rsp)
movl 0x4(%r11), %ecx
movl $0x1, %eax
shll %cl, %eax
movq %rax, 0x18(%rsp)
addl %r14d, %eax
decl %eax
shrl %cl, %eax
movl %eax, 0x28(%rsp)
cmpl %ebp, %r15d
jge 0xdb644
movl %r15d, %eax
sarl %cl, %eax
movq 0x18(%rsp), %rcx
leal -0x1(%rcx), %esi
movl %esi, 0x40(%rsp)
imull 0x28(%rsp), %eax
movslq %eax, %rsi
shlq $0x2, %rsi
movq 0x58(%rsp), %rax
addq 0x10(%rax), %rsi
movq %rsi, 0x10(%rsp)
movq %r14, %rax
negq %rax
negl %ecx
movl %ecx, 0x54(%rsp)
movq %r14, 0x48(%rsp)
movq %rax, 0x30(%rsp)
movq %r8, 0x38(%rsp)
movl %r15d, 0x8(%rsp)
leaq (%r8,%rax,4), %rsi
movq %r12, %rdi
movl $0x1, %edx
movq %r8, %rcx
callq 0xdbeca
cmpl $0x2, %r14d
movq %r14, %rdi
movq %r12, %r13
movq 0x18(%rsp), %rcx
movl 0x54(%rsp), %r15d
leaq 0xa0eb8(%rip), %rbx     # 0x17c450
jl 0xdb5f4
movl $0x1, %ebp
movq 0x10(%rsp), %r12
movl (%r12), %eax
addq $0x4, %r12
shrl $0x5, %eax
andl $0x78, %eax
movslq %ebp, %r8
andl %r15d, %ebp
addl %ecx, %ebp
cmpl %edi, %ebp
movl %edi, %r14d
cmovll %ebp, %r14d
leaq (%r13,%r8,4), %rdi
movq 0x38(%rsp), %rcx
leaq (%rcx,%r8,4), %rcx
movq 0x30(%rsp), %rdx
leaq (%rcx,%rdx,4), %rsi
movl %r14d, %edx
subl %r8d, %edx
callq *(%rax,%rbx)
movq 0x48(%rsp), %rdi
movq 0x18(%rsp), %rcx
cmpl %edi, %ebp
movl %r14d, %ebp
jl 0xdb5a4
leaq (,%rdi,4), %r12
addq %r13, %r12
movl 0x8(%rsp), %r15d
incl %r15d
testl %r15d, 0x40(%rsp)
movl $0x0, %eax
cmovel 0x28(%rsp), %eax
movq 0x38(%rsp), %r8
leaq (%r8,%rdi,4), %r8
cltq
movq 0x10(%rsp), %rcx
leaq (%rcx,%rax,4), %rcx
movq %rcx, 0x10(%rsp)
movl 0x24(%rsp), %ebp
cmpl %ebp, %r15d
movq %rdi, %r14
movq 0x30(%rsp), %rax
jne 0xdb55f
movq 0x58(%rsp), %rax
cmpl %ebp, 0xc(%rax)
movl 0xc(%rsp), %eax
movq 0x60(%rsp), %rdi
jne 0xdb666
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdx
shlq $0x2, %rdx
notl %eax
addl %ebp, %eax
imull %r14d, %eax
cltq
leaq (%rdi,%rax,4), %rsi
subq %rdx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x552d0
leaq 0x5132c(%rip), %rdi     # 0x12c9c4
leaq 0x51339(%rip), %rsi     # 0x12c9d8
leaq 0x51345(%rip), %rcx     # 0x12c9eb
movl $0x18b, %edx            # imm = 0x18B
callq 0x55710
leaq 0x5139c(%rip), %rdi     # 0x12ca53
leaq 0x5131a(%rip), %rsi     # 0x12c9d8
leaq 0x51326(%rip), %rcx     # 0x12c9eb
movl $0x18c, %edx            # imm = 0x18C
callq 0x55710