user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<kernel_dgemm_dtrsm_nt_2x4_vs_lib4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r11d
  mov    %esi,%r15d
  mov    %edx,%edi
  mov    0x38(%rsp),%rsi
  mov    0x40(%rsp),%rdx
  mov    0x48(%rsp),%rax
  mov    0x50(%rsp),%r12
  mov    0x58(%rsp),%rbp
  mov    0x60(%rsp),%rbx
  test   %ecx,%ecx
  jle    L157
  mov    %ecx,%r10d
  cmp    $0x1,%edi
  je     L165
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm10
  movapd %xmm0,%xmm11
  mov    $0x0,%r14d
L168:
  lea    -0x3(%r10),%ecx
  cmp    %ecx,%r14d
  jge    L9
  lea    -0x4(%r10),%r13d
  sub    %r14d,%r13d
  shr    $0x2,%r13d
  lea    0x1(%r13),%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  mov    %rcx,-0x8(%rsp)
  lea    (%r9,%rcx,1),%rdi
  mov    %rsi,%rcx
L150:
  movsd  (%r9),%xmm13
  movsd  0x8(%r9),%xmm6
  movsd  (%rcx),%xmm7
  movsd  0x8(%rcx),%xmm15
  movsd  0x10(%rcx),%xmm14
  movsd  0x18(%rcx),%xmm9
  movapd %xmm13,%xmm12
  mulsd  %xmm7,%xmm12
  addsd  %xmm11,%xmm12
  mulsd  %xmm6,%xmm7
  addsd  %xmm4,%xmm7
  movapd %xmm13,%xmm5
  mulsd  %xmm15,%xmm5
  addsd  %xmm10,%xmm5
  mulsd  %xmm6,%xmm15
  addsd  %xmm15,%xmm3
  movapd %xmm13,%xmm4
  mulsd  %xmm14,%xmm4
  addsd  %xmm4,%xmm8
  mulsd  %xmm6,%xmm14
  addsd  %xmm14,%xmm2
  mulsd  %xmm9,%xmm13
  addsd  %xmm13,%xmm1
  mulsd  %xmm9,%xmm6
  addsd  %xmm6,%xmm0
  movsd  0x20(%r9),%xmm15
  movsd  0x28(%r9),%xmm6
  movsd  0x20(%rcx),%xmm4
  movsd  0x28(%rcx),%xmm9
  movsd  0x30(%rcx),%xmm11
  movsd  0x38(%rcx),%xmm14
  movapd %xmm15,%xmm10
  mulsd  %xmm4,%xmm10
  addsd  %xmm12,%xmm10
  mulsd  %xmm6,%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm15,%xmm13
  mulsd  %xmm9,%xmm13
  addsd  %xmm5,%xmm13
  mulsd  %xmm6,%xmm9
  addsd  %xmm3,%xmm9
  movapd %xmm15,%xmm12
  mulsd  %xmm11,%xmm12
  addsd  %xmm8,%xmm12
  mulsd  %xmm6,%xmm11
  addsd  %xmm11,%xmm2
  mulsd  %xmm14,%xmm15
  addsd  %xmm15,%xmm1
  mulsd  %xmm14,%xmm6
  addsd  %xmm6,%xmm0
  movsd  0x40(%r9),%xmm5
  movsd  0x48(%r9),%xmm3
  movsd  0x40(%rcx),%xmm8
  movsd  0x48(%rcx),%xmm7
  movsd  0x50(%rcx),%xmm6
  movsd  0x58(%rcx),%xmm14
  movapd %xmm5,%xmm11
  mulsd  %xmm8,%xmm11
  addsd  %xmm10,%xmm11
  mulsd  %xmm3,%xmm8
  addsd  %xmm4,%xmm8
  movapd %xmm5,%xmm10
  mulsd  %xmm7,%xmm10
  addsd  %xmm13,%xmm10
  mulsd  %xmm3,%xmm7
  addsd  %xmm9,%xmm7
  movapd %xmm5,%xmm9
  mulsd  %xmm6,%xmm9
  addsd  %xmm12,%xmm9
  mulsd  %xmm3,%xmm6
  addsd  %xmm2,%xmm6
  mulsd  %xmm14,%xmm5
  addsd  %xmm1,%xmm5
  mulsd  %xmm14,%xmm3
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm12
  movsd  0x60(%r9),%xmm1
  movsd  0x68(%r9),%xmm0
  movsd  0x60(%rcx),%xmm4
  movsd  0x68(%rcx),%xmm3
  movsd  0x70(%rcx),%xmm2
  movsd  0x78(%rcx),%xmm13
  movapd %xmm1,%xmm14
  mulsd  %xmm4,%xmm14
  addsd  %xmm14,%xmm11
  mulsd  %xmm0,%xmm4
  addsd  %xmm8,%xmm4
  movapd %xmm1,%xmm8
  mulsd  %xmm3,%xmm8
  addsd  %xmm8,%xmm10
  mulsd  %xmm0,%xmm3
  addsd  %xmm7,%xmm3
  movapd %xmm1,%xmm8
  mulsd  %xmm2,%xmm8
  addsd  %xmm9,%xmm8
  mulsd  %xmm0,%xmm2
  addsd  %xmm6,%xmm2
  mulsd  %xmm13,%xmm1
  addsd  %xmm5,%xmm1
  mulsd  %xmm13,%xmm0
  addsd  %xmm12,%xmm0
  sub    $0xffffffffffffff80,%r9
  sub    $0xffffffffffffff80,%rcx
  cmp    %rdi,%r9
  jne    L150
  add    -0x8(%rsp),%rsi
  lea    0x4(%r14,%r13,4),%r14d
L107:
  cmp    %r14d,%r10d
  jle    L1
  lea    -0x1(%r10),%ecx
  sub    %r14d,%ecx
  add    $0x1,%rcx
  shl    $0x5,%rcx
  add    %rdi,%rcx
L94:
  movsd  (%rdi),%xmm6
  movsd  0x8(%rdi),%xmm5
  movsd  (%rsi),%xmm13
  movsd  0x8(%rsi),%xmm9
  movsd  0x10(%rsi),%xmm7
  movsd  0x18(%rsi),%xmm12
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  addsd  %xmm14,%xmm11
  mulsd  %xmm5,%xmm13
  addsd  %xmm13,%xmm4
  movapd %xmm6,%xmm13
  mulsd  %xmm9,%xmm13
  addsd  %xmm13,%xmm10
  mulsd  %xmm5,%xmm9
  addsd  %xmm9,%xmm3
  movapd %xmm6,%xmm9
  mulsd  %xmm7,%xmm9
  addsd  %xmm9,%xmm8
  mulsd  %xmm5,%xmm7
  addsd  %xmm7,%xmm2
  mulsd  %xmm12,%xmm6
  addsd  %xmm6,%xmm1
  mulsd  %xmm12,%xmm5
  addsd  %xmm5,%xmm0
  add    $0x20,%rdi
  add    $0x20,%rsi
  cmp    %rcx,%rdi
  jne    L94
L1:
  cmp    $0x3,%r8d
  jle    L172
  lea    -0x4(%r8),%ecx
  shr    $0x2,%ecx
  add    $0x1,%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  add    %rdx,%rcx
L64:
  movsd  (%rdx),%xmm6
  movsd  0x8(%rdx),%xmm5
  movsd  (%rax),%xmm13
  movsd  0x8(%rax),%xmm12
  movsd  0x10(%rax),%xmm7
  movsd  0x18(%rax),%xmm9
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm11
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm4
  movapd %xmm6,%xmm13
  mulsd  %xmm12,%xmm13
  subsd  %xmm13,%xmm10
  mulsd  %xmm5,%xmm12
  subsd  %xmm12,%xmm3
  movapd %xmm6,%xmm12
  mulsd  %xmm7,%xmm12
  subsd  %xmm12,%xmm8
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm2
  mulsd  %xmm9,%xmm6
  subsd  %xmm6,%xmm1
  mulsd  %xmm9,%xmm5
  subsd  %xmm5,%xmm0
  movsd  0x20(%rdx),%xmm6
  movsd  0x28(%rdx),%xmm5
  movsd  0x20(%rax),%xmm13
  movsd  0x28(%rax),%xmm12
  movsd  0x30(%rax),%xmm7
  movsd  0x38(%rax),%xmm9
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm11
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm4
  movapd %xmm6,%xmm13
  mulsd  %xmm12,%xmm13
  subsd  %xmm13,%xmm10
  mulsd  %xmm5,%xmm12
  subsd  %xmm12,%xmm3
  movapd %xmm6,%xmm12
  mulsd  %xmm7,%xmm12
  subsd  %xmm12,%xmm8
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm2
  mulsd  %xmm9,%xmm6
  subsd  %xmm6,%xmm1
  mulsd  %xmm9,%xmm5
  subsd  %xmm5,%xmm0
  movsd  0x40(%rdx),%xmm6
  movsd  0x48(%rdx),%xmm5
  movsd  0x40(%rax),%xmm12
  movsd  0x48(%rax),%xmm9
  movsd  0x50(%rax),%xmm7
  movsd  0x58(%rax),%xmm13
  movapd %xmm6,%xmm14
  mulsd  %xmm12,%xmm14
  subsd  %xmm14,%xmm11
  mulsd  %xmm5,%xmm12
  subsd  %xmm12,%xmm4
  movapd %xmm6,%xmm12
  mulsd  %xmm9,%xmm12
  subsd  %xmm12,%xmm10
  mulsd  %xmm5,%xmm9
  subsd  %xmm9,%xmm3
  movapd %xmm6,%xmm9
  mulsd  %xmm7,%xmm9
  subsd  %xmm9,%xmm8
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm2
  mulsd  %xmm13,%xmm6
  subsd  %xmm6,%xmm1
  mulsd  %xmm13,%xmm5
  subsd  %xmm5,%xmm0
  movsd  0x60(%rdx),%xmm6
  movsd  0x68(%rdx),%xmm5
  movsd  0x60(%rax),%xmm13
  movsd  0x68(%rax),%xmm12
  movsd  0x70(%rax),%xmm9
  movsd  0x78(%rax),%xmm7
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm11
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm4
  movapd %xmm6,%xmm13
  mulsd  %xmm12,%xmm13
  subsd  %xmm13,%xmm10
  mulsd  %xmm5,%xmm12
  subsd  %xmm12,%xmm3
  movapd %xmm6,%xmm12
  mulsd  %xmm9,%xmm12
  subsd  %xmm12,%xmm8
  mulsd  %xmm5,%xmm9
  subsd  %xmm9,%xmm2
  mulsd  %xmm7,%xmm6
  subsd  %xmm6,%xmm1
  mulsd  %xmm7,%xmm5
  subsd  %xmm5,%xmm0
  sub    $0xffffffffffffff80,%rdx
  sub    $0xffffffffffffff80,%rax
  cmp    %rcx,%rdx
  jne    L64
L172:
  cmpl   $0x0,0x68(%rsp)
  je     L69
  addsd  (%r12),%xmm11
  addsd  0x8(%r12),%xmm4
  addsd  0x20(%r12),%xmm10
  addsd  0x28(%r12),%xmm3
  addsd  0x40(%r12),%xmm8
  addsd  0x48(%r12),%xmm2
  addsd  0x60(%r12),%xmm1
  addsd  0x68(%r12),%xmm0
L69:
  movsd  (%rbx),%xmm5
  mulsd  %xmm5,%xmm11
  mulsd  %xmm5,%xmm4
  movsd  %xmm11,0x0(%rbp)
  cmp    $0x3,%r11d
  jle    L17
  movsd  %xmm4,0x8(%rbp)
  movsd  0x8(%rbx),%xmm5
  movsd  0x10(%rbx),%xmm6
  movapd %xmm5,%xmm7
  mulsd  %xmm11,%xmm7
  subsd  %xmm7,%xmm10
  mulsd  %xmm4,%xmm5
  subsd  %xmm5,%xmm3
  mulsd  %xmm6,%xmm10
  mulsd  %xmm6,%xmm3
  movsd  %xmm10,0x20(%rbp)
  movsd  %xmm3,0x28(%rbp)
  movsd  0x18(%rbx),%xmm7
  movsd  0x20(%rbx),%xmm5
  movsd  0x28(%rbx),%xmm6
  movapd %xmm11,%xmm9
  mulsd  %xmm7,%xmm9
  subsd  %xmm9,%xmm8
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm2
  movapd %xmm5,%xmm7
  mulsd  %xmm10,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm2
  mulsd  %xmm6,%xmm8
  mulsd  %xmm6,%xmm2
  movsd  %xmm8,0x40(%rbp)
  movsd  %xmm2,0x48(%rbp)
L179:
  cmp    $0x3,%r15d
  je     L151
  movsd  0x30(%rbx),%xmm7
  movsd  0x38(%rbx),%xmm6
  movsd  0x40(%rbx),%xmm9
  movsd  0x48(%rbx),%xmm5
  mulsd  %xmm7,%xmm11
  subsd  %xmm11,%xmm1
  mulsd  %xmm6,%xmm10
  subsd  %xmm10,%xmm1
  mulsd  %xmm9,%xmm8
  subsd  %xmm8,%xmm1
  mulsd  %xmm5,%xmm1
  movsd  %xmm1,0x60(%rbp)
  cmp    $0x3,%r11d
  jle    L151
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm0
  mulsd  %xmm3,%xmm6
  subsd  %xmm6,%xmm0
  mulsd  %xmm9,%xmm2
  subsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x68(%rbp)
L151:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L165:
  cmp    $0x1,%ecx
  jle    L120
  movsd  (%r9),%xmm0
  movapd %xmm0,%xmm10
  mulsd  (%rsi),%xmm10
  pxor   %xmm5,%xmm5
  addsd  %xmm5,%xmm10
  movapd %xmm0,%xmm8
  mulsd  0x8(%rsi),%xmm8
  addsd  %xmm5,%xmm8
  movapd %xmm0,%xmm9
  mulsd  0x10(%rsi),%xmm9
  addsd  %xmm5,%xmm9
  mulsd  0x18(%rsi),%xmm0
  addsd  %xmm5,%xmm0
  movapd %xmm0,%xmm6
  movsd  0x20(%r9),%xmm1
  movsd  0x28(%r9),%xmm0
  movsd  0x20(%rsi),%xmm4
  movsd  0x28(%rsi),%xmm3
  movsd  0x30(%rsi),%xmm2
  movsd  0x38(%rsi),%xmm7
  movapd %xmm1,%xmm11
  mulsd  %xmm4,%xmm11
  addsd  %xmm10,%xmm11
  mulsd  %xmm0,%xmm4
  addsd  %xmm5,%xmm4
  movapd %xmm1,%xmm10
  mulsd  %xmm3,%xmm10
  addsd  %xmm8,%xmm10
  mulsd  %xmm0,%xmm3
  addsd  %xmm5,%xmm3
  movapd %xmm1,%xmm8
  mulsd  %xmm2,%xmm8
  addsd  %xmm9,%xmm8
  mulsd  %xmm0,%xmm2
  addsd  %xmm5,%xmm2
  mulsd  %xmm7,%xmm1
  addsd  %xmm6,%xmm1
  mulsd  %xmm7,%xmm0
  addsd  %xmm5,%xmm0
  add    $0x40,%r9
  add    $0x40,%rsi
  mov    $0x2,%r14d
  jmp    L168
L120:
  movsd  (%r9),%xmm1
  movapd %xmm1,%xmm11
  mulsd  (%rsi),%xmm11
  pxor   %xmm4,%xmm4
  addsd  %xmm4,%xmm11
  movapd %xmm1,%xmm10
  mulsd  0x8(%rsi),%xmm10
  addsd  %xmm4,%xmm10
  movapd %xmm1,%xmm8
  mulsd  0x10(%rsi),%xmm8
  addsd  %xmm4,%xmm8
  mulsd  0x18(%rsi),%xmm1
  addsd  %xmm4,%xmm1
  movapd %xmm4,%xmm0
  movapd %xmm4,%xmm2
  movapd %xmm4,%xmm3
  jmp    L1
L9:
  mov    %r9,%rdi
  jmp    L107
L157:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm10
  movapd %xmm0,%xmm11
  jmp    L1
L17:
  movsd  0x8(%rbx),%xmm5
  movsd  0x10(%rbx),%xmm6
  movapd %xmm5,%xmm7
  mulsd  %xmm11,%xmm7
  subsd  %xmm7,%xmm10
  mulsd  %xmm4,%xmm5
  subsd  %xmm5,%xmm3
  mulsd  %xmm6,%xmm10
  mulsd  %xmm6,%xmm3
  movsd  %xmm10,0x20(%rbp)
  movsd  0x18(%rbx),%xmm7
  movsd  0x20(%rbx),%xmm5
  movsd  0x28(%rbx),%xmm6
  movapd %xmm11,%xmm9
  mulsd  %xmm7,%xmm9
  subsd  %xmm9,%xmm8
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm2
  movapd %xmm10,%xmm7
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm2
  mulsd  %xmm6,%xmm8
  mulsd  %xmm6,%xmm2
  movsd  %xmm8,0x40(%rbp)
  jmp    L179
```

assistant: ```c
void kernel_dgemm_dtrsm_nt_2x4_vs_lib4(int km, int kn, int tri, int kadd, int ksub, double *Ap, double *Bp, double *Am, double *Bm, double *C, double *D, double *fact, int alg) {
  const int bs = 4;
  int k;
  double a_0, a_1, b_0, b_1, b_2, b_3, c_00 = 0, c_01 = 0, c_02 = 0, c_03 = 0, c_10 = 0, c_11 = 0, c_12 = 0, c_13 = 0;
  k = 0;
  if (kadd > 0) {
    if (tri == 1) {
      if (kadd >= 2) {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        b_2 = Bp[2 + bs * 0];
        b_3 = Bp[3 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        c_02 += a_0 * b_2;
        c_03 += a_0 * b_3;
        a_0 = Ap[0 + bs * 1];
        a_1 = Ap[1 + bs * 1];
        b_0 = Bp[0 + bs * 1];
        b_1 = Bp[1 + bs * 1];
        b_2 = Bp[2 + bs * 1];
        b_3 = Bp[3 + bs * 1];
        c_00 += a_0 * b_0;
        c_10 += a_1 * b_0;
        c_01 += a_0 * b_1;
        c_11 += a_1 * b_1;
        c_02 += a_0 * b_2;
        c_12 += a_1 * b_2;
        c_03 += a_0 * b_3;
        c_13 += a_1 * b_3;
        Ap += 8;
        Bp += 8;
        k += 2;
      } else {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        b_2 = Bp[2 + bs * 0];
        b_3 = Bp[3 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        c_02 += a_0 * b_2;
        c_03 += a_0 * b_3;
        k += 1;
      }
    }
    for (; k < kadd - 3; k += 4) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 0];
      b_2 = Bp[2 + bs * 0];
      b_3 = Bp[3 + bs * 0];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_02 += a_0 * b_2;
      c_12 += a_1 * b_2;
      c_03 += a_0 * b_3;
      c_13 += a_1 * b_3;
      a_0 = Ap[0 + bs * 1];
      a_1 = Ap[1 + bs * 1];
      b_0 = Bp[0 + bs * 1];
      b_1 = Bp[1 + bs * 1];
      b_2 = Bp[2 + bs * 1];
      b_3 = Bp[3 + bs * 1];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_02 += a_0 * b_2;
      c_12 += a_1 * b_2;
      c_03 += a_0 * b_3;
      c_13 += a_1 * b_3;
      a_0 = Ap[0 + bs * 2];
      a_1 = Ap[1 + bs * 2];
      b_0 = Bp[0 + bs * 2];
      b_1 = Bp[1 + bs * 2];
      b_2 = Bp[2 + bs * 2];
      b_3 = Bp[3 + bs * 2];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_02 += a_0 * b_2;
      c_12 += a_1 * b_2;
      c_03 += a_0 * b_3;
      c_13 += a_1 * b_3;
      a_0 = Ap[0 + bs * 3];
      a_1 = Ap[1 + bs * 3];
      b_0 = Bp[0 + bs * 3];
      b_1 = Bp[1 + bs * 3];
      b_2 = Bp[2 + bs * 3];
      b_3 = Bp[3 + bs * 3];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_02 += a_0 * b_2;
      c_12 += a_1 * b_2;
      c_03 += a_0 * b_3;
      c_13 += a_1 * b_3;
      Ap += 16;
      Bp += 16;
    }
    for (; k < kadd; k++) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 0];
      b_2 = Bp[2 + bs * 0];
      b_3 = Bp[3 + bs * 0];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_02 += a_0 * b_2;
      c_12 += a_1 * b_2;
      c_03 += a_0 * b_3;
      c_13 += a_1 * b_3;
      Ap += 4;
      Bp += 4;
    }
  }
  for (k = 0; k < ksub - 3; k += 4) {
    a_0 = Am[0 + bs * 0];
    a_1 = Am[1 + bs * 0];
    b_0 = Bm[0 + bs * 0];
    b_1 = Bm[1 + bs * 0];
    b_2 = Bm[2 + bs * 0];
    b_3 = Bm[3 + bs * 0];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_02 -= a_0 * b_2;
    c_12 -= a_1 * b_2;
    c_03 -= a_0 * b_3;
    c_13 -= a_1 * b_3;
    a_0 = Am[0 + bs * 1];
    a_1 = Am[1 + bs * 1];
    b_0 = Bm[0 + bs * 1];
    b_1 = Bm[1 + bs * 1];
    b_2 = Bm[2 + bs * 1];
    b_3 = Bm[3 + bs * 1];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_02 -= a_0 * b_2;
    c_12 -= a_1 * b_2;
    c_03 -= a_0 * b_3;
    c_13 -= a_1 * b_3;
    a_0 = Am[0 + bs * 2];
    a_1 = Am[1 + bs * 2];
    b_0 = Bm[0 + bs * 2];
    b_1 = Bm[1 + bs * 2];
    b_2 = Bm[2 + bs * 2];
    b_3 = Bm[3 + bs * 2];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_02 -= a_0 * b_2;
    c_12 -= a_1 * b_2;
    c_03 -= a_0 * b_3;
    c_13 -= a_1 * b_3;
    a_0 = Am[0 + bs * 3];
    a_1 = Am[1 + bs * 3];
    b_0 = Bm[0 + bs * 3];
    b_1 = Bm[1 + bs * 3];
    b_2 = Bm[2 + bs * 3];
    b_3 = Bm[3 + bs * 3];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_02 -= a_0 * b_2;
    c_12 -= a_1 * b_2;
    c_03 -= a_0 * b_3;
    c_13 -= a_1 * b_3;
    Am += 16;
    Bm += 16;
  }
  if (alg != 0) {
    c_00 += C[0 + bs * 0];
    c_10 += C[1 + bs * 0];
    c_01 += C[0 + bs * 1];
    c_11 += C[1 + bs * 1];
    c_02 += C[0 + bs * 2];
    c_12 += C[1 + bs * 2];
    c_03 += C[0 + bs * 3];
    c_13 += C[1 + bs * 3];
  }
  double a_00, a_10, a_20, a_30, a_11, a_21, a_31, a_22, a_32, a_33;
  a_00 = fact[0];
  c_00 *= a_00;
  c_10 *= a_00;
  D[0 + bs * 0] = c_00;
  if (km >= 4)
    D[1 + bs * 0] = c_10;
  a_10 = fact[1];
  a_11 = fact[2];
  c_01 -= c_00 * a_10;
  c_11 -= c_10 * a_10;
  c_01 *= a_11;
  c_11 *= a_11;
  D[0 + bs * 1] = c_01;
  if (km >= 4)
    D[1 + bs * 1] = c_11;
  a_20 = fact[3];
  a_21 = fact[4];
  a_22 = fact[5];
  c_02 -= c_00 * a_20;
  c_12 -= c_10 * a_20;
  c_02 -= c_01 * a_21;
  c_12 -= c_11 * a_21;
  c_02 *= a_22;
  c_12 *= a_22;
  D[0 + bs * 2] = c_02;
  if (km >= 4)
    D[1 + bs * 2] = c_12;
  if (kn == 3)
    return;
  a_30 = fact[6];
  a_31 = fact[7];
  a_32 = fact[8];
  a_33 = fact[9];
  c_03 -= c_00 * a_30;
  c_13 -= c_10 * a_30;
  c_03 -= c_01 * a_31;
  c_13 -= c_11 * a_31;
  c_03 -= c_02 * a_32;
  c_13 -= c_12 * a_32;
  c_03 *= a_33;
  c_13 *= a_33;
  D[0 + bs * 3] = c_03;
  if (km >= 4)
    D[1 + bs * 3] = c_13;
}
```