void mul_mdmd_md_l1(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;
  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 + 8;
    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;
        };
      }
      {
        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>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x64(%rbp)
mov    -0x24(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x68(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x24(%rbp),%ecx
shl    $0x3,%ecx
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x70(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x40(%rbp),%rax
cmp    -0x70(%rbp),%rax
je     14fa <mul_mdmd_md_l1+0x3fa>
mov    -0x30(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0x98(%rbp)
mov    -0x40(%rbp),%rax
add    $0x40,%rax
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x60(%rbp),%rax
cmp    -0xa0(%rbp),%rax
je     14c6 <mul_mdmd_md_l1+0x3c6>
mov    -0x30(%rbp),%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
movslq -0x1c(%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,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x78(%rbp)
mov    -0xa8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x24(%rbp),%ecx
mov    -0xa8(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xa8(%rbp)
mov    -0xa8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
mov    -0xa8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x48(%rbp),%rax
cmp    -0x98(%rbp),%rax
je     143b <mul_mdmd_md_l1+0x33b>
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%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,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x50(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0xb0(%rbp)
ff
mov    -0x58(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xb8(%rbp)
ff
mov    -0x20(%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,-0xc0(%rbp)
ff
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x78(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  -0xc0(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x80(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x80(%rbp)
mov    -0x50(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0xc8(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm2
ff
movsd  -0x88(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x88(%rbp)
ff
movsd  -0xc8(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm2
ff
movsd  -0x90(%rbp),%xmm1
ff
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x90(%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    1237 <mul_mdmd_md_l1+0x137>
mov    -0x60(%rbp),%rax
mov    %rax,-0xd0(%rbp)
movsd  -0x78(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x80(%rbp),%xmm0
mov    -0xd0(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x24(%rbp),%ecx
mov    -0xd0(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0xd0(%rbp)
movsd  -0x88(%rbp),%xmm0
ff
mov    -0xd0(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x90(%rbp),%xmm0
ff
mov    -0xd0(%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    1195 <mul_mdmd_md_l1+0x95>
jmp    14cb <mul_mdmd_md_l1+0x3cb>
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    1159 <mul_mdmd_md_l1+0x59>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mul_mdmd_md_l1>:
push   %r15
push   %r14
push   %r12
push   %rbx
test   %r9d,%r9d
je     12f5 <mul_mdmd_md_l1+0x1f5>
lea    0x0(,%r9,8),%eax
cltq
lea    (%rdx,%rax,8),%r10
movslq %ecx,%rax
add    %ecx,%ecx
movslq %r9d,%r11
add    %r9d,%r9d
movslq %r8d,%r8
movslq %r9d,%r9
movslq %ecx,%r14
shl    $0x3,%r9
shl    $0x3,%r11
lea    0x0(,%r8,8),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%rdx,%r11,1),%r15
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movupd (%rdx,%rcx,8),%xmm1
movupd (%r15,%rcx,8),%xmm8
lea    (%rsi,%rcx,8),%rbx
movupd (%rsi,%rcx,8),%xmm9
movsd  (%rdi),%xmm6
movsd  0x8(%rdi),%xmm4
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm0
unpcklpd %xmm6,%xmm6
mulpd  %xmm9,%xmm6
addpd  %xmm1,%xmm6
movsd  (%rdi,%rax,8),%xmm7
movsd  0x8(%rdi,%rax,8),%xmm5
movsd  0x10(%rdi,%rax,8),%xmm3
movsd  0x18(%rdi,%rax,8),%xmm1
unpcklpd %xmm7,%xmm7
mulpd  %xmm9,%xmm7
addpd  %xmm8,%xmm7
movupd (%rbx,%r8,8),%xmm8
add    %r12,%rbx
unpcklpd %xmm4,%xmm4
mulpd  %xmm8,%xmm4
addpd  %xmm6,%xmm4
unpcklpd %xmm5,%xmm5
mulpd  %xmm8,%xmm5
addpd  %xmm7,%xmm5
movupd (%rbx,%r8,8),%xmm6
add    %r12,%rbx
unpcklpd %xmm2,%xmm2
mulpd  %xmm6,%xmm2
addpd  %xmm4,%xmm2
unpcklpd %xmm3,%xmm3
mulpd  %xmm6,%xmm3
addpd  %xmm5,%xmm3
movupd (%rbx,%r8,8),%xmm4
add    %r12,%rbx
unpcklpd %xmm0,%xmm0
mulpd  %xmm4,%xmm0
addpd  %xmm2,%xmm0
unpcklpd %xmm1,%xmm1
mulpd  %xmm4,%xmm1
addpd  %xmm3,%xmm1
movupd (%rbx,%r8,8),%xmm2
add    %r12,%rbx
movsd  0x20(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm2,%xmm3
addpd  %xmm0,%xmm3
movsd  0x20(%rdi,%rax,8),%xmm0
unpcklpd %xmm0,%xmm0
mulpd  %xmm2,%xmm0
addpd  %xmm1,%xmm0
movupd (%rbx,%r8,8),%xmm1
add    %r12,%rbx
movsd  0x28(%rdi),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm3,%xmm2
movsd  0x28(%rdi,%rax,8),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm1,%xmm3
addpd  %xmm0,%xmm3
movupd (%rbx,%r8,8),%xmm0
add    %r12,%rbx
movsd  0x30(%rdi),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm2,%xmm1
movsd  0x30(%rdi,%rax,8),%xmm2
unpcklpd %xmm2,%xmm2
mulpd  %xmm0,%xmm2
addpd  %xmm3,%xmm2
movupd (%rbx,%r8,8),%xmm0
movsd  0x38(%rdi),%xmm3
unpcklpd %xmm3,%xmm3
mulpd  %xmm0,%xmm3
addpd  %xmm1,%xmm3
movsd  0x38(%rdi,%rax,8),%xmm1
unpcklpd %xmm1,%xmm1
mulpd  %xmm0,%xmm1
addpd  %xmm2,%xmm1
movupd %xmm3,(%rdx,%rcx,8)
movupd %xmm1,(%r15,%rcx,8)
add    $0x2,%rcx
cmp    $0x8,%rcx
jne    1160 <mul_mdmd_md_l1+0x60>
add    %r9,%rdx
lea    (%rdi,%r14,8),%rdi
cmp    %r10,%rdx
jne    1150 <mul_mdmd_md_l1+0x50>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

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