#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_kernel8core(float *, float *);
int /*<<< orphan*/ _mm_loadu_ps(float *);
int /*<<< orphan*/ _mm_shuffle_ps(int /*<<< orphan*/, int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_storeu_ps(float *, int /*<<< orphan*/);
void _bitonic_merge_kernel8(float *a, float *b) {
  __m128 mb[3];
  mb[0] = _mm_loadu_ps(b);
  mb[1] = _mm_loadu_ps(b + 4);
  mb[2] = _mm_shuffle_ps(mb[1], mb[1], 0x1b);
  mb[1] = _mm_shuffle_ps(mb[0], mb[0], 0x1b);
  _mm_storeu_ps(b, mb[2]);
  _mm_storeu_ps(b + 4, mb[1]);
  _bitonic_merge_kernel8core(a, b);
}


x86 assembly (clang, -O0):
<_bitonic_merge_kernel8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edi
mov    -0x18(%rbp),%esi
mov    $0x1b,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x14(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x1c(%rbp),%esi
mov    $0x1b,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <_mm_storeu_ps@plt>
mov    -0x10(%rbp),%rdi
add    $0x10,%rdi
mov    -0x18(%rbp),%esi
call   1040 <_mm_storeu_ps@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <_bitonic_merge_kernel8core@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_bitonic_merge_kernel8>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,%ebp
lea    0x10(%rbx),%r15
mov    %r15,%rdi
call   1060 <_mm_loadu_ps@plt>
mov    %eax,%edi
mov    %eax,%esi
mov    $0x1b,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%r12d
mov    %ebp,%edi
mov    %ebp,%esi
mov    $0x1b,%edx
call   1030 <_mm_shuffle_ps@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r12d,%esi
call   1040 <_mm_storeu_ps@plt>
mov    %r15,%rdi
mov    %ebp,%esi
call   1040 <_mm_storeu_ps@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1050 <_bitonic_merge_kernel8core@plt>

LLVM IR (-O0):
define void @_bitonic_merge_kernel8(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [3 x i32]
store float* %0, float** %3
store float* %1, float** %4
%6 = load float*, float** %4
%7 = call i32 @_mm_loadu_ps(float* %6)
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
store i32 %7, i32* %8
%9 = load float*, float** %4
%10 = getelementptr inbounds float, float* %9, i64 4
%11 = call i32 @_mm_loadu_ps(float* %10)
%12 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %11, i32* %12
%13 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%14 = load i32, i32* %13
%15 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%16 = load i32, i32* %15
%17 = call i32 @_mm_shuffle_ps(i32 %14, i32 %16, i32 27)
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%20 = load i32, i32* %19
%21 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 0
%22 = load i32, i32* %21
%23 = call i32 @_mm_shuffle_ps(i32 %20, i32 %22, i32 27)
%24 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
store i32 %23, i32* %24
%25 = load float*, float** %4
%26 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 2
%27 = load i32, i32* %26
%28 = call i32 @_mm_storeu_ps(float* %25, i32 %27)
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 4
%31 = getelementptr inbounds [3 x i32], [3 x i32]* %5, i64 0, i64 1
%32 = load i32, i32* %31
%33 = call i32 @_mm_storeu_ps(float* %30, i32 %32)
%34 = load float*, float** %3
%35 = load float*, float** %4
%36 = call i32 @_bitonic_merge_kernel8core(float* %34, float* %35)
ret void
}

LLVM IR (-O2):
define void @_bitonic_merge_kernel8(float* %0, float* %1) {
%3 = tail call i32 @_mm_loadu_ps(float* %1)
%4 = getelementptr inbounds float, float* %1, i64 4
%5 = tail call i32 @_mm_loadu_ps(float* %4)
%6 = tail call i32 @_mm_shuffle_ps(i32 %5, i32 %5, i32 27)
%7 = tail call i32 @_mm_shuffle_ps(i32 %3, i32 %3, i32 27)
%8 = tail call i32 @_mm_storeu_ps(float* %1, i32 %6)
%9 = tail call i32 @_mm_storeu_ps(float* %4, i32 %7)
%10 = tail call i32 @_bitonic_merge_kernel8core(float* %0, float* %1)
ret void
}