// File: /workspace/github_cpp_makefile_star2_O1/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 %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r14
callq 0x1e094
cmpl $0x0, 0x2d8(%r14)
je 0x1d307
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x0, 0x1b0(%r14)
je 0x1d34c
movl 0x1c0(%r14), %ebx
cmpq $0x7, %rbx
ja 0x1d396
movq 0xdcab(%rip), %r14      # 0x2afd0
leaq 0x7150(%rip), %rsi      # 0x2447c
movl $0x15, %edx
movq %r14, %rdi
callq 0x2280
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
jmp 0x1d36a
movq 0xdc7d(%rip), %rbx      # 0x2afd0
leaq 0x70fb(%rip), %rsi      # 0x24455
movl $0x26, %edx
movq %rbx, %rdi
callq 0x2280
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2040
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2160
movq 0x1b8(%r14), %r14
movq 0xdc2c(%rip), %r15      # 0x2afd0
leaq 0x70e7(%rip), %rsi      # 0x24492
movl $0xb, %edx
movq %r15, %rdi
callq 0x2280
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2150
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r12, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2160
movb (%r14), %al
cmpb $0x4d, %al
jne 0x1d406
cmpb $0x4d, 0x1(%r14)
jne 0x1d406
cmpb $0x0, 0x2(%r14)
je 0x1d4e9
xorl %ebp, %ebp
cmpb $0x49, %al
jne 0x1d424
cmpb $0x49, 0x1(%r14)
jne 0x1d424
cmpb $0x2a, 0x2(%r14)
jne 0x1d424
cmpb $0x0, 0x3(%r14)
sete %al
jmp 0x1d426
xorl %eax, %eax
testb %bpl, %bpl
je 0x1d440
movq 0xdb9e(%rip), %rdi      # 0x2afd0
leaq 0x7065(%rip), %rsi      # 0x2449e
movl $0x22, %edx
jmp 0x1d457
testb %al, %al
je 0x1d4b6
movq 0xdb85(%rip), %rdi      # 0x2afd0
leaq 0x706f(%rip), %rsi      # 0x244c1
movl $0x25, %edx
callq 0x2280
movq (%r15), %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
movzbl %bpl, %ebp
movl $0x4, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
callq 0x1c746
movl %eax, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x1c7c3
leaq 0x702a(%rip), %rsi      # 0x244e7
movl $0x31, %edx
movq %r15, %rdi
callq 0x2280
movq (%r15), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2210
movsbl %al, %esi
movq %r15, %rdi
jmp 0x1d381
cmpb $0x2a, 0x3(%r14)
sete %bpl
jmp 0x1d408