#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*/ value;
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ rgph_xxh32s_finalise(int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_xxh32s_fmix1(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_xxh32s_fold(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ rgph_xxh32s_init(int, uintptr_t, int /*<<< orphan*/ *);
uint32_t rgph_u32_xxh32s_u8(uint8_t value, uintptr_t seed) {
  uint32_t h[4];
  rgph_xxh32s_init(sizeof(value), seed, h);
  rgph_xxh32s_fold(sizeof(value), h);
  rgph_xxh32s_fmix1(value, h);
  rgph_xxh32s_finalise(h);
  return h[0];
}


x86 assembly (clang, -O0):
<rgph_u32_xxh32s_u8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x20(%rbp),%rdx
mov    $0x4,%edi
call   1040 <rgph_xxh32s_init@plt>
lea    -0x20(%rbp),%rsi
mov    $0x4,%edi
call   1050 <rgph_xxh32s_fold@plt>
mov    -0x4(%rbp),%edi
lea    -0x20(%rbp),%rsi
call   1060 <rgph_xxh32s_fmix1@plt>
lea    -0x20(%rbp),%rdi
call   1030 <rgph_xxh32s_finalise@plt>
mov    -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rgph_u32_xxh32s_u8>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
mov    %rsp,%rbx
mov    $0x4,%edi
mov    %rbx,%rdx
call   1040 <rgph_xxh32s_init@plt>
mov    $0x4,%edi
mov    %rbx,%rsi
call   1050 <rgph_xxh32s_fold@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1060 <rgph_xxh32s_fmix1@plt>
mov    %rbx,%rdi
call   1030 <rgph_xxh32s_finalise@plt>
mov    (%rsp),%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rgph_u32_xxh32s_u8(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca [4 x i32]
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%8 = call i32 @rgph_xxh32s_init(i32 4, i64 %6, i32* %7)
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%10 = call i32 @rgph_xxh32s_fold(i32 4, i32* %9)
%11 = load i32, i32* %3
%12 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%13 = call i32 @rgph_xxh32s_fmix1(i32 %11, i32* %12)
%14 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%15 = call i32 @rgph_xxh32s_finalise(i32* %14)
%16 = getelementptr inbounds [4 x i32], [4 x i32]* %5, i64 0, i64 0
%17 = load i32, i32* %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @rgph_u32_xxh32s_u8(i32 %0, i64 %1) {
%3 = alloca [4 x i32]
%4 = bitcast [4 x i32]* %3 to i8*
%5 = getelementptr inbounds [4 x i32], [4 x i32]* %3, i64 0, i64 0
%6 = call i32 @rgph_xxh32s_init(i32 4, i64 %1, i32* %5)
%7 = call i32 @rgph_xxh32s_fold(i32 4, i32* %5)
%8 = call i32 @rgph_xxh32s_fmix1(i32 %0, i32* %5)
%9 = call i32 @rgph_xxh32s_finalise(i32* %5)
%10 = load i32, i32* %5
ret i32 %10
}