// File: /workspace/github_c_makefile_star2_O0/zhiyb[P]png2tlg/./stb_image.h
// Function: stbi__load_main(stbi__context*, int*, int*, int*, int, stbi__result_info*, int)
static void *stbi__load_main(stbi__context *s, int *x, int *y, int *comp, int req_comp, stbi__result_info *ri, int bpc)
{
   memset(ri, 0, sizeof(*ri)); // make sure it's initialized if we add new fields
   ri->bits_per_channel = 8; // default is 8 so most paths don't have to be changed
   ri->channel_order = STBI_ORDER_RGB; // all current input & output are this, but this is here so we can add BGR order
   ri->num_channels = 0;

   #ifndef STBI_NO_JPEG
   if (stbi__jpeg_test(s)) return stbi__jpeg_load(s,x,y,comp,req_comp, ri);
   #endif
   #ifndef STBI_NO_PNG
   if (stbi__png_test(s))  return stbi__png_load(s,x,y,comp,req_comp, ri);
   #endif
   #ifndef STBI_NO_BMP
   if (stbi__bmp_test(s))  return stbi__bmp_load(s,x,y,comp,req_comp, ri);
   #endif
   #ifndef STBI_NO_GIF
   if (stbi__gif_test(s))  return stbi__gif_load(s,x,y,comp,req_comp, ri);
   #endif
   #ifndef STBI_NO_PSD
   if (stbi__psd_test(s))  return stbi__psd_load(s,x,y,comp,req_comp, ri, bpc);
   #endif
   #ifndef STBI_NO_PIC
   if (stbi__pic_test(s))  return stbi__pic_load(s,x,y,comp,req_comp, ri);
   #endif
   #ifndef STBI_NO_PNM
   if (stbi__pnm_test(s))  return stbi__pnm_load(s,x,y,comp,req_comp, ri);
   #endif

   #ifndef STBI_NO_HDR
   if (stbi__hdr_test(s)) {
      float *hdr = stbi__hdr_load(s, x,y,comp,req_comp, ri);
      return stbi__hdr_to_ldr(hdr, *x, *y, req_comp ? req_comp : *comp);
   }
   #endif

   #ifndef STBI_NO_TGA
   // test tga last because it's a crappy test!
   if (stbi__tga_test(s))
      return stbi__tga_load(s,x,y,comp,req_comp, ri);
   #endif

   return stbi__errpuc("unknown image type", "Image not of any known type, or corrupt");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movl %r8d, -0x2c(%rbp)
movq %r9, -0x38(%rbp)
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0xc, %edx
callq 0x2100
movq -0x38(%rbp), %rax
movl $0x8, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rdi
callq 0x8970
cmpl $0x0, %eax
je 0x8517
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0x89d0
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0x8a50
cmpl $0x0, %eax
je 0x854b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0x8a80
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0x8ad0
cmpl $0x0, %eax
je 0x857f
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0x8b00
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0x9960
cmpl $0x0, %eax
je 0x85b3
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0x9990
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0x9a90
cmpl $0x0, %eax
je 0x85ed
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
movl 0x10(%rbp), %eax
movl %eax, (%rsp)
callq 0x9ad0
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0xa3a0
cmpl $0x0, %eax
je 0x8621
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xa3d0
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0xa570
cmpl $0x0, %eax
je 0x8655
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xa5e0
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0x3400
cmpl $0x0, %eax
je 0x86cd
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xa760
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x48(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x86ac
movl -0x2c(%rbp), %eax
movl %eax, -0x54(%rbp)
jmp 0x86b5
movq -0x28(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movl -0x44(%rbp), %edx
movl -0x48(%rbp), %esi
movq -0x50(%rbp), %rdi
movl -0x54(%rbp), %ecx
callq 0xaf60
movq %rax, -0x8(%rbp)
jmp 0x8719
movq -0x10(%rbp), %rdi
callq 0xb170
cmpl $0x0, %eax
je 0x86fe
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movq -0x38(%rbp), %r9
callq 0xb2c0
movq %rax, -0x8(%rbp)
jmp 0x8719
leaq 0x18139(%rip), %rdi     # 0x2083e
callq 0x2680
movl %eax, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
cmovneq %rax, %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)