// File: /workspace/github_c_makefile_star2_O3/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 %r8d, %ebp
movl $0x10, %eax
cmpl $0xf, %r8d
jg 0xd2a98
movq %rcx, %r8
movq %rdi, %r13
movslq %ebp, %rax
movslq %edx, %rcx
leaq (%rcx,%rcx,4), %rdx
leaq (%rcx,%rdx,2), %r14
addq (%rsi,%rax,8), %r14
movl 0x8(%rdi), %edi
movl 0xc(%r13), %eax
leaq 0x5b2f3(%rip), %r10     # 0x12d9e0
leaq 0x5b36c(%rip), %r11     # 0x12da60
movq %rsi, 0x10(%rsp)
movq %r9, 0x20(%rsp)
movq %r8, 0x18(%rsp)
movzbl (%r14), %ebx
testl %eax, %eax
movq %r14, (%rsp)
jns 0xd2766
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd2aab
cmpq 0x20(%r13), %rcx
jae 0xd273f
movq (%rcx), %rdx
addq $0x7, %rcx
movq %rcx, 0x10(%r13)
bswapq %rdx
shldq $0x38, %rdx, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd2766
movl %edi, 0x8(%rsp)
movq %r13, %rdi
callq 0xefba6
movl 0x8(%rsp), %edi
leaq 0x5b30a(%rip), %r11     # 0x12da60
leaq 0x5b283(%rip), %r10     # 0x12d9e0
movq 0x10(%rsp), %rsi
movl 0xc(%r13), %eax
imull %edi, %ebx
shrl $0x8, %ebx
movq (%r13), %r9
movq %r9, %rdx
movl %eax, %ecx
shrq %cl, %rdx
cmpl %edx, %ebx
jae 0xd279b
movl %eax, %ecx
movl %edi, %r12d
movl %ebx, %edi
incq %rdi
movl %ebx, %r14d
shlq %cl, %rdi
notl %r14d
addl %r12d, %r14d
subq %rdi, %r9
movq %r9, (%r13)
jmp 0xd279e
movl %ebx, %r14d
cmpl $0x7e, %r14d
ja 0xd27b7
movl %r14d, %ecx
movzbl (%r10,%rcx), %edi
movzbl (%r11,%rcx), %r14d
subl %edi, %eax
movl %eax, 0xc(%r13)
movl %r14d, 0x8(%r13)
cmpl %edx, %ebx
jae 0xd2aa7
movslq %ebp, %rbx
movq %rbx, %r15
shlq $0x20, %r15
leal 0x1(%rbx), %ebp
movq (%rsp), %rdx
movzbl 0x1(%rdx), %r12d
testl %eax, %eax
movq %rdx, (%rsp)
jns 0xd2837
movq 0x10(%r13), %rcx
testq %rcx, %rcx
je 0xd2aab
cmpq 0x20(%r13), %rcx
jae 0xd2814
movq (%rcx), %rdx
addq $0x7, %rcx
bswapq %rdx
shldq $0x38, %rdx, %r9
movq %rcx, 0x10(%r13)
movq %r9, (%r13)
addl $0x38, %eax
movl %eax, 0xc(%r13)
jmp 0xd2837
movq %r13, %rdi
callq 0xefba6
leaq 0x5b23d(%rip), %r11     # 0x12da60
leaq 0x5b1b6(%rip), %r10     # 0x12d9e0
movq 0x10(%rsp), %rsi
movl 0xc(%r13), %eax
movq (%r13), %r9
imull %r14d, %r12d
shrl $0x8, %r12d
movq %r9, %rdx
movl %eax, %ecx
shrq %cl, %rdx
cmpl %edx, %r12d
jae 0xd2869
movl %eax, %ecx
movl %r12d, %edi
incq %rdi
movl %r12d, %r8d
shlq %cl, %rdi
notl %r8d
addl %r8d, %r14d
subq %rdi, %r9
movq %r9, (%r13)
jmp 0xd286c
movl %r12d, %r14d
cmpl $0x7e, %r14d
ja 0xd2885
movl %r14d, %ecx
movzbl (%r10,%rcx), %edi
movzbl (%r11,%rcx), %r14d
subl %edi, %eax
movl %eax, 0xc(%r13)
movl %r14d, 0x8(%r13)
cmpl %edx, %r12d
jb 0xd28b4
movq 0x8(%rsi,%rbx,8), %rdx
incq %rbx
movabsq $0x100000000, %rcx      # imm = 0x100000000
addq %rcx, %r15
incl %ebp
cmpq $0x10, %rbx
jne 0xd27d4
jmp 0xd2a93
movslq %ebp, %rax
movq (%rsi,%rax,8), %rcx
movq (%rsp), %rax
movzbl 0x2(%rax), %r12d
movl 0xc(%r13), %edx
testl %edx, %edx
movq %rcx, 0x8(%rsp)
jns 0xd2927
movq 0x10(%r13), %rax
testq %rax, %rax
je 0xd2aab
cmpq 0x20(%r13), %rax
jae 0xd2904
movq (%rax), %rcx
addq $0x7, %rax
bswapq %rcx
shldq $0x38, %rcx, %r9
movq %rax, 0x10(%r13)
movq %r9, (%r13)
addl $0x38, %edx
movl %edx, 0xc(%r13)
jmp 0xd2927
movq %r13, %rdi
callq 0xefba6
leaq 0x5b14d(%rip), %r11     # 0x12da60
leaq 0x5b0c6(%rip), %r10     # 0x12d9e0
movq 0x10(%rsp), %rsi
movl 0xc(%r13), %edx
movq (%r13), %r9
movq %r9, %rax
movl %edx, %ecx
shrq %cl, %rax
imull %r14d, %r12d
shrl $0x8, %r12d
movl %r12d, %edi
cmpl %eax, %r12d
jae 0xd2959
movl %edx, %ecx
movl %r12d, %r8d
incq %r8
movl %r12d, %edi
shlq %cl, %r8
notl %edi
addl %r14d, %edi
subq %r8, %r9
movq %r9, (%r13)
cmpl $0x7e, %edi
ja 0xd2971
movl %edi, %ecx
movzbl (%r10,%rcx), %r8d
movzbl (%r11,%rcx), %edi
subl %r8d, %edx
movl %edx, 0xc(%r13)
movl %edi, 0x8(%r13)
cmpl %eax, %r12d
jae 0xd29a8
movq %r13, %rdi
movq (%rsp), %rsi
callq 0xd2ebd
leaq 0x5b0d3(%rip), %r11     # 0x12da60
leaq 0x5b04c(%rip), %r10     # 0x12d9e0
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rcx
addq $0x16, %rcx
movl 0xc(%r13), %edx
jmp 0xd29b6
movq 0x8(%rsp), %rcx
addq $0xb, %rcx
movl $0x1, %eax
movq %rcx, (%rsp)
movq 0x18(%rsp), %r12
testl %edx, %edx
movl %eax, 0x8(%rsp)
jns 0xd2a12
movq 0x10(%r13), %rdi
testq %rdi, %rdi
je 0xd2aab
cmpq 0x20(%r13), %rdi
jae 0xd29f3
movq (%rdi), %rcx
addq $0x7, %rdi
movq %rdi, 0x10(%r13)
bswapq %rcx
shldq $0x38, %rcx, (%r13)
addl $0x38, %edx
jmp 0xd2a12
movq %r13, %rdi
callq 0xefba6
leaq 0x5b05e(%rip), %r11     # 0x12da60
leaq 0x5afd7(%rip), %r10     # 0x12d9e0
movq 0x10(%rsp), %rsi
movl 0xc(%r13), %edx
movl 0x8(%r13), %edi
movl %edi, %r9d
shrl %r9d
movq (%r13), %r14
movq %r14, %rax
movl %edx, %ecx
shrq %cl, %rax
movl %r9d, %r8d
subl %eax, %r8d
sarl $0x1f, %r8d
movl %edx, %eax
decl %eax
movl %eax, 0xc(%r13)
addl %r8d, %edi
orl $0x1, %edi
movl %edi, 0x8(%r13)
incl %r9d
andl %r8d, %r9d
shlq %cl, %r9
subq %r9, %r14
movq %r14, (%r13)
movl 0x8(%rsp), %edx
xorl %r8d, %edx
subl %r8d, %edx
xorl %ecx, %ecx
testq %rbx, %rbx
setg %cl
imull (%r12,%rcx,4), %edx
sarq $0x20, %r15
leaq 0x56a3a(%rip), %rcx     # 0x1294b0
movzbl (%r15,%rcx), %ecx
movq 0x20(%rsp), %r15
movw %dx, (%r15,%rcx,2)
cmpq $0xf, %rbx
movq (%rsp), %r14
jl 0xd2703
movl $0x10, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %eax
jmp 0xd2a98
leaq 0x56c0e(%rip), %rdi     # 0x1296c0
leaq 0x56c26(%rip), %rsi     # 0x1296df
leaq 0x56c8a(%rip), %rcx     # 0x12974a
movl $0x3b, %edx
callq 0x55710