// File: /workspace/github_cpp_makefile_star2_O2/lvandeve[P]lodepng/pngdetail.cpp
// Function: Data::loadInspect()
void loadInspect() {
    if(inspected) return;
    inspected = true;
    loadFile();
    if(error) return;
    is_png = is_icc = is_exif = false;
    if(isIcc()) {
      lodepng_set_icc(&state.info_png, "<none>", &buffer[0], buffer.size());
      is_icc = true;
    } else if(isExif()) {
      lodepng_set_exif(&state.info_png, &buffer[0], buffer.size());
      is_exif = true;
    } else {
      is_png = true;
      const unsigned char* data = &buffer[0];
      error = lodepng_inspect(&w, &h, &state, data, buffer.size());
      if(error) return;
      // end before first IDAT chunk: do not parse more than first part of file for all this.
      const unsigned char* end = lodepng_chunk_find_const(data, data + buffer.size(), "IDAT");
      if(!end) end = data + buffer.size(); // no IDAT, invalid PNG but extract info anyway
      error = inspect_chunk_by_name(data, end, state, "PLTE");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "tRNS");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "cHRM");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "gAMA");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "sBIT");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "bKGD");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "hIST");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "pHYs");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "iCCP");
      if(error) return;
      error = inspect_chunk_by_name(data, end, state, "eXIf");
      if(error) return;
    }
  }

// Assembly:
cmpb $0x0, 0x2dc(%rdi)
jne 0x1908d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0x2dc(%rdi)
callq 0x1908e
cmpl $0x0, 0x2d8(%rbx)
jne 0x19082
movb $0x0, 0x2df(%rbx)
andw $0x0, 0x2dd(%rbx)
movq %rbx, %rdi
callq 0x19500
testb %al, %al
je 0x18eac
leaq 0x128(%rbx), %rdi
movq 0x20(%rbx), %rdx
movl 0x28(%rbx), %ecx
subl %edx, %ecx
leaq 0x671b(%rip), %rsi      # 0x1f5b6
callq 0x4ed9
movb $0x1, 0x2de(%rbx)
jmp 0x19082
movq %rbx, %rdi
callq 0x1956a
testb %al, %al
je 0x18ed9
leaq 0x128(%rbx), %rdi
movq 0x20(%rbx), %rsi
movl 0x28(%rbx), %edx
subl %esi, %edx
callq 0x4fd2
movb $0x1, 0x2df(%rbx)
jmp 0x19082
movb $0x1, 0x2dd(%rbx)
movq 0x20(%rbx), %r14
movq 0x28(%rbx), %r8
leaq 0x50(%rbx), %rdi
leaq 0x54(%rbx), %rsi
leaq 0x58(%rbx), %r15
subq %r14, %r8
movq %r15, %rdx
movq %r14, %rcx
callq 0x6f15
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
movq 0x28(%rbx), %rsi
subq 0x20(%rbx), %rsi
addq %r14, %rsi
leaq 0x4ca0(%rip), %rdx      # 0x1dbc2
movq %r14, %rdi
callq 0x47a8
movq 0x28(%rbx), %r12
subq 0x20(%rbx), %r12
addq %r14, %r12
testq %rax, %rax
cmovneq %rax, %r12
leaq 0x3835(%rip), %rcx      # 0x1c778
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x3817(%rip), %rcx      # 0x1c77d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x381c(%rip), %rcx      # 0x1c7a5
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x37f4(%rip), %rcx      # 0x1c7a0
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x37f9(%rip), %rcx      # 0x1c7c8
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x3790(%rip), %rcx      # 0x1c782
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x65ac(%rip), %rcx      # 0x1f5bd
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x376b(%rip), %rcx      # 0x1c79b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x3760(%rip), %rcx      # 0x1c7af
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x19082
leaq 0x3755(%rip), %rcx      # 0x1c7c3
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x132b0
movl %eax, 0x2d8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq