// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/alpha_dec.c
// Function: ALPHDecode
WEBP_NODISCARD static int ALPHDecode(VP8Decoder* const dec, int row,
                                     int num_rows) {
  ALPHDecoder* const alph_dec = dec->alph_dec_;
  const int width = alph_dec->width_;
  const int height = alph_dec->io_.crop_bottom;
  if (alph_dec->method_ == ALPHA_NO_COMPRESSION) {
    int y;
    const uint8_t* prev_line = dec->alpha_prev_line_;
    const uint8_t* deltas = dec->alpha_data_ + ALPHA_HEADER_LEN + row * width;
    uint8_t* dst = dec->alpha_plane_ + row * width;
    assert(deltas <= &dec->alpha_data_[dec->alpha_data_size_]);
    assert(WebPUnfilters[alph_dec->filter_] != NULL);
    for (y = 0; y < num_rows; ++y) {
      WebPUnfilters[alph_dec->filter_](prev_line, deltas, dst, width);
      prev_line = dst;
      dst += width;
      deltas += width;
    }
    dec->alpha_prev_line_ = prev_line;
  } else {  // alph_dec->method_ == ALPHA_LOSSLESS_COMPRESSION
    assert(alph_dec->vp8l_dec_ != NULL);
    if (!VP8LDecodeAlphaImageStream(alph_dec, row + num_rows)) {
      return 0;
    }
  }

  if (row + num_rows >= height) {
    dec->is_alpha_decoded_ = 1;
  }
  return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0xb90(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x20(%rbp), %rax
movl 0xa4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x185042
movq -0x10(%rbp), %rax
movq 0xbc0(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq 0xb98(%rax), %rax
addq $0x1, %rax
movl -0x14(%rbp), %ecx
imull -0x24(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x10(%rbp), %rax
movq 0xbb8(%rax), %rax
movl -0x14(%rbp), %ecx
imull -0x24(%rbp), %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
movq 0xb98(%rcx), %rcx
movq -0x10(%rbp), %rdx
addq 0xba0(%rdx), %rcx
cmpq %rcx, %rax
ja 0x184f71
jmp 0x184f90
leaq 0x3ce5f(%rip), %rdi     # 0x1c1dd7
leaq 0x3cc30(%rip), %rsi     # 0x1c1baf
movl $0x7c, %edx
leaq 0x3ce7f(%rip), %rcx     # 0x1c1e0a
callq 0x598a0
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
leaq 0x940a0(%rip), %rax     # 0x219040
cmpq $0x0, (%rax,%rcx,8)
je 0x184fa9
jmp 0x184fc8
leaq 0x38b37(%rip), %rdi     # 0x1bdae7
leaq 0x3cbf8(%rip), %rsi     # 0x1c1baf
movl $0x7d, %edx
leaq 0x3ce47(%rip), %rcx     # 0x1c1e0a
callq 0x598a0
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x185031
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, %ecx
leaq 0x94059(%rip), %rax     # 0x219040
movq (%rax,%rcx,8), %rax
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
movl -0x24(%rbp), %ecx
callq *%rax
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x24(%rbp), %ecx
movq -0x48(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %ecx
movq -0x40(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x184fcf
movq -0x38(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0xbc0(%rax)
jmp 0x18508d
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x18504f
jmp 0x18506e
leaq 0x3cde0(%rip), %rdi     # 0x1c1e36
leaq 0x3cb52(%rip), %rsi     # 0x1c1baf
movl $0x86, %edx
leaq 0x3cda1(%rip), %rcx     # 0x1c1e0a
callq 0x598a0
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
addl -0x18(%rbp), %esi
callq 0x145840
cmpl $0x0, %eax
jne 0x18508b
movl $0x0, -0x4(%rbp)
jmp 0x1850ad
jmp 0x18508d
movl -0x14(%rbp), %eax
addl -0x18(%rbp), %eax
cmpl -0x28(%rbp), %eax
jl 0x1850a6
movq -0x10(%rbp), %rax
movl $0x1, 0xba8(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)