unsigned int kconf_id_hash(register const char *str,
                           register unsigned int len) {
  static unsigned char asso_values[] = {
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 40, 5,  0,  0,  5,  49, 5,  20, 49, 49,
      5,  20, 5,  0,  35, 49, 0,  15, 0,  10, 15, 49, 25, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49,
      49, 49, 49, 49};
  register int hval = len;
  switch (hval) {
  default:
    hval += asso_values[(unsigned char)str[2]];
  case 2:
  case 1:
    hval += asso_values[(unsigned char)str[0]];
    break;
  }
  return hval;
}


x86 assembly (clang, -O0):
<kconf_id_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
sub    $0x2,%eax
jb     1140 <kconf_id_hash+0x40>
jmp    1125 <kconf_id_hash+0x25>
mov    -0x8(%rbp),%rax
movzbl 0x2(%rax),%eax
mov    %eax,%ecx
lea    0x2efa(%rip),%rax
movzbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,%ecx
lea    0x2ee0(%rip),%rax
movzbl (%rax,%rcx,1),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<kconf_id_hash>:
lea    -0x1(%rsi),%eax
cmp    $0x2,%eax
jb     111b <kconf_id_hash+0x1b>
movzbl 0x2(%rdi),%eax
lea    0xeed(%rip),%rcx
movzbl (%rax,%rcx,1),%eax
add    %esi,%eax
mov    %eax,%esi
movzbl (%rdi),%eax
lea    0xedb(%rip),%rcx
movzbl (%rax,%rcx,1),%eax
add    %esi,%eax
ret

LLVM IR (-O0):
@kconf_id_hash.asso_values = internal global [256 x i8] c"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111(\05\00\00\051\05\1411\05\14\05\00\00\0F\00\0A\0F1\19111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
define i32 @kconf_id_hash(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i32, i32* %5
switch i32 %7, label %8 [
i32 2, label %18
i32 1, label %18
]
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i64
%13 = getelementptr inbounds [256 x i8], [256 x i8]* @kconf_id_hash.asso_values, i64 0, i64 %12
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = load i32, i32* %5
%17 = add nsw i32 %16, %15
store i32 %17, i32* %5
br label %18
18: ; preds = %2, %2, %8
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i64
%23 = getelementptr inbounds [256 x i8], [256 x i8]* @kconf_id_hash.asso_values, i64 0, i64 %22
%24 = load i8, i8* %23
%25 = zext i8 %24 to i32
%26 = load i32, i32* %5
%27 = add nsw i32 %26, %25
store i32 %27, i32* %5
br label %28
28: ; preds = %18
%29 = load i32, i32* %5
ret i32 %29
}

LLVM IR (-O2):
@kconf_id_hash.asso_values = internal unnamed_addr constant [256 x i8] c"11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111(\05\00\00\051\05\1411\05\14\05\00\00\0F\00\0A\0F1\19111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111"
define i32 @kconf_id_hash(i8* nocapture %0, i32 %1) {
%3 = add i32 %1, -1
%4 = icmp ult i32 %3, 2
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 2
%7 = load i8, i8* %6
%8 = zext i8 %7 to i64
%9 = getelementptr inbounds [256 x i8], [256 x i8]* @kconf_id_hash.asso_values, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = add nsw i32 %11, %1
br label %13
13: ; preds = %2, %5
%14 = phi i32 [ %12, %5 ], [ %1, %2 ]
%15 = load i8, i8* %0
%16 = zext i8 %15 to i64
%17 = getelementptr inbounds [256 x i8], [256 x i8]* @kconf_id_hash.asso_values, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = add nsw i32 %14, %19
ret i32 %20
}