// File: /workspace/github_c_makefile_star2_O2/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__decode_jpeg_header(stbi__jpeg*, int)
static int stbi__decode_jpeg_header(stbi__jpeg *z, int scan)
{
   int m;
   z->jfif = 0;
   z->app14_color_transform = -1; // valid values are 0,1,2
   z->marker = STBI__MARKER_none; // initialize cached marker to empty
   m = stbi__get_marker(z);
   if (!stbi__SOI(m)) return stbi__err("no SOI","Corrupt JPEG");
   if (scan == STBI__SCAN_type) return 1;
   m = stbi__get_marker(z);
   while (!stbi__SOF(m)) {
      if (!stbi__process_marker(z,m)) return 0;
      m = stbi__get_marker(z);
      while (m == STBI__MARKER_none) {
         // some files have extra padding after their blocks, so ok, we'll scan
         if (stbi__at_eof(z->s)) return stbi__err("no SOF", "Corrupt JPEG");
         m = stbi__get_marker(z);
      }
   }
   z->progressive = stbi__SOF_progressive(m);
   if (!stbi__process_frame_header(z, scan)) return 0;
   return 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movabsq $-0x100000000, %rax     # imm = 0xFFFFFFFF00000000
movq %rax, 0x4848(%rdi)
movb $-0x1, 0x4828(%rdi)
callq 0xa9b5
cmpb $-0x28, %al
jne 0x9af3
pushq $0x1
popq %r14
cmpl $0x1, %ebp
je 0x9b04
movq %rbx, %rdi
callq 0xa9b5
movzbl %al, %esi
cmpb $-0x3e, %sil
je 0x9b16
movl %esi, %eax
andl $-0x2, %eax
cmpl $0xc0, %eax
je 0x9b16
movq %rbx, %rdi
callq 0xa9ed
testl %eax, %eax
je 0x9b01
movq %rbx, %rdi
callq 0xa9b5
cmpb $-0x1, %al
jne 0x9ab1
movq (%rbx), %rdi
callq 0xae57
testl %eax, %eax
je 0x9ad2
leaq 0x6ef7(%rip), %rax      # 0x109e8
jmp 0x9afa
leaq 0x6ee7(%rip), %rax      # 0x109e1
movq %rax, 0xb717(%rip)      # 0x15218
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
cmpl $0xc2, %esi
sete %al
movl %eax, 0x4830(%rbx)
movq (%rbx), %r12
movq %r12, %rdi
callq 0xaf12
cmpl $0xa, %eax
ja 0x9b40
leaq 0x6f3a(%rip), %rax      # 0x10a78
jmp 0x9afa
movl %eax, %r15d
movq %r12, %rdi
callq 0xae91
cmpb $0x8, %al
jne 0x9bbd
movq %r12, %rdi
callq 0xaf12
movl %eax, 0x4(%r12)
testl %eax, %eax
je 0x9bc9
movq %r12, %rdi
callq 0xaf12
movl %eax, (%r12)
testl %eax, %eax
je 0x9c8f
movq %r12, %rdi
callq 0xae91
cmpb $0x4, %al
ja 0x9c9b
movzbl %al, %eax
pushq $0x1a
popq %rcx
btl %eax, %ecx
jae 0x9c9b
movl %eax, 0x8(%r12)
movl %eax, %ecx
imulq $0x60, %rcx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x9bd5
andq $0x0, 0x46d0(%rbx,%rdx)
andq $0x0, 0x46e8(%rbx,%rdx)
addq $0x60, %rdx
jmp 0x9ba0
leaq 0x6ec0(%rip), %rax      # 0x10a84
jmp 0x9afa
leaq 0x6ebf(%rip), %rax      # 0x10a8f
jmp 0x9afa
leal (%rax,%rax,2), %eax
addl $0x8, %eax
cmpl %eax, %r15d
jne 0x9b37
andl $0x0, 0x4850(%rbx)
leaq 0x46ac(%rbx), %r13
xorl %ecx, %ecx
movslq 0x8(%r12), %r15
cmpq %r15, %rcx
jge 0x9ca7
movq %rcx, %r15
movq %r12, %rdi
callq 0xae91
movzbl %al, %ecx
movl %ecx, -0xc(%r13)
cmpl $0x3, 0x8(%r12)
jne 0x9c2f
leaq 0x67dc(%rip), %rcx      # 0x103ff
cmpb (%r15,%rcx), %al
jne 0x9c2f
incl 0x4850(%rbx)
movq %r12, %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, %ecx
shrl $0x4, %ecx
movl %ecx, -0x8(%r13)
leal -0x50(%rax), %ecx
cmpb $-0x41, %cl
jbe 0x9d0f
andl $0xf, %eax
movl %eax, -0x4(%r13)
addl $-0x5, %eax
cmpl $-0x5, %eax
jbe 0x9d1b
movq %r12, %rdi
callq 0xae91
movzbl %al, %eax
movl %eax, (%r13)
movq %r15, %rcx
incq %rcx
addq $0x60, %r13
cmpb $0x4, %al
jb 0x9bf4
leaq 0x6e3e(%rip), %rax      # 0x10ac8
jmp 0x9afa
leaq 0x6e0a(%rip), %rax      # 0x10aa0
jmp 0x9afa
leaq 0x6e06(%rip), %rax      # 0x10aa8
jmp 0x9afa
testl %ebp, %ebp
jne 0x9b04
movl (%r12), %edi
movl 0x4(%r12), %esi
xorl %r14d, %r14d
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movl %r15d, %edx
xorl %ecx, %ecx
callq 0xb0de
testl %eax, %eax
je 0x9ed8
testl %r15d, %r15d
cmovlel %r14d, %r15d
imulq $0x60, %r15, %rdx
pushq $0x1
popq %rdi
movl %edi, %r8d
cmpq %r14, %rdx
je 0x9d27
movl 0x46a4(%rbx,%r14), %eax
movl 0x46a8(%rbx,%r14), %ecx
cmpl %edi, %eax
cmovgl %eax, %edi
cmpl %r8d, %ecx
cmovgl %ecx, %r8d
addq $0x60, %r14
jmp 0x9ce8
leaq 0x6da6(%rip), %rax      # 0x10abc
jmp 0x9afa
leaq 0x6da0(%rip), %rax      # 0x10ac2
jmp 0x9afa
movq %rdx, 0x40(%rsp)
movl %edi, 0x4688(%rbx)
movl %r8d, 0x468c(%rbx)
leal (,%rdi,8), %ecx
movl %ecx, 0x4698(%rbx)
leal (,%r8,8), %esi
movl %esi, 0x469c(%rbx)
movq 0x28(%rsp), %rax
leal (%rax,%rdi,8), %eax
decl %eax
xorl %r13d, %r13d
xorl %edx, %edx
divl %ecx
movl %eax, 0x18(%rsp)
movl %eax, 0x4690(%rbx)
movq 0x20(%rsp), %rax
leal (%rax,%r8,8), %eax
decl %eax
xorl %edx, %edx
divl %esi
movl %eax, 0x14(%rsp)
movl %eax, 0x4694(%rbx)
movq %rdi, 0x38(%rsp)
leal -0x1(%rdi), %eax
movl %eax, 0x10(%rsp)
movq %r8, 0x30(%rsp)
leal -0x1(%r8), %eax
movl %eax, 0xc(%rsp)
pushq $0x1
popq %r14
movl %r14d, 0x8(%rsp)
cmpq %r13, 0x40(%rsp)
je 0x9b04
movl 0x46a4(%rbx,%r13), %r15d
movl 0x46a8(%rbx,%r13), %r12d
movl %r15d, %eax
imull 0x28(%rsp), %eax
addl 0x10(%rsp), %eax
xorl %edx, %edx
divl 0x38(%rsp)
movl %eax, 0x46bc(%rbx,%r13)
movl %r12d, %eax
imull 0x20(%rsp), %eax
addl 0xc(%rsp), %eax
xorl %edx, %edx
divl 0x30(%rsp)
movl %eax, 0x46c0(%rbx,%r13)
imull 0x18(%rsp), %r15d
leal (,%r15,8), %edi
movl %edi, 0x46c4(%rbx,%r13)
imull 0x14(%rsp), %r12d
leal (,%r12,8), %ebp
movl %ebp, 0x46c8(%rbx,%r13)
movl %edi, 0x1c(%rsp)
movl %ebp, %esi
pushq $0xf
popq %rdx
callq 0xb13b
andq $0x0, 0x46f0(%rbx,%r13)
xorps %xmm0, %xmm0
movups %xmm0, 0x46e0(%rbx,%r13)
movq %rax, 0x46d8(%rbx,%r13)
testq %rax, %rax
je 0x9eb9
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0x46d0(%rbx,%r13)
cmpl $0x0, 0x4830(%rbx)
je 0x9eac
movl %r15d, 0x46f8(%rbx,%r13)
movl %r12d, 0x46fc(%rbx,%r13)
movl 0x1c(%rsp), %edi
movl %ebp, %esi
pushq $0x2
popq %rdx
pushq $0xf
popq %rcx
callq 0xb1e3
movq %rax, 0x46e0(%rbx,%r13)
testq %rax, %rax
je 0x9eb9
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0x46f0(%rbx,%r13)
incl 0x8(%rsp)
addq $0x60, %r13
jmp 0x9daa
leaq 0x6c19(%rip), %rax      # 0x10ad9
movq %rax, 0xb351(%rip)      # 0x15218
movq %rbx, %rdi
movl 0x8(%rsp), %esi
callq 0xb16f
jmp 0x9b01
leaq 0x6bf0(%rip), %rax      # 0x10acf
movq %rax, 0xb332(%rip)      # 0x15218
jmp 0x9b04