#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_epi32(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_and_si128(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i funct_S1_Ch(__m128i *x, __m128i *y, __m128i *z) {
  __m128i rot6 = _mm_srli_epi32(*x, 6);
  __m128i _calc = _mm_slli_epi32(*x, (32 - 6));
  __m128i rot11_25 = _mm_srli_epi32(*x, 11);
  __m128i calc_Ch = _mm_xor_si128(*y, *z);
  rot6 = _mm_xor_si128(rot6, _calc);
  _calc = _mm_slli_epi32(*x, (32 - 11));
  rot6 = _mm_xor_si128(rot6, rot11_25);
  rot11_25 = _mm_srli_epi32(*x, 25);
  rot6 = _mm_xor_si128(rot6, _calc);
  _calc = _mm_slli_epi32(*x, (32 - 25));
  rot6 = _mm_xor_si128(rot6, rot11_25);
  calc_Ch = _mm_and_si128(calc_Ch, *x);
  rot6 = _mm_xor_si128(rot6, _calc);
  calc_Ch = _mm_xor_si128(calc_Ch, *z);
  _calc = _mm_add_epi32(rot6, calc_Ch);
  return _calc;
}


x86 assembly (clang, -O0):
<funct_S1_Ch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x6,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x1a,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0xb,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x15,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x19,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    $0x7,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x24(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
call   1070 <_mm_and_si128@plt>
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%esi
call   1030 <_mm_add_epi32@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funct_S1_Ch>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r12
mov    %rdi,%rbx
mov    (%rdi),%edi
mov    $0x6,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,%r15d
mov    (%rbx),%edi
mov    $0x1a,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    $0xb,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,%r13d
mov    (%r12),%edi
mov    (%r14),%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%r12d
mov    %r15d,%edi
mov    %ebp,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    $0x15,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    $0x19,%esi
call   1060 <_mm_srli_epi32@plt>
mov    %eax,%r13d
mov    %ebp,%edi
mov    %r15d,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    $0x7,%esi
call   1050 <_mm_slli_epi32@plt>
mov    %eax,%r15d
mov    %ebp,%edi
mov    %r13d,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%esi
mov    %r12d,%edi
call   1070 <_mm_and_si128@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %r15d,%esi
call   1040 <_mm_xor_si128@plt>
mov    %eax,%ebp
mov    (%r14),%esi
mov    %ebx,%edi
call   1040 <_mm_xor_si128@plt>
mov    %ebp,%edi
mov    %eax,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <_mm_add_epi32@plt>

LLVM IR (-O0):
define i32 @funct_S1_Ch(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
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %11
%13 = call i32 @_mm_srli_epi32(i32 %12, i32 6)
store i32 %13, i32* %7
%14 = load i32*, i32** %4
%15 = load i32, i32* %14
%16 = call i32 @_mm_slli_epi32(i32 %15, i32 26)
store i32 %16, i32* %8
%17 = load i32*, i32** %4
%18 = load i32, i32* %17
%19 = call i32 @_mm_srli_epi32(i32 %18, i32 11)
store i32 %19, i32* %9
%20 = load i32*, i32** %5
%21 = load i32, i32* %20
%22 = load i32*, i32** %6
%23 = load i32, i32* %22
%24 = call i32 @_mm_xor_si128(i32 %21, i32 %23)
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %8
%27 = call i32 @_mm_xor_si128(i32 %25, i32 %26)
store i32 %27, i32* %7
%28 = load i32*, i32** %4
%29 = load i32, i32* %28
%30 = call i32 @_mm_slli_epi32(i32 %29, i32 21)
store i32 %30, i32* %8
%31 = load i32, i32* %7
%32 = load i32, i32* %9
%33 = call i32 @_mm_xor_si128(i32 %31, i32 %32)
store i32 %33, i32* %7
%34 = load i32*, i32** %4
%35 = load i32, i32* %34
%36 = call i32 @_mm_srli_epi32(i32 %35, i32 25)
store i32 %36, i32* %9
%37 = load i32, i32* %7
%38 = load i32, i32* %8
%39 = call i32 @_mm_xor_si128(i32 %37, i32 %38)
store i32 %39, i32* %7
%40 = load i32*, i32** %4
%41 = load i32, i32* %40
%42 = call i32 @_mm_slli_epi32(i32 %41, i32 7)
store i32 %42, i32* %8
%43 = load i32, i32* %7
%44 = load i32, i32* %9
%45 = call i32 @_mm_xor_si128(i32 %43, i32 %44)
store i32 %45, i32* %7
%46 = load i32, i32* %10
%47 = load i32*, i32** %4
%48 = load i32, i32* %47
%49 = call i32 @_mm_and_si128(i32 %46, i32 %48)
store i32 %49, i32* %10
%50 = load i32, i32* %7
%51 = load i32, i32* %8
%52 = call i32 @_mm_xor_si128(i32 %50, i32 %51)
store i32 %52, i32* %7
%53 = load i32, i32* %10
%54 = load i32*, i32** %6
%55 = load i32, i32* %54
%56 = call i32 @_mm_xor_si128(i32 %53, i32 %55)
store i32 %56, i32* %10
%57 = load i32, i32* %7
%58 = load i32, i32* %10
%59 = call i32 @_mm_add_epi32(i32 %57, i32 %58)
store i32 %59, i32* %8
%60 = load i32, i32* %8
ret i32 %60
}

LLVM IR (-O2):
define i32 @funct_S1_Ch(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %0
%5 = tail call i32 @_mm_srli_epi32(i32 %4, i32 6)
%6 = load i32, i32* %0
%7 = tail call i32 @_mm_slli_epi32(i32 %6, i32 26)
%8 = load i32, i32* %0
%9 = tail call i32 @_mm_srli_epi32(i32 %8, i32 11)
%10 = load i32, i32* %1
%11 = load i32, i32* %2
%12 = tail call i32 @_mm_xor_si128(i32 %10, i32 %11)
%13 = tail call i32 @_mm_xor_si128(i32 %5, i32 %7)
%14 = load i32, i32* %0
%15 = tail call i32 @_mm_slli_epi32(i32 %14, i32 21)
%16 = tail call i32 @_mm_xor_si128(i32 %13, i32 %9)
%17 = load i32, i32* %0
%18 = tail call i32 @_mm_srli_epi32(i32 %17, i32 25)
%19 = tail call i32 @_mm_xor_si128(i32 %16, i32 %15)
%20 = load i32, i32* %0
%21 = tail call i32 @_mm_slli_epi32(i32 %20, i32 7)
%22 = tail call i32 @_mm_xor_si128(i32 %19, i32 %18)
%23 = load i32, i32* %0
%24 = tail call i32 @_mm_and_si128(i32 %12, i32 %23)
%25 = tail call i32 @_mm_xor_si128(i32 %22, i32 %21)
%26 = load i32, i32* %2
%27 = tail call i32 @_mm_xor_si128(i32 %24, i32 %26)
%28 = tail call i32 @_mm_add_epi32(i32 %25, i32 %27)
ret i32 %28
}