// File: /workspace/github_c_makefile_star2_O3/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_memory_info_list
void print_minidump_memory_info_list(FILE *in)
{
  uint64_t n;
  uint32_t size_of_headers = read_uint32(in);
  uint32_t size_of_entry = read_uint32(in);
  uint64_t number_of_entries = read_uint64(in);

  printf("   size_of_headers: %u\n", size_of_headers);
  printf("     size_of_entry: %u\n", size_of_entry);
  printf(" number_of_entries: %ld\n", number_of_entries);

  for (n = 0; n < number_of_entries; n++)
  {
    uint64_t marker = ftell(in);

    if (feof(in) != 0)
    {
       printf("Error: Premature end of file?\n");
       break;
    }

    printf("  -- Memory Info %ld --\n", n);

    printf("      base_address: 0x%" PRIx64 "\n", read_uint64(in));
    printf("   allocation_base: 0x%" PRIx64 "\n", read_uint64(in));
    printf("allocation_protect: 0x%x\n", read_uint32(in));
    printf("      __alignment1: %d\n", read_uint32(in));
    printf("       region_size: %" PRId64 "\n", read_uint64(in));
    printf("             state: %d\n", read_uint32(in));
    printf("           protect: %d\n", read_uint32(in));
    printf("              type: %d\n", read_uint32(in));
    printf("      __alignment2: %d\n", read_uint32(in));

    uint64_t length = ftell(in) - marker;

    if (length < size_of_entry)
    {
      fseek(in, size_of_entry - marker, SEEK_CUR);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x1782
movl %eax, %r15d
movq %rbx, %rdi
callq 0x1782
movl %eax, %ebp
movq %rbx, %rdi
callq 0x16e8
movq %rax, %r14
leaq 0x1b34(%rip), %rdi      # 0x462f
movl %r15d, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x2172(%rip), %rdi      # 0x4c7e
movl %ebp, %esi
xorl %eax, %eax
callq 0x1060
leaq 0x1b2b(%rip), %rdi      # 0x4647
movq %r14, %rsi
xorl %eax, %eax
callq 0x1060
testq %r14, %r14
je 0x2c6e
movl %ebp, %r15d
leaq 0x1c09(%rip), %r12      # 0x4742
xorl %r13d, %r13d
movq %rbx, %rdi
callq 0x1090
movq %rax, %rbp
movq %rbx, %rdi
callq 0x10a0
testl %eax, %eax
jne 0x2c7d
leaq 0x1b02(%rip), %rdi      # 0x4660
movq %r13, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1b02(%rip), %rdi      # 0x4679
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1b04(%rip), %rdi      # 0x4694
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1b06(%rip), %rdi      # 0x46af
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1b08(%rip), %rdi      # 0x46c9
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x16e8
leaq 0x1b08(%rip), %rdi      # 0x46e1
movq %rax, %rsi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1b08(%rip), %rdi      # 0x46fa
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1b08(%rip), %rdi      # 0x4712
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
leaq 0x1b08(%rip), %rdi      # 0x472a
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1782
movq %r12, %rdi
movl %eax, %esi
xorl %eax, %eax
callq 0x1060
movq %rbx, %rdi
callq 0x1090
subq %rbp, %rax
cmpq %r15, %rax
jae 0x2c62
movq %r15, %rsi
subq %rbp, %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x10b0
incq %r13
cmpq %r13, %r14
jne 0x2b3c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x29b8(%rip), %rdi      # 0x563c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1040