void kernel_dsyrk_diag_left_right_1_lib4(int kmax, double *Al, double *Ar,
                                         double *B, double *C, double *D,
                                         int alg) {
  if (kmax <= 0)
    return;
  const int bs = 4;
  int k;
  double a_r, a_0, b_0, c_0;
  if (alg == -1) {
    a_0 = -Al[0];
  } else {
    a_0 = Al[0];
  }
  if (alg == 0) {
    for (k = 0; k < kmax - 1; k += 4) {
      a_r = Ar[0];
      b_0 = B[0 + bs * 0];
      c_0 = a_0 * b_0 * a_r;
      D[0 + bs * 0] = c_0;
      a_r = Ar[1];
      b_0 = B[0 + bs * 1];
      c_0 = a_0 * b_0 * a_r;
      D[0 + bs * 1] = c_0;
      a_r = Ar[2];
      b_0 = B[0 + bs * 2];
      c_0 = a_0 * b_0 * a_r;
      D[0 + bs * 2] = c_0;
      a_r = Ar[3];
      b_0 = B[0 + bs * 3];
      c_0 = a_0 * b_0 * a_r;
      D[0 + bs * 3] = c_0;
      Ar += 4;
      B += 16;
      C += 16;
      D += 16;
    }
    a_r = Ar[0];
    b_0 = B[0 + bs * 0];
    c_0 = a_0 * b_0 * a_r;
    D[0 + bs * 0] = c_0;
  } else {
    for (k = 0; k < kmax - 1; k += 4) {
      a_r = Ar[0];
      b_0 = B[0 + bs * 0];
      c_0 = C[0 + bs * 0] + a_0 * b_0 * a_r;
      D[0 + bs * 0] = c_0;
      a_r = Ar[1];
      b_0 = B[0 + bs * 1];
      c_0 = C[0 + bs * 1] + a_0 * b_0 * a_r;
      D[0 + bs * 1] = c_0;
      a_r = Ar[2];
      b_0 = B[0 + bs * 2];
      c_0 = C[0 + bs * 2] + a_0 * b_0 * a_r;
      D[0 + bs * 2] = c_0;
      a_r = Ar[3];
      b_0 = B[0 + bs * 3];
      c_0 = C[0 + bs * 3] + a_0 * b_0 * a_r;
      D[0 + bs * 3] = c_0;
      Ar += 4;
      B += 16;
      C += 16;
      D += 16;
    }
    a_r = Ar[0];
    b_0 = B[0 + bs * 0];
    c_0 = C[0 + bs * 0] + a_0 * b_0 * a_r;
    D[0 + bs * 0] = c_0;
  }
}


x86 assembly (clang, -O0):
<kernel_dsyrk_diag_left_right_1_lib4>:
push   %rbp
mov    %rsp,%rbp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     112d <kernel_dsyrk_diag_left_right_1_lib4+0x2d>
jmp    14ee <kernel_dsyrk_diag_left_right_1_lib4+0x3ee>
movl   $0x4,-0x34(%rbp)
cmpl   $0xffffffff,0x10(%rbp)
jne    1167 <kernel_dsyrk_diag_left_right_1_lib4+0x67>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
jmp    1174 <kernel_dsyrk_diag_left_right_1_lib4+0x74>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x48(%rbp)
cmpl   $0x0,0x10(%rbp)
jne    130f <kernel_dsyrk_diag_left_right_1_lib4+0x20f>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    12cf <kernel_dsyrk_diag_left_right_1_lib4+0x1cf>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x38(%rbp)
jmp    1185 <kernel_dsyrk_diag_left_right_1_lib4+0x85>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
jmp    14ee <kernel_dsyrk_diag_left_right_1_lib4+0x3ee>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    14a3 <kernel_dsyrk_diag_left_right_1_lib4+0x3a3>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x18(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x20(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x20(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x20(%rax)
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x40(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x40(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x40(%rax)
mov    -0x18(%rbp),%rax
movsd  0x18(%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  0x60(%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  0x60(%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,0x60(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x20(%rbp)
mov    -0x28(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0x80,%rax
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x38(%rbp)
jmp    1316 <kernel_dsyrk_diag_left_right_1_lib4+0x216>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x28(%rbp),%rax
movsd  (%rax),%xmm1
movsd  -0x48(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x58(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<kernel_dsyrk_diag_left_right_1_lib4>:
test   %edi,%edi
jle    124d <kernel_dsyrk_diag_left_right_1_lib4+0x14d>
mov    0x8(%rsp),%eax
movsd  (%rsi),%xmm0
test   %eax,%eax
je     11ca <kernel_dsyrk_diag_left_right_1_lib4+0xca>
cmp    $0xffffffff,%eax
jne    1125 <kernel_dsyrk_diag_left_right_1_lib4+0x25>
xorpd  0xedb(%rip),%xmm0
cmp    $0x2,%edi
jb     11bb <kernel_dsyrk_diag_left_right_1_lib4+0xbb>
add    $0xffffffff,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%rdx),%xmm1
addsd  (%r8),%xmm1
movsd  %xmm1,(%r9)
movsd  0x20(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x8(%rdx),%xmm1
addsd  0x20(%r8),%xmm1
movsd  %xmm1,0x20(%r9)
movsd  0x40(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x10(%rdx),%xmm1
addsd  0x40(%r8),%xmm1
movsd  %xmm1,0x40(%r9)
movsd  0x60(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x18(%rdx),%xmm1
addsd  0x60(%r8),%xmm1
movsd  %xmm1,0x60(%r9)
add    $0x20,%rdx
sub    $0xffffffffffffff80,%rcx
sub    $0xffffffffffffff80,%r8
sub    $0xffffffffffffff80,%r9
add    $0x4,%eax
cmp    %edi,%eax
jl     1140 <kernel_dsyrk_diag_left_right_1_lib4+0x40>
mulsd  (%rcx),%xmm0
mulsd  (%rdx),%xmm0
addsd  (%r8),%xmm0
jmp    1248 <kernel_dsyrk_diag_left_right_1_lib4+0x148>
cmp    $0x2,%edi
jb     1240 <kernel_dsyrk_diag_left_right_1_lib4+0x140>
add    $0xffffffff,%edi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsd  (%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  (%rdx),%xmm1
movsd  %xmm1,(%r9)
movsd  0x20(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x8(%rdx),%xmm1
movsd  %xmm1,0x20(%r9)
movsd  0x40(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x10(%rdx),%xmm1
movsd  %xmm1,0x40(%r9)
movsd  0x60(%rcx),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x18(%rdx),%xmm1
movsd  %xmm1,0x60(%r9)
add    $0x20,%rdx
sub    $0xffffffffffffff80,%rcx
sub    $0xffffffffffffff80,%r9
add    $0x4,%eax
cmp    %edi,%eax
jl     11e0 <kernel_dsyrk_diag_left_right_1_lib4+0xe0>
mulsd  (%rcx),%xmm0
mulsd  (%rdx),%xmm0
movsd  %xmm0,(%r9)
ret

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

LLVM IR (-O2):
define void @kernel_dsyrk_diag_left_right_1_lib4(i32 %0, double* nocapture %1, double* nocapture %2, double* nocapture %3, double* nocapture %4, double* nocapture writeonly %5, i32 %6) {
%8 = icmp slt i32 %0, 1
br i1 %8, label %117, label %9
9: ; preds = %7
%10 = load double, double* %1
switch i32 %6, label %13 [
i32 -1, label %11
i32 0, label %17
]
11: ; preds = %9
%12 = fneg double %10
br label %13
13: ; preds = %9, %11
%14 = phi double [ %12, %11 ], [ %10, %9 ]
%15 = add nsw i32 %0, -1
%16 = icmp ugt i32 %0, 1
br i1 %16, label %63, label %107
17: ; preds = %9
%18 = add nsw i32 %0, -1
%19 = icmp ugt i32 %0, 1
br i1 %19, label %20, label %55
20: ; preds = %17, %20
%21 = phi i32 [ %53, %20 ], [ 0, %17 ]
%22 = phi double* [ %50, %20 ], [ %2, %17 ]
%23 = phi double* [ %51, %20 ], [ %3, %17 ]
%24 = phi double* [ %52, %20 ], [ %5, %17 ]
%25 = load double, double* %22
%26 = load double, double* %23
%27 = fmul double %10, %26
%28 = fmul double %25, %27
store double %28, double* %24
%29 = getelementptr inbounds double, double* %22, i64 1
%30 = load double, double* %29
%31 = getelementptr inbounds double, double* %23, i64 4
%32 = load double, double* %31
%33 = fmul double %10, %32
%34 = fmul double %30, %33
%35 = getelementptr inbounds double, double* %24, i64 4
store double %34, double* %35
%36 = getelementptr inbounds double, double* %22, i64 2
%37 = load double, double* %36
%38 = getelementptr inbounds double, double* %23, i64 8
%39 = load double, double* %38
%40 = fmul double %10, %39
%41 = fmul double %37, %40
%42 = getelementptr inbounds double, double* %24, i64 8
store double %41, double* %42
%43 = getelementptr inbounds double, double* %22, i64 3
%44 = load double, double* %43
%45 = getelementptr inbounds double, double* %23, i64 12
%46 = load double, double* %45
%47 = fmul double %10, %46
%48 = fmul double %44, %47
%49 = getelementptr inbounds double, double* %24, i64 12
store double %48, double* %49
%50 = getelementptr inbounds double, double* %22, i64 4
%51 = getelementptr inbounds double, double* %23, i64 16
%52 = getelementptr inbounds double, double* %24, i64 16
%53 = add nuw nsw i32 %21, 4
%54 = icmp slt i32 %53, %18
br i1 %54, label %20, label %55
55: ; preds = %20, %17
%56 = phi double* [ %5, %17 ], [ %52, %20 ]
%57 = phi double* [ %3, %17 ], [ %51, %20 ]
%58 = phi double* [ %2, %17 ], [ %50, %20 ]
%59 = load double, double* %58
%60 = load double, double* %57
%61 = fmul double %10, %60
%62 = fmul double %59, %61
store double %62, double* %56
br label %117
63: ; preds = %13, %63
%64 = phi i32 [ %105, %63 ], [ 0, %13 ]
%65 = phi double* [ %101, %63 ], [ %2, %13 ]
%66 = phi double* [ %102, %63 ], [ %3, %13 ]
%67 = phi double* [ %104, %63 ], [ %5, %13 ]
%68 = phi double* [ %103, %63 ], [ %4, %13 ]
%69 = load double, double* %65
%70 = load double, double* %66
%71 = load double, double* %68
%72 = fmul double %14, %70
%73 = tail call double @llvm.fmuladd.f64(double %72, double %69, double %71)
store double %73, double* %67
%74 = getelementptr inbounds double, double* %65, i64 1
%75 = load double, double* %74
%76 = getelementptr inbounds double, double* %66, i64 4
%77 = load double, double* %76
%78 = getelementptr inbounds double, double* %68, i64 4
%79 = load double, double* %78
%80 = fmul double %14, %77
%81 = tail call double @llvm.fmuladd.f64(double %80, double %75, double %79)
%82 = getelementptr inbounds double, double* %67, i64 4
store double %81, double* %82
%83 = getelementptr inbounds double, double* %65, i64 2
%84 = load double, double* %83
%85 = getelementptr inbounds double, double* %66, i64 8
%86 = load double, double* %85
%87 = getelementptr inbounds double, double* %68, i64 8
%88 = load double, double* %87
%89 = fmul double %14, %86
%90 = tail call double @llvm.fmuladd.f64(double %89, double %84, double %88)
%91 = getelementptr inbounds double, double* %67, i64 8
store double %90, double* %91
%92 = getelementptr inbounds double, double* %65, i64 3
%93 = load double, double* %92
%94 = getelementptr inbounds double, double* %66, i64 12
%95 = load double, double* %94
%96 = getelementptr inbounds double, double* %68, i64 12
%97 = load double, double* %96
%98 = fmul double %14, %95
%99 = tail call double @llvm.fmuladd.f64(double %98, double %93, double %97)
%100 = getelementptr inbounds double, double* %67, i64 12
store double %99, double* %100
%101 = getelementptr inbounds double, double* %65, i64 4
%102 = getelementptr inbounds double, double* %66, i64 16
%103 = getelementptr inbounds double, double* %68, i64 16
%104 = getelementptr inbounds double, double* %67, i64 16
%105 = add nuw nsw i32 %64, 4
%106 = icmp slt i32 %105, %15
br i1 %106, label %63, label %107
107: ; preds = %63, %13
%108 = phi double* [ %4, %13 ], [ %103, %63 ]
%109 = phi double* [ %5, %13 ], [ %104, %63 ]
%110 = phi double* [ %3, %13 ], [ %102, %63 ]
%111 = phi double* [ %2, %13 ], [ %101, %63 ]
%112 = load double, double* %111
%113 = load double, double* %110
%114 = load double, double* %108
%115 = fmul double %14, %113
%116 = tail call double @llvm.fmuladd.f64(double %115, double %112, double %114)
store double %116, double* %109
br label %117
117: ; preds = %55, %107, %7
ret void
}