#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*/ isprint(char);
int mcp_intern_is_simplechar(char in) {
  if (in == '*' || in == ':' || in == '\\' || in == '"')
    return 0;
  if (!isprint(in) || in == ' ')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<mcp_intern_is_simplechar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1152 <mcp_intern_is_simplechar+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     1152 <mcp_intern_is_simplechar+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x5c,%eax
je     1152 <mcp_intern_is_simplechar+0x42>
movsbl -0x5(%rbp),%eax
cmp    $0x22,%eax
jne    115e <mcp_intern_is_simplechar+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1190 <mcp_intern_is_simplechar+0x80>
movsbl -0x5(%rbp),%edi
call   1030 <isprint@plt>
cmp    $0x0,%eax
je     117d <mcp_intern_is_simplechar+0x6d>
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
jne    1189 <mcp_intern_is_simplechar+0x79>
movl   $0x0,-0x4(%rbp)
jmp    1190 <mcp_intern_is_simplechar+0x80>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp_intern_is_simplechar>:
push   %rbx
mov    %edi,%ebx
lea    -0x22(%rbx),%ecx
cmp    $0x3a,%cl
ja     1132 <mcp_intern_is_simplechar+0x22>
xor    %eax,%eax
movzbl %cl,%ecx
movabs $0x400000001000101,%rdx
bt     %rcx,%rdx
jae    1132 <mcp_intern_is_simplechar+0x22>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isprint@plt>
test   %eax,%eax
setne  %al
cmp    $0x20,%bl
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mcp_intern_is_simplechar(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 42
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 58
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 92
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 34
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 0, i32* %2
br label %30
20: ; preds = %15
%21 = load i8, i8* %3
%22 = call i32 @isprint(i8 signext %21)
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i8, i8* %3
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 32
br i1 %27, label %28, label %29
28: ; preds = %24, %20
store i32 0, i32* %2
br label %30
29: ; preds = %24
store i32 1, i32* %2
br label %30
30: ; preds = %29, %28, %19
%31 = load i32, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @mcp_intern_is_simplechar(i8 signext %0) {
switch i8 %0, label %2 [
i8 92, label %8
i8 58, label %8
i8 42, label %8
i8 34, label %8
]
2: ; preds = %1
%3 = tail call i32 @isprint(i8 signext %0)
%4 = icmp ne i32 %3, 0
%5 = icmp ne i8 %0, 32
%6 = and i1 %5, %4
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %2, %1, %1, %1, %1
%9 = phi i32 [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ 0, %1 ], [ %7, %2 ]
ret i32 %9
}