// File: /workspace/github_c_makefile_star2_O1/enzo1982[P]smooth/libraries/libwebp/src/dec/vp8_dec.c
// Function: GetCoeffsAlt
static int GetCoeffsAlt(VP8BitReader* const br,
                        const VP8BandProbas* const prob[],
                        int ctx, const quant_t dq, int n, int16_t* out) {
  const uint8_t* p = prob[n]->probas_[ctx];
  for (; n < 16; ++n) {
    if (!VP8GetBitAlt(br, p[0], "coeffs")) {
      return n;  // previous coeff was last non-zero coeff
    }
    while (!VP8GetBitAlt(br, p[1], "coeffs")) {       // sequence of zero coeffs
      p = prob[++n]->probas_[0];
      if (n == 16) return 16;
    }
    {        // non zero coeff
      const VP8ProbaArray* const p_ctx = &prob[n + 1]->probas_[0];
      int v;
      if (!VP8GetBitAlt(br, p[2], "coeffs")) {
        v = 1;
        p = p_ctx[1];
      } else {
        v = GetLargeValue(br, p);
        p = p_ctx[2];
      }
      out[kZigzag[n]] = VP8GetSigned(br, v, "coeffs") * dq[n > 0];
    }
  }
  return 16;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl $0x10, %eax
cmpl $0xf, %r8d
jg 0xd3987
movq %rcx, %r12
movq %rdi, %r13
movslq %r8d, %rax
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rdx
leaq (%rcx,%rdx,2), %rcx
addq (%rsi,%rax,8), %rcx
movq %rcx, %rax
leaq 0x5b212(%rip), %r11     # 0x12e7c0
leaq 0x5b28b(%rip), %r10     # 0x12e840
movq %rsi, (%rsp)
movq %r9, 0x20(%rsp)
movq %r12, 0x18(%rsp)
movq %rax, 0x8(%rsp)
movzbl (%rax), %ebx
movl 0x8(%r13), %r14d
movl 0xc(%r13), %eax
testl %eax, %eax
jns 0xd3630
testq %r13, %r13
je 0xd399b
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd399b
cmpq 0x20(%r13), %rcx
jae 0xd3610
movq (%rcx), %rdx
addq $0x7, %rcx
movq %rcx, 0x10(%r13)
bswapq %rdx
shldq $0x38, %rdx, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd3630
movq %r13, %rdi
movl %r8d, %ebp
callq 0xf096e
leaq 0x5b21e(%rip), %r10     # 0x12e840
leaq 0x5b197(%rip), %r11     # 0x12e7c0
movl %ebp, %r8d
movq (%rsp), %rsi
movl 0xc(%r13), %ecx
movq (%r13), %r9
movq %r9, %rax
shrq %cl, %rax
imull %r14d, %ebx
shrl $0x8, %ebx
movl %ebx, %edx
cmpl %eax, %ebx
jae 0xd3661
movl %ebx, %edi
incq %rdi
movl %ebx, %edx
shlq %cl, %rdi
notl %edx
addl %r14d, %edx
subq %rdi, %r9
movq %r9, (%r13)
cmpl $0x7e, %edx
ja 0xd3678
movl %edx, %edx
movzbl (%r11,%rdx), %edi
movzbl (%r10,%rdx), %edx
subl %edi, %ecx
movl %ecx, 0xc(%r13)
movabsq $0x100000000, %r9       # imm = 0x100000000
movl %edx, 0x8(%r13)
cmpl %eax, %ebx
jae 0xd3996
movslq %r8d, %rbx
movq %rbx, %r15
shlq $0x20, %r15
leal 0x1(%rbx), %r8d
movq 0x8(%rsp), %rax
movq %rax, 0x8(%rsp)
movzbl 0x1(%rax), %r12d
movl 0x8(%r13), %ebp
movl 0xc(%r13), %eax
testl %eax, %eax
jns 0xd371a
testq %r13, %r13
je 0xd399b
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd399b
cmpq 0x20(%r13), %rcx
jae 0xd36f0
movq (%rcx), %rdx
addq $0x7, %rcx
movq %rcx, 0x10(%r13)
bswapq %rdx
shldq $0x38, %rdx, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd371a
movq %r13, %rdi
movl %r8d, %r14d
callq 0xf096e
movabsq $0x100000000, %r9       # imm = 0x100000000
leaq 0x5b134(%rip), %r10     # 0x12e840
leaq 0x5b0ad(%rip), %r11     # 0x12e7c0
movl %r14d, %r8d
movq (%rsp), %rsi
movl 0xc(%r13), %ecx
movq (%r13), %rdx
movq %rdx, %rax
shrq %cl, %rax
imull %ebp, %r12d
shrl $0x8, %r12d
movl %r12d, %r14d
cmpl %eax, %r12d
jae 0xd3751
movl %r12d, %edi
incq %rdi
movl %r12d, %r14d
shlq %cl, %rdi
notl %r14d
addl %ebp, %r14d
subq %rdi, %rdx
movq %rdx, (%r13)
cmpl $0x7e, %r14d
ja 0xd376a
movl %r14d, %edx
movzbl (%r11,%rdx), %edi
movzbl (%r10,%rdx), %r14d
subl %edi, %ecx
movl %ecx, 0xc(%r13)
movl %r14d, 0x8(%r13)
cmpl %eax, %r12d
jb 0xd3790
movq 0x8(%rsi,%rbx,8), %rax
incq %rbx
addq %r9, %r15
incl %r8d
cmpq $0x10, %rbx
jne 0xd36a1
jmp 0xd3982
movslq %r8d, %rax
movq (%rsi,%rax,8), %rbp
movq 0x8(%rsp), %rax
movzbl 0x2(%rax), %r12d
movl 0xc(%r13), %eax
testl %eax, %eax
jns 0xd380c
testq %r13, %r13
je 0xd399b
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd399b
cmpq 0x20(%r13), %rcx
jae 0xd37e2
movq (%rcx), %rdx
addq $0x7, %rcx
movq %rcx, 0x10(%r13)
bswapq %rdx
shldq $0x38, %rdx, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd380c
movq %r13, %rdi
movq %rbp, 0x10(%rsp)
movl %r8d, %ebp
callq 0xf096e
leaq 0x5b047(%rip), %r10     # 0x12e840
leaq 0x5afc0(%rip), %r11     # 0x12e7c0
movl %ebp, %r8d
movq 0x10(%rsp), %rbp
movq (%rsp), %rsi
movl 0xc(%r13), %ecx
movq (%r13), %r9
movq %r9, %rax
shrq %cl, %rax
imull %r14d, %r12d
shrl $0x8, %r12d
movl %r12d, %edx
cmpl %eax, %r12d
jae 0xd3842
movl %r12d, %edi
incq %rdi
movl %r12d, %edx
shlq %cl, %rdi
notl %edx
addl %r14d, %edx
subq %rdi, %r9
movq %r9, (%r13)
cmpl $0x7e, %edx
ja 0xd3859
movl %edx, %edx
movzbl (%r11,%rdx), %edi
movzbl (%r10,%rdx), %edx
subl %edi, %ecx
movl %ecx, 0xc(%r13)
movl %edx, 0x8(%r13)
cmpl %eax, %r12d
jae 0xd3891
movq %r13, %rdi
movq 0x8(%rsp), %rsi
movq %rbp, %r14
movl %r8d, %ebp
callq 0xd3dc8
leaq 0x5af44(%rip), %r11     # 0x12e7c0
movl %ebp, %r8d
movq %r14, %rbp
movq (%rsp), %rsi
movl %eax, %r14d
movl $0x16, %r12d
jmp 0xd389d
movl $0x1, %r14d
movl $0xb, %r12d
movl 0xc(%r13), %eax
testl %eax, %eax
jns 0xd38f8
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd399b
cmpq 0x20(%r13), %rcx
jae 0xd38d5
movq (%rcx), %rdx
addq $0x7, %rcx
movq %rcx, 0x10(%r13)
bswapq %rdx
shldq $0x38, %rdx, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd38f8
movq %r13, %rdi
movq %rbp, 0x10(%rsp)
movl %r8d, %ebp
callq 0xf096e
leaq 0x5aed4(%rip), %r11     # 0x12e7c0
movl %ebp, %r8d
movq 0x10(%rsp), %rbp
movq (%rsp), %rsi
addq %r12, %rbp
movl 0xc(%r13), %ecx
movl 0x8(%r13), %edx
movl %edx, %eax
shrl %eax
movq (%r13), %r9
movq %r9, %rdi
shrq %cl, %rdi
movl %eax, %r10d
subl %edi, %r10d
sarl $0x1f, %r10d
movl %ecx, %edi
decl %edi
movl %edi, 0xc(%r13)
addl %r10d, %edx
incl %eax
andl %r10d, %eax
shlq %cl, %rax
orl $0x1, %edx
movl %edx, 0x8(%r13)
subq %rax, %r9
movq %r9, (%r13)
xorl %r10d, %r14d
subl %r10d, %r14d
xorl %eax, %eax
testq %rbx, %rbx
setg %al
movq 0x18(%rsp), %r12
imull (%r12,%rax,4), %r14d
sarq $0x20, %r15
leaq 0x56931(%rip), %rax     # 0x12a290
movzbl (%r15,%rax), %eax
movq 0x20(%rsp), %r15
movw %r14w, (%r15,%rax,2)
movq %rbp, %rax
cmpq $0xf, %rbx
leaq 0x5aec4(%rip), %r10     # 0x12e840
jl 0xd35c3
movl $0x10, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r8d, %eax
jmp 0xd3987
leaq 0x56afe(%rip), %rdi     # 0x12a4a0
leaq 0x56b16(%rip), %rsi     # 0x12a4bf
leaq 0x56b7a(%rip), %rcx     # 0x12a52a
movl $0x3b, %edx
callq 0x55710