// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__jpeg_decode_block(stbi__jpeg*, short*, stbi__huffman*, stbi__huffman*, short*, int, unsigned char*)
static int stbi__jpeg_decode_block(stbi__jpeg *j, short data[64], stbi__huffman *hdc, stbi__huffman *hac, stbi__int16 *fac, int b, stbi_uc *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, %r14
movq %rcx, %r15
movq %rdx, %r13
movq %rsi, %r12
movq %rdi, %rbx
cmpl $0xf, 0x4724(%rdi)
jg 0x1ee99
movq %rbx, %rdi
callq 0x1f2db
cmpl $0xf, 0x4724(%rbx)
jg 0x1ee99
movq %rbx, %rdi
callq 0x1f2db
movl 0x4720(%rbx), %esi
movl %esi, %eax
shrl $0x17, %eax
movzbl (%r13,%rax), %r8d
cmpq $0xff, %r8
je 0x1eed9
movzbl 0x500(%r13,%r8), %ecx
movl 0x4724(%rbx), %eax
subl %ecx, %eax
jl 0x1ef0f
shll %cl, %esi
movl %esi, 0x4720(%rbx)
movl %eax, 0x4724(%rbx)
jmp 0x1ef85
movl %esi, %eax
shrl $0x10, %eax
xorl %edi, %edi
movq %rdi, %rcx
incq %rdi
cmpl 0x62c(%r13,%rcx,4), %eax
jae 0x1eee0
movl 0x4724(%rbx), %edx
cmpq $0x8, %rdi
jne 0x1ef07
addl $-0x10, %edx
movl %edx, 0x4724(%rbx)
jmp 0x1ef0f
leaq 0x9(%rdi), %rax
cmpl %eax, %edx
jge 0x1ef24
leaq 0xd420(%rip), %rax      # 0x2c336
movq %rax, 0x18473(%rip)     # 0x37390
xorl %eax, %eax
jmp 0x1f28e
movb $0x17, %cl
subb %dil, %cl
movl %esi, %r8d
shrl %cl, %r8d
leaq 0xcf4a(%rip), %r9       # 0x2be80
andl 0x24(%r9,%rdi,4), %r8d
addl 0x670(%r13,%rdi,4), %r8d
movslq %r8d, %r8
movzbl 0x500(%r13,%r8), %r10d
movl %r10d, %ecx
negb %cl
movl %esi, %r11d
shrl %cl, %r11d
andl (%r9,%r10,4), %r11d
movzwl 0x200(%r13,%r8,2), %ecx
cmpl %ecx, %r11d
jne 0x1f29d
subl %edi, %edx
addl $-0x9, %edx
movl %edx, 0x4724(%rbx)
movl %eax, %ecx
shll %cl, %esi
movl %esi, 0x4720(%rbx)
movzbl 0x400(%r13,%r8), %r13d
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r12)
movups %xmm0, 0x60(%r12)
movups %xmm0, 0x50(%r12)
movups %xmm0, 0x40(%r12)
movups %xmm0, 0x30(%r12)
movups %xmm0, 0x20(%r12)
movups %xmm0, 0x10(%r12)
movups %xmm0, (%r12)
movl 0x4724(%rbx), %edx
testl %r13d, %r13d
je 0x1f036
cmpl %r13d, %edx
jge 0x1efd8
movq %rbx, %rdi
callq 0x1f2db
cmpb $0x11, %r13b
jae 0x1f2bc
movl 0x4720(%rbx), %edi
movl 0x4724(%rbx), %edx
movl %edi, %eax
movl %r13d, %ecx
roll %cl, %eax
leal (,%r13,4), %esi
leaq 0xce7c(%rip), %rcx      # 0x2be80
movl (%rsi,%rcx), %ecx
movl %ecx, %r8d
notl %r8d
andl %eax, %r8d
movl %r8d, 0x4720(%rbx)
andl %eax, %ecx
subl %r13d, %edx
movl %edx, 0x4724(%rbx)
xorl %eax, %eax
testl %edi, %edi
js 0x1f032
leaq 0xcea1(%rip), %rax      # 0x2bed0
movl (%rsi,%rax), %eax
addl %ecx, %eax
jmp 0x1f038
xorl %eax, %eax
movq 0x40(%rsp), %r13
movslq %ebp, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x5, %rcx
addl 0x45b8(%rbx,%rcx), %eax
movl %eax, 0x45b8(%rbx,%rcx)
movzbl (%r13), %ecx
imull %eax, %ecx
movw %cx, (%r12)
movl $0x1, %ebp
movq %r14, (%rsp)
cmpl $0xf, %edx
jg 0x1f079
movq %rbx, %rdi
callq 0x1f2db
movl 0x4720(%rbx), %esi
movl %esi, %eax
shrl $0x17, %eax
movzwl (%r14,%rax,2), %ecx
testl %ecx, %ecx
je 0x1f0db
movswl %cx, %eax
movl %ecx, %edx
shrl $0x4, %edx
andl $0xf, %edx
andl $0xf, %ecx
shll %cl, %esi
movslq %ebp, %rdi
addq %rdx, %rdi
movl %esi, 0x4720(%rbx)
movl 0x4724(%rbx), %edx
subl %ecx, %edx
movl %edx, 0x4724(%rbx)
leal 0x1(%rdi), %ebp
leaq 0xcd6f(%rip), %rcx      # 0x2be30
movzbl (%rcx,%rdi), %ecx
sarl $0x8, %eax
movzbl (%r13,%rcx), %esi
imull %eax, %esi
movw %si, (%r12,%rcx,2)
jmp 0x1f280
cmpl $0xf, 0x4724(%rbx)
jg 0x1f0f7
movq %rbx, %rdi
callq 0x1f2db
movl 0x4720(%rbx), %esi
movl %esi, %eax
shrl $0x17, %eax
movzbl (%r15,%rax), %edi
cmpq $0xff, %rdi
je 0x1f12f
movzbl 0x500(%r15,%rdi), %ecx
movl 0x4724(%rbx), %edx
subl %ecx, %edx
jl 0x1ef0f
shll %cl, %esi
movl %esi, 0x4720(%rbx)
movl %edx, 0x4724(%rbx)
jmp 0x1f1cb
movl %esi, %eax
shrl $0x10, %eax
xorl %r8d, %r8d
movq %r8, %rcx
incq %r8
cmpl 0x62c(%r15,%rcx,4), %eax
jae 0x1f137
movl 0x4724(%rbx), %edx
cmpq $0x8, %r8
je 0x1eefc
leaq 0x9(%r8), %rax
cmpl %eax, %edx
jl 0x1ef0f
movb $0x17, %cl
subb %r8b, %cl
movl %esi, %edi
shrl %cl, %edi
leaq 0xcd0d(%rip), %r11      # 0x2be80
andl 0x24(%r11,%r8,4), %edi
addl 0x670(%r15,%r8,4), %edi
movslq %edi, %rdi
movzbl 0x500(%r15,%rdi), %r9d
movl %r9d, %ecx
negb %cl
movl %esi, %r10d
shrl %cl, %r10d
andl (%r11,%r9,4), %r10d
movzwl 0x200(%r15,%rdi,2), %ecx
cmpl %ecx, %r10d
jne 0x1f29d
movl %edx, %ecx
subl %r8d, %ecx
addl $-0x9, %ecx
subl %r8d, %edx
addl $-0x9, %edx
movl %ecx, 0x4724(%rbx)
movl %eax, %ecx
shll %cl, %esi
movl %esi, 0x4720(%rbx)
movzbl 0x400(%r15,%rdi), %eax
movl %eax, %r13d
andl $0xf, %r13d
je 0x1f271
shrl $0x4, %eax
movslq %ebp, %rbp
addq %rax, %rbp
leaq 0xcc3f(%rip), %rax      # 0x2be30
movzbl (%rax,%rbp), %r14d
cmpl %r13d, %edx
jge 0x1f20f
movq %rbx, %rdi
callq 0x1f2db
movl 0x4720(%rbx), %esi
movl 0x4724(%rbx), %edx
movl %esi, %eax
movl %r13d, %ecx
roll %cl, %eax
movl %r13d, %edi
shll $0x2, %edi
leaq 0xcc5d(%rip), %rcx      # 0x2be80
movl (%rdi,%rcx), %ecx
movl %ecx, %r8d
notl %r8d
andl %eax, %r8d
movl %r8d, 0x4720(%rbx)
subl %r13d, %edx
movl %edx, 0x4724(%rbx)
xorl %r8d, %r8d
testl %esi, %esi
js 0x1f251
leaq 0xcc83(%rip), %rsi      # 0x2bed0
movl (%rdi,%rsi), %r8d
incl %ebp
andl %ecx, %eax
addl %r8d, %eax
movq 0x40(%rsp), %r13
movzbl (%r13,%r14), %ecx
imull %eax, %ecx
movw %cx, (%r12,%r14,2)
movq (%rsp), %r14
jmp 0x1f280
cmpl $0xf0, %eax
jne 0x1f289
addl $0x10, %ebp
movq 0x40(%rsp), %r13
cmpl $0x40, %ebp
jl 0x1f06c
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd0a3(%rip), %rdi      # 0x2c347
leaq 0xd0ee(%rip), %rsi      # 0x2c399
leaq 0xd0fe(%rip), %rcx      # 0x2c3b0
movl $0x671, %edx            # imm = 0x671
callq 0x41f0
leaq 0xd127(%rip), %rdi      # 0x2c3ea
leaq 0xd0cf(%rip), %rsi      # 0x2c399
leaq 0xd158(%rip), %rcx      # 0x2c429
movl $0x686, %edx            # imm = 0x686
callq 0x41f0