// File: /workspace/github_c_makefile_star2_O3/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8Decode
int VP8Decode(VP8Decoder* const dec, VP8Io* const io) {
  int ok = 0;
  if (dec == NULL) {
    return 0;
  }
  if (io == NULL) {
    return VP8SetError(dec, VP8_STATUS_INVALID_PARAM,
                       "NULL VP8Io parameter in VP8Decode().");
  }

  if (!dec->ready_) {
    if (!VP8GetHeaders(dec, io)) {
      return 0;
    }
  }
  assert(dec->ready_);

  // Finish setting up the decoding parameter. Will call io->setup().
  ok = (VP8EnterCritical(dec, io) == VP8_STATUS_OK);
  if (ok) {   // good to go.
    // Will allocate memory and prepare everything.
    if (ok) ok = VP8InitFrame(dec, io);

    // Main decoding loop
    if (ok) ok = ParseFrame(dec, io);

    // Exit.
    ok &= VP8ExitCritical(dec, io);
  }

  if (!ok) {
    VP8Clear(dec);
    return 0;
  }

  dec->ready_ = 0;
  return ok;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %ebx, %ebx
testq %rdi, %rdi
je 0xd2647
movq %rsi, %r15
movq %rdi, %r14
testq %rsi, %rsi
je 0xd24d7
cmpl $0x0, 0x4(%r14)
jne 0xd24bb
movq %r14, %rdi
movq %r15, %rsi
callq 0xd19bc
testl %eax, %eax
je 0xd2647
cmpl $0x0, 0x4(%r14)
je 0xd2688
movq %r14, %rdi
movq %r15, %rsi
callq 0xcfbcd
testl %eax, %eax
je 0xd24f8
movq %r14, %rdi
callq 0xd188a
jmp 0xd2647
cmpl $0x0, (%r14)
jne 0xd2647
movq $0x2, (%r14)
leaq 0x57171(%rip), %rax     # 0x129660
movq %rax, 0x8(%r14)
jmp 0xd2647
movq %r14, %rdi
movq %r15, %rsi
callq 0xcfe65
xorl %ebp, %ebp
testl %eax, %eax
je 0xd2627
movl $0x0, 0xb5c(%r14)
cmpl $0x0, 0x1ac(%r14)
jle 0xd25e9
leaq 0x1b8(%r14), %rax
movq %rax, (%rsp)
leaq 0x10(%r14), %r12
xorl %r13d, %r13d
andl 0x1b0(%r14), %r13d
movq %r12, %rdi
movq %r14, %rsi
callq 0xf1ce2
testl %eax, %eax
je 0xd2658
movl 0xb58(%r14), %eax
cmpl 0x198(%r14), %eax
jge 0xd259b
leaq (%r13,%r13,2), %r13
shlq $0x4, %r13
addq (%rsp), %r13
movq %r14, %rdi
movq %r13, %rsi
callq 0xd1ff9
testl %eax, %eax
je 0xd260d
movl 0xb58(%r14), %eax
incl %eax
movl %eax, 0xb58(%r14)
cmpl 0x198(%r14), %eax
jl 0xd256f
movq 0xb10(%r14), %rax
movw $0x0, -0x2(%rax)
xorl %eax, %eax
movl %eax, 0xb00(%r14)
movl %eax, 0xb58(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xced7e
testl %eax, %eax
je 0xd2670
movl 0xb5c(%r14), %r13d
incl %r13d
movl %r13d, 0xb5c(%r14)
cmpl 0x1ac(%r14), %r13d
jl 0xd2538
cmpl $0x0, 0xc8(%r14)
jle 0xd2606
callq 0x56690
leaq 0x98(%r14), %rdi
callq *0x10(%rax)
testl %eax, %eax
je 0xd2627
movl $0x1, %ebp
jmp 0xd2627
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xd2627
movq $0x7, (%r14)
leaq 0x57183(%rip), %rax     # 0x1297a6
movq %rax, 0x8(%r14)
movq %r14, %rdi
movq %r15, %rsi
callq 0xcfde9
testl %ebp, %eax
je 0xd24ca
movl $0x0, 0x4(%r14)
movl $0x1, %ebx
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xd2627
movq $0x7, (%r14)
leaq 0x5710f(%rip), %rax     # 0x12977d
jmp 0xd2623
xorl %ebp, %ebp
cmpl $0x0, (%r14)
jne 0xd2627
movq $0x6, (%r14)
leaq 0x57143(%rip), %rax     # 0x1297c9
jmp 0xd2623
leaq 0x56ff6(%rip), %rdi     # 0x129685
leaq 0x56e67(%rip), %rsi     # 0x1294fd
leaq 0x56ff4(%rip), %rcx     # 0x129691
movl $0x2b3, %edx            # imm = 0x2B3
callq 0x55710