// File: /workspace/github_c_makefile_star2_O2/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 %esi, %ebp
movl %edx, %esi
subl %ebp, %esi
jle 0xd20bf
movl %edx, %r9d
movq %rdi, %r15
movq %r8, 0x10(%rsp)
cmpl %edx, 0xc(%rdi)
jl 0xd20de
movl (%r15), %eax
cmpq $0x3, %rax
ja 0xd207b
movq %rcx, %r14
movslq 0x8(%r15), %r10
leaq 0x49bde(%rip), %rcx     # 0x11b8b8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movl %r9d, 0x1c(%rsp)
movq %r10, 0x30(%rsp)
jmpq *%rax
testl %ebp, %ebp
movl %ebp, 0x2c(%rsp)
je 0xd1f1c
movq 0x30(%rsp), %r13
leal -0x1(%r13), %r12d
movq 0x10(%rsp), %rax
movq %rax, 0x20(%rsp)
movl %ebp, %edx
jmp 0xd1f5e
movq 0x9f8be(%rip), %rax     # 0x1715d8
imull %r10d, %esi
movq %r14, %rdi
movq 0x10(%rsp), %rdx
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq %r14, %rax
movq 0x10(%rsp), %r14
cmpq %r14, %rax
je 0xd1eb5
movq %r15, %rdi
movl %ebp, %esi
movl %r9d, %edx
movq %rax, %rcx
jmp 0xd1f06
movb 0x4(%r15), %cl
pushq $0x1
popq %rsi
shll %cl, %esi
leal -0x1(%rsi), %eax
movl %eax, 0x48(%rsp)
movl %esi, %eax
negl %eax
leal (%rsi,%r10), %edi
decl %edi
shrl %cl, %edi
andl %r10d, %eax
movl %r10d, %r8d
movl %ebp, %edx
sarl %cl, %edx
movl %edi, 0x28(%rsp)
imull %edi, %edx
movslq %edx, %rcx
shlq $0x2, %rcx
addq 0x10(%r15), %rcx
subl %eax, %r8d
movl %r8d, 0x38(%rsp)
cltq
movq %rsi, 0x20(%rsp)
movslq %esi, %r12
shlq $0x2, %r12
leaq (,%r10,4), %rdx
movq %rax, 0x40(%rsp)
leaq (,%rax,4), %rax
subq %rax, %rdx
movq %rdx, 0x60(%rsp)
movq %rcx, %rax
leaq 0xc(%rsp), %r13
cmpl %r9d, %ebp
jge 0xd207b
movl %ebp, 0x2c(%rsp)
andw $0x0, 0xc(%rsp)
movb $0x0, 0xe(%rsp)
movq 0x40(%rsp), %rcx
leaq (%r14,%rcx,4), %rbx
movq %r14, 0x58(%rsp)
movq %r14, %r15
movq %rax, 0x50(%rsp)
movq %rax, %r14
cmpq %rbx, %r15
jae 0xd1e3c
movl (%r14), %eax
addq $0x4, %r14
movb %al, 0xc(%rsp)
movb %ah, 0xd(%rsp)
shrl $0x10, %eax
movb %al, 0xe(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
movq 0x10(%rsp), %rbp
movq %rbp, %rcx
callq *0x9f961(%rip)          # 0x171790
addq %r12, %rbp
movq %rbp, 0x10(%rsp)
addq %r12, %r15
jmp 0xd1dfb
movq 0x58(%rsp), %rax
movq 0x30(%rsp), %rcx
leaq (%rax,%rcx,4), %rax
cmpq %rax, %r15
movl 0x2c(%rsp), %ebp
jae 0xd1e8d
movl (%r14), %eax
movb %al, 0xc(%rsp)
movb %ah, 0xd(%rsp)
shrl $0x10, %eax
movb %al, 0xe(%rsp)
movq %r13, %rdi
movq %r15, %rsi
movl 0x38(%rsp), %edx
movq 0x10(%rsp), %rbx
movq %rbx, %rcx
callq *0x9f913(%rip)          # 0x171790
movq 0x60(%rsp), %rax
addq %rax, %r15
addq %rax, %rbx
movq %rbx, 0x10(%rsp)
movl 0x1c(%rsp), %r9d
incl %ebp
testl %ebp, 0x48(%rsp)
movl $0x0, %eax
cmovel 0x28(%rsp), %eax
cltq
movq 0x50(%rsp), %rcx
leaq (%rcx,%rax,4), %rax
movq %r15, %r14
jmp 0xd1dca
movl 0x4(%r15), %ecx
testl %ecx, %ecx
jle 0xd1d47
pushq $0x1
popq %rax
shll %cl, %eax
movq 0x30(%rsp), %rdx
addl %edx, %eax
decl %eax
shrl %cl, %eax
movl %edx, %ecx
imull %esi, %ecx
imull %esi, %eax
movslq %ecx, %rcx
leaq (%r14,%rcx,4), %rbx
movslq %eax, %rdx
shlq $0x2, %rdx
subq %rdx, %rbx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %r12
movl %r9d, %r15d
callq 0x56720
movq %r12, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %rbx, %rcx
movq %r14, %r8
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xd20fd
pushq $0x1
popq %rbp
movq %r14, %rdi
movl %ebp, %edx
movq 0x10(%rsp), %rbx
movq %rbx, %rcx
callq 0xd2890
leaq 0x4(%r14), %rdi
movq 0x30(%rsp), %r13
leal -0x1(%r13), %r12d
leaq 0x4(%rbx), %rcx
movl %r12d, %edx
callq 0xd28b2
movl %ebp, %edx
movl 0x1c(%rsp), %r9d
leaq (%r14,%r13,4), %r14
leaq (%rbx,%r13,4), %rax
movq %rax, 0x20(%rsp)
movb 0x4(%r15), %cl
pushq $0x1
popq %rax
movl %eax, %esi
shll %cl, %esi
addl %esi, %r12d
shrl %cl, %r12d
movl %edx, %eax
sarl %cl, %eax
leal -0x1(%rsi), %ecx
movl %ecx, 0x40(%rsp)
imull %r12d, %eax
cltq
shlq $0x2, %rax
movq %r15, 0x38(%rsp)
addq 0x10(%r15), %rax
movq %rax, %r15
movq %r13, %rbp
negq %rbp
movq %rsi, 0x58(%rsp)
movl %esi, %r13d
negl %r13d
movl %r12d, 0x28(%rsp)
cmpl %r9d, %edx
jge 0xd206c
movl %edx, 0x50(%rsp)
movq 0x20(%rsp), %rcx
leaq (%rcx,%rbp,4), %rsi
movq %r14, %rbx
movq %r14, %rdi
pushq $0x1
popq %r12
movl %r12d, %edx
callq 0xd28f4
movq %r15, 0x48(%rsp)
movq %r15, %r14
movl %r12d, %eax
movq 0x30(%rsp), %r15
cmpl %r15d, %eax
jge 0xd202d
movl (%r14), %r8d
addq $0x4, %r14
shrl $0x5, %r8d
andl $0x78, %r8d
movl %eax, %r12d
andl %r13d, %r12d
addl 0x58(%rsp), %r12d
cmpl %r15d, %r12d
cmovgel %r15d, %r12d
movslq %eax, %rcx
leaq (%rbx,%rcx,4), %rdi
movq 0x20(%rsp), %rdx
leaq (%rdx,%rcx,4), %rcx
leaq (%rcx,%rbp,4), %rsi
movl %r12d, %edx
subl %eax, %edx
leaq 0x9f5ec(%rip), %rax     # 0x171610
callq *(%r8,%rax)
movl %r12d, %eax
jmp 0xd1fde
leaq (%rbx,%r15,4), %r14
movq 0x20(%rsp), %rax
leaq (%rax,%r15,4), %rax
movq %rax, 0x20(%rsp)
movl 0x50(%rsp), %edx
incl %edx
testl %edx, 0x40(%rsp)
movl $0x0, %eax
movl 0x28(%rsp), %r12d
cmovel %r12d, %eax
cltq
movq 0x48(%rsp), %r15
leaq (%r15,%rax,4), %r15
movl 0x1c(%rsp), %r9d
jmp 0xd1fa6
movq 0x38(%rsp), %rax
cmpl %r9d, 0xc(%rax)
movl 0x2c(%rsp), %eax
jne 0xd208a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%rsp), %rcx
movq %rcx, %rdx
shlq $0x2, %rdx
notl %eax
addl %r9d, %eax
imull %ecx, %eax
cltq
movq 0x10(%rsp), %rdi
leaq (%rdi,%rax,4), %rsi
subq %rdx, %rdi
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x562f0
leaq 0x4982e(%rip), %rdi     # 0x11b8f4
leaq 0x4983b(%rip), %rsi     # 0x11b908
leaq 0x49847(%rip), %rcx     # 0x11b91b
movl $0x18b, %edx            # imm = 0x18B
callq 0x56770
leaq 0x4989e(%rip), %rdi     # 0x11b983
leaq 0x4981c(%rip), %rsi     # 0x11b908
leaq 0x49828(%rip), %rcx     # 0x11b91b
movl $0x18c, %edx            # imm = 0x18C
callq 0x56770