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


x86 assembly (clang, -O0):
<helper_float_4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jge    133b <helper_float_4+0x23b>
movl   $0x0,-0x10(%rbp)
cmpl   $0x4,-0x10(%rbp)
jge    1328 <helper_float_4+0x228>
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
mov    -0x8(%rbp),%rdx
movslq -0xc(%rbp),%rsi
shl    $0x2,%rsi
add    %rsi,%rdx
movslq -0x10(%rbp),%rsi
shl    $0x2,%rsi
add    %rsi,%rdx
add    $0x20,%rdx
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rdi
shl    $0x2,%rdi
add    %rdi,%rsi
movslq -0x10(%rbp),%rdi
shl    $0x2,%rdi
add    %rdi,%rsi
add    $0x30,%rsi
movups (%rax),%xmm0
movups (%rcx),%xmm1
movups (%rdx),%xmm2
movups (%rsi),%xmm3
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 %xmm2,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm2,%xmm2
xorps  %xmm9,%xmm9
subps  %xmm2,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm2
movaps %xmm3,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm3,%xmm3
xorps  %xmm9,%xmm9
subps  %xmm3,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm3
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 %xmm2,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm2,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm2,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm2
movaps %xmm3,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm3,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm3,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm3
movaps %xmm0,%xmm8
movaps %xmm0,%xmm9
addps  %xmm1,%xmm8
subps  %xmm1,%xmm9
movaps %xmm2,%xmm10
movaps %xmm2,%xmm11
addps  %xmm3,%xmm10
subps  %xmm3,%xmm11
movaps %xmm8,%xmm0
movaps %xmm8,%xmm2
addps  %xmm10,%xmm0
subps  %xmm10,%xmm2
movaps %xmm9,%xmm1
movaps %xmm9,%xmm3
addps  %xmm11,%xmm1
subps  %xmm11,%xmm3
movups %xmm0,(%rax)
movups %xmm1,(%rcx)
movups %xmm2,(%rdx)
movups %xmm3,(%rsi)
mov    -0x10(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <helper_float_4+0x20>
jmp    132d <helper_float_4+0x22d>
mov    -0xc(%rbp),%eax
add    $0x10,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <helper_float_4+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<helper_float_4>:
lea    0x10(%rdi),%rax
lea    0x20(%rdi),%rcx
lea    0x30(%rdi),%rdx
movups (%rdi),%xmm0
movups (%rax),%xmm1
movups (%rcx),%xmm2
movups (%rdx),%xmm3
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 %xmm2,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm2,%xmm2
xorps  %xmm9,%xmm9
subps  %xmm2,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm2
movaps %xmm3,%xmm8
shufps $0xa0,%xmm8,%xmm8
shufps $0xf5,%xmm3,%xmm3
xorps  %xmm9,%xmm9
subps  %xmm3,%xmm9
addsubps %xmm9,%xmm8
movaps %xmm8,%xmm3
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 %xmm2,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm2,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm2,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm2
movaps %xmm3,%xmm8
shufps $0x44,%xmm8,%xmm8
xorps  %xmm9,%xmm9
movaps %xmm3,%xmm10
shufps $0xe,%xmm9,%xmm10
movaps %xmm3,%xmm11
shufps $0xe0,%xmm11,%xmm9
addps  %xmm8,%xmm10
subps  %xmm9,%xmm10
movaps %xmm10,%xmm3
movaps %xmm0,%xmm8
movaps %xmm0,%xmm9
addps  %xmm1,%xmm8
subps  %xmm1,%xmm9
movaps %xmm2,%xmm10
movaps %xmm2,%xmm11
addps  %xmm3,%xmm10
subps  %xmm3,%xmm11
movaps %xmm8,%xmm0
movaps %xmm8,%xmm2
addps  %xmm10,%xmm0
subps  %xmm10,%xmm2
movaps %xmm9,%xmm1
movaps %xmm9,%xmm3
addps  %xmm11,%xmm1
subps  %xmm11,%xmm3
movups %xmm0,(%rdi)
movups %xmm1,(%rax)
movups %xmm2,(%rcx)
movups %xmm3,(%rdx)
ret

LLVM IR (-O0):
define void @helper_float_4(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 = %49, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 16
br i1 %7, label %8, label %52
8: ; preds = %5
store i32 0, i32* %4
br label %9
9: ; preds = %45, %8
%10 = load i32, i32* %4
%11 = icmp slt i32 %10, 4
br i1 %11, label %12, label %48
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
%29 = load float*, float** %2
%30 = load i32, i32* %3
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds float, float* %29, i64 %31
%33 = load i32, i32* %4
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds float, float* %32, i64 %34
%36 = getelementptr inbounds float, float* %35, i64 8
%37 = load float*, float** %2
%38 = load i32, i32* %3
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds float, float* %37, i64 %39
%41 = load i32, i32* %4
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds float, float* %40, i64 %42
%44 = getelementptr inbounds float, float* %43, i64 12
br label %45
45: ; preds = %12
%46 = load i32, i32* %4
%47 = add nsw i32 %46, 4
store i32 %47, i32* %4
br label %9
48: ; preds = %9
br label %49
49: ; preds = %48
%50 = load i32, i32* %3
%51 = add nsw i32 %50, 16
store i32 %51, i32* %3
br label %5
52: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @helper_float_4(float* %0) {
%2 = getelementptr inbounds float, float* %0, i64 4
%3 = getelementptr inbounds float, float* %0, i64 8
%4 = getelementptr inbounds float, float* %0, i64 12
tail call void asm sideeffect "movups ($0), %xmm0\0Amovups ($1), %xmm1\0Amovups ($2), %xmm2\0Amovups ($3), %xmm3\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 %xmm2, %xmm8\0Ashufps $$160, %xmm8, %xmm8\0Ashufps $$245, %xmm2, %xmm2\0Axorps %xmm9, %xmm9\0Asubps %xmm2, %xmm9\0Aaddsubps %xmm9, %xmm8\0Amovaps %xmm8, %xmm2\0Amovaps %xmm3, %xmm8\0Ashufps $$160, %xmm8, %xmm8\0Ashufps $$245, %xmm3, %xmm3\0Axorps %xmm9, %xmm9\0Asubps %xmm3, %xmm9\0Aaddsubps %xmm9, %xmm8\0Amovaps %xmm8, %xmm3\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 %xmm2, %xmm8\0Ashufps $$68, %xmm8, %xmm8\0Axorps %xmm9, %xmm9\0Amovaps %xmm2, %xmm10\0Ashufps $$14, %xmm9, %xmm10\0Amovaps %xmm2, %xmm11\0Ashufps $$224, %xmm11, %xmm9\0Aaddps %xmm8, %xmm10\0Asubps %xmm9, %xmm10\0Amovaps %xmm10, %xmm2\0Amovaps %xmm3, %xmm8\0Ashufps $$68, %xmm8, %xmm8\0Axorps %xmm9, %xmm9\0Amovaps %xmm3, %xmm10\0Ashufps $$14, %xmm9, %xmm10\0Amovaps %xmm3, %xmm11\0Ashufps $$224, %xmm11, %xmm9\0Aaddps %xmm8, %xmm10\0Asubps %xmm9, %xmm10\0Amovaps %xmm10, %xmm3\0Amovaps %xmm0, %xmm8\0Amovaps %xmm0, %xmm9\0Aaddps %xmm1, %xmm8\0Asubps %xmm1, %xmm9\0Amovaps %xmm2, %xmm10\0Amovaps %xmm2, %xmm11\0Aaddps %xmm3, %xmm10\0Asubps %xmm3, %xmm11\0Amovaps %xmm8, %xmm0\0Amovaps %xmm8, %xmm2\0Aaddps %xmm10, %xmm0\0Asubps %xmm10, %xmm2\0Amovaps %xmm9, %xmm1\0Amovaps %xmm9, %xmm3\0Aaddps %xmm11, %xmm1\0Asubps %xmm11, %xmm3\0Amovups %xmm0, ($0)\0Amovups %xmm1, ($1)\0Amovups %xmm2, ($2)\0Amovups %xmm3, ($3)\0A", "r,r,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, float* %3, float* %4)
ret void
}