// File: /workspace/github_cpp_makefile_star2_O3/lvandeve[P]lodepng/pngdetail.cpp
// Function: showExif(Data&)
void showExif(Data& data) {
  data.loadInspect();
  if(data.error) return;
  if(!data.state.info_png.exif_defined) {
    std::cout << "No EXIF data present in this PNG image" << std::endl;
    return;
  }
  const unsigned char* exif = data.state.info_png.exif;
  size_t size = data.state.info_png.exif_size;
  if(size < 8) {
    std::cout << "EXIF size too small: " << size << std::endl;
    return;
  }
  std::cout << "EXIF size: " << size << std::endl;
  bool big_endian = exif[0] == 'M' && exif[1] == 'M' && exif[2] == 0 && exif[3] == 42;
  bool little_endian = exif[0] == 'I' && exif[1] == 'I' && exif[2] == 42 && exif[3] == 0;
  if(big_endian) {
    std::cout << "EXIF encoded using big endian (MM)" << std::endl;
  } else if(little_endian) {
    std::cout << "EXIF encoded using little endian (II)" << std::endl;
  } else {
    std::cout << "EXIF has invalid header, must start with MM or II" << std::endl;
    return;
  }
  size_t ifd = readExifUint32(exif, size, 4, big_endian);
  showExifIFD(exif, size, ifd, big_endian, false, false);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x1df4c
cmpl $0x0, 0x2d8(%r14)
je 0x1d207
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
cmpl $0x0, 0x1b0(%r14)
je 0x1d24c
movl 0x1c0(%r14), %ebx
cmpq $0x7, %rbx
ja 0x1d286
movq 0xddab(%rip), %r14      # 0x2afd0
leaq 0x743a(%rip), %rsi      # 0x24666
movl $0x15, %edx
movq %r14, %rdi
callq 0x2290
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2160
movq %rax, %rbx
movq (%rax), %rax
jmp 0x1d26a
movq 0xdd7d(%rip), %rbx      # 0x2afd0
leaq 0x73e5(%rip), %rsi      # 0x2463f
movl $0x26, %edx
movq %rbx, %rdi
callq 0x2290
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %rbx, %rdi
jmp 0x1d38b
movq 0x1b8(%r14), %r14
movq 0xdd3c(%rip), %r15      # 0x2afd0
leaq 0x73e1(%rip), %rsi      # 0x2467c
movl $0xb, %edx
movq %r15, %rdi
callq 0x2290
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2160
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movzbl (%r14), %eax
cmpl $0x49, %eax
je 0x1d348
cmpl $0x4d, %eax
jne 0x1d35d
cmpb $0x4d, 0x1(%r14)
jne 0x1d35d
cmpb $0x0, 0x2(%r14)
jne 0x1d35d
cmpb $0x2a, 0x3(%r14)
jne 0x1d35d
leaq 0x7381(%rip), %rsi      # 0x24688
movl $0x22, %edx
movq %r15, %rdi
callq 0x2290
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movl 0x4(%r14), %eax
bswapl %eax
movb $0x1, %cl
jmp 0x1d3e4
cmpb $0x49, 0x1(%r14)
jne 0x1d35d
cmpb $0x2a, 0x2(%r14)
jne 0x1d35d
cmpb $0x0, 0x3(%r14)
je 0x1d3a3
leaq 0x736d(%rip), %rsi      # 0x246d1
movl $0x31, %edx
movq %r15, %rdi
callq 0x2290
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x2170
leaq 0x7301(%rip), %rsi      # 0x246ab
movl $0x25, %edx
movq %r15, %rdi
callq 0x2290
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r15, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
movl 0x4(%r14), %eax
xorl %ecx, %ecx
movl %eax, %edx
movzbl %cl, %ecx
movq %r14, %rdi
movq %rbx, %rsi
xorl %r8d, %r8d
xorl %r9d, %r9d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1c5e1