#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) || akm == BIT(5) || akm == BIT(7) || akm == 0;
}


x86 assembly (clang, -O0):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1188 <wpa_key_mgmt_wpa_ieee8021x+0x78>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    -0x10(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1188 <wpa_key_mgmt_wpa_ieee8021x+0x78>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x7,%edi
call   1030 <BIT@plt>
mov    -0x14(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     1188 <wpa_key_mgmt_wpa_ieee8021x+0x78>
cmpl   $0x0,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_wpa_ieee8021x>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %edi,%edi
call   1030 <BIT@plt>
mov    $0x1,%ebx
cmp    %ebp,%eax
je     1148 <wpa_key_mgmt_wpa_ieee8021x+0x38>
mov    $0x5,%edi
call   1030 <BIT@plt>
cmp    %ebp,%eax
je     1148 <wpa_key_mgmt_wpa_ieee8021x+0x38>
mov    $0x7,%edi
call   1030 <BIT@plt>
cmp    %ebp,%eax
je     1148 <wpa_key_mgmt_wpa_ieee8021x+0x38>
xor    %ebx,%ebx
test   %ebp,%ebp
sete   %bl
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
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 = icmp eq i32 %3, %4
br i1 %5, label %17, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @BIT(i32 5)
%9 = icmp eq i32 %7, %8
br i1 %9, label %17, label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = call i32 @BIT(i32 7)
%13 = icmp eq i32 %11, %12
br i1 %13, label %17, label %14
14: ; preds = %10
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 0
br label %17
17: ; preds = %14, %10, %6, %1
%18 = phi i1 [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @wpa_key_mgmt_wpa_ieee8021x(i32 %0) {
%2 = tail call i32 @BIT(i32 0)
%3 = icmp eq i32 %2, %0
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = tail call i32 @BIT(i32 5)
%6 = icmp eq i32 %5, %0
br i1 %6, label %13, label %7
7: ; preds = %4
%8 = tail call i32 @BIT(i32 7)
%9 = icmp eq i32 %8, %0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = icmp eq i32 %0, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %10, %7, %4, %1
%14 = phi i32 [ 1, %7 ], [ 1, %4 ], [ 1, %1 ], [ %12, %10 ]
ret i32 %14
}