#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 */
struct kp_file {
  int dummy;
};

/* Variables and functions */
int ctype(struct kp_file *, int);
int is_sect_cmd(struct kp_file *f, int l) {
  int t = ctype(f, l);
  return t == 20 || t == 21 || t == 22 || t == 30 || t == 31 || t == 32 ||
         t == 34 || t == 33;
}


x86 assembly (clang, -O0):
<is_sect_cmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ctype@plt>
mov    %eax,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x14,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x15,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x16,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x1e,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x1f,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x20,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
mov    $0x1,%al
cmpl   $0x22,-0x10(%rbp)
mov    %al,-0x11(%rbp)
je     11a1 <is_sect_cmd+0x91>
cmpl   $0x21,-0x10(%rbp)
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sect_cmd>:
push   %rax
call   1030 <ctype@plt>
lea    -0x14(%rax),%edx
cmp    $0xf,%edx
jae    112d <is_sect_cmd+0x1d>
mov    $0x1,%ecx
mov    $0x5c07,%esi
bt     %edx,%esi
jb     1135 <is_sect_cmd+0x25>
xor    %ecx,%ecx
cmp    $0x21,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.kp_file = type { i32 }
define i32 @is_sect_cmd(%struct.kp_file* %0, i32 %1) {
%3 = alloca %struct.kp_file*
%4 = alloca i32
%5 = alloca i32
store %struct.kp_file* %0, %struct.kp_file** %3
store i32 %1, i32* %4
%6 = load %struct.kp_file*, %struct.kp_file** %3
%7 = load i32, i32* %4
%8 = call i32 @ctype(%struct.kp_file* %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 20
br i1 %10, label %32, label %11
11: ; preds = %2
%12 = load i32, i32* %5
%13 = icmp eq i32 %12, 21
br i1 %13, label %32, label %14
14: ; preds = %11
%15 = load i32, i32* %5
%16 = icmp eq i32 %15, 22
br i1 %16, label %32, label %17
17: ; preds = %14
%18 = load i32, i32* %5
%19 = icmp eq i32 %18, 30
br i1 %19, label %32, label %20
20: ; preds = %17
%21 = load i32, i32* %5
%22 = icmp eq i32 %21, 31
br i1 %22, label %32, label %23
23: ; preds = %20
%24 = load i32, i32* %5
%25 = icmp eq i32 %24, 32
br i1 %25, label %32, label %26
26: ; preds = %23
%27 = load i32, i32* %5
%28 = icmp eq i32 %27, 34
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %5
%31 = icmp eq i32 %30, 33
br label %32
32: ; preds = %29, %26, %23, %20, %17, %14, %11, %2
%33 = phi i1 [ true, %26 ], [ true, %23 ], [ true, %20 ], [ true, %17 ], [ true, %14 ], [ true, %11 ], [ true, %2 ], [ %31, %29 ]
%34 = zext i1 %33 to i32
ret i32 %34
}

LLVM IR (-O2):
%struct.kp_file = type { i32 }
define i32 @is_sect_cmd(%struct.kp_file* %0, i32 %1) {
%3 = tail call i32 @ctype(%struct.kp_file* %0, i32 %1)
%4 = add i32 %3, -20
%5 = icmp ult i32 %4, 15
br i1 %5, label %9, label %6
6: ; preds = %9, %2
%7 = icmp eq i32 %3, 33
%8 = zext i1 %7 to i32
br label %14
9: ; preds = %2
%10 = trunc i32 %4 to i16
%11 = lshr i16 23559, %10
%12 = and i16 %11, 1
%13 = icmp eq i16 %12, 0
br i1 %13, label %6, label %14
14: ; preds = %9, %6
%15 = phi i32 [ %8, %6 ], [ 1, %9 ]
ret i32 %15
}