unsigned int uniname2ctype_hash(str, len)
register const char *str;
register unsigned int len;
{
  static const unsigned char asso_values[] = {
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21,
      21, 3,  12, 5,  4,  21, 21, 10, 21, 1,  21, 21, 11, 21, 2,  1,
      1,  21, 1,  7,  4,  6,  21, 1,  4,  21, 21, 21, 21, 21, 21, 21};
  return len + asso_values[(unsigned char)str[2]] +
         asso_values[(unsigned char)str[0]];
}


x86 assembly (clang, -O0):
<uniname2ctype_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x2(%rcx),%ecx
mov    %ecx,%edx
lea    0xee1(%rip),%rcx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
mov    %ecx,%edx
lea    0xecb(%rip),%rcx
movzbl (%rcx,%rdx,1),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniname2ctype_hash>:
movzbl 0x2(%rdi),%eax
lea    0xef5(%rip),%rcx
movzbl (%rax,%rcx,1),%edx
add    %esi,%edx
movzbl (%rdi),%eax
movzbl (%rax,%rcx,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
@uniname2ctype_hash.asso_values = internal constant [128 x i8] c"\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\03\0C\05\04\15\15\0A\15\01\15\15\0B\15\02\01\01\15\01\07\04\06\15\01\04\15\15\15\15\15\15\15"
define i32 @uniname2ctype_hash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i64 2
%8 = load i8, i8* %7
%9 = zext i8 %8 to i64
%10 = getelementptr inbounds [128 x i8], [128 x i8]* @uniname2ctype_hash.asso_values, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = add i32 %5, %12
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 0
%16 = load i8, i8* %15
%17 = zext i8 %16 to i64
%18 = getelementptr inbounds [128 x i8], [128 x i8]* @uniname2ctype_hash.asso_values, i64 0, i64 %17
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = add i32 %13, %20
ret i32 %21
}

LLVM IR (-O2):
@uniname2ctype_hash.asso_values = internal unnamed_addr constant [128 x i8] c"\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\15\03\0C\05\04\15\15\0A\15\01\15\15\0B\15\02\01\01\15\01\07\04\06\15\01\04\15\15\15\15\15\15\15"
define i32 @uniname2ctype_hash(i8* nocapture %0, i32 %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i64
%6 = getelementptr inbounds [128 x i8], [128 x i8]* @uniname2ctype_hash.asso_values, i64 0, i64 %5
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = add i32 %8, %1
%10 = load i8, i8* %0
%11 = zext i8 %10 to i64
%12 = getelementptr inbounds [128 x i8], [128 x i8]* @uniname2ctype_hash.asso_values, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = add i32 %9, %14
ret i32 %15
}