void mul_mdmd_md_l1_arb_k(int K, const double *const A, const double *const B,
                          double *const C, const int Astride, const int Bstride,
                          const int Cstride) {
  const double *a0, *b0;
  double *c0;
  const double *ap0_0, *ap0_1;
  const double *bp0;
  double *cp0;
  const int A_sbs_stride = Astride * 2;
  const int C_sbs_stride = Cstride * 2;
  const int k_marg_el = K & 1;
  const int k_norm = K - k_marg_el;
  double *const c0_endp = C + 8 * Cstride;
  register double c00, c01, c10, c11;
  for (c0 = C, a0 = A; c0 != c0_endp; c0 += C_sbs_stride, a0 += A_sbs_stride) {
    const double *const ap0_endp = a0 + k_norm;
    double *const cp0_endp = c0 + 8;
    for (b0 = B, cp0 = c0; cp0 != cp0_endp; b0 += 2, cp0 += 2) {
      ap0_0 = a0;
      ap0_1 = ap0_0 + Astride;
      bp0 = b0;
      {
        double *_cp = cp0;
        c00 = _cp[0];
        c01 = _cp[1];
        _cp += Cstride;
        c10 = _cp[0];
        c11 = _cp[1];
      };
      for (; ap0_0 != ap0_endp; ap0_0 += 2, ap0_1 += 2) {
        {
          register double _b0, _b1;
          register double _a0, _a1;
          _b0 = bp0[0];
          _b1 = bp0[1];
          bp0 += Bstride;
          _a0 = ap0_0[0];
          c00 += _a0 * _b0;
          c01 += _a0 * _b1;
          _a1 = ap0_1[0];
          c10 += _a1 * _b0;
          c11 += _a1 * _b1;
          _b0 = bp0[0];
          _b1 = bp0[1];
          bp0 += Bstride;
          _a0 = ap0_0[1];
          c00 += _a0 * _b0;
          c01 += _a0 * _b1;
          _a1 = ap0_1[1];
          c10 += _a1 * _b0;
          c11 += _a1 * _b1;
        };
      }
      if (k_marg_el & 0x1) {
        {
          register double _b0, _b1;
          register double _a0, _a1;
          _b0 = bp0[0];
          _b1 = bp0[1];
          bp0 += Bstride;
          _a0 = ap0_0[0];
          c00 += _a0 * _b0;
          c01 += _a0 * _b1;
          _a1 = ap0_1[0];
          c10 += _a1 * _b0;
          c11 += _a1 * _b1;
        };
      }
      {
        double *_cp = cp0;
        _cp[0] = c00;
        _cp[1] = c01;
        _cp += Cstride;
        _cp[0] = c10;
        _cp[1] = c11;
      };
    }
  }
}


x86 assembly (clang, -O0):
<mul_mdmd_md_l1_arb_k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x78,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9d,-0x28(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    0x10(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x6c(%rbp),%eax
mov    %eax,-0x70(%rbp)
mov    -0x20(%rbp),%rax
mov    0x10(%rbp),%ecx
shl    $0x3,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x78(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x78(%rbp),%rax
je     1627 <mul_mdmd_md_l1_arb_k+0x527>
mov    -0x30(%rbp),%rax
movslq -0x70(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x40(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0xa8(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
cmp    -0xa8(%rbp),%rax
je     15f3 <mul_mdmd_md_l1_arb_k+0x4f3>
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x24(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0xb0(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    0x10(%rbp),%ecx
mov    -0xb0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0xb0(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x48(%rbp),%rax
cmp    -0xa0(%rbp),%rax
je     1466 <mul_mdmd_md_l1_arb_k+0x366>
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xc0(%rbp)
ff
mov    -0x28(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xd0(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xd0(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x48(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x48(%rbp)
mov    -0x50(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x50(%rbp)
jmp    1256 <mul_mdmd_md_l1_arb_k+0x156>
mov    -0x6c(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1565 <mul_mdmd_md_l1_arb_k+0x465>
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xd8(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xe0(%rbp)
ff
mov    -0x28(%rbp),%ecx
mov    -0x58(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x58(%rbp)
mov    -0x48(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xe8(%rbp)
ff
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  -0xe8(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xf0(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xd8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
movsd  -0xf0(%rbp),%xmm0
ff
movsd  -0xe0(%rbp),%xmm2
ff
movsd  -0x98(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x98(%rbp)
ff
mov    -0x60(%rbp),%rax
mov    %rax,-0xf8(%rbp)
movsd  -0x80(%rbp),%xmm0
mov    -0xf8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0xf8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    0x10(%rbp),%ecx
mov    -0xf8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xf8(%rbp)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xf8(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x98(%rbp),%xmm0
ff
mov    -0xf8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x38(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x38(%rbp)
mov    -0x60(%rbp),%rax
add    $0x10,%rax
mov    %rax,-0x60(%rbp)
jmp    11b1 <mul_mdmd_md_l1_arb_k+0xb1>
jmp    15f8 <mul_mdmd_md_l1_arb_k+0x4f8>
mov    -0x68(%rbp),%ecx
mov    -0x40(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x64(%rbp),%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x30(%rbp)
jmp    116e <mul_mdmd_md_l1_arb_k+0x6e>
add    $0x78,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_mdmd_md_l1_arb_k>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %rdx,-0x18(%rsp)
mov    0x38(%rsp),%eax
test   %eax,%eax
je     12dd <mul_mdmd_md_l1_arb_k+0x1dd>
mov    %rcx,%r10
lea    0x0(,%rax,8),%ecx
movslq %ecx,%rcx
lea    (%r10,%rcx,8),%rcx
mov    %rcx,-0x20(%rsp)
mov    %edi,%r15d
and    $0xfffffffe,%r15d
movslq %r15d,%rcx
movslq %r8d,%rdx
add    %r8d,%r8d
movslq %eax,%r12
add    %eax,%eax
movslq %r9d,%r13
cltq
mov    %rax,-0x38(%rsp)
movslq %r8d,%rax
mov    %rcx,-0x28(%rsp)
lea    0x0(,%rcx,8),%rbp
shl    $0x3,%rax
mov    %rax,-0x40(%rsp)
mov    %rdx,-0x30(%rsp)
lea    (%rsi,%rdx,8),%rbx
mov    %r13,%rax
shl    $0x4,%rax
jmp    119f <mul_mdmd_md_l1_arb_k+0x9f>
nopl   0x0(%rax,%rax,1)
mov    -0x38(%rsp),%rcx
lea    (%r10,%rcx,8),%r10
mov    -0x40(%rsp),%rcx
add    %rcx,%rsi
add    %rcx,%rbx
cmp    -0x20(%rsp),%r10
je     12dd <mul_mdmd_md_l1_arb_k+0x1dd>
mov    -0x28(%rsp),%rcx
lea    (%rsi,%rcx,8),%rcx
mov    %rcx,-0x8(%rsp)
mov    -0x30(%rsp),%rcx
lea    (%rsi,%rcx,8),%rcx
mov    %rcx,-0x10(%rsp)
mov    %r10,%rcx
mov    -0x18(%rsp),%r8
xor    %r14d,%r14d
jmp    11f0 <mul_mdmd_md_l1_arb_k+0xf0>
nopl   0x0(%rax,%rax,1)
movupd %xmm1,(%rcx)
movupd %xmm0,(%rcx,%r12,8)
add    $0x10,%r8
lea    (%r10,%r14,8),%rcx
add    $0x10,%rcx
add    $0x2,%r14
cmp    $0x8,%r14
je     1180 <mul_mdmd_md_l1_arb_k+0x80>
movupd (%rcx),%xmm1
movupd (%rcx,%r12,8),%xmm0
mov    %r8,%r11
test   %r15d,%r15d
je     12a0 <mul_mdmd_md_l1_arb_k+0x1a0>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movupd (%r11),%xmm6
movsd  (%rsi,%rdx,1),%xmm3
movsd  0x8(%rsi,%rdx,1),%xmm2
unpcklpd %xmm3,%xmm3
mulpd  %xmm6,%xmm3
addpd  %xmm1,%xmm3
movsd  (%rbx,%rdx,1),%xmm5
movsd  0x8(%rbx,%rdx,1),%xmm4
unpcklpd %xmm5,%xmm5
mulpd  %xmm6,%xmm5
addpd  %xmm0,%xmm5
movupd (%r11,%r13,8),%xmm0
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
movapd %xmm2,%xmm1
addpd  %xmm3,%xmm1
unpcklpd %xmm4,%xmm4
mulpd  %xmm0,%xmm4
movapd %xmm4,%xmm0
addpd  %xmm5,%xmm0
add    $0x10,%rdx
add    %rax,%r11
cmp    %rdx,%rbp
jne    1210 <mul_mdmd_md_l1_arb_k+0x110>
addpd  %xmm5,%xmm4
addpd  %xmm3,%xmm2
add    %rbx,%rdx
mov    -0x8(%rsp),%r9
movapd %xmm4,%xmm0
movapd %xmm2,%xmm1
test   $0x1,%dil
je     11d0 <mul_mdmd_md_l1_arb_k+0xd0>
jmp    12b2 <mul_mdmd_md_l1_arb_k+0x1b2>
nopl   0x0(%rax)
mov    -0x10(%rsp),%rdx
mov    %rsi,%r9
test   $0x1,%dil
je     11d0 <mul_mdmd_md_l1_arb_k+0xd0>
movupd (%r11),%xmm2
movsd  (%r9),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
addpd  %xmm3,%xmm1
movsd  (%rdx),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
addpd  %xmm3,%xmm0
jmp    11d0 <mul_mdmd_md_l1_arb_k+0xd0>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @mul_mdmd_md_l1_arb_k(i32 %0, double* %1, double* nocapture %2, double* %3, i32 %4, i32 %5, i32 %6) {
%8 = shl nsw i32 %6, 3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds double, double* %3, i64 %9
%11 = icmp eq i32 %6, 0
br i1 %11, label %107, label %12
12: ; preds = %7
%13 = and i32 %0, -2
%14 = and i32 %0, 1
%15 = shl nsw i32 %6, 1
%16 = shl nsw i32 %4, 1
%17 = sext i32 %13 to i64
%18 = sext i32 %4 to i64
%19 = sext i32 %6 to i64
%20 = icmp eq i32 %14, 0
%21 = sext i32 %5 to i64
%22 = sext i32 %15 to i64
%23 = sext i32 %16 to i64
%24 = icmp eq i32 %13, 0
br label %25
25: ; preds = %12, %103
%26 = phi double* [ %1, %12 ], [ %105, %103 ]
%27 = phi double* [ %3, %12 ], [ %104, %103 ]
%28 = getelementptr inbounds double, double* %26, i64 %17
%29 = getelementptr inbounds double, double* %26, i64 %18
br label %30
30: ; preds = %25, %94
%31 = phi double* [ %27, %25 ], [ %101, %94 ]
%32 = phi double* [ %2, %25 ], [ %99, %94 ]
%33 = phi i64 [ 0, %25 ], [ %100, %94 ]
%34 = bitcast double* %31 to <2 x double>*
%35 = load <2 x double>, <2 x double>* %34
%36 = getelementptr inbounds double, double* %31, i64 %19
%37 = bitcast double* %36 to <2 x double>*
%38 = load <2 x double>, <2 x double>* %37
br i1 %24, label %77, label %39
39: ; preds = %30, %39
%40 = phi double* [ %69, %39 ], [ %26, %30 ]
%41 = phi double* [ %70, %39 ], [ %29, %30 ]
%42 = phi double* [ %58, %39 ], [ %32, %30 ]
%43 = phi <2 x double> [ %68, %39 ], [ %38, %30 ]
%44 = phi <2 x double> [ %63, %39 ], [ %35, %30 ]
%45 = bitcast double* %42 to <2 x double>*
%46 = load <2 x double>, <2 x double>* %45
%47 = getelementptr inbounds double, double* %42, i64 %21
%48 = load double, double* %40
%49 = insertelement <2 x double> poison, double %48, i64 0
%50 = shufflevector <2 x double> %49, <2 x double> poison, <2 x i32> zeroinitializer
%51 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %46, <2 x double> %44)
%52 = load double, double* %41
%53 = insertelement <2 x double> poison, double %52, i64 0
%54 = shufflevector <2 x double> %53, <2 x double> poison, <2 x i32> zeroinitializer
%55 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %46, <2 x double> %43)
%56 = bitcast double* %47 to <2 x double>*
%57 = load <2 x double>, <2 x double>* %56
%58 = getelementptr inbounds double, double* %47, i64 %21
%59 = getelementptr inbounds double, double* %40, i64 1
%60 = load double, double* %59
%61 = insertelement <2 x double> poison, double %60, i64 0
%62 = shufflevector <2 x double> %61, <2 x double> poison, <2 x i32> zeroinitializer
%63 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %62, <2 x double> %57, <2 x double> %51)
%64 = getelementptr inbounds double, double* %41, i64 1
%65 = load double, double* %64
%66 = insertelement <2 x double> poison, double %65, 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> %67, <2 x double> %57, <2 x double> %55)
%69 = getelementptr inbounds double, double* %40, i64 2
%70 = getelementptr inbounds double, double* %41, i64 2
%71 = icmp eq double* %69, %28
br i1 %71, label %72, label %39
72: ; preds = %39
%73 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %54, <2 x double> %46, <2 x double> %43)
%74 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %67, <2 x double> %57, <2 x double> %73)
%75 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %50, <2 x double> %46, <2 x double> %44)
%76 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %62, <2 x double> %57, <2 x double> %75)
br label %77
77: ; preds = %72, %30
%78 = phi double* [ %32, %30 ], [ %58, %72 ]
%79 = phi double* [ %29, %30 ], [ %70, %72 ]
%80 = phi double* [ %26, %30 ], [ %28, %72 ]
%81 = phi <2 x double> [ %38, %30 ], [ %74, %72 ]
%82 = phi <2 x double> [ %35, %30 ], [ %76, %72 ]
br i1 %20, label %94, label %83
83: ; preds = %77
%84 = bitcast double* %78 to <2 x double>*
%85 = load <2 x double>, <2 x double>* %84
%86 = load double, double* %80
%87 = insertelement <2 x double> poison, double %86, i64 0
%88 = shufflevector <2 x double> %87, <2 x double> poison, <2 x i32> zeroinitializer
%89 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %88, <2 x double> %85, <2 x double> %82)
%90 = load double, double* %79
%91 = insertelement <2 x double> poison, double %90, i64 0
%92 = shufflevector <2 x double> %91, <2 x double> poison, <2 x i32> zeroinitializer
%93 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %92, <2 x double> %85, <2 x double> %81)
br label %94
94: ; preds = %83, %77
%95 = phi <2 x double> [ %93, %83 ], [ %81, %77 ]
%96 = phi <2 x double> [ %89, %83 ], [ %82, %77 ]
%97 = bitcast double* %31 to <2 x double>*
store <2 x double> %96, <2 x double>* %97
%98 = bitcast double* %36 to <2 x double>*
store <2 x double> %95, <2 x double>* %98
%99 = getelementptr inbounds double, double* %32, i64 2
%100 = add nuw nsw i64 %33, 2
%101 = getelementptr inbounds double, double* %27, i64 %100
%102 = icmp eq i64 %100, 8
br i1 %102, label %103, label %30
103: ; preds = %94
%104 = getelementptr inbounds double, double* %27, i64 %22
%105 = getelementptr inbounds double, double* %26, i64 %23
%106 = icmp eq double* %104, %10
br i1 %106, label %107, label %25
107: ; preds = %103, %7
ret void
}