void kernel_dgemv_n_2_lib4(int kmax, double *A, double *x, double *y, double *z,
                           int alg) {
  if (kmax <= 0)
    return;
  __builtin_prefetch(A);
  __builtin_prefetch(A + 8);
  const int lda = 4;
  int k;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0;
  k = 0;
  for (; k < kmax - 3; k += 4) {
    __builtin_prefetch(A + 4 * lda);
    __builtin_prefetch(A + 4 * lda + 8);
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[1 + lda * 0] * x_0;
    y_0 += A[0 + lda * 1] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_0 += A[0 + lda * 2] * x_2;
    y_1 += A[1 + lda * 2] * x_2;
    y_0 += A[0 + lda * 3] * x_3;
    y_1 += A[1 + lda * 3] * x_3;
    A += 4 * lda;
    x += 4;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[1 + lda * 0] * x_0;
    A += 1 * lda;
    x += 1;
  }
  if (alg == 0) {
    y[0] = y_0;
    y[1] = y_1;
  } else if (alg == 1) {
    z[0] = y[0] + y_0;
    z[1] = y[1] + y_1;
  } else {
    z[0] = y[0] - y_0;
    z[1] = y[1] - y_1;
  }
}


x86 assembly (clang, -O0):
<kernel_dgemv_n_2_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112a <kernel_dgemv_n_2_lib4+0x2a>
jmp    1400 <kernel_dgemv_n_2_lib4+0x300>
mov    -0x10(%rbp),%rax
prefetcht0 (%rax)
mov    -0x10(%rbp),%rax
add    $0x40,%rax
prefetcht0 (%rax)
movl   $0x4,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x3,%ecx
cmp    %ecx,%eax
jge    12e7 <kernel_dgemv_n_2_lib4+0x1e7>
mov    -0x10(%rbp),%rax
add    $0x80,%rax
prefetcht0 (%rax)
mov    -0x10(%rbp),%rax
add    $0x80,%rax
add    $0x40,%rax
prefetcht0 (%rax)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x28(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x48(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x68(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x34(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x34(%rbp)
jmp    115a <kernel_dgemv_n_2_lib4+0x5a>
jmp    12ec <kernel_dgemv_n_2_lib4+0x1ec>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    136a <kernel_dgemv_n_2_lib4+0x26a>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x60(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  -0x40(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x18(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12ec <kernel_dgemv_n_2_lib4+0x1ec>
cmpl   $0x0,-0x2c(%rbp)
jne    1394 <kernel_dgemv_n_2_lib4+0x294>
movsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    1400 <kernel_dgemv_n_2_lib4+0x300>
cmpl   $0x1,-0x2c(%rbp)
jne    13cf <kernel_dgemv_n_2_lib4+0x2cf>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13fb <kernel_dgemv_n_2_lib4+0x2fb>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x60(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    1400 <kernel_dgemv_n_2_lib4+0x300>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemv_n_2_lib4>:
test   %edi,%edi
jle    12c8 <kernel_dgemv_n_2_lib4+0x1c8>
prefetcht0 (%rsi)
prefetcht0 0x40(%rsi)
cmp    $0x4,%edi
jb     11c9 <kernel_dgemv_n_2_lib4+0xc9>
lea    -0x3(%rdi),%r10d
xorpd  %xmm1,%xmm1
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
prefetcht0 0x80(%rsi)
prefetcht0 0xc0(%rsi)
movupd (%rsi),%xmm3
movupd 0x20(%rsi),%xmm4
movupd 0x40(%rsi),%xmm5
movupd 0x60(%rsi),%xmm8
add    $0x80,%rsi
movsd  (%rdx),%xmm7
movsd  0x8(%rdx),%xmm6
movsd  0x10(%rdx),%xmm2
movsd  0x18(%rdx),%xmm0
unpcklpd %xmm7,%xmm7
mulpd  %xmm3,%xmm7
addpd  %xmm1,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm4,%xmm6
addpd  %xmm7,%xmm6
unpcklpd %xmm2,%xmm2
mulpd  %xmm5,%xmm2
addpd  %xmm6,%xmm2
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm1
addpd  %xmm2,%xmm1
add    $0x20,%rdx
add    $0x4,%eax
cmp    %r10d,%eax
jl     1130 <kernel_dgemv_n_2_lib4+0x30>
addpd  %xmm2,%xmm0
mov    %edi,%eax
and    $0xfffffffc,%eax
cmp    %edi,%eax
jl     11d3 <kernel_dgemv_n_2_lib4+0xd3>
movapd %xmm0,%xmm1
cmp    $0x1,%r9d
jne    11ee <kernel_dgemv_n_2_lib4+0xee>
jmp    12aa <kernel_dgemv_n_2_lib4+0x1aa>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cmp    %edi,%eax
jge    11ba <kernel_dgemv_n_2_lib4+0xba>
mov    %eax,%r10d
not    %r10d
test   $0x1,%dil
jne    1226 <kernel_dgemv_n_2_lib4+0x126>
add    %edi,%r10d
jne    124e <kernel_dgemv_n_2_lib4+0x14e>
cmp    $0x1,%r9d
je     12aa <kernel_dgemv_n_2_lib4+0x1aa>
test   %r9d,%r9d
jne    1200 <kernel_dgemv_n_2_lib4+0x100>
movlpd %xmm1,(%rcx)
unpckhpd %xmm1,%xmm1
jmp    12c3 <kernel_dgemv_n_2_lib4+0x1c3>
movsd  (%rcx),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r8)
movsd  0x8(%rcx),%xmm0
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    %r8,%rcx
movapd %xmm0,%xmm1
jmp    12c3 <kernel_dgemv_n_2_lib4+0x1c3>
movupd (%rsi),%xmm2
movsd  (%rdx),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
add    $0x20,%rsi
add    $0x8,%rdx
or     $0x1,%eax
movapd %xmm1,%xmm0
add    %edi,%r10d
je     11e4 <kernel_dgemv_n_2_lib4+0xe4>
sub    %eax,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsd  (%rdx,%rax,8),%xmm3
movsd  0x8(%rdx,%rax,8),%xmm1
unpcklpd %xmm3,%xmm3
movupd (%rsi),%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movupd 0x20(%rsi),%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x2,%rax
add    $0x40,%rsi
cmp    %eax,%edi
jne    1260 <kernel_dgemv_n_2_lib4+0x160>
addpd  %xmm2,%xmm1
cmp    $0x1,%r9d
jne    11ee <kernel_dgemv_n_2_lib4+0xee>
movsd  (%rcx),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r8)
unpckhpd %xmm1,%xmm1
addsd  0x8(%rcx),%xmm1
mov    %r8,%rcx
movsd  %xmm1,0x8(%rcx)
ret

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

LLVM IR (-O2):
define void @kernel_dgemv_n_2_lib4(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture writeonly %4, i32 %5) {
%7 = icmp slt i32 %0, 1
br i1 %7, label %141, label %8
8: ; preds = %6
%9 = bitcast double* %1 to i8*
tail call void @llvm.prefetch.p0i8(i8* %9, i32 0, i32 3, i32 1)
%10 = getelementptr inbounds double, double* %1, i64 8
%11 = bitcast double* %10 to i8*
tail call void @llvm.prefetch.p0i8(i8* %11, i32 0, i32 3, i32 1)
%12 = add nsw i32 %0, -3
%13 = icmp ugt i32 %0, 3
br i1 %13, label %49, label %20
14: ; preds = %49
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %68, <2 x double> %53)
%16 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %72, <2 x double> %74, <2 x double> %15)
%17 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %78, <2 x double> %80, <2 x double> %16)
%18 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %86, <2 x double> %17)
%19 = and i32 %0, -4
br label %20
20: ; preds = %14, %8
%21 = phi i32 [ 0, %8 ], [ %19, %14 ]
%22 = phi double* [ %2, %8 ], [ %88, %14 ]
%23 = phi double* [ %1, %8 ], [ %54, %14 ]
%24 = phi <2 x double> [ zeroinitializer, %8 ], [ %18, %14 ]
%25 = icmp slt i32 %21, %0
br i1 %25, label %26, label %116
26: ; preds = %20
%27 = xor i32 %21, -1
%28 = and i32 %0, 1
%29 = icmp eq i32 %28, 0
br i1 %29, label %41, label %30
30: ; preds = %26
%31 = load double, double* %22
%32 = bitcast double* %23 to <2 x double>*
%33 = load <2 x double>, <2 x double>* %32
%34 = insertelement <2 x double> poison, double %31, i64 0
%35 = shufflevector <2 x double> %34, <2 x double> poison, <2 x i32> zeroinitializer
%36 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %35, <2 x double> %24)
%37 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %33, <2 x double> %35, <2 x double> %24)
%38 = getelementptr inbounds double, double* %23, i64 4
%39 = getelementptr inbounds double, double* %22, i64 1
%40 = or i32 %21, 1
br label %41
41: ; preds = %30, %26
%42 = phi <2 x double> [ undef, %26 ], [ %37, %30 ]
%43 = phi double* [ %23, %26 ], [ %38, %30 ]
%44 = phi double* [ %22, %26 ], [ %39, %30 ]
%45 = phi i32 [ %21, %26 ], [ %40, %30 ]
%46 = phi <2 x double> [ %24, %26 ], [ %36, %30 ]
%47 = sub i32 0, %0
%48 = icmp eq i32 %27, %47
br i1 %48, label %116, label %91
49: ; preds = %8, %49
%50 = phi double* [ %54, %49 ], [ %1, %8 ]
%51 = phi double* [ %88, %49 ], [ %2, %8 ]
%52 = phi i32 [ %89, %49 ], [ 0, %8 ]
%53 = phi <2 x double> [ %87, %49 ], [ zeroinitializer, %8 ]
%54 = getelementptr inbounds double, double* %50, i64 16
%55 = bitcast double* %54 to i8*
tail call void @llvm.prefetch.p0i8(i8* %55, i32 0, i32 3, i32 1)
%56 = getelementptr inbounds double, double* %50, i64 24
%57 = bitcast double* %56 to i8*
tail call void @llvm.prefetch.p0i8(i8* %57, i32 0, i32 3, i32 1)
%58 = load double, double* %51
%59 = getelementptr inbounds double, double* %51, i64 1
%60 = load double, double* %59
%61 = getelementptr inbounds double, double* %51, i64 2
%62 = load double, double* %61
%63 = getelementptr inbounds double, double* %51, i64 3
%64 = load double, double* %63
%65 = bitcast double* %50 to <2 x double>*
%66 = load <2 x double>, <2 x double>* %65
%67 = insertelement <2 x double> poison, double %58, i64 0
%68 = shufflevector <2 x double> %67, <2 x double> poison, <2 x i32> zeroinitializer
%69 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %66, <2 x double> %68, <2 x double> %53)
%70 = getelementptr inbounds double, double* %50, i64 4
%71 = bitcast double* %70 to <2 x double>*
%72 = load <2 x double>, <2 x double>* %71
%73 = insertelement <2 x double> poison, double %60, i64 0
%74 = shufflevector <2 x double> %73, <2 x double> poison, <2 x i32> zeroinitializer
%75 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %72, <2 x double> %74, <2 x double> %69)
%76 = getelementptr inbounds double, double* %50, i64 8
%77 = bitcast double* %76 to <2 x double>*
%78 = load <2 x double>, <2 x double>* %77
%79 = insertelement <2 x double> poison, double %62, i64 0
%80 = shufflevector <2 x double> %79, <2 x double> poison, <2 x i32> zeroinitializer
%81 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %78, <2 x double> %80, <2 x double> %75)
%82 = getelementptr inbounds double, double* %50, i64 12
%83 = bitcast double* %82 to <2 x double>*
%84 = load <2 x double>, <2 x double>* %83
%85 = insertelement <2 x double> poison, double %64, i64 0
%86 = shufflevector <2 x double> %85, <2 x double> poison, <2 x i32> zeroinitializer
%87 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %84, <2 x double> %86, <2 x double> %81)
%88 = getelementptr inbounds double, double* %51, i64 4
%89 = add nuw nsw i32 %52, 4
%90 = icmp slt i32 %89, %12
br i1 %90, label %49, label %14
91: ; preds = %41, %91
%92 = phi double* [ %110, %91 ], [ %43, %41 ]
%93 = phi double* [ %111, %91 ], [ %44, %41 ]
%94 = phi i32 [ %112, %91 ], [ %45, %41 ]
%95 = phi <2 x double> [ %109, %91 ], [ %46, %41 ]
%96 = load double, double* %93
%97 = bitcast double* %92 to <2 x double>*
%98 = load <2 x double>, <2 x double>* %97
%99 = insertelement <2 x double> poison, double %96, i64 0
%100 = shufflevector <2 x double> %99, <2 x double> poison, <2 x i32> zeroinitializer
%101 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %98, <2 x double> %100, <2 x double> %95)
%102 = getelementptr inbounds double, double* %92, i64 4
%103 = getelementptr inbounds double, double* %93, i64 1
%104 = load double, double* %103
%105 = bitcast double* %102 to <2 x double>*
%106 = load <2 x double>, <2 x double>* %105
%107 = insertelement <2 x double> poison, double %104, i64 0
%108 = shufflevector <2 x double> %107, <2 x double> poison, <2 x i32> zeroinitializer
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %108, <2 x double> %101)
%110 = getelementptr inbounds double, double* %92, i64 8
%111 = getelementptr inbounds double, double* %93, i64 2
%112 = add nuw nsw i32 %94, 2
%113 = icmp eq i32 %112, %0
br i1 %113, label %114, label %91
114: ; preds = %91
%115 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %106, <2 x double> %108, <2 x double> %101)
br label %116
116: ; preds = %114, %41, %20
%117 = phi <2 x double> [ %24, %20 ], [ %42, %41 ], [ %115, %114 ]
switch i32 %5, label %129 [
i32 0, label %118
i32 1, label %121
]
118: ; preds = %116
%119 = extractelement <2 x double> %117, i64 0
store double %119, double* %3
%120 = extractelement <2 x double> %117, i64 1
br label %137
121: ; preds = %116
%122 = load double, double* %3
%123 = extractelement <2 x double> %117, i64 0
%124 = fadd double %123, %122
store double %124, double* %4
%125 = getelementptr inbounds double, double* %3, i64 1
%126 = load double, double* %125
%127 = extractelement <2 x double> %117, i64 1
%128 = fadd double %127, %126
br label %137
129: ; preds = %116
%130 = load double, double* %3
%131 = extractelement <2 x double> %117, i64 0
%132 = fsub double %130, %131
store double %132, double* %4
%133 = getelementptr inbounds double, double* %3, i64 1
%134 = load double, double* %133
%135 = extractelement <2 x double> %117, i64 1
%136 = fsub double %134, %135
br label %137
137: ; preds = %121, %129, %118
%138 = phi double* [ %3, %118 ], [ %4, %129 ], [ %4, %121 ]
%139 = phi double [ %120, %118 ], [ %136, %129 ], [ %128, %121 ]
%140 = getelementptr inbounds double, double* %138, i64 1
store double %139, double* %140
br label %141
141: ; preds = %137, %6
ret void
}