// File: /workspace/github_cpp_makefile_star2_O1/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 0x1eae9
leaq 0xe8be(%rip), %rax      # 0x2d395
movq %rax, 0x198d2(%rip)     # 0x383b0
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 0x1eb05
movq %r14, %rdi
callq 0x1e962
cmpl $0x0, 0x473c(%r14)
je 0x1eb55
cmpl $0x0, 0x4724(%r14)
jg 0x1eb21
movq %r14, %rdi
callq 0x1e962
movl 0x4720(%r14), %ecx
leal (%rcx,%rcx), %eax
movl %eax, 0x4720(%r14)
decl 0x4724(%r14)
movl $0x1, %eax
testl %ecx, %ecx
jns 0x1eae0
movb 0x4740(%r14), %cl
movl $0x1, %edx
shll %cl, %edx
addw %dx, (%rbx)
jmp 0x1eae0
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 0x1eb89
movq %r14, %rdi
callq 0x1e962
movl 0x4720(%r14), %edx
movl %edx, %eax
shrl $0x17, %eax
movzbl (%r15,%rax), %eax
cmpq $0xff, %rax
je 0x1ebde
movzbl 0x500(%r15,%rax), %ecx
movl 0x4724(%r14), %esi
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
subl %ecx, %esi
jl 0x1ec8e
shll %cl, %edx
movl %edx, 0x4720(%r14)
movl %esi, 0x4724(%r14)
movzbl 0x400(%r15,%rax), %r12d
jmp 0x1ec8e
movl %edx, %eax
shrl $0x10, %eax
xorl %edi, %edi
movq %rdi, %rcx
incq %rdi
cmpl 0x62c(%r15,%rcx,4), %eax
jae 0x1ebe5
movl 0x4724(%r14), %esi
cmpq $0x8, %rdi
jne 0x1ec14
addl $-0x10, %esi
movl %esi, 0x4724(%r14)
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
jmp 0x1ec8e
leaq 0x9(%rdi), %rax
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
cmpl %eax, %esi
jl 0x1ec8e
movb $0x17, %cl
subb %dil, %cl
movl %edx, %r8d
shrl %cl, %r8d
leaq 0xe18c(%rip), %r9       # 0x2cdc0
andl 0x24(%r9,%rdi,4), %r8d
addl 0x670(%r15,%rdi,4), %r8d
movslq %r8d, %r8
movzbl 0x500(%r15,%r8), %r10d
movl %r10d, %ecx
negb %cl
movl %edx, %r11d
shrl %cl, %r11d
andl (%r9,%r10,4), %r11d
movzwl 0x200(%r15,%r8,2), %ecx
cmpl %ecx, %r11d
jne 0x1ed41
subl %edi, %esi
movl %eax, %ecx
shll %cl, %edx
addl $-0x9, %esi
movl %esi, 0x4724(%r14)
movl %edx, 0x4720(%r14)
movzbl 0x400(%r15,%r8), %r12d
testl %r12d, %r12d
je 0x1ecef
cmpl %r12d, 0x4724(%r14)
jge 0x1eca4
movq %r14, %rdi
callq 0x1e962
cmpl $0x11, %r12d
jae 0x1ed22
movl 0x4720(%r14), %esi
movl %esi, %edx
movl %r12d, %ecx
roll %cl, %edx
movl %r12d, %ecx
leaq 0xe0fe(%rip), %rax      # 0x2cdc0
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 0x1eceb
leaq 0xe128(%rip), %rax      # 0x2ce10
movl (%rax,%rcx,4), %eax
addl %edx, %eax
jmp 0x1ecf1
xorl %eax, %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 0x1eae0
leaq 0xe601(%rip), %rdi      # 0x2d32a
leaq 0xe5a9(%rip), %rsi      # 0x2d2d9
leaq 0xe632(%rip), %rcx      # 0x2d369
movl $0x686, %edx            # imm = 0x686
callq 0x4200
leaq 0xe53f(%rip), %rdi      # 0x2d287
leaq 0xe58a(%rip), %rsi      # 0x2d2d9
leaq 0xe59a(%rip), %rcx      # 0x2d2f0
movl $0x671, %edx            # imm = 0x671
callq 0x4200