// File: /workspace/github_cpp_makefile_star2_O1/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 0x1e2fe
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb $0x1, 0x2dc(%rdi)
movq 0x20(%rdi), %rcx
xorl %eax, %eax
cmpq 0x28(%rdi), %rcx
jne 0x1e0cb
leaq 0x20(%rbx), %rdi
movq %rbx, %rsi
callq 0xce6c
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
movb $0x0, 0x2df(%rbx)
movw $0x0, 0x2dd(%rbx)
movq %rbx, %rdi
callq 0x1e7c2
testb %al, %al
je 0x1e11d
leaq 0x128(%rbx), %rdi
movq 0x20(%rbx), %rdx
movl 0x28(%rbx), %ecx
subl %edx, %ecx
leaq 0x647c(%rip), %rsi      # 0x24588
callq 0x5827
movb $0x1, 0x2de(%rbx)
jmp 0x1e2f3
movq %rbx, %rdi
callq 0x1e82c
testb %al, %al
je 0x1e14a
leaq 0x128(%rbx), %rdi
movq 0x20(%rbx), %rsi
movl 0x28(%rbx), %edx
subl %esi, %edx
callq 0x598b
movb $0x1, 0x2df(%rbx)
jmp 0x1e2f3
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 0x7bc9
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
movq 0x28(%rbx), %rsi
subq 0x20(%rbx), %rsi
addq %r14, %rsi
leaq 0x4a0f(%rip), %rdx      # 0x22ba2
movq %r14, %rdi
callq 0x5036
movq 0x28(%rbx), %r12
subq 0x20(%rbx), %r12
addq %r14, %r12
testq %rax, %rax
cmovneq %rax, %r12
leaq 0x35a4(%rip), %rcx      # 0x21758
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x3586(%rip), %rcx      # 0x2175d
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x358b(%rip), %rcx      # 0x21785
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x3563(%rip), %rcx      # 0x21780
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x3568(%rip), %rcx      # 0x217a8
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x34ff(%rip), %rcx      # 0x21762
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x630d(%rip), %rcx      # 0x2458f
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x34da(%rip), %rcx      # 0x2177b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x34cf(%rip), %rcx      # 0x2178f
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
testl %eax, %eax
jne 0x1e2f3
leaq 0x34c4(%rip), %rcx      # 0x217a3
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x16495
movl %eax, 0x2d8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq