// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: ExtractPalettedAlphaRows
static void ExtractPalettedAlphaRows(VP8LDecoder* const dec, int last_row) {
  // For vertical and gradient filtering, we need to decode the part above the
  // crop_top row, in order to have the correct spatial predictors.
  ALPHDecoder* const alph_dec = (ALPHDecoder*)dec->io_->opaque;
  const int top_row =
      (alph_dec->filter_ == WEBP_FILTER_NONE ||
       alph_dec->filter_ == WEBP_FILTER_HORIZONTAL) ? dec->io_->crop_top
                                                    : dec->last_row_;
  const int first_row = (dec->last_row_ < top_row) ? top_row : dec->last_row_;
  assert(last_row <= dec->io_->crop_bottom);
  if (last_row > first_row) {
    // Special method for paletted alpha data. We only process the cropped area.
    const int width = dec->io_->width;
    uint8_t* out = alph_dec->output_ + width * first_row;
    const uint8_t* const in =
      (uint8_t*)dec->pixels_ + dec->width_ * first_row;
    VP8LTransform* const transform = &dec->transforms_[0];
    assert(dec->next_transform_ == 1);
    assert(transform->type_ == COLOR_INDEXING_TRANSFORM);
    VP8LColorIndexInverseTransformAlpha(transform, first_row, last_row,
                                        in, out);
    AlphaApplyFilter(alph_dec, first_row, last_row, out, width);
  }
  dec->last_row_ = dec->last_out_row_ = last_row;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq 0x38(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x0, 0xc(%rax)
je 0x147d33
movq -0x18(%rbp), %rax
cmpl $0x1, 0xc(%rax)
jne 0x147d46
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl 0x80(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x147d53
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x44(%rbp)
movl -0x44(%rbp), %eax
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %eax
cmpl -0x1c(%rbp), %eax
jge 0x147d70
movl -0x1c(%rbp), %eax
movl %eax, -0x48(%rbp)
jmp 0x147d7d
movq -0x8(%rbp), %rax
movl 0x8c(%rax), %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
cmpl 0x84(%rcx), %eax
jg 0x147d98
jmp 0x147db7
leaq 0x75ca8(%rip), %rdi     # 0x1bda47
leaq 0x75743(%rip), %rsi     # 0x1bd4e9
movl $0x380, %edx            # imm = 0x380
leaq 0x75cb7(%rip), %rcx     # 0x1bda69
callq 0x598a0
movl -0xc(%rbp), %eax
cmpl -0x20(%rbp), %eax
jle 0x147ea0
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0xc8(%rax), %rax
movl -0x24(%rbp), %ecx
imull -0x20(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x8(%rbp), %rcx
movl 0x84(%rcx), %ecx
imull -0x20(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
addq $0x118, %rax            # imm = 0x118
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x1, 0x110(%rax)
jne 0x147e29
jmp 0x147e48
leaq 0x75c70(%rip), %rdi     # 0x1bdaa0
leaq 0x756b2(%rip), %rsi     # 0x1bd4e9
movl $0x388, %edx            # imm = 0x388
leaq 0x75c26(%rip), %rcx     # 0x1bda69
callq 0x598a0
movq -0x40(%rbp), %rax
cmpl $0x3, (%rax)
jne 0x147e53
jmp 0x147e72
leaq 0x75c60(%rip), %rdi     # 0x1bdaba
leaq 0x75688(%rip), %rsi     # 0x1bd4e9
movl $0x389, %edx            # imm = 0x389
leaq 0x75bfc(%rip), %rcx     # 0x1bda69
callq 0x598a0
movq -0x40(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0xc(%rbp), %edx
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %r8
callq 0x14e840
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %esi
movl -0xc(%rbp), %edx
movq -0x30(%rbp), %rcx
movl -0x24(%rbp), %r8d
callq 0x1481d0
movl -0xc(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x94(%rax)
movq -0x8(%rbp), %rax
movl %ecx, 0x8c(%rax)
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)