// File: /workspace/github_c_makefile_star2_O2/patriciogonzalezvivo[P]tprint/include/std/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;
            int t = q & 15,i;
            if (p != 0) 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__get8(z->s);
            L -= 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) {
      stbi__skip(z->s, stbi__get16be(z->s)-2);
      return 1;
   }
   return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdi, %rbx
cmpl $0xc4, %esi
je 0x14036
cmpl $0xdb, %esi
je 0x13fa5
cmpl $0xdd, %esi
je 0x14012
cmpl $0xff, %esi
jne 0x14200
leaq 0x4e2e(%rip), %rax      # 0x18dce
jmp 0x1425b
movq (%rbx), %rdi
callq 0x14331
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x3488(%rbx), %r14
leaq 0x4a20(%rip), %r15      # 0x189e0
testl %ebp, %ebp
jle 0x14234
movq (%rbx), %rdi
callq 0x142b0
cmpb $0x10, %al
jae 0x14242
andb $0xf, %al
cmpb $0x3, %al
ja 0x14254
movzbl %al, %r12d
shll $0x6, %r12d
addq %r14, %r12
xorl %r13d, %r13d
cmpq $0x40, %r13
je 0x1400d
movq (%rbx), %rdi
callq 0x142b0
movzbl (%r13,%r15), %ecx
movb %al, (%rcx,%r12)
incq %r13
jmp 0x13ff0
addl $-0x41, %ebp
jmp 0x13fc0
movq (%rbx), %rdi
callq 0x14331
cmpl $0x4, %eax
jne 0x14239
movq (%rbx), %rdi
callq 0x14331
movl %eax, 0x475c(%rbx)
jmp 0x14230
movq (%rbx), %rdi
callq 0x14331
movl %eax, %ebp
addl $-0x2, %ebp
leaq 0x1a48(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x20(%rsp)
leaq 0x3588(%rbx), %rax
movq %rax, 0x18(%rsp)
testl %ebp, %ebp
jle 0x14234
movq (%rbx), %rdi
callq 0x142b0
cmpb $0x1f, %al
ja 0x1424b
movl %eax, %r15d
movl %eax, %r14d
andb $0xf, %r14b
cmpb $0x3, %r14b
ja 0x1424b
movl %ebp, 0xc(%rsp)
xorl %r13d, %r13d
xorl %r12d, %r12d
cmpq $0x10, %r13
je 0x140b8
movq (%rbx), %rdi
callq 0x142b0
movzbl %al, %eax
movl %eax, 0x30(%rsp,%r13,4)
addl %eax, %r12d
incq %r13
jmp 0x1409a
movzbl %r14b, %r14d
imulq $0x690, %r14, %rdi      # imm = 0x690
cmpb $0xf, %r15b
ja 0x140dd
addq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x14356
pushq $0x8
popq %rcx
jmp 0x140f1
addq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x14356
movl $0x1a48, %ecx           # imm = 0x1A48
testl %eax, %eax
je 0x14262
addl $-0x11, 0xc(%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 0x14135
movq (%rbx), %rdi
callq 0x142b0
movb %al, (%r13,%r14)
incq %r14
jmp 0x1411e
cmpb $0x10, %r15b
movl $0x0, %r14d
pushq $-0x1
popq %r15
jae 0x14151
movl 0xc(%rsp), %ebp
subl %r12d, %ebp
jmp 0x14064
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 0x14145
movzbl (%rsi,%rdi), %ecx
andw $0x0, (%rdx,%rdi,2)
cmpq $0xff, %rcx
je 0x141f8
movzbl 0x400(%rsi,%rcx), %r8d
movl %r8d, %eax
andl $0xf, %eax
je 0x141f8
movzbl 0x500(%rsi,%rcx), %ecx
leal (%rax,%rcx), %r9d
cmpl $0x9, %r9d
ja 0x141f8
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 0x141f8
andl $-0x10, %r8d
shll $0x8, %r10d
orl %r8d, %r10d
orl %r9d, %r10d
movw %r10w, (%rdx,%rdi,2)
incq %rdi
jmp 0x1416e
movl %esi, %eax
andl $-0x10, %eax
cmpl $0xe0, %eax
setne %al
cmpl $0xfe, %esi
setne %cl
testb %al, %cl
jne 0x14262
movq (%rbx), %rbx
movq %rbx, %rdi
callq 0x14331
leal -0x2(%rax), %esi
movq %rbx, %rdi
callq 0x14487
movb $0x1, %al
jmp 0x14264
sete %al
jmp 0x14264
leaq 0x4b9e(%rip), %rax      # 0x18dde
jmp 0x1425b
leaq 0x4ba1(%rip), %rax      # 0x18dea
jmp 0x1425b
leaq 0x4bb3(%rip), %rax      # 0x18e05
jmp 0x1425b
leaq 0x4b9c(%rip), %rax      # 0x18df7
movq %rax, 0xc1a6(%rip)      # 0x20408
xorl %eax, %eax
movzbl %al, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq