#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__ isalpha(char);
scalar_t__ isspace(char);
int is_identifier_char(char c) {
  if (isspace(c))
    return 0;
  if (c == '\0')
    return 0;
  if (isalpha(c))
    return 1;
  if (c == '_' || c == '-' || c == '?')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_identifier_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114d <is_identifier_char+0x2d>
movl   $0x0,-0x4(%rbp)
jmp    11bf <is_identifier_char+0x9f>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    1166 <is_identifier_char+0x46>
movl   $0x0,-0x4(%rbp)
jmp    11bf <is_identifier_char+0x9f>
movsbl -0x5(%rbp),%edi
call   1040 <isalpha@plt>
cmp    $0x0,%rax
je     1185 <is_identifier_char+0x65>
movl   $0x1,-0x4(%rbp)
jmp    11bf <is_identifier_char+0x9f>
movsbl -0x5(%rbp),%eax
cmp    $0x5f,%eax
je     11ac <is_identifier_char+0x8c>
movsbl -0x5(%rbp),%eax
cmp    $0x2d,%eax
je     11ac <is_identifier_char+0x8c>
movsbl -0x5(%rbp),%eax
cmp    $0x3f,%eax
jne    11b8 <is_identifier_char+0x98>
movl   $0x1,-0x4(%rbp)
jmp    11bf <is_identifier_char+0x9f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_identifier_char>:
push   %rbx
mov    %edi,%ebx
call   1030 <isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %bl,%bl
je     114b <is_identifier_char+0x2b>
test   %rcx,%rcx
jne    114b <is_identifier_char+0x2b>
movsbl %bl,%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     114d <is_identifier_char+0x2d>
pop    %rbx
ret
lea    -0x2d(%rbx),%ecx
cmp    $0x32,%cl
ja     1168 <is_identifier_char+0x48>
movzbl %cl,%ecx
movabs $0x4000000040001,%rdx
bt     %rcx,%rdx
jb     114b <is_identifier_char+0x2b>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @is_identifier_char(i8 signext %0) {
%2 = tail call i64 @isspace(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 0
%5 = or i1 %4, %3
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = tail call i64 @isalpha(i8 signext %0)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6
switch i8 %0, label %10 [
i8 95, label %11
i8 63, label %11
i8 45, label %11
]
10: ; preds = %9
br label %11
11: ; preds = %9, %9, %9, %6, %1, %10
%12 = phi i32 [ 0, %10 ], [ 0, %1 ], [ 1, %6 ], [ 1, %9 ], [ 1, %9 ], [ 1, %9 ]
ret i32 %12
}