// File: /workspace/github_c_makefile_star2_O0/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__jpeg_decode_block
static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, int b)
{
   int diff,dc,k;
   int 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;

   // decode AC components, see JPEG spec
   k = 1;
   do {
      int r,s;
      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
         data[stbi__jpeg_dezigzag[k++]] = (short) stbi__extend_receive(j,s);
      }
   } while (k < 64);
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x4181e0
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
jge 0x4175d6
leaq 0xcdf7e(%rip), %rdi     # 0x4e5547
callq 0x411080
movl %eax, -0x4(%rbp)
jmp 0x4176f8
movq -0x18(%rbp), %rdi
xorl %esi, %esi
movl $0x80, %edx
callq 0x4010e0
cmpl $0x0, -0x3c(%rbp)
je 0x4175fd
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0x418410
movl %eax, -0x4c(%rbp)
jmp 0x417604
xorl %eax, %eax
movl %eax, -0x4c(%rbp)
jmp 0x417604
movl -0x4c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x2c(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %eax
addl -0x30(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %ecx
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x2c(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x18(%rax)
movl -0x34(%rbp), %eax
movw %ax, %cx
movq -0x18(%rbp), %rax
movw %cx, (%rax)
movl $0x1, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x4181e0
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jge 0x41767e
leaq 0xcded3(%rip), %rdi     # 0x4e5547
callq 0x411080
movl %eax, -0x4(%rbp)
jmp 0x4176f8
movl -0x48(%rbp), %eax
andl $0xf, %eax
movl %eax, -0x44(%rbp)
movl -0x48(%rbp), %eax
sarl $0x4, %eax
movl %eax, -0x40(%rbp)
cmpl $0x0, -0x44(%rbp)
jne 0x4176ac
cmpl $0xf0, -0x48(%rbp)
je 0x4176a1
jmp 0x4176f1
movl -0x38(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x38(%rbp)
jmp 0x4176e5
movl -0x40(%rbp), %eax
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movl -0x44(%rbp), %esi
callq 0x418410
movw %ax, %dx
movq -0x18(%rbp), %rax
movl -0x38(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x38(%rbp)
movslq %ecx, %rsi
leaq 0x10ebc3(%rip), %rcx    # 0x5262a0
movzbl (%rcx,%rsi), %ecx
movw %dx, (%rax,%rcx,2)
jmp 0x4176e7
cmpl $0x40, -0x38(%rbp)
jl 0x417657
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)