#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*/ _bitonic_merge_kernel4core(float *, float *);
int /*<<< orphan*/ _mm_loadu_ps(float *);
int /*<<< orphan*/ _mm_max_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_min_ps(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ _mm_shuffle_ps(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_storeu_ps(float *, int /*<<< orphan*/);
void _bitonic_sort_kernel4(float *a, float *b) {
  __m128 ma[2];
  __m128 mb[2];
  __m128 lo;
  __m128 hi;
  ma[0] = _mm_loadu_ps(a);
  mb[0] = _mm_loadu_ps(b);
  ma[1] = _mm_shuffle_ps(ma[0], mb[0], 0x88);
  mb[1] = _mm_shuffle_ps(ma[0], mb[0], 0xdd);
  lo = _mm_min_ps(ma[1], mb[1]);
  hi = _mm_max_ps(ma[1], mb[1]);
  ma[0] = _mm_shuffle_ps(hi, lo, 0xd8);
  mb[0] = _mm_shuffle_ps(hi, lo, 0x8d);
  lo = _mm_min_ps(ma[0], mb[0]);
  hi = _mm_max_ps(ma[0], mb[0]);
  ma[0] = _mm_shuffle_ps(lo, lo, 0xd8);
  mb[0] = _mm_shuffle_ps(hi, hi, 0x72);
  lo = _mm_min_ps(ma[0], mb[0]);
  hi = _mm_max_ps(ma[0], mb[0]);
  ma[0] = _mm_shuffle_ps(lo, hi, 0x41);
  mb[0] = _mm_shuffle_ps(hi, lo, 0xeb);
  _mm_storeu_ps(a, ma[0]);
  _mm_storeu_ps(b, mb[0]);
  _bitonic_merge_kernel4core(a, b);
}


x86 assembly (clang, -O0):
<_bitonic_sort_kernel4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    $0x88,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
mov    $0xdd,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,-0x24(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x1c(%rbp),%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0xd8,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0x8d,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0xd8,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    $0x72,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x20(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x20(%rbp),%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    $0x41,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x28(%rbp),%edi
mov    -0x24(%rbp),%esi
mov    $0xeb,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%esi
call   1040 <_mm_storeu_ps@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1040 <_mm_storeu_ps@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <_bitonic_merge_kernel4core@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bitonic_sort_kernel4>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1060 <_mm_loadu_ps@plt>
mov    %eax,%ebp
mov    %r14,%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %eax,%esi
mov    $0x88,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    %ebx,%esi
mov    $0xdd,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %eax,%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,%r13d
mov    %r12d,%edi
mov    %ebx,%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,%ebx
mov    %eax,%edi
mov    %r13d,%esi
mov    $0xd8,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%r12d
mov    %ebx,%edi
mov    %r13d,%esi
mov    $0x8d,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %eax,%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,%ebp
mov    %r12d,%edi
mov    %ebx,%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %ebp,%esi
mov    $0xd8,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %ebx,%esi
mov    $0x72,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebx
mov    %ebp,%edi
mov    %eax,%esi
call   1050 <_mm_min_ps@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    %ebx,%esi
call   1070 <_mm_max_ps@plt>
mov    %eax,%ebx
mov    %r12d,%edi
mov    %eax,%esi
mov    $0x41,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r12d,%esi
mov    $0xeb,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebx
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <_mm_storeu_ps@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <_mm_storeu_ps@plt>
mov    %r15,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1080 <_bitonic_merge_kernel4core@plt>

LLVM IR (-O0):
define void @_bitonic_sort_kernel4(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [2 x i32]
%6 = alloca [2 x i32]
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %3
store float* %1, float** %4
%9 = load float*, float** %3
%10 = call i32 @_mm_loadu_ps(float* %9)
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %10, i32* %11
%12 = load float*, float** %4
%13 = call i32 @_mm_loadu_ps(float* %12)
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %13, i32* %14
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%16 = load i32, i32* %15
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%18 = load i32, i32* %17
%19 = call i32 @_mm_shuffle_ps(i32 %16, i32 %18, i32 136)
%20 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
store i32 %19, i32* %20
%21 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%22 = load i32, i32* %21
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%24 = load i32, i32* %23
%25 = call i32 @_mm_shuffle_ps(i32 %22, i32 %24, i32 221)
%26 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
store i32 %25, i32* %26
%27 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%28 = load i32, i32* %27
%29 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%30 = load i32, i32* %29
%31 = call i32 @_mm_min_ps(i32 %28, i32 %30)
store i32 %31, i32* %7
%32 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 1
%33 = load i32, i32* %32
%34 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 1
%35 = load i32, i32* %34
%36 = call i32 @_mm_max_ps(i32 %33, i32 %35)
store i32 %36, i32* %8
%37 = load i32, i32* %8
%38 = load i32, i32* %7
%39 = call i32 @_mm_shuffle_ps(i32 %37, i32 %38, i32 216)
%40 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %39, i32* %40
%41 = load i32, i32* %8
%42 = load i32, i32* %7
%43 = call i32 @_mm_shuffle_ps(i32 %41, i32 %42, i32 141)
%44 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %43, i32* %44
%45 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%46 = load i32, i32* %45
%47 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%48 = load i32, i32* %47
%49 = call i32 @_mm_min_ps(i32 %46, i32 %48)
store i32 %49, i32* %7
%50 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%51 = load i32, i32* %50
%52 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%53 = load i32, i32* %52
%54 = call i32 @_mm_max_ps(i32 %51, i32 %53)
store i32 %54, i32* %8
%55 = load i32, i32* %7
%56 = load i32, i32* %7
%57 = call i32 @_mm_shuffle_ps(i32 %55, i32 %56, i32 216)
%58 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %57, i32* %58
%59 = load i32, i32* %8
%60 = load i32, i32* %8
%61 = call i32 @_mm_shuffle_ps(i32 %59, i32 %60, i32 114)
%62 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %61, i32* %62
%63 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%64 = load i32, i32* %63
%65 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%66 = load i32, i32* %65
%67 = call i32 @_mm_min_ps(i32 %64, i32 %66)
store i32 %67, i32* %7
%68 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%69 = load i32, i32* %68
%70 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%71 = load i32, i32* %70
%72 = call i32 @_mm_max_ps(i32 %69, i32 %71)
store i32 %72, i32* %8
%73 = load i32, i32* %7
%74 = load i32, i32* %8
%75 = call i32 @_mm_shuffle_ps(i32 %73, i32 %74, i32 65)
%76 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
store i32 %75, i32* %76
%77 = load i32, i32* %8
%78 = load i32, i32* %7
%79 = call i32 @_mm_shuffle_ps(i32 %77, i32 %78, i32 235)
%80 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
store i32 %79, i32* %80
%81 = load float*, float** %3
%82 = getelementptr inbounds [2 x i32], [2 x i32]* %5, i64 0, i64 0
%83 = load i32, i32* %82
%84 = call i32 @_mm_storeu_ps(float* %81, i32 %83)
%85 = load float*, float** %4
%86 = getelementptr inbounds [2 x i32], [2 x i32]* %6, i64 0, i64 0
%87 = load i32, i32* %86
%88 = call i32 @_mm_storeu_ps(float* %85, i32 %87)
%89 = load float*, float** %3
%90 = load float*, float** %4
%91 = call i32 @_bitonic_merge_kernel4core(float* %89, float* %90)
ret void
}

LLVM IR (-O2):
define void @_bitonic_sort_kernel4(float* %0, float* %1) {
%3 = tail call i32 @_mm_loadu_ps(float* %0)
%4 = tail call i32 @_mm_loadu_ps(float* %1)
%5 = tail call i32 @_mm_shuffle_ps(i32 %3, i32 %4, i32 136)
%6 = tail call i32 @_mm_shuffle_ps(i32 %3, i32 %4, i32 221)
%7 = tail call i32 @_mm_min_ps(i32 %5, i32 %6)
%8 = tail call i32 @_mm_max_ps(i32 %5, i32 %6)
%9 = tail call i32 @_mm_shuffle_ps(i32 %8, i32 %7, i32 216)
%10 = tail call i32 @_mm_shuffle_ps(i32 %8, i32 %7, i32 141)
%11 = tail call i32 @_mm_min_ps(i32 %9, i32 %10)
%12 = tail call i32 @_mm_max_ps(i32 %9, i32 %10)
%13 = tail call i32 @_mm_shuffle_ps(i32 %11, i32 %11, i32 216)
%14 = tail call i32 @_mm_shuffle_ps(i32 %12, i32 %12, i32 114)
%15 = tail call i32 @_mm_min_ps(i32 %13, i32 %14)
%16 = tail call i32 @_mm_max_ps(i32 %13, i32 %14)
%17 = tail call i32 @_mm_shuffle_ps(i32 %15, i32 %16, i32 65)
%18 = tail call i32 @_mm_shuffle_ps(i32 %16, i32 %15, i32 235)
%19 = tail call i32 @_mm_storeu_ps(float* %0, i32 %17)
%20 = tail call i32 @_mm_storeu_ps(float* %1, i32 %18)
%21 = tail call i32 @_bitonic_merge_kernel4core(float* %0, float* %1)
ret void
}