void __attribute__((no, noclone))
sf_f3(float *__restrict a, float *__restrict b, float *__restrict c,
      float *__restrict d) {
  for (int i = 0; i < 1024; ++i) {
    a[i] = d[i * 3];
    b[i] = d[i * 3 + 1];
    c[i] = d[i * 3 + 2];
  }
}


x86 assembly (clang, -O0):
<sf_f3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x400,-0x24(%rbp)
jge    1193 <sf_f3+0x93>
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <sf_f3+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sf_f3>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups (%rcx),%xmm0
movups 0x10(%rcx),%xmm1
movups 0x20(%rcx),%xmm2
movaps %xmm2,%xmm3
shufps $0xe5,%xmm1,%xmm3
movaps %xmm2,%xmm4
shufps $0xf6,%xmm1,%xmm4
movaps %xmm0,%xmm5
shufps $0x1,%xmm1,%xmm5
shufps $0x21,%xmm0,%xmm1
shufps $0x2c,%xmm3,%xmm0
shufps $0x28,%xmm4,%xmm5
shufps $0xc2,%xmm2,%xmm1
movups %xmm0,(%rdi,%rax,4)
movups %xmm5,(%rsi,%rax,4)
movups %xmm1,(%rdx,%rax,4)
movups 0x30(%rcx),%xmm0
movups 0x40(%rcx),%xmm1
movups 0x50(%rcx),%xmm2
movaps %xmm2,%xmm3
shufps $0xe5,%xmm1,%xmm3
movaps %xmm2,%xmm4
shufps $0xf6,%xmm1,%xmm4
movaps %xmm0,%xmm5
shufps $0x1,%xmm1,%xmm5
shufps $0x21,%xmm0,%xmm1
shufps $0x2c,%xmm3,%xmm0
shufps $0x28,%xmm4,%xmm5
shufps $0xc2,%xmm2,%xmm1
movups %xmm0,0x10(%rdi,%rax,4)
movups %xmm5,0x10(%rsi,%rax,4)
movups %xmm1,0x10(%rdx,%rax,4)
add    $0x8,%rax
add    $0x60,%rcx
cmp    $0x400,%rax
jne    1110 <sf_f3+0x10>
ret

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

LLVM IR (-O2):
define void @sf_f3(float* noalias nocapture writeonly %0, float* noalias nocapture writeonly %1, float* noalias nocapture writeonly %2, float* noalias nocapture %3) {
br label %5
5: ; preds = %5, %4
%6 = phi i64 [ 0, %4 ], [ %34, %5 ]
%7 = mul nuw nsw i64 %6, 3
%8 = getelementptr inbounds float, float* %3, i64 %7
%9 = bitcast float* %8 to <12 x float>*
%10 = load <12 x float>, <12 x float>* %9
%11 = shufflevector <12 x float> %10, <12 x float> poison, <4 x i32> <i32 0, i32 3, i32 6, i32 9>
%12 = shufflevector <12 x float> %10, <12 x float> poison, <4 x i32> <i32 1, i32 4, i32 7, i32 10>
%13 = shufflevector <12 x float> %10, <12 x float> poison, <4 x i32> <i32 2, i32 5, i32 8, i32 11>
%14 = getelementptr inbounds float, float* %0, i64 %6
%15 = bitcast float* %14 to <4 x float>*
store <4 x float> %11, <4 x float>* %15
%16 = getelementptr inbounds float, float* %1, i64 %6
%17 = bitcast float* %16 to <4 x float>*
store <4 x float> %12, <4 x float>* %17
%18 = getelementptr inbounds float, float* %2, i64 %6
%19 = bitcast float* %18 to <4 x float>*
store <4 x float> %13, <4 x float>* %19
%20 = or i64 %6, 4
%21 = mul nuw nsw i64 %20, 3
%22 = getelementptr inbounds float, float* %3, i64 %21
%23 = bitcast float* %22 to <12 x float>*
%24 = load <12 x float>, <12 x float>* %23
%25 = shufflevector <12 x float> %24, <12 x float> poison, <4 x i32> <i32 0, i32 3, i32 6, i32 9>
%26 = shufflevector <12 x float> %24, <12 x float> poison, <4 x i32> <i32 1, i32 4, i32 7, i32 10>
%27 = shufflevector <12 x float> %24, <12 x float> poison, <4 x i32> <i32 2, i32 5, i32 8, i32 11>
%28 = getelementptr inbounds float, float* %0, i64 %20
%29 = bitcast float* %28 to <4 x float>*
store <4 x float> %25, <4 x float>* %29
%30 = getelementptr inbounds float, float* %1, i64 %20
%31 = bitcast float* %30 to <4 x float>*
store <4 x float> %26, <4 x float>* %31
%32 = getelementptr inbounds float, float* %2, i64 %20
%33 = bitcast float* %32 to <4 x float>*
store <4 x float> %27, <4 x float>* %33
%34 = add nuw nsw i64 %6, 8
%35 = icmp eq i64 %34, 1024
br i1 %35, label %36, label %5
36: ; preds = %5
ret void
}