// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/dos.c
// Function: print_dos_header
int print_dos_header(struct dos_header_t *dos_header)
{
  printf("---------------------------------------------\n");
  printf("MS DOS Header\n");
  printf("---------------------------------------------\n");

  printf("      Magic Number: %c%c\n", dos_header->e_magic & 0xff, dos_header->e_magic >> 8);
  printf("Bytes On Last Page: %d\n", dos_header->e_cblp);
  printf("     Pages In File: %d\n", dos_header->e_cp);
  printf("       Relocations: %d\n", dos_header->e_crlc);
  printf("    Size Of Header: %d\n", dos_header->e_cparhdr);
  printf("    Min Extra Para: %d\n", dos_header->e_minalloc);
  printf("    Max Extra Para: %d\n", dos_header->e_maxalloc);
  printf("  Initial SS Value: %d\n", dos_header->e_ss);
  printf("  Initial SP Value: %d\n", dos_header->e_sp);
  printf("          Checksum: %d\n", dos_header->e_csum);
  printf("  Initial IP Value: %d\n", dos_header->e_ip);
  printf("  Initial CS Value: %d\n", dos_header->e_cs);
  printf("  Addr Reloc Table: %d\n", dos_header->e_lfarlc);
  printf("    Overlay Number: %d\n", dos_header->e_ovno);
  /* read_chars_bin(in,dos_header->e_res,4); */
  printf("            OEM ID: %d\n", dos_header->e_oemid);
  printf("          OEM Info: %d\n", dos_header->e_oeminfo);
  /* read_chars_bin(in,dos_header->e_res2,10); */
  printf("Addr Of New Header: %d\n", dos_header->e_lfanew);
  printf("\n");

  return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x3a9a(%rip), %r14      # 0x8241
movq %r14, %rdi
callq 0x3060
leaq 0x49f3(%rip), %rdi      # 0x91a9
callq 0x3060
movq %r14, %rdi
callq 0x3060
movzwl (%rbx), %edx
movzbl %dl, %esi
shrl $0x8, %edx
leaq 0x483c(%rip), %rdi      # 0x900f
xorl %eax, %eax
callq 0x3090
movzwl 0x2(%rbx), %esi
leaq 0x4844(%rip), %rdi      # 0x9029
xorl %eax, %eax
callq 0x3090
movzwl 0x4(%rbx), %esi
leaq 0x484a(%rip), %rdi      # 0x9041
xorl %eax, %eax
callq 0x3090
movzwl 0x6(%rbx), %esi
leaq 0x4850(%rip), %rdi      # 0x9059
xorl %eax, %eax
callq 0x3090
movzwl 0x8(%rbx), %esi
leaq 0x4856(%rip), %rdi      # 0x9071
xorl %eax, %eax
callq 0x3090
movzwl 0xa(%rbx), %esi
leaq 0x485c(%rip), %rdi      # 0x9089
xorl %eax, %eax
callq 0x3090
movzwl 0xc(%rbx), %esi
leaq 0x4862(%rip), %rdi      # 0x90a1
xorl %eax, %eax
callq 0x3090
movzwl 0xe(%rbx), %esi
leaq 0x4868(%rip), %rdi      # 0x90b9
xorl %eax, %eax
callq 0x3090
movzwl 0x10(%rbx), %esi
leaq 0x486e(%rip), %rdi      # 0x90d1
xorl %eax, %eax
callq 0x3090
movzwl 0x12(%rbx), %esi
leaq 0x4874(%rip), %rdi      # 0x90e9
xorl %eax, %eax
callq 0x3090
movzwl 0x14(%rbx), %esi
leaq 0x487a(%rip), %rdi      # 0x9101
xorl %eax, %eax
callq 0x3090
movzwl 0x16(%rbx), %esi
leaq 0x4880(%rip), %rdi      # 0x9119
xorl %eax, %eax
callq 0x3090
movzwl 0x18(%rbx), %esi
leaq 0x4886(%rip), %rdi      # 0x9131
xorl %eax, %eax
callq 0x3090
movzwl 0x1a(%rbx), %esi
leaq 0x488c(%rip), %rdi      # 0x9149
xorl %eax, %eax
callq 0x3090
movzwl 0x24(%rbx), %esi
leaq 0x4892(%rip), %rdi      # 0x9161
xorl %eax, %eax
callq 0x3090
movzwl 0x26(%rbx), %esi
leaq 0x4898(%rip), %rdi      # 0x9179
xorl %eax, %eax
callq 0x3090
movl 0x3c(%rbx), %esi
leaq 0x489f(%rip), %rdi      # 0x9191
xorl %eax, %eax
callq 0x3090
pushq $0xa
popq %rdi
callq 0x3030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop