// File: /workspace/github_c_makefile_star2_O0/Jesskas[P]decompisas/source/fileformat/pestructs.c
// Function: printPEOptHeader
void printPEOptHeader(struct PEOptHeader header)
{
    printf("PE Opt Header:\n\
      \tsignature \t\t= 0x%X\n\
      \tMajorLinkerVersion \t= 0x%X\n\
      \tMinorLinkerVersion \t= 0x%X\n\
      \tSizeOfCode \t\t= 0x%X\n\
      \tSizeOfInitializedData \t= 0x%X\n\
      \tSizeOfUninitializedData = 0x%X\n\
      \tAddressOfEntryPoint \t= 0x%X\n\
      \tBaseOfCode \t\t= 0x%X\n\
      \tBaseOfData \t\t= 0x%X\n\
      \tImageBase \t\t= 0x%X\n\
      \tSectionAlignment \t= 0x%X\n\
      \tFileAlignment \t\t= 0x%X\n\
      \tMajorOSVersion \t\t= 0x%x\n\
      \tMinorOSVersion \t\t= 0x%X\n\
      \tMajorImageVersion \t= 0x%X\n\
      \tMinorImageVersion \t= 0x%X\n\
      \tMajorSubsystemVersion \t= 0x%X\n\
      \tMinorSubsystemVersion \t= 0x%X\n\
      \tWin32VersionValue \t= 0x%X\n\
      \tSizeOfImage \t\t= 0x%X\n\
      \tSizeOfHeaders \t\t= 0x%X\n\
      \tChecksum \t\t= 0x%X\n\
      \tSubsystem \t\t= 0x%X\n\
      \tDLLCharacteristics \t= 0x%X\n\
      \tSizeOfStackReserve \t= 0x%X\n\
      \tSizeOfStackCommit \t= 0x%X\n\
      \tSizeOfHeapReserve \t= 0x%X\n\
      \tSizeOfHeapCommit \t= 0x%X\n\
      \tLoaderFlags \t\t= 0x%X\n\
      \tNumberOfRvaAndSizes \t= 0x%X\n",
      header.signature, header.MajorLinkerVersion, header.MinorLinkerVersion,
      header.SizeOfCode, header.SizeOfInitializedData,
      header.SizeOfUninitializedData, header.AddressOfEntryPoint,
      header.BaseOfCode, header.BaseOfData, header.ImageBase,
      header.SectionAlignment, header.FileAlignment,
      header.MajorOSVersion, header.MinorOSVersion,
      header.MajorImageVersion, header.MinorImageVersion,
      header.MajorSubsystemVersion, header.MinorSubsystemVersion,
      header.Win32VersionValue, header.SizeOfImage,
      header.SizeOfHeaders, header.Checksum, header.Subsystem,
      header.DLLCharacteristics, header.SizeOfStackReserve,
      header.SizeOfStackCommit, header.SizeOfHeapReserve,
      header.SizeOfHeapCommit, header.LoaderFlags, header.NumberOfRvaAndSizes);

      int i;
      for (i = 0; i < header.NumberOfRvaAndSizes; i++) {
          printf("\tdataDirectory[%d].VirtualAddress =\t0x%X\n\
                  \tdataDirectory[%d].Size =\t0x%X\n",
          i, header.DataDirectory[i].VirtualAddress,
          i, header.DataDirectory[i].Size);
      }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x118, %rsp            # imm = 0x118
leaq 0x10(%rbp), %rdi
movq %rdi, -0x78(%rbp)
movswl (%rdi), %esi
movsbl 0x2(%rdi), %edx
movsbl 0x3(%rdi), %ecx
movl 0x4(%rdi), %r8d
movl 0x8(%rdi), %r9d
movl 0xc(%rdi), %eax
movl 0x10(%rdi), %r10d
movl %r10d, -0x70(%rbp)
movl 0x14(%rdi), %r10d
movl %r10d, -0x6c(%rbp)
movl 0x18(%rdi), %r10d
movl %r10d, -0x68(%rbp)
movl 0x1c(%rdi), %r10d
movl %r10d, -0x64(%rbp)
movl 0x20(%rdi), %r10d
movl %r10d, -0x60(%rbp)
movl 0x24(%rdi), %r10d
movl %r10d, -0x5c(%rbp)
movswl 0x28(%rdi), %r10d
movl %r10d, -0x58(%rbp)
movswl 0x2a(%rdi), %r10d
movl %r10d, -0x54(%rbp)
movswl 0x2c(%rdi), %r10d
movl %r10d, -0x50(%rbp)
movswl 0x2e(%rdi), %r10d
movl %r10d, -0x4c(%rbp)
movswl 0x30(%rdi), %r10d
movl %r10d, -0x48(%rbp)
movswl 0x32(%rdi), %r10d
movl %r10d, -0x44(%rbp)
movl 0x34(%rdi), %r10d
movl %r10d, -0x40(%rbp)
movl 0x38(%rdi), %r10d
movl %r10d, -0x3c(%rbp)
movl 0x3c(%rdi), %r10d
movl %r10d, -0x38(%rbp)
movl 0x40(%rdi), %r10d
movl %r10d, -0x34(%rbp)
movswl 0x44(%rdi), %r13d
movzwl 0x46(%rdi), %r12d
movl 0x48(%rdi), %r15d
movl 0x4c(%rdi), %r14d
movl 0x50(%rdi), %ebx
movl 0x54(%rdi), %r11d
movl 0x58(%rdi), %r10d
movl 0x5c(%rdi), %edi
movl %edi, -0x30(%rbp)
leaq 0x8de0(%rip), %rdi      # 0xdf92
movl %eax, (%rsp)
movl -0x70(%rbp), %eax
movl %eax, 0x8(%rsp)
movl -0x6c(%rbp), %eax
movl %eax, 0x10(%rsp)
movl -0x68(%rbp), %eax
movl %eax, 0x18(%rsp)
movl -0x64(%rbp), %eax
movl %eax, 0x20(%rsp)
movl -0x60(%rbp), %eax
movl %eax, 0x28(%rsp)
movl -0x5c(%rbp), %eax
movl %eax, 0x30(%rsp)
movl -0x58(%rbp), %eax
movl %eax, 0x38(%rsp)
movl -0x54(%rbp), %eax
movl %eax, 0x40(%rsp)
movl -0x50(%rbp), %eax
movl %eax, 0x48(%rsp)
movl -0x4c(%rbp), %eax
movl %eax, 0x50(%rsp)
movl -0x48(%rbp), %eax
movl %eax, 0x58(%rsp)
movl -0x44(%rbp), %eax
movl %eax, 0x60(%rsp)
movl -0x40(%rbp), %eax
movl %eax, 0x68(%rsp)
movl -0x3c(%rbp), %eax
movl %eax, 0x70(%rsp)
movl -0x38(%rbp), %eax
movl %eax, 0x78(%rsp)
movl -0x34(%rbp), %eax
movl %eax, 0x80(%rsp)
movl -0x30(%rbp), %eax
movl %r13d, 0x88(%rsp)
movl %r12d, 0x90(%rsp)
movl %r15d, 0x98(%rsp)
movl %r14d, 0xa0(%rsp)
movl %ebx, 0xa8(%rsp)
movl %r11d, 0xb0(%rsp)
movl %r10d, 0xb8(%rsp)
movl %eax, 0xc0(%rsp)
movb $0x0, %al
callq 0x1050
movl $0x0, -0x2c(%rbp)
movq -0x78(%rbp), %rcx
movl -0x2c(%rbp), %eax
cmpl 0x5c(%rcx), %eax
jae 0x52be
movq -0x78(%rbp), %rax
movl -0x2c(%rbp), %esi
movq 0x60(%rax), %rcx
movslq -0x2c(%rbp), %rdx
movl (%rcx,%rdx,8), %edx
movl -0x2c(%rbp), %ecx
movq 0x60(%rax), %rax
movslq -0x2c(%rbp), %rdi
movl 0x4(%rax,%rdi,8), %r8d
leaq 0x90a8(%rip), %rdi      # 0xe354
movb $0x0, %al
callq 0x1050
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x5277
addq $0x118, %rsp            # imm = 0x118
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq