// File: /workspace/github_cpp_makefile_star2_O3/srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__pic_load(stbi__context*, int*, int*, int*, int)
static stbi_uc *stbi__pic_load(stbi__context *s,int *px,int *py,int *comp,int req_comp)
{
   stbi_uc *result;
   int i, x,y;

   for (i=0; i<92; ++i)
      stbi__get8(s);

   x = stbi__get16be(s);
   y = stbi__get16be(s);
   if (stbi__at_eof(s))  return stbi__errpuc("bad file","file too short (pic header)");
   if ((1 << 28) / x < y) return stbi__errpuc("too large", "Image too large to decode");

   stbi__get32be(s); //skip `ratio'
   stbi__get16be(s); //skip `fields'
   stbi__get16be(s); //skip `pad'

   // intermediate buffer is RGBA
   result = (stbi_uc *) stbi__malloc(x*y*4);
   memset(result, 0xff, x*y*4);

   if (!stbi__pic_load_core(s,x,y,comp, result)) {
      STBI_FREE(result);
      result=0;
   }
   *px = x;
   *py = y;
   if (req_comp == 0) req_comp = *comp;
   result=stbi__convert_format(result,4,req_comp,x,y);

   return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %r14d
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, 0x68(%rsp)
movq %rdi, %r13
leaq 0x38(%rdi), %rbp
leaq 0x39(%rdi), %rax
movq %rax, (%rsp)
movq 0xb8(%rdi), %rcx
movq 0xc0(%rdi), %rax
movl $0x5c, %ebx
cmpq %rax, %rcx
jae 0x1b0bf
incq %rcx
jmp 0x1b0ff
cmpl $0x0, 0x30(%r13)
je 0x1b106
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b0e4
cltq
addq %rbp, %rax
movq (%rsp), %rcx
jmp 0x1b0f8
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
decl %ebx
jne 0x1b0b5
movq %r13, %rdi
callq 0x1e517
movl %eax, %ebx
movq %r13, %rdi
callq 0x1e517
movl %eax, %ecx
cmpq $0x0, 0x10(%r13)
je 0x1b15e
movq 0x28(%r13), %rdi
movl %ebx, 0xc(%rsp)
movq %rbp, %rbx
movq %r12, %rbp
movq %r15, %r12
movl %r14d, %r15d
movl %ecx, %r14d
callq *0x20(%r13)
movl %r14d, %ecx
movl %r15d, %r14d
movq %r12, %r15
movq %rbp, %r12
movq %rbx, %rbp
movl 0xc(%rsp), %ebx
testl %eax, %eax
je 0x1b16e
cmpl $0x0, 0x30(%r13)
je 0x1b196
movq 0xb8(%r13), %rax
cmpq 0xc0(%r13), %rax
jae 0x1b196
movq %r12, 0x30(%rsp)
movq %r15, 0x38(%rsp)
movl %r14d, 0x1c(%rsp)
xorl %r12d, %r12d
movl $0x10000000, %eax       # imm = 0x10000000
xorl %edx, %edx
divl %ebx
cmpl %ecx, %eax
jae 0x1b1ab
leaq 0x1112b(%rip), %rax     # 0x2c2bf
jmp 0x1b19d
leaq 0x116df(%rip), %rax     # 0x2c87c
movq %rax, 0x1c1ec(%rip)     # 0x37390
xorl %eax, %eax
jmp 0x1b81d
movq %r13, %rdi
movl %ecx, %r14d
callq 0x1e517
movq %r13, %rdi
callq 0x1e517
movq %r13, %rdi
callq 0x1e517
movq %r13, %rdi
callq 0x1e517
movl %ebx, 0xc(%rsp)
shll $0x2, %ebx
movl %ebx, 0x4c(%rsp)
movl %r14d, 0x24(%rsp)
imull %r14d, %ebx
movq %rbx, %rdi
callq 0x43f0
movq %rax, 0x28(%rsp)
movq %rax, %rdi
movl $0xff, %esi
movq %rbx, %rdx
callq 0x41c0
leaq 0x72(%rsp), %rbx
xorl %ecx, %ecx
cmpq $0xa, %rcx
je 0x1b7c6
movq %rcx, 0x40(%rsp)
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b23e
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r13)
movb (%rcx), %cl
movl %ecx, 0x10(%rsp)
movq %rdx, %rcx
jmp 0x1b29e
cmpl $0x0, 0x30(%r13)
je 0x1b26a
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b274
cltq
addq %rbp, %rax
movb (%rbp), %cl
movl %ecx, 0x10(%rsp)
movq (%rsp), %rcx
jmp 0x1b290
movl $0x0, 0x10(%rsp)
jmp 0x1b29e
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
movl $0x0, 0x10(%rsp)
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
cmpq %rax, %rcx
jae 0x1b2b6
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r13)
movb (%rcx), %r15b
movq %rdx, %rcx
jmp 0x1b309
cmpl $0x0, 0x30(%r13)
je 0x1b2df
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b2e4
cltq
addq %rbp, %rax
movb (%rbp), %r15b
movq (%rsp), %rcx
jmp 0x1b2fb
xorl %r15d, %r15d
jmp 0x1b309
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
xorl %r15d, %r15d
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
movb %r15b, -0x2(%rbx)
cmpq %rax, %rcx
jae 0x1b324
leaq 0x1(%rcx), %rsi
movq %rsi, 0xb8(%r13)
movb (%rcx), %dl
movq %rsi, %rcx
jmp 0x1b374
cmpl $0x0, 0x30(%r13)
je 0x1b34c
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b350
cltq
addq %rbp, %rax
movb (%rbp), %dl
movq (%rsp), %rcx
jmp 0x1b366
xorl %edx, %edx
jmp 0x1b374
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
xorl %edx, %edx
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
movb %dl, -0x1(%rbx)
cmpq %rax, %rcx
jae 0x1b38f
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r13)
movb (%rcx), %r14b
movq %rdx, %rcx
jmp 0x1b3e2
cmpl $0x0, 0x30(%r13)
je 0x1b3b8
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b3bd
cltq
addq %rbp, %rax
movb (%rbp), %r14b
movq (%rsp), %rcx
jmp 0x1b3d4
xorl %r14d, %r14d
jmp 0x1b3e2
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
xorl %r14d, %r14d
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
movb %r14b, (%rbx)
cmpq $0x0, 0x10(%r13)
je 0x1b411
movq 0x28(%r13), %rdi
callq *0x20(%r13)
testl %eax, %eax
je 0x1b41a
cmpl $0x0, 0x30(%r13)
je 0x1b7cf
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b7cf
cmpb $0x8, %r15b
jne 0x1b7c6
movzbl %r14b, %eax
orl %eax, %r12d
addq $0x3, %rbx
movq 0x40(%rsp), %rcx
incq %rcx
cmpb $0x0, 0x10(%rsp)
jne 0x1b206
andl $0x10, %r12d
cmpl $0x1, %r12d
movl $0x4, %eax
sbbl $0x0, %eax
movq 0x38(%rsp), %r14
movl %eax, (%r14)
movl 0x24(%rsp), %eax
testl %eax, %eax
movl 0x1c(%rsp), %ebx
movq 0x30(%rsp), %r15
je 0x1b7ba
movl %eax, %eax
movq %rax, 0x50(%rsp)
xorl %edx, %edx
movq %rcx, 0x40(%rsp)
movl 0x4c(%rsp), %eax
imull %edx, %eax
movslq %eax, %r12
addq 0x28(%rsp), %r12
xorl %eax, %eax
movq %rdx, 0x58(%rsp)
movq %r12, 0x10(%rsp)
movq %rax, 0x60(%rsp)
leaq (%rax,%rax,2), %rax
leaq (%rsp,%rax), %rbx
addq $0x70, %rbx
movzbl 0x1(%rbx), %eax
testl %eax, %eax
je 0x1b75a
movl 0xc(%rsp), %r15d
cmpl $0x1, %eax
je 0x1b646
movl 0xc(%rsp), %r15d
movq 0x10(%rsp), %r12
cmpl $0x2, %eax
jne 0x1b7c6
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b4fc
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r13)
movb (%rcx), %r14b
movq %rdx, %rcx
jmp 0x1b54f
cmpl $0x0, 0x30(%r13)
je 0x1b525
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b52a
cltq
addq %rbp, %rax
movb (%rbp), %r14b
movq (%rsp), %rcx
jmp 0x1b541
xorl %r14d, %r14d
jmp 0x1b54f
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
xorl %r14d, %r14d
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
cmpq $0x0, 0x10(%r13)
je 0x1b57b
movq 0x28(%r13), %rdi
callq *0x20(%r13)
testl %eax, %eax
je 0x1b584
cmpl $0x0, 0x30(%r13)
je 0x1b7cf
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b7cf
movzbl %r14b, %eax
testb %al, %al
js 0x1b5c6
leal 0x1(%rax), %r14d
movl %r14d, 0x48(%rsp)
cmpl %eax, %r15d
jbe 0x1b7cf
movzbl 0x2(%rbx), %esi
movq %r13, %rdi
movq %r12, %rdx
callq 0x22478
testq %rax, %rax
je 0x1b7dd
addq $0x4, %r12
decl %r14d
jne 0x1b59e
movl 0x48(%rsp), %r14d
jmp 0x1b638
cmpl $0x80, %eax
jne 0x1b5da
movq %r13, %rdi
callq 0x1e517
movl %eax, %r14d
jmp 0x1b5e0
addl $-0x7f, %eax
movl %eax, %r14d
cmpl %r15d, %r14d
jg 0x1b7cf
movzbl 0x2(%rbx), %esi
movq %r13, %rdi
leaq 0x20(%rsp), %rdx
callq 0x22478
testq %rax, %rax
je 0x1b7dd
testl %r14d, %r14d
jle 0x1b638
xorl %eax, %eax
movzbl 0x2(%rbx), %ecx
movl $0x80, %edx
xorl %esi, %esi
testl %ecx, %edx
je 0x1b622
movb 0x20(%rsp,%rsi), %dil
movb %dil, (%r12,%rsi)
incq %rsi
shrl %edx
cmpq $0x4, %rsi
jne 0x1b615
incl %eax
addq $0x4, %r12
cmpl %r14d, %eax
jne 0x1b60a
subl %r14d, %r15d
jg 0x1b4d6
jmp 0x1b77e
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b66c
leaq 0x1(%rcx), %rdx
movq %rdx, 0xb8(%r13)
movb (%rcx), %r14b
movq %rdx, %rcx
jmp 0x1b6bf
cmpl $0x0, 0x30(%r13)
je 0x1b695
movq 0x28(%r13), %rdi
movl 0x34(%r13), %edx
movq %rbp, %rsi
callq *0x10(%r13)
testl %eax, %eax
je 0x1b69a
cltq
addq %rbp, %rax
movb (%rbp), %r14b
movq (%rsp), %rcx
jmp 0x1b6b1
xorl %r14d, %r14d
jmp 0x1b6bf
movl $0x0, 0x30(%r13)
movb $0x0, 0x38(%r13)
xorl %r14d, %r14d
movq (%rsp), %rcx
movq %rcx, %rax
movq %rax, 0xc0(%r13)
movq %rcx, 0xb8(%r13)
cmpq $0x0, 0x10(%r13)
je 0x1b6eb
movq 0x28(%r13), %rdi
callq *0x20(%r13)
testl %eax, %eax
je 0x1b6f4
cmpl $0x0, 0x30(%r13)
je 0x1b7cf
movq 0xb8(%r13), %rcx
movq 0xc0(%r13), %rax
cmpq %rax, %rcx
jae 0x1b7cf
movzbl 0x2(%rbx), %esi
movq %r13, %rdi
leaq 0x20(%rsp), %rdx
callq 0x22478
testq %rax, %rax
je 0x1b7dd
movzbl %r14b, %eax
cmpl %eax, %r15d
cmovbl %r15d, %eax
movzbl %al, %eax
testb %al, %al
je 0x1b74f
xorl %ecx, %ecx
movzbl 0x2(%rbx), %edx
movl $0x80, %esi
xorl %edi, %edi
testl %edx, %esi
je 0x1b73a
movb 0x20(%rsp,%rdi), %r8b
movb %r8b, (%r12,%rdi)
incq %rdi
shrl %esi
cmpq $0x4, %rdi
jne 0x1b72d
incl %ecx
addq $0x4, %r12
cmpl %eax, %ecx
jne 0x1b722
subl %eax, %r15d
jg 0x1b646
jmp 0x1b77e
movzbl 0x2(%rbx), %ebx
movl 0xc(%rsp), %r14d
movq %r13, %rdi
movl %ebx, %esi
movq %r12, %rdx
callq 0x22478
testq %rax, %rax
je 0x1b7dd
addq $0x4, %r12
decl %r14d
jne 0x1b763
movq 0x60(%rsp), %rax
incq %rax
movq 0x40(%rsp), %rcx
cmpq %rax, %rcx
movl 0x1c(%rsp), %ebx
movq 0x38(%rsp), %r14
movq 0x30(%rsp), %r15
movq 0x58(%rsp), %rdx
movq 0x10(%rsp), %r12
jne 0x1b498
incq %rdx
cmpq 0x50(%rsp), %rdx
jne 0x1b47d
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
jne 0x1b7f7
jmp 0x1b7f0
leaq 0x110b8(%rip), %rax     # 0x2c885
jmp 0x1b7d6
leaq 0x110a6(%rip), %rax     # 0x2c87c
movq %rax, 0x1bbb3(%rip)     # 0x37390
movl 0x1c(%rsp), %ebx
movq 0x38(%rsp), %r14
movq 0x30(%rsp), %r15
movq 0x28(%rsp), %rdi
callq 0x4380
xorl %edi, %edi
movq 0x68(%rsp), %rax
movl 0xc(%rsp), %ecx
movl %ecx, (%rax)
movl 0x24(%rsp), %r8d
movl %r8d, (%r15)
testl %ebx, %ebx
jne 0x1b811
movl (%r14), %ebx
movl $0x4, %esi
movl %ebx, %edx
callq 0x20612
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq