// File: /workspace/github_c_makefile_star2_O0/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8l_dec.c
// Function: VP8LDecodeImage
int VP8LDecodeImage(VP8LDecoder* const dec) {
  VP8Io* io = NULL;
  WebPDecParams* params = NULL;

  if (dec == NULL) return 0;

  assert(dec->hdr_.huffman_tables_.root.start != NULL);
  assert(dec->hdr_.htree_groups_ != NULL);
  assert(dec->hdr_.num_htree_groups_ > 0);

  io = dec->io_;
  assert(io != NULL);
  params = (WebPDecParams*)io->opaque;
  assert(params != NULL);

  // Initialization.
  if (dec->state_ != READ_DATA) {
    dec->output_ = params->output;
    assert(dec->output_ != NULL);

    if (!WebPIoInitFromOptions(params->options, io, MODE_BGRA)) {
      VP8LSetError(dec, VP8_STATUS_INVALID_PARAM);
      goto Err;
    }

    if (!AllocateInternalBuffers32b(dec, io->width)) goto Err;

#if !defined(WEBP_REDUCE_SIZE)
    if (io->use_scaling && !AllocateAndInitRescaler(dec, io)) goto Err;
#else
    if (io->use_scaling) {
      VP8LSetError(dec, VP8_STATUS_INVALID_PARAM);
      goto Err;
    }
#endif
    if (io->use_scaling || WebPIsPremultipliedMode(dec->output_->colorspace)) {
      // need the alpha-multiply functions for premultiplied output or rescaling
      WebPInitAlphaProcessing();
    }

    if (!WebPIsRGBMode(dec->output_->colorspace)) {
      WebPInitConvertARGBToYUV();
      if (dec->output_->u.YUVA.a != NULL) WebPInitAlphaProcessing();
    }
    if (dec->incremental_) {
      if (dec->hdr_.color_cache_size_ > 0 &&
          dec->hdr_.saved_color_cache_.colors_ == NULL) {
        if (!VP8LColorCacheInit(&dec->hdr_.saved_color_cache_,
                                dec->hdr_.color_cache_.hash_bits_)) {
          VP8LSetError(dec, VP8_STATUS_OUT_OF_MEMORY);
          goto Err;
        }
      }
    }
    dec->state_ = READ_DATA;
  }

  // Decode.
  if (!DecodeImageData(dec, dec->pixels_, dec->width_, dec->height_,
                       io->crop_bottom, ProcessRows)) {
    goto Err;
  }

  params->last_y = dec->last_out_row_;
  return 1;

 Err:
  VP8LClear(dec);
  assert(dec->status_ != VP8_STATUS_OK);
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq $0x0, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x1468af
movl $0x0, -0x4(%rbp)
jmp 0x146ba5
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe8(%rax)
je 0x1468bf
jmp 0x1468de
leaq 0x76d28(%rip), %rdi     # 0x1bd5ee
leaq 0x76c1c(%rip), %rsi     # 0x1bd4e9
movl $0x6b0, %edx            # imm = 0x6B0
leaq 0x76d42(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x10(%rbp), %rax
cmpq $0x0, 0xe0(%rax)
je 0x1468ee
jmp 0x14690d
leaq 0x76d4e(%rip), %rdi     # 0x1bd643
leaq 0x76bed(%rip), %rsi     # 0x1bd4e9
movl $0x6b1, %edx            # imm = 0x6B1
leaq 0x76d13(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x10(%rbp), %rax
cmpl $0x0, 0xd8(%rax)
jle 0x14691c
jmp 0x14693b
leaq 0x76d40(%rip), %rdi     # 0x1bd663
leaq 0x76bbf(%rip), %rsi     # 0x1bd4e9
movl $0x6b2, %edx            # imm = 0x6B2
leaq 0x76ce5(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x146950
jmp 0x14696f
leaq 0x7b2ad(%rip), %rdi     # 0x1c1c04
leaq 0x76b8b(%rip), %rsi     # 0x1bd4e9
movl $0x6b5, %edx            # imm = 0x6B5
leaq 0x76cb1(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x18(%rbp), %rax
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0x146984
jmp 0x1469a3
leaq 0x75ce2(%rip), %rdi     # 0x1bc66d
leaq 0x76b57(%rip), %rsi     # 0x1bd4e9
movl $0x6b7, %edx            # imm = 0x6B7
leaq 0x76c7d(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4(%rax)
je 0x146b13
movq -0x20(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x1469cd
jmp 0x1469ec
leaq 0x76caf(%rip), %rdi     # 0x1bd683
leaq 0x76b0e(%rip), %rsi     # 0x1bd4e9
movl $0x6bc, %edx            # imm = 0x6BC
leaq 0x76c34(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x18(%rbp), %rsi
movl $0x3, %edx
callq 0x13c8c0
cmpl $0x0, %eax
jne 0x146a1a
movq -0x10(%rbp), %rdi
movl $0x2, %esi
callq 0x144bc0
jmp 0x146b6b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movl (%rax), %esi
callq 0x145740
cmpl $0x0, %eax
jne 0x146a33
jmp 0x146b6b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x88(%rax)
je 0x146a57
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x146bb0
cmpl $0x0, %eax
jne 0x146a57
jmp 0x146b6b
movq -0x18(%rbp), %rax
cmpl $0x0, 0x88(%rax)
jne 0x146a78
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %edi
callq 0x146d30
cmpl $0x0, %eax
je 0x146a7d
callq 0x1493b0
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movl (%rax), %edi
callq 0x146d70
cmpl $0x0, %eax
jne 0x146aac
callq 0x153f50
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x146aaa
callq 0x1493b0
jmp 0x146aac
movq -0x10(%rbp), %rax
cmpl $0x0, 0x50(%rax)
je 0x146b08
movq -0x10(%rbp), %rax
cmpl $0x0, 0x98(%rax)
jle 0x146b06
movq -0x10(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
jne 0x146b06
movq -0x10(%rbp), %rdi
addq $0x98, %rdi
addq $0x18, %rdi
movq -0x10(%rbp), %rax
movl 0xac(%rax), %esi
callq 0x1825e0
cmpl $0x0, %eax
jne 0x146b04
movq -0x10(%rbp), %rdi
movl $0x1, %esi
callq 0x144bc0
jmp 0x146b6b
jmp 0x146b06
jmp 0x146b08
movq -0x10(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x84(%rax), %edx
movq -0x10(%rbp), %rax
movl 0x88(%rax), %ecx
movq -0x18(%rbp), %rax
movl 0x84(%rax), %r8d
leaq 0x24b(%rip), %r9        # 0x146d90
callq 0x145d80
cmpl $0x0, %eax
jne 0x146b51
jmp 0x146b6b
movq -0x10(%rbp), %rax
movl 0x94(%rax), %ecx
movq -0x20(%rbp), %rax
movl %ecx, 0x20(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x146ba5
movq -0x10(%rbp), %rdi
callq 0x144fa0
movq -0x10(%rbp), %rax
cmpl $0x0, (%rax)
je 0x146b7f
jmp 0x146b9e
leaq 0x76a13(%rip), %rdi     # 0x1bd599
leaq 0x7695c(%rip), %rsi     # 0x1bd4e9
movl $0x6ee, %edx            # imm = 0x6EE
leaq 0x76a82(%rip), %rcx     # 0x1bd61b
callq 0x598a0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nop