// File: srajangarg[P]raytracer/src/core/stb_image.hpp
// Function: stbi__parse_uncomperssed_block(stbi__zbuf*)
static int stbi__parse_uncomperssed_block(stbi__zbuf *a)
{
   stbi_uc header[4];
   int len,nlen,k;
   if (a->num_bits & 7)
      stbi__zreceive(a, a->num_bits & 7); // discard
   // drain the bit-packed data into header
   k = 0;
   while (a->num_bits > 0) {
      header[k++] = (stbi_uc) (a->code_buffer & 255); // suppress MSVC run-time check
      a->code_buffer >>= 8;
      a->num_bits -= 8;
   }
   STBI_ASSERT(a->num_bits == 0);
   // now fill header the normal way
   while (k < 4)
      header[k++] = stbi__zget8(a);
   len  = header[1] * 256 + header[0];
   nlen = header[3] * 256 + header[2];
   if (nlen != (len ^ 0xffff)) return stbi__err("zlib corrupt","Corrupt PNG");
   if (a->zbuffer + len > a->zbuffer_end) return stbi__err("read past buffer","Corrupt PNG");
   if (a->zout + len > a->zout_end)
      if (!stbi__zexpand(a, a->zout, len)) return 0;
   memcpy(a->zout, a->zbuffer, len);
   a->zbuffer += len;
   a->zout += len;
   return 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
je 0x35c4e
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %esi
andl $0x7, %esi
callq 0x35bb0
movl $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jle 0x35c9a
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
andl $0xff, %eax
movb %al, %cl
movl -0x20(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
cltq
movb %cl, -0x14(%rbp,%rax)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %ecx
shrl $0x8, %ecx
movl %ecx, 0x14(%rax)
movq -0x10(%rbp), %rax
movl 0x10(%rax), %ecx
subl $0x8, %ecx
movl %ecx, 0x10(%rax)
jmp 0x35c55
movq -0x10(%rbp), %rax
cmpl $0x0, 0x10(%rax)
jne 0x35ca6
jmp 0x35cc5
leaq 0x12a57(%rip), %rdi     # 0x48704
leaq 0x12401(%rip), %rsi     # 0x480b5
movl $0xea4, %edx            # imm = 0xEA4
leaq 0x12a55(%rip), %rcx     # 0x48715
callq 0x52c0
jmp 0x35cc7
cmpl $0x4, -0x20(%rbp)
jge 0x35ceb
movq -0x10(%rbp), %rdi
callq 0x367b0
movb %al, %cl
movl -0x20(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
cltq
movb %cl, -0x14(%rbp,%rax)
jmp 0x35cc7
movzbl -0x13(%rbp), %eax
shll $0x8, %eax
movzbl -0x14(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x18(%rbp)
movzbl -0x11(%rbp), %eax
shll $0x8, %eax
movzbl -0x12(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movl -0x18(%rbp), %ecx
xorl $0xffff, %ecx           # imm = 0xFFFF
cmpl %ecx, %eax
je 0x35d2f
leaq 0x12a24(%rip), %rdi     # 0x48746
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x35ddf
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x18(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jbe 0x35d5b
leaq 0x12a05(%rip), %rdi     # 0x48753
callq 0x275b0
movl %eax, -0x4(%rbp)
jmp 0x35ddf
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x18(%rbp), %rcx
addq %rcx, %rax
movq -0x10(%rbp), %rcx
cmpq 0x28(%rcx), %rax
jbe 0x35d98
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rsi
movl -0x18(%rbp), %edx
callq 0x36880
cmpl $0x0, %eax
jne 0x35d96
movl $0x0, -0x4(%rbp)
jmp 0x35ddf
jmp 0x35d98
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movslq -0x18(%rbp), %rdx
callq 0x5370
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x18(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, 0x18(%rax)
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)