// File: /workspace/github_cpp_makefile_star2_O3/lvandeve[P]lodepng/pngdetail.cpp
// Function: displayChunkNames(Data&, Options const&)
void displayChunkNames(Data& data, const Options& options) {
  data.loadInspect();
  if(!data.is_png) return;
  data.loadFile();
  if(data.error) return;
  std::cout << (options.use_hex ? std::hex: std::dec);
  const std::vector<unsigned char>& buffer = data.buffer;
  std::vector<std::string> names;
  std::vector<size_t> sizes;
  unsigned error = lodepng::getChunkInfo(names, sizes, buffer);
  if(error) {
    if(!names.empty() && names.back() == "IEND" && sizes.back() == 0) {
      std::cout << "Corruption or superfluous data detected after the IEND chunk" << std::endl;
    } else {
      std::cout << "Error while identifying chunks. Listing identified chunks anyway." << std::endl;
    }
  }

  if(options.show_chunks2) {
    std::cout << "Chunk types: ";
    for(size_t i = 0; i < names.size(); i++) std::cout << names[i] << " ";
    std::cout << std::endl;
    std::cout << "Chunk sizes: ";
    for(size_t i = 0; i < sizes.size(); i++) std::cout << sizes[i] << " ";
    std::cout << std::endl;
  } else {
    std::cout << "Chunks (type: lengths):";
    std::string last_type;
    for(size_t i = 0; i < names.size(); i++) {
      if(last_type != names[i]) {
        std::cout << std::endl;
        std::cout << " " << names[i] << ": ";
      }
      last_type = names[i];

      std::cout << sizes[i] << " ";
    }
    std::cout << std::endl;
  }

  std::map<std::string, bool> typedict;
  for(size_t i = 0; i < names.size(); i++) {
    typedict[names[i]] = true;
  }

  if(!error) {
    if(!typedict["IHDR"]) std::cout << "Error: no IHDR chunk" << std::endl;
    if(!typedict["IDAT"]) std::cout << "Error: no IDAT chunk" << std::endl;
    if(!typedict["IEND"]) std::cout << "Error: no IEND chunk" << std::endl;
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %r14
movq %rdi, %r15
callq 0x1df4c
cmpb $0x1, 0x2dd(%r15)
jne 0x169ce
leaq 0x20(%r15), %rbx
movq 0x20(%r15), %rax
cmpq 0x28(%r15), %rax
je 0x169b4
movl $0x0, 0x2d8(%r15)
leaq 0x7dcb(%rip), %rax      # 0x1e1e9
leaq 0x7dd4(%rip), %rcx      # 0x1e1f9
cmpb $0x0, 0x24(%r14)
cmovneq %rax, %rcx
movq 0x14b9b(%rip), %rdi     # 0x2afd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq *%rcx
xorl %eax, %eax
movq %rsp, %rdi
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x40(%rsp), %rsi
movq %rax, 0x10(%rsi)
movaps %xmm0, (%rsi)
movq %rbx, %rdx
callq 0x10b7d
movl %eax, %ebp
testl %eax, %eax
je 0x164dc
movq 0x8(%rsp), %rdi
cmpq %rdi, (%rsp)
je 0x16496
addq $-0x20, %rdi
leaq 0xc84e(%rip), %rsi      # 0x22ccb
callq 0x2090
testl %eax, %eax
jne 0x16496
movq 0x48(%rsp), %rax
cmpq $0x0, -0x8(%rax)
je 0x169e0
movq 0x14b33(%rip), %r15     # 0x2afd0
leaq 0xd505(%rip), %rsi      # 0x239a9
movl $0x41, %edx
movq %r15, %rdi
callq 0x2290
movq (%r15), %rax
addq -0x18(%rax), %r15
movq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x14b01(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
cmpb $0x1, 0x21(%r14)
jne 0x16627
movq 0x14ae2(%rip), %r14     # 0x2afd0
leaq 0xd4f6(%rip), %rsi      # 0x239eb
movl $0xd, %edx
movq %r14, %rdi
callq 0x2290
movq (%rsp), %rax
cmpq %rax, 0x8(%rsp)
je 0x16560
movl $0x8, %ebx
xorl %r13d, %r13d
movq 0x14ab4(%rip), %r15     # 0x2afd0
leaq 0xdde9(%rip), %r12      # 0x2430c
movq -0x8(%rax,%rbx), %rsi
movq (%rax,%rbx), %rdx
movq %r15, %rdi
callq 0x2290
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2290
incq %r13
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
addq $0x20, %rbx
cmpq %rcx, %r13
jb 0x16523
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x14a52(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x14a3e(%rip), %r14     # 0x2afd0
leaq 0xd460(%rip), %rsi      # 0x239f9
movl $0xd, %edx
movq %r14, %rdi
callq 0x2290
movq 0x40(%rsp), %rax
cmpq %rax, 0x48(%rsp)
je 0x165f7
xorl %ebx, %ebx
movq 0x14a15(%rip), %r15     # 0x2afd0
leaq 0xdd4a(%rip), %r12      # 0x2430c
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
callq 0x2160
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2290
incq %rbx
movq 0x40(%rsp), %rax
movq 0x48(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jb 0x165c2
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x149bb(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
jmp 0x16794
movq 0x149a2(%rip), %r14     # 0x2afd0
leaq 0xd3d2(%rip), %rsi      # 0x23a07
movl $0x17, %edx
movq %r14, %rdi
callq 0x2290
movl %ebp, 0x1c(%rsp)
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%rsp), %rbp
cmpq %rbp, 0x8(%rsp)
je 0x16751
xorl %ebx, %ebx
leaq 0x58(%rsp), %r15
leaq 0xdc95(%rip), %r12      # 0x2430c
xorl %r13d, %r13d
movq 0x60(%rsp), %rdx
cmpq 0x8(%rbp,%rbx), %rdx
jne 0x1669e
testq %rdx, %rdx
je 0x16702
movq (%rbp,%rbx), %rsi
movq 0x58(%rsp), %rdi
callq 0x2250
testl %eax, %eax
je 0x16702
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movl $0x1, %edx
movq %r14, %rdi
movq %r12, %rsi
callq 0x2290
movq (%rsp), %rax
movq (%rax,%rbx), %rsi
movq 0x8(%rax,%rbx), %rdx
movq %r14, %rdi
callq 0x2290
movl $0x2, %edx
movq %rax, %rdi
leaq 0xde1f(%rip), %rsi      # 0x24518
callq 0x2290
movq (%rsp), %rbp
addq %rbx, %rbp
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2120
movq 0x40(%rsp), %rax
movq (%rax,%r13,8), %rsi
movq %r14, %rdi
callq 0x2160
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2290
incq %r13
movq (%rsp), %rbp
movq 0x8(%rsp), %rax
subq %rbp, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r13
jb 0x1667a
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x14861(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
movl 0x1c(%rsp), %ebp
je 0x16794
callq 0x2210
leaq 0x60(%rsp), %rax
movl $0x0, (%rax)
xorl %ecx, %ecx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq (%rsp), %rsi
cmpq %rsi, 0x8(%rsp)
je 0x167f0
xorl %ebx, %ebx
leaq 0x58(%rsp), %r14
xorl %r15d, %r15d
addq %rbx, %rsi
movq %r14, %rdi
callq 0x1e20a
movb $0x1, (%rax)
incq %r15
movq (%rsp), %rsi
movq 0x8(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
addq $0x20, %rbx
cmpq %rax, %r15
jb 0x167c6
testl %ebp, %ebp
jne 0x1698d
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0xb06f(%rip), %rsi      # 0x21877
leaq 0xb06c(%rip), %rdx      # 0x2187b
leaq 0x20(%rsp), %rdi
callq 0x14ece
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1e20a
movb (%rax), %bl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x16839
callq 0x2210
testb %bl, %bl
jne 0x16883
movq 0x1478c(%rip), %rbx     # 0x2afd0
leaq 0xd1d4(%rip), %rsi      # 0x23a1f
movl $0x14, %edx
movq %rbx, %rdi
callq 0x2290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x1475a(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xc434(%rip), %rsi      # 0x22cc6
leaq 0xc431(%rip), %rdx      # 0x22cca
callq 0x14ece
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1e20a
movb (%rax), %bl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x168be
callq 0x2210
testb %bl, %bl
jne 0x16908
movq 0x14707(%rip), %rbx     # 0x2afd0
leaq 0xd164(%rip), %rsi      # 0x23a34
movl $0x14, %edx
movq %rbx, %rdi
callq 0x2290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x146d5(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq 0x20(%rsp), %rdi
movq %r15, (%rdi)
leaq 0xc3b4(%rip), %rsi      # 0x22ccb
leaq 0xc3b1(%rip), %rdx      # 0x22ccf
callq 0x14ece
leaq 0x58(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1e20a
movb (%rax), %bl
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x16943
callq 0x2210
testb %bl, %bl
jne 0x1698d
movq 0x14682(%rip), %rbx     # 0x2afd0
leaq 0xd0f4(%rip), %rsi      # 0x23a49
movl $0x14, %edx
movq %rbx, %rdi
callq 0x2290
movq (%rbx), %rax
addq -0x18(%rax), %rbx
movq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq 0x14650(%rip), %rdi     # 0x2afd0
callq 0x2040
movq %rax, %rdi
callq 0x2170
leaq 0x58(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x1e776
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x169aa
callq 0x2210
movq %rsp, %rdi
callq 0x1e2e2
jmp 0x169ce
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd09e
movl %eax, 0x2d8(%r15)
testl %eax, %eax
je 0x16417
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x145e9(%rip), %rdi     # 0x2afd0
leaq 0xcf7e(%rip), %rsi      # 0x2396c
movl $0x3c, %edx
callq 0x2290
movq 0x145d1(%rip), %rdi     # 0x2afd0
callq 0x2100
jmp 0x164dc
jmp 0x16a11
jmp 0x16a2f
jmp 0x16a11
jmp 0x16a2f
movq %rax, %r14
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x16a32
callq 0x2210
jmp 0x16a32
jmp 0x16a2f
jmp 0x16a44
jmp 0x16a49
jmp 0x16a2f
jmp 0x16a44
movq %rax, %r14
leaq 0x58(%rsp), %rdi
movq 0x10(%rdi), %rsi
callq 0x1e776
jmp 0x16a60
jmp 0x16a44
movq %rax, %r14
jmp 0x16a60
movq %rax, %r14
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x16a60
callq 0x2210
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x16a6f
callq 0x2210
movq %rsp, %rdi
callq 0x1e2e2
movq %r14, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0x14c96