void c_dcopy(const int N, const double *X, const int strideX, double *Y,
             const int strideY) {
  int ix;
  int iy;
  int i;
  int m;
  if (N <= 0) {
    return;
  }
  if (strideX == 1 && strideY == 1) {
    m = N % 7;
    if (m > 0) {
      for (i = 0; i < m; i++) {
        Y[i] = X[i];
      }
      if (N < 7) {
        return;
      }
    }
    for (i = m; i < N; i += 7) {
      Y[i] = X[i];
      Y[i + 1] = X[i + 1];
      Y[i + 2] = X[i + 2];
      Y[i + 3] = X[i + 3];
      Y[i + 4] = X[i + 4];
      Y[i + 5] = X[i + 5];
      Y[i + 6] = X[i + 6];
    }
    return;
  }
  if (strideX < 0) {
    ix = (1 - N) * strideX;
  } else {
    ix = 0;
  }
  if (strideY < 0) {
    iy = (1 - N) * strideY;
  } else {
    iy = 0;
  }
  for (i = 0; i < N; i++) {
    Y[iy] = X[ix];
    ix += strideX;
    iy += strideY;
  }
  return;
}


x86 assembly (clang, -O0):
<c_dcopy>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     1125 <c_dcopy+0x25>
jmp    1353 <c_dcopy+0x253>
cmpl   $0x1,-0x14(%rbp)
jne    12b7 <c_dcopy+0x1b7>
cmpl   $0x1,-0x24(%rbp)
jne    12b7 <c_dcopy+0x1b7>
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jle    11a0 <c_dcopy+0xa0>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    118c <c_dcopy+0x8c>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1158 <c_dcopy+0x58>
cmpl   $0x7,-0x4(%rbp)
jge    119b <c_dcopy+0x9b>
jmp    1353 <c_dcopy+0x253>
jmp    11a0 <c_dcopy+0xa0>
mov    -0x34(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    12b2 <c_dcopy+0x1b2>
mov    -0x10(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x30(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x30(%rbp)
jmp    11a6 <c_dcopy+0xa6>
jmp    1353 <c_dcopy+0x253>
cmpl   $0x0,-0x14(%rbp)
jge    12d5 <c_dcopy+0x1d5>
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
imul   -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
jmp    12dc <c_dcopy+0x1dc>
movl   $0x0,-0x28(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    12fa <c_dcopy+0x1fa>
mov    $0x1,%eax
sub    -0x4(%rbp),%eax
imul   -0x24(%rbp),%eax
mov    %eax,-0x2c(%rbp)
jmp    1301 <c_dcopy+0x201>
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    134e <c_dcopy+0x24e>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    -0x28(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%eax
add    -0x2c(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1308 <c_dcopy+0x208>
jmp    1353 <c_dcopy+0x253>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_dcopy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edi,%edi
jle    152d <c_dcopy+0x42d>
cmp    $0x1,%edx
jne    1162 <c_dcopy+0x62>
cmp    $0x1,%r8d
jne    1162 <c_dcopy+0x62>
mov    %edi,%eax
imul   $0x24924925,%rax,%rdx
shr    $0x20,%rdx
mov    %edi,%r8d
sub    %edx,%r8d
shr    %r8d
add    %edx,%r8d
shr    $0x2,%r8d
lea    0x0(,%r8,8),%edx
sub    %edx,%r8d
add    %edi,%r8d
je     1485 <c_dcopy+0x385>
mov    %r8d,%r10d
cmp    $0x4,%r8d
jae    136b <c_dcopy+0x26b>
xor    %ebx,%ebx
jmp    1460 <c_dcopy+0x360>
mov    $0x1,%eax
sub    %edi,%eax
mov    %eax,%ebp
imul   %r8d,%ebp
mov    %r8d,%ebx
sar    $0x1f,%ebx
and    %ebp,%ebx
imul   %edx,%eax
mov    %edx,%ebp
sar    $0x1f,%ebp
and    %eax,%ebp
movslq %ebp,%rax
movslq %edx,%r9
movslq %ebx,%r10
movslq %r8d,%r15
lea    -0x1(%rdi),%ebx
xor    %r11d,%r11d
cmp    $0x3,%ebx
jae    126e <c_dcopy+0x16e>
mov    %edi,%ebp
sub    %r11d,%ebp
mov    %r11d,%edx
not    %edx
add    %edi,%edx
and    $0x3,%ebp
je     11db <c_dcopy+0xdb>
neg    %ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%r10,8)
add    %r9,%rax
add    %r15,%r10
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jne    11c0 <c_dcopy+0xc0>
sub    %ebx,%r11d
cmp    $0x3,%edx
jb     152d <c_dcopy+0x42d>
lea    0x0(,%r10,8),%r8
mov    %r15,%r12
shl    $0x5,%r12
lea    (%r15,%r15,2),%rdx
lea    (%r8,%rdx,8),%r14
mov    %r15,%rdx
shl    $0x4,%rdx
lea    (%rdx,%r10,8),%r13
add    %r15,%r10
lea    (%rsi,%rax,8),%rbx
mov    %r9,%rdx
shl    $0x5,%rdx
lea    0x0(,%r9,8),%rbp
lea    0x0(%rbp,%rbp,2),%rbp
add    %r9,%rax
shl    $0x4,%r9
lea    (%rsi,%rax,8),%rax
sub    %r11d,%edi
nop
movsd  (%rbx),%xmm0
movsd  %xmm0,(%rcx,%r8,1)
movsd  (%rax),%xmm0
movsd  %xmm0,(%rcx,%r10,8)
movsd  (%rbx,%r9,1),%xmm0
movsd  %xmm0,(%rcx,%r13,1)
movsd  (%rbx,%rbp,1),%xmm0
movsd  %xmm0,(%rcx,%r14,1)
add    %r12,%rcx
add    %rdx,%rbx
add    %rdx,%rax
add    $0xfffffffc,%edi
jne    1230 <c_dcopy+0x130>
jmp    152d <c_dcopy+0x42d>
cmp    $0x1,%r8d
jne    119c <c_dcopy+0x9c>
cmp    $0x1,%edx
jne    119c <c_dcopy+0x9c>
lea    (%rcx,%r10,8),%rdx
lea    (%rax,%rbx,1),%rbp
lea    (%rsi,%rbp,8),%rbp
add    $0x8,%rbp
cmp    %rbp,%rdx
jae    12af <c_dcopy+0x1af>
lea    (%r10,%rbx,1),%rdx
lea    (%rcx,%rdx,8),%rdx
add    $0x8,%rdx
lea    (%rsi,%rax,8),%rbp
cmp    %rdx,%rbp
jb     119c <c_dcopy+0x9c>
add    $0x1,%rbx
mov    %rbx,-0x10(%rsp)
mov    %rbx,%rdx
and    $0xfffffffffffffffc,%rdx
mov    %rdx,-0x8(%rsp)
add    $0xfffffffffffffffc,%rdx
mov    %rdx,%rbp
shr    $0x2,%rbp
add    $0x1,%rbp
test   %rdx,%rdx
mov    %rbp,-0x18(%rsp)
je     1538 <c_dcopy+0x438>
movabs $0x7ffffffffffffffc,%rbx
ff ff 7f
or     $0x2,%rbx
and    %rbp,%rbx
mov    %r15,%r12
shl    $0x5,%r12
lea    (%rcx,%r10,8),%rdx
add    $0x10,%rdx
mov    %r15,%rbp
shl    $0x6,%rbp
mov    %r9,%r8
shl    $0x5,%r8
lea    (%rsi,%rax,8),%r14
add    $0x10,%r14
mov    %r9,%r11
shl    $0x6,%r11
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups -0x10(%r14),%xmm0
movups (%r14),%xmm1
movups %xmm0,-0x10(%rdx)
movups %xmm1,(%rdx)
movups -0x10(%r14,%r8,1),%xmm0
movups (%r14,%r8,1),%xmm1
movups %xmm0,-0x10(%rdx,%r12,1)
movups %xmm1,(%rdx,%r12,1)
add    $0x8,%r13
add    %rbp,%rdx
add    %r11,%r14
add    $0xfffffffffffffffe,%rbx
jne    1330 <c_dcopy+0x230>
jmp    153b <c_dcopy+0x43b>
lea    (%rsi,%r10,8),%rdx
cmp    %rcx,%rdx
jbe    1384 <c_dcopy+0x284>
lea    (%rcx,%r10,8),%rdx
cmp    %rsi,%rdx
jbe    1384 <c_dcopy+0x284>
xor    %ebx,%ebx
jmp    1460 <c_dcopy+0x360>
mov    %r10d,%ebx
and    $0x4,%ebx
lea    -0x4(%rbx),%rdx
mov    %rdx,%r11
shr    $0x2,%r11
add    $0x1,%r11
mov    %r11d,%r9d
and    $0x3,%r9d
cmp    $0xc,%rdx
jae    13aa <c_dcopy+0x2aa>
xor    %edx,%edx
jmp    1408 <c_dcopy+0x308>
and    $0xfffffffffffffffc,%r11
xor    %edx,%edx
movups (%rsi,%rdx,8),%xmm0
movups 0x10(%rsi,%rdx,8),%xmm1
movups %xmm0,(%rcx,%rdx,8)
movups %xmm1,0x10(%rcx,%rdx,8)
movups 0x20(%rsi,%rdx,8),%xmm0
movups 0x30(%rsi,%rdx,8),%xmm1
movups %xmm0,0x20(%rcx,%rdx,8)
movups %xmm1,0x30(%rcx,%rdx,8)
movups 0x40(%rsi,%rdx,8),%xmm0
movups 0x50(%rsi,%rdx,8),%xmm1
movups %xmm0,0x40(%rcx,%rdx,8)
movups %xmm1,0x50(%rcx,%rdx,8)
movups 0x60(%rsi,%rdx,8),%xmm0
movups 0x70(%rsi,%rdx,8),%xmm1
movups %xmm0,0x60(%rcx,%rdx,8)
movups %xmm1,0x70(%rcx,%rdx,8)
add    $0x10,%rdx
add    $0xfffffffffffffffc,%r11
jne    13b0 <c_dcopy+0x2b0>
test   %r9,%r9
je     144d <c_dcopy+0x34d>
lea    (%rcx,%rdx,8),%r11
add    $0x10,%r11
lea    (%rsi,%rdx,8),%rdx
add    $0x10,%rdx
shl    $0x5,%r9
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movups -0x10(%rdx,%rbp,1),%xmm0
movups (%rdx,%rbp,1),%xmm1
movups %xmm0,-0x10(%r11,%rbp,1)
movups %xmm1,(%r11,%rbp,1)
add    $0x20,%rbp
cmp    %rbp,%r9
jne    1430 <c_dcopy+0x330>
cmp    %r10,%rbx
je     1473 <c_dcopy+0x373>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rsi,%rbx,8),%xmm0
movsd  %xmm0,(%rcx,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r10
jne    1460 <c_dcopy+0x360>
cmp    $0x7,%edi
jl     152d <c_dcopy+0x42d>
cmp    %edi,%r8d
jge    152d <c_dcopy+0x42d>
imul   $0x24924925,%rax,%rbp
shr    $0x20,%rbp
mov    %edi,%edx
sub    %ebp,%edx
shr    %edx
add    %ebp,%edx
shr    $0x2,%edx
lea    0x0(,%rdx,8),%rbp
mov    %rdx,%rbx
sub    %rbp,%rbx
lea    (%rcx,%rbx,8),%rcx
add    $0x30,%rcx
lea    (%rsi,%rbx,8),%rsi
add    $0x30,%rsi
lea    0x0(,%rdx,8),%ebp
sub    %ebp,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  -0x30(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x30(%rcx,%rax,8)
movsd  -0x28(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x28(%rcx,%rax,8)
movsd  -0x20(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x20(%rcx,%rax,8)
movsd  -0x18(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x18(%rcx,%rax,8)
movsd  -0x10(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x10(%rcx,%rax,8)
movsd  -0x8(%rsi,%rax,8),%xmm0
movsd  %xmm0,-0x8(%rcx,%rax,8)
movsd  (%rsi,%rax,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    $0x7,%rax
lea    (%rdx,%rax,1),%ebp
cmp    %edi,%ebp
jl     14d0 <c_dcopy+0x3d0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r13d,%r13d
testb  $0x1,-0x18(%rsp)
je     1567 <c_dcopy+0x467>
mov    %r13,%rdx
imul   %r15,%rdx
add    %r10,%rdx
imul   %r9,%r13
add    %rax,%r13
movups (%rsi,%r13,8),%xmm0
movups 0x10(%rsi,%r13,8),%xmm1
movups %xmm0,(%rcx,%rdx,8)
movups %xmm1,0x10(%rcx,%rdx,8)
mov    -0x8(%rsp),%r11
cmp    %r11,-0x10(%rsp)
je     152d <c_dcopy+0x42d>
mov    %r11,%rdx
imul   %r15,%rdx
mov    %r11,%rbp
imul   %r9,%rbp
add    %rdx,%r10
add    %rbp,%rax
jmp    119c <c_dcopy+0x9c>

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

LLVM IR (-O2):
define void @c_dcopy(i32 %0, double* nocapture %1, i32 %2, double* nocapture writeonly %3, i32 %4) {
%6 = icmp slt i32 %0, 1
br i1 %6, label %306, label %7
7: ; preds = %5
%8 = icmp eq i32 %2, 1
%9 = icmp eq i32 %4, 1
%10 = and i1 %8, %9
br i1 %10, label %11, label %150
11: ; preds = %7
%12 = urem i32 %0, 7
%13 = icmp eq i32 %12, 0
br i1 %13, label %115, label %14
14: ; preds = %11
%15 = zext i32 %12 to i64
%16 = icmp ult i32 %12, 4
br i1 %16, label %102, label %17
17: ; preds = %14
%18 = getelementptr double, double* %3, i64 %15
%19 = getelementptr double, double* %1, i64 %15
%20 = icmp ugt double* %19, %3
%21 = icmp ugt double* %18, %1
%22 = and i1 %20, %21
br i1 %22, label %102, label %23
23: ; preds = %17
%24 = and i64 %15, 4
%25 = add nsw i64 %24, -4
%26 = lshr exact i64 %25, 2
%27 = add nuw nsw i64 %26, 1
%28 = and i64 %27, 3
%29 = icmp ult i64 %25, 12
br i1 %29, label %81, label %30
30: ; preds = %23
%31 = and i64 %27, 9223372036854775804
br label %32
32: ; preds = %32, %30
%33 = phi i64 [ 0, %30 ], [ %78, %32 ]
%34 = phi i64 [ 0, %30 ], [ %79, %32 ]
%35 = getelementptr inbounds double, double* %1, i64 %33
%36 = bitcast double* %35 to <2 x double>*
%37 = load <2 x double>, <2 x double>* %36
%38 = getelementptr inbounds double, double* %35, i64 2
%39 = bitcast double* %38 to <2 x double>*
%40 = load <2 x double>, <2 x double>* %39
%41 = getelementptr inbounds double, double* %3, i64 %33
%42 = bitcast double* %41 to <2 x double>*
store <2 x double> %37, <2 x double>* %42
%43 = getelementptr inbounds double, double* %41, i64 2
%44 = bitcast double* %43 to <2 x double>*
store <2 x double> %40, <2 x double>* %44
%45 = or i64 %33, 4
%46 = getelementptr inbounds double, double* %1, i64 %45
%47 = bitcast double* %46 to <2 x double>*
%48 = load <2 x double>, <2 x double>* %47
%49 = getelementptr inbounds double, double* %46, i64 2
%50 = bitcast double* %49 to <2 x double>*
%51 = load <2 x double>, <2 x double>* %50
%52 = getelementptr inbounds double, double* %3, i64 %45
%53 = bitcast double* %52 to <2 x double>*
store <2 x double> %48, <2 x double>* %53
%54 = getelementptr inbounds double, double* %52, i64 2
%55 = bitcast double* %54 to <2 x double>*
store <2 x double> %51, <2 x double>* %55
%56 = or i64 %33, 8
%57 = getelementptr inbounds double, double* %1, i64 %56
%58 = bitcast double* %57 to <2 x double>*
%59 = load <2 x double>, <2 x double>* %58
%60 = getelementptr inbounds double, double* %57, i64 2
%61 = bitcast double* %60 to <2 x double>*
%62 = load <2 x double>, <2 x double>* %61
%63 = getelementptr inbounds double, double* %3, i64 %56
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %59, <2 x double>* %64
%65 = getelementptr inbounds double, double* %63, i64 2
%66 = bitcast double* %65 to <2 x double>*
store <2 x double> %62, <2 x double>* %66
%67 = or i64 %33, 12
%68 = getelementptr inbounds double, double* %1, i64 %67
%69 = bitcast double* %68 to <2 x double>*
%70 = load <2 x double>, <2 x double>* %69
%71 = getelementptr inbounds double, double* %68, i64 2
%72 = bitcast double* %71 to <2 x double>*
%73 = load <2 x double>, <2 x double>* %72
%74 = getelementptr inbounds double, double* %3, i64 %67
%75 = bitcast double* %74 to <2 x double>*
store <2 x double> %70, <2 x double>* %75
%76 = getelementptr inbounds double, double* %74, i64 2
%77 = bitcast double* %76 to <2 x double>*
store <2 x double> %73, <2 x double>* %77
%78 = add nuw i64 %33, 16
%79 = add nuw i64 %34, 4
%80 = icmp eq i64 %79, %31
br i1 %80, label %81, label %32
81: ; preds = %32, %23
%82 = phi i64 [ 0, %23 ], [ %78, %32 ]
%83 = icmp eq i64 %28, 0
br i1 %83, label %100, label %84
84: ; preds = %81, %84
%85 = phi i64 [ %97, %84 ], [ %82, %81 ]
%86 = phi i64 [ %98, %84 ], [ 0, %81 ]
%87 = getelementptr inbounds double, double* %1, i64 %85
%88 = bitcast double* %87 to <2 x double>*
%89 = load <2 x double>, <2 x double>* %88
%90 = getelementptr inbounds double, double* %87, i64 2
%91 = bitcast double* %90 to <2 x double>*
%92 = load <2 x double>, <2 x double>* %91
%93 = getelementptr inbounds double, double* %3, i64 %85
%94 = bitcast double* %93 to <2 x double>*
store <2 x double> %89, <2 x double>* %94
%95 = getelementptr inbounds double, double* %93, i64 2
%96 = bitcast double* %95 to <2 x double>*
store <2 x double> %92, <2 x double>* %96
%97 = add nuw i64 %85, 4
%98 = add i64 %86, 1
%99 = icmp eq i64 %98, %28
br i1 %99, label %100, label %84
100: ; preds = %84, %81
%101 = icmp eq i64 %24, %15
br i1 %101, label %111, label %102
102: ; preds = %17, %14, %100
%103 = phi i64 [ 0, %17 ], [ 0, %14 ], [ %24, %100 ]
br label %104
104: ; preds = %102, %104
%105 = phi i64 [ %109, %104 ], [ %103, %102 ]
%106 = getelementptr inbounds double, double* %1, i64 %105
%107 = load double, double* %106
%108 = getelementptr inbounds double, double* %3, i64 %105
store double %107, double* %108
%109 = add nuw nsw i64 %105, 1
%110 = icmp eq i64 %109, %15
br i1 %110, label %111, label %104
111: ; preds = %104, %100
%112 = icmp sgt i32 %0, 6
%113 = icmp slt i32 %12, %0
%114 = and i1 %112, %113
br i1 %114, label %115, label %306
115: ; preds = %11, %111
%116 = urem i32 %0, 7
%117 = zext i32 %116 to i64
br label %118
118: ; preds = %115, %118
%119 = phi i64 [ %117, %115 ], [ %147, %118 ]
%120 = getelementptr inbounds double, double* %1, i64 %119
%121 = load double, double* %120
%122 = getelementptr inbounds double, double* %3, i64 %119
store double %121, double* %122
%123 = add nuw nsw i64 %119, 1
%124 = getelementptr inbounds double, double* %1, i64 %123
%125 = load double, double* %124
%126 = getelementptr inbounds double, double* %3, i64 %123
store double %125, double* %126
%127 = add nuw nsw i64 %119, 2
%128 = getelementptr inbounds double, double* %1, i64 %127
%129 = load double, double* %128
%130 = getelementptr inbounds double, double* %3, i64 %127
store double %129, double* %130
%131 = add nuw nsw i64 %119, 3
%132 = getelementptr inbounds double, double* %1, i64 %131
%133 = load double, double* %132
%134 = getelementptr inbounds double, double* %3, i64 %131
store double %133, double* %134
%135 = add nuw nsw i64 %119, 4
%136 = getelementptr inbounds double, double* %1, i64 %135
%137 = load double, double* %136
%138 = getelementptr inbounds double, double* %3, i64 %135
store double %137, double* %138
%139 = add nuw nsw i64 %119, 5
%140 = getelementptr inbounds double, double* %1, i64 %139
%141 = load double, double* %140
%142 = getelementptr inbounds double, double* %3, i64 %139
store double %141, double* %142
%143 = add nuw nsw i64 %119, 6
%144 = getelementptr inbounds double, double* %1, i64 %143
%145 = load double, double* %144
%146 = getelementptr inbounds double, double* %3, i64 %143
store double %145, double* %146
%147 = add nuw nsw i64 %119, 7
%148 = trunc i64 %147 to i32
%149 = icmp slt i32 %148, %0
br i1 %149, label %118, label %306
150: ; preds = %7
%151 = sub nsw i32 1, %0
%152 = icmp slt i32 %4, 0
%153 = mul nsw i32 %151, %4
%154 = select i1 %152, i32 %153, i32 0
%155 = icmp slt i32 %2, 0
%156 = mul nsw i32 %151, %2
%157 = select i1 %155, i32 %156, i32 0
%158 = sext i32 %157 to i64
%159 = sext i32 %2 to i64
%160 = sext i32 %154 to i64
%161 = sext i32 %4 to i64
%162 = add i32 %0, -1
%163 = zext i32 %162 to i64
%164 = add nuw nsw i64 %163, 1
%165 = icmp ult i32 %162, 3
br i1 %165, label %253, label %166
166: ; preds = %150
%167 = icmp ne i32 %4, 1
%168 = icmp ne i32 %2, 1
%169 = or i1 %167, %168
br i1 %169, label %253, label %170
170: ; preds = %166
%171 = getelementptr double, double* %3, i64 %160
%172 = add i32 %0, -1
%173 = zext i32 %172 to i64
%174 = add nsw i64 %160, %173
%175 = add nsw i64 %174, 1
%176 = getelementptr double, double* %3, i64 %175
%177 = getelementptr double, double* %1, i64 %158
%178 = add nsw i64 %158, %173
%179 = add nsw i64 %178, 1
%180 = getelementptr double, double* %1, i64 %179
%181 = icmp ult double* %171, %180
%182 = icmp ult double* %177, %176
%183 = and i1 %181, %182
br i1 %183, label %253, label %184
184: ; preds = %170
%185 = and i64 %164, 8589934588
%186 = mul i64 %185, %161
%187 = add i64 %186, %160
%188 = mul i64 %185, %159
%189 = add i64 %188, %158
%190 = trunc i64 %185 to i32
%191 = add nsw i64 %185, -4
%192 = lshr exact i64 %191, 2
%193 = add nuw nsw i64 %192, 1
%194 = and i64 %193, 1
%195 = icmp eq i64 %191, 0
br i1 %195, label %233, label %196
196: ; preds = %184
%197 = and i64 %193, 9223372036854775806
br label %198
198: ; preds = %198, %196
%199 = phi i64 [ 0, %196 ], [ %230, %198 ]
%200 = phi i64 [ 0, %196 ], [ %231, %198 ]
%201 = mul i64 %199, %161
%202 = add i64 %201, %160
%203 = mul i64 %199, %159
%204 = add i64 %203, %158
%205 = getelementptr inbounds double, double* %1, i64 %204
%206 = bitcast double* %205 to <2 x double>*
%207 = load <2 x double>, <2 x double>* %206
%208 = getelementptr inbounds double, double* %205, i64 2
%209 = bitcast double* %208 to <2 x double>*
%210 = load <2 x double>, <2 x double>* %209
%211 = getelementptr inbounds double, double* %3, i64 %202
%212 = bitcast double* %211 to <2 x double>*
store <2 x double> %207, <2 x double>* %212
%213 = getelementptr inbounds double, double* %211, i64 2
%214 = bitcast double* %213 to <2 x double>*
store <2 x double> %210, <2 x double>* %214
%215 = or i64 %199, 4
%216 = mul i64 %215, %161
%217 = add i64 %216, %160
%218 = mul i64 %215, %159
%219 = add i64 %218, %158
%220 = getelementptr inbounds double, double* %1, i64 %219
%221 = bitcast double* %220 to <2 x double>*
%222 = load <2 x double>, <2 x double>* %221
%223 = getelementptr inbounds double, double* %220, i64 2
%224 = bitcast double* %223 to <2 x double>*
%225 = load <2 x double>, <2 x double>* %224
%226 = getelementptr inbounds double, double* %3, i64 %217
%227 = bitcast double* %226 to <2 x double>*
store <2 x double> %222, <2 x double>* %227
%228 = getelementptr inbounds double, double* %226, i64 2
%229 = bitcast double* %228 to <2 x double>*
store <2 x double> %225, <2 x double>* %229
%230 = add nuw i64 %199, 8
%231 = add i64 %200, 2
%232 = icmp eq i64 %231, %197
br i1 %232, label %233, label %198
233: ; preds = %198, %184
%234 = phi i64 [ 0, %184 ], [ %230, %198 ]
%235 = icmp eq i64 %194, 0
br i1 %235, label %251, label %236
236: ; preds = %233
%237 = mul i64 %234, %161
%238 = add i64 %237, %160
%239 = mul i64 %234, %159
%240 = add i64 %239, %158
%241 = getelementptr inbounds double, double* %1, i64 %240
%242 = bitcast double* %241 to <2 x double>*
%243 = load <2 x double>, <2 x double>* %242
%244 = getelementptr inbounds double, double* %241, i64 2
%245 = bitcast double* %244 to <2 x double>*
%246 = load <2 x double>, <2 x double>* %245
%247 = getelementptr inbounds double, double* %3, i64 %238
%248 = bitcast double* %247 to <2 x double>*
store <2 x double> %243, <2 x double>* %248
%249 = getelementptr inbounds double, double* %247, i64 2
%250 = bitcast double* %249 to <2 x double>*
store <2 x double> %246, <2 x double>* %250
br label %251
251: ; preds = %233, %236
%252 = icmp eq i64 %164, %185
br i1 %252, label %306, label %253
253: ; preds = %170, %166, %150, %251
%254 = phi i64 [ %160, %170 ], [ %160, %166 ], [ %160, %150 ], [ %187, %251 ]
%255 = phi i64 [ %158, %170 ], [ %158, %166 ], [ %158, %150 ], [ %189, %251 ]
%256 = phi i32 [ 0, %170 ], [ 0, %166 ], [ 0, %150 ], [ %190, %251 ]
%257 = sub i32 %0, %256
%258 = xor i32 %256, -1
%259 = add i32 %258, %0
%260 = and i32 %257, 3
%261 = icmp eq i32 %260, 0
br i1 %261, label %275, label %262
262: ; preds = %253, %262
%263 = phi i64 [ %271, %262 ], [ %254, %253 ]
%264 = phi i64 [ %270, %262 ], [ %255, %253 ]
%265 = phi i32 [ %272, %262 ], [ %256, %253 ]
%266 = phi i32 [ %273, %262 ], [ 0, %253 ]
%267 = getelementptr inbounds double, double* %1, i64 %264
%268 = load double, double* %267
%269 = getelementptr inbounds double, double* %3, i64 %263
store double %268, double* %269
%270 = add i64 %264, %159
%271 = add i64 %263, %161
%272 = add nuw nsw i32 %265, 1
%273 = add i32 %266, 1
%274 = icmp eq i32 %273, %260
br i1 %274, label %275, label %262
275: ; preds = %262, %253
%276 = phi i64 [ %254, %253 ], [ %271, %262 ]
%277 = phi i64 [ %255, %253 ], [ %270, %262 ]
%278 = phi i32 [ %256, %253 ], [ %272, %262 ]
%279 = icmp ult i32 %259, 3
br i1 %279, label %306, label %280
280: ; preds = %275, %280
%281 = phi i64 [ %303, %280 ], [ %276, %275 ]
%282 = phi i64 [ %302, %280 ], [ %277, %275 ]
%283 = phi i32 [ %304, %280 ], [ %278, %275 ]
%284 = getelementptr inbounds double, double* %1, i64 %282
%285 = load double, double* %284
%286 = getelementptr inbounds double, double* %3, i64 %281
store double %285, double* %286
%287 = add i64 %282, %159
%288 = add i64 %281, %161
%289 = getelementptr inbounds double, double* %1, i64 %287
%290 = load double, double* %289
%291 = getelementptr inbounds double, double* %3, i64 %288
store double %290, double* %291
%292 = add i64 %287, %159
%293 = add i64 %288, %161
%294 = getelementptr inbounds double, double* %1, i64 %292
%295 = load double, double* %294
%296 = getelementptr inbounds double, double* %3, i64 %293
store double %295, double* %296
%297 = add i64 %292, %159
%298 = add i64 %293, %161
%299 = getelementptr inbounds double, double* %1, i64 %297
%300 = load double, double* %299
%301 = getelementptr inbounds double, double* %3, i64 %298
store double %300, double* %301
%302 = add i64 %297, %159
%303 = add i64 %298, %161
%304 = add nuw nsw i32 %283, 4
%305 = icmp eq i32 %304, %0
br i1 %305, label %306, label %280
306: ; preds = %275, %280, %118, %251, %111, %5
ret void
}