#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 */
int BIT(int);
int wpa_key_mgmt_wpa_ieee8021x(int akm) {
  return !!(akm & (BIT(0) | BIT(5) | BIT(24) | BIT(14) | BIT(15) | BIT(7) |
                   BIT(16) | BIT(17) | BIT(18) | BIT(19) | BIT(20) | BIT(21)));
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,-0x34(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x34(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x30(%rbp)
mov    $0x18,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x2c(%rbp)
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x20(%rbp)
mov    $0x10,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    $0x11,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    $0x12,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    $0x13,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    $0x14,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    $0x15,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    -0x8(%rbp),%eax
or     %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edi,%r14d
xor    %edi,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    $0x18,%edi
call   1030 <BIT@plt>
mov    %eax,%r15d
mov    $0xe,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %r15d,%ebx
or     %ebp,%ebx
mov    $0xf,%edi
call   1030 <BIT@plt>
mov    %eax,%r15d
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %r15d,%ebp
mov    $0x10,%edi
call   1030 <BIT@plt>
mov    %eax,%r15d
or     %ebp,%r15d
or     %ebx,%r15d
mov    $0x11,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
mov    $0x12,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %ebx,%ebp
mov    $0x13,%edi
call   1030 <BIT@plt>
mov    %eax,%ebx
or     %ebp,%ebx
mov    $0x14,%edi
call   1030 <BIT@plt>
mov    %eax,%ebp
or     %ebx,%ebp
or     %r15d,%ebp
mov    $0x15,%edi
call   1030 <BIT@plt>
or     %ebp,%eax
xor    %ecx,%ecx
test   %r14d,%eax
setne  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @BIT(i32 0)
%5 = call i32 @BIT(i32 5)
%6 = or i32 %4, %5
%7 = call i32 @BIT(i32 24)
%8 = or i32 %6, %7
%9 = call i32 @BIT(i32 14)
%10 = or i32 %8, %9
%11 = call i32 @BIT(i32 15)
%12 = or i32 %10, %11
%13 = call i32 @BIT(i32 7)
%14 = or i32 %12, %13
%15 = call i32 @BIT(i32 16)
%16 = or i32 %14, %15
%17 = call i32 @BIT(i32 17)
%18 = or i32 %16, %17
%19 = call i32 @BIT(i32 18)
%20 = or i32 %18, %19
%21 = call i32 @BIT(i32 19)
%22 = or i32 %20, %21
%23 = call i32 @BIT(i32 20)
%24 = or i32 %22, %23
%25 = call i32 @BIT(i32 21)
%26 = or i32 %24, %25
%27 = and i32 %3, %26
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = xor i1 %29, true
%31 = zext i1 %30 to i32
ret i32 %31
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = tail call i32 @BIT(i32 0)
%3 = tail call i32 @BIT(i32 5)
%4 = or i32 %3, %2
%5 = tail call i32 @BIT(i32 24)
%6 = or i32 %4, %5
%7 = tail call i32 @BIT(i32 14)
%8 = or i32 %6, %7
%9 = tail call i32 @BIT(i32 15)
%10 = or i32 %8, %9
%11 = tail call i32 @BIT(i32 7)
%12 = or i32 %10, %11
%13 = tail call i32 @BIT(i32 16)
%14 = or i32 %12, %13
%15 = tail call i32 @BIT(i32 17)
%16 = or i32 %14, %15
%17 = tail call i32 @BIT(i32 18)
%18 = or i32 %16, %17
%19 = tail call i32 @BIT(i32 19)
%20 = or i32 %18, %19
%21 = tail call i32 @BIT(i32 20)
%22 = or i32 %20, %21
%23 = tail call i32 @BIT(i32 21)
%24 = or i32 %22, %23
%25 = and i32 %24, %0
%26 = icmp ne i32 %25, 0
%27 = zext i1 %26 to i32
ret i32 %27
}