#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_add_epi64(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_slli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i xorshift128plus_vector_advance(__m128i *s0, __m128i *s1) {
  __m128i xmm1 = *s0;
  __m128i xmm2 = *s1;
  __m128i xmm0, xmm3, xmm4, xmm5;
  xmm3 = xmm2;
  xmm4 = xmm1;
  xmm4 = _mm_slli_epi64(xmm4, 23);
  xmm1 = _mm_xor_si128(xmm1, xmm4);
  xmm5 = xmm2;
  xmm5 = _mm_srli_epi64(xmm5, 5);
  xmm2 = _mm_xor_si128(xmm2, xmm5);
  xmm4 = xmm1;
  xmm4 = _mm_srli_epi64(xmm4, 18);
  xmm1 = _mm_xor_si128(xmm1, xmm4);
  xmm2 = _mm_xor_si128(xmm2, xmm1);
  xmm1 = xmm3;
  *s0 = xmm1;
  *s1 = xmm2;
  return _mm_add_epi64(xmm1, xmm2);
}


x86 assembly (clang, -O0):
<xorshift128plus_vector_advance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x17,%esi
call   1060 <_mm_slli_epi64@plt>
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    $0x5,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %eax,-0x28(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x12,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x14(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1050 <_mm_add_epi64@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xorshift128plus_vector_advance>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    (%rdi),%ebx
mov    (%rsi),%ebp
mov    %ebx,%edi
mov    $0x17,%esi
call   1060 <_mm_slli_epi64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    $0x5,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    $0x12,%esi
call   1030 <_mm_srli_epi64@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %r12d,%edi
mov    %eax,%esi
call   1040 <_mm_xor_si128@plt>
mov    %ebp,(%r15)
mov    %eax,(%r14)
mov    %ebp,%edi
mov    %eax,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <_mm_add_epi64@plt>

LLVM IR (-O0):
define i32 @xorshift128plus_vector_advance(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%11 = load i32*, i32** %3
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
store i32 %14, i32* %6
%15 = load i32, i32* %6
store i32 %15, i32* %8
%16 = load i32, i32* %5
store i32 %16, i32* %9
%17 = load i32, i32* %9
%18 = call i32 @_mm_slli_epi64(i32 %17, i32 23)
store i32 %18, i32* %9
%19 = load i32, i32* %5
%20 = load i32, i32* %9
%21 = call i32 @_mm_xor_si128(i32 %19, i32 %20)
store i32 %21, i32* %5
%22 = load i32, i32* %6
store i32 %22, i32* %10
%23 = load i32, i32* %10
%24 = call i32 @_mm_srli_epi64(i32 %23, i32 5)
store i32 %24, i32* %10
%25 = load i32, i32* %6
%26 = load i32, i32* %10
%27 = call i32 @_mm_xor_si128(i32 %25, i32 %26)
store i32 %27, i32* %6
%28 = load i32, i32* %5
store i32 %28, i32* %9
%29 = load i32, i32* %9
%30 = call i32 @_mm_srli_epi64(i32 %29, i32 18)
store i32 %30, i32* %9
%31 = load i32, i32* %5
%32 = load i32, i32* %9
%33 = call i32 @_mm_xor_si128(i32 %31, i32 %32)
store i32 %33, i32* %5
%34 = load i32, i32* %6
%35 = load i32, i32* %5
%36 = call i32 @_mm_xor_si128(i32 %34, i32 %35)
store i32 %36, i32* %6
%37 = load i32, i32* %8
store i32 %37, i32* %5
%38 = load i32, i32* %5
%39 = load i32*, i32** %3
store i32 %38, i32* %39
%40 = load i32, i32* %6
%41 = load i32*, i32** %4
store i32 %40, i32* %41
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = call i32 @_mm_add_epi64(i32 %42, i32 %43)
ret i32 %44
}

LLVM IR (-O2):
define i32 @xorshift128plus_vector_advance(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @_mm_slli_epi64(i32 %3, i32 23)
%6 = tail call i32 @_mm_xor_si128(i32 %3, i32 %5)
%7 = tail call i32 @_mm_srli_epi64(i32 %4, i32 5)
%8 = tail call i32 @_mm_xor_si128(i32 %4, i32 %7)
%9 = tail call i32 @_mm_srli_epi64(i32 %6, i32 18)
%10 = tail call i32 @_mm_xor_si128(i32 %6, i32 %9)
%11 = tail call i32 @_mm_xor_si128(i32 %8, i32 %10)
store i32 %4, i32* %0
store i32 %11, i32* %1
%12 = tail call i32 @_mm_add_epi64(i32 %4, i32 %11)
ret i32 %12
}