void __attribute__((no, noclone))
df_f3(double *__restrict a, double *__restrict b, double *__restrict c,
      double *__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):
<df_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 <df_f3+0x93>
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
imul   $0x3,-0x24(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x24(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    111b <df_f3+0x1b>
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_f3>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movupd (%rcx),%xmm0
movupd 0x10(%rcx),%xmm1
movupd 0x20(%rcx),%xmm2
movapd %xmm1,%xmm3
movsd  %xmm0,%xmm3
shufpd $0x1,%xmm2,%xmm0
movsd  %xmm1,%xmm2
movupd %xmm3,(%rdi,%rax,8)
movupd %xmm0,(%rsi,%rax,8)
movupd %xmm2,(%rdx,%rax,8)
movupd 0x30(%rcx),%xmm0
movupd 0x40(%rcx),%xmm1
movupd 0x50(%rcx),%xmm2
movapd %xmm1,%xmm3
movsd  %xmm0,%xmm3
shufpd $0x1,%xmm2,%xmm0
movsd  %xmm1,%xmm2
movupd %xmm3,0x10(%rdi,%rax,8)
movupd %xmm0,0x10(%rsi,%rax,8)
movupd %xmm2,0x10(%rdx,%rax,8)
add    $0x4,%rax
add    $0x60,%rcx
cmp    $0x400,%rax
jne    1110 <df_f3+0x10>
ret

LLVM IR (-O0):
define void @df_f3(double* noalias %0, double* noalias %1, double* noalias %2, double* noalias %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %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 double*, double** %8
%15 = load i32, i32* %9
%16 = mul nsw i32 %15, 3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds double, double* %14, i64 %17
%19 = load double, double* %18
%20 = load double*, double** %5
%21 = load i32, i32* %9
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
store double %19, double* %23
%24 = load double*, double** %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 double, double* %24, i64 %28
%30 = load double, double* %29
%31 = load double*, double** %6
%32 = load i32, i32* %9
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %31, i64 %33
store double %30, double* %34
%35 = load double*, double** %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 double, double* %35, i64 %39
%41 = load double, double* %40
%42 = load double*, double** %7
%43 = load i32, i32* %9
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
store double %41, double* %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 @df_f3(double* noalias nocapture writeonly %0, double* noalias nocapture writeonly %1, double* noalias nocapture writeonly %2, double* 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 double, double* %3, i64 %7
%9 = bitcast double* %8 to <6 x double>*
%10 = load <6 x double>, <6 x double>* %9
%11 = shufflevector <6 x double> %10, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%12 = shufflevector <6 x double> %10, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%13 = shufflevector <6 x double> %10, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%14 = getelementptr inbounds double, double* %0, i64 %6
%15 = bitcast double* %14 to <2 x double>*
store <2 x double> %11, <2 x double>* %15
%16 = getelementptr inbounds double, double* %1, i64 %6
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> %12, <2 x double>* %17
%18 = getelementptr inbounds double, double* %2, i64 %6
%19 = bitcast double* %18 to <2 x double>*
store <2 x double> %13, <2 x double>* %19
%20 = or i64 %6, 2
%21 = mul nuw nsw i64 %20, 3
%22 = getelementptr inbounds double, double* %3, i64 %21
%23 = bitcast double* %22 to <6 x double>*
%24 = load <6 x double>, <6 x double>* %23
%25 = shufflevector <6 x double> %24, <6 x double> poison, <2 x i32> <i32 0, i32 3>
%26 = shufflevector <6 x double> %24, <6 x double> poison, <2 x i32> <i32 1, i32 4>
%27 = shufflevector <6 x double> %24, <6 x double> poison, <2 x i32> <i32 2, i32 5>
%28 = getelementptr inbounds double, double* %0, i64 %20
%29 = bitcast double* %28 to <2 x double>*
store <2 x double> %25, <2 x double>* %29
%30 = getelementptr inbounds double, double* %1, i64 %20
%31 = bitcast double* %30 to <2 x double>*
store <2 x double> %26, <2 x double>* %31
%32 = getelementptr inbounds double, double* %2, i64 %20
%33 = bitcast double* %32 to <2 x double>*
store <2 x double> %27, <2 x double>* %33
%34 = add nuw nsw i64 %6, 4
%35 = icmp eq i64 %34, 1024
br i1 %35, label %36, label %5
36: ; preds = %5
ret void
}