// File: /workspace/github_c_makefile_star2_O0/mikeakohn[P]print_pe/build/../src/minidump.c
// Function: print_minidump_system_info
void print_minidump_system_info(FILE *in)
{
  uint16_t cpu_arch = read_uint16(in);
  const char *cpu_arch_str = "???";

  switch (cpu_arch)
  {
    case 9: cpu_arch_str = "x64"; break;
    case 5: cpu_arch_str = "ARM"; break;
    case 6: cpu_arch_str = "Itanium"; break;
    case 0: cpu_arch_str = "x86"; break;
    case 0xffff: cpu_arch_str = "Unknown"; break;
  }

  printf("\n");
  printf("         cpu_arch: %u (%s)\n", cpu_arch, cpu_arch_str);
  printf("        cpu_level: %u\n", read_uint16(in));
  printf("     cpu_revision: %u\n", read_uint16(in));
  printf("         num_cpus: %u\n", read_uint8(in));
  printf("          os_type: %u\n", read_uint8(in));
  printf("     os_ver_major: %u\n", read_uint32(in));
  printf("     os_ver_minor: %u\n", read_uint32(in));
  printf("         os_build: %u\n", read_uint32(in));
  printf("      os_platform: %u\n", read_uint32(in));

  uint32_t ofs_service_pack = read_uint32(in);

  printf(" ofs_service_pack: %u", ofs_service_pack);
  print_minidump_string(in, ofs_service_pack);

  printf("    os_suite_mask: %u\n", read_uint16(in));
  printf("        reserved2: %u\n", read_uint16(in));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
callq 0x1a60
movw %ax, -0xa(%rbp)
leaq 0x1ecb(%rip), %rax      # 0x48eb
movq %rax, -0x18(%rbp)
movzwl -0xa(%rbp), %eax
movl %eax, -0x20(%rbp)
testl %eax, %eax
je 0x2a82
jmp 0x2a31
movl -0x20(%rbp), %eax
subl $0x5, %eax
je 0x2a68
jmp 0x2a3b
movl -0x20(%rbp), %eax
subl $0x6, %eax
je 0x2a75
jmp 0x2a45
movl -0x20(%rbp), %eax
subl $0x9, %eax
je 0x2a5b
jmp 0x2a4f
movl -0x20(%rbp), %eax
subl $0xffff, %eax           # imm = 0xFFFF
je 0x2a8f
jmp 0x2a9a
leaq 0x1e8d(%rip), %rax      # 0x48ef
movq %rax, -0x18(%rbp)
jmp 0x2a9a
leaq 0x1e84(%rip), %rax      # 0x48f3
movq %rax, -0x18(%rbp)
jmp 0x2a9a
leaq 0x1e7b(%rip), %rax      # 0x48f7
movq %rax, -0x18(%rbp)
jmp 0x2a9a
leaq 0x1e76(%rip), %rax      # 0x48ff
movq %rax, -0x18(%rbp)
jmp 0x2a9a
leaq 0x1e6d(%rip), %rax      # 0x4903
movq %rax, -0x18(%rbp)
leaq 0x165a(%rip), %rdi      # 0x40fb
movb $0x0, %al
callq 0x1050
movzwl -0xa(%rbp), %esi
movq -0x18(%rbp), %rdx
leaq 0x1e54(%rip), %rdi      # 0x490b
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a60
movl %eax, %esi
leaq 0x1e57(%rip), %rdi      # 0x4927
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a60
movl %eax, %esi
leaq 0x1e55(%rip), %rdi      # 0x493e
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1aa0
movl %eax, %esi
leaq 0x1e53(%rip), %rdi      # 0x4955
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1aa0
movl %eax, %esi
leaq 0x1e51(%rip), %rdi      # 0x496c
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a00
movl %eax, %esi
leaq 0x1e4f(%rip), %rdi      # 0x4983
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a00
movl %eax, %esi
leaq 0x1e4d(%rip), %rdi      # 0x499a
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a00
movl %eax, %esi
leaq 0x1e4b(%rip), %rdi      # 0x49b1
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a00
movl %eax, %esi
leaq 0x1e49(%rip), %rdi      # 0x49c8
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a00
movl %eax, -0x1c(%rbp)
movl -0x1c(%rbp), %esi
leaq 0x1e43(%rip), %rdi      # 0x49df
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x23f0
movq -0x8(%rbp), %rdi
callq 0x1a60
movl %eax, %esi
leaq 0x1e34(%rip), %rdi      # 0x49f5
movb $0x0, %al
callq 0x1050
movq -0x8(%rbp), %rdi
callq 0x1a60
movl %eax, %esi
leaq 0x1e32(%rip), %rdi      # 0x4a0c
movb $0x0, %al
callq 0x1050
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)