// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__jpeg_decode_block_prog_dc(stbi__jpeg*, short*, stbi__huffman*, int)
static int stbi__jpeg_decode_block_prog_dc(stbi__jpeg *j, short data[64], stbi__huffman *hdc, int b)
{
   int diff,dc;
   int t;
   if (j->spec_end != 0) return stbi__err("can't merge dc and ac", "Corrupt JPEG");

   if (j->code_bits < 16) stbi__grow_buffer_unsafe(j);

   if (j->succ_high == 0) {
      // first scan for DC coefficient, must be first
      memset(data,0,64*sizeof(data[0])); // 0 all the ac values now
      t = stbi__jpeg_huff_decode(j, hdc);
      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 << j->succ_low);
   } else {
      // refinement scan for DC coefficient
      if (stbi__jpeg_get_bit(j))
         data[0] += (short) (1 << j->succ_low);
   }
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
cmpl $0x0, 0x4738(%rdi)
je 0x1f454
leaq 0xd013(%rip), %rax      # 0x2c455
movq %rax, 0x17f47(%rip)     # 0x37390
xorl %eax, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movl %ecx, %ebp
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0xf, 0x4724(%rdi)
jg 0x1f470
movq %r14, %rdi
callq 0x1f2db
cmpl $0x0, 0x473c(%r14)
je 0x1f4ca
movl 0x4724(%r14), %eax
testl %eax, %eax
jg 0x1f494
movq %r14, %rdi
callq 0x1f2db
movl 0x4724(%r14), %eax
movl 0x4720(%r14), %ecx
leal (%rcx,%rcx), %edx
movl %edx, 0x4720(%r14)
decl %eax
movl %eax, 0x4724(%r14)
movl $0x1, %eax
testl %ecx, %ecx
jns 0x1f44b
movb 0x4740(%r14), %cl
movl $0x1, %edx
shll %cl, %edx
addw %dx, (%rbx)
jmp 0x1f44b
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%rbx)
movups %xmm0, 0x60(%rbx)
movups %xmm0, 0x50(%rbx)
movups %xmm0, 0x40(%rbx)
movups %xmm0, 0x30(%rbx)
movups %xmm0, 0x20(%rbx)
movups %xmm0, 0x10(%rbx)
movups %xmm0, (%rbx)
cmpl $0xf, 0x4724(%r14)
jg 0x1f4fe
movq %r14, %rdi
callq 0x1f2db
movl 0x4720(%r14), %edx
movl %edx, %eax
shrl $0x17, %eax
movzbl (%r15,%rax), %edi
cmpq $0xff, %rdi
je 0x1f54d
movzbl 0x500(%r15,%rdi), %ecx
movl 0x4724(%r14), %esi
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
movl %esi, %eax
subl %ecx, %eax
jl 0x1f613
shll %cl, %edx
movl %edx, 0x4720(%r14)
movl %eax, 0x4724(%r14)
jmp 0x1f5ff
movl %edx, %eax
shrl $0x10, %eax
xorl %r8d, %r8d
movq %r8, %rcx
incq %r8
cmpl 0x62c(%r15,%rcx,4), %eax
jae 0x1f555
movl 0x4724(%r14), %esi
cmpq $0x8, %r8
jne 0x1f57e
addl $-0x10, %esi
movl %esi, 0x4724(%r14)
jmp 0x1f586
leaq 0x9(%r8), %rax
cmpl %eax, %esi
jge 0x1f591
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x1f613
movb $0x17, %cl
subb %r8b, %cl
movl %edx, %edi
shrl %cl, %edi
leaq 0xc8df(%rip), %r9       # 0x2be80
andl 0x24(%r9,%r8,4), %edi
addl 0x670(%r15,%r8,4), %edi
movslq %edi, %rdi
movzbl 0x500(%r15,%rdi), %r10d
movl %r10d, %ecx
negb %cl
movl %edx, %r11d
shrl %cl, %r11d
andl (%r9,%r10,4), %r11d
movzwl 0x200(%r15,%rdi,2), %ecx
cmpl %ecx, %r11d
jne 0x1f6bd
movl %esi, %r9d
subl %r8d, %r9d
addl $-0x9, %r9d
subl %r8d, %esi
movl %eax, %ecx
shll %cl, %edx
addl $-0x9, %esi
movl %r9d, 0x4724(%r14)
movl %edx, 0x4720(%r14)
movl %esi, %eax
movzbl 0x400(%r15,%rdi), %r12d
movl %eax, %esi
testl %r12d, %r12d
je 0x1f69a
cmpl %r12d, %esi
jge 0x1f620
movq %r14, %rdi
callq 0x1f2db
cmpl $0x11, %r12d
jae 0x1f69e
movl 0x4720(%r14), %esi
movl %esi, %edx
movl %r12d, %ecx
roll %cl, %edx
movl %r12d, %ecx
leaq 0xc842(%rip), %rax      # 0x2be80
movl (%rax,%rcx,4), %eax
movl %eax, %edi
notl %edi
andl %edx, %edi
movl %edi, 0x4720(%r14)
subl %r12d, 0x4724(%r14)
andl %eax, %edx
xorl %eax, %eax
testl %esi, %esi
js 0x1f667
leaq 0xc86c(%rip), %rax      # 0x2bed0
movl (%rax,%rcx,4), %eax
addl %edx, %eax
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
addl 0x45b8(%r14,%rcx), %eax
movl %eax, 0x45b8(%r14,%rcx)
movb 0x4740(%r14), %cl
shll %cl, %eax
movw %ax, (%rbx)
movl $0x1, %eax
jmp 0x1f44b
xorl %eax, %eax
jmp 0x1f669
leaq 0xcd45(%rip), %rdi      # 0x2c3ea
leaq 0xcced(%rip), %rsi      # 0x2c399
leaq 0xcd76(%rip), %rcx      # 0x2c429
movl $0x686, %edx            # imm = 0x686
callq 0x41f0
leaq 0xcc83(%rip), %rdi      # 0x2c347
leaq 0xccce(%rip), %rsi      # 0x2c399
leaq 0xccde(%rip), %rcx      # 0x2c3b0
movl $0x671, %edx            # imm = 0x671
callq 0x41f0