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


x86 assembly (clang, -O0):
<df_f2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x400,-0x1c(%rbp)
jge    1173 <df_f2+0x73>
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <df_f2+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<df_f2>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups (%rdx,%rax,2),%xmm0
movups 0x10(%rdx,%rax,2),%xmm1
movups 0x20(%rdx,%rax,2),%xmm2
movups 0x30(%rdx,%rax,2),%xmm3
movaps %xmm0,%xmm4
movlhps %xmm1,%xmm4
movaps %xmm2,%xmm5
movlhps %xmm3,%xmm5
unpckhpd %xmm1,%xmm0
unpckhpd %xmm3,%xmm2
movups %xmm4,(%rdi,%rax,1)
movups %xmm5,0x10(%rdi,%rax,1)
movups %xmm0,(%rsi,%rax,1)
movups %xmm2,0x10(%rsi,%rax,1)
add    $0x20,%rax
cmp    $0x2000,%rax
jne    1110 <df_f2+0x10>
ret

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

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