// File: /workspace/github_c_makefile_star2_O1/mikeakohn[P]print_pe/build/../src/resource.c
// Function: print_fixed_file_info
int print_fixed_file_info(struct fixed_file_info_t *fixed_file_info)
{
   const char *file_os;
   const char *file_type;

   switch (fixed_file_info->FileOS)
   {
     case 0x00000000: file_os = "(UNKNOWN)"; break;
     case 0x00000001: file_os = "(WIN16)"; break;
     case 0x00000002: file_os = "(PM32)"; break;
     case 0x00000004: file_os = "(WIN32)"; break;
     case 0x00010000: file_os = "(DOS)"; break;
     case 0x00020000: file_os = "(OS216)"; break;
     case 0x00030000: file_os = "(OS232)"; break;
     case 0x00040000: file_os = "(NT)"; break;
     default: file_os = "()"; break;
   }

   switch (fixed_file_info->FileType)
   {
     case 0x00000000: file_type = "(UNKNOWN)"; break;
     case 0x00000001: file_type = "(Application)"; break;
     case 0x00000002: file_type = "(DLL)"; break;
     case 0x00000003: file_type = "(DRV)"; break;
     case 0x00000004: file_type = "(FONT)"; break;
     case 0x00000005: file_type = "(VXD)"; break;
     case 0x00000007: file_type = "(STATIC_LIB)"; break;
     default: file_type = "()"; break;
   }

   printf("        -- VS_FIXEDFILEINFO --\n");
   printf("         Signature: 0x%08x\n", fixed_file_info->Signature);
   printf("      StrucVersion: %d.%d\n",
     fixed_file_info->StrucVersion >> 16,
     fixed_file_info->StrucVersion & 0xffff);
   printf("     FileVersionMS: 0x%x\n", fixed_file_info->FileVersionMS);
   printf("     FileVersionLS: 0x%x\n", fixed_file_info->FileVersionLS);
   printf("  ProductVersionMS: 0x%x\n", fixed_file_info->ProductVersionMS);
   printf("  ProductVersionLS: 0x%x\n", fixed_file_info->ProductVersionLS);
   printf("     FileFlagsMask: 0x%08x\n", fixed_file_info->FileFlagsMask);
   printf("         FileFlags: 0x%08x\n", fixed_file_info->FileFlags);
   printf("            FileOS: %d %s\n", fixed_file_info->FileOS, file_os);
   printf("          FileType: %d %s\n", fixed_file_info->FileType, file_type);
   printf("       FileSubtype: %d\n", fixed_file_info->FileSubtype);
   printf("        FileDateMS: %d\n", fixed_file_info->FileDateMS);
   printf("        FileDateLS: %d\n", fixed_file_info->FileDateLS);
   printf("\n");

   return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movl 0x20(%rdi), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jg 0x65be
cmpl $0x4, %eax
ja 0x6620
movl %eax, %eax
leaq 0x37f0(%rip), %rcx      # 0x9d9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3b1f(%rip), %r14      # 0xa0db
jmp 0x6627
cmpl $0x2ffff, %eax          # imm = 0x2FFFF
jg 0x65dc
cmpl $0x10000, %eax          # imm = 0x10000
je 0x660e
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x6620
leaq 0x3b28(%rip), %r14      # 0xa102
jmp 0x6627
cmpl $0x30000, %eax          # imm = 0x30000
je 0x6617
cmpl $0x40000, %eax          # imm = 0x40000
jne 0x6620
leaq 0x3b21(%rip), %r14      # 0xa112
jmp 0x6627
leaq 0x3afa(%rip), %r14      # 0xa0f4
jmp 0x6627
leaq 0x3ae2(%rip), %r14      # 0xa0e5
jmp 0x6627
leaq 0x3ae1(%rip), %r14      # 0xa0ed
jmp 0x6627
leaq 0x3ae7(%rip), %r14      # 0xa0fc
jmp 0x6627
leaq 0x3aec(%rip), %r14      # 0xa10a
jmp 0x6627
leaq 0x3af0(%rip), %r14      # 0xa117
movl 0x24(%rbx), %eax
cmpq $0x7, %rax
ja 0x6640
leaq 0x37dd(%rip), %rcx      # 0x9e14
movslq (%rcx,%rax,4), %r15
addq %rcx, %r15
jmp 0x6647
leaq 0x3ad0(%rip), %r15      # 0xa117
leaq 0x3cd5(%rip), %rdi      # 0xa323
callq 0x3060
movl (%rbx), %esi
leaq 0x3af2(%rip), %rdi      # 0xa14e
xorl %eax, %eax
callq 0x3090
movl 0x4(%rbx), %esi
movzwl %si, %edx
shrl $0x10, %esi
leaq 0x3af7(%rip), %rdi      # 0xa16a
xorl %eax, %eax
callq 0x3090
movl 0x8(%rbx), %esi
leaq 0x3b01(%rip), %rdi      # 0xa185
xorl %eax, %eax
callq 0x3090
movl 0xc(%rbx), %esi
leaq 0x3b0a(%rip), %rdi      # 0xa19f
xorl %eax, %eax
callq 0x3090
movl 0x10(%rbx), %esi
leaq 0x3b13(%rip), %rdi      # 0xa1b9
xorl %eax, %eax
callq 0x3090
movl 0x14(%rbx), %esi
leaq 0x3b1c(%rip), %rdi      # 0xa1d3
xorl %eax, %eax
callq 0x3090
movl 0x18(%rbx), %esi
leaq 0x3b25(%rip), %rdi      # 0xa1ed
xorl %eax, %eax
callq 0x3090
movl 0x1c(%rbx), %esi
leaq 0x3b30(%rip), %rdi      # 0xa209
xorl %eax, %eax
callq 0x3090
movl 0x20(%rbx), %esi
leaq 0x3b3b(%rip), %rdi      # 0xa225
movq %r14, %rdx
xorl %eax, %eax
callq 0x3090
movl 0x24(%rbx), %esi
leaq 0x3b42(%rip), %rdi      # 0xa240
movq %r15, %rdx
xorl %eax, %eax
callq 0x3090
movl 0x28(%rbx), %esi
leaq 0x3b49(%rip), %rdi      # 0xa25b
xorl %eax, %eax
callq 0x3090
movl 0x2c(%rbx), %esi
leaq 0x3b50(%rip), %rdi      # 0xa273
xorl %eax, %eax
callq 0x3090
movl 0x30(%rbx), %esi
leaq 0x3b57(%rip), %rdi      # 0xa28b
xorl %eax, %eax
callq 0x3090
movl $0xa, %edi
callq 0x3030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq