// File: /workspace/github_c_makefile_star2_O3/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, %r13
movq %rdi, %r14
movq 0xb10(%rdi), %r12
movslq 0xb58(%rdi), %rcx
imulq $0x320, %rcx, %r15      # imm = 0x320
addq 0xb60(%rdi), %r15
cmpl $0x0, 0xaf0(%rdi)
je 0xd2079
cmpb $0x0, 0x31d(%r15)
je 0xd2079
xorl %eax, %eax
movb %al, (%r12,%rcx,2)
movb %al, -0x2(%r12)
cmpb %al, 0x300(%r15)
jne 0xd205f
xorl %eax, %eax
movb %al, 0x1(%r12,%rcx,2)
movb %al, -0x1(%r12)
movb $0x0, 0x31c(%r15)
movq $0x0, 0x314(%r15)
xorl %eax, %eax
jmp 0xd23fd
movq %rcx, 0x10(%rsp)
movzbl 0x31e(%r15), %eax
shll $0x5, %eax
leaq (%r14,%rax), %rbx
addq $0x424, %rbx            # imm = 0x424
xorl %ebp, %ebp
movl $0x300, %edx            # imm = 0x300
movq %r15, %rdi
xorl %esi, %esi
callq 0x55f20
cmpb $0x0, 0x300(%r15)
movq %r13, 0x18(%rsp)
movq %rbx, 0x30(%rsp)
movq %r14, 0x20(%rsp)
je 0xd20d2
addq $0xa68, %r14            # imm = 0xA68
movq %rbx, %rcx
movq 0x10(%rsp), %r13
jmp 0xd216c
movq %r13, %rdi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r9
movaps %xmm0, 0x10(%r9)
movaps %xmm0, (%r9)
movq 0x10(%rsp), %r13
movzbl 0x1(%r12,%r13,2), %eax
movzbl -0x1(%r12), %edx
addl %eax, %edx
movq 0xa90f0(%rip), %rax     # 0x17b1f0
leaq 0x958(%r14), %rsi
leaq 0x8(%rbx), %rcx
xorl %r8d, %r8d
callq *%rax
testl %eax, %eax
setg -0x1(%r12)
setg 0x1(%r12,%r13,2)
cmpl $0x2, %eax
jl 0xd2136
leaq 0xa9136(%rip), %rax     # 0x17b260
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq *(%rax)
jmp 0xd215b
movswl 0x60(%rsp), %eax
addl $0x3, %eax
shrl $0x3, %eax
movq $-0x10, %rcx
movw %ax, 0x20(%r15,%rcx,2)
addq $0x10, %rcx
cmpq $0xf0, %rcx
jb 0xd2148
addq $0x8d0, %r14            # imm = 0x8D0
movl $0x1, %ebp
movq 0x30(%rsp), %rcx
movb (%r12,%r13,2), %bl
andb $0xf, %bl
movq %r12, 0x48(%rsp)
movb -0x2(%r12), %r8b
andb $0xf, %r8b
movq $0x0, 0x28(%rsp)
movq %r15, 0x50(%rsp)
movq %r15, %rax
xorl %edx, %edx
movl %edx, 0xc(%rsp)
movq %rax, %r13
movb %r8b, 0x8(%rsp)
movl %r8d, %eax
andb $0x1, %al
movzbl %al, %r8d
xorl %r15d, %r15d
xorl %r12d, %r12d
leaq (%r15,%r13), %r9
movl %ebx, %eax
andb $0x1, %al
movzbl %al, %edx
addl %r8d, %edx
movq 0xa902c(%rip), %rax     # 0x17b1f0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movl %ebp, %r8d
callq *%rax
movl $0x2, %r9d
movq 0x30(%rsp), %rcx
xorl %r8d, %r8d
cmpl %ebp, %eax
setg %r8b
movl %r8d, %edi
shlb $0x7, %dil
shrb %bl
orb %dil, %bl
xorl %edx, %edx
cmpw $0x0, (%r13,%r15)
setne %dl
cmpl $0x2, %eax
cmovgel %r9d, %edx
movl $0x3, %r9d
cmpl $0x4, %eax
cmovgel %r9d, %edx
leal (%rdx,%r12,4), %r12d
addq $0x20, %r15
cmpl $0x80, %r15d
jne 0xd21af
shrb $0x4, %bl
movb 0x8(%rsp), %al
shrb %al
orb %al, %dil
movq 0x28(%rsp), %rax
shll $0x8, %eax
orl %r12d, %eax
movq %rax, 0x28(%rsp)
movl 0xc(%rsp), %edx
incl %edx
leaq (%r15,%r13), %rax
movl %edi, %r8d
cmpl $0x4, %edx
jne 0xd2194
movzbl %bl, %r8d
shrb $0x4, %dil
movzbl %dil, %edi
movq 0x20(%rsp), %rax
leaq 0x9e0(%rax), %r14
leaq 0x10(%rcx), %rbp
addq %r15, %r13
movb $0x1, %al
xorl %edx, %edx
xorl %r10d, %r10d
movl %eax, 0x38(%rsp)
movl %edi, 0x3c(%rsp)
movl %r8d, 0x40(%rsp)
movl %edx, 0x44(%rsp)
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movzbl (%rax,%rcx,2), %ebx
movq %r10, 0x58(%rsp)
movl %r10d, %ecx
orb $0x4, %cl
shrl %cl, %ebx
movzbl -0x2(%rax), %r10d
shrl %cl, %r10d
xorl %r12d, %r12d
movb $0x1, %al
movl %eax, 0x8(%rsp)
movl %r10d, 0xc(%rsp)
movl %r10d, %ecx
andl $0x1, %ecx
movb $0x1, %r15b
movl %ebx, %edx
andl $0x1, %edx
addl %ecx, %edx
movq 0xa8f1d(%rip), %rax     # 0x17b1f0
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq %rbp, %rcx
xorl %r8d, %r8d
movq %r13, %r9
callq *%rax
movl $0x3, %r8d
movl $0x2, %edi
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl %ebx
movl %ebx, %edx
andl $0x7f, %edx
leal (,%rcx,8), %ebx
orl %edx, %ebx
xorl %edx, %edx
cmpw $0x0, (%r13)
setne %dl
cmpl $0x2, %eax
cmovgel %edi, %edx
cmpl $0x4, %eax
cmovgel %r8d, %edx
leal (%rdx,%r12,4), %r12d
addq $0x20, %r13
testb $0x1, %r15b
movl $0x0, %r15d
jne 0xd22c5
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x2, %ebx
movl 0xc(%rsp), %eax
shrl %eax
andl $0x7f, %eax
shll $0x5, %ecx
movl %ecx, %r10d
orl %eax, %r10d
testb $0x1, 0x8(%rsp)
movl $0x0, %eax
jne 0xd22b3
movq 0x58(%rsp), %rax
leal (,%rax,4), %ecx
shll %cl, %r12d
shll $0x4, %ebx
movl %eax, %ecx
shll %cl, %ebx
movl 0x44(%rsp), %edx
orl %r12d, %edx
movl 0x40(%rsp), %r8d
orl %ebx, %r8d
andl $-0x10, %r10d
shll %cl, %r10d
movl 0x3c(%rsp), %edi
orl %r10d, %edi
movl $0x2, %r10d
testb $0x1, 0x38(%rsp)
movl $0x0, %eax
jne 0xd227a
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movb %r8b, (%rax,%rcx,2)
movb %dil, -0x2(%rax)
movq 0x50(%rsp), %r15
movq 0x28(%rsp), %rcx
movl %ecx, 0x314(%r15)
movl %edx, 0x318(%r15)
testl $0xaaaa, %edx           # imm = 0xAAAA
je 0xd23df
xorl %eax, %eax
jmp 0xd23e7
movq 0x30(%rsp), %rax
movb 0x1c(%rax), %al
movq 0x18(%rsp), %r13
movq 0x20(%rsp), %r14
movb %al, 0x31c(%r15)
orl %ecx, %edx
setne %al
cmpl $0x0, 0xb68(%r14)
jle 0xd243d
movq 0xb18(%r14), %rcx
movslq 0xb58(%r14), %rdx
movzbl 0x31e(%r15), %esi
leaq (%r14,%rsi,8), %rsi
movzbl 0x300(%r15), %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
cmpl $0x0, 0x28(%r13)
sete %al
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq