// File: /workspace/github_c_makefile_star2_O3/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 0x1782
movl %eax, %ebp
leaq 0x1d84(%rip), %rdi      # 0x44a7
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
testl %ebp, %ebp
je 0x29b0
leaq 0x1e10(%rip), %r14      # 0x454b
xorl %r15d, %r15d
leaq 0x1d77(%rip), %rdi      # 0x44bc
movl %r15d, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1d71(%rip), %rdi      # 0x44cf
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1d72(%rip), %rdi      # 0x44e9
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1d71(%rip), %rdi      # 0x4500
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1d70(%rip), %rdi      # 0x4517
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movl %eax, %r12d
leaq 0x1d6c(%rip), %rdi      # 0x452e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
movl %r12d, %esi
callq 0x29bf
movq %rbx, %rdi
callq 0x1782
leaq 0x2c71(%rip), %rdi      # 0x5456
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c75(%rip), %rdi      # 0x5472
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c77(%rip), %rdi      # 0x548c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c79(%rip), %rdi      # 0x54a6
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c7b(%rip), %rdi      # 0x54c0
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c7d(%rip), %rdi      # 0x54da
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c7f(%rip), %rdi      # 0x54f4
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c81(%rip), %rdi      # 0x550e
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c83(%rip), %rdi      # 0x5528
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c85(%rip), %rdi      # 0x5542
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c87(%rip), %rdi      # 0x555c
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c89(%rip), %rdi      # 0x5576
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x2c8b(%rip), %rdi      # 0x5590
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movl %eax, %r12d
movq %rbx, %rdi
callq 0x1782
movl %eax, %r13d
leaq 0x2ce2(%rip), %rdi      # 0x560d
callq 0x1040
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movl %eax, %r12d
movq %rbx, %rdi
callq 0x1782
movl %eax, %r13d
leaq 0x2cc3(%rip), %rdi      # 0x5620
callq 0x1040
movq %r14, %rdi
movl %r12d, %esi
movl %r13d, %edx
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1bf8(%rip), %rdi      # 0x4579
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1bf7(%rip), %rdi      # 0x4591
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
incl %r15d
cmpl %r15d, %ebp
jne 0x273e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq