// File: /workspace/github_cpp_makefile_star2_O2/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 $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
callq 0x18e38
cmpb $0x1, 0x2dd(%rbx)
jne 0x137e4
movq %rbx, %rdi
callq 0x1908e
cmpl $0x0, 0x2d8(%rbx)
jne 0x137e4
leaq 0x5ca2(%rip), %rax      # 0x190b2
leaq 0x5cab(%rip), %rcx      # 0x190c2
cmpb $0x0, 0x24(%r14)
cmovneq %rax, %rcx
movq 0x13ba9(%rip), %rdi     # 0x26fd0
movq (%rdi), %rax
addq -0x18(%rax), %rdi
callq *%rcx
leaq 0x10(%rsp), %rdi
andq $0x0, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
leaq 0x50(%rsp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
addq $0x20, %rbx
movq %rbx, %rdx
callq 0xeae9
movl %eax, %ebp
testl %eax, %eax
je 0x134b9
movq 0x18(%rsp), %rdi
leaq 0xb382(%rip), %r15      # 0x1e7ed
cmpq %rdi, 0x10(%rsp)
je 0x134a2
addq $-0x20, %rdi
leaq 0xa74a(%rip), %rsi      # 0x1dbc7
callq 0x12180
testb %al, %al
je 0x134a2
movq 0x58(%rsp), %rax
cmpq $0x0, -0x8(%rax)
leaq 0xb319(%rip), %rax      # 0x1e7b0
leaq 0xb34f(%rip), %r15      # 0x1e7ed
cmoveq %rax, %r15
movq 0x13b27(%rip), %rdi     # 0x26fd0
movq %r15, %rsi
callq 0x2210
movq %rax, %rdi
callq 0x2100
cmpb $0x1, 0x21(%r14)
jne 0x1351f
movq 0x13b09(%rip), %rdi     # 0x26fd0
leaq 0xb361(%rip), %rsi      # 0x1e82f
callq 0x2210
xorl %ebx, %ebx
movq 0x13af4(%rip), %r14     # 0x26fd0
leaq 0xbc6d(%rip), %r15      # 0x1f150
xorl %r12d, %r12d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r12
jae 0x135f4
addq %rbx, %rsi
movq %r14, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %r12
addq $0x20, %rbx
jmp 0x134e6
movq 0x13aaa(%rip), %rdi     # 0x26fd0
leaq 0xb31e(%rip), %rsi      # 0x1e84b
callq 0x2210
movl %ebp, 0x2c(%rsp)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebp, %ebp
leaq 0x68(%rsp), %r14
movq 0x13a7b(%rip), %r15     # 0x26fd0
leaq 0xbbf4(%rip), %r12      # 0x1f150
leaq 0xbdf9(%rip), %r13      # 0x1f35c
xorl %ebx, %ebx
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %rbx
jae 0x13663
addq %rbp, %rsi
movq %r14, %rdi
callq 0x190d2
testb %al, %al
je 0x135bc
movq %r15, %rdi
callq 0x2100
movq %r15, %rdi
movq %r12, %rsi
callq 0x2210
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
movq %rax, %rdi
callq 0x21e0
movq %rax, %rdi
movq %r13, %rsi
callq 0x2210
movq 0x10(%rsp), %rsi
addq %rbp, %rsi
movq %r14, %rdi
callq 0x2120
movq 0x50(%rsp), %rax
movq (%rax,%rbx,8), %rsi
movq %r15, %rdi
callq 0x2150
movq %rax, %rdi
movq %r12, %rsi
callq 0x2210
incq %rbx
addq $0x20, %rbp
jmp 0x13565
movq 0x139d5(%rip), %rdi     # 0x26fd0
callq 0x2100
movq 0x139c9(%rip), %rdi     # 0x26fd0
leaq 0xb22f(%rip), %rsi      # 0x1e83d
callq 0x2210
xorl %ebx, %ebx
movq 0x139b4(%rip), %r14     # 0x26fd0
leaq 0xbb2d(%rip), %r15      # 0x1f150
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rcx, %rbx
jae 0x13655
movq (%rax,%rbx,8), %rsi
movq %r14, %rdi
callq 0x2150
movq %rax, %rdi
movq %r15, %rsi
callq 0x2210
incq %rbx
jmp 0x13623
movq 0x13974(%rip), %rdi     # 0x26fd0
callq 0x2100
jmp 0x1367d
movq 0x13966(%rip), %rdi     # 0x26fd0
callq 0x2100
leaq 0x68(%rsp), %rdi
callq 0x22a0
movl 0x2c(%rsp), %ebp
leaq 0x70(%rsp), %rax
andl $0x0, (%rax)
andq $0x0, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
andq $0x0, 0x20(%rax)
xorl %ebx, %ebx
leaq 0x68(%rsp), %r14
xorl %r15d, %r15d
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rax, %r15
jae 0x136ce
addq %rbx, %rsi
movq %r14, %rdi
callq 0x190dc
movb $0x1, (%rax)
incq %r15
addq $0x20, %rbx
jmp 0x136a1
testl %ebp, %ebp
jne 0x137c6
leaq 0x9096(%rip), %rsi      # 0x1c773
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20b0
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x190dc
movb (%rax), %bl
leaq 0x30(%rsp), %rdi
callq 0x22a0
testb %bl, %bl
jne 0x13726
movq 0x138be(%rip), %rdi     # 0x26fd0
leaq 0xb14a(%rip), %rsi      # 0x1e863
callq 0x2210
movq %rax, %rdi
callq 0x2100
leaq 0xa495(%rip), %rsi      # 0x1dbc2
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20b0
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x190dc
movb (%rax), %bl
leaq 0x30(%rsp), %rdi
callq 0x22a0
testb %bl, %bl
jne 0x13776
movq 0x1386e(%rip), %rdi     # 0x26fd0
leaq 0xb10f(%rip), %rsi      # 0x1e878
callq 0x2210
movq %rax, %rdi
callq 0x2100
leaq 0xa44a(%rip), %rsi      # 0x1dbc7
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x20b0
leaq 0x68(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x190dc
movb (%rax), %bl
leaq 0x30(%rsp), %rdi
callq 0x22a0
testb %bl, %bl
jne 0x137c6
movq 0x1381e(%rip), %rdi     # 0x26fd0
leaq 0xb0d4(%rip), %rsi      # 0x1e88d
callq 0x2210
movq %rax, %rdi
callq 0x2100
leaq 0x68(%rsp), %rdi
callq 0x195b6
leaq 0x50(%rsp), %rdi
callq 0x19658
leaq 0x10(%rsp), %rdi
callq 0x1916c
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22a0
jmp 0x1383b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22a0
jmp 0x1383b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x22a0
jmp 0x1383b
jmp 0x13849
jmp 0x1384e
jmp 0x13838
jmp 0x13838
jmp 0x13838
movq %rax, %rbx
jmp 0x13865
jmp 0x13849
jmp 0x13838
jmp 0x13849
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x195b6
jmp 0x1385b
jmp 0x13849
movq %rax, %rbx
jmp 0x1385b
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x22a0
leaq 0x50(%rsp), %rdi
callq 0x19658
leaq 0x10(%rsp), %rdi
callq 0x1916c
movq %rbx, %rdi
callq 0x23a0
movq %rax, %rdi
callq 0xe69c