#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 /*<<< orphan*/ isalt(char *);
int isctrl(char buf[8]) {
  return !isalt(buf) && buf[0] < 32 && buf[0] != 27 && buf[0] != 9 &&
         buf[0] != 13;
}


x86 assembly (clang, -O0):
<isctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <isalt@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    1184 <isctrl+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
jge    1184 <isctrl+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x1b,%ecx
mov    %al,-0x9(%rbp)
je     1184 <isctrl+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x9(%rbp)
je     1184 <isctrl+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isctrl>:
push   %rbx
mov    %rdi,%rbx
call   1030 <isalt@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1123 <isctrl+0x13>
pop    %rbx
ret
mov    (%rbx),%cl
cmp    $0x1f,%cl
jg     1121 <isctrl+0x11>
cmp    $0x9,%cl
je     1121 <isctrl+0x11>
cmp    $0x1b,%cl
je     1121 <isctrl+0x11>
xor    %eax,%eax
cmp    $0xd,%cl
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isctrl(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @isalt(i8* %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %30, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = sext i8 %9 to i32
%11 = icmp slt i32 %10, 32
br i1 %11, label %12, label %30
12: ; preds = %6
%13 = load i8*, i8** %2
%14 = getelementptr inbounds i8, i8* %13, i64 0
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 27
br i1 %17, label %18, label %30
18: ; preds = %12
%19 = load i8*, i8** %2
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp ne i32 %22, 9
br i1 %23, label %24, label %30
24: ; preds = %18
%25 = load i8*, i8** %2
%26 = getelementptr inbounds i8, i8* %25, i64 0
%27 = load i8, i8* %26
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 13
br label %30
30: ; preds = %24, %18, %12, %6, %1
%31 = phi i1 [ false, %18 ], [ false, %12 ], [ false, %6 ], [ false, %1 ], [ %29, %24 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @isctrl(i8* %0) {
%2 = tail call i32 @isalt(i8* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = load i8, i8* %0
%6 = freeze i8 %5
%7 = icmp sgt i8 %6, 31
br i1 %7, label %12, label %8
8: ; preds = %4
switch i8 %6, label %9 [
i8 27, label %12
i8 9, label %12
]
9: ; preds = %8
%10 = icmp ne i8 %6, 13
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %8, %4, %9, %1
%13 = phi i32 [ 0, %8 ], [ 0, %1 ], [ %11, %9 ], [ 0, %4 ], [ 0, %8 ]
ret i32 %13
}