#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 */
typedef scalar_t__ flag;

/* Variables and functions */
unsigned int FTS_COMFOLLOW;
unsigned int FTS_PHYSICAL;
unsigned int FTS_SEEDOT;
unsigned int getFtsOptions(unsigned int flag) {
  unsigned int fts_options;
  fts_options = FTS_PHYSICAL;
  if (((flag)&0x00000002)) {
    fts_options |= FTS_SEEDOT;
  }
  if (!((flag)&0x00000400) && !((flag)&0x00000800) && !((flag)&0x00000010) &&
      !((flag)&0x00000020)) {
    fts_options |= FTS_COMFOLLOW;
  }
  return fts_options;
}


x86 assembly (clang, -O0):
<getFtsOptions>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2ee2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1131 <getFtsOptions+0x31>
mov    0x2ea7(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0x400,%eax
cmp    $0x0,%eax
jne    1180 <getFtsOptions+0x80>
mov    -0x4(%rbp),%eax
and    $0x800,%eax
cmp    $0x0,%eax
jne    1180 <getFtsOptions+0x80>
mov    -0x4(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
jne    1180 <getFtsOptions+0x80>
mov    -0x4(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
jne    1180 <getFtsOptions+0x80>
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFtsOptions>:
mov    0x2ee9(%rip),%rcx
mov    %edi,%eax
shl    $0x1e,%eax
sar    $0x1f,%eax
mov    0x2eba(%rip),%rdx
and    (%rdx),%eax
or     (%rcx),%eax
xor    %ecx,%ecx
test   $0xc30,%edi
jne    112d <getFtsOptions+0x2d>
mov    0x2eb5(%rip),%rcx
mov    (%rcx),%ecx
or     %ecx,%eax
ret

LLVM IR (-O0):
@FTS_PHYSICAL = global i32 0
@FTS_SEEDOT = global i32 0
@FTS_COMFOLLOW = global i32 0
define i32 @getFtsOptions(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @FTS_PHYSICAL
store i32 %4, i32* %3
%5 = load i32, i32* %2
%6 = and i32 %5, 2
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i32, i32* @FTS_SEEDOT
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
br label %12
12: ; preds = %8, %1
%13 = load i32, i32* %2
%14 = and i32 %13, 1024
%15 = icmp ne i32 %14, 0
br i1 %15, label %32, label %16
16: ; preds = %12
%17 = load i32, i32* %2
%18 = and i32 %17, 2048
%19 = icmp ne i32 %18, 0
br i1 %19, label %32, label %20
20: ; preds = %16
%21 = load i32, i32* %2
%22 = and i32 %21, 16
%23 = icmp ne i32 %22, 0
br i1 %23, label %32, label %24
24: ; preds = %20
%25 = load i32, i32* %2
%26 = and i32 %25, 32
%27 = icmp ne i32 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %24
%29 = load i32, i32* @FTS_COMFOLLOW
%30 = load i32, i32* %3
%31 = or i32 %30, %29
store i32 %31, i32* %3
br label %32
32: ; preds = %28, %24, %20, %16, %12
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
@FTS_PHYSICAL = global i32 0
@FTS_SEEDOT = global i32 0
@FTS_COMFOLLOW = global i32 0
define i32 @getFtsOptions(i32 %0) {
%2 = load i32, i32* @FTS_PHYSICAL
%3 = and i32 %0, 2
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* @FTS_SEEDOT
%6 = select i1 %4, i32 0, i32 %5
%7 = or i32 %6, %2
%8 = and i32 %0, 3120
%9 = icmp eq i32 %8, 0
%10 = load i32, i32* @FTS_COMFOLLOW
%11 = select i1 %9, i32 %10, i32 0
%12 = or i32 %7, %11
ret i32 %12
}