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


x86 assembly (clang, -O0):
<is_valid_ident_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    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2b,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2d,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x21,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     11b2 <is_valid_ident_char+0xa2>
movsbl -0x1(%rbp),%eax
cmp    $0x2d,%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):
<is_valid_ident_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalnum@plt>
test   %rax,%rax
setne  %al
cmp    $0x2b,%bl
sete   %cl
cmp    $0x2d,%bl
sete   %dl
movd   %ebx,%xmm0
punpcklbw %xmm0,%xmm0
pshuflw $0x0,%xmm0,%xmm0
pcmpeqb 0xec1(%rip),%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
movmskps %xmm0,%esi
test   %esi,%esi
setne  %bl
or     %cl,%dl
or     %al,%dl
or     %bl,%dl
movzbl %dl,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_valid_ident_char(i8 signext %0) {
%2 = tail call i64 @isalnum(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 43
%5 = icmp eq i8 %0, 45
%6 = insertelement <4 x i8> poison, i8 %0, i64 0
%7 = shufflevector <4 x i8> %6, <4 x i8> poison, <4 x i32> zeroinitializer
%8 = icmp eq <4 x i8> %7, <i8 95, i8 33, i8 47, i8 42>
%9 = bitcast <4 x i1> %8 to i4
%10 = icmp ne i4 %9, 0
%11 = or i1 %10, %5
%12 = or i1 %11, %4
%13 = or i1 %12, %3
%14 = zext i1 %13 to i32
ret i32 %14
}