// File: /workspace/github_c_makefile_star2_O1/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 0xd2f36
cmpb $0x0, 0x31d(%r15)
je 0xd2f36
xorl %eax, %eax
movb %al, (%r12,%rcx,2)
movb %al, -0x2(%r12)
cmpb %al, 0x300(%r15)
jne 0xd2f1c
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 0xd32c5
movq %rcx, 0x8(%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, 0x10(%rsp)
movq %rbx, 0x20(%rsp)
movq %r14, 0x38(%rsp)
je 0xd2f8f
leaq 0xa68(%r14), %rsi
movq %rbx, %rcx
movq 0x8(%rsp), %r13
jmp 0xd3029
movq %r13, %rdi
xorps %xmm0, %xmm0
leaq 0x60(%rsp), %r9
movaps %xmm0, 0x10(%r9)
movaps %xmm0, (%r9)
movq 0x8(%rsp), %r13
movzbl 0x1(%r12,%r13,2), %eax
movzbl -0x1(%r12), %edx
addl %eax, %edx
movq 0xa9233(%rip), %rax     # 0x17c1f0
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 0xd2ff3
leaq 0xa9279(%rip), %rax     # 0x17c260
leaq 0x60(%rsp), %rdi
movq %r15, %rsi
callq *(%rax)
jmp 0xd3018
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 0xd3005
leaq 0x8d0(%r14), %rsi
movl $0x1, %ebp
movq 0x20(%rsp), %rcx
movb (%r12,%r13,2), %bl
andb $0xf, %bl
movq %r12, 0x40(%rsp)
movb -0x2(%r12), %r8b
andb $0xf, %r8b
movq $0x0, 0x18(%rsp)
movq %r15, 0x48(%rsp)
movq %r15, %rax
xorl %edx, %edx
movl %edx, 0x4(%rsp)
movq %rax, %r11
movb %r8b, 0x28(%rsp)
movl %r8d, %eax
andb $0x1, %al
movzbl %al, %r8d
xorl %r15d, %r15d
xorl %r13d, %r13d
leaq (%r11,%r15), %r9
movl %ebx, %eax
andb $0x1, %al
movzbl %al, %edx
addl %r8d, %edx
movq 0xa916f(%rip), %rax     # 0x17c1f0
movq 0x10(%rsp), %rdi
movq %rsi, %r12
movl %ebp, %r8d
movq %r11, %r14
callq *%rax
movl $0x2, %r9d
movq %r12, %rsi
movq %r14, %r11
movq 0x20(%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, (%r14,%r15)
setne %dl
cmpl $0x2, %eax
cmovgel %r9d, %edx
movl $0x3, %r9d
cmpl $0x4, %eax
cmovgel %r9d, %edx
leal (%rdx,%r13,4), %r13d
addq $0x20, %r15
cmpl $0x80, %r15d
jne 0xd306c
shrb $0x4, %bl
movb 0x28(%rsp), %al
shrb %al
orb %al, %dil
movq 0x18(%rsp), %rax
shll $0x8, %eax
orl %r13d, %eax
movq %rax, 0x18(%rsp)
movl 0x4(%rsp), %edx
incl %edx
leaq (%r11,%r15), %rax
movl %edi, %r8d
cmpl $0x4, %edx
jne 0xd3051
movzbl %bl, %r8d
shrb $0x4, %dil
movzbl %dil, %edi
movq 0x38(%rsp), %rax
leaq 0x9e0(%rax), %rsi
leaq 0x10(%rcx), %r13
addq %r15, %r11
xorl %edx, %edx
xorl %r9d, %r9d
movl %edi, 0x30(%rsp)
movl %r8d, 0x34(%rsp)
movq %rdx, 0x58(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rsp), %rcx
movzbl (%rax,%rcx,2), %r12d
movq %r9, 0x50(%rsp)
movl %r9d, %ecx
orb $0x4, %cl
shrl %cl, %r12d
movzbl -0x2(%rax), %ebp
shrl %cl, %ebp
xorl %r14d, %r14d
xorl %eax, %eax
movq %rax, 0x28(%rsp)
movq %r11, %r15
movl %ebp, 0x4(%rsp)
movl %ebp, %ecx
andl $0x1, %ecx
xorl %ebx, %ebx
leaq (%r15,%rbx), %r9
movl %r12d, %edx
andl $0x1, %edx
addl %ecx, %edx
movq 0xa9057(%rip), %rax     # 0x17c1f0
movq 0x10(%rsp), %rdi
movq %r13, %rcx
movq %rsi, %rbp
xorl %r8d, %r8d
callq *%rax
movl $0x3, %r8d
movl $0x2, %edi
movq %rbp, %rsi
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl %r12d
movl %r12d, %edx
andl $0x7f, %edx
leal (,%rcx,8), %r12d
orl %edx, %r12d
xorl %edx, %edx
cmpw $0x0, (%r15,%rbx)
setne %dl
cmpl $0x2, %eax
cmovgel %edi, %edx
cmpl $0x4, %eax
cmovgel %r8d, %edx
leal (%rdx,%r14,4), %r14d
addq $0x20, %rbx
cmpl $0x20, %ebx
je 0xd3186
xorl %ecx, %ecx
testl %eax, %eax
setg %cl
shrl $0x2, %r12d
movl 0x4(%rsp), %eax
shrl %eax
andl $0x7f, %eax
shll $0x5, %ecx
movl %ecx, %ebp
orl %eax, %ebp
movq 0x28(%rsp), %rcx
leal 0x1(%rcx), %eax
leaq (%r15,%rbx), %r11
testl %ecx, %ecx
je 0xd3173
movq 0x50(%rsp), %r9
leal (,%r9,4), %ecx
shll %cl, %r14d
shll $0x4, %r12d
movl %r9d, %ecx
shll %cl, %r12d
andl $-0x10, %ebp
shll %cl, %ebp
movq 0x58(%rsp), %rdx
orl %r14d, %edx
movl 0x34(%rsp), %r8d
orl %r12d, %r8d
movl 0x30(%rsp), %edi
orl %ebp, %edi
leal 0x2(%r9), %eax
addq %rbx, %r15
movq %r15, %r11
testl %r9d, %r9d
movl %eax, %r9d
je 0xd313d
movq 0x40(%rsp), %rax
movq 0x8(%rsp), %rcx
movb %r8b, (%rax,%rcx,2)
movb %dil, -0x2(%rax)
movq 0x48(%rsp), %r15
movq 0x18(%rsp), %rcx
movl %ecx, 0x314(%r15)
movl %edx, 0x318(%r15)
testl $0xaaaa, %edx           # imm = 0xAAAA
je 0xd32a7
xorl %eax, %eax
jmp 0xd32af
movq 0x20(%rsp), %rax
movb 0x1c(%rax), %al
movq 0x10(%rsp), %r13
movb %al, 0x31c(%r15)
orl %ecx, %edx
setne %al
movq 0x38(%rsp), %r14
cmpl $0x0, 0xb68(%r14)
jle 0xd32ff
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)
orb %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