void my_dcopy(int n, const double *dx, int incx, double *dy, int incy) {
  int i, ix, iy;
  int m;
  if (n <= 0)
    return;
  if (incx != 1 || incy != 1) {
    ix = 1;
    iy = 1;
    if (incx < 0)
      ix = (-n + 1) * incx + 1;
    if (incy < 0)
      iy = (-n + 1) * incy + 1;
    for (i = 0; i < n; i++) {
      dy[iy] = dx[ix];
      ix = ix + incx;
      iy = iy + incy;
    }
  } else {
    m = n % 7;
    if (m != 0) {
      for (i = 0; i < m; i++)
        dy[i] = dx[i];
      if (n < 7)
        return;
    }
    for (i = m; i < n; i += 7) {
      dy[i] = dx[i];
      dy[i + 1] = dx[i + 1];
      dy[i + 2] = dx[i + 2];
      dy[i + 3] = dx[i + 3];
      dy[i + 4] = dx[i + 4];
      dy[i + 5] = dx[i + 5];
      dy[i + 6] = dx[i + 6];
    }
  }
}


x86 assembly (clang, -O0):
<my_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 <my_dcopy+0x25>
jmp    134f <my_dcopy+0x24f>
cmpl   $0x1,-0x14(%rbp)
jne    1139 <my_dcopy+0x39>
cmpl   $0x1,-0x24(%rbp)
je     11d1 <my_dcopy+0xd1>
movl   $0x1,-0x2c(%rbp)
movl   $0x1,-0x30(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1163 <my_dcopy+0x63>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
imul   -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x24(%rbp)
jge    117f <my_dcopy+0x7f>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
imul   -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    11cc <my_dcopy+0xcc>
mov    -0x10(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x30(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x2c(%rbp),%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x30(%rbp),%eax
add    -0x24(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1186 <my_dcopy+0x86>
jmp    134f <my_dcopy+0x24f>
mov    -0x4(%rbp),%eax
mov    $0x7,%ecx
cltd
idiv   %ecx
mov    %edx,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     1238 <my_dcopy+0x138>
movl   $0x0,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x34(%rbp),%eax
jge    1224 <my_dcopy+0x124>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    11f0 <my_dcopy+0xf0>
cmpl   $0x7,-0x4(%rbp)
jge    1233 <my_dcopy+0x133>
jmp    134f <my_dcopy+0x24f>
jmp    1238 <my_dcopy+0x138>
mov    -0x34(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    134a <my_dcopy+0x24a>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x5,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x10(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x20(%rbp),%rax
mov    -0x28(%rbp),%ecx
add    $0x6,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x28(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x28(%rbp)
jmp    123e <my_dcopy+0x13e>
jmp    134f <my_dcopy+0x24f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_dcopy>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
test   %edi,%edi
jle    152d <my_dcopy+0x42d>
cmp    $0x1,%edx
jne    1162 <my_dcopy+0x62>
cmp    $0x1,%r8d
jne    1162 <my_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 <my_dcopy+0x385>
mov    %r8d,%r10d
cmp    $0x4,%r8d
jae    136b <my_dcopy+0x26b>
xor    %ebx,%ebx
jmp    1460 <my_dcopy+0x360>
mov    $0x1,%eax
mov    $0x1,%ebp
sub    %edi,%ebp
mov    %ebp,%ebx
imul   %r8d,%ebx
add    $0x1,%ebx
test   %r8d,%r8d
cmovns %eax,%ebx
imul   %edx,%ebp
add    $0x1,%ebp
test   %edx,%edx
cmovns %eax,%ebp
movslq %ebx,%rax
movslq %r8d,%r9
movslq %ebp,%r10
movslq %edx,%r15
lea    -0x1(%rdi),%ebx
xor    %r11d,%r11d
cmp    $0x3,%ebx
jae    126e <my_dcopy+0x16e>
mov    %edi,%ebp
sub    %r11d,%ebp
mov    %r11d,%edx
not    %edx
add    %edi,%edx
and    $0x3,%ebp
je     11db <my_dcopy+0xdb>
neg    %ebp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  (%rsi,%r10,8),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
add    %r15,%r10
add    %r9,%rax
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jne    11c0 <my_dcopy+0xc0>
sub    %ebx,%r11d
cmp    $0x3,%edx
jb     152d <my_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    (%rcx,%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    (%rcx,%rax,8),%rax
sub    %r11d,%edi
nop
movsd  (%rsi,%r8,1),%xmm0
movsd  %xmm0,(%rbx)
movsd  (%rsi,%r10,8),%xmm0
movsd  %xmm0,(%rax)
movsd  (%rsi,%r13,1),%xmm0
movsd  %xmm0,(%rbx,%r9,1)
movsd  (%rsi,%r14,1),%xmm0
movsd  %xmm0,(%rbx,%rbp,1)
add    %r12,%rsi
add    %rdx,%rbx
add    %rdx,%rax
add    $0xfffffffc,%edi
jne    1230 <my_dcopy+0x130>
jmp    152d <my_dcopy+0x42d>
cmp    $0x1,%r8d
jne    11a3 <my_dcopy+0xa3>
cmp    $0x1,%edx
jne    11a3 <my_dcopy+0xa3>
lea    (%rcx,%rax,8),%rdx
lea    (%r10,%rbx,1),%rbp
lea    (%rsi,%rbp,8),%rbp
add    $0x8,%rbp
cmp    %rbp,%rdx
jae    12af <my_dcopy+0x1af>
lea    (%rax,%rbx,1),%rdx
lea    (%rcx,%rdx,8),%rdx
add    $0x8,%rdx
lea    (%rsi,%r10,8),%rbp
cmp    %rdx,%rbp
jb     11a3 <my_dcopy+0xa3>
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 <my_dcopy+0x438>
movabs $0x7ffffffffffffffc,%rbx
ff ff 7f
or     $0x2,%rbx
and    %rbp,%rbx
mov    %r15,%r12
shl    $0x5,%r12
lea    (%rsi,%r10,8),%rdx
add    $0x10,%rdx
mov    %r15,%rbp
shl    $0x6,%rbp
mov    %r9,%r8
shl    $0x5,%r8
lea    (%rcx,%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(%rdx),%xmm0
movups (%rdx),%xmm1
movups %xmm0,-0x10(%r14)
movups %xmm1,(%r14)
movups -0x10(%rdx,%r12,1),%xmm0
movups (%rdx,%r12,1),%xmm1
movups %xmm0,-0x10(%r14,%r8,1)
movups %xmm1,(%r14,%r8,1)
add    $0x8,%r13
add    %rbp,%rdx
add    %r11,%r14
add    $0xfffffffffffffffe,%rbx
jne    1330 <my_dcopy+0x230>
jmp    153b <my_dcopy+0x43b>
lea    (%rsi,%r10,8),%rdx
cmp    %rcx,%rdx
jbe    1384 <my_dcopy+0x284>
lea    (%rcx,%r10,8),%rdx
cmp    %rsi,%rdx
jbe    1384 <my_dcopy+0x284>
xor    %ebx,%ebx
jmp    1460 <my_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 <my_dcopy+0x2aa>
xor    %edx,%edx
jmp    1408 <my_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 <my_dcopy+0x2b0>
test   %r9,%r9
je     144d <my_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 <my_dcopy+0x330>
cmp    %r10,%rbx
je     1473 <my_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 <my_dcopy+0x360>
cmp    $0x7,%edi
jl     152d <my_dcopy+0x42d>
cmp    %edi,%r8d
jge    152d <my_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 <my_dcopy+0x3d0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r13d,%r13d
testb  $0x1,-0x18(%rsp)
je     1567 <my_dcopy+0x467>
mov    %r13,%rdx
imul   %r15,%rdx
add    %r10,%rdx
imul   %r9,%r13
add    %rax,%r13
movups (%rsi,%rdx,8),%xmm0
movups 0x10(%rsi,%rdx,8),%xmm1
movups %xmm0,(%rcx,%r13,8)
movups %xmm1,0x10(%rcx,%r13,8)
mov    -0x8(%rsp),%r11
cmp    %r11,-0x10(%rsp)
je     152d <my_dcopy+0x42d>
mov    %r11,%rdx
imul   %r15,%rdx
mov    %r11,%rbp
imul   %r9,%rbp
add    %rdx,%r10
add    %rbp,%rax
jmp    11a3 <my_dcopy+0xa3>

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

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