unsigned int hashKey(char *t_ptr) {
  unsigned long hash_frag = 0;
  unsigned long hash_key = 0;
  unsigned int i;
  char tmp[(56)];
  memcpy(tmp, t_ptr, (56));
  for (i = 0; i < ((56) / (sizeof(unsigned long))); i++) {
    memcpy(&hash_frag, t_ptr, (sizeof(unsigned long)));
    t_ptr += (sizeof(unsigned long));
    hash_key = hash_key ^ (hash_frag + i);
  }
  return hash_key ^ strlen(tmp);
}


x86 assembly (clang, -O0):
<hashKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x60(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x38,%edx
call   1040 <memcpy@plt>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    $0x7,%rax
jae    119c <hashKey+0x7c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%edx
add    %rdx,%rcx
xor    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1155 <hashKey+0x35>
mov    -0x18(%rbp),%rax
mov    %rax,-0x68(%rbp)
lea    -0x60(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x68(%rbp),%rax
xor    %rcx,%rax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashKey>:
push   %rbx
sub    $0x40,%rsp
mov    0x30(%rdi),%rax
mov    %rax,0x30(%rsp)
movups (%rdi),%xmm0
movups 0x10(%rdi),%xmm1
movups 0x20(%rdi),%xmm2
movaps %xmm2,0x20(%rsp)
movaps %xmm1,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    0x8(%rdi),%eax
mov    0x10(%rdi),%ecx
add    $0x1,%eax
add    $0x2,%ecx
movdqu 0x18(%rdi),%xmm0
movdqu 0x28(%rdi),%xmm1
paddq  0xeab(%rip),%xmm1
paddq  0xeb3(%rip),%xmm0
xor    %eax,%ecx
pxor   %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
pxor   %xmm0,%xmm1
movd   %xmm1,%ebx
xor    %ecx,%ebx
xor    (%rdi),%ebx
mov    %rsp,%rdi
call   1030 <strlen@plt>
xor    %ebx,%eax
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hashKey(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca [56 x i8]
store i8* %0, i8** %2
store i64 0, i64* %3
store i64 0, i64* %4
%7 = getelementptr inbounds [56 x i8], [56 x i8]* %6, i64 0, i64 0
%8 = load i8*, i8** %2
store i32 0, i32* %5
br label %9
9: ; preds = %24, %1
%10 = load i32, i32* %5
%11 = zext i32 %10 to i64
%12 = icmp ult i64 %11, 7
br i1 %12, label %13, label %27
13: ; preds = %9
%14 = bitcast i64* %3 to i8*
%15 = load i8*, i8** %2
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 8
store i8* %17, i8** %2
%18 = load i64, i64* %4
%19 = load i64, i64* %3
%20 = load i32, i32* %5
%21 = zext i32 %20 to i64
%22 = add i64 %19, %21
%23 = xor i64 %18, %22
store i64 %23, i64* %4
br label %24
24: ; preds = %13
%25 = load i32, i32* %5
%26 = add i32 %25, 1
store i32 %26, i32* %5
br label %9
27: ; preds = %9
%28 = load i64, i64* %4
%29 = getelementptr inbounds [56 x i8], [56 x i8]* %6, i64 0, i64 0
%30 = call i64 @strlen(i8* %29)
%31 = xor i64 %28, %30
%32 = trunc i64 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @hashKey(i8* nocapture %0) {
%2 = alloca [56 x i8]
%3 = getelementptr inbounds [56 x i8], [56 x i8]* %2, i64 0, i64 0
%4 = bitcast i8* %0 to i64*
%5 = load i64, i64* %4
%6 = getelementptr inbounds i8, i8* %0, i64 8
%7 = bitcast i8* %6 to i64*
%8 = load i64, i64* %7
%9 = getelementptr inbounds i8, i8* %0, i64 16
%10 = add i64 %8, 1
%11 = bitcast i8* %9 to i64*
%12 = load i64, i64* %11
%13 = getelementptr inbounds i8, i8* %0, i64 24
%14 = add i64 %12, 2
%15 = bitcast i8* %13 to <4 x i64>*
%16 = load <4 x i64>, <4 x i64>* %15
%17 = add <4 x i64> %16, <i64 3, i64 4, i64 5, i64 6>
%18 = call i64 @llvm.vector.reduce.xor.v4i64(<4 x i64> %17)
%19 = xor i64 %18, %14
%20 = xor i64 %19, %10
%21 = xor i64 %20, %5
%22 = call i64 @strlen(i8* %3)
%23 = xor i64 %22, %21
%24 = trunc i64 %23 to i32
ret i32 %24
}