#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_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ *);
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_slli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_si128(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i mm_recursion(__m128i *a, __m128i *b, __m128i c, __m128i d,
                     __m128i mask) {
  __m128i v, x, y, z;
  x = _mm_load_si128(a);
  y = _mm_srli_epi32(*b, 11);
  z = _mm_srli_si128(c, 1);
  v = _mm_slli_epi32(d, 18);
  z = _mm_xor_si128(z, x);
  z = _mm_xor_si128(z, v);
  x = _mm_slli_si128(x, 1);
  y = _mm_and_si128(y, mask);
  z = _mm_xor_si128(z, x);
  z = _mm_xor_si128(z, y);
  return z;
}


x86 assembly (clang, -O0):
<mm_recursion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_mm_load_si128@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    $0xb,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x1,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x24(%rbp),%edi
mov    $0x1,%esi
call   1090 <_mm_slli_si128@plt>
mov    %eax,-0x24(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,-0x28(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_recursion>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r8d,0x4(%rsp)
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %rsi,%rbx
call   1030 <_mm_load_si128@plt>
mov    %eax,%r14d
mov    (%rbx),%edi
mov    $0xb,%esi
call   1070 <_mm_srli_epi32@plt>
mov    %eax,%r15d
mov    %r13d,%edi
mov    $0x1,%esi
call   1040 <_mm_srli_si128@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    $0x12,%esi
call   1060 <_mm_slli_epi32@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14d,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebp,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%r12d
mov    %r14d,%edi
mov    $0x1,%esi
call   1090 <_mm_slli_si128@plt>
mov    %eax,%ebp
mov    %r15d,%edi
mov    0x4(%rsp),%esi
call   1080 <_mm_and_si128@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %ebp,%esi
call   1050 <_mm_xor_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <_mm_xor_si128@plt>

LLVM IR (-O0):
define i32 @mm_recursion(i32* %0, i32* %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store i32* %0, i32** %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%15 = load i32*, i32** %6
%16 = call i32 @_mm_load_si128(i32* %15)
store i32 %16, i32* %12
%17 = load i32*, i32** %7
%18 = load i32, i32* %17
%19 = call i32 @_mm_srli_epi32(i32 %18, i32 11)
store i32 %19, i32* %13
%20 = load i32, i32* %8
%21 = call i32 @_mm_srli_si128(i32 %20, i32 1)
store i32 %21, i32* %14
%22 = load i32, i32* %9
%23 = call i32 @_mm_slli_epi32(i32 %22, i32 18)
store i32 %23, i32* %11
%24 = load i32, i32* %14
%25 = load i32, i32* %12
%26 = call i32 @_mm_xor_si128(i32 %24, i32 %25)
store i32 %26, i32* %14
%27 = load i32, i32* %14
%28 = load i32, i32* %11
%29 = call i32 @_mm_xor_si128(i32 %27, i32 %28)
store i32 %29, i32* %14
%30 = load i32, i32* %12
%31 = call i32 @_mm_slli_si128(i32 %30, i32 1)
store i32 %31, i32* %12
%32 = load i32, i32* %13
%33 = load i32, i32* %10
%34 = call i32 @_mm_and_si128(i32 %32, i32 %33)
store i32 %34, i32* %13
%35 = load i32, i32* %14
%36 = load i32, i32* %12
%37 = call i32 @_mm_xor_si128(i32 %35, i32 %36)
store i32 %37, i32* %14
%38 = load i32, i32* %14
%39 = load i32, i32* %13
%40 = call i32 @_mm_xor_si128(i32 %38, i32 %39)
store i32 %40, i32* %14
%41 = load i32, i32* %14
ret i32 %41
}

LLVM IR (-O2):
define i32 @mm_recursion(i32* %0, i32* nocapture %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @_mm_load_si128(i32* %0)
%7 = load i32, i32* %1
%8 = tail call i32 @_mm_srli_epi32(i32 %7, i32 11)
%9 = tail call i32 @_mm_srli_si128(i32 %2, i32 1)
%10 = tail call i32 @_mm_slli_epi32(i32 %3, i32 18)
%11 = tail call i32 @_mm_xor_si128(i32 %9, i32 %6)
%12 = tail call i32 @_mm_xor_si128(i32 %11, i32 %10)
%13 = tail call i32 @_mm_slli_si128(i32 %6, i32 1)
%14 = tail call i32 @_mm_and_si128(i32 %8, i32 %4)
%15 = tail call i32 @_mm_xor_si128(i32 %12, i32 %13)
%16 = tail call i32 @_mm_xor_si128(i32 %15, i32 %14)
ret i32 %16
}