void kernel_dgemv_n_2_lib4(int kmax, double *A, double *x, double *y, double *z,
                           int alg) {
  if (kmax <= 0)
    return;
  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) {
    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    13d0 <kernel_dgemv_n_2_lib4+0x2d0>
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    12b7 <kernel_dgemv_n_2_lib4+0x1b7>
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    1148 <kernel_dgemv_n_2_lib4+0x48>
jmp    12bc <kernel_dgemv_n_2_lib4+0x1bc>
mov    -0x34(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    133a <kernel_dgemv_n_2_lib4+0x23a>
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    12bc <kernel_dgemv_n_2_lib4+0x1bc>
cmpl   $0x0,-0x2c(%rbp)
jne    1364 <kernel_dgemv_n_2_lib4+0x264>
movsd  -0x60(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x68(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13d0 <kernel_dgemv_n_2_lib4+0x2d0>
cmpl   $0x1,-0x2c(%rbp)
jne    139f <kernel_dgemv_n_2_lib4+0x29f>
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    13cb <kernel_dgemv_n_2_lib4+0x2cb>
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    13d0 <kernel_dgemv_n_2_lib4+0x2d0>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemv_n_2_lib4>:
test   %edi,%edi
jle    12a8 <kernel_dgemv_n_2_lib4+0x1a8>
cmp    $0x4,%edi
jb     11a8 <kernel_dgemv_n_2_lib4+0xa8>
lea    -0x3(%rdi),%r10d
xorpd  %xmm2,%xmm2
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movupd (%rsi),%xmm3
movupd 0x20(%rsi),%xmm4
movupd 0x40(%rsi),%xmm5
movupd 0x60(%rsi),%xmm8
movsd  (%rdx),%xmm7
movsd  0x8(%rdx),%xmm6
movsd  0x10(%rdx),%xmm1
movsd  0x18(%rdx),%xmm0
unpcklpd %xmm7,%xmm7
mulpd  %xmm3,%xmm7
addpd  %xmm2,%xmm7
unpcklpd %xmm6,%xmm6
mulpd  %xmm4,%xmm6
addpd  %xmm7,%xmm6
unpcklpd %xmm1,%xmm1
mulpd  %xmm5,%xmm1
addpd  %xmm6,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm2
addpd  %xmm1,%xmm2
sub    $0xffffffffffffff80,%rsi
add    $0x20,%rdx
add    $0x4,%eax
cmp    %r10d,%eax
jl     1120 <kernel_dgemv_n_2_lib4+0x20>
addpd  %xmm1,%xmm0
mov    %edi,%eax
and    $0xfffffffc,%eax
cmp    %edi,%eax
jl     11b2 <kernel_dgemv_n_2_lib4+0xb2>
movapd %xmm0,%xmm1
cmp    $0x1,%r9d
jne    11cd <kernel_dgemv_n_2_lib4+0xcd>
jmp    128a <kernel_dgemv_n_2_lib4+0x18a>
xorpd  %xmm0,%xmm0
xor    %eax,%eax
cmp    %edi,%eax
jge    1199 <kernel_dgemv_n_2_lib4+0x99>
mov    %eax,%r10d
not    %r10d
test   $0x1,%dil
jne    1205 <kernel_dgemv_n_2_lib4+0x105>
add    %edi,%r10d
jne    122d <kernel_dgemv_n_2_lib4+0x12d>
cmp    $0x1,%r9d
je     128a <kernel_dgemv_n_2_lib4+0x18a>
test   %r9d,%r9d
jne    11df <kernel_dgemv_n_2_lib4+0xdf>
movlpd %xmm1,(%rcx)
unpckhpd %xmm1,%xmm1
jmp    12a3 <kernel_dgemv_n_2_lib4+0x1a3>
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    12a3 <kernel_dgemv_n_2_lib4+0x1a3>
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     11c3 <kernel_dgemv_n_2_lib4+0xc3>
sub    %eax,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
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    1240 <kernel_dgemv_n_2_lib4+0x140>
addpd  %xmm2,%xmm1
cmp    $0x1,%r9d
jne    11cd <kernel_dgemv_n_2_lib4+0xcd>
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 %170
24: ; preds = %6
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 %25
25: ; preds = %95, %24
%26 = load i32, i32* %14
%27 = load i32, i32* %7
%28 = sub nsw i32 %27, 3
%29 = icmp slt i32 %26, %28
br i1 %29, label %30, label %98
30: ; preds = %25
%31 = load double*, double** %9
%32 = getelementptr inbounds double, double* %31, i64 0
%33 = load double, double* %32
store double %33, double* %15
%34 = load double*, double** %9
%35 = getelementptr inbounds double, double* %34, i64 1
%36 = load double, double* %35
store double %36, double* %16
%37 = load double*, double** %9
%38 = getelementptr inbounds double, double* %37, i64 2
%39 = load double, double* %38
store double %39, double* %17
%40 = load double*, double** %9
%41 = getelementptr inbounds double, double* %40, i64 3
%42 = load double, double* %41
store double %42, double* %18
%43 = load double*, double** %8
%44 = getelementptr inbounds double, double* %43, i64 0
%45 = load double, double* %44
%46 = load double, double* %15
%47 = load double, double* %19
%48 = call double @llvm.fmuladd.f64(double %45, double %46, double %47)
store double %48, double* %19
%49 = load double*, double** %8
%50 = getelementptr inbounds double, double* %49, i64 1
%51 = load double, double* %50
%52 = load double, double* %15
%53 = load double, double* %20
%54 = call double @llvm.fmuladd.f64(double %51, double %52, double %53)
store double %54, double* %20
%55 = load double*, double** %8
%56 = getelementptr inbounds double, double* %55, i64 4
%57 = load double, double* %56
%58 = load double, double* %16
%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 5
%63 = load double, double* %62
%64 = load double, double* %16
%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 8
%69 = load double, double* %68
%70 = load double, double* %17
%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 9
%75 = load double, double* %74
%76 = load double, double* %17
%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 12
%81 = load double, double* %80
%82 = load double, double* %18
%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 13
%87 = load double, double* %86
%88 = load double, double* %18
%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 16
store double* %92, double** %8
%93 = load double*, double** %9
%94 = getelementptr inbounds double, double* %93, i64 4
store double* %94, double** %9
br label %95
95: ; preds = %30
%96 = load i32, i32* %14
%97 = add nsw i32 %96, 4
store i32 %97, i32* %14
br label %25
98: ; preds = %25
br label %99
99: ; preds = %123, %98
%100 = load i32, i32* %14
%101 = load i32, i32* %7
%102 = icmp slt i32 %100, %101
br i1 %102, label %103, label %126
103: ; preds = %99
%104 = load double*, double** %9
%105 = getelementptr inbounds double, double* %104, i64 0
%106 = load double, double* %105
store double %106, double* %15
%107 = load double*, double** %8
%108 = getelementptr inbounds double, double* %107, i64 0
%109 = load double, double* %108
%110 = load double, double* %15
%111 = load double, double* %19
%112 = call double @llvm.fmuladd.f64(double %109, double %110, double %111)
store double %112, double* %19
%113 = load double*, double** %8
%114 = getelementptr inbounds double, double* %113, i64 1
%115 = load double, double* %114
%116 = load double, double* %15
%117 = load double, double* %20
%118 = call double @llvm.fmuladd.f64(double %115, double %116, double %117)
store double %118, double* %20
%119 = load double*, double** %8
%120 = getelementptr inbounds double, double* %119, i64 4
store double* %120, double** %8
%121 = load double*, double** %9
%122 = getelementptr inbounds double, double* %121, i64 1
store double* %122, double** %9
br label %123
123: ; preds = %103
%124 = load i32, i32* %14
%125 = add nsw i32 %124, 1
store i32 %125, i32* %14
br label %99
126: ; preds = %99
%127 = load i32, i32* %12
%128 = icmp eq i32 %127, 0
br i1 %128, label %129, label %136
129: ; preds = %126
%130 = load double, double* %19
%131 = load double*, double** %10
%132 = getelementptr inbounds double, double* %131, i64 0
store double %130, double* %132
%133 = load double, double* %20
%134 = load double*, double** %10
%135 = getelementptr inbounds double, double* %134, i64 1
store double %133, double* %135
br label %170
136: ; preds = %126
%137 = load i32, i32* %12
%138 = icmp eq i32 %137, 1
br i1 %138, label %139, label %154
139: ; preds = %136
%140 = load double*, double** %10
%141 = getelementptr inbounds double, double* %140, i64 0
%142 = load double, double* %141
%143 = load double, double* %19
%144 = fadd double %142, %143
%145 = load double*, double** %11
%146 = getelementptr inbounds double, double* %145, i64 0
store double %144, double* %146
%147 = load double*, double** %10
%148 = getelementptr inbounds double, double* %147, i64 1
%149 = load double, double* %148
%150 = load double, double* %20
%151 = fadd double %149, %150
%152 = load double*, double** %11
%153 = getelementptr inbounds double, double* %152, i64 1
store double %151, double* %153
br label %169
154: ; preds = %136
%155 = load double*, double** %10
%156 = getelementptr inbounds double, double* %155, i64 0
%157 = load double, double* %156
%158 = load double, double* %19
%159 = fsub double %157, %158
%160 = load double*, double** %11
%161 = getelementptr inbounds double, double* %160, i64 0
store double %159, double* %161
%162 = load double*, double** %10
%163 = getelementptr inbounds double, double* %162, i64 1
%164 = load double, double* %163
%165 = load double, double* %20
%166 = fsub double %164, %165
%167 = load double*, double** %11
%168 = getelementptr inbounds double, double* %167, i64 1
store double %166, double* %168
br label %169
169: ; preds = %154, %139
br label %170
170: ; preds = %23, %169, %129
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 %135, label %8
8: ; preds = %6
%9 = add nsw i32 %0, -3
%10 = icmp ugt i32 %0, 3
br i1 %10, label %46, label %17
11: ; preds = %46
%12 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %59, <2 x double> %61, <2 x double> %50)
%13 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> %67, <2 x double> %12)
%14 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %71, <2 x double> %73, <2 x double> %13)
%15 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %77, <2 x double> %79, <2 x double> %14)
%16 = and i32 %0, -4
br label %17
17: ; preds = %11, %8
%18 = phi i32 [ 0, %8 ], [ %16, %11 ]
%19 = phi double* [ %2, %8 ], [ %82, %11 ]
%20 = phi double* [ %1, %8 ], [ %81, %11 ]
%21 = phi <2 x double> [ zeroinitializer, %8 ], [ %15, %11 ]
%22 = icmp slt i32 %18, %0
br i1 %22, label %23, label %110
23: ; preds = %17
%24 = xor i32 %18, -1
%25 = and i32 %0, 1
%26 = icmp eq i32 %25, 0
br i1 %26, label %38, label %27
27: ; preds = %23
%28 = load double, double* %19
%29 = bitcast double* %20 to <2 x double>*
%30 = load <2 x double>, <2 x double>* %29
%31 = insertelement <2 x double> poison, double %28, i64 0
%32 = shufflevector <2 x double> %31, <2 x double> poison, <2 x i32> zeroinitializer
%33 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %32, <2 x double> %21)
%34 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %30, <2 x double> %32, <2 x double> %21)
%35 = getelementptr inbounds double, double* %20, i64 4
%36 = getelementptr inbounds double, double* %19, i64 1
%37 = or i32 %18, 1
br label %38
38: ; preds = %27, %23
%39 = phi <2 x double> [ undef, %23 ], [ %34, %27 ]
%40 = phi double* [ %20, %23 ], [ %35, %27 ]
%41 = phi double* [ %19, %23 ], [ %36, %27 ]
%42 = phi i32 [ %18, %23 ], [ %37, %27 ]
%43 = phi <2 x double> [ %21, %23 ], [ %33, %27 ]
%44 = sub i32 0, %0
%45 = icmp eq i32 %24, %44
br i1 %45, label %110, label %85
46: ; preds = %8, %46
%47 = phi double* [ %81, %46 ], [ %1, %8 ]
%48 = phi double* [ %82, %46 ], [ %2, %8 ]
%49 = phi i32 [ %83, %46 ], [ 0, %8 ]
%50 = phi <2 x double> [ %80, %46 ], [ zeroinitializer, %8 ]
%51 = load double, double* %48
%52 = getelementptr inbounds double, double* %48, i64 1
%53 = load double, double* %52
%54 = getelementptr inbounds double, double* %48, i64 2
%55 = load double, double* %54
%56 = getelementptr inbounds double, double* %48, i64 3
%57 = load double, double* %56
%58 = bitcast double* %47 to <2 x double>*
%59 = load <2 x double>, <2 x double>* %58
%60 = insertelement <2 x double> poison, double %51, i64 0
%61 = shufflevector <2 x double> %60, <2 x double> poison, <2 x i32> zeroinitializer
%62 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %59, <2 x double> %61, <2 x double> %50)
%63 = getelementptr inbounds double, double* %47, i64 4
%64 = bitcast double* %63 to <2 x double>*
%65 = load <2 x double>, <2 x double>* %64
%66 = insertelement <2 x double> poison, double %53, i64 0
%67 = shufflevector <2 x double> %66, <2 x double> poison, <2 x i32> zeroinitializer
%68 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %65, <2 x double> %67, <2 x double> %62)
%69 = getelementptr inbounds double, double* %47, i64 8
%70 = bitcast double* %69 to <2 x double>*
%71 = load <2 x double>, <2 x double>* %70
%72 = insertelement <2 x double> poison, double %55, i64 0
%73 = shufflevector <2 x double> %72, <2 x double> poison, <2 x i32> zeroinitializer
%74 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %71, <2 x double> %73, <2 x double> %68)
%75 = getelementptr inbounds double, double* %47, i64 12
%76 = bitcast double* %75 to <2 x double>*
%77 = load <2 x double>, <2 x double>* %76
%78 = insertelement <2 x double> poison, double %57, i64 0
%79 = shufflevector <2 x double> %78, <2 x double> poison, <2 x i32> zeroinitializer
%80 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %77, <2 x double> %79, <2 x double> %74)
%81 = getelementptr inbounds double, double* %47, i64 16
%82 = getelementptr inbounds double, double* %48, i64 4
%83 = add nuw nsw i32 %49, 4
%84 = icmp slt i32 %83, %9
br i1 %84, label %46, label %11
85: ; preds = %38, %85
%86 = phi double* [ %104, %85 ], [ %40, %38 ]
%87 = phi double* [ %105, %85 ], [ %41, %38 ]
%88 = phi i32 [ %106, %85 ], [ %42, %38 ]
%89 = phi <2 x double> [ %103, %85 ], [ %43, %38 ]
%90 = load double, double* %87
%91 = bitcast double* %86 to <2 x double>*
%92 = load <2 x double>, <2 x double>* %91
%93 = insertelement <2 x double> poison, double %90, i64 0
%94 = shufflevector <2 x double> %93, <2 x double> poison, <2 x i32> zeroinitializer
%95 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> %94, <2 x double> %89)
%96 = getelementptr inbounds double, double* %86, i64 4
%97 = getelementptr inbounds double, double* %87, i64 1
%98 = load double, double* %97
%99 = bitcast double* %96 to <2 x double>*
%100 = load <2 x double>, <2 x double>* %99
%101 = insertelement <2 x double> poison, double %98, i64 0
%102 = shufflevector <2 x double> %101, <2 x double> poison, <2 x i32> zeroinitializer
%103 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %102, <2 x double> %95)
%104 = getelementptr inbounds double, double* %86, i64 8
%105 = getelementptr inbounds double, double* %87, i64 2
%106 = add nuw nsw i32 %88, 2
%107 = icmp eq i32 %106, %0
br i1 %107, label %108, label %85
108: ; preds = %85
%109 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %100, <2 x double> %102, <2 x double> %95)
br label %110
110: ; preds = %108, %38, %17
%111 = phi <2 x double> [ %21, %17 ], [ %39, %38 ], [ %109, %108 ]
switch i32 %5, label %123 [
i32 0, label %112
i32 1, label %115
]
112: ; preds = %110
%113 = extractelement <2 x double> %111, i64 0
store double %113, double* %3
%114 = extractelement <2 x double> %111, i64 1
br label %131
115: ; preds = %110
%116 = load double, double* %3
%117 = extractelement <2 x double> %111, i64 0
%118 = fadd double %117, %116
store double %118, double* %4
%119 = getelementptr inbounds double, double* %3, i64 1
%120 = load double, double* %119
%121 = extractelement <2 x double> %111, i64 1
%122 = fadd double %121, %120
br label %131
123: ; preds = %110
%124 = load double, double* %3
%125 = extractelement <2 x double> %111, i64 0
%126 = fsub double %124, %125
store double %126, double* %4
%127 = getelementptr inbounds double, double* %3, i64 1
%128 = load double, double* %127
%129 = extractelement <2 x double> %111, i64 1
%130 = fsub double %128, %129
br label %131
131: ; preds = %115, %123, %112
%132 = phi double* [ %3, %112 ], [ %4, %123 ], [ %4, %115 ]
%133 = phi double [ %114, %112 ], [ %130, %123 ], [ %122, %115 ]
%134 = getelementptr inbounds double, double* %132, i64 1
store double %133, double* %134
br label %135
135: ; preds = %131, %6
ret void
}