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

/* Variables and functions */
int /*<<< orphan*/ _MM_SHUFFLE(int, int, int, int);
int /*<<< orphan*/ _mm_shuffle_ps(int /*<<< orphan*/ const,
                                  int /*<<< orphan*/ const, int /*<<< orphan*/);
__m128 opCrossSSEint(const __m128 me, const __m128 r) {
  __m128 shuf_me1 = _mm_shuffle_ps(me, me, _MM_SHUFFLE(3, 0, 2, 1));
  __m128 shuf_r1 = _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 1, 0, 2));
  shuf_me1 *= shuf_r1;
  __m128 shuf_me2 = _mm_shuffle_ps(me, me, _MM_SHUFFLE(3, 1, 0, 2));
  __m128 shuf_r2 = _mm_shuffle_ps(r, r, _MM_SHUFFLE(3, 0, 2, 1));
  shuf_me2 *= shuf_r2;
  return shuf_me1 - shuf_me2;
}


x86 assembly (clang, -O0):
<opCrossSSEint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    $0x3,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x30(%rbp),%edi
mov    -0x2c(%rbp),%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    $0x3,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    -0x20(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x14(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opCrossSSEint>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %edi,%ebp
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,%r15d
mov    $0x3,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %r14d,%edi
mov    %r14d,%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,%ebx
imul   %r15d,%ebx
mov    $0x3,%edi
mov    $0x1,%esi
xor    %edx,%edx
mov    $0x2,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %ebp,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
mov    %eax,%ebp
mov    $0x3,%edi
xor    %esi,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
call   1030 <_MM_SHUFFLE@plt>
mov    %r14d,%edi
mov    %r14d,%esi
mov    %eax,%edx
call   1040 <_mm_shuffle_ps@plt>
imul   %ebp,%eax
sub    %eax,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @opCrossSSEint(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %3
%11 = call i32 @_MM_SHUFFLE(i32 3, i32 0, i32 2, i32 1)
%12 = call i32 @_mm_shuffle_ps(i32 %9, i32 %10, i32 %11)
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = load i32, i32* %4
%15 = call i32 @_MM_SHUFFLE(i32 3, i32 1, i32 0, i32 2)
%16 = call i32 @_mm_shuffle_ps(i32 %13, i32 %14, i32 %15)
store i32 %16, i32* %6
%17 = load i32, i32* %6
%18 = load i32, i32* %5
%19 = mul nsw i32 %18, %17
store i32 %19, i32* %5
%20 = load i32, i32* %3
%21 = load i32, i32* %3
%22 = call i32 @_MM_SHUFFLE(i32 3, i32 1, i32 0, i32 2)
%23 = call i32 @_mm_shuffle_ps(i32 %20, i32 %21, i32 %22)
store i32 %23, i32* %7
%24 = load i32, i32* %4
%25 = load i32, i32* %4
%26 = call i32 @_MM_SHUFFLE(i32 3, i32 0, i32 2, i32 1)
%27 = call i32 @_mm_shuffle_ps(i32 %24, i32 %25, i32 %26)
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = load i32, i32* %7
%30 = mul nsw i32 %29, %28
store i32 %30, i32* %7
%31 = load i32, i32* %5
%32 = load i32, i32* %7
%33 = sub nsw i32 %31, %32
ret i32 %33
}

LLVM IR (-O2):
define i32 @opCrossSSEint(i32 %0, i32 %1) {
%3 = tail call i32 @_MM_SHUFFLE(i32 3, i32 0, i32 2, i32 1)
%4 = tail call i32 @_mm_shuffle_ps(i32 %0, i32 %0, i32 %3)
%5 = tail call i32 @_MM_SHUFFLE(i32 3, i32 1, i32 0, i32 2)
%6 = tail call i32 @_mm_shuffle_ps(i32 %1, i32 %1, i32 %5)
%7 = mul nsw i32 %6, %4
%8 = tail call i32 @_MM_SHUFFLE(i32 3, i32 1, i32 0, i32 2)
%9 = tail call i32 @_mm_shuffle_ps(i32 %0, i32 %0, i32 %8)
%10 = tail call i32 @_MM_SHUFFLE(i32 3, i32 0, i32 2, i32 1)
%11 = tail call i32 @_mm_shuffle_ps(i32 %1, i32 %1, i32 %10)
%12 = mul nsw i32 %11, %9
%13 = sub nsw i32 %7, %12
ret i32 %13
}