#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_4__ TYPE_1__;

/* Type definitions */
struct TYPE_4__ {
  int *a6;
};
typedef TYPE_1__ xfrm_address_t;

/* Variables and functions */
unsigned int ntohl(int);
unsigned int __xfrm6_daddr_saddr_hash(const xfrm_address_t *daddr,
                                      const xfrm_address_t *saddr) {
  return ntohl(daddr->a6[2] ^ daddr->a6[3] ^ saddr->a6[2] ^ saddr->a6[3]);
}


x86 assembly (clang, -O0):
<__xfrm6_daddr_saddr_hash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x8(%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
xor    0xc(%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
xor    0x8(%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
xor    0xc(%rax),%edi
call   1030 <ntohl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__xfrm6_daddr_saddr_hash>:
mov    (%rdi),%rax
mov    0xc(%rax),%edi
xor    0x8(%rax),%edi
mov    (%rsi),%rax
xor    0x8(%rax),%edi
xor    0xc(%rax),%edi
jmp    1030 <ntohl@plt>

LLVM IR (-O0):
%struct.TYPE_4__ = type { i32* }
define i32 @__xfrm6_daddr_saddr_hash(%struct.TYPE_4__* %0, %struct.TYPE_4__* %1) {
%3 = alloca %struct.TYPE_4__*
%4 = alloca %struct.TYPE_4__*
store %struct.TYPE_4__* %0, %struct.TYPE_4__** %3
store %struct.TYPE_4__* %1, %struct.TYPE_4__** %4
%5 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%6 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %5, i32 0, i32 0
%7 = load i32*, i32** %6
%8 = getelementptr inbounds i32, i32* %7, i64 2
%9 = load i32, i32* %8
%10 = load %struct.TYPE_4__*, %struct.TYPE_4__** %3
%11 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %10, i32 0, i32 0
%12 = load i32*, i32** %11
%13 = getelementptr inbounds i32, i32* %12, i64 3
%14 = load i32, i32* %13
%15 = xor i32 %9, %14
%16 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%17 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %16, i32 0, i32 0
%18 = load i32*, i32** %17
%19 = getelementptr inbounds i32, i32* %18, i64 2
%20 = load i32, i32* %19
%21 = xor i32 %15, %20
%22 = load %struct.TYPE_4__*, %struct.TYPE_4__** %4
%23 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %22, i32 0, i32 0
%24 = load i32*, i32** %23
%25 = getelementptr inbounds i32, i32* %24, i64 3
%26 = load i32, i32* %25
%27 = xor i32 %21, %26
%28 = call i32 @ntohl(i32 %27)
ret i32 %28
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32* }
define i32 @__xfrm6_daddr_saddr_hash(%struct.TYPE_4__* nocapture %0, %struct.TYPE_4__* nocapture %1) {
%3 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %0, i64 0, i32 0
%4 = load i32*, i32** %3
%5 = getelementptr inbounds i32, i32* %4, i64 2
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %4, i64 3
%8 = load i32, i32* %7
%9 = xor i32 %8, %6
%10 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %1, i64 0, i32 0
%11 = load i32*, i32** %10
%12 = getelementptr inbounds i32, i32* %11, i64 2
%13 = load i32, i32* %12
%14 = xor i32 %9, %13
%15 = getelementptr inbounds i32, i32* %11, i64 3
%16 = load i32, i32* %15
%17 = xor i32 %14, %16
%18 = tail call i32 @ntohl(i32 %17)
ret i32 %18
}