// File: /workspace/github_c_makefile_star2_O2/patriciogonzalezvivo[P]tprint/include/std/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->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 $0x38, %rsp
movl %esi, %r14d
movq %rdi, %rbx
movb $-0x1, 0x4728(%rdi)
callq 0x13f24
cmpb $-0x28, %al
jne 0x135c2
pushq $0x1
popq %rbp
cmpl $0x1, %r14d
je 0x135d2
movq %rbx, %rdi
callq 0x13f24
leaq 0x5840(%rip), %r13      # 0x18dc7
movzbl %al, %esi
cmpb $-0x3e, %sil
je 0x135e3
movl %esi, %eax
andl $-0x2, %eax
cmpl $0xc0, %eax
je 0x135e3
movq %rbx, %rdi
callq 0x13f5c
testl %eax, %eax
je 0x135d0
movq %rbx, %rdi
callq 0x13f24
cmpb $-0x1, %al
jne 0x13587
movq (%rbx), %rdi
callq 0x14276
testl %eax, %eax
je 0x135a8
jmp 0x135c9
leaq 0x57f7(%rip), %r13      # 0x18dc0
movq %r13, 0xce38(%rip)      # 0x20408
xorl %ebp, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
xorl %eax, %eax
cmpl $0xc2, %esi
sete %al
movl %eax, 0x4730(%rbx)
movq (%rbx), %r15
movq %r15, %rdi
callq 0x14331
leaq 0x581f(%rip), %r13      # 0x18e25
cmpl $0xb, %eax
jb 0x135c9
movl %eax, %r12d
movq %r15, %rdi
callq 0x142b0
cmpb $0x8, %al
jne 0x13677
movq %r15, %rdi
callq 0x14331
movl %eax, 0x4(%r15)
testl %eax, %eax
je 0x13683
movq %r15, %rdi
callq 0x14331
movl %eax, (%r15)
testl %eax, %eax
je 0x1368f
movq %r15, %rdi
callq 0x142b0
movl %eax, %ecx
andb $-0x3, %cl
cmpb $0x1, %cl
jne 0x1369b
movzbl %al, %eax
movl %eax, 0x8(%r15)
movl %eax, %ecx
imulq $0x60, %rcx, %rcx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x136a7
andq $0x0, 0x45d0(%rbx,%rdx)
andq $0x0, 0x45e8(%rbx,%rdx)
addq $0x60, %rdx
jmp 0x1365a
leaq 0x57b3(%rip), %r13      # 0x18e31
jmp 0x135c9
leaq 0x57b2(%rip), %r13      # 0x18e3c
jmp 0x135c9
leaq 0x57b7(%rip), %r13      # 0x18e4d
jmp 0x135c9
leaq 0x57b3(%rip), %r13      # 0x18e55
jmp 0x135c9
leal (%rax,%rax,2), %eax
addl $0x8, %eax
cmpl %eax, %r12d
jne 0x135c9
leaq 0x45ac(%rbx), %rax
movq %rax, (%rsp)
xorl %ecx, %ecx
leaq 0x579f(%rip), %r13      # 0x18e69
movslq 0x8(%r15), %rsi
movq %rcx, 0x10(%rsp)
cmpq %rsi, %rcx
jge 0x1376f
movq %r15, %rdi
callq 0x142b0
movzbl %al, %eax
movq (%rsp), %r12
movl %eax, -0xc(%r12)
movq 0x10(%rsp), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x8(%rsp)
cmpq %rax, %rcx
setne %cl
cmpq %rax, %rdx
setne %al
testb %al, %cl
jne 0x135c9
movq %r15, %rdi
callq 0x142b0
movzbl %al, %eax
movl %eax, %ecx
shrl $0x4, %ecx
movl %ecx, -0x8(%r12)
leal -0x50(%rax), %ecx
cmpb $-0x40, %cl
jb 0x137a9
andl $0xf, %eax
movl %eax, -0x4(%r12)
addl $-0x5, %eax
cmpl $-0x4, %eax
jb 0x137b5
movq %r15, %rdi
callq 0x142b0
movzbl %al, %eax
movl %eax, (%r12)
addq $0x60, %r12
movq %r12, (%rsp)
movq 0x8(%rsp), %rcx
cmpb $0x3, %al
jbe 0x136ca
leaq 0x571c(%rip), %r13      # 0x18e86
jmp 0x135c9
testl %r14d, %r14d
jne 0x135d2
movl (%r15), %edi
movl 0x4(%r15), %r8d
xorl %ecx, %ecx
movl $0x40000000, %eax       # imm = 0x40000000
xorl %edx, %edx
movq %rdi, 0x10(%rsp)
divl %edi
xorl %edx, %edx
divl %esi
movq %r8, 0x8(%rsp)
cmpl %r8d, %eax
jae 0x137c1
leaq 0x56e9(%rip), %r13      # 0x18e8d
jmp 0x135c9
leaq 0x56ca(%rip), %r13      # 0x18e7a
jmp 0x135c9
leaq 0x56c4(%rip), %r13      # 0x18e80
jmp 0x135c9
testl %esi, %esi
cmovlel %ecx, %esi
movq %rsi, 0x30(%rsp)
imulq $0x60, %rsi, %rax
pushq $0x1
popq %rdi
movl %edi, %r13d
cmpq %rcx, %rax
je 0x137fa
movl 0x45a4(%rbx,%rcx), %edx
movl 0x45a8(%rbx,%rcx), %esi
cmpl %edi, %edx
cmovgl %edx, %edi
cmpl %r13d, %esi
cmovgl %esi, %r13d
addq $0x60, %rcx
jmp 0x137d5
movl %edi, 0x4588(%rbx)
movl %r13d, 0x458c(%rbx)
leal (,%rdi,8), %ecx
movl %ecx, 0x4598(%rbx)
leal (,%r13,8), %esi
movl %esi, 0x459c(%rbx)
movq 0x10(%rsp), %rax
leal (%rax,%rdi,8), %eax
decl %eax
xorl %r8d, %r8d
xorl %edx, %edx
divl %ecx
movl %eax, 0x24(%rsp)
movl %eax, 0x4590(%rbx)
movq 0x8(%rsp), %rax
leal (%rax,%r13,8), %eax
decl %eax
xorl %edx, %edx
divl %esi
movl %eax, 0x20(%rsp)
movl %eax, 0x4594(%rbx)
leal -0x1(%rdi), %eax
movl %eax, 0x1c(%rsp)
leal -0x1(%r13), %eax
movl %eax, 0x18(%rsp)
leaq 0x4578(%rbx), %r15
pushq $0x1
popq %rbp
movq %rdi, 0x28(%rsp)
movq %r8, (%rsp)
cmpq %r8, 0x30(%rsp)
je 0x135d2
movl 0x2c(%r15), %r12d
movl 0x30(%r15), %r14d
movl %r12d, %eax
imull 0x10(%rsp), %eax
addl 0x1c(%rsp), %eax
xorl %edx, %edx
divl %edi
movl %eax, 0x44(%r15)
movl %r14d, %eax
imull 0x8(%rsp), %eax
addl 0x18(%rsp), %eax
xorl %edx, %edx
divl %r13d
movl %eax, 0x48(%r15)
imull 0x24(%rsp), %r12d
leal (,%r12,8), %eax
movl %eax, 0x4c(%r15)
imull 0x20(%rsp), %r14d
leal (,%r14,8), %ecx
movl %ecx, 0x50(%r15)
imull %eax, %ecx
orl $0xf, %ecx
movslq %ecx, %rdi
callq 0x8420
movq %rax, 0x60(%r15)
testq %rax, %rax
je 0x1395d
addq $0xf, %rax
andq $-0x10, %rax
movq %rax, 0x58(%r15)
andq $0x0, 0x70(%r15)
cmpl $0x0, 0x4730(%rbx)
je 0x1393c
movl %r12d, 0x80(%r15)
movl %r14d, 0x84(%r15)
imull %r14d, %r12d
shll $0x6, %r12d
movslq %r12d, %rax
leaq 0xf(,%rax,2), %rdi
callq 0x8420
movq %rax, %rcx
addq $0xf, %rcx
andq $-0x10, %rcx
jmp 0x13940
xorl %ecx, %ecx
xorl %eax, %eax
movq %rcx, 0x78(%r15)
movq %rax, 0x68(%r15)
movq (%rsp), %r8
incq %r8
addq $0x60, %r15
movq 0x28(%rsp), %rdi
jmp 0x13874
leaq 0x5533(%rip), %r13      # 0x18e97
movq (%rsp), %rbx
testq %rbx, %rbx
jle 0x135c9
decq %rbx
movq (%r15), %rdi
callq 0x83d0
andq $0x0, -0x8(%r15)
addq $-0x60, %r15
jmp 0x13968