// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__jpeg_decode_block(stbi__jpeg*, short*, stbi__huffman*, stbi__huffman*, short*, int, unsigned short*)
static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi__uint16 *dequant)
{
   int diff,dc,k;
   int t;

   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
   t = stbi__jpeg_huff_decode(j, hdc);
   if (t < 0) return stbi__err("bad huffman code","Corrupt JPEG");

   // 0 all the ac values now so we can do it 32-bits at a time
   memset(data,0,64*sizeof(data[0]));

   diff = t ? stbi__extend_receive(j, t) : 0;
   dc = j->img_comp[b].dc_pred + diff;
   j->img_comp[b].dc_pred = dc;
   data[0] = (short) (dc * dequant[0]);

   // decode AC components, see JPEG spec
   k = 1;
   do {
      unsigned int zig;
      int c,r,s;
      if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);
      c = (j->code_buffer >> (32 - FAST_BITS)) & ((1 << FAST_BITS)-1);
      r = fac[c];
      if (r) { // fast-AC path
         k += (r >> 4) & 15; // run
         s = r & 15; // combined length
         j->code_buffer <<= s;
         j->code_bits -= s;
         // decode into unzigzag'd location
         zig = stbi__jpeg_dezigzag[k++];
         data[zig] = (short) ((r >> 8) * dequant[zig]);
      } else {
         int rs = stbi__jpeg_huff_decode(j, hac);
         if (rs < 0) return stbi__err("bad huffman code","Corrupt JPEG");
         s = rs & 15;
         r = rs >> 4;
         if (s == 0) {
            if (rs != 0xf0) break; // end block
            k += 16;
         } else {
            k += r;
            // decode into unzigzag'd location
            zig = stbi__jpeg_dezigzag[k++];
            data[zig] = (short) (stbi__extend_receive(j,s) * dequant[zig]);
         }
      }
   } while (k < 64);
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebp
movq %r8, %rbx
movq %rcx, (%rsp)
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
cmpl $0xf, 0x4824(%rdi)
jg 0xb3b9
movq %r12, %rdi
callq 0xb51f
movq %r12, %rdi
movq %r13, %rsi
callq 0xb65e
testl %eax, %eax
js 0xb500
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r15)
movups %xmm0, 0x60(%r15)
movups %xmm0, 0x50(%r15)
movups %xmm0, 0x40(%r15)
movups %xmm0, 0x30(%r15)
movups %xmm0, 0x20(%r15)
movups %xmm0, 0x10(%r15)
movups %xmm0, (%r15)
je 0xb404
movq %r12, %rdi
movl %eax, %esi
callq 0xb785
jmp 0xb406
xorl %eax, %eax
movslq %ebp, %rcx
imulq $0x60, %rcx, %rcx
addl 0x46b8(%r12,%rcx), %eax
movl %eax, 0x46b8(%r12,%rcx)
movq 0x40(%rsp), %rcx
imulw (%rcx), %ax
movw %ax, (%r15)
pushq $0x1
popq %r14
leaq 0x4f7b(%rip), %rbp      # 0x103b0
cmpl $0xf, 0x4824(%r12)
jg 0xb448
movq %r12, %rdi
callq 0xb51f
movl 0x4820(%r12), %eax
movl %eax, %ecx
shrl $0x17, %ecx
movzwl (%rbx,%rcx,2), %ecx
movslq %r14d, %r13
testl %ecx, %ecx
je 0xb4a2
movswl %cx, %edx
movl %ecx, %esi
shrl $0x4, %esi
andl $0xf, %esi
andl $0xf, %ecx
shll %cl, %eax
movl %eax, 0x4820(%r12)
subl %ecx, 0x4824(%r12)
addq %r13, %rsi
leal 0x1(%rsi), %r14d
movzbl (%rbp,%rsi), %eax
shrl $0x8, %edx
addl %eax, %eax
movq 0x40(%rsp), %rcx
imulw (%rcx,%rax), %dx
movw %dx, (%r15,%rax)
jmp 0xb4f1
movq %r12, %rdi
movq (%rsp), %rsi
callq 0xb65e
testl %eax, %eax
js 0xb500
movl %eax, %esi
andl $0xf, %esi
je 0xb4e6
shrl $0x4, %eax
addq %r13, %rax
leal 0x1(%rax), %r14d
movzbl (%rbp,%rax), %r13d
movq %r12, %rdi
callq 0xb785
addl %r13d, %r13d
movq 0x40(%rsp), %rcx
imulw (%rcx,%r13), %ax
movw %ax, (%r15,%r13)
jmp 0xb4f1
cmpl $0xf0, %eax
jne 0xb4fb
addl $0x10, %r14d
cmpl $0x40, %r14d
jl 0xb435
pushq $0x1
popq %rax
jmp 0xb510
leaq 0x5647(%rip), %rax      # 0x10b4e
movq %rax, 0x9d0a(%rip)      # 0x15218
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq