void kernel_dgetr_3_lib4(int kmax, int kna, double *A, double *C, int sdc) {
  const int bs = 4;
  int k;
  k = 0;
  if (kna > 0) {
    for (; k < kna; 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 += 1;
      A += bs;
    }
    C += bs * (sdc - 1);
  }
  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[1 + bs * 0] = A[0 + bs * 1];
    C[1 + bs * 1] = A[1 + bs * 1];
    C[1 + bs * 2] = A[2 + 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 += 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 += 1;
    A += bs;
  }
}


x86 assembly (clang, -O0):
<kernel_dgetr_3_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    11b4 <kernel_dgetr_3_lib4+0xb4>
jmp    1133 <kernel_dgetr_3_lib4+0x33>
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1199 <kernel_dgetr_3_lib4+0x99>
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    -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    1133 <kernel_dgetr_3_lib4+0x33>
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x2,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x18(%rbp)
jmp    11b9 <kernel_dgetr_3_lib4+0xb9>
mov    -0x24(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    12d4 <kernel_dgetr_3_lib4+0x1d4>
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  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  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    -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    11b9 <kernel_dgetr_3_lib4+0xb9>
jmp    12d9 <kernel_dgetr_3_lib4+0x1d9>
mov    -0x24(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    133f <kernel_dgetr_3_lib4+0x23f>
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    -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    12d9 <kernel_dgetr_3_lib4+0x1d9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgetr_3_lib4>:
test   %esi,%esi
jle    1247 <kernel_dgetr_3_lib4+0x147>
lea    -0x1(%rsi),%r9d
xor    %r11d,%r11d
cmp    $0x2,%r9d
jb     11aa <kernel_dgetr_3_lib4+0xaa>
mov    %r9,%rax
shl    $0x5,%rax
add    %rdx,%rax
add    $0x18,%rax
cmp    %rcx,%rax
jbe    1139 <kernel_dgetr_3_lib4+0x39>
lea    (%rcx,%r9,8),%rax
add    $0x48,%rax
cmp    %rdx,%rax
ja     11aa <kernel_dgetr_3_lib4+0xaa>
add    $0x1,%r9
mov    %r9d,%eax
and    $0x1,%eax
test   %rax,%rax
mov    $0x2,%r10d
cmovne %rax,%r10
mov    %r9,%r11
sub    %r10,%r11
mov    %r11,%r9
shl    $0x5,%r9
add    %rdx,%r9
lea    (%rcx,%r11,8),%r10
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movups (%rdx),%xmm0
movups 0x10(%rdx),%xmm1
movups 0x20(%rdx),%xmm2
movaps %xmm0,%xmm3
movlhps %xmm2,%xmm3
unpckhpd %xmm2,%xmm0
movhps 0x30(%rdx),%xmm1
movups %xmm3,(%rcx,%rax,8)
movups %xmm0,0x20(%rcx,%rax,8)
movups %xmm1,0x40(%rcx,%rax,8)
add    $0x2,%rax
add    $0x40,%rdx
cmp    %rax,%r11
jne    1170 <kernel_dgetr_3_lib4+0x70>
mov    %r9,%rdx
mov    %r10,%rcx
mov    %esi,%eax
sub    %r11d,%eax
mov    %r11d,%r9d
not    %r9d
test   $0x1,%al
je     11e1 <kernel_dgetr_3_lib4+0xe1>
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rcx)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rcx)
add    $0x8,%rcx
add    $0x20,%rdx
add    $0x1,%r11d
add    %esi,%r9d
je     1237 <kernel_dgetr_3_lib4+0x137>
mov    %esi,%eax
sub    %r11d,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rcx)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rcx)
movsd  0x20(%rdx),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x28(%rdx),%xmm0
movsd  %xmm0,0x28(%rcx)
movsd  0x30(%rdx),%xmm0
movsd  %xmm0,0x48(%rcx)
add    $0x10,%rcx
add    $0x40,%rdx
add    $0xfffffffe,%eax
jne    11f0 <kernel_dgetr_3_lib4+0xf0>
lea    -0x4(,%r8,4),%eax
ff
cltq
lea    (%rcx,%rax,8),%rcx
jmp    1249 <kernel_dgetr_3_lib4+0x149>
xor    %esi,%esi
lea    -0x3(%rdi),%r9d
cmp    %r9d,%esi
jge    12f9 <kernel_dgetr_3_lib4+0x1f9>
shl    $0x2,%r8d
movslq %r8d,%rax
shl    $0x3,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rcx)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rcx)
movsd  0x20(%rdx),%xmm0
movsd  %xmm0,0x8(%rcx)
movsd  0x28(%rdx),%xmm0
movsd  %xmm0,0x28(%rcx)
movsd  0x30(%rdx),%xmm0
movsd  %xmm0,0x48(%rcx)
movsd  0x40(%rdx),%xmm0
movsd  %xmm0,0x10(%rcx)
movsd  0x48(%rdx),%xmm0
movsd  %xmm0,0x30(%rcx)
movsd  0x50(%rdx),%xmm0
movsd  %xmm0,0x50(%rcx)
movsd  0x60(%rdx),%xmm0
movsd  %xmm0,0x18(%rcx)
movsd  0x68(%rdx),%xmm0
movsd  %xmm0,0x38(%rcx)
movsd  0x70(%rdx),%xmm0
movsd  %xmm0,0x58(%rcx)
sub    $0xffffffffffffff80,%rdx
add    $0x4,%esi
add    %rax,%rcx
cmp    %r9d,%esi
jl     1270 <kernel_dgetr_3_lib4+0x170>
cmp    %edi,%esi
jge    143c <kernel_dgetr_3_lib4+0x33c>
mov    %esi,%r10d
not    %r10d
add    %edi,%r10d
cmp    $0x1,%r10d
jbe    13aa <kernel_dgetr_3_lib4+0x2aa>
mov    %r10,%rax
shl    $0x5,%rax
add    %rdx,%rax
add    $0x18,%rax
cmp    %rax,%rcx
jae    1334 <kernel_dgetr_3_lib4+0x234>
lea    (%rcx,%r10,8),%rax
add    $0x48,%rax
cmp    %rax,%rdx
jb     13aa <kernel_dgetr_3_lib4+0x2aa>
add    $0x1,%r10
mov    %r10d,%r8d
and    $0x1,%r8d
test   %r8,%r8
mov    $0x2,%eax
cmovne %r8,%rax
sub    %rax,%r10
add    %r10d,%esi
mov    %r10,%r8
shl    $0x5,%r8
add    %rdx,%r8
lea    (%rcx,%r10,8),%r9
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movups (%rdx),%xmm0
movups 0x10(%rdx),%xmm1
movups 0x20(%rdx),%xmm2
movaps %xmm0,%xmm3
movlhps %xmm2,%xmm3
unpckhpd %xmm2,%xmm0
movhps 0x30(%rdx),%xmm1
movups %xmm3,(%rcx,%rax,8)
movups %xmm0,0x20(%rcx,%rax,8)
movups %xmm1,0x40(%rcx,%rax,8)
add    $0x2,%rax
add    $0x40,%rdx
cmp    %rax,%r10
jne    1370 <kernel_dgetr_3_lib4+0x270>
mov    %r8,%rdx
mov    %r9,%rcx
mov    %edi,%eax
sub    %esi,%eax
mov    %esi,%r8d
not    %r8d
test   $0x1,%al
je     13df <kernel_dgetr_3_lib4+0x2df>
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rcx)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rcx)
add    $0x8,%rcx
add    $0x20,%rdx
add    $0x1,%esi
add    %edi,%r8d
je     143c <kernel_dgetr_3_lib4+0x33c>
sub    %esi,%edi
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rcx,%rax,8)
movsd  0x8(%rdx),%xmm0
movsd  %xmm0,0x20(%rcx,%rax,8)
movsd  0x10(%rdx),%xmm0
movsd  %xmm0,0x40(%rcx,%rax,8)
movsd  0x20(%rdx),%xmm0
movsd  %xmm0,0x8(%rcx,%rax,8)
movsd  0x28(%rdx),%xmm0
movsd  %xmm0,0x28(%rcx,%rax,8)
movsd  0x30(%rdx),%xmm0
movsd  %xmm0,0x48(%rcx,%rax,8)
add    $0x2,%rax
add    $0x40,%rdx
cmp    %eax,%edi
jne    13f0 <kernel_dgetr_3_lib4+0x2f0>
ret

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

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