void kernel_dtrtr_u_4_lib4(int kmax, double *A, double *C, int sdc) {
  const int bs = 4;
  int k;
  C[0 + bs * 0] = A[0 + bs * 0];
  C[1 + bs * 0] = A[0 + bs * 1];
  C[1 + bs * 1] = A[1 + bs * 1];
  C[2 + bs * 0] = A[0 + bs * 2];
  C[2 + bs * 1] = A[1 + bs * 2];
  C[2 + bs * 2] = A[2 + bs * 2];
  C[3 + bs * 0] = A[0 + bs * 3];
  C[3 + bs * 1] = A[1 + bs * 3];
  C[3 + bs * 2] = A[2 + bs * 3];
  C[3 + bs * 3] = A[3 + bs * 3];
  C += bs * sdc;
  A += bs * bs;
  k = 4;
  for (; k < kmax - 3; k += 4) {
    C[0 + bs * 0] = A[0 + bs * 0];
    C[0 + bs * 1] = A[1 + bs * 0];
    C[0 + bs * 2] = A[2 + bs * 0];
    C[0 + bs * 3] = A[3 + bs * 0];
    C[1 + bs * 0] = A[0 + bs * 1];
    C[1 + bs * 1] = A[1 + bs * 1];
    C[1 + bs * 2] = A[2 + bs * 1];
    C[1 + bs * 3] = A[3 + bs * 1];
    C[2 + bs * 0] = A[0 + bs * 2];
    C[2 + bs * 1] = A[1 + bs * 2];
    C[2 + bs * 2] = A[2 + bs * 2];
    C[2 + bs * 3] = A[3 + bs * 2];
    C[3 + bs * 0] = A[0 + bs * 3];
    C[3 + bs * 1] = A[1 + bs * 3];
    C[3 + bs * 2] = A[2 + bs * 3];
    C[3 + bs * 3] = A[3 + bs * 3];
    C += bs * sdc;
    A += bs * bs;
  }
  for (; k < kmax; k++) {
    C[0 + bs * 0] = A[0 + bs * 0];
    C[0 + bs * 1] = A[1 + bs * 0];
    C[0 + bs * 2] = A[2 + bs * 0];
    C[0 + bs * 3] = A[3 + bs * 0];
    C += 1;
    A += bs;
  }
}


x86 assembly (clang, -O0):
<kernel_dtrtr_u_4_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x10(%rbp),%rax
movsd  0x70(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x10(%rbp),%rax
movsd  0x78(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x78(%rax)
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    135b <kernel_dtrtr_u_4_lib4+0x25b>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x48(%rax)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x68(%rax)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x10(%rbp),%rax
movsd  0x50(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x50(%rax)
mov    -0x10(%rbp),%rax
movsd  0x58(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x70(%rax)
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x10(%rbp),%rax
movsd  0x70(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x58(%rax)
mov    -0x10(%rbp),%rax
movsd  0x78(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x78(%rax)
mov    -0x1c(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x24(%rbp)
jmp    11f8 <kernel_dtrtr_u_4_lib4+0xf8>
jmp    1360 <kernel_dtrtr_u_4_lib4+0x260>
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    13d8 <kernel_dtrtr_u_4_lib4+0x2d8>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1360 <kernel_dtrtr_u_4_lib4+0x260>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dtrtr_u_4_lib4>:
push   %rbx
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x20(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x28(%rsi),%xmm0
movsd  %xmm0,0x28(%rdx)
movsd  0x40(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
movsd  0x48(%rsi),%xmm0
movsd  %xmm0,0x30(%rdx)
movsd  0x50(%rsi),%xmm0
movsd  %xmm0,0x50(%rdx)
movsd  0x60(%rsi),%xmm0
movsd  %xmm0,0x18(%rdx)
movsd  0x68(%rsi),%xmm0
movsd  %xmm0,0x38(%rdx)
movsd  0x70(%rsi),%xmm0
movsd  %xmm0,0x58(%rdx)
movsd  0x78(%rsi),%xmm0
movsd  %xmm0,0x78(%rdx)
shl    $0x2,%ecx
movslq %ecx,%rcx
sub    $0xffffffffffffff80,%rsi
lea    (%rdx,%rcx,8),%rax
mov    $0x4,%r9d
cmp    $0x8,%edi
jl     1247 <kernel_dtrtr_u_4_lib4+0x147>
lea    -0x3(%rdi),%edx
shl    $0x3,%rcx
mov    $0x4,%ebx
nopl   0x0(%rax)
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rax)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x20(%rax)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x40(%rax)
movsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x60(%rax)
movsd  0x20(%rsi),%xmm0
movsd  %xmm0,0x8(%rax)
movsd  0x28(%rsi),%xmm0
movsd  %xmm0,0x28(%rax)
movsd  0x30(%rsi),%xmm0
movsd  %xmm0,0x48(%rax)
movsd  0x38(%rsi),%xmm0
movsd  %xmm0,0x68(%rax)
movsd  0x40(%rsi),%xmm0
movsd  %xmm0,0x10(%rax)
movsd  0x48(%rsi),%xmm0
movsd  %xmm0,0x30(%rax)
movsd  0x50(%rsi),%xmm0
movsd  %xmm0,0x50(%rax)
movsd  0x58(%rsi),%xmm0
movsd  %xmm0,0x70(%rax)
movsd  0x60(%rsi),%xmm0
movsd  %xmm0,0x18(%rax)
movsd  0x68(%rsi),%xmm0
movsd  %xmm0,0x38(%rax)
movsd  0x70(%rsi),%xmm0
movsd  %xmm0,0x58(%rax)
movsd  0x78(%rsi),%xmm0
movsd  %xmm0,0x78(%rax)
add    $0x4,%ebx
sub    $0xffffffffffffff80,%rsi
add    %rcx,%rax
cmp    %edx,%ebx
jl     1190 <kernel_dtrtr_u_4_lib4+0x90>
mov    %edi,%r9d
and    $0xfffffffc,%r9d
cmp    %edi,%r9d
jge    1452 <kernel_dtrtr_u_4_lib4+0x352>
mov    %r9d,%r11d
not    %r11d
add    %edi,%r11d
je     139d <kernel_dtrtr_u_4_lib4+0x29d>
mov    %r11,%rcx
shl    $0x5,%rcx
add    %rsi,%rcx
add    $0x20,%rcx
cmp    %rcx,%rax
jae    1283 <kernel_dtrtr_u_4_lib4+0x183>
lea    (%rax,%r11,8),%rcx
add    $0x68,%rcx
cmp    %rcx,%rsi
jb     139d <kernel_dtrtr_u_4_lib4+0x29d>
add    $0x1,%r11
mov    %r11,%r8
and    $0xfffffffffffffffe,%r8
lea    -0x2(%r8),%rcx
mov    %rcx,%r10
shr    %r10
add    $0x1,%r10
test   %rcx,%rcx
je     1454 <kernel_dtrtr_u_4_lib4+0x354>
mov    %r10,%rdx
and    $0xfffffffffffffffe,%rdx
lea    0x40(%rsi),%rbx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movups -0x40(%rbx),%xmm0
movups -0x30(%rbx),%xmm1
movups -0x20(%rbx),%xmm2
movups -0x10(%rbx),%xmm3
movaps %xmm0,%xmm4
movlhps %xmm2,%xmm4
unpckhpd %xmm2,%xmm0
movaps %xmm1,%xmm2
movlhps %xmm3,%xmm2
unpckhpd %xmm3,%xmm1
movups %xmm4,(%rax,%rcx,8)
movups %xmm0,0x20(%rax,%rcx,8)
movups %xmm2,0x40(%rax,%rcx,8)
movups %xmm1,0x60(%rax,%rcx,8)
movups (%rbx),%xmm0
movups 0x10(%rbx),%xmm1
movups 0x20(%rbx),%xmm2
movups 0x30(%rbx),%xmm3
movaps %xmm0,%xmm4
movlhps %xmm2,%xmm4
unpckhpd %xmm2,%xmm0
movaps %xmm1,%xmm2
movlhps %xmm3,%xmm2
unpckhpd %xmm3,%xmm1
movups %xmm4,0x10(%rax,%rcx,8)
movups %xmm0,0x30(%rax,%rcx,8)
movups %xmm2,0x50(%rax,%rcx,8)
movups %xmm1,0x70(%rax,%rcx,8)
add    $0x4,%rcx
sub    $0xffffffffffffff80,%rbx
add    $0xfffffffffffffffe,%rdx
jne    12c0 <kernel_dtrtr_u_4_lib4+0x1c0>
test   $0x1,%r10b
je     1383 <kernel_dtrtr_u_4_lib4+0x283>
mov    %rcx,%rdx
shl    $0x5,%rdx
movups (%rsi,%rdx,1),%xmm0
movups 0x10(%rsi,%rdx,1),%xmm1
movups 0x20(%rsi,%rdx,1),%xmm2
movups 0x30(%rsi,%rdx,1),%xmm3
movaps %xmm0,%xmm4
movlhps %xmm2,%xmm4
unpckhpd %xmm2,%xmm0
movaps %xmm1,%xmm2
movlhps %xmm3,%xmm2
unpckhpd %xmm3,%xmm1
movups %xmm4,(%rax,%rcx,8)
movups %xmm0,0x20(%rax,%rcx,8)
movups %xmm2,0x40(%rax,%rcx,8)
movups %xmm1,0x60(%rax,%rcx,8)
cmp    %r8,%r11
je     1452 <kernel_dtrtr_u_4_lib4+0x352>
lea    (%rax,%r8,8),%rax
mov    %r8,%rcx
shl    $0x5,%rcx
add    %r8d,%r9d
add    %rcx,%rsi
mov    %edi,%edx
sub    %r9d,%edx
mov    %r9d,%ecx
not    %ecx
test   $0x1,%dl
je     13de <kernel_dtrtr_u_4_lib4+0x2de>
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rax)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x20(%rax)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x40(%rax)
movsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x60(%rax)
add    $0x8,%rax
add    $0x20,%rsi
add    $0x1,%r9d
add    %edi,%ecx
je     1452 <kernel_dtrtr_u_4_lib4+0x352>
sub    %r9d,%edi
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
movsd  (%rsi),%xmm0
movsd  %xmm0,(%rax,%rcx,8)
movsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x20(%rax,%rcx,8)
movsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x40(%rax,%rcx,8)
movsd  0x18(%rsi),%xmm0
movsd  %xmm0,0x60(%rax,%rcx,8)
movsd  0x20(%rsi),%xmm0
movsd  %xmm0,0x8(%rax,%rcx,8)
movsd  0x28(%rsi),%xmm0
movsd  %xmm0,0x28(%rax,%rcx,8)
movsd  0x30(%rsi),%xmm0
movsd  %xmm0,0x48(%rax,%rcx,8)
movsd  0x38(%rsi),%xmm0
movsd  %xmm0,0x68(%rax,%rcx,8)
add    $0x2,%rcx
add    $0x40,%rsi
cmp    %ecx,%edi
jne    13f0 <kernel_dtrtr_u_4_lib4+0x2f0>
pop    %rbx
ret
xor    %ecx,%ecx
test   $0x1,%r10b
jne    1342 <kernel_dtrtr_u_4_lib4+0x242>
jmp    1383 <kernel_dtrtr_u_4_lib4+0x283>

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

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