// File: /workspace/github_c_makefile_star2_O1/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__process_marker(stbi__jpeg*, int)
static int stbi__process_marker(stbi__jpeg *z, int m)
{
   int L;
   switch (m) {
      case STBI__MARKER_none: // no marker found
         return stbi__err("expected marker","Corrupt JPEG");

      case 0xDD: // DRI - specify restart interval
         if (stbi__get16be(z->s) != 4) return stbi__err("bad DRI len","Corrupt JPEG");
         z->restart_interval = stbi__get16be(z->s);
         return 1;

      case 0xDB: // DQT - define quantization table
         L = stbi__get16be(z->s)-2;
         while (L > 0) {
            int q = stbi__get8(z->s);
            int p = q >> 4, sixteen = (p != 0);
            int t = q & 15,i;
            if (p != 0 && p != 1) return stbi__err("bad DQT type","Corrupt JPEG");
            if (t > 3) return stbi__err("bad DQT table","Corrupt JPEG");

            for (i=0; i < 64; ++i)
               z->dequant[t][stbi__jpeg_dezigzag[i]] = (stbi__uint16)(sixteen ? stbi__get16be(z->s) : stbi__get8(z->s));
            L -= (sixteen ? 129 : 65);
         }
         return L==0;

      case 0xC4: // DHT - define huffman table
         L = stbi__get16be(z->s)-2;
         while (L > 0) {
            stbi_uc *v;
            int sizes[16],i,n=0;
            int q = stbi__get8(z->s);
            int tc = q >> 4;
            int th = q & 15;
            if (tc > 1 || th > 3) return stbi__err("bad DHT header","Corrupt JPEG");
            for (i=0; i < 16; ++i) {
               sizes[i] = stbi__get8(z->s);
               n += sizes[i];
            }
            L -= 17;
            if (tc == 0) {
               if (!stbi__build_huffman(z->huff_dc+th, sizes)) return 0;
               v = z->huff_dc[th].values;
            } else {
               if (!stbi__build_huffman(z->huff_ac+th, sizes)) return 0;
               v = z->huff_ac[th].values;
            }
            for (i=0; i < n; ++i)
               v[i] = stbi__get8(z->s);
            if (tc != 0)
               stbi__build_fast_ac(z->fast_ac[th], z->huff_ac + th);
            L -= n;
         }
         return L==0;
   }

   // check for comment block or APP blocks
   if ((m >= 0xE0 && m <= 0xEF) || m == 0xFE) {
      L = stbi__get16be(z->s);
      if (L < 2) {
         if (m == 0xFE)
            return stbi__err("bad COM len","Corrupt JPEG");
         else
            return stbi__err("bad APP len","Corrupt JPEG");
      }
      L -= 2;

      if (m == 0xE0 && L >= 5) { // JFIF APP0 segment
         static const unsigned char tag[5] = {'J','F','I','F','\0'};
         int ok = 1;
         int i;
         for (i=0; i < 5; ++i)
            if (stbi__get8(z->s) != tag[i])
               ok = 0;
         L -= 5;
         if (ok)
            z->jfif = 1;
      } else if (m == 0xEE && L >= 12) { // Adobe APP14 segment
         static const unsigned char tag[6] = {'A','d','o','b','e','\0'};
         int ok = 1;
         int i;
         for (i=0; i < 6; ++i)
            if (stbi__get8(z->s) != tag[i])
               ok = 0;
         L -= 6;
         if (ok) {
            stbi__get8(z->s); // version
            stbi__get16be(z->s); // flags0
            stbi__get16be(z->s); // flags1
            z->app14_color_transform = stbi__get8(z->s); // color transform
            L -= 6;
         }
      }

      stbi__skip(z->s, L);
      return 1;
   }

   return stbi__err("unknown marker","Corrupt JPEG");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %esi, %r14d
movq %rdi, %rbx
cmpl $0xdc, %esi
movq %rdi, 0x10(%rsp)
jg 0xe753
cmpl $0xc4, %r14d
je 0xe7bf
cmpl $0xdb, %r14d
jne 0xe775
movq (%rbx), %rdi
callq 0xf497
movl %eax, %r12d
addl $-0x2, %r12d
leaq 0x3488(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x9499(%rip), %rbp      # 0x17a2b
testl %r12d, %r12d
jle 0xeb3a
movq (%rbx), %r14
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xe60c
cmpl $0x0, 0x30(%r14)
je 0xe5e1
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xe5e6
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xe605
xorl %r13d, %r13d
jmp 0xe61a
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %r13b
movzbl %r13b, %eax
cmpb $0x10, %al
setb %cl
movl %eax, %edx
andl $-0x10, %edx
cmpl $0x10, %edx
sete %dl
orb %cl, %dl
jne 0xe63b
movq %rbp, 0xdbef(%rip)      # 0x1c228
jmp 0xe651
andl $0xf, %eax
cmpl $0x3, %eax
jbe 0xe658
leaq 0x93ee(%rip), %rax      # 0x17a38
movq %rax, 0xdbd7(%rip)      # 0x1c228
xorl %eax, %eax
jmp 0xe746
movq %r12, 0x10(%rsp)
movl %eax, %r14d
shll $0x7, %r14d
addq 0x8(%rsp), %r14
xorl %ebp, %ebp
leaq 0x8d5e(%rip), %r12      # 0x173d0
movq (%rbx), %r15
cmpb $0x10, %r13b
jb 0xe688
movq %r15, %rdi
callq 0xf497
jmp 0xe70a
movq 0xb8(%r15), %rax
cmpq 0xc0(%r15), %rax
jb 0xe6fc
cmpl $0x0, 0x30(%r15)
je 0xe6cb
movq 0x28(%r15), %rdi
leaq 0x38(%r15), %r12
movl 0x34(%r15), %edx
movq %r12, %rsi
callq *0x10(%r15)
testl %eax, %eax
je 0xe6cf
movq %r12, 0xb8(%r15)
cltq
addq %r12, %rax
movq %rax, 0xc0(%r15)
jmp 0xe6ee
xorl %eax, %eax
jmp 0xe70a
movl $0x0, 0x30(%r15)
movq %r12, 0xb8(%r15)
leaq 0x39(%r15), %rax
movq %rax, 0xc0(%r15)
movb $0x0, 0x38(%r15)
movq 0xb8(%r15), %rax
leaq 0x8cd4(%rip), %r12      # 0x173d0
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r15)
movzbl (%rax), %eax
movzbl (%rbp,%r12), %ecx
movw %ax, (%r14,%rcx,2)
incq %rbp
cmpq $0x40, %rbp
jne 0xe672
xorl %eax, %eax
cmpb $0x10, %r13b
setb %al
shll $0x6, %eax
movq 0x10(%rsp), %r12
addl %eax, %r12d
addl $0xffffff7f, %r12d      # imm = 0xFFFFFF7F
movb $0x1, %al
leaq 0x92e5(%rip), %rbp      # 0x17a2b
testb %al, %al
jne 0xe592
jmp 0xeb76
cmpl $0xdd, %r14d
je 0xeb3f
cmpl $0xff, %r14d
jne 0xe775
leaq 0x929f(%rip), %rax      # 0x17a0f
jmp 0xeb6f
movl %r14d, %eax
andl $-0x10, %eax
cmpl $0xe0, %eax
setne %al
cmpl $0xfe, %r14d
setne %cl
testb %al, %cl
jne 0xeb5f
movq (%rbx), %rdi
callq 0xf497
cmpl $0x1, %eax
ja 0xeb8d
cmpl $0xfe, %r14d
jne 0xec6f
leaq 0x929b(%rip), %rax      # 0x17a55
jmp 0xeb6f
movq (%rbx), %rdi
callq 0xf497
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x1a48(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x38(%rsp)
leaq 0x3688(%rbx), %rax
movq %rax, 0x30(%rsp)
testl %ebp, %ebp
jle 0xeb3a
movq (%rbx), %r14
movq 0xb8(%r14), %rax
cmpq 0xc0(%r14), %rax
jb 0xe865
cmpl $0x0, 0x30(%r14)
je 0xe83b
movq 0x28(%r14), %rdi
leaq 0x38(%r14), %r15
movl 0x34(%r14), %edx
movq %r15, %rsi
callq *0x10(%r14)
testl %eax, %eax
je 0xe83f
movq %r15, 0xb8(%r14)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r14)
jmp 0xe85e
xorl %edx, %edx
jmp 0xe872
movl $0x0, 0x30(%r14)
movq %r15, 0xb8(%r14)
leaq 0x39(%r14), %rax
movq %rax, 0xc0(%r14)
movb $0x0, 0x38(%r14)
movq 0xb8(%r14), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r14)
movb (%rax), %dl
movl %edx, %r14d
andb $0xf, %r14b
cmpb $0x20, %dl
setae %al
cmpb $0x4, %r14b
setae %cl
orb %al, %cl
je 0xe89d
leaq 0x91b5(%rip), %rax      # 0x17a46
movq %rax, 0xd990(%rip)      # 0x1c228
jmp 0xeb2e
movl %edx, 0x1c(%rsp)
movl %ebp, 0x8(%rsp)
xorl %ebp, %ebp
xorl %r13d, %r13d
movq (%rbx), %r12
movq 0xb8(%r12), %rax
cmpq 0xc0(%r12), %rax
jb 0xe929
cmpl $0x0, 0x30(%r12)
je 0xe8f9
movq 0x28(%r12), %rdi
leaq 0x38(%r12), %r15
movl 0x34(%r12), %edx
movq %r15, %rsi
callq *0x10(%r12)
testl %eax, %eax
je 0xe8fd
movq %r15, 0xb8(%r12)
cltq
addq %r15, %rax
movq %rax, 0xc0(%r12)
jmp 0xe921
xorl %eax, %eax
jmp 0xe938
movl $0x0, 0x30(%r12)
movq %r15, 0xb8(%r12)
leaq 0x39(%r12), %rax
movq %rax, 0xc0(%r12)
movb $0x0, 0x38(%r12)
movq 0xb8(%r12), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%r12)
movzbl (%rax), %eax
movl %eax, 0x40(%rsp,%rbp,4)
addl %eax, %r13d
incq %rbp
cmpq $0x10, %rbp
jne 0xe8aa
movl 0x8(%rsp), %ebp
addl $-0x11, %ebp
movzbl %r14b, %r14d
cmpb $0xf, 0x1c(%rsp)
ja 0xe97b
imulq $0x690, %r14, %rdi      # imm = 0x690
addq 0x38(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xf596
movl $0x8, %ecx
jmp 0xe996
imulq $0x690, %r14, %rdi      # imm = 0x690
addq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xf596
movl $0x1a48, %ecx           # imm = 0x1A48
testl %eax, %eax
je 0xeb2e
movq %r14, 0x28(%rsp)
movl %ebp, 0x8(%rsp)
testl %r13d, %r13d
je 0xea5b
addq %rbx, %rcx
imulq $0x690, 0x28(%rsp), %rax # imm = 0x690
leaq (%rax,%rcx), %rbp
addq $0x400, %rbp            # imm = 0x400
movl %r13d, %r14d
xorl %r12d, %r12d
movq (%rbx), %rbx
movq 0xb8(%rbx), %rax
cmpq 0xc0(%rbx), %rax
jb 0xea38
cmpl $0x0, 0x30(%rbx)
je 0xea10
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %r15
movl 0x34(%rbx), %edx
movq %r15, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0xea14
movq %r15, 0xb8(%rbx)
cltq
addq %r15, %rax
movq %rax, 0xc0(%rbx)
jmp 0xea31
xorl %eax, %eax
jmp 0xea45
movl $0x0, 0x30(%rbx)
movq %r15, 0xb8(%rbx)
leaq 0x39(%rbx), %rax
movq %rax, 0xc0(%rbx)
movb $0x0, 0x38(%rbx)
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb (%rax), %al
movb %al, (%rbp,%r12)
incq %r12
cmpq %r12, %r14
movq 0x10(%rsp), %rbx
jne 0xe9cd
cmpb $0x10, 0x1c(%rsp)
movl 0x8(%rsp), %ebp
movl $0x0, %r14d
jb 0xeb27
movq 0x28(%rsp), %rax
movl %eax, %edx
shll $0xa, %edx
addq 0x30(%rsp), %rdx
imulq $0x690, %rax, %rsi      # imm = 0x690
addq 0x20(%rsp), %rsi
xorl %edi, %edi
movzbl (%rsi,%rdi), %ecx
movw $0x0, (%rdx,%rdi,2)
cmpq $0xff, %rcx
je 0xeb17
movzbl 0x400(%rsi,%rcx), %r8d
movl %r8d, %eax
andl $0xf, %eax
je 0xeb17
movzbl 0x500(%rsi,%rcx), %ecx
leal (%rax,%rcx), %r9d
cmpl $0x9, %r9d
ja 0xeb17
movl %edi, %r11d
shll %cl, %r11d
andl $0x1ff, %r11d           # imm = 0x1FF
movb $0x9, %cl
subb %al, %cl
movl %r11d, %ebx
shrl %cl, %ebx
movl $0xffffffff, %r10d      # imm = 0xFFFFFFFF
movl %eax, %ecx
shll %cl, %r10d
orl $0x1, %r10d
cmpl $0x100, %r11d           # imm = 0x100
cmovael %r14d, %r10d
addl %ebx, %r10d
movq 0x10(%rsp), %rbx
movsbl %r10b, %eax
cmpl %r10d, %eax
jne 0xeb17
andl $-0x10, %r8d
shll $0x8, %r10d
orl %r8d, %r10d
orl %r9d, %r10d
movw %r10w, (%rdx,%rdi,2)
incq %rdi
cmpq $0x200, %rdi            # imm = 0x200
jne 0xea8d
subl %r13d, %ebp
movb $0x1, %al
jmp 0xeb30
xorl %eax, %eax
testb %al, %al
jne 0xe7ed
jmp 0xeb76
sete %al
jmp 0xeb78
movq (%rbx), %rdi
callq 0xf497
cmpl $0x4, %eax
jne 0xeb68
movq (%rbx), %rdi
callq 0xf497
movl %eax, 0x4868(%rbx)
jmp 0xed87
leaq 0x8f12(%rip), %rax      # 0x17a78
jmp 0xeb6f
leaq 0x8eb0(%rip), %rax      # 0x17a1f
movq %rax, 0xd6b2(%rip)      # 0x1c228
xorl %eax, %eax
movzbl %al, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %eax, %esi
cmpl $0xe0, %r14d
setne %al
cmpl $0x7, %esi
setb %cl
orb %al, %cl
jne 0xec7b
movl %esi, 0x8(%rsp)
movl $0x1, %r15d
xorl %r12d, %r12d
leaq 0x8eb2(%rip), %r13      # 0x17a6d
xorl %ebp, %ebp
movq (%rbx), %rbx
movq 0xb8(%rbx), %rax
cmpq 0xc0(%rbx), %rax
jb 0xec28
cmpl $0x0, 0x30(%rbx)
je 0xec00
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %r14
movl 0x34(%rbx), %edx
movq %r14, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0xec04
movq %r14, 0xb8(%rbx)
cltq
addq %r14, %rax
movq %rax, 0xc0(%rbx)
jmp 0xec21
xorl %eax, %eax
jmp 0xec35
movl $0x0, 0x30(%rbx)
movq %r14, 0xb8(%rbx)
leaq 0x39(%rbx), %rax
movq %rax, 0xc0(%rbx)
movb $0x0, 0x38(%rbx)
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb (%rax), %al
cmpb (%rbp,%r13), %al
cmovnel %r12d, %r15d
incq %rbp
cmpq $0x5, %rbp
movq 0x10(%rsp), %rbx
jne 0xebbd
movl 0x8(%rsp), %esi
addl $-0x7, %esi
testl %r15d, %r15d
je 0xed7f
movl $0x1, 0x4848(%rbx)
jmp 0xed7f
leaq 0x8deb(%rip), %rax      # 0x17a61
jmp 0xeb6f
cmpl $0xee, %r14d
setne %al
cmpl $0xe, %esi
setb %cl
orb %al, %cl
jne 0xed73
movl %esi, 0x8(%rsp)
movl $0x1, %r15d
xorl %r12d, %r12d
leaq 0x8dcb(%rip), %r13      # 0x17a72
xorl %ebp, %ebp
movq (%rbx), %rbx
movq 0xb8(%rbx), %rax
cmpq 0xc0(%rbx), %rax
jb 0xed14
cmpl $0x0, 0x30(%rbx)
je 0xecec
movq 0x28(%rbx), %rdi
leaq 0x38(%rbx), %r14
movl 0x34(%rbx), %edx
movq %r14, %rsi
callq *0x10(%rbx)
testl %eax, %eax
je 0xecf0
movq %r14, 0xb8(%rbx)
cltq
addq %r14, %rax
movq %rax, 0xc0(%rbx)
jmp 0xed0d
xorl %eax, %eax
jmp 0xed21
movl $0x0, 0x30(%rbx)
movq %r14, 0xb8(%rbx)
leaq 0x39(%rbx), %rax
movq %rax, 0xc0(%rbx)
movb $0x0, 0x38(%rbx)
movq 0xb8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0xb8(%rbx)
movb (%rax), %al
cmpb (%rbp,%r13), %al
cmovnel %r12d, %r15d
incq %rbp
cmpq $0x6, %rbp
movq 0x10(%rsp), %rbx
jne 0xeca9
testl %r15d, %r15d
je 0xed78
movq (%rbx), %rdi
callq 0xf413
movq (%rbx), %rdi
callq 0xf497
movq (%rbx), %rdi
callq 0xf497
movq (%rbx), %rdi
callq 0xf413
movzbl %al, %eax
movl %eax, 0x484c(%rbx)
movl 0x8(%rsp), %esi
addl $-0xe, %esi
jmp 0xed7f
addl $-0x2, %esi
jmp 0xed7f
movl 0x8(%rsp), %esi
addl $-0x8, %esi
movq (%rbx), %rdi
callq 0xf6d7
movb $0x1, %al
jmp 0xeb78