void helper_float_3(float *buf) {
  for (int j = 0; j < 8; j += 8) {
    for (int k = 0; k < 4; k += 4) {
      __asm__ volatile("movups (%0), %%xmm0\n"
                       "movups (%1), %%xmm1\n"
                       "movaps %%xmm0, %%xmm8\n"
                       "shufps $160, %%xmm8, %%xmm8\n"
                       "shufps $245, %%xmm0, %%xmm0\n"
                       "xorps %%xmm9, %%xmm9\n"
                       "subps %%xmm0, %%xmm9\n"
                       "addsubps %%xmm9, %%xmm8\n"
                       "movaps %%xmm8, %%xmm0\n"
                       "movaps %%xmm1, %%xmm8\n"
                       "shufps $160, %%xmm8, %%xmm8\n"
                       "shufps $245, %%xmm1, %%xmm1\n"
                       "xorps %%xmm9, %%xmm9\n"
                       "subps %%xmm1, %%xmm9\n"
                       "addsubps %%xmm9, %%xmm8\n"
                       "movaps %%xmm8, %%xmm1\n"
                       "movaps %%xmm0, %%xmm8\n"
                       "shufps $68, %%xmm8, %%xmm8\n"
                       "xorps %%xmm9, %%xmm9\n"
                       "movaps %%xmm0, %%xmm10\n"
                       "shufps $14, %%xmm9, %%xmm10\n"
                       "movaps %%xmm0, %%xmm11\n"
                       "shufps $224, %%xmm11, %%xmm9\n"
                       "addps %%xmm8, %%xmm10\n"
                       "subps %%xmm9, %%xmm10\n"
                       "movaps %%xmm10, %%xmm0\n"
                       "movaps %%xmm1, %%xmm8\n"
                       "shufps $68, %%xmm8, %%xmm8\n"
                       "xorps %%xmm9, %%xmm9\n"
                       "movaps %%xmm1, %%xmm10\n"
                       "shufps $14, %%xmm9, %%xmm10\n"
                       "movaps %%xmm1, %%xmm11\n"
                       "shufps $224, %%xmm11, %%xmm9\n"
                       "addps %%xmm8, %%xmm10\n"
                       "subps %%xmm9, %%xmm10\n"
                       "movaps %%xmm10, %%xmm1\n"
                       "movaps %%xmm0, %%xmm8\n"
                       "movaps %%xmm0, %%xmm9\n"
                       "addps %%xmm1, %%xmm8\n"
                       "subps %%xmm1, %%xmm9\n"
                       "movups %%xmm8, (%0)\n"
                       "movups %%xmm9, (%1)\n" ::"r"(buf + j + k + 0),
                       "r"(buf + j + k + 4)
                       : "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5",
                         "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11",
                         "%xmm12", "%xmm13", "%xmm14", "%xmm15", "memory");
    }
  }
}


x86 assembly (clang, -O0):
<helper_float_3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x8,-0xc(%rbp)
jge    1233 <helper_float_3+0x133>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1220 <helper_float_3+0x120>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
movslq -0xc(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
movslq -0x10(%rbp),%rdx
shl    $0x2,%rdx
add    %rdx,%rcx
add    $0x10,%rcx
movups (%rax),%xmm0
movups (%rcx),%xmm1
movaps %xmm0,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm0,%xmm0
xorps  %xmm9,%xmm9
subps  %xmm0,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm0
movaps %xmm1,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm1,%xmm1
xorps  %xmm9,%xmm9
subps  %xmm1,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm1
movaps %xmm0,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm0,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm0,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm0
movaps %xmm1,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm1,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm1,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm1
movaps %xmm0,%xmm8
movaps %xmm0,%xmm9
addps  %xmm1,%xmm8
subps  %xmm1,%xmm9
movups %xmm8,(%rax)
movups %xmm9,(%rcx)
mov    -0x10(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <helper_float_3+0x20>
jmp    1225 <helper_float_3+0x125>
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <helper_float_3+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_float_3>:
lea    0x10(%rdi),%rax
movups (%rdi),%xmm0
movups (%rax),%xmm1
movaps %xmm0,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm0,%xmm0
xorps  %xmm9,%xmm9
subps  %xmm0,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm0
movaps %xmm1,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm1,%xmm1
xorps  %xmm9,%xmm9
subps  %xmm1,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm1
movaps %xmm0,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm0,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm0,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm0
movaps %xmm1,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm1,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm1,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm1
movaps %xmm0,%xmm8
movaps %xmm0,%xmm9
addps  %xmm1,%xmm8
subps  %xmm1,%xmm9
movups %xmm8,(%rdi)
movups %xmm9,(%rax)
ret

LLVM IR (-O0):
define void @helper_float_3(float* %0) {
%2 = alloca float*
%3 = alloca i32
%4 = alloca i32
store float* %0, float** %2
store i32 0, i32* %3
br label %5
5: ; preds = %33, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %29, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %32
12: ; preds = %9
%13 = load float*, float** %2
%14 = load i32, i32* %3
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds float, float* %13, i64 %15
%17 = load i32, i32* %4
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds float, float* %16, i64 %18
%20 = getelementptr inbounds float, float* %19, i64 0
%21 = load float*, float** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
%25 = load i32, i32* %4
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds float, float* %24, i64 %26
%28 = getelementptr inbounds float, float* %27, i64 4
br label %29
29: ; preds = %12
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 4
store i32 %31, i32* %4
br label %9
32: ; preds = %9
br label %33
33: ; preds = %32
%34 = load i32, i32* %3
%35 = add nsw i32 %34, 8
store i32 %35, i32* %3
br label %5
36: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @helper_float_3(float* %0) {
%2 = getelementptr inbounds float, float* %0, i64 4
tail call void asm sideeffect "movups ($0), %xmm0\0Amovups ($1), %xmm1\0Amovaps %xmm0, %xmm8\0Ashufps $$160, %xmm8, %xmm8\0Ashufps $$245, %xmm0, %xmm0\0Axorps %xmm9, %xmm9\0Asubps %xmm0, %xmm9\0Aaddsubps %xmm9, %xmm8\0Amovaps %xmm8, %xmm0\0Amovaps %xmm1, %xmm8\0Ashufps $$160, %xmm8, %xmm8\0Ashufps $$245, %xmm1, %xmm1\0Axorps %xmm9, %xmm9\0Asubps %xmm1, %xmm9\0Aaddsubps %xmm9, %xmm8\0Amovaps %xmm8, %xmm1\0Amovaps %xmm0, %xmm8\0Ashufps $$68, %xmm8, %xmm8\0Axorps %xmm9, %xmm9\0Amovaps %xmm0, %xmm10\0Ashufps $$14, %xmm9, %xmm10\0Amovaps %xmm0, %xmm11\0Ashufps $$224, %xmm11, %xmm9\0Aaddps %xmm8, %xmm10\0Asubps %xmm9, %xmm10\0Amovaps %xmm10, %xmm0\0Amovaps %xmm1, %xmm8\0Ashufps $$68, %xmm8, %xmm8\0Axorps %xmm9, %xmm9\0Amovaps %xmm1, %xmm10\0Ashufps $$14, %xmm9, %xmm10\0Amovaps %xmm1, %xmm11\0Ashufps $$224, %xmm11, %xmm9\0Aaddps %xmm8, %xmm10\0Asubps %xmm9, %xmm10\0Amovaps %xmm10, %xmm1\0Amovaps %xmm0, %xmm8\0Amovaps %xmm0, %xmm9\0Aaddps %xmm1, %xmm8\0Asubps %xmm1, %xmm9\0Amovups %xmm8, ($0)\0Amovups %xmm9, ($1)\0A", "r,r,~{xmm0},~{xmm1},~{xmm2},~{xmm3},~{xmm4},~{xmm5},~{xmm6},~{xmm7},~{xmm8},~{xmm9},~{xmm10},~{xmm11},~{xmm12},~{xmm13},~{xmm14},~{xmm15},~{memory},~{dirflag},~{fpsr},~{flags}"(float* %0, float* %2)
ret void
}