void colcpy4_trans(double *__restrict dst, int ldD,
                   const double *__restrict src, int ldS, int nR, int nC) {
  register double *Dc, *dr0, *dr1, *dr2, *dr3;
  register const double *Sc, *sr0, *sr1, *sr2, *sr3;
  register int j, i;
  Dc = dst;
  Sc = src;
  for (j = 0; j < nC - 3; j += 4) {
    dr0 = Dc;
    dr1 = dr0 + 1;
    dr2 = dr1 + 1;
    dr3 = dr2 + 1;
    sr0 = Sc;
    sr1 = sr0 + ldS;
    sr2 = sr1 + ldS;
    sr3 = sr2 + ldS;
    for (i = nR; i > 0; i--) {
      dr0[0] = sr0[0];
      dr1[0] = sr1[0];
      dr2[0] = sr2[0];
      dr3[0] = sr3[0];
      dr0 += ldD;
      dr1 += ldD;
      dr2 += ldD;
      dr3 += ldD;
      sr0 += 1;
      sr1 += 1;
      sr2 += 1;
      sr3 += 1;
    }
    Dc += 4;
    Sc += (ldS << 2);
  }
  if (j < nC - 1) {
    dr0 = Dc;
    dr1 = dr0 + 1;
    sr0 = Sc;
    sr1 = sr0 + ldS;
    for (i = nR; i > 0; i--) {
      dr0[0] = sr0[0];
      dr1[0] = sr1[0];
      dr0 += ldD;
      dr1 += ldD;
      sr0 += 1;
      sr1 += 1;
    }
    Dc += 2;
    Sc += (ldS << 1);
    j += 2;
  }
  if (j < nC) {
    sr0 = Sc;
    dr0 = Dc;
    for (i = nR; i > 0; i--) {
      dr0[0] = sr0[0];
      dr0 += ldD;
      sr0 += 1;
    }
  }
}


x86 assembly (clang, -O0):
<colcpy4_trans>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    12c3 <colcpy4_trans+0x1c3>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x70(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
jle    1291 <colcpy4_trans+0x191>
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x70(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x48(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x78(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x50(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x48(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x50(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x68(%rbp)
mov    -0x70(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x70(%rbp)
mov    -0x78(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x78(%rbp)
mov    -0x80(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    11b5 <colcpy4_trans+0xb5>
mov    -0x30(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x7c(%rbp)
jmp    1131 <colcpy4_trans+0x31>
mov    -0x7c(%rbp),%eax
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    13b0 <colcpy4_trans+0x2b0>
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x40(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
movslq -0x1c(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x68(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
jle    1383 <colcpy4_trans+0x283>
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x68(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x40(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
mov    -0x68(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x68(%rbp)
mov    -0x80(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    1309 <colcpy4_trans+0x209>
mov    -0x30(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x30(%rbp)
mov    -0x1c(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x7c(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x7c(%rbp)
mov    -0x7c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1420 <colcpy4_trans+0x320>
mov    -0x58(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x80(%rbp)
cmpl   $0x0,-0x80(%rbp)
jle    141b <colcpy4_trans+0x31b>
mov    -0x60(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x38(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0xc(%rbp),%ecx
mov    -0x38(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x38(%rbp)
mov    -0x60(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x60(%rbp)
mov    -0x80(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x80(%rbp)
jmp    13d2 <colcpy4_trans+0x2d2>
jmp    1420 <colcpy4_trans+0x320>
pop    %rbp
ret

x86 assembly (clang, -O2):
<colcpy4_trans>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
xor    %ebp,%ebp
cmp    $0x4,%r9d
mov    %esi,-0x4c(%rsp)
mov    %ecx,-0x50(%rsp)
jl     1302 <colcpy4_trans+0x202>
mov    %r9,-0x20(%rsp)
lea    -0x3(%r9),%eax
mov    %eax,-0x3c(%rsp)
movslq %ecx,%rax
movslq %esi,%rcx
mov    %rax,-0x18(%rsp)
lea    0x0(,%rax,4),%eax
cltq
mov    %rax,-0x10(%rsp)
lea    -0x1(%r8),%eax
mov    %eax,-0x40(%rsp)
mov    %rcx,-0x38(%rsp)
shl    $0x4,%rcx
mov    %rcx,-0x48(%rsp)
xor    %eax,%eax
mov    %r8,-0x30(%rsp)
jmp    119e <colcpy4_trans+0x9e>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    -0x28(%rsp),%rdi
add    $0x20,%rdi
mov    -0x58(%rsp),%rdx
mov    -0x10(%rsp),%rax
lea    (%rdx,%rax,8),%rdx
mov    -0x8(%rsp),%rax
add    $0x4,%eax
cmp    -0x3c(%rsp),%eax
mov    -0x30(%rsp),%r8
jge    12f7 <colcpy4_trans+0x1f7>
mov    %rax,-0x8(%rsp)
mov    %rdi,-0x28(%rsp)
mov    %rdx,-0x58(%rsp)
test   %r8d,%r8d
jle    1170 <colcpy4_trans+0x70>
mov    -0x58(%rsp),%rdx
mov    -0x18(%rsp),%rax
lea    (%rdx,%rax,8),%rbp
lea    0x0(,%rax,8),%rbx
add    %rbp,%rbx
mov    -0x28(%rsp),%r15
lea    0x18(%r15),%rsi
lea    0x10(%r15),%rcx
lea    0x8(%r15),%r10
lea    (%rbx,%rax,8),%r9
mov    -0x30(%rsp),%r8
test   $0x1,%r8b
jne    1200 <colcpy4_trans+0x100>
mov    %r8d,%r11d
cmp    $0x1,%r8d
je     1170 <colcpy4_trans+0x70>
jmp    125d <colcpy4_trans+0x15d>
nopw   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%r15)
movsd  0x0(%rbp),%xmm0
movsd  %xmm0,0x8(%r15)
movsd  (%rbx),%xmm0
movsd  %xmm0,0x10(%r15)
movsd  (%r9),%xmm0
movsd  %xmm0,0x18(%r15)
mov    -0x38(%rsp),%rax
lea    (%r15,%rax,8),%r15
lea    (%r10,%rax,8),%r10
lea    (%rcx,%rax,8),%rcx
lea    (%rsi,%rax,8),%rsi
add    $0x8,%rdx
add    $0x8,%rbp
add    $0x8,%rbx
add    $0x8,%r9
mov    -0x40(%rsp),%r11d
cmp    $0x1,%r8d
je     1170 <colcpy4_trans+0x70>
mov    %r10,%rdi
add    $0xffffffff,%r11d
mov    -0x38(%rsp),%rax
lea    (%rsi,%rax,8),%r12
lea    (%rcx,%rax,8),%r8
lea    (%r10,%rax,8),%r10
lea    (%r15,%rax,8),%r13
xor    %eax,%eax
xor    %r14d,%r14d
xchg   %ax,%ax
movsd  (%rdx,%r14,1),%xmm0
movsd  %xmm0,(%r15,%rax,1)
movsd  0x0(%rbp,%r14,1),%xmm0
movsd  %xmm0,(%rdi,%rax,1)
movsd  (%rbx,%r14,1),%xmm0
movsd  %xmm0,(%rcx,%rax,1)
movsd  (%r9,%r14,1),%xmm0
movsd  %xmm0,(%rsi,%rax,1)
movsd  0x8(%rdx,%r14,1),%xmm0
movsd  %xmm0,0x0(%r13,%rax,1)
movsd  0x8(%rbp,%r14,1),%xmm0
movsd  %xmm0,(%r10,%rax,1)
movsd  0x8(%rbx,%r14,1),%xmm0
movsd  %xmm0,(%r8,%rax,1)
movsd  0x8(%r9,%r14,1),%xmm0
movsd  %xmm0,(%r12,%rax,1)
add    $0x10,%r14
add    -0x48(%rsp),%rax
add    $0xfffffffe,%r11d
jb     1280 <colcpy4_trans+0x180>
jmp    1170 <colcpy4_trans+0x70>
mov    -0x20(%rsp),%r9
mov    %r9d,%ebp
and    $0xfffffffc,%ebp
lea    -0x1(%r9),%eax
cmp    %eax,%ebp
jge    1477 <colcpy4_trans+0x377>
mov    %ebp,-0x48(%rsp)
mov    %rdx,-0x58(%rsp)
test   %r8d,%r8d
jle    145b <colcpy4_trans+0x35b>
movslq -0x50(%rsp),%rax
mov    -0x58(%rsp),%rsi
lea    (%rsi,%rax,8),%r11
lea    0x8(%rdi),%r15
movslq -0x4c(%rsp),%r14
lea    -0x1(%r8),%r10d
test   $0x3,%r8b
je     139c <colcpy4_trans+0x29c>
lea    0x0(,%r14,8),%rcx
mov    %r8d,%edx
and    $0x3,%edx
shl    $0x3,%rdx
xor    %ebp,%ebp
mov    %r8d,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rbp,1),%xmm0
movsd  %xmm0,-0x8(%r15)
movsd  (%r11,%rbp,1),%xmm0
movsd  %xmm0,(%r15)
add    $0xffffffff,%eax
add    $0x8,%rbp
add    %rcx,%r15
cmp    %ebp,%edx
jne    1360 <colcpy4_trans+0x260>
add    %rbp,%r11
add    %rsi,%rbp
mov    %r15,%r13
add    $0xfffffffffffffff8,%r13
cmp    $0x3,%r10d
jae    13af <colcpy4_trans+0x2af>
jmp    145b <colcpy4_trans+0x35b>
mov    %r8d,%eax
mov    %rsi,%rbp
mov    %rdi,%r13
cmp    $0x3,%r10d
jb     145b <colcpy4_trans+0x35b>
add    $0xffffffff,%eax
mov    %r14,%r12
shl    $0x5,%r12
lea    0x0(,%r14,8),%r10
xor    %ecx,%ecx
xor    %esi,%esi
cs nopw 0x0(%rax,%rax,1)
nop
lea    (%r15,%rcx,1),%rdx
lea    (%rcx,%r13,1),%rbx
movsd  0x0(%rbp,%rsi,1),%xmm0
movsd  %xmm0,0x0(%r13,%rcx,1)
movsd  (%r11,%rsi,1),%xmm0
movsd  %xmm0,(%r15,%rcx,1)
movsd  0x8(%rbp,%rsi,1),%xmm0
movsd  %xmm0,(%rbx,%r14,8)
add    %r10,%rbx
movsd  0x8(%r11,%rsi,1),%xmm0
movsd  %xmm0,(%rdx,%r14,8)
add    %r10,%rdx
movsd  0x10(%rbp,%rsi,1),%xmm0
movsd  %xmm0,(%rbx,%r14,8)
add    %r10,%rbx
movsd  0x10(%r11,%rsi,1),%xmm0
movsd  %xmm0,(%rdx,%r14,8)
add    %r10,%rdx
movsd  0x18(%rbp,%rsi,1),%xmm0
movsd  %xmm0,(%rbx,%r14,8)
movsd  0x18(%r11,%rsi,1),%xmm0
movsd  %xmm0,(%rdx,%r14,8)
add    $0xfffffffc,%eax
add    $0x20,%rsi
add    %r12,%rcx
cmp    $0xfffffffe,%eax
jb     13d0 <colcpy4_trans+0x2d0>
add    $0x10,%rdi
mov    -0x50(%rsp),%eax
add    %eax,%eax
cltq
mov    -0x58(%rsp),%rdx
lea    (%rdx,%rax,8),%rdx
mov    -0x48(%rsp),%ebp
or     $0x2,%ebp
cmp    %r9d,%ebp
mov    -0x4c(%rsp),%eax
jge    1554 <colcpy4_trans+0x454>
test   %r8d,%r8d
jle    1554 <colcpy4_trans+0x454>
cltq
lea    -0x1(%r8),%ecx
test   $0x7,%r8b
je     14ca <colcpy4_trans+0x3ca>
lea    0x0(,%rax,8),%rbp
mov    %r8d,%ebx
and    $0x7,%ebx
xor    %esi,%esi
nopl   0x0(%rax)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
add    $0x8,%rdx
add    $0x1,%rsi
add    %rbp,%rdi
cmp    %esi,%ebx
jne    14b0 <colcpy4_trans+0x3b0>
sub    %esi,%r8d
cmp    $0x7,%ecx
jb     1554 <colcpy4_trans+0x454>
add    $0xffffffff,%r8d
shl    $0x3,%rax
nopl   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,(%rdi,%rax,1)
add    %rax,%rdi
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
movsd  0x18(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
movsd  0x20(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
movsd  0x28(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
movsd  0x30(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
movsd  0x38(%rdx),%xmm0
movsd  %xmm0,(%rax,%rdi,1)
add    %rax,%rdi
add    $0xfffffff8,%r8d
add    $0x40,%rdx
add    %rax,%rdi
cmp    $0xfffffffe,%r8d
jb     14e0 <colcpy4_trans+0x3e0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @colcpy4_trans(double* noalias %0, i32 %1, double* noalias %2, i32 %3, i32 %4, i32 %5) {
%7 = alloca double*
%8 = alloca i32
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
%17 = alloca double*
%18 = alloca double*
%19 = alloca double*
%20 = alloca double*
%21 = alloca double*
%22 = alloca double*
%23 = alloca i32
%24 = alloca i32
store double* %0, double** %7
store i32 %1, i32* %8
store double* %2, double** %9
store i32 %3, i32* %10
store i32 %4, i32* %11
store i32 %5, i32* %12
%25 = load double*, double** %7
store double* %25, double** %13
%26 = load double*, double** %9
store double* %26, double** %18
store i32 0, i32* %23
br label %27
27: ; preds = %113, %6
%28 = load i32, i32* %23
%29 = load i32, i32* %12
%30 = sub nsw i32 %29, 3
%31 = icmp slt i32 %28, %30
br i1 %31, label %32, label %116
32: ; preds = %27
%33 = load double*, double** %13
store double* %33, double** %14
%34 = load double*, double** %14
%35 = getelementptr inbounds double, double* %34, i64 1
store double* %35, double** %15
%36 = load double*, double** %15
%37 = getelementptr inbounds double, double* %36, i64 1
store double* %37, double** %16
%38 = load double*, double** %16
%39 = getelementptr inbounds double, double* %38, i64 1
store double* %39, double** %17
%40 = load double*, double** %18
store double* %40, double** %19
%41 = load double*, double** %19
%42 = load i32, i32* %10
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds double, double* %41, i64 %43
store double* %44, double** %20
%45 = load double*, double** %20
%46 = load i32, i32* %10
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds double, double* %45, i64 %47
store double* %48, double** %21
%49 = load double*, double** %21
%50 = load i32, i32* %10
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds double, double* %49, i64 %51
store double* %52, double** %22
%53 = load i32, i32* %11
store i32 %53, i32* %24
br label %54
54: ; preds = %102, %32
%55 = load i32, i32* %24
%56 = icmp sgt i32 %55, 0
br i1 %56, label %57, label %105
57: ; preds = %54
%58 = load double*, double** %19
%59 = getelementptr inbounds double, double* %58, i64 0
%60 = load double, double* %59
%61 = load double*, double** %14
%62 = getelementptr inbounds double, double* %61, i64 0
store double %60, double* %62
%63 = load double*, double** %20
%64 = getelementptr inbounds double, double* %63, i64 0
%65 = load double, double* %64
%66 = load double*, double** %15
%67 = getelementptr inbounds double, double* %66, i64 0
store double %65, double* %67
%68 = load double*, double** %21
%69 = getelementptr inbounds double, double* %68, i64 0
%70 = load double, double* %69
%71 = load double*, double** %16
%72 = getelementptr inbounds double, double* %71, i64 0
store double %70, double* %72
%73 = load double*, double** %22
%74 = getelementptr inbounds double, double* %73, i64 0
%75 = load double, double* %74
%76 = load double*, double** %17
%77 = getelementptr inbounds double, double* %76, i64 0
store double %75, double* %77
%78 = load i32, i32* %8
%79 = load double*, double** %14
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds double, double* %79, i64 %80
store double* %81, double** %14
%82 = load i32, i32* %8
%83 = load double*, double** %15
%84 = sext i32 %82 to i64
%85 = getelementptr inbounds double, double* %83, i64 %84
store double* %85, double** %15
%86 = load i32, i32* %8
%87 = load double*, double** %16
%88 = sext i32 %86 to i64
%89 = getelementptr inbounds double, double* %87, i64 %88
store double* %89, double** %16
%90 = load i32, i32* %8
%91 = load double*, double** %17
%92 = sext i32 %90 to i64
%93 = getelementptr inbounds double, double* %91, i64 %92
store double* %93, double** %17
%94 = load double*, double** %19
%95 = getelementptr inbounds double, double* %94, i64 1
store double* %95, double** %19
%96 = load double*, double** %20
%97 = getelementptr inbounds double, double* %96, i64 1
store double* %97, double** %20
%98 = load double*, double** %21
%99 = getelementptr inbounds double, double* %98, i64 1
store double* %99, double** %21
%100 = load double*, double** %22
%101 = getelementptr inbounds double, double* %100, i64 1
store double* %101, double** %22
br label %102
102: ; preds = %57
%103 = load i32, i32* %24
%104 = add nsw i32 %103, -1
store i32 %104, i32* %24
br label %54
105: ; preds = %54
%106 = load double*, double** %13
%107 = getelementptr inbounds double, double* %106, i64 4
store double* %107, double** %13
%108 = load i32, i32* %10
%109 = shl i32 %108, 2
%110 = load double*, double** %18
%111 = sext i32 %109 to i64
%112 = getelementptr inbounds double, double* %110, i64 %111
store double* %112, double** %18
br label %113
113: ; preds = %105
%114 = load i32, i32* %23
%115 = add nsw i32 %114, 4
store i32 %115, i32* %23
br label %27
116: ; preds = %27
%117 = load i32, i32* %23
%118 = load i32, i32* %12
%119 = sub nsw i32 %118, 1
%120 = icmp slt i32 %117, %119
br i1 %120, label %121, label %170
121: ; preds = %116
%122 = load double*, double** %13
store double* %122, double** %14
%123 = load double*, double** %14
%124 = getelementptr inbounds double, double* %123, i64 1
store double* %124, double** %15
%125 = load double*, double** %18
store double* %125, double** %19
%126 = load double*, double** %19
%127 = load i32, i32* %10
%128 = sext i32 %127 to i64
%129 = getelementptr inbounds double, double* %126, i64 %128
store double* %129, double** %20
%130 = load i32, i32* %11
store i32 %130, i32* %24
br label %131
131: ; preds = %157, %121
%132 = load i32, i32* %24
%133 = icmp sgt i32 %132, 0
br i1 %133, label %134, label %160
134: ; preds = %131
%135 = load double*, double** %19
%136 = getelementptr inbounds double, double* %135, i64 0
%137 = load double, double* %136
%138 = load double*, double** %14
%139 = getelementptr inbounds double, double* %138, i64 0
store double %137, double* %139
%140 = load double*, double** %20
%141 = getelementptr inbounds double, double* %140, i64 0
%142 = load double, double* %141
%143 = load double*, double** %15
%144 = getelementptr inbounds double, double* %143, i64 0
store double %142, double* %144
%145 = load i32, i32* %8
%146 = load double*, double** %14
%147 = sext i32 %145 to i64
%148 = getelementptr inbounds double, double* %146, i64 %147
store double* %148, double** %14
%149 = load i32, i32* %8
%150 = load double*, double** %15
%151 = sext i32 %149 to i64
%152 = getelementptr inbounds double, double* %150, i64 %151
store double* %152, double** %15
%153 = load double*, double** %19
%154 = getelementptr inbounds double, double* %153, i64 1
store double* %154, double** %19
%155 = load double*, double** %20
%156 = getelementptr inbounds double, double* %155, i64 1
store double* %156, double** %20
br label %157
157: ; preds = %134
%158 = load i32, i32* %24
%159 = add nsw i32 %158, -1
store i32 %159, i32* %24
br label %131
160: ; preds = %131
%161 = load double*, double** %13
%162 = getelementptr inbounds double, double* %161, i64 2
store double* %162, double** %13
%163 = load i32, i32* %10
%164 = shl i32 %163, 1
%165 = load double*, double** %18
%166 = sext i32 %164 to i64
%167 = getelementptr inbounds double, double* %165, i64 %166
store double* %167, double** %18
%168 = load i32, i32* %23
%169 = add nsw i32 %168, 2
store i32 %169, i32* %23
br label %170
170: ; preds = %160, %116
%171 = load i32, i32* %23
%172 = load i32, i32* %12
%173 = icmp slt i32 %171, %172
br i1 %173, label %174, label %197
174: ; preds = %170
%175 = load double*, double** %18
store double* %175, double** %19
%176 = load double*, double** %13
store double* %176, double** %14
%177 = load i32, i32* %11
store i32 %177, i32* %24
br label %178
178: ; preds = %193, %174
%179 = load i32, i32* %24
%180 = icmp sgt i32 %179, 0
br i1 %180, label %181, label %196
181: ; preds = %178
%182 = load double*, double** %19
%183 = getelementptr inbounds double, double* %182, i64 0
%184 = load double, double* %183
%185 = load double*, double** %14
%186 = getelementptr inbounds double, double* %185, i64 0
store double %184, double* %186
%187 = load i32, i32* %8
%188 = load double*, double** %14
%189 = sext i32 %187 to i64
%190 = getelementptr inbounds double, double* %188, i64 %189
store double* %190, double** %14
%191 = load double*, double** %19
%192 = getelementptr inbounds double, double* %191, i64 1
store double* %192, double** %19
br label %193
193: ; preds = %181
%194 = load i32, i32* %24
%195 = add nsw i32 %194, -1
store i32 %195, i32* %24
br label %178
196: ; preds = %178
br label %197
197: ; preds = %196, %170
ret void
}

LLVM IR (-O2):
define void @colcpy4_trans(double* noalias nocapture writeonly %0, i32 %1, double* noalias nocapture %2, i32 %3, i32 %4, i32 %5) {
%7 = add nsw i32 %5, -3
%8 = icmp sgt i32 %5, 3
br i1 %8, label %9, label %97
9: ; preds = %6
%10 = sext i32 %3 to i64
%11 = icmp sgt i32 %4, 0
%12 = sext i32 %1 to i64
%13 = shl i32 %3, 2
%14 = sext i32 %13 to i64
%15 = and i32 %4, 1
%16 = icmp eq i32 %15, 0
%17 = add nsw i32 %4, -1
%18 = icmp eq i32 %4, 1
br label %19
19: ; preds = %9, %90
%20 = phi i32 [ 0, %9 ], [ %93, %90 ]
%21 = phi double* [ %2, %9 ], [ %92, %90 ]
%22 = phi double* [ %0, %9 ], [ %91, %90 ]
%23 = getelementptr inbounds double, double* %21, i64 %10
%24 = getelementptr inbounds double, double* %23, i64 %10
br i1 %11, label %25, label %90
25: ; preds = %19
%26 = getelementptr inbounds double, double* %24, i64 %10
%27 = getelementptr inbounds double, double* %22, i64 3
%28 = getelementptr inbounds double, double* %22, i64 2
%29 = getelementptr inbounds double, double* %22, i64 1
br i1 %16, label %43, label %30
30: ; preds = %25
%31 = load double, double* %21
store double %31, double* %22
%32 = load double, double* %23
store double %32, double* %29
%33 = load double, double* %24
store double %33, double* %28
%34 = load double, double* %26
store double %34, double* %27
%35 = getelementptr inbounds double, double* %22, i64 %12
%36 = getelementptr inbounds double, double* %29, i64 %12
%37 = getelementptr inbounds double, double* %28, i64 %12
%38 = getelementptr inbounds double, double* %27, i64 %12
%39 = getelementptr inbounds double, double* %21, i64 1
%40 = getelementptr inbounds double, double* %23, i64 1
%41 = getelementptr inbounds double, double* %24, i64 1
%42 = getelementptr inbounds double, double* %26, i64 1
br label %43
43: ; preds = %30, %25
%44 = phi i32 [ %4, %25 ], [ %17, %30 ]
%45 = phi double* [ %26, %25 ], [ %42, %30 ]
%46 = phi double* [ %24, %25 ], [ %41, %30 ]
%47 = phi double* [ %23, %25 ], [ %40, %30 ]
%48 = phi double* [ %21, %25 ], [ %39, %30 ]
%49 = phi double* [ %27, %25 ], [ %38, %30 ]
%50 = phi double* [ %28, %25 ], [ %37, %30 ]
%51 = phi double* [ %29, %25 ], [ %36, %30 ]
%52 = phi double* [ %22, %25 ], [ %35, %30 ]
br i1 %18, label %90, label %53
53: ; preds = %43, %53
%54 = phi i32 [ %87, %53 ], [ %44, %43 ]
%55 = phi double* [ %86, %53 ], [ %45, %43 ]
%56 = phi double* [ %85, %53 ], [ %46, %43 ]
%57 = phi double* [ %84, %53 ], [ %47, %43 ]
%58 = phi double* [ %83, %53 ], [ %48, %43 ]
%59 = phi double* [ %82, %53 ], [ %49, %43 ]
%60 = phi double* [ %81, %53 ], [ %50, %43 ]
%61 = phi double* [ %80, %53 ], [ %51, %43 ]
%62 = phi double* [ %79, %53 ], [ %52, %43 ]
%63 = load double, double* %58
store double %63, double* %62
%64 = load double, double* %57
store double %64, double* %61
%65 = load double, double* %56
store double %65, double* %60
%66 = load double, double* %55
store double %66, double* %59
%67 = getelementptr inbounds double, double* %62, i64 %12
%68 = getelementptr inbounds double, double* %61, i64 %12
%69 = getelementptr inbounds double, double* %60, i64 %12
%70 = getelementptr inbounds double, double* %59, i64 %12
%71 = getelementptr inbounds double, double* %58, i64 1
%72 = getelementptr inbounds double, double* %57, i64 1
%73 = getelementptr inbounds double, double* %56, i64 1
%74 = getelementptr inbounds double, double* %55, i64 1
%75 = load double, double* %71
store double %75, double* %67
%76 = load double, double* %72
store double %76, double* %68
%77 = load double, double* %73
store double %77, double* %69
%78 = load double, double* %74
store double %78, double* %70
%79 = getelementptr inbounds double, double* %67, i64 %12
%80 = getelementptr inbounds double, double* %68, i64 %12
%81 = getelementptr inbounds double, double* %69, i64 %12
%82 = getelementptr inbounds double, double* %70, i64 %12
%83 = getelementptr inbounds double, double* %58, i64 2
%84 = getelementptr inbounds double, double* %57, i64 2
%85 = getelementptr inbounds double, double* %56, i64 2
%86 = getelementptr inbounds double, double* %55, i64 2
%87 = add nsw i32 %54, -2
%88 = add i32 %54, -3
%89 = icmp ult i32 %88, -2
br i1 %89, label %53, label %90
90: ; preds = %43, %53, %19
%91 = getelementptr inbounds double, double* %22, i64 4
%92 = getelementptr inbounds double, double* %21, i64 %14
%93 = add nuw nsw i32 %20, 4
%94 = icmp slt i32 %93, %7
br i1 %94, label %19, label %95
95: ; preds = %90
%96 = and i32 %5, -4
br label %97
97: ; preds = %95, %6
%98 = phi double* [ %0, %6 ], [ %91, %95 ]
%99 = phi double* [ %2, %6 ], [ %92, %95 ]
%100 = phi i32 [ 0, %6 ], [ %96, %95 ]
%101 = add nsw i32 %5, -1
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %175
103: ; preds = %97
%104 = icmp sgt i32 %4, 0
br i1 %104, label %105, label %169
105: ; preds = %103
%106 = sext i32 %3 to i64
%107 = getelementptr inbounds double, double* %99, i64 %106
%108 = getelementptr inbounds double, double* %98, i64 1
%109 = sext i32 %1 to i64
%110 = add i32 %4, -1
%111 = and i32 %4, 3
%112 = icmp eq i32 %111, 0
br i1 %112, label %129, label %113
113: ; preds = %105, %113
%114 = phi i32 [ %126, %113 ], [ %4, %105 ]
%115 = phi double* [ %125, %113 ], [ %107, %105 ]
%116 = phi double* [ %124, %113 ], [ %99, %105 ]
%117 = phi double* [ %123, %113 ], [ %108, %105 ]
%118 = phi double* [ %122, %113 ], [ %98, %105 ]
%119 = phi i32 [ %127, %113 ], [ 0, %105 ]
%120 = load double, double* %116
store double %120, double* %118
%121 = load double, double* %115
store double %121, double* %117
%122 = getelementptr inbounds double, double* %118, i64 %109
%123 = getelementptr inbounds double, double* %117, i64 %109
%124 = getelementptr inbounds double, double* %116, i64 1
%125 = getelementptr inbounds double, double* %115, i64 1
%126 = add nsw i32 %114, -1
%127 = add i32 %119, 1
%128 = icmp eq i32 %127, %111
br i1 %128, label %129, label %113
129: ; preds = %113, %105
%130 = phi i32 [ %4, %105 ], [ %126, %113 ]
%131 = phi double* [ %107, %105 ], [ %125, %113 ]
%132 = phi double* [ %99, %105 ], [ %124, %113 ]
%133 = phi double* [ %108, %105 ], [ %123, %113 ]
%134 = phi double* [ %98, %105 ], [ %122, %113 ]
%135 = icmp ult i32 %110, 3
br i1 %135, label %169, label %136
136: ; preds = %129, %136
%137 = phi i32 [ %166, %136 ], [ %130, %129 ]
%138 = phi double* [ %165, %136 ], [ %131, %129 ]
%139 = phi double* [ %164, %136 ], [ %132, %129 ]
%140 = phi double* [ %163, %136 ], [ %133, %129 ]
%141 = phi double* [ %162, %136 ], [ %134, %129 ]
%142 = load double, double* %139
store double %142, double* %141
%143 = load double, double* %138
store double %143, double* %140
%144 = getelementptr inbounds double, double* %141, i64 %109
%145 = getelementptr inbounds double, double* %140, i64 %109
%146 = getelementptr inbounds double, double* %139, i64 1
%147 = getelementptr inbounds double, double* %138, i64 1
%148 = load double, double* %146
store double %148, double* %144
%149 = load double, double* %147
store double %149, double* %145
%150 = getelementptr inbounds double, double* %144, i64 %109
%151 = getelementptr inbounds double, double* %145, i64 %109
%152 = getelementptr inbounds double, double* %139, i64 2
%153 = getelementptr inbounds double, double* %138, i64 2
%154 = load double, double* %152
store double %154, double* %150
%155 = load double, double* %153
store double %155, double* %151
%156 = getelementptr inbounds double, double* %150, i64 %109
%157 = getelementptr inbounds double, double* %151, i64 %109
%158 = getelementptr inbounds double, double* %139, i64 3
%159 = getelementptr inbounds double, double* %138, i64 3
%160 = load double, double* %158
store double %160, double* %156
%161 = load double, double* %159
store double %161, double* %157
%162 = getelementptr inbounds double, double* %156, i64 %109
%163 = getelementptr inbounds double, double* %157, i64 %109
%164 = getelementptr inbounds double, double* %139, i64 4
%165 = getelementptr inbounds double, double* %138, i64 4
%166 = add nsw i32 %137, -4
%167 = add i32 %137, -5
%168 = icmp ult i32 %167, -2
br i1 %168, label %136, label %169
169: ; preds = %129, %136, %103
%170 = getelementptr inbounds double, double* %98, i64 2
%171 = shl i32 %3, 1
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %99, i64 %172
%174 = or i32 %100, 2
br label %175
175: ; preds = %169, %97
%176 = phi double* [ %170, %169 ], [ %98, %97 ]
%177 = phi double* [ %173, %169 ], [ %99, %97 ]
%178 = phi i32 [ %174, %169 ], [ %100, %97 ]
%179 = icmp slt i32 %178, %5
%180 = icmp sgt i32 %4, 0
%181 = and i1 %179, %180
br i1 %181, label %182, label %234
182: ; preds = %175
%183 = sext i32 %1 to i64
%184 = add i32 %4, -1
%185 = and i32 %4, 7
%186 = icmp eq i32 %185, 0
br i1 %186, label %198, label %187
187: ; preds = %182, %187
%188 = phi i32 [ %195, %187 ], [ %4, %182 ]
%189 = phi double* [ %194, %187 ], [ %177, %182 ]
%190 = phi double* [ %193, %187 ], [ %176, %182 ]
%191 = phi i32 [ %196, %187 ], [ 0, %182 ]
%192 = load double, double* %189
store double %192, double* %190
%193 = getelementptr inbounds double, double* %190, i64 %183
%194 = getelementptr inbounds double, double* %189, i64 1
%195 = add nsw i32 %188, -1
%196 = add i32 %191, 1
%197 = icmp eq i32 %196, %185
br i1 %197, label %198, label %187
198: ; preds = %187, %182
%199 = phi i32 [ %4, %182 ], [ %195, %187 ]
%200 = phi double* [ %177, %182 ], [ %194, %187 ]
%201 = phi double* [ %176, %182 ], [ %193, %187 ]
%202 = icmp ult i32 %184, 7
br i1 %202, label %234, label %203
203: ; preds = %198, %203
%204 = phi i32 [ %231, %203 ], [ %199, %198 ]
%205 = phi double* [ %230, %203 ], [ %200, %198 ]
%206 = phi double* [ %229, %203 ], [ %201, %198 ]
%207 = load double, double* %205
store double %207, double* %206
%208 = getelementptr inbounds double, double* %206, i64 %183
%209 = getelementptr inbounds double, double* %205, i64 1
%210 = load double, double* %209
store double %210, double* %208
%211 = getelementptr inbounds double, double* %208, i64 %183
%212 = getelementptr inbounds double, double* %205, i64 2
%213 = load double, double* %212
store double %213, double* %211
%214 = getelementptr inbounds double, double* %211, i64 %183
%215 = getelementptr inbounds double, double* %205, i64 3
%216 = load double, double* %215
store double %216, double* %214
%217 = getelementptr inbounds double, double* %214, i64 %183
%218 = getelementptr inbounds double, double* %205, i64 4
%219 = load double, double* %218
store double %219, double* %217
%220 = getelementptr inbounds double, double* %217, i64 %183
%221 = getelementptr inbounds double, double* %205, i64 5
%222 = load double, double* %221
store double %222, double* %220
%223 = getelementptr inbounds double, double* %220, i64 %183
%224 = getelementptr inbounds double, double* %205, i64 6
%225 = load double, double* %224
store double %225, double* %223
%226 = getelementptr inbounds double, double* %223, i64 %183
%227 = getelementptr inbounds double, double* %205, i64 7
%228 = load double, double* %227
store double %228, double* %226
%229 = getelementptr inbounds double, double* %226, i64 %183
%230 = getelementptr inbounds double, double* %205, i64 8
%231 = add nsw i32 %204, -8
%232 = add i32 %204, -9
%233 = icmp ult i32 %232, -2
br i1 %233, label %203, label %234
234: ; preds = %198, %203, %175
ret void
}