#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*/ isalnum(char);
int escape_char(char c) {
  return !isalnum(c) && (c != ' ') && (c != '-') && (c != '+') && (c != '.') &&
         (c != '_') && (c != '(') && (c != ')');
}


x86 assembly (clang, -O0):
<escape_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x28,%ecx
mov    %al,-0x2(%rbp)
je     11b0 <escape_char+0xa0>
movsbl -0x1(%rbp),%eax
cmp    $0x29,%eax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escape_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1122 <escape_char+0x12>
pop    %rbx
ret
lea    -0x20(%rbx),%ecx
cmp    $0x3f,%cl
ja     113d <escape_char+0x2d>
movzbl %cl,%ecx
movabs $0x8000000000006901,%rdx
bt     %rcx,%rdx
jb     1120 <escape_char+0x10>
xor    %eax,%eax
cmp    $0x29,%bl
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @escape_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @isalnum(i8 signext %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %34, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 32
br i1 %9, label %10, label %34
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 45
br i1 %13, label %14, label %34
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 43
br i1 %17, label %18, label %34
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 46
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 95
br i1 %25, label %26, label %34
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp ne i32 %28, 40
br i1 %29, label %30, label %34
30: ; preds = %26
%31 = load i8, i8* %2
%32 = sext i8 %31 to i32
%33 = icmp ne i32 %32, 41
br label %34
34: ; preds = %30, %26, %22, %18, %14, %10, %6, %1
%35 = phi i1 [ false, %26 ], [ false, %22 ], [ false, %18 ], [ false, %14 ], [ false, %10 ], [ false, %6 ], [ false, %1 ], [ %33, %30 ]
%36 = zext i1 %35 to i32
ret i32 %36
}

LLVM IR (-O2):
define i32 @escape_char(i8 signext %0) {
%2 = tail call i32 @isalnum(i8 signext %0)
%3 = freeze i32 %2
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
switch i8 %0, label %6 [
i8 95, label %9
i8 46, label %9
i8 45, label %9
i8 43, label %9
i8 40, label %9
i8 32, label %9
]
6: ; preds = %5
%7 = icmp ne i8 %0, 41
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %5, %5, %5, %5, %5, %5, %1, %6
%10 = phi i32 [ 0, %5 ], [ %8, %6 ], [ 0, %1 ], [ 0, %5 ], [ 0, %5 ], [ 0, %5 ], [ 0, %5 ], [ 0, %5 ]
ret i32 %10
}