// File: /workspace/github_c_makefile_star2_O2/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 $0x78, %rsp
movq %rdi, %rbx
cmpl $0xc4, %esi
je 0xab13
movl %esi, %r14d
cmpl $0xdb, %esi
je 0xaa3b
cmpl $0xdd, %r14d
je 0xaaef
cmpl $0xff, %r14d
jne 0xacdd
leaq 0x5fb9(%rip), %rax      # 0x109ef
jmp 0xad9b
movq (%rbx), %rdi
callq 0xaf12
movl %eax, %r14d
addl $-0x2, %r14d
leaq 0x3488(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0x5953(%rip), %r12      # 0x103b0
testl %r14d, %r14d
jle 0xad1c
movq (%rbx), %rdi
callq 0xae91
movl %eax, %ebp
movzbl %al, %eax
cmpb $0x10, %al
setb %cl
movl %eax, %edx
andl $-0x10, %edx
cmpl $0x10, %edx
sete %dl
orb %cl, %dl
je 0xad36
andl $0xf, %eax
cmpl $0x3, %eax
ja 0xad48
movl %eax, %r13d
shll $0x7, %r13d
addq 0x8(%rsp), %r13
xorl %r15d, %r15d
cmpq $0x40, %r15
je 0xaad4
movq (%rbx), %rdi
cmpb $0x10, %bpl
jb 0xaabc
callq 0xaf12
jmp 0xaac4
callq 0xae91
movzbl %al, %eax
movzbl (%r15,%r12), %ecx
movw %ax, (%r13,%rcx,2)
incq %r15
jmp 0xaaa6
xorl %eax, %eax
cmpb $0x10, %bpl
setb %al
shll $0x6, %eax
addl %eax, %r14d
addl $0xffffff7f, %r14d      # imm = 0xFFFFFF7F
jmp 0xaa5d
movq (%rbx), %rdi
callq 0xaf12
cmpl $0x4, %eax
jne 0xad24
movq (%rbx), %rdi
callq 0xaf12
movl %eax, 0x4868(%rbx)
jmp 0xae50
movq (%rbx), %rdi
callq 0xaf12
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x1a48(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x3688(%rbx), %rax
movq %rax, 0x18(%rsp)
testl %ebp, %ebp
jle 0xad1c
movq (%rbx), %rdi
callq 0xae91
cmpb $0x1f, %al
ja 0xad3f
movl %eax, %r15d
movl %eax, %r14d
andb $0xf, %r14b
cmpb $0x3, %r14b
ja 0xad3f
movl %ebp, 0x8(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpq $0x10, %r13
je 0xab95
movq (%rbx), %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, 0x30(%rsp,%r13,4)
addl %eax, %r12d
incq %r13
jmp 0xab77
movzbl %r14b, %r14d
imulq $0x690, %r14, %rdi      # imm = 0x690
cmpb $0xf, %r15b
ja 0xabba
addq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xaf37
pushq $0x8
popq %rcx
jmp 0xabce
addq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xaf37
movl $0x1a48, %ecx           # imm = 0x1A48
testl %eax, %eax
je 0xada2
addl $-0x11, 0x8(%rsp)
addq %rbx, %rcx
movq %r14, 0x28(%rsp)
imulq $0x690, %r14, %rax      # imm = 0x690
leaq (%rax,%rcx), %r13
addq $0x400, %r13            # imm = 0x400
movl %r12d, %ebp
xorl %r14d, %r14d
cmpq %r14, %rbp
je 0xac12
movq (%rbx), %rdi
callq 0xae91
movb %al, (%r13,%r14)
incq %r14
jmp 0xabfb
cmpb $0x10, %r15b
movl $0x0, %r14d
pushq $-0x1
popq %r15
jae 0xac2e
movl 0x8(%rsp), %ebp
subl %r12d, %ebp
jmp 0xab41
movq 0x28(%rsp), %rax
movl %eax, %edx
shll $0xa, %edx
addq 0x18(%rsp), %rdx
imulq $0x690, %rax, %rsi      # imm = 0x690
addq 0x10(%rsp), %rsi
xorl %edi, %edi
cmpq $0x200, %rdi            # imm = 0x200
je 0xac22
movzbl (%rsi,%rdi), %ecx
andw $0x0, (%rdx,%rdi,2)
cmpq $0xff, %rcx
je 0xacd5
movzbl 0x400(%rsi,%rcx), %r8d
movl %r8d, %eax
andl $0xf, %eax
je 0xacd5
movzbl 0x500(%rsi,%rcx), %ecx
leal (%rax,%rcx), %r9d
cmpl $0x9, %r9d
ja 0xacd5
movl %edi, %r11d
shll %cl, %r11d
andl $0x1ff, %r11d           # imm = 0x1FF
movb $0x9, %cl
subb %al, %cl
movl %r11d, %ebp
shrl %cl, %ebp
movl %r15d, %r10d
movl %eax, %ecx
shll %cl, %r10d
orl $0x1, %r10d
cmpl $0x100, %r11d           # imm = 0x100
cmovael %r14d, %r10d
addl %ebp, %r10d
movsbl %r10b, %eax
cmpl %r10d, %eax
jne 0xacd5
andl $-0x10, %r8d
shll $0x8, %r10d
orl %r8d, %r10d
orl %r9d, %r10d
movw %r10w, (%rdx,%rdi,2)
incq %rdi
jmp 0xac4b
movl %r14d, %eax
andl $-0x10, %eax
cmpl $0xe0, %eax
setne %al
cmpl $0xfe, %r14d
setne %cl
testb %al, %cl
jne 0xad2d
movq (%rbx), %rdi
callq 0xaf12
cmpl $0x1, %eax
ja 0xad51
cmpl $0xfe, %r14d
jne 0xad94
leaq 0x5d1b(%rip), %rax      # 0x10a35
jmp 0xad9b
sete %al
jmp 0xada4
leaq 0x5cd4(%rip), %rax      # 0x109ff
jmp 0xad9b
leaq 0x5d24(%rip), %rax      # 0x10a58
jmp 0xad9b
leaq 0x5cce(%rip), %rax      # 0x10a0b
jmp 0xad9b
leaq 0x5ce0(%rip), %rax      # 0x10a26
jmp 0xad9b
leaq 0x5cc9(%rip), %rax      # 0x10a18
jmp 0xad9b
movl %eax, %ebp
cmpl $0xe0, %r14d
setne %al
cmpl $0x7, %ebp
setb %cl
orb %al, %cl
jne 0xadb6
pushq $0x1
popq %r14
xorl %r15d, %r15d
leaq 0x5cd8(%rip), %r12      # 0x10a4d
xorl %r13d, %r13d
cmpq $0x5, %r13
je 0xadf7
movq (%rbx), %rdi
callq 0xae91
cmpb (%r13,%r12), %al
cmovnel %r15d, %r14d
incq %r13
jmp 0xad78
leaq 0x5ca6(%rip), %rax      # 0x10a41
movq %rax, 0xa476(%rip)      # 0x15218
xorl %eax, %eax
movzbl %al, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0xee, %r14d
setne %al
cmpl $0xe, %ebp
setb %cl
orb %al, %cl
jne 0xae0b
pushq $0x1
popq %r14
xorl %r15d, %r15d
leaq 0x5c7a(%rip), %r12      # 0x10a52
xorl %r13d, %r13d
cmpq $0x6, %r13
je 0xae10
movq (%rbx), %rdi
callq 0xae91
cmpb (%r13,%r12), %al
cmovnel %r15d, %r14d
incq %r13
jmp 0xaddb
addl $-0x7, %ebp
testl %r14d, %r14d
je 0xae46
movl $0x1, 0x4848(%rbx)
jmp 0xae46
addl $-0x2, %ebp
jmp 0xae46
testl %r14d, %r14d
je 0xae43
movq (%rbx), %rdi
callq 0xae91
movq (%rbx), %rdi
callq 0xaf12
movq (%rbx), %rdi
callq 0xaf12
movq (%rbx), %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, 0x484c(%rbx)
addl $-0xe, %ebp
jmp 0xae46
addl $-0x8, %ebp
movq (%rbx), %rdi
movl %ebp, %esi
callq 0xb088
movb $0x1, %al
jmp 0xada4