// File: /workspace/github_c_makefile_star2_O3/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 0x65ca
cmpl $0x4, %eax
ja 0x662c
movl %eax, %eax
leaq 0x37e4(%rip), %rcx      # 0x9d9c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x3b13(%rip), %r14      # 0xa0db
jmp 0x6633
cmpl $0x2ffff, %eax          # imm = 0x2FFFF
jg 0x65e8
cmpl $0x10000, %eax          # imm = 0x10000
je 0x661a
cmpl $0x20000, %eax          # imm = 0x20000
jne 0x662c
leaq 0x3b1c(%rip), %r14      # 0xa102
jmp 0x6633
cmpl $0x30000, %eax          # imm = 0x30000
je 0x6623
cmpl $0x40000, %eax          # imm = 0x40000
jne 0x662c
leaq 0x3b15(%rip), %r14      # 0xa112
jmp 0x6633
leaq 0x3aee(%rip), %r14      # 0xa0f4
jmp 0x6633
leaq 0x3ad6(%rip), %r14      # 0xa0e5
jmp 0x6633
leaq 0x3ad5(%rip), %r14      # 0xa0ed
jmp 0x6633
leaq 0x3adb(%rip), %r14      # 0xa0fc
jmp 0x6633
leaq 0x3ae0(%rip), %r14      # 0xa10a
jmp 0x6633
leaq 0x3ae4(%rip), %r14      # 0xa117
movl 0x24(%rbx), %eax
cmpq $0x7, %rax
ja 0x664c
leaq 0x37d1(%rip), %rcx      # 0x9e14
movslq (%rcx,%rax,4), %r15
addq %rcx, %r15
jmp 0x6653
leaq 0x3ac4(%rip), %r15      # 0xa117
leaq 0x3cc9(%rip), %rdi      # 0xa323
callq 0x3060
movl (%rbx), %esi
leaq 0x3ae6(%rip), %rdi      # 0xa14e
xorl %eax, %eax
callq 0x3090
movl 0x4(%rbx), %esi
movzwl %si, %edx
shrl $0x10, %esi
leaq 0x3aeb(%rip), %rdi      # 0xa16a
xorl %eax, %eax
callq 0x3090
movl 0x8(%rbx), %esi
leaq 0x3af5(%rip), %rdi      # 0xa185
xorl %eax, %eax
callq 0x3090
movl 0xc(%rbx), %esi
leaq 0x3afe(%rip), %rdi      # 0xa19f
xorl %eax, %eax
callq 0x3090
movl 0x10(%rbx), %esi
leaq 0x3b07(%rip), %rdi      # 0xa1b9
xorl %eax, %eax
callq 0x3090
movl 0x14(%rbx), %esi
leaq 0x3b10(%rip), %rdi      # 0xa1d3
xorl %eax, %eax
callq 0x3090
movl 0x18(%rbx), %esi
leaq 0x3b19(%rip), %rdi      # 0xa1ed
xorl %eax, %eax
callq 0x3090
movl 0x1c(%rbx), %esi
leaq 0x3b24(%rip), %rdi      # 0xa209
xorl %eax, %eax
callq 0x3090
movl 0x20(%rbx), %esi
leaq 0x3b2f(%rip), %rdi      # 0xa225
movq %r14, %rdx
xorl %eax, %eax
callq 0x3090
movl 0x24(%rbx), %esi
leaq 0x3b36(%rip), %rdi      # 0xa240
movq %r15, %rdx
xorl %eax, %eax
callq 0x3090
movl 0x28(%rbx), %esi
leaq 0x3b3d(%rip), %rdi      # 0xa25b
xorl %eax, %eax
callq 0x3090
movl 0x2c(%rbx), %esi
leaq 0x3b44(%rip), %rdi      # 0xa273
xorl %eax, %eax
callq 0x3090
movl 0x30(%rbx), %esi
leaq 0x3b4b(%rip), %rdi      # 0xa28b
xorl %eax, %eax
callq 0x3090
movl $0xa, %edi
callq 0x3030
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq