#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
scalar_t__ log2(int);
int /*<<< orphan*/ printf(char *);
void print_characteristics(int *flags) {
  if (flags[(int)log2(0x0001)] == 1) {
    printf("IMAGE_FILE_RELOCS_STRIPPED");
    printf("\n");
  }
  if (flags[(int)log2(0x0002)] == 1) {
    printf("IMAGE_FILE_EXECUTABLE_IMAGE");
    printf("\n");
  }
  if (flags[(int)log2(0x0004)] == 1) {
    printf("IMAGE_FILE_NUMS_STRIPPED");
    printf("\n");
  }
  if (flags[(int)log2(0x0008)] == 1) {
    printf("IMAGE_FILE_SYMS_STRIPPED");
    printf("\n");
  }
  if (flags[(int)log2(0x0010)] == 1) {
    printf("IMAGE_FILE_AGGRESSIVE_WS_TRIM");
    printf("\n");
  }
  if (flags[(int)log2(0x0020)] == 1) {
    printf("IMAGE_FILE_LARGE_ADDRESS_AWARE");
    printf("\n");
  }
  if (flags[(int)log2(0x0040)] == 1) {
    printf("(reserved)\n");
  }
  if (flags[(int)log2(0x0080)] == 1) {
    printf("IMAGE_FILE_BYTES_REVERSED_LO");
    printf("\n");
  }
  if (flags[(int)log2(0x0100)] == 1) {
    printf("IMAGE_FILE_32BIT_MACHINE");
    printf("\n");
  }
  if (flags[(int)log2(0x0200)] == 1) {
    printf("IMAGE_FILE_DEBUG_STRIPPED");
    printf("\n");
  }
  if (flags[(int)log2(0x0400)] == 1) {
    printf("IMAGE_FILE_REMOVEABLE_RUN_FROM_SWAP");
    printf("\n");
  }
  if (flags[(int)log2(0x0800)] == 1) {
    printf("IMAGE_FILE_NET_RUN_FROM_SWAP");
    printf("\n");
  }
  if (flags[(int)log2(0x1000)] == 1) {
    printf("IMAGE_FILE_SYSTEM");
    printf("\n");
  }
  if (flags[(int)log2(0x2000)] == 1) {
    printf("IMAGE_FILE_DLL");
    printf("\n");
  }
  if (flags[(int)log2(0x4000)] == 1) {
    printf("IMAGE_FILE_UP_SYSTEM_ONLY");
    printf("\n");
  }
  if (flags[(int)log2(0x8000)] == 1) {
    printf("IMAGE_FILE_BYTES_REVERSED_HI");
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<print_characteristics>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x1,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    116d <print_characteristics+0x4d>
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
lea    0xf48(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x2,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    11ab <print_characteristics+0x8b>
lea    0xe81(%rip),%rdi
call   1040 <printf@plt>
lea    0xf0a(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x4,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    11e9 <print_characteristics+0xc9>
lea    0xe5f(%rip),%rdi
call   1040 <printf@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x8,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1227 <print_characteristics+0x107>
lea    0xe3a(%rip),%rdi
call   1040 <printf@plt>
lea    0xe8e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x10,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1265 <print_characteristics+0x145>
lea    0xe15(%rip),%rdi
call   1040 <printf@plt>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x20,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12a3 <print_characteristics+0x183>
lea    0xdf5(%rip),%rdi
call   1040 <printf@plt>
lea    0xe12(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x40,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    12d5 <print_characteristics+0x1b5>
lea    0xdd6(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    $0x80,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1313 <print_characteristics+0x1f3>
lea    0xdb0(%rip),%rdi
call   1040 <printf@plt>
lea    0xda2(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x50(%rbp)
mov    $0x100,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1351 <print_characteristics+0x231>
lea    0xd8f(%rip),%rdi
call   1040 <printf@plt>
lea    0xd64(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    $0x200,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    138f <print_characteristics+0x26f>
lea    0xd6a(%rip),%rdi
call   1040 <printf@plt>
lea    0xd26(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    $0x400,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x60(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    13cd <print_characteristics+0x2ad>
lea    0xd46(%rip),%rdi
call   1040 <printf@plt>
lea    0xce8(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    $0x800,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x68(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    140b <print_characteristics+0x2eb>
lea    0xd2c(%rip),%rdi
call   1040 <printf@plt>
lea    0xcaa(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    $0x1000,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x70(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1449 <print_characteristics+0x329>
lea    0xd0b(%rip),%rdi
call   1040 <printf@plt>
lea    0xc6c(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    $0x2000,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x78(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1487 <print_characteristics+0x367>
lea    0xcdf(%rip),%rdi
call   1040 <printf@plt>
lea    0xc2e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    $0x4000,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x80(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    14c5 <print_characteristics+0x3a5>
lea    0xcb0(%rip),%rdi
call   1040 <printf@plt>
lea    0xbf0(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    $0x8000,%edi
call   1030 <log2@plt>
mov    %rax,%rcx
mov    -0x88(%rbp),%rax
movslq %ecx,%rcx
cmpl   $0x1,(%rax,%rcx,4)
jne    1509 <print_characteristics+0x3e9>
lea    0xc86(%rip),%rdi
call   1040 <printf@plt>
lea    0xbac(%rip),%rdi
call   1040 <printf@plt>
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_characteristics>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    116c <print_characteristics+0x2c>
lea    0xea3(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    1194 <print_characteristics+0x54>
lea    0xe96(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    11bc <print_characteristics+0x7c>
lea    0xe8a(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x8,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    11e4 <print_characteristics+0xa4>
lea    0xe7b(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x10,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    120c <print_characteristics+0xcc>
lea    0xe6c(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    1234 <print_characteristics+0xf4>
lea    0xe62(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x40,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    1252 <print_characteristics+0x112>
lea    0xf42(%rip),%rdi
call   1050 <puts@plt>
mov    $0x80,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    127a <print_characteristics+0x13a>
lea    0xe3b(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x100,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    12a2 <print_characteristics+0x162>
lea    0xe30(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x200,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    12ca <print_characteristics+0x18a>
lea    0xe21(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x400,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    12f2 <print_characteristics+0x1b2>
lea    0xe13(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x800,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    131a <print_characteristics+0x1da>
lea    0xe0f(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1000,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    1342 <print_characteristics+0x202>
lea    0xe04(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x2000,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    136a <print_characteristics+0x22a>
lea    0xdee(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x4000,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    1392 <print_characteristics+0x252>
lea    0xdd5(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x8000,%edi
call   1040 <log2@plt>
cltq
cmpl   $0x1,(%rbx,%rax,4)
jne    13bb <print_characteristics+0x27b>
lea    0xdc7(%rip),%rdi
call   1060 <printf@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"IMAGE_FILE_RELOCS_STRIPPED\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [28 x i8] c"IMAGE_FILE_EXECUTABLE_IMAGE\00"
@.str.3 = [25 x i8] c"IMAGE_FILE_NUMS_STRIPPED\00"
@.str.4 = [25 x i8] c"IMAGE_FILE_SYMS_STRIPPED\00"
@.str.5 = [30 x i8] c"IMAGE_FILE_AGGRESSIVE_WS_TRIM\00"
@.str.6 = [31 x i8] c"IMAGE_FILE_LARGE_ADDRESS_AWARE\00"
@.str.7 = [12 x i8] c"(reserved)\0A\00"
@.str.8 = [29 x i8] c"IMAGE_FILE_BYTES_REVERSED_LO\00"
@.str.9 = [25 x i8] c"IMAGE_FILE_32BIT_MACHINE\00"
@.str.10 = [26 x i8] c"IMAGE_FILE_DEBUG_STRIPPED\00"
@.str.11 = [36 x i8] c"IMAGE_FILE_REMOVEABLE_RUN_FROM_SWAP\00"
@.str.12 = [29 x i8] c"IMAGE_FILE_NET_RUN_FROM_SWAP\00"
@.str.13 = [18 x i8] c"IMAGE_FILE_SYSTEM\00"
@.str.14 = [15 x i8] c"IMAGE_FILE_DLL\00"
@.str.15 = [26 x i8] c"IMAGE_FILE_UP_SYSTEM_ONLY\00"
@.str.16 = [29 x i8] c"IMAGE_FILE_BYTES_REVERSED_HI\00"
define void @print_characteristics(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i64 @log2(i32 1)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %3, i64 %6
%8 = load i32, i32* %7
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %13
13: ; preds = %10, %1
%14 = load i32*, i32** %2
%15 = call i64 @log2(i32 2)
%16 = trunc i64 %15 to i32
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
%19 = load i32, i32* %18
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %24
21: ; preds = %13
%22 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%23 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %24
24: ; preds = %21, %13
%25 = load i32*, i32** %2
%26 = call i64 @log2(i32 4)
%27 = trunc i64 %26 to i32
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i32, i32* %25, i64 %28
%30 = load i32, i32* %29
%31 = icmp eq i32 %30, 1
br i1 %31, label %32, label %35
32: ; preds = %24
%33 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%34 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %32, %24
%36 = load i32*, i32** %2
%37 = call i64 @log2(i32 8)
%38 = trunc i64 %37 to i32
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %36, i64 %39
%41 = load i32, i32* %40
%42 = icmp eq i32 %41, 1
br i1 %42, label %43, label %46
43: ; preds = %35
%44 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%45 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %46
46: ; preds = %43, %35
%47 = load i32*, i32** %2
%48 = call i64 @log2(i32 16)
%49 = trunc i64 %48 to i32
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i32, i32* %47, i64 %50
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 1
br i1 %53, label %54, label %57
54: ; preds = %46
%55 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%56 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %57
57: ; preds = %54, %46
%58 = load i32*, i32** %2
%59 = call i64 @log2(i32 32)
%60 = trunc i64 %59 to i32
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds i32, i32* %58, i64 %61
%63 = load i32, i32* %62
%64 = icmp eq i32 %63, 1
br i1 %64, label %65, label %68
65: ; preds = %57
%66 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%67 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %68
68: ; preds = %65, %57
%69 = load i32*, i32** %2
%70 = call i64 @log2(i32 64)
%71 = trunc i64 %70 to i32
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i32, i32* %69, i64 %72
%74 = load i32, i32* %73
%75 = icmp eq i32 %74, 1
br i1 %75, label %76, label %78
76: ; preds = %68
%77 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0))
br label %78
78: ; preds = %76, %68
%79 = load i32*, i32** %2
%80 = call i64 @log2(i32 128)
%81 = trunc i64 %80 to i32
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %79, i64 %82
%84 = load i32, i32* %83
%85 = icmp eq i32 %84, 1
br i1 %85, label %86, label %89
86: ; preds = %78
%87 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%88 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %89
89: ; preds = %86, %78
%90 = load i32*, i32** %2
%91 = call i64 @log2(i32 256)
%92 = trunc i64 %91 to i32
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds i32, i32* %90, i64 %93
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %100
97: ; preds = %89
%98 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%99 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %100
100: ; preds = %97, %89
%101 = load i32*, i32** %2
%102 = call i64 @log2(i32 512)
%103 = trunc i64 %102 to i32
%104 = sext i32 %103 to i64
%105 = getelementptr inbounds i32, i32* %101, i64 %104
%106 = load i32, i32* %105
%107 = icmp eq i32 %106, 1
br i1 %107, label %108, label %111
108: ; preds = %100
%109 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%110 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %111
111: ; preds = %108, %100
%112 = load i32*, i32** %2
%113 = call i64 @log2(i32 1024)
%114 = trunc i64 %113 to i32
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i32, i32* %112, i64 %115
%117 = load i32, i32* %116
%118 = icmp eq i32 %117, 1
br i1 %118, label %119, label %122
119: ; preds = %111
%120 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%121 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %122
122: ; preds = %119, %111
%123 = load i32*, i32** %2
%124 = call i64 @log2(i32 2048)
%125 = trunc i64 %124 to i32
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %123, i64 %126
%128 = load i32, i32* %127
%129 = icmp eq i32 %128, 1
br i1 %129, label %130, label %133
130: ; preds = %122
%131 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%132 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %133
133: ; preds = %130, %122
%134 = load i32*, i32** %2
%135 = call i64 @log2(i32 4096)
%136 = trunc i64 %135 to i32
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds i32, i32* %134, i64 %137
%139 = load i32, i32* %138
%140 = icmp eq i32 %139, 1
br i1 %140, label %141, label %144
141: ; preds = %133
%142 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%143 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %144
144: ; preds = %141, %133
%145 = load i32*, i32** %2
%146 = call i64 @log2(i32 8192)
%147 = trunc i64 %146 to i32
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i32, i32* %145, i64 %148
%150 = load i32, i32* %149
%151 = icmp eq i32 %150, 1
br i1 %151, label %152, label %155
152: ; preds = %144
%153 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0))
%154 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %155
155: ; preds = %152, %144
%156 = load i32*, i32** %2
%157 = call i64 @log2(i32 16384)
%158 = trunc i64 %157 to i32
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds i32, i32* %156, i64 %159
%161 = load i32, i32* %160
%162 = icmp eq i32 %161, 1
br i1 %162, label %163, label %166
163: ; preds = %155
%164 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%165 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %166
166: ; preds = %163, %155
%167 = load i32*, i32** %2
%168 = call i64 @log2(i32 32768)
%169 = trunc i64 %168 to i32
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i32, i32* %167, i64 %170
%172 = load i32, i32* %171
%173 = icmp eq i32 %172, 1
br i1 %173, label %174, label %177
174: ; preds = %166
%175 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%176 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %177
177: ; preds = %174, %166
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"IMAGE_FILE_RELOCS_STRIPPED\00"
@.str.2 = [28 x i8] c"IMAGE_FILE_EXECUTABLE_IMAGE\00"
@.str.3 = [25 x i8] c"IMAGE_FILE_NUMS_STRIPPED\00"
@.str.4 = [25 x i8] c"IMAGE_FILE_SYMS_STRIPPED\00"
@.str.5 = [30 x i8] c"IMAGE_FILE_AGGRESSIVE_WS_TRIM\00"
@.str.6 = [31 x i8] c"IMAGE_FILE_LARGE_ADDRESS_AWARE\00"
@.str.8 = [29 x i8] c"IMAGE_FILE_BYTES_REVERSED_LO\00"
@.str.9 = [25 x i8] c"IMAGE_FILE_32BIT_MACHINE\00"
@.str.10 = [26 x i8] c"IMAGE_FILE_DEBUG_STRIPPED\00"
@.str.11 = [36 x i8] c"IMAGE_FILE_REMOVEABLE_RUN_FROM_SWAP\00"
@.str.12 = [29 x i8] c"IMAGE_FILE_NET_RUN_FROM_SWAP\00"
@.str.13 = [18 x i8] c"IMAGE_FILE_SYSTEM\00"
@.str.14 = [15 x i8] c"IMAGE_FILE_DLL\00"
@.str.15 = [26 x i8] c"IMAGE_FILE_UP_SYSTEM_ONLY\00"
@.str.16 = [29 x i8] c"IMAGE_FILE_BYTES_REVERSED_HI\00"
@str = [11 x i8] c"(reserved)\00"
define void @print_characteristics(i32* nocapture %0) {
%2 = tail call i64 @log2(i32 1)
%3 = shl i64 %2, 32
%4 = ashr exact i64 %3, 32
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @putchar(i32 10)
br label %11
11: ; preds = %8, %1
%12 = tail call i64 @log2(i32 2)
%13 = shl i64 %12, 32
%14 = ashr exact i64 %13, 32
%15 = getelementptr inbounds i32, i32* %0, i64 %14
%16 = load i32, i32* %15
%17 = icmp eq i32 %16, 1
br i1 %17, label %18, label %21
18: ; preds = %11
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.2, i64 0, i64 0))
%20 = tail call i32 @putchar(i32 10)
br label %21
21: ; preds = %18, %11
%22 = tail call i64 @log2(i32 4)
%23 = shl i64 %22, 32
%24 = ashr exact i64 %23, 32
%25 = getelementptr inbounds i32, i32* %0, i64 %24
%26 = load i32, i32* %25
%27 = icmp eq i32 %26, 1
br i1 %27, label %28, label %31
28: ; preds = %21
%29 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%30 = tail call i32 @putchar(i32 10)
br label %31
31: ; preds = %28, %21
%32 = tail call i64 @log2(i32 8)
%33 = shl i64 %32, 32
%34 = ashr exact i64 %33, 32
%35 = getelementptr inbounds i32, i32* %0, i64 %34
%36 = load i32, i32* %35
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %41
38: ; preds = %31
%39 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.4, i64 0, i64 0))
%40 = tail call i32 @putchar(i32 10)
br label %41
41: ; preds = %38, %31
%42 = tail call i64 @log2(i32 16)
%43 = shl i64 %42, 32
%44 = ashr exact i64 %43, 32
%45 = getelementptr inbounds i32, i32* %0, i64 %44
%46 = load i32, i32* %45
%47 = icmp eq i32 %46, 1
br i1 %47, label %48, label %51
48: ; preds = %41
%49 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0))
%50 = tail call i32 @putchar(i32 10)
br label %51
51: ; preds = %48, %41
%52 = tail call i64 @log2(i32 32)
%53 = shl i64 %52, 32
%54 = ashr exact i64 %53, 32
%55 = getelementptr inbounds i32, i32* %0, i64 %54
%56 = load i32, i32* %55
%57 = icmp eq i32 %56, 1
br i1 %57, label %58, label %61
58: ; preds = %51
%59 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%60 = tail call i32 @putchar(i32 10)
br label %61
61: ; preds = %58, %51
%62 = tail call i64 @log2(i32 64)
%63 = shl i64 %62, 32
%64 = ashr exact i64 %63, 32
%65 = getelementptr inbounds i32, i32* %0, i64 %64
%66 = load i32, i32* %65
%67 = icmp eq i32 %66, 1
br i1 %67, label %68, label %70
68: ; preds = %61
%69 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %70
70: ; preds = %68, %61
%71 = tail call i64 @log2(i32 128)
%72 = shl i64 %71, 32
%73 = ashr exact i64 %72, 32
%74 = getelementptr inbounds i32, i32* %0, i64 %73
%75 = load i32, i32* %74
%76 = icmp eq i32 %75, 1
br i1 %76, label %77, label %80
77: ; preds = %70
%78 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%79 = tail call i32 @putchar(i32 10)
br label %80
80: ; preds = %77, %70
%81 = tail call i64 @log2(i32 256)
%82 = shl i64 %81, 32
%83 = ashr exact i64 %82, 32
%84 = getelementptr inbounds i32, i32* %0, i64 %83
%85 = load i32, i32* %84
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %90
87: ; preds = %80
%88 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.9, i64 0, i64 0))
%89 = tail call i32 @putchar(i32 10)
br label %90
90: ; preds = %87, %80
%91 = tail call i64 @log2(i32 512)
%92 = shl i64 %91, 32
%93 = ashr exact i64 %92, 32
%94 = getelementptr inbounds i32, i32* %0, i64 %93
%95 = load i32, i32* %94
%96 = icmp eq i32 %95, 1
br i1 %96, label %97, label %100
97: ; preds = %90
%98 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.10, i64 0, i64 0))
%99 = tail call i32 @putchar(i32 10)
br label %100
100: ; preds = %97, %90
%101 = tail call i64 @log2(i32 1024)
%102 = shl i64 %101, 32
%103 = ashr exact i64 %102, 32
%104 = getelementptr inbounds i32, i32* %0, i64 %103
%105 = load i32, i32* %104
%106 = icmp eq i32 %105, 1
br i1 %106, label %107, label %110
107: ; preds = %100
%108 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0))
%109 = tail call i32 @putchar(i32 10)
br label %110
110: ; preds = %107, %100
%111 = tail call i64 @log2(i32 2048)
%112 = shl i64 %111, 32
%113 = ashr exact i64 %112, 32
%114 = getelementptr inbounds i32, i32* %0, i64 %113
%115 = load i32, i32* %114
%116 = icmp eq i32 %115, 1
br i1 %116, label %117, label %120
117: ; preds = %110
%118 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%119 = tail call i32 @putchar(i32 10)
br label %120
120: ; preds = %117, %110
%121 = tail call i64 @log2(i32 4096)
%122 = shl i64 %121, 32
%123 = ashr exact i64 %122, 32
%124 = getelementptr inbounds i32, i32* %0, i64 %123
%125 = load i32, i32* %124
%126 = icmp eq i32 %125, 1
br i1 %126, label %127, label %130
127: ; preds = %120
%128 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.13, i64 0, i64 0))
%129 = tail call i32 @putchar(i32 10)
br label %130
130: ; preds = %127, %120
%131 = tail call i64 @log2(i32 8192)
%132 = shl i64 %131, 32
%133 = ashr exact i64 %132, 32
%134 = getelementptr inbounds i32, i32* %0, i64 %133
%135 = load i32, i32* %134
%136 = icmp eq i32 %135, 1
br i1 %136, label %137, label %140
137: ; preds = %130
%138 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0))
%139 = tail call i32 @putchar(i32 10)
br label %140
140: ; preds = %137, %130
%141 = tail call i64 @log2(i32 16384)
%142 = shl i64 %141, 32
%143 = ashr exact i64 %142, 32
%144 = getelementptr inbounds i32, i32* %0, i64 %143
%145 = load i32, i32* %144
%146 = icmp eq i32 %145, 1
br i1 %146, label %147, label %150
147: ; preds = %140
%148 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.15, i64 0, i64 0))
%149 = tail call i32 @putchar(i32 10)
br label %150
150: ; preds = %147, %140
%151 = tail call i64 @log2(i32 32768)
%152 = shl i64 %151, 32
%153 = ashr exact i64 %152, 32
%154 = getelementptr inbounds i32, i32* %0, i64 %153
%155 = load i32, i32* %154
%156 = icmp eq i32 %155, 1
br i1 %156, label %157, label %160
157: ; preds = %150
%158 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.16, i64 0, i64 0))
%159 = tail call i32 @putchar(i32 10)
br label %160
160: ; preds = %157, %150
ret void
}