#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_or_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i funct_Maj(__m128i *x, __m128i *y, __m128i *z) {
  __m128i _calc = _mm_or_si128(*y, *z);
  __m128i _calc2 = _mm_and_si128(*y, *z);
  _calc = _mm_and_si128(_calc, *x);
  _calc = _mm_or_si128(_calc, _calc2);
  return _calc;
}


x86 assembly (clang, -O0):
<funct_Maj>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1030 <_mm_or_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_and_si128@plt>
mov    %eax,-0x20(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
call   1040 <_mm_and_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1030 <_mm_or_si128@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funct_Maj>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
mov    (%rsi),%edi
mov    (%rdx),%esi
call   1030 <_mm_or_si128@plt>
mov    %eax,%ebp
mov    (%rbx),%edi
mov    (%r14),%esi
call   1040 <_mm_and_si128@plt>
mov    %eax,%ebx
mov    (%r15),%esi
mov    %ebp,%edi
call   1040 <_mm_and_si128@plt>
mov    %eax,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <_mm_or_si128@plt>

LLVM IR (-O0):
define i32 @funct_Maj(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = call i32 @_mm_or_si128(i32 %10, i32 %12)
store i32 %13, i32* %7
%14 = load i32*, i32** %5
%15 = load i32, i32* %14
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = call i32 @_mm_and_si128(i32 %15, i32 %17)
store i32 %18, i32* %8
%19 = load i32, i32* %7
%20 = load i32*, i32** %4
%21 = load i32, i32* %20
%22 = call i32 @_mm_and_si128(i32 %19, i32 %21)
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @_mm_or_si128(i32 %23, i32 %24)
store i32 %25, i32* %7
%26 = load i32, i32* %7
ret i32 %26
}

LLVM IR (-O2):
define i32 @funct_Maj(i32* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 @_mm_or_si128(i32 %4, i32 %5)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = tail call i32 @_mm_and_si128(i32 %7, i32 %8)
%10 = load i32, i32* %0
%11 = tail call i32 @_mm_and_si128(i32 %6, i32 %10)
%12 = tail call i32 @_mm_or_si128(i32 %11, i32 %9)
ret i32 %12
}