#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__ isdigit(char);
int my_is_alnum_punct(char c) {
  return isdigit(c) || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') ||
         c == '.' || c == ',' || c == '-' || c == '_' || c == '+';
}


x86 assembly (clang, -O0):
<my_is_alnum_punct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1158 <my_is_alnum_punct+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1177 <my_is_alnum_punct+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2c,%ecx
mov    %al,-0x2(%rbp)
je     11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     11cc <my_is_alnum_punct+0xbc>
movsbl -0x1(%rbp),%eax
cmp    $0x2b,%eax
sete   %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):
<my_is_alnum_punct>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    %ebx,%edx
and    $0xdf,%dl
add    $0xbf,%dl
mov    $0x1,%eax
cmp    $0x1a,%dl
jb     114d <my_is_alnum_punct+0x3d>
test   %rcx,%rcx
jne    114d <my_is_alnum_punct+0x3d>
lea    -0x2c(%rbx),%ecx
cmp    $0x33,%cl
ja     114f <my_is_alnum_punct+0x3f>
movzbl %cl,%ecx
movabs $0x8000000000007,%rdx
bt     %rcx,%rdx
jae    114f <my_is_alnum_punct+0x3f>
pop    %rbx
ret
xor    %eax,%eax
cmp    $0x2b,%bl
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @my_is_alnum_punct(i8 signext %0) {
%2 = tail call i64 @isdigit(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = and i8 %0, -33
%5 = add i8 %4, -65
%6 = icmp ult i8 %5, 26
%7 = or i1 %6, %3
br i1 %7, label %12, label %8
8: ; preds = %1
switch i8 %0, label %9 [
i8 95, label %12
i8 46, label %12
i8 45, label %12
i8 44, label %12
]
9: ; preds = %8
%10 = icmp eq i8 %0, 43
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %8, %8, %8, %9, %1
%13 = phi i32 [ 1, %1 ], [ %11, %9 ], [ 1, %8 ], [ 1, %8 ], [ 1, %8 ], [ 1, %8 ]
ret i32 %13
}