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

/* Variables and functions */
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/ const,
                                 int /*<<< orphan*/ const);
void xor_eight(__m128i *states, const __m128i tmp, const __m128i *tweak_ctrs) {
  states[0] = _mm_xor_si128(tmp, tweak_ctrs[0]);
  states[1] = _mm_xor_si128(tmp, tweak_ctrs[1]);
  states[2] = _mm_xor_si128(tmp, tweak_ctrs[2]);
  states[3] = _mm_xor_si128(tmp, tweak_ctrs[3]);
  states[4] = _mm_xor_si128(tmp, tweak_ctrs[4]);
  states[5] = _mm_xor_si128(tmp, tweak_ctrs[5]);
  states[6] = _mm_xor_si128(tmp, tweak_ctrs[6]);
  states[7] = _mm_xor_si128(tmp, tweak_ctrs[7]);
}


x86 assembly (clang, -O0):
<xor_eight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x8(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0xc(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x10(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x14(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x18(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    0x1c(%rax),%esi
call   1030 <_mm_xor_si128@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_eight>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    (%rdx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,(%r14)
mov    0x4(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x4(%r14)
mov    0x8(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x8(%r14)
mov    0xc(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0xc(%r14)
mov    0x10(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x10(%r14)
mov    0x14(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x14(%r14)
mov    0x18(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x18(%r14)
mov    0x1c(%rbx),%esi
mov    %ebp,%edi
call   1030 <_mm_xor_si128@plt>
mov    %eax,0x1c(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

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