#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 */

/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t aeron_fnv_64a_buf(uint8_t *buf, size_t len) {
  uint8_t *bp = buf;
  uint8_t *be = bp + len;
  uint64_t hval = 0xcbf29ce484222325ULL;
  while (bp < be) {
    hval ^= (uint64_t)*bp++;
    hval += (hval << 1) + (hval << 4) + (hval << 5) + (hval << 7) +
            (hval << 8) + (hval << 40);
  }
  return hval;
}


x86 assembly (clang, -O0):
<aeron_fnv_64a_buf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
movl   $0x84222325,-0x24(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1192 <aeron_fnv_64a_buf+0x92>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%eax
xor    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    -0x24(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%ecx
shl    $0x5,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%ecx
shl    $0x7,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x24(%rbp),%edx
mov    $0x28,%ecx
shl    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
jmp    112e <aeron_fnv_64a_buf+0x2e>
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_fnv_64a_buf>:
mov    $0x84222325,%eax
ret

LLVM IR (-O0):
define i32 @aeron_fnv_64a_buf(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
store i32* %0, i32** %3
store i64 %1, i64* %4
%8 = load i32*, i32** %3
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = load i64, i64* %4
%11 = getelementptr inbounds i32, i32* %9, i64 %10
store i32* %11, i32** %6
store i32 -2078137563, i32* %7
br label %12
12: ; preds = %16, %2
%13 = load i32*, i32** %5
%14 = load i32*, i32** %6
%15 = icmp ult i32* %13, %14
br i1 %15, label %16, label %41
16: ; preds = %12
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i32 1
store i32* %18, i32** %5
%19 = load i32, i32* %17
%20 = load i32, i32* %7
%21 = xor i32 %20, %19
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = shl i32 %22, 1
%24 = load i32, i32* %7
%25 = shl i32 %24, 4
%26 = add nsw i32 %23, %25
%27 = load i32, i32* %7
%28 = shl i32 %27, 5
%29 = add nsw i32 %26, %28
%30 = load i32, i32* %7
%31 = shl i32 %30, 7
%32 = add nsw i32 %29, %31
%33 = load i32, i32* %7
%34 = shl i32 %33, 8
%35 = add nsw i32 %32, %34
%36 = load i32, i32* %7
%37 = shl i32 %36, 40
%38 = add nsw i32 %35, %37
%39 = load i32, i32* %7
%40 = add nsw i32 %39, %38
store i32 %40, i32* %7
br label %12
41: ; preds = %12
%42 = load i32, i32* %7
ret i32 %42
}

LLVM IR (-O2):
define i32 @aeron_fnv_64a_buf(i32* readnone %0, i64 %1) {
ret i32 -2078137563
}