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


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
cmpl   $0x400,-0x2c(%rbp)
jge    11bf <f4+0xbf>
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%rax
mov    -0x2c(%rbp),%ecx
shl    $0x2,%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    111f <f4+0x1f>
pop    %rbp
ret

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

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

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