// File: /workspace/github_c_makefile_star2_O2/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_module_list
void print_minidump_module_list(FILE *in)
{
  struct minidump_location_desc_t minidump_location_desc;
  uint32_t n;
  uint32_t num_modules = read_uint32(in);

  printf("  - num_modules: %d\n", num_modules);

  for (n = 0; n < num_modules; n++)
  {
    printf("  -- Module %d --\n", n);
    printf("    base_of_image: 0x%" PRIx64 "\n", read_uint64(in));
    printf("    size_of_image: %u\n", read_uint32(in));
    printf("         checksum: %u\n", read_uint32(in));
    printf("  time_date_stamp: %u\n", read_uint32(in));

    uint32_t module_name_rva = read_uint32(in);
    printf("      module_name: offset=%u", module_name_rva);
    print_minidump_string(in, module_name_rva);

    print_minidump_vs_fixed_file_info(in);

    read_minidump_location_desc(&minidump_location_desc, in);

    printf("        cv_record:\n");
    printf("              [ len_data: %u, ofs_data: %u ]\n",
       minidump_location_desc.len_data,
       minidump_location_desc.ofs_data);

    read_minidump_location_desc(&minidump_location_desc, in);

    printf("      misc_record:\n");
    printf("              [ len_data: %u, ofs_data: %u ]\n",
       minidump_location_desc.len_data,
       minidump_location_desc.ofs_data);

    printf("        reserved0: %" PRId64 "\n", read_uint64(in));
    printf("        reserved1: %" PRId64 "\n", read_uint64(in));
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1766
movl %eax, %ebp
leaq 0x1dde(%rip), %rdi      # 0x44a7
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rsp, %r13
leaq 0x1e6f(%rip), %r15      # 0x454b
xorl %r14d, %r14d
cmpl %r14d, %ebp
je 0x2942
leaq 0x1dcd(%rip), %rdi      # 0x44bc
movl %r14d, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16cc
leaq 0x1dc7(%rip), %rdi      # 0x44cf
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1dc8(%rip), %rdi      # 0x44e9
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1dc7(%rip), %rdi      # 0x4500
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x1dc6(%rip), %rdi      # 0x4517
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
movl %eax, %r12d
leaq 0x1dc2(%rip), %rdi      # 0x452e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
movl %r12d, %esi
callq 0x2951
movq %rbx, %rdi
callq 0x1766
leaq 0x2cc7(%rip), %rdi      # 0x5456
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2ccb(%rip), %rdi      # 0x5472
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2ccd(%rip), %rdi      # 0x548c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2ccf(%rip), %rdi      # 0x54a6
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cd1(%rip), %rdi      # 0x54c0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cd3(%rip), %rdi      # 0x54da
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cd5(%rip), %rdi      # 0x54f4
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cd7(%rip), %rdi      # 0x550e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cd9(%rip), %rdi      # 0x5528
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cdb(%rip), %rdi      # 0x5542
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cdd(%rip), %rdi      # 0x555c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2cdf(%rip), %rdi      # 0x5576
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1766
leaq 0x2ce1(%rip), %rdi      # 0x5590
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1a84
leaq 0x2d43(%rip), %rdi      # 0x560d
callq 0x1040
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1060
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1a84
leaq 0x2d2e(%rip), %rdi      # 0x5620
callq 0x1040
movl (%rsp), %esi
movl 0x4(%rsp), %edx
movq %r15, %rdi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16cc
leaq 0x1c62(%rip), %rdi      # 0x4579
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16cc
leaq 0x1c61(%rip), %rdi      # 0x4591
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
incl %r14d
jmp 0x26df
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq