#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 scalar_t__ uint32_t;

/* Variables and functions */
scalar_t__ UINT32_C(int);
void rgph_xxh32s_init(size_t len, uint32_t seed, uint32_t h[]) {
  if (len < 16) {
    h[0] = seed + UINT32_C(374761393);
  } else {
    h[0] = seed + (UINT32_C(2654435761) + UINT32_C(2246822519));
    h[1] = seed + UINT32_C(2246822519);
    h[2] = seed + 0;
    h[3] = seed - UINT32_C(2654435761);
  }
}


x86 assembly (clang, -O0):
<rgph_xxh32s_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x10,-0x8(%rbp)
jae    1154 <rgph_xxh32s_init+0x44>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x165667b1,%edi
call   1030 <UINT32_C@plt>
mov    -0x20(%rbp),%rcx
add    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
jmp    11de <rgph_xxh32s_init+0xce>
mov    -0x10(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    $0x9e3779b1,%edi
call   1030 <UINT32_C@plt>
mov    %rax,-0x38(%rbp)
mov    $0x85ebca77,%edi
call   1030 <UINT32_C@plt>
mov    -0x40(%rbp),%rcx
mov    %rax,%rdx
mov    -0x38(%rbp),%rax
add    %rdx,%rax
add    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x85ebca77,%edi
call   1030 <UINT32_C@plt>
mov    -0x30(%rbp),%rcx
add    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x8(%rax)
mov    -0x10(%rbp),%rcx
add    $0x0,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x10(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x9e3779b1,%edi
call   1030 <UINT32_C@plt>
mov    -0x28(%rbp),%rcx
sub    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,0x18(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_xxh32s_init>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
cmp    $0xf,%rdi
ja     1133 <rgph_xxh32s_init+0x23>
mov    $0x165667b1,%edi
call   1030 <UINT32_C@plt>
add    %r15,%rax
mov    %rax,(%r14)
jmp    1179 <rgph_xxh32s_init+0x69>
mov    $0x9e3779b1,%edi
call   1030 <UINT32_C@plt>
mov    %rax,%rbx
mov    $0x85ebca77,%edi
call   1030 <UINT32_C@plt>
add    %r15,%rbx
add    %rax,%rbx
mov    %rbx,(%r14)
mov    $0x85ebca77,%edi
call   1030 <UINT32_C@plt>
add    %r15,%rax
mov    %rax,0x8(%r14)
mov    %r15,0x10(%r14)
mov    $0x9e3779b1,%edi
call   1030 <UINT32_C@plt>
sub    %rax,%r15
mov    %r15,0x18(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @rgph_xxh32s_init(i64 %0, i64 %1, i64* nocapture writeonly %2) {
%4 = icmp ult i64 %0, 16
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = tail call i64 @UINT32_C(i32 374761393)
%7 = add nsw i64 %6, %1
store i64 %7, i64* %2
br label %20
8: ; preds = %3
%9 = tail call i64 @UINT32_C(i32 -1640531535)
%10 = tail call i64 @UINT32_C(i32 -2048144777)
%11 = add i64 %9, %1
%12 = add i64 %11, %10
store i64 %12, i64* %2
%13 = tail call i64 @UINT32_C(i32 -2048144777)
%14 = add nsw i64 %13, %1
%15 = getelementptr inbounds i64, i64* %2, i64 1
store i64 %14, i64* %15
%16 = getelementptr inbounds i64, i64* %2, i64 2
store i64 %1, i64* %16
%17 = tail call i64 @UINT32_C(i32 -1640531535)
%18 = sub nsw i64 %1, %17
%19 = getelementptr inbounds i64, i64* %2, i64 3
store i64 %18, i64* %19
br label %20
20: ; preds = %8, %5
ret void
}