void kernel_dgemv_t_2_lib4(int kmax, double *A, int sda, double *x, double *y,
                           double *z, int alg) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int bs = 4;
  int k, ka = kmax;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0;
  k = 0;
  for (; k < ka - bs + 1; k += bs) {
    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[0 + lda * 1] * x_0;
    y_0 += A[1 + lda * 0] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    A += sda * bs;
    x += 4;
  }
  for (; k < ka; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    A += 1;
    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_t_2_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112c <kernel_dgemv_t_2_lib4+0x2c>
jmp    13ec <kernel_dgemv_t_2_lib4+0x2ec>
movl   $0x4,-0x34(%rbp)
movl   $0x4,-0x38(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x68(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x70(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    -0x40(%rbp),%ecx
sub    $0x4,%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jge    12d3 <kernel_dgemv_t_2_lib4+0x1d3>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%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  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x8(%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  0x28(%rax),%xmm0
movsd  -0x50(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x30(%rax),%xmm0
movsd  -0x58(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x68(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x10(%rbp),%rax
movsd  0x38(%rax),%xmm0
movsd  -0x60(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x3c(%rbp)
jmp    1157 <kernel_dgemv_t_2_lib4+0x57>
jmp    12d8 <kernel_dgemv_t_2_lib4+0x1d8>
mov    -0x3c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    1356 <kernel_dgemv_t_2_lib4+0x256>
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%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  0x20(%rax),%xmm0
movsd  -0x48(%rbp),%xmm2
movsd  -0x70(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12d8 <kernel_dgemv_t_2_lib4+0x1d8>
cmpl   $0x0,0x10(%rbp)
jne    1380 <kernel_dgemv_t_2_lib4+0x280>
movsd  -0x68(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x70(%rbp),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13ec <kernel_dgemv_t_2_lib4+0x2ec>
cmpl   $0x1,0x10(%rbp)
jne    13bb <kernel_dgemv_t_2_lib4+0x2bb>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
addsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
addsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13e7 <kernel_dgemv_t_2_lib4+0x2e7>
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x68(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x70(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x8(%rax)
jmp    13ec <kernel_dgemv_t_2_lib4+0x2ec>
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dgemv_t_2_lib4>:
test   %edi,%edi
jle    12c6 <kernel_dgemv_t_2_lib4+0x1c6>
cmp    $0x4,%edi
jb     11bb <kernel_dgemv_t_2_lib4+0xbb>
lea    -0x3(%rdi),%r10d
shl    $0x2,%edx
movslq %edx,%rdx
shl    $0x3,%rdx
xorpd  %xmm2,%xmm2
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nop
movsd  (%rsi),%xmm4
movsd  0x8(%rsi),%xmm5
movsd  0x10(%rsi),%xmm6
movsd  0x18(%rsi),%xmm8
movhpd 0x20(%rsi),%xmm4
movsd  (%rcx),%xmm7
movsd  0x8(%rcx),%xmm3
movsd  0x10(%rcx),%xmm1
movsd  0x18(%rcx),%xmm0
unpcklpd %xmm7,%xmm7
mulpd  %xmm4,%xmm7
addpd  %xmm2,%xmm7
movhpd 0x28(%rsi),%xmm5
unpcklpd %xmm3,%xmm3
mulpd  %xmm5,%xmm3
addpd  %xmm7,%xmm3
movhpd 0x30(%rsi),%xmm6
unpcklpd %xmm1,%xmm1
mulpd  %xmm6,%xmm1
movhpd 0x38(%rsi),%xmm8
addpd  %xmm3,%xmm1
unpcklpd %xmm0,%xmm0
mulpd  %xmm8,%xmm0
movapd %xmm0,%xmm2
addpd  %xmm1,%xmm2
add    $0x20,%rcx
add    $0x4,%eax
add    %rdx,%rsi
cmp    %r10d,%eax
jl     1130 <kernel_dgemv_t_2_lib4+0x30>
addpd  %xmm1,%xmm0
mov    %edi,%edx
and    $0xfffffffc,%edx
jmp    11c1 <kernel_dgemv_t_2_lib4+0xc1>
xorpd  %xmm0,%xmm0
xor    %edx,%edx
mov    0x8(%rsp),%r10d
cmp    %edi,%edx
jge    11dd <kernel_dgemv_t_2_lib4+0xdd>
mov    %edx,%eax
not    %eax
test   $0x1,%dil
jne    11e6 <kernel_dgemv_t_2_lib4+0xe6>
add    %edi,%eax
jne    1212 <kernel_dgemv_t_2_lib4+0x112>
jmp    126a <kernel_dgemv_t_2_lib4+0x16a>
movapd %xmm0,%xmm1
jmp    126a <kernel_dgemv_t_2_lib4+0x16a>
movsd  (%rsi),%xmm2
movhpd 0x20(%rsi),%xmm2
movsd  (%rcx),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm2,%xmm1
addpd  %xmm0,%xmm1
add    $0x8,%rsi
add    $0x8,%rcx
or     $0x1,%edx
movapd %xmm1,%xmm0
add    %edi,%eax
je     126a <kernel_dgemv_t_2_lib4+0x16a>
sub    %edx,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsd  (%rsi,%rax,8),%xmm3
movsd  0x8(%rsi,%rax,8),%xmm4
movhpd 0x20(%rsi,%rax,8),%xmm3
movsd  (%rcx,%rax,8),%xmm2
movsd  0x8(%rcx,%rax,8),%xmm1
unpcklpd %xmm2,%xmm2
mulpd  %xmm3,%xmm2
addpd  %xmm0,%xmm2
movhpd 0x28(%rsi,%rax,8),%xmm4
unpcklpd %xmm1,%xmm1
mulpd  %xmm4,%xmm1
movapd %xmm1,%xmm0
addpd  %xmm2,%xmm0
add    $0x2,%rax
cmp    %eax,%edi
jne    1220 <kernel_dgemv_t_2_lib4+0x120>
addpd  %xmm2,%xmm1
cmp    $0x1,%r10d
je     1280 <kernel_dgemv_t_2_lib4+0x180>
test   %r10d,%r10d
jne    129d <kernel_dgemv_t_2_lib4+0x19d>
movlpd %xmm1,(%r8)
unpckhpd %xmm1,%xmm1
jmp    12c0 <kernel_dgemv_t_2_lib4+0x1c0>
movsd  (%r8),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,(%r9)
unpckhpd %xmm1,%xmm1
addsd  0x8(%r8),%xmm1
mov    %r9,%r8
jmp    12c0 <kernel_dgemv_t_2_lib4+0x1c0>
movsd  (%r8),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,(%r9)
movsd  0x8(%r8),%xmm0
unpckhpd %xmm1,%xmm1
subsd  %xmm1,%xmm0
mov    %r9,%r8
movapd %xmm0,%xmm1
movsd  %xmm1,0x8(%r8)
ret

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

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