int ZBarcode_ValidID(int symbol_id) {
  static const unsigned char ids[146] = {
      0,   1,   2,   3,   4,   0,   6,   7,   8,   9,   0,   0,   0,   13,  14,
      0,   16,  0,   18,  0,   20,  21,  22,  23,  24,  25,  0,   0,   28,  29,
      30,  31,  32,  0,   34,  35,  0,   37,  38,  0,   40,  0,   0,   0,   0,
      0,   0,   47,  0,   49,  50,  51,  52,  53,  0,   55,  56,  57,  58,  0,
      60,  0,   0,   63,  0,   0,   66,  67,  68,  69,  70,  71,  72,  73,  74,
      75,  76,  77,  0,   79,  80,  81,  82,  0,   84,  85,  86,  87,  0,   89,
      90,  0,   92,  93,  0,   0,   96,  97,  98,  99,  0,   0,   102, 0,   104,
      0,   106, 0,   108, 0,   110, 0,   112, 0,   0,   115, 116, 0,   0,   0,
      0,   121, 0,   0,   0,   0,   0,   0,   128, 129, 130, 131, 132, 133, 134,
      135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145,
  };
  if (symbol_id <= 0 || symbol_id > 145) {
    return 0;
  }
  return ids[symbol_id] != 0;
}


x86 assembly (clang, -O0):
<ZBarcode_ValidID>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    111e <ZBarcode_ValidID+0x1e>
cmpl   $0x91,-0x8(%rbp)
jle    112a <ZBarcode_ValidID+0x2a>
movl   $0x0,-0x4(%rbp)
jmp    1147 <ZBarcode_ValidID+0x47>
movslq -0x8(%rbp),%rcx
lea    0xecb(%rip),%rax
movzbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZBarcode_ValidID>:
lea    -0x92(%rdi),%ecx
xor    %eax,%eax
cmp    $0xffffff6f,%ecx
jb     1122 <ZBarcode_ValidID+0x22>
mov    %edi,%ecx
lea    0xee7(%rip),%rdx
xor    %eax,%eax
cmpb   $0x0,(%rcx,%rdx,1)
setne  %al
ret

LLVM IR (-O0):
@ZBarcode_ValidID.ids = internal constant [146 x i8] c"\00\01\02\03\04\00\06\07\08\09\00\00\00\0D\0E\00\10\00\12\00\14\15\16\17\18\19\00\00\1C\1D\1E\1F \00\22#\00%&\00(\00\00\00\00\00\00/\0012345\00789:\00<\00\00?\00\00BCDEFGHIJKLM\00OPQR\00TUVW\00YZ\00\\]\00\00`abc\00\00f\00h\00j\00l\00n\00p\00\00st\00\00\00\00y\00\00\00\00\00\00\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91"
define i32 @ZBarcode_ValidID(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 145
br i1 %8, label %9, label %10
9: ; preds = %6, %1
store i32 0, i32* %2
br label %18
10: ; preds = %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [146 x i8], [146 x i8]* @ZBarcode_ValidID.ids, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = icmp ne i32 %15, 0
%17 = zext i1 %16 to i32
store i32 %17, i32* %2
br label %18
18: ; preds = %10, %9
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@ZBarcode_ValidID.ids = internal unnamed_addr constant [146 x i8] c"\00\01\02\03\04\00\06\07\08\09\00\00\00\0D\0E\00\10\00\12\00\14\15\16\17\18\19\00\00\1C\1D\1E\1F \00\22#\00%&\00(\00\00\00\00\00\00/\0012345\00789:\00<\00\00?\00\00BCDEFGHIJKLM\00OPQR\00TUVW\00YZ\00\\]\00\00`abc\00\00f\00h\00j\00l\00n\00p\00\00st\00\00\00\00y\00\00\00\00\00\00\80\81\82\83\84\85\86\87\88\89\8A\8B\8C\8D\8E\8F\90\91"
define i32 @ZBarcode_ValidID(i32 %0) {
%2 = add i32 %0, -146
%3 = icmp ult i32 %2, -145
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = zext i32 %0 to i64
%6 = getelementptr inbounds [146 x i8], [146 x i8]* @ZBarcode_ValidID.ids, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ %9, %4 ], [ 0, %1 ]
ret i32 %11
}