// File: /workspace/github_c_makefile_star2_O2/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: VP8DecodeMB
int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br) {
  VP8MB* const left = dec->mb_info_ - 1;
  VP8MB* const mb = dec->mb_info_ + dec->mb_x_;
  VP8MBData* const block = dec->mb_data_ + dec->mb_x_;
  int skip = dec->use_skip_proba_ ? block->skip_ : 0;

  if (!skip) {
    skip = ParseResiduals(dec, mb, token_br);
  } else {
    left->nz_ = mb->nz_ = 0;
    if (!block->is_i4x4_) {
      left->nz_dc_ = mb->nz_dc_ = 0;
    }
    block->non_zero_y_ = 0;
    block->non_zero_uv_ = 0;
    block->dither_ = 0;
  }

  if (dec->filter_type_ > 0) {  // store filter info
    VP8FInfo* const finfo = dec->f_info_ + dec->mb_x_;
    *finfo = dec->fstrengths_[block->segment_][block->is_i4x4_];
    finfo->f_inner_ |= !skip;
  }

  return !token_br->eof_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, 0x18(%rsp)
movq 0xb10(%rdi), %r15
movslq 0xb58(%rdi), %r12
imulq $0x320, %r12, %r14      # imm = 0x320
addq 0xb60(%rdi), %r14
cmpl $0x0, 0xaf0(%rdi)
je 0xcafdd
cmpb $0x0, 0x31d(%r14)
je 0xcafdd
xorl %eax, %eax
movb %al, (%r15,%r12,2)
movb %al, -0x2(%r15)
cmpb %al, 0x300(%r14)
jne 0xcafc6
xorl %eax, %eax
movb %al, 0x1(%r15,%r12,2)
movb %al, -0x1(%r15)
movb $0x0, 0x31c(%r14)
andq $0x0, 0x314(%r14)
xorl %eax, %eax
jmp 0xcb311
movzbl 0x31e(%r14), %eax
shll $0x5, %eax
leaq (%rdi,%rax), %r13
addq $0x424, %r13            # imm = 0x424
movq %rdi, %rbx
xorl %ebp, %ebp
movl $0x300, %edx            # imm = 0x300
movq %r14, %rdi
xorl %esi, %esi
callq 0x56ff0
cmpb $0x0, 0x300(%r14)
movq %r13, 0x48(%rsp)
movq %rbx, 0x28(%rsp)
je 0xcb029
leaq 0xa68(%rbx), %rax
movq %rax, 0x10(%rsp)
jmp 0xcb099
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r9
movaps %xmm0, 0x10(%r9)
movaps %xmm0, (%r9)
movzbl 0x1(%r15,%r12,2), %eax
movzbl -0x1(%r15), %edx
addl %eax, %edx
movq 0xa6362(%rip), %rax     # 0x1713b0
leaq 0x958(%rbx), %rsi
leaq 0x8(%r13), %rcx
movq 0x18(%rsp), %rdi
xorl %r8d, %r8d
callq *%rax
testl %eax, %eax
setg -0x1(%r15)
setg 0x1(%r15,%r12,2)
cmpl $0x2, %eax
jl 0xcb370
leaq 0xa63a0(%rip), %rax     # 0x171420
leaq 0x60(%rsp), %rdi
movq %r14, %rsi
callq *(%rax)
leaq 0x8d0(%rbx), %rax
movq %rax, 0x10(%rsp)
pushq $0x1
popq %rbp
movq %r12, 0x38(%rsp)
movb (%r15,%r12,2), %bl
andb $0xf, %bl
movq %r15, 0x40(%rsp)
movb -0x2(%r15), %dl
andb $0xf, %dl
xorl %ecx, %ecx
movl $0x0, 0x8(%rsp)
movq %r14, 0x50(%rsp)
movq %r14, 0x20(%rsp)
movq 0x48(%rsp), %r12
cmpl $0x4, %ecx
je 0xcb182
movl %ecx, 0xc(%rsp)
movzbl %dl, %edx
movl %edx, 0x4(%rsp)
andl $0x1, %edx
xorl %r15d, %r15d
xorl %r14d, %r14d
movq 0x20(%rsp), %rax
leaq (%rax,%r15), %r13
cmpl $0x80, %r15d
je 0xcb155
movl %ebx, %eax
andb $0x1, %al
movzbl %al, %eax
addl %eax, %edx
movq 0xa62a7(%rip), %rax     # 0x1713b0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %r12, %rcx
movl %ebp, %r8d
movq %r13, %r9
callq *%rax
xorl %edx, %edx
cmpl %ebp, %eax
setg %dl
movl %edx, %ecx
shlb $0x7, %cl
shrb %bl
orb %cl, %bl
xorl %ecx, %ecx
cmpw $0x0, (%r13)
setne %cl
cmpl $0x2, %eax
pushq $0x2
popq %rsi
cmovgel %esi, %ecx
cmpl $0x4, %eax
pushq $0x3
popq %rax
cmovgel %eax, %ecx
leal (%rcx,%r14,4), %r14d
addq $0x20, %r15
jmp 0xcb0e7
shrb $0x4, %bl
movl 0x4(%rsp), %eax
shrl %eax
shll $0x7, %edx
orl %eax, %edx
movl 0x8(%rsp), %eax
shll $0x8, %eax
orl %eax, %r14d
movl 0xc(%rsp), %ecx
incl %ecx
movl %r14d, 0x8(%rsp)
movq %r13, 0x20(%rsp)
jmp 0xcb0ca
movzbl %bl, %esi
shrb $0x4, %dl
movzbl %dl, %edx
movq 0x28(%rsp), %rax
leaq 0x9e0(%rax), %r13
leaq 0x10(%r12), %rbp
xorl %edi, %edi
xorl %r8d, %r8d
cmpl $0x3, %edi
ja 0xcb2c6
movl %r8d, 0x30(%rsp)
movl %edx, 0x34(%rsp)
movl %esi, 0x4(%rsp)
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movzbl (%rax,%rcx,2), %ebx
movq %rdi, 0x58(%rsp)
movl %edi, %ecx
orb $0x4, %cl
shrl %cl, %ebx
movzbl -0x2(%rax), %edx
shrl %cl, %edx
xorl %eax, %eax
xorl %r14d, %r14d
cmpl $0x2, %eax
je 0xcb287
movl %eax, 0xc(%rsp)
movl %edx, 0x10(%rsp)
andl $0x1, %edx
xorl %r12d, %r12d
movq 0x20(%rsp), %rax
leaq (%rax,%r12), %r15
cmpl $0x40, %r12d
je 0xcb25e
movl %ebx, %eax
andl $0x1, %eax
addl %eax, %edx
movq 0xa61a0(%rip), %rax     # 0x1713b0
movq 0x18(%rsp), %rdi
movq %r13, %rsi
movq %rbp, %rcx
xorl %r8d, %r8d
movq %r15, %r9
callq *%rax
xorl %edx, %edx
testl %eax, %eax
setg %dl
shrl %ebx
andl $0x7f, %ebx
leal (,%rdx,8), %ecx
orl %ecx, %ebx
xorl %ecx, %ecx
cmpw $0x0, (%r15)
setne %cl
cmpl $0x2, %eax
pushq $0x2
popq %rsi
cmovgel %esi, %ecx
cmpl $0x4, %eax
pushq $0x3
popq %rax
cmovgel %eax, %ecx
leal (%rcx,%r14,4), %r14d
addq $0x20, %r12
jmp 0xcb1f3
shrl $0x2, %ebx
andl $0x3f, %ebx
movl 0x10(%rsp), %eax
shrl %eax
andl $0x7f, %eax
shll $0x5, %edx
orl %eax, %edx
movl 0xc(%rsp), %eax
incl %eax
movq %r15, 0x20(%rsp)
movq 0x48(%rsp), %r12
jmp 0xcb1dc
movq 0x58(%rsp), %rdi
leal (,%rdi,4), %ecx
shll %cl, %r14d
orl 0x30(%rsp), %r14d
movzbl %bl, %eax
shll $0x4, %eax
movl %edi, %ecx
shll %cl, %eax
andl $0xf0, %edx
shll %cl, %edx
movl 0x4(%rsp), %esi
orl %eax, %esi
movl %edx, %eax
movl 0x34(%rsp), %edx
orl %eax, %edx
addl $0x2, %edi
movl %r14d, %r8d
jmp 0xcb1a1
movq 0x40(%rsp), %rax
movq 0x38(%rsp), %rcx
movb %sil, (%rax,%rcx,2)
movb %dl, -0x2(%rax)
movq 0x50(%rsp), %r14
movl 0x8(%rsp), %ecx
movl %ecx, 0x314(%r14)
movl %r8d, 0x318(%r14)
testw $0xaaaa, %r8w           # imm = 0xAAAA
je 0xcb2fa
xorl %eax, %eax
jmp 0xcb2ff
movb 0x1c(%r12), %al
movq 0x28(%rsp), %rdi
movb %al, 0x31c(%r14)
orl %ecx, %r8d
setne %al
cmpl $0x0, 0xb68(%rdi)
jle 0xcb350
movq 0xb18(%rdi), %rcx
movslq 0xb58(%rdi), %rdx
movzbl 0x31e(%r14), %esi
leaq (%rdi,%rsi,8), %rsi
movzbl 0x300(%r14), %edi
movl 0xb6c(%rsi,%rdi,4), %esi
movl %esi, (%rcx,%rdx,4)
shrl $0x10, %esi
orb %sil, %al
movb %al, 0x2(%rcx,%rdx,4)
xorl %eax, %eax
movq 0x18(%rsp), %rcx
cmpl $0x0, 0x28(%rcx)
sete %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movswl 0x60(%rsp), %eax
addl $0x3, %eax
shrl $0x3, %eax
xorl %ecx, %ecx
cmpq $0xff, %rcx
ja 0xcb08a
movw %ax, (%r14,%rcx,2)
addq $0x10, %rcx
jmp 0xcb37d