// File: /workspace/github_c_makefile_star2_O0/archer1357[P]Offline-Raytracer/stb_image.c
// Function: stbi__parse_entropy_coded_data
static int stbi__parse_entropy_coded_data(stbi__jpeg *z)
{
   stbi__jpeg_reset(z);
   if (z->scan_n == 1) {
      int i,j;
      #ifdef STBI_SIMD
      __declspec(align(16))
      #endif
      short data[64];
      int n = z->order[0];
      // non-interleaved data, we just need to process one block at a time,
      // in trivial scanline order
      // number of blocks to do just depends on how many actual "pixels" this
      // component has, independent of interleaved MCU blocking and such
      int w = (z->img_comp[n].x+7) >> 3;
      int h = (z->img_comp[n].y+7) >> 3;
      for (j=0; j < h; ++j) {
         for (i=0; i < w; ++i) {
            if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
            #ifdef STBI_SIMD
            stbi__idct_installed(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
            #else
            stbi__idct_block(z->img_comp[n].data+z->img_comp[n].w2*j*8+i*8, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
            #endif
            // every data block is an MCU, so countdown the restart interval
            if (--z->todo <= 0) {
               if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
               // if it's NOT a restart, then just bail, so we get corrupt data
               // rather than no data
               if (!STBI__RESTART(z->marker)) return 1;
               stbi__jpeg_reset(z);
            }
         }
      }
   } else { // interleaved!
      int i,j,k,x,y;
      short data[64];
      for (j=0; j < z->img_mcu_y; ++j) {
         for (i=0; i < z->img_mcu_x; ++i) {
            // scan an interleaved mcu... process scan_n components in order
            for (k=0; k < z->scan_n; ++k) {
               int n = z->order[k];
               // scan out an mcu's worth of this component; that's just determined
               // by the basic H and V specified for the component
               for (y=0; y < z->img_comp[n].v; ++y) {
                  for (x=0; x < z->img_comp[n].h; ++x) {
                     int x2 = (i*z->img_comp[n].h + x)*8;
                     int y2 = (j*z->img_comp[n].v + y)*8;
                     if (!stbi__jpeg_decode_block(z, data, z->huff_dc+z->img_comp[n].hd, z->huff_ac+z->img_comp[n].ha, n)) return 0;
                     #ifdef STBI_SIMD
                     stbi__idct_installed(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant2[z->img_comp[n].tq]);
                     #else
                     stbi__idct_block(z->img_comp[n].data+z->img_comp[n].w2*y2+x2, z->img_comp[n].w2, data, z->dequant[z->img_comp[n].tq]);
                     #endif
                  }
               }
            }
            // after all interleaved components, that's an interleaved MCU,
            // so now count down the restart interval
            if (--z->todo <= 0) {
               if (z->code_bits < 24) stbi__grow_buffer_unsafe(z);
               // if it's NOT a restart, then just bail, so we get corrupt data
               // rather than no data
               if (!STBI__RESTART(z->marker)) return 1;
               stbi__jpeg_reset(z);
            }
         }
      }
   }
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x150, %rsp            # imm = 0x150
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
callq 0x4174f0
movq -0x10(%rbp), %rax
cmpl $0x1, 0x36d0(%rax)
jne 0x417199
movq -0x10(%rbp), %rax
movl 0x36d4(%rax), %eax
movl %eax, -0xa4(%rbp)
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %eax
addl $0x7, %eax
sarl $0x3, %eax
movl %eax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %eax
addl $0x7, %eax
sarl $0x3, %eax
movl %eax, -0xac(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0xac(%rbp), %eax
jge 0x417194
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jge 0x417184
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rax
imulq $0x690, %rax, %rax      # imm = 0x690
addq %rax, %rdx
movq -0x10(%rbp), %rcx
addq $0x1a48, %rcx           # imm = 0x1A48
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %r8
imulq $0x48, %r8, %r8
addq %r8, %rax
movslq 0x14(%rax), %rax
imulq $0x690, %rax, %rax      # imm = 0x690
addq %rax, %rcx
movl -0xa4(%rbp), %r8d
callq 0x417590
cmpl $0x0, %eax
jne 0x41706a
movl $0x0, -0x4(%rbp)
jmp 0x4174db
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
imull -0x18(%rbp), %eax
shll $0x3, %eax
cltq
addq %rax, %rdi
movl -0x14(%rbp), %eax
shll $0x3, %eax
cltq
addq %rax, %rdi
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %esi
leaq -0xa0(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq $0x3488, %rcx           # imm = 0x3488
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0xa4(%rbp), %r8
imulq $0x48, %r8, %r8
addq %r8, %rax
movslq 0xc(%rax), %rax
shlq $0x6, %rax
addq %rax, %rcx
callq 0x417710
movq -0x10(%rbp), %rcx
movl 0x36e8(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x36e8(%rcx)
cmpl $0x0, %eax
jg 0x417174
movq -0x10(%rbp), %rax
cmpl $0x18, 0x36c4(%rax)
jge 0x41713b
movq -0x10(%rbp), %rdi
callq 0x418110
movq -0x10(%rbp), %rax
movzbl 0x36c8(%rax), %eax
cmpl $0xd0, %eax
jl 0x41715f
movq -0x10(%rbp), %rax
movzbl 0x36c8(%rax), %eax
cmpl $0xd7, %eax
jle 0x41716b
movl $0x1, -0x4(%rbp)
jmp 0x4174db
movq -0x10(%rbp), %rdi
callq 0x4174f0
jmp 0x417176
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x416fd4
jmp 0x417186
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x416fbe
jmp 0x4174d4
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x3594(%rcx), %eax
jge 0x4174d2
movl $0x0, -0xb0(%rbp)
movl -0xb0(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x3590(%rcx), %eax
jge 0x4174bc
movl $0x0, -0xb8(%rbp)
movl -0xb8(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x36d0(%rcx), %eax
jge 0x417442
movq -0x10(%rbp), %rax
movslq -0xb8(%rbp), %rcx
movl 0x36d4(%rax,%rcx,4), %eax
movl %eax, -0x144(%rbp)
movl $0x0, -0xc0(%rbp)
movl -0xc0(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x35a0, %rcx           # imm = 0x35A0
movslq -0x144(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x8(%rcx), %eax
jge 0x41742c
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x35a0, %rcx           # imm = 0x35A0
movslq -0x144(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
cmpl 0x4(%rcx), %eax
jge 0x417416
movl -0xb0(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x35a0, %rcx           # imm = 0x35A0
movslq -0x144(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
imull 0x4(%rcx), %eax
addl -0xbc(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x148(%rbp)
movl -0xb4(%rbp), %eax
movq -0x10(%rbp), %rcx
addq $0x35a0, %rcx           # imm = 0x35A0
movslq -0x144(%rbp), %rdx
imulq $0x48, %rdx, %rdx
addq %rdx, %rcx
imull 0x8(%rcx), %eax
addl -0xc0(%rbp), %eax
shll $0x3, %eax
movl %eax, -0x14c(%rbp)
movq -0x10(%rbp), %rdi
leaq -0x140(%rbp), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movslq 0x10(%rax), %rax
imulq $0x690, %rax, %rax      # imm = 0x690
addq %rax, %rdx
movq -0x10(%rbp), %rcx
addq $0x1a48, %rcx           # imm = 0x1A48
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %r8
imulq $0x48, %r8, %r8
addq %r8, %rax
movslq 0x14(%rax), %rax
imulq $0x690, %rax, %rax      # imm = 0x690
addq %rax, %rcx
movl -0x144(%rbp), %r8d
callq 0x417590
cmpl $0x0, %eax
jne 0x417360
movl $0x0, -0x4(%rbp)
jmp 0x4174db
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %eax
imull -0x14c(%rbp), %eax
cltq
addq %rax, %rdi
movslq -0x148(%rbp), %rax
addq %rax, %rdi
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %rcx
imulq $0x48, %rcx, %rcx
addq %rcx, %rax
movl 0x24(%rax), %esi
leaq -0x140(%rbp), %rdx
movq -0x10(%rbp), %rcx
addq $0x3488, %rcx           # imm = 0x3488
movq -0x10(%rbp), %rax
addq $0x35a0, %rax           # imm = 0x35A0
movslq -0x144(%rbp), %r8
imulq $0x48, %r8, %r8
addq %r8, %rax
movslq 0xc(%rax), %rax
shlq $0x6, %rax
addq %rax, %rcx
callq 0x417710
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x41724d
jmp 0x417418
movl -0xc0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc0(%rbp)
jmp 0x41721b
jmp 0x41742e
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
jmp 0x4171e3
movq -0x10(%rbp), %rcx
movl 0x36e8(%rcx), %eax
addl $-0x1, %eax
movl %eax, 0x36e8(%rcx)
cmpl $0x0, %eax
jg 0x4174a6
movq -0x10(%rbp), %rax
cmpl $0x18, 0x36c4(%rax)
jge 0x417470
movq -0x10(%rbp), %rdi
callq 0x418110
movq -0x10(%rbp), %rax
movzbl 0x36c8(%rax), %eax
cmpl $0xd0, %eax
jl 0x417494
movq -0x10(%rbp), %rax
movzbl 0x36c8(%rax), %eax
cmpl $0xd7, %eax
jle 0x41749d
movl $0x1, -0x4(%rbp)
jmp 0x4174db
movq -0x10(%rbp), %rdi
callq 0x4174f0
jmp 0x4174a8
movl -0xb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb0(%rbp)
jmp 0x4171c3
jmp 0x4174be
movl -0xb4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb4(%rbp)
jmp 0x4171a3
jmp 0x4174d4
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x150, %rsp            # imm = 0x150
popq %rbp
retq
nopw (%rax,%rax)