// File: /workspace/github_cpp_makefile_star2_O3/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 0x1e1e8
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdi, %r12
movb $0x1, 0x2dc(%rdi)
movq 0x20(%rdi), %rax
cmpq 0x28(%rdi), %rax
je 0x1e00f
leaq 0x2d8(%r12), %r13
movl $0x0, 0x2d8(%r12)
movb $0x0, 0x2df(%r12)
movw $0x0, 0x2dd(%r12)
movq %r12, %rdi
callq 0x1e6c0
testb %al, %al
je 0x1dfdc
leaq 0x128(%r12), %rdi
movq 0x20(%r12), %rdx
movl 0x28(%r12), %ecx
subl %edx, %ecx
leaq 0x67a9(%rip), %rsi      # 0x24772
callq 0x5dfb
movb $0x1, 0x2de(%r12)
jmp 0x1e1df
movq %r12, %rdi
callq 0x1e72a
testb %al, %al
je 0x1e039
leaq 0x128(%r12), %rdi
movq 0x20(%r12), %rsi
movl 0x28(%r12), %edx
subl %esi, %edx
callq 0x5f5f
movb $0x1, 0x2df(%r12)
jmp 0x1e1df
leaq 0x20(%r12), %rdi
movq %r12, %rsi
callq 0xd09e
movl %eax, 0x2d8(%r12)
testl %eax, %eax
jne 0x1e1df
leaq 0x2d8(%r12), %r13
jmp 0x1df8e
movb $0x1, 0x2dd(%r12)
movq 0x20(%r12), %rbx
movq 0x28(%r12), %r8
leaq 0x50(%r12), %rdi
leaq 0x54(%r12), %rsi
leaq 0x58(%r12), %r14
subq %rbx, %r8
movq %r14, %rdx
movq %rbx, %rcx
callq 0x8175
movl %eax, 0x2d8(%r12)
testl %eax, %eax
jne 0x1e1df
movq 0x28(%r12), %rsi
subq 0x20(%r12), %rsi
addq %rbx, %rsi
leaq 0x4c39(%rip), %rdx      # 0x22cc6
movq %rbx, %rdi
callq 0x5611
movq 0x28(%r12), %r15
subq 0x20(%r12), %r15
addq %rbx, %r15
testq %rax, %rax
cmovneq %rax, %r15
leaq 0x37cc(%rip), %rcx      # 0x2187c
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, 0x2d8(%r12)
testl %eax, %eax
jne 0x1e1df
leaq 0x37ac(%rip), %rcx      # 0x21881
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x37b3(%rip), %rcx      # 0x218a9
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x378d(%rip), %rcx      # 0x218a4
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x3794(%rip), %rcx      # 0x218cc
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x372d(%rip), %rcx      # 0x21886
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x6603(%rip), %rcx      # 0x24779
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x370c(%rip), %rcx      # 0x2189f
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x3703(%rip), %rcx      # 0x218b3
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
testl %eax, %eax
jne 0x1e1df
leaq 0x36fa(%rip), %rcx      # 0x218c7
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x16275
movl %eax, (%r13)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq