#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 uint64_t;

/* Variables and functions */
int asu_hash(int, int const *);
int poly_finalize(int const);
int /*<<< orphan*/ write64le(int *, int);
void prf_hash2_3_finalize(uint64_t *h, const uint64_t s[6],
                          const uint64_t *asukey) {
  uint64_t s0_1, s1_1;
  uint64_t s0_2, s1_2;
  uint64_t s0_3, s1_3;
  s0_1 = poly_finalize(s[0]);
  s1_1 = poly_finalize(s[1]);
  s0_2 = poly_finalize(s[2]);
  s1_2 = poly_finalize(s[3]);
  s0_3 = poly_finalize(s[4]);
  s1_3 = poly_finalize(s[5]);
  write64le(h + 0, (uint64_t)asu_hash(s1_1, asukey + 3) << 32 |
                       asu_hash(s0_1, asukey + 0));
  write64le(h + 1, (uint64_t)asu_hash(s1_2, asukey + 6) << 32 |
                       asu_hash(s0_2, asukey + 3));
  write64le(h + 2, (uint64_t)asu_hash(s1_3, asukey + 9) << 32 |
                       asu_hash(s0_3, asukey + 6));
}


x86 assembly (clang, -O0):
<prf_hash2_3_finalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%edi
call   1040 <poly_finalize@plt>
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x20(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
call   1050 <asu_hash@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <asu_hash@plt>
mov    -0x5c(%rbp),%esi
mov    -0x58(%rbp),%rdi
or     %eax,%esi
call   1030 <write64le@plt>
mov    -0x8(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x48(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x18,%rsi
call   1050 <asu_hash@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0xc,%rsi
call   1050 <asu_hash@plt>
mov    -0x4c(%rbp),%esi
mov    -0x48(%rbp),%rdi
or     %eax,%esi
call   1030 <write64le@plt>
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x24,%rsi
call   1050 <asu_hash@plt>
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x18(%rbp),%rsi
add    $0x18,%rsi
call   1050 <asu_hash@plt>
mov    -0x3c(%rbp),%esi
mov    -0x38(%rbp),%rdi
or     %eax,%esi
call   1030 <write64le@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prf_hash2_3_finalize>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r14
mov    (%rsi),%edi
call   1040 <poly_finalize@plt>
mov    %eax,0xc(%rsp)
mov    0x4(%rbp),%edi
call   1040 <poly_finalize@plt>
mov    %eax,%r12d
mov    0x8(%rbp),%edi
call   1040 <poly_finalize@plt>
mov    %eax,0x10(%rsp)
mov    0xc(%rbp),%edi
call   1040 <poly_finalize@plt>
mov    %eax,%r15d
mov    0x10(%rbp),%edi
call   1040 <poly_finalize@plt>
mov    %eax,0x14(%rsp)
mov    0x14(%rbp),%edi
call   1040 <poly_finalize@plt>
mov    %eax,0x8(%rsp)
lea    0xc(%rbx),%r13
mov    %r12d,%edi
mov    %r13,%rsi
call   1050 <asu_hash@plt>
mov    0xc(%rsp),%edi
mov    %rbx,%rsi
call   1050 <asu_hash@plt>
mov    %r14,%rdi
call   1030 <write64le@plt>
lea    0x4(%r14),%r12
lea    0x18(%rbx),%rbp
mov    %r15d,%edi
mov    %rbp,%rsi
call   1050 <asu_hash@plt>
mov    0x10(%rsp),%edi
mov    %r13,%rsi
call   1050 <asu_hash@plt>
mov    %r12,%rdi
call   1030 <write64le@plt>
add    $0x8,%r14
add    $0x24,%rbx
mov    0x8(%rsp),%edi
mov    %rbx,%rsi
call   1050 <asu_hash@plt>
mov    0x14(%rsp),%edi
mov    %rbp,%rsi
call   1050 <asu_hash@plt>
mov    %r14,%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <write64le@plt>

LLVM IR (-O0):
define void @prf_hash2_3_finalize(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
%16 = call i32 @poly_finalize(i32 %15)
store i32 %16, i32* %7
%17 = load i32*, i32** %5
%18 = getelementptr inbounds i32, i32* %17, i64 1
%19 = load i32, i32* %18
%20 = call i32 @poly_finalize(i32 %19)
store i32 %20, i32* %8
%21 = load i32*, i32** %5
%22 = getelementptr inbounds i32, i32* %21, i64 2
%23 = load i32, i32* %22
%24 = call i32 @poly_finalize(i32 %23)
store i32 %24, i32* %9
%25 = load i32*, i32** %5
%26 = getelementptr inbounds i32, i32* %25, i64 3
%27 = load i32, i32* %26
%28 = call i32 @poly_finalize(i32 %27)
store i32 %28, i32* %10
%29 = load i32*, i32** %5
%30 = getelementptr inbounds i32, i32* %29, i64 4
%31 = load i32, i32* %30
%32 = call i32 @poly_finalize(i32 %31)
store i32 %32, i32* %11
%33 = load i32*, i32** %5
%34 = getelementptr inbounds i32, i32* %33, i64 5
%35 = load i32, i32* %34
%36 = call i32 @poly_finalize(i32 %35)
store i32 %36, i32* %12
%37 = load i32*, i32** %4
%38 = getelementptr inbounds i32, i32* %37, i64 0
%39 = load i32, i32* %8
%40 = load i32*, i32** %6
%41 = getelementptr inbounds i32, i32* %40, i64 3
%42 = call i32 @asu_hash(i32 %39, i32* %41)
%43 = shl i32 %42, 32
%44 = load i32, i32* %7
%45 = load i32*, i32** %6
%46 = getelementptr inbounds i32, i32* %45, i64 0
%47 = call i32 @asu_hash(i32 %44, i32* %46)
%48 = or i32 %43, %47
%49 = call i32 @write64le(i32* %38, i32 %48)
%50 = load i32*, i32** %4
%51 = getelementptr inbounds i32, i32* %50, i64 1
%52 = load i32, i32* %10
%53 = load i32*, i32** %6
%54 = getelementptr inbounds i32, i32* %53, i64 6
%55 = call i32 @asu_hash(i32 %52, i32* %54)
%56 = shl i32 %55, 32
%57 = load i32, i32* %9
%58 = load i32*, i32** %6
%59 = getelementptr inbounds i32, i32* %58, i64 3
%60 = call i32 @asu_hash(i32 %57, i32* %59)
%61 = or i32 %56, %60
%62 = call i32 @write64le(i32* %51, i32 %61)
%63 = load i32*, i32** %4
%64 = getelementptr inbounds i32, i32* %63, i64 2
%65 = load i32, i32* %12
%66 = load i32*, i32** %6
%67 = getelementptr inbounds i32, i32* %66, i64 9
%68 = call i32 @asu_hash(i32 %65, i32* %67)
%69 = shl i32 %68, 32
%70 = load i32, i32* %11
%71 = load i32*, i32** %6
%72 = getelementptr inbounds i32, i32* %71, i64 6
%73 = call i32 @asu_hash(i32 %70, i32* %72)
%74 = or i32 %69, %73
%75 = call i32 @write64le(i32* %64, i32 %74)
ret void
}

LLVM IR (-O2):
define void @prf_hash2_3_finalize(i32* %0, i32* nocapture %1, i32* %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @poly_finalize(i32 %4)
%6 = getelementptr inbounds i32, i32* %1, i64 1
%7 = load i32, i32* %6
%8 = tail call i32 @poly_finalize(i32 %7)
%9 = getelementptr inbounds i32, i32* %1, i64 2
%10 = load i32, i32* %9
%11 = tail call i32 @poly_finalize(i32 %10)
%12 = getelementptr inbounds i32, i32* %1, i64 3
%13 = load i32, i32* %12
%14 = tail call i32 @poly_finalize(i32 %13)
%15 = getelementptr inbounds i32, i32* %1, i64 4
%16 = load i32, i32* %15
%17 = tail call i32 @poly_finalize(i32 %16)
%18 = getelementptr inbounds i32, i32* %1, i64 5
%19 = load i32, i32* %18
%20 = tail call i32 @poly_finalize(i32 %19)
%21 = getelementptr inbounds i32, i32* %2, i64 3
%22 = tail call i32 @asu_hash(i32 %8, i32* %21)
%23 = tail call i32 @asu_hash(i32 %5, i32* %2)
%24 = tail call i32 @write64le(i32* %0, i32 poison)
%25 = getelementptr inbounds i32, i32* %0, i64 1
%26 = getelementptr inbounds i32, i32* %2, i64 6
%27 = tail call i32 @asu_hash(i32 %14, i32* %26)
%28 = tail call i32 @asu_hash(i32 %11, i32* %21)
%29 = tail call i32 @write64le(i32* %25, i32 poison)
%30 = getelementptr inbounds i32, i32* %0, i64 2
%31 = getelementptr inbounds i32, i32* %2, i64 9
%32 = tail call i32 @asu_hash(i32 %20, i32* %31)
%33 = tail call i32 @asu_hash(i32 %17, i32* %26)
%34 = tail call i32 @write64le(i32* %30, i32 poison)
ret void
}