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


x86 assembly (clang, -O0):
<kernel_dgetr_2_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    112c <kernel_dgetr_2_lib4+0x2c>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    114b <kernel_dgetr_2_lib4+0x4b>
jmp    12a6 <kernel_dgetr_2_lib4+0x1a6>
cmpl   $0x0,-0xc(%rbp)
jle    11c9 <kernel_dgetr_2_lib4+0xc9>
jmp    115a <kernel_dgetr_2_lib4+0x5a>
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11ae <kernel_dgetr_2_lib4+0xae>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    115a <kernel_dgetr_2_lib4+0x5a>
mov    -0x24(%rbp),%ecx
sub    $0x1,%ecx
shl    $0x2,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    11ce <kernel_dgetr_2_lib4+0xce>
mov    -0x2c(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    12a1 <kernel_dgetr_2_lib4+0x1a1>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x18(%rbp),%rax
movsd  0x28(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x28(%rax)
mov    -0x18(%rbp),%rax
movsd  0x40(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x10(%rax)
mov    -0x18(%rbp),%rax
movsd  0x48(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x30(%rax)
mov    -0x18(%rbp),%rax
movsd  0x60(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x18(%rax)
mov    -0x18(%rbp),%rax
movsd  0x68(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x38(%rax)
mov    -0x24(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x20(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x2c(%rbp)
jmp    11ce <kernel_dgetr_2_lib4+0xce>
jmp    12a6 <kernel_dgetr_2_lib4+0x1a6>
jmp    12ab <kernel_dgetr_2_lib4+0x1ab>
mov    -0x2c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12ff <kernel_dgetr_2_lib4+0x1ff>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    12ab <kernel_dgetr_2_lib4+0x1ab>
cmpl   $0x1,-0x4(%rbp)
jne    131b <kernel_dgetr_2_lib4+0x21b>
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x20(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgetr_2_lib4>:
push   %rbx
xor    %r11d,%r11d
cmp    $0x1,%edi
sete   %r11b
add    %esi,%r11d
cmp    %edx,%r11d
jge    111a <kernel_dgetr_2_lib4+0x1a>
xor    %edx,%edx
jmp    12f4 <kernel_dgetr_2_lib4+0x1f4>
test   %edx,%edx
jle    1273 <kernel_dgetr_2_lib4+0x173>
lea    -0x1(%rdx),%ebx
xor    %esi,%esi
cmp    $0x2,%ebx
jb     11af <kernel_dgetr_2_lib4+0xaf>
mov    %rbx,%rax
shl    $0x5,%rax
add    %rcx,%rax
add    $0x10,%rax
cmp    %r8,%rax
jbe    1150 <kernel_dgetr_2_lib4+0x50>
lea    (%r8,%rbx,8),%rax
add    $0x28,%rax
cmp    %rcx,%rax
ja     11af <kernel_dgetr_2_lib4+0xaf>
add    $0x1,%rbx
mov    %ebx,%eax
and    $0x1,%eax
test   %rax,%rax
mov    $0x2,%r10d
cmovne %rax,%r10
mov    %rbx,%rsi
sub    %r10,%rsi
mov    %rsi,%rax
shl    $0x5,%rax
add    %rcx,%rax
lea    (%r8,%rsi,8),%r10
xor    %ebx,%ebx
nopl   0x0(%rax)
movups (%rcx),%xmm0
movups 0x20(%rcx),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movups %xmm2,(%r8,%rbx,8)
movups %xmm0,0x20(%r8,%rbx,8)
add    $0x2,%rbx
add    $0x40,%rcx
cmp    %rbx,%rsi
jne    1180 <kernel_dgetr_2_lib4+0x80>
mov    %rax,%rcx
mov    %r10,%r8
mov    %edx,%eax
sub    %esi,%eax
mov    %esi,%r10d
not    %r10d
add    %edx,%r10d
and    $0x3,%eax
je     11f5 <kernel_dgetr_2_lib4+0xf5>
neg    %eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rcx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
add    $0x8,%r8
add    $0x20,%rcx
add    $0xffffffff,%ebx
cmp    %ebx,%eax
jne    11d0 <kernel_dgetr_2_lib4+0xd0>
sub    %ebx,%esi
cmp    $0x3,%r10d
jb     1263 <kernel_dgetr_2_lib4+0x163>
mov    %edx,%eax
sub    %esi,%eax
nop
movsd  (%rcx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
movsd  0x20(%rcx),%xmm0
movsd  %xmm0,0x8(%r8)
movsd  0x28(%rcx),%xmm0
movsd  %xmm0,0x28(%r8)
movsd  0x40(%rcx),%xmm0
movsd  %xmm0,0x10(%r8)
movsd  0x48(%rcx),%xmm0
movsd  %xmm0,0x30(%r8)
movsd  0x60(%rcx),%xmm0
movsd  %xmm0,0x18(%r8)
movsd  0x68(%rcx),%xmm0
movsd  %xmm0,0x38(%r8)
add    $0x20,%r8
sub    $0xffffffffffffff80,%rcx
add    $0xfffffffc,%eax
jne    1200 <kernel_dgetr_2_lib4+0x100>
lea    -0x4(,%r9,4),%eax
ff
cltq
lea    (%r8,%rax,8),%r8
jmp    1275 <kernel_dgetr_2_lib4+0x175>
xor    %edx,%edx
lea    -0x3(%r11),%esi
cmp    %esi,%edx
jge    12f4 <kernel_dgetr_2_lib4+0x1f4>
shl    $0x2,%r9d
movslq %r9d,%rax
shl    $0x3,%rax
nopl   0x0(%rax,%rax,1)
movsd  (%rcx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
movsd  0x20(%rcx),%xmm0
movsd  %xmm0,0x8(%r8)
movsd  0x28(%rcx),%xmm0
movsd  %xmm0,0x28(%r8)
movsd  0x40(%rcx),%xmm0
movsd  %xmm0,0x10(%r8)
movsd  0x48(%rcx),%xmm0
movsd  %xmm0,0x30(%r8)
movsd  0x60(%rcx),%xmm0
movsd  %xmm0,0x18(%r8)
movsd  0x68(%rcx),%xmm0
movsd  %xmm0,0x38(%r8)
sub    $0xffffffffffffff80,%rcx
add    $0x4,%edx
add    %rax,%r8
cmp    %esi,%edx
jl     1290 <kernel_dgetr_2_lib4+0x190>
cmp    %r11d,%edx
jge    1444 <kernel_dgetr_2_lib4+0x344>
mov    %edx,%esi
not    %esi
add    %r11d,%esi
cmp    $0x2,%esi
jb     138f <kernel_dgetr_2_lib4+0x28f>
mov    %rsi,%rax
shl    $0x5,%rax
add    %rcx,%rax
add    $0x10,%rax
cmp    %rax,%r8
jae    132d <kernel_dgetr_2_lib4+0x22d>
lea    (%r8,%rsi,8),%rax
add    $0x28,%rax
cmp    %rax,%rcx
jb     138f <kernel_dgetr_2_lib4+0x28f>
add    $0x1,%rsi
mov    %esi,%eax
and    $0x1,%eax
test   %rax,%rax
mov    $0x2,%ebx
cmovne %rax,%rbx
sub    %rbx,%rsi
add    %esi,%edx
mov    %rsi,%rax
shl    $0x5,%rax
add    %rcx,%rax
lea    (%r8,%rsi,8),%r9
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movups (%rcx),%xmm0
movups 0x20(%rcx),%xmm1
movaps %xmm0,%xmm2
movlhps %xmm1,%xmm2
unpckhpd %xmm1,%xmm0
movups %xmm2,(%r8,%rbx,8)
movups %xmm0,0x20(%r8,%rbx,8)
add    $0x2,%rbx
add    $0x40,%rcx
cmp    %rbx,%rsi
jne    1360 <kernel_dgetr_2_lib4+0x260>
mov    %rax,%rcx
mov    %r9,%r8
mov    %r11d,%eax
sub    %edx,%eax
mov    %edx,%esi
not    %esi
add    %r11d,%esi
and    $0x3,%eax
je     13d5 <kernel_dgetr_2_lib4+0x2d5>
neg    %eax
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rcx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
add    $0x8,%r8
add    $0x20,%rcx
add    $0xffffffff,%ebx
cmp    %ebx,%eax
jne    13b0 <kernel_dgetr_2_lib4+0x2b0>
sub    %ebx,%edx
cmp    $0x3,%esi
jb     1444 <kernel_dgetr_2_lib4+0x344>
sub    %edx,%r11d
nopl   (%rax)
movsd  (%rcx),%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
movsd  0x20(%rcx),%xmm0
movsd  %xmm0,0x8(%r8)
movsd  0x28(%rcx),%xmm0
movsd  %xmm0,0x28(%r8)
movsd  0x40(%rcx),%xmm0
movsd  %xmm0,0x10(%r8)
movsd  0x48(%rcx),%xmm0
movsd  %xmm0,0x30(%r8)
movsd  0x60(%rcx),%xmm0
movsd  %xmm0,0x18(%r8)
movsd  0x68(%rcx),%xmm0
movsd  %xmm0,0x38(%r8)
add    $0x20,%r8
sub    $0xffffffffffffff80,%rcx
add    $0xfffffffc,%r11d
jne    13e0 <kernel_dgetr_2_lib4+0x2e0>
cmp    $0x1,%edi
jne    1454 <kernel_dgetr_2_lib4+0x354>
movsd  0x8(%rcx),%xmm0
movsd  %xmm0,0x20(%r8)
pop    %rbx
ret

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

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