#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 int uint8_t;

/* Variables and functions */
int is_spicmd_write(uint8_t cmd) {
  switch (cmd) {
  case 0x06:
  case 0x50:
  case 0x60:
  case 0xc7:
  case 0x52:
  case 0xd8:
  case 0xd7:
  case 0x20:
  case 0x02:
  case 0xad:
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_spicmd_write>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2,%eax
je     11ac <is_spicmd_write+0xac>
jmp    111b <is_spicmd_write+0x1b>
mov    -0xc(%rbp),%eax
sub    $0x6,%eax
je     11ac <is_spicmd_write+0xac>
jmp    112c <is_spicmd_write+0x2c>
mov    -0xc(%rbp),%eax
sub    $0x20,%eax
je     11ac <is_spicmd_write+0xac>
jmp    113d <is_spicmd_write+0x3d>
mov    -0xc(%rbp),%eax
sub    $0x50,%eax
je     11ac <is_spicmd_write+0xac>
jmp    114e <is_spicmd_write+0x4e>
mov    -0xc(%rbp),%eax
sub    $0x52,%eax
je     11ac <is_spicmd_write+0xac>
jmp    115f <is_spicmd_write+0x5f>
mov    -0xc(%rbp),%eax
sub    $0x60,%eax
je     11ac <is_spicmd_write+0xac>
jmp    1170 <is_spicmd_write+0x70>
mov    -0xc(%rbp),%eax
sub    $0xad,%eax
je     11ac <is_spicmd_write+0xac>
jmp    1183 <is_spicmd_write+0x83>
mov    -0xc(%rbp),%eax
sub    $0xc7,%eax
je     11ac <is_spicmd_write+0xac>
jmp    1196 <is_spicmd_write+0x96>
mov    -0xc(%rbp),%eax
add    $0xffffff29,%eax
sub    $0x1,%eax
ja     11b8 <is_spicmd_write+0xb8>
jmp    11ac <is_spicmd_write+0xac>
movl   $0x1,-0x4(%rbp)
jmp    11bf <is_spicmd_write+0xbf>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_spicmd_write>:
mov    $0x1,%eax
lea    -0xad(%rdi),%ecx
cmp    $0x2b,%ecx
jbe    112a <is_spicmd_write+0x2a>
cmp    $0x20,%edi
jbe    113c <is_spicmd_write+0x3c>
add    $0xffffffb0,%edi
cmp    $0x10,%edi
ja     1127 <is_spicmd_write+0x27>
mov    $0x10005,%ecx
bt     %edi,%ecx
jb     114e <is_spicmd_write+0x4e>
xor    %eax,%eax
ret
movabs $0xc0004000001,%rdx
bt     %rcx,%rdx
jb     114e <is_spicmd_write+0x4e>
jmp    1110 <is_spicmd_write+0x10>
mov    %edi,%ecx
movabs $0x100000044,%rdx
bt     %rcx,%rdx
jae    1115 <is_spicmd_write+0x15>
ret

LLVM IR (-O0):
define i32 @is_spicmd_write(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 6, label %5
i32 80, label %5
i32 96, label %5
i32 199, label %5
i32 82, label %5
i32 216, label %5
i32 215, label %5
i32 32, label %5
i32 2, label %5
i32 173, label %5
]
5: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %7
6: ; preds = %1
store i32 0, i32* %2
br label %7
7: ; preds = %6, %5
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_spicmd_write(i32 %0) {
switch i32 %0, label %2 [
i32 6, label %3
i32 80, label %3
i32 96, label %3
i32 199, label %3
i32 82, label %3
i32 216, label %3
i32 215, label %3
i32 32, label %3
i32 2, label %3
i32 173, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}