// File: /workspace/github_cpp_makefile_star2_O1/lvandeve[P]lodepng/pngdetail.cpp
// Function: displayPalette(Data&, Options const&)
void displayPalette(Data& data, const Options& options) {
  data.loadInspect();
  if(data.error) return;
  std::cout << (options.use_hex ? std::hex: std::dec);

  const LodePNGInfo& info = data.state.info_png;
  const LodePNGColorMode& color = info.color;

  std::cout << "Palette size: " << color.palettesize << std::endl;
  std::cout << "Palette colors: ";
  std::ios_base::fmtflags flags = std::cout.flags();
  std::cout << std::hex << std::setfill('0');
  for(size_t i = 0; i < color.palettesize; i++) {
    unsigned char* p = &color.palette[i * 4];
    std::cout << "#" << std::setw(2) << (int)p[0] << std::setw(2) << (int)p[1] << std::setw(2) << (int)p[2] << std::setw(2) << (int)p[3] << " ";
  }
  std::cout.flags(flags);
  std::cout << std::endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
callq 0x1e094
cmpl $0x0, 0x2d8(%r14)
je 0x17f9e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x635a(%rip), %rax      # 0x1e2ff
leaq 0x6363(%rip), %rcx      # 0x1e30f
cmpb $0x0, 0x24(%rbx)
cmovneq %rax, %rcx
movq 0x13015(%rip), %rbx     # 0x2afd0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
callq *%rcx
leaq 0xb8f9(%rip), %rsi      # 0x238c7
movl $0xe, %edx
movq %rbx, %rdi
callq 0x2280
movq 0x148(%r14), %rsi
movq %rbx, %rdi
callq 0x2150
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
leaq 0xb8bb(%rip), %rsi      # 0x238d6
movl $0x10, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rbx,%rcx), %edx
movl %edx, 0x4(%rsp)
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
leaq (%rbx,%rax), %r15
cmpb $0x0, 0xe1(%rbx,%rax)
jne 0x1806f
movq %r15, %rdi
movl $0x20, %esi
callq 0x2210
movb %al, 0xe0(%r15)
movb $0x1, 0xe1(%r15)
movb $0x30, 0xe0(%r15)
cmpq $0x0, 0x148(%r14)
je 0x18136
xorl %r13d, %r13d
movl $0x2, %ebp
leaq 0xc08e(%rip), %r12      # 0x24122
movq 0x140(%r14), %r15
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xb7c9(%rip), %rsi      # 0x23873
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbp, 0x10(%rbx,%rax)
movzbl (%r15,%r13,4), %esi
movq %rbx, %rdi
callq 0x2380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %rbp, 0x10(%rax,%rcx)
movzbl 0x1(%r15,%r13,4), %esi
movq %rax, %rdi
callq 0x2380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %rbp, 0x10(%rax,%rcx)
movzbl 0x2(%r15,%r13,4), %esi
movq %rax, %rdi
callq 0x2380
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
movq %rbp, 0x10(%rax,%rcx)
movzbl 0x3(%r15,%r13,4), %esi
movq %rax, %rdi
callq 0x2380
movl $0x1, %edx
movq %rax, %rdi
movq %r12, %rsi
callq 0x2280
incq %r13
cmpq 0x148(%r14), %r13
jb 0x18094
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl 0x4(%rsp), %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2160