#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 */
scalar_t__ isalnum(char);
bool iscopy(char ch) {
  if (isalnum(ch))
    return true;
  if (ch == '-' || ch == '_' || ch == '.' || ch == '~')
    return true;
  if (ch == ':' || ch == '/')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<iscopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
je     113d <iscopy+0x2d>
movl   $0x1,-0x4(%rbp)
jmp    11aa <iscopy+0x9a>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     1171 <iscopy+0x61>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     1171 <iscopy+0x61>
movsbl -0x5(%rbp),%eax
cmp    $0x2e,%eax
je     1171 <iscopy+0x61>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jne    117d <iscopy+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    11aa <iscopy+0x9a>
movsbl -0x5(%rbp),%eax
cmp    $0x3a,%eax
je     1197 <iscopy+0x87>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    11a3 <iscopy+0x93>
movl   $0x1,-0x4(%rbp)
jmp    11aa <iscopy+0x9a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscopy>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    1140 <iscopy+0x30>
lea    -0x2d(%rbx),%ecx
cmp    $0x32,%cl
ja     1142 <iscopy+0x32>
movzbl %cl,%ecx
movabs $0x4000000002007,%rdx
bt     %rcx,%rdx
jae    1142 <iscopy+0x32>
pop    %rbx
ret
cmp    $0x7e,%bl
je     1140 <iscopy+0x30>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @iscopy(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
switch i8 %0, label %5 [
i8 126, label %6
i8 95, label %6
i8 46, label %6
i8 45, label %6
i8 58, label %6
i8 47, label %6
]
5: ; preds = %4
br label %6
6: ; preds = %4, %4, %4, %4, %4, %4, %1, %5
%7 = phi i32 [ 0, %5 ], [ 1, %1 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ], [ 1, %4 ]
ret i32 %7
}