// File: /workspace/github_c_makefile_star2_O0/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__pic_info(stbi__context*, int*, int*, int*)
static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp)
{
   int act_comp=0,num_packets=0,chained,dummy;
   stbi__pic_packet packets[10];

   if (!x) x = &dummy;
   if (!y) y = &dummy;
   if (!comp) comp = &dummy;

   if (!stbi__pic_is4(s,"\x53\x80\xF6\x34")) {
      stbi__rewind(s);
      return 0;
   }

   stbi__skip(s, 88);

   *x = stbi__get16be(s);
   *y = stbi__get16be(s);
   if (stbi__at_eof(s)) {
      stbi__rewind( s);
      return 0;
   }
   if ( (*x) != 0 && (1 << 28) / (*x) < (*y)) {
      stbi__rewind( s );
      return 0;
   }

   stbi__skip(s, 8);

   do {
      stbi__pic_packet *packet;

      if (num_packets==sizeof(packets)/sizeof(packets[0]))
         return 0;

      packet = &packets[num_packets++];
      chained = stbi__get8(s);
      packet->size    = stbi__get8(s);
      packet->type    = stbi__get8(s);
      packet->channel = stbi__get8(s);
      act_comp |= packet->channel;

      if (stbi__at_eof(s)) {
          stbi__rewind( s );
          return 0;
      }
      if (packet->size != 8) {
          stbi__rewind( s );
          return 0;
      }
   } while (chained);

   *comp = (act_comp & 0x10 ? 4 : 3);

   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x30(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x1e6b5
leaq -0x38(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1e6c4
leaq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x1e6d3
leaq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x10(%rbp), %rdi
leaq 0x28e7(%rip), %rsi      # 0x20fc5
callq 0x1c030
cmpl $0x0, %eax
jne 0x1e6fd
movq -0x10(%rbp), %rdi
callq 0xbd40
movl $0x0, -0x4(%rbp)
jmp 0x1e882
movq -0x10(%rbp), %rdi
movl $0x58, %esi
callq 0x13350
movq -0x10(%rbp), %rdi
callq 0x12fa0
movl %eax, %ecx
movq -0x18(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x12fa0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
movq -0x10(%rbp), %rdi
callq 0x12530
cmpl $0x0, %eax
je 0x1e750
movq -0x10(%rbp), %rdi
callq 0xbd40
movl $0x0, -0x4(%rbp)
jmp 0x1e882
movq -0x18(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1e782
movq -0x18(%rbp), %rcx
movl $0x10000000, %eax       # imm = 0x10000000
cltd
idivl (%rcx)
movq -0x20(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x1e782
movq -0x10(%rbp), %rdi
callq 0xbd40
movl $0x0, -0x4(%rbp)
jmp 0x1e882
movq -0x10(%rbp), %rdi
movl $0x8, %esi
callq 0x13350
movslq -0x30(%rbp), %rax
cmpq $0xa, %rax
jne 0x1e7a6
movl $0x0, -0x4(%rbp)
jmp 0x1e882
movl -0x30(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x30(%rbp)
movslq %eax, %rcx
leaq -0x60(%rbp), %rax
imulq $0x3, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12e60
movzbl %al, %eax
movl %eax, -0x34(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12e60
movb %al, %cl
movq -0x68(%rbp), %rax
movb %cl, (%rax)
movq -0x10(%rbp), %rdi
callq 0x12e60
movb %al, %cl
movq -0x68(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rdi
callq 0x12e60
movb %al, %cl
movq -0x68(%rbp), %rax
movb %cl, 0x2(%rax)
movq -0x68(%rbp), %rax
movzbl 0x2(%rax), %eax
orl -0x2c(%rbp), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x12530
cmpl $0x0, %eax
je 0x1e835
movq -0x10(%rbp), %rdi
callq 0xbd40
movl $0x0, -0x4(%rbp)
jmp 0x1e882
movq -0x68(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8, %eax
je 0x1e853
movq -0x10(%rbp), %rdi
callq 0xbd40
movl $0x0, -0x4(%rbp)
jmp 0x1e882
jmp 0x1e855
cmpl $0x0, -0x34(%rbp)
jne 0x1e790
movl -0x2c(%rbp), %edx
andl $0x10, %edx
movl $0x3, %ecx
movl $0x4, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)