#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  unsigned long error;
};
typedef TYPE_1__ ERR_STRING_DATA;

/* Variables and functions */
unsigned long ERR_GET_FUNC(unsigned long);
unsigned long ERR_GET_LIB(unsigned long);
unsigned long err_string_data_hash(const ERR_STRING_DATA *a) {
  unsigned long ret, l;
  l = a->error;
  ret = l ^ ERR_GET_LIB(l) ^ ERR_GET_FUNC(l);
  return (ret ^ ret % 19 * 13);
}


x86 assembly (clang, -O0):
<err_string_data_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <ERR_GET_LIB@plt>
mov    %rax,%rcx
mov    -0x30(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <ERR_GET_FUNC@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
xor    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x13,%ecx
xor    %edx,%edx
div    %rcx
mov    -0x20(%rbp),%rax
imul   $0xd,%rdx,%rcx
xor    %rcx,%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_string_data_hash>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%rbx
mov    %rbx,%rdi
call   1030 <ERR_GET_LIB@plt>
mov    %rax,%r14
xor    %rbx,%r14
mov    %rbx,%rdi
call   1040 <ERR_GET_FUNC@plt>
mov    %rax,%rcx
xor    %r14,%rcx
movabs $0xd79435e50d79435f,%rdx
35 94 d7
mov    %rcx,%rax
mul    %rdx
shr    $0x4,%rdx
lea    (%rdx,%rdx,8),%rax
lea    (%rdx,%rax,2),%rax
mov    %rcx,%rdx
sub    %rax,%rdx
lea    (%rdx,%rdx,2),%rax
lea    (%rdx,%rax,4),%rax
xor    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i64 }
define i64 @err_string_data_hash(%struct.TYPE_3__* %0) {
%2 = alloca %struct.TYPE_3__*
%3 = alloca i64
%4 = alloca i64
store %struct.TYPE_3__* %0, %struct.TYPE_3__** %2
%5 = load %struct.TYPE_3__*, %struct.TYPE_3__** %2
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = load i64, i64* %4
%10 = call i64 @ERR_GET_LIB(i64 %9)
%11 = xor i64 %8, %10
%12 = load i64, i64* %4
%13 = call i64 @ERR_GET_FUNC(i64 %12)
%14 = xor i64 %11, %13
store i64 %14, i64* %3
%15 = load i64, i64* %3
%16 = load i64, i64* %3
%17 = urem i64 %16, 19
%18 = mul i64 %17, 13
%19 = xor i64 %15, %18
ret i64 %19
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i64 }
define i64 @err_string_data_hash(%struct.TYPE_3__* nocapture %0) {
%2 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %0, i64 0, i32 0
%3 = load i64, i64* %2
%4 = tail call i64 @ERR_GET_LIB(i64 %3)
%5 = xor i64 %4, %3
%6 = tail call i64 @ERR_GET_FUNC(i64 %3)
%7 = xor i64 %5, %6
%8 = urem i64 %7, 19
%9 = mul nuw nsw i64 %8, 13
%10 = xor i64 %9, %7
ret i64 %10
}