user: 请从给定的汇编指令推导出C源代码：

```asm
<kernel_dgemm_dtrsm_nt_2x4_vs_lib4_new>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%ebx
  mov    %edx,%edi
  mov    0x48(%rsp),%rax
  mov    0x40(%rsp),%rdx
  mov    0x58(%rsp),%rbp
  mov    0x60(%rsp),%r11
  mov    0x68(%rsp),%r10
  mov    %esi,-0x4(%rsp)
  mov    0x78(%rsp),%r15
  test   %edi,%edi
  jle    L25
  cmp    $0x1,%ecx
  je     L50
  pxor   %xmm0,%xmm0
  xor    %r14d,%r14d
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm6
  movapd %xmm0,%xmm7
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
L180:
  lea    -0x3(%rdi),%ecx
  cmp    %r14d,%ecx
  jle    L137
  lea    -0x4(%rdi),%r12d
  mov    %r8,%rcx
  sub    %r14d,%r12d
  shr    $0x2,%r12d
  lea    0x1(%r12),%r13d
  shl    $0x7,%r13
  lea    (%r9,%r13,1),%rsi
  nopw   0x0(%rax,%rax,1)
L171:
  movsd  (%rcx),%xmm3
  movsd  0x8(%rcx),%xmm1
  sub    $0xffffffffffffff80,%r9
  sub    $0xffffffffffffff80,%rcx
  movsd  -0x80(%r9),%xmm13
  movsd  -0x78(%r9),%xmm12
  movapd %xmm3,%xmm14
  movsd  -0x70(%r9),%xmm5
  movsd  -0x68(%r9),%xmm11
  mulsd  %xmm13,%xmm14
  mulsd  %xmm1,%xmm13
  addsd  %xmm14,%xmm10
  movsd  -0x58(%r9),%xmm14
  addsd  %xmm13,%xmm7
  movapd %xmm3,%xmm13
  mulsd  %xmm12,%xmm13
  mulsd  %xmm1,%xmm12
  addsd  %xmm13,%xmm9
  movsd  -0x48(%r9),%xmm13
  addsd  %xmm12,%xmm6
  movapd %xmm3,%xmm12
  mulsd  %xmm5,%xmm12
  mulsd  %xmm11,%xmm3
  mulsd  %xmm1,%xmm5
  mulsd  %xmm11,%xmm1
  movsd  -0x58(%rcx),%xmm11
  addsd  %xmm12,%xmm8
  movsd  -0x60(%rcx),%xmm12
  addsd  %xmm3,%xmm2
  movsd  -0x60(%r9),%xmm3
  addsd  %xmm5,%xmm4
  movapd %xmm12,%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm1,%xmm0
  movsd  -0x50(%r9),%xmm1
  mulsd  %xmm11,%xmm3
  addsd  %xmm10,%xmm5
  movapd %xmm14,%xmm10
  addsd  %xmm7,%xmm3
  mulsd  %xmm11,%xmm10
  movapd %xmm12,%xmm7
  mulsd  %xmm14,%xmm7
  addsd  %xmm6,%xmm10
  movapd %xmm12,%xmm6
  addsd  %xmm7,%xmm9
  movsd  -0x40(%rcx),%xmm7
  mulsd  %xmm1,%xmm6
  mulsd  %xmm13,%xmm12
  mulsd  %xmm11,%xmm1
  movapd %xmm7,%xmm15
  movapd %xmm7,%xmm14
  mulsd  %xmm13,%xmm11
  movsd  -0x40(%r9),%xmm13
  mulsd  %xmm13,%xmm15
  addsd  %xmm6,%xmm8
  movsd  -0x38(%rcx),%xmm6
  addsd  %xmm2,%xmm12
  movsd  -0x28(%r9),%xmm2
  addsd  %xmm4,%xmm1
  movsd  -0x38(%r9),%xmm4
  addsd  %xmm0,%xmm11
  movsd  -0x30(%r9),%xmm0
  mulsd  %xmm4,%xmm14
  addsd  %xmm5,%xmm15
  mulsd  %xmm6,%xmm4
  movapd %xmm13,%xmm5
  mulsd  %xmm6,%xmm5
  movapd %xmm7,%xmm13
  mulsd  %xmm2,%xmm7
  mulsd  %xmm0,%xmm13
  mulsd  %xmm6,%xmm0
  addsd  %xmm9,%xmm14
  mulsd  %xmm2,%xmm6
  movsd  -0x20(%rcx),%xmm2
  addsd  %xmm3,%xmm5
  movapd %xmm4,%xmm3
  movsd  -0x10(%r9),%xmm4
  addsd  %xmm12,%xmm7
  movsd  -0x18(%rcx),%xmm12
  addsd  %xmm10,%xmm3
  movapd %xmm2,%xmm9
  addsd  %xmm8,%xmm13
  movapd %xmm2,%xmm8
  movapd %xmm2,%xmm10
  mulsd  %xmm4,%xmm8
  addsd  %xmm1,%xmm0
  mulsd  %xmm12,%xmm4
  addsd  %xmm6,%xmm11
  movapd %xmm7,%xmm1
  movsd  -0x18(%r9),%xmm6
  movsd  -0x20(%r9),%xmm7
  mulsd  -0x8(%r9),%xmm2
  mulsd  %xmm6,%xmm9
  mulsd  %xmm7,%xmm10
  mulsd  %xmm12,%xmm6
  addsd  %xmm13,%xmm8
  addsd  %xmm0,%xmm4
  movsd  -0x8(%r9),%xmm0
  mulsd  %xmm12,%xmm7
  addsd  %xmm1,%xmm2
  mulsd  %xmm12,%xmm0
  addsd  %xmm14,%xmm9
  addsd  %xmm15,%xmm10
  addsd  %xmm3,%xmm6
  addsd  %xmm5,%xmm7
  addsd  %xmm11,%xmm0
  cmp    %rsi,%r9
  jne    L171
  add    %r13,%r8
  lea    0x4(%r14,%r12,4),%r14d
L187:
  cmp    %r14d,%edi
  jle    L77
  lea    -0x1(%rdi),%ecx
  sub    %r14d,%ecx
  add    $0x1,%rcx
  shl    $0x5,%rcx
  add    %rsi,%rcx
L135:
  movsd  (%r8),%xmm3
  movsd  0x8(%r8),%xmm1
  add    $0x20,%rsi
  add    $0x20,%r8
  movsd  -0x20(%rsi),%xmm13
  movsd  -0x18(%rsi),%xmm11
  movapd %xmm3,%xmm14
  movsd  -0x10(%rsi),%xmm5
  movsd  -0x8(%rsi),%xmm12
  mulsd  %xmm13,%xmm14
  mulsd  %xmm1,%xmm13
  addsd  %xmm14,%xmm10
  addsd  %xmm13,%xmm7
  movapd %xmm3,%xmm13
  mulsd  %xmm11,%xmm13
  mulsd  %xmm1,%xmm11
  addsd  %xmm13,%xmm9
  addsd  %xmm11,%xmm6
  movapd %xmm3,%xmm11
  mulsd  %xmm5,%xmm11
  mulsd  %xmm12,%xmm3
  mulsd  %xmm1,%xmm5
  mulsd  %xmm12,%xmm1
  addsd  %xmm11,%xmm8
  addsd  %xmm3,%xmm2
  addsd  %xmm5,%xmm4
  addsd  %xmm1,%xmm0
  cmp    %rcx,%rsi
  jne    L135
L77:
  cmpl   $0x3,0x38(%rsp)
  jle    L195
  mov    0x38(%rsp),%edi
  lea    -0x4(%rdi),%ecx
  shr    $0x2,%ecx
  add    $0x1,%ecx
  shl    $0x7,%rcx
  add    %rax,%rcx
  xchg   %ax,%ax
L191:
  movsd  (%rdx),%xmm3
  movsd  0x8(%rdx),%xmm1
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%rdx
  movsd  -0x80(%rax),%xmm13
  movsd  -0x78(%rax),%xmm12
  movapd %xmm3,%xmm14
  movsd  -0x68(%rax),%xmm11
  movsd  -0x70(%rax),%xmm5
  mulsd  %xmm13,%xmm14
  mulsd  %xmm1,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm7
  movapd %xmm3,%xmm13
  mulsd  %xmm12,%xmm13
  mulsd  %xmm1,%xmm12
  subsd  %xmm13,%xmm9
  movsd  -0x60(%rax),%xmm13
  subsd  %xmm12,%xmm6
  movapd %xmm3,%xmm12
  mulsd  %xmm11,%xmm3
  mulsd  %xmm5,%xmm12
  mulsd  %xmm1,%xmm5
  mulsd  %xmm11,%xmm1
  movsd  -0x50(%rax),%xmm11
  subsd  %xmm3,%xmm2
  movsd  -0x60(%rdx),%xmm3
  subsd  %xmm12,%xmm8
  movsd  -0x58(%rax),%xmm12
  movapd %xmm3,%xmm14
  subsd  %xmm5,%xmm4
  movsd  -0x48(%rax),%xmm5
  subsd  %xmm1,%xmm0
  movsd  -0x58(%rdx),%xmm1
  mulsd  %xmm13,%xmm14
  mulsd  %xmm1,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm7
  movapd %xmm3,%xmm13
  mulsd  %xmm12,%xmm13
  mulsd  %xmm1,%xmm12
  subsd  %xmm13,%xmm9
  movsd  -0x28(%rax),%xmm13
  subsd  %xmm12,%xmm6
  movapd %xmm3,%xmm12
  mulsd  %xmm5,%xmm3
  mulsd  %xmm11,%xmm12
  mulsd  %xmm1,%xmm11
  mulsd  %xmm5,%xmm1
  movsd  -0x30(%rax),%xmm5
  subsd  %xmm3,%xmm2
  movsd  -0x40(%rdx),%xmm3
  subsd  %xmm12,%xmm8
  movsd  -0x40(%rax),%xmm12
  movapd %xmm3,%xmm14
  subsd  %xmm11,%xmm4
  movsd  -0x38(%rax),%xmm11
  subsd  %xmm1,%xmm0
  movsd  -0x38(%rdx),%xmm1
  mulsd  %xmm12,%xmm14
  mulsd  %xmm1,%xmm12
  subsd  %xmm14,%xmm10
  subsd  %xmm12,%xmm7
  movapd %xmm3,%xmm12
  mulsd  %xmm11,%xmm12
  mulsd  %xmm1,%xmm11
  subsd  %xmm12,%xmm9
  movsd  -0x18(%rax),%xmm12
  subsd  %xmm11,%xmm6
  movapd %xmm3,%xmm11
  mulsd  %xmm13,%xmm3
  mulsd  %xmm5,%xmm11
  mulsd  %xmm1,%xmm5
  mulsd  %xmm13,%xmm1
  movsd  -0x20(%rax),%xmm13
  subsd  %xmm3,%xmm2
  movsd  -0x20(%rdx),%xmm3
  subsd  %xmm11,%xmm8
  movsd  -0x10(%rax),%xmm11
  movapd %xmm3,%xmm14
  subsd  %xmm5,%xmm4
  movsd  -0x8(%rax),%xmm5
  subsd  %xmm1,%xmm0
  movsd  -0x18(%rdx),%xmm1
  mulsd  %xmm13,%xmm14
  mulsd  %xmm1,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm7
  movapd %xmm3,%xmm13
  mulsd  %xmm12,%xmm13
  mulsd  %xmm1,%xmm12
  subsd  %xmm13,%xmm9
  subsd  %xmm12,%xmm6
  movapd %xmm3,%xmm12
  mulsd  %xmm11,%xmm12
  mulsd  %xmm5,%xmm3
  mulsd  %xmm1,%xmm11
  mulsd  %xmm5,%xmm1
  subsd  %xmm12,%xmm8
  subsd  %xmm3,%xmm2
  subsd  %xmm11,%xmm4
  subsd  %xmm1,%xmm0
  cmp    %rcx,%rax
  jne    L191
L195:
  mov    0x50(%rsp),%edx
  test   %edx,%edx
  je     L18
  addsd  0x0(%rbp),%xmm10
  addsd  0x8(%rbp),%xmm7
  addsd  0x20(%rbp),%xmm9
  addsd  0x28(%rbp),%xmm6
  addsd  0x40(%rbp),%xmm8
  addsd  0x48(%rbp),%xmm4
  addsd  0x60(%rbp),%xmm2
  addsd  0x68(%rbp),%xmm0
L18:
  mov    0x70(%rsp),%eax
  test   %eax,%eax
  je     L156
  movsd  (%r15),%xmm1
  mulsd  %xmm1,%xmm10
  mulsd  %xmm7,%xmm1
  movsd  %xmm10,(%r11)
  cmp    $0x1,%ebx
  jle    L219
  movsd  %xmm1,0x8(%r11)
  movapd %xmm10,%xmm7
  movapd %xmm10,%xmm11
  movsd  0x8(%r10),%xmm3
  movsd  0x8(%r15),%xmm5
  mulsd  %xmm3,%xmm7
  mulsd  %xmm1,%xmm3
  subsd  %xmm7,%xmm9
  subsd  %xmm3,%xmm6
  mulsd  %xmm5,%xmm9
  mulsd  %xmm5,%xmm6
  movsd  %xmm9,0x20(%r11)
  movsd  %xmm6,0x28(%r11)
  movsd  0x10(%r10),%xmm5
  movsd  0x30(%r10),%xmm3
  movsd  0x10(%r15),%xmm7
  mulsd  %xmm5,%xmm11
  mulsd  %xmm1,%xmm5
  subsd  %xmm11,%xmm8
  subsd  %xmm5,%xmm4
  movapd %xmm3,%xmm5
  mulsd  %xmm9,%xmm5
  mulsd  %xmm6,%xmm3
  subsd  %xmm5,%xmm8
  subsd  %xmm3,%xmm4
  mulsd  %xmm7,%xmm8
  mulsd  %xmm7,%xmm4
  movsd  %xmm8,0x40(%r11)
  movsd  %xmm4,0x48(%r11)
L46:
  cmpl   $0x3,-0x4(%rsp)
  je     L151
  movsd  0x18(%r10),%xmm11
  movsd  0x38(%r10),%xmm7
  movsd  0x58(%r10),%xmm5
  movsd  0x18(%r15),%xmm3
  mulsd  %xmm11,%xmm10
  mulsd  %xmm7,%xmm9
  mulsd  %xmm5,%xmm8
  subsd  %xmm10,%xmm2
  subsd  %xmm9,%xmm2
  subsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm2
  movsd  %xmm2,0x60(%r11)
  cmp    $0x1,%ebx
  jle    L151
  mulsd  %xmm1,%xmm11
  mulsd  %xmm6,%xmm7
  mulsd  %xmm4,%xmm5
  subsd  %xmm11,%xmm0
  subsd  %xmm7,%xmm0
  subsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm3
  movsd  %xmm3,0x68(%r11)
L151:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L50:
  movsd  (%r8),%xmm2
  movsd  (%r9),%xmm10
  pxor   %xmm1,%xmm1
  movsd  0x8(%r9),%xmm9
  movsd  0x10(%r9),%xmm8
  mulsd  %xmm2,%xmm10
  mulsd  %xmm2,%xmm9
  mulsd  %xmm2,%xmm8
  mulsd  0x18(%r9),%xmm2
  addsd  %xmm1,%xmm10
  addsd  %xmm1,%xmm9
  addsd  %xmm1,%xmm8
  addsd  %xmm1,%xmm2
  cmp    $0x1,%edi
  je     L221
  movsd  0x20(%r8),%xmm3
  movsd  0x20(%r9),%xmm7
  add    $0x40,%r8
  add    $0x40,%r9
  movsd  -0x18(%r9),%xmm6
  movsd  -0x18(%r8),%xmm0
  mov    $0x2,%r14d
  movapd %xmm3,%xmm11
  movsd  -0x10(%r9),%xmm4
  movsd  -0x8(%r9),%xmm5
  mulsd  %xmm7,%xmm11
  mulsd  %xmm0,%xmm7
  addsd  %xmm11,%xmm10
  movapd %xmm3,%xmm11
  mulsd  %xmm6,%xmm11
  addsd  %xmm1,%xmm7
  mulsd  %xmm0,%xmm6
  addsd  %xmm11,%xmm9
  movapd %xmm3,%xmm11
  mulsd  %xmm4,%xmm11
  addsd  %xmm1,%xmm6
  mulsd  %xmm0,%xmm4
  mulsd  %xmm5,%xmm3
  mulsd  %xmm5,%xmm0
  addsd  %xmm11,%xmm8
  addsd  %xmm1,%xmm4
  addsd  %xmm3,%xmm2
  addsd  %xmm1,%xmm0
  jmp    L180
  nopw   0x0(%rax,%rax,1)
L156:
  movsd  D1(%rip),%xmm1
  movapd %xmm1,%xmm3
  divsd  (%r10),%xmm3
  mulsd  %xmm3,%xmm10
  mulsd  %xmm7,%xmm3
  movsd  %xmm10,(%r11)
  cmp    $0x1,%ebx
  jle    L20
  movsd  %xmm3,0x8(%r11)
  movsd  0x8(%r10),%xmm5
  movapd %xmm10,%xmm11
  movapd %xmm1,%xmm7
  divsd  0x28(%r10),%xmm7
  movapd %xmm10,%xmm12
  mulsd  %xmm5,%xmm11
  mulsd  %xmm3,%xmm5
  subsd  %xmm11,%xmm9
  movapd %xmm1,%xmm11
  subsd  %xmm5,%xmm6
  mulsd  %xmm7,%xmm9
  mulsd  %xmm7,%xmm6
  movsd  %xmm9,0x20(%r11)
  movsd  %xmm6,0x28(%r11)
  movsd  0x10(%r10),%xmm7
  movsd  0x30(%r10),%xmm5
  divsd  0x50(%r10),%xmm11
  mulsd  %xmm7,%xmm12
  mulsd  %xmm3,%xmm7
  subsd  %xmm12,%xmm8
  subsd  %xmm7,%xmm4
  movapd %xmm5,%xmm7
  mulsd  %xmm9,%xmm7
  mulsd  %xmm6,%xmm5
  subsd  %xmm7,%xmm8
  subsd  %xmm5,%xmm4
  mulsd  %xmm11,%xmm8
  mulsd  %xmm11,%xmm4
  movsd  %xmm8,0x40(%r11)
  movsd  %xmm4,0x48(%r11)
L229:
  cmpl   $0x3,-0x4(%rsp)
  je     L151
  movsd  0x18(%r10),%xmm11
  movsd  0x38(%r10),%xmm7
  divsd  0x78(%r10),%xmm1
  movsd  0x58(%r10),%xmm5
  mulsd  %xmm11,%xmm10
  mulsd  %xmm7,%xmm9
  mulsd  %xmm5,%xmm8
  subsd  %xmm10,%xmm2
  subsd  %xmm9,%xmm2
  subsd  %xmm8,%xmm2
  mulsd  %xmm1,%xmm2
  movsd  %xmm2,0x60(%r11)
  cmp    $0x1,%ebx
  jle    L151
  mulsd  %xmm3,%xmm11
  mulsd  %xmm6,%xmm7
  mulsd  %xmm4,%xmm5
  subsd  %xmm11,%xmm0
  subsd  %xmm7,%xmm0
  subsd  %xmm5,%xmm0
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x68(%r11)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L25:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm6
  movapd %xmm0,%xmm7
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
  jmp    L77
  nopl   0x0(%rax,%rax,1)
L219:
  movsd  0x8(%r10),%xmm3
  movapd %xmm10,%xmm7
  movsd  0x8(%r15),%xmm5
  movapd %xmm10,%xmm11
  mulsd  %xmm3,%xmm7
  mulsd  %xmm1,%xmm3
  subsd  %xmm7,%xmm9
  subsd  %xmm3,%xmm6
  mulsd  %xmm5,%xmm9
  mulsd  %xmm5,%xmm6
  movsd  %xmm9,0x20(%r11)
  movsd  0x10(%r10),%xmm5
  movsd  0x30(%r10),%xmm3
  movsd  0x10(%r15),%xmm7
  mulsd  %xmm5,%xmm11
  mulsd  %xmm1,%xmm5
  subsd  %xmm11,%xmm8
  subsd  %xmm5,%xmm4
  movapd %xmm3,%xmm5
  mulsd  %xmm9,%xmm5
  mulsd  %xmm6,%xmm3
  subsd  %xmm5,%xmm8
  subsd  %xmm3,%xmm4
  mulsd  %xmm7,%xmm8
  mulsd  %xmm7,%xmm4
  movsd  %xmm8,0x40(%r11)
  jmp    L46
  nopl   0x0(%rax)
L20:
  movsd  0x8(%r10),%xmm5
  movapd %xmm10,%xmm7
  movapd %xmm1,%xmm11
  divsd  0x28(%r10),%xmm11
  movapd %xmm10,%xmm12
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm9
  movapd %xmm5,%xmm7
  mulsd  %xmm3,%xmm7
  mulsd  %xmm11,%xmm9
  subsd  %xmm7,%xmm6
  movapd %xmm1,%xmm7
  movsd  %xmm9,0x20(%r11)
  divsd  0x50(%r10),%xmm7
  movapd %xmm6,%xmm5
  movapd %xmm11,%xmm6
  movsd  0x10(%r10),%xmm11
  mulsd  %xmm5,%xmm6
  movsd  0x30(%r10),%xmm5
  mulsd  %xmm11,%xmm12
  mulsd  %xmm3,%xmm11
  subsd  %xmm12,%xmm8
  subsd  %xmm11,%xmm4
  movapd %xmm5,%xmm11
  mulsd  %xmm9,%xmm11
  mulsd  %xmm6,%xmm5
  subsd  %xmm11,%xmm8
  subsd  %xmm5,%xmm4
  mulsd  %xmm7,%xmm8
  mulsd  %xmm7,%xmm4
  movsd  %xmm8,0x40(%r11)
  jmp    L229
L221:
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm4
  movapd %xmm1,%xmm6
  movapd %xmm1,%xmm7
  jmp    L77
L137:
  mov    %r9,%rsi
  jmp    L187
```

tool_calls: name: read_data
arguments: data_tag: D1
type_guessed: f64

tool: D1: 1

assistant: ```c
void kernel_dgemm_dtrsm_nt_2x4_vs_lib4_new(int km, int kn, int kadd, int tri_A, double *Ap, double *Bp, int ksub, double *Am, double *Bm, int alg, double *C, double *D, double *E, int use_inv_diag_E, double *inv_diag_E) {
  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_A == 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;
  if (use_inv_diag_E) {
    a_00 = inv_diag_E[0];
    c_00 *= a_00;
    c_10 *= a_00;
    D[0 + bs * 0] = c_00;
    if (km >= 2)
      D[1 + bs * 0] = c_10;
    a_10 = E[1 + bs * 0];
    a_11 = inv_diag_E[1];
    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 >= 2)
      D[1 + bs * 1] = c_11;
    a_20 = E[2 + bs * 0];
    a_21 = E[2 + bs * 1];
    a_22 = inv_diag_E[2];
    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 >= 2)
      D[1 + bs * 2] = c_12;
    if (kn == 3)
      return;
    a_30 = E[3 + bs * 0];
    a_31 = E[3 + bs * 1];
    a_32 = E[3 + bs * 2];
    a_33 = inv_diag_E[3];
    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 >= 2)
      D[1 + bs * 3] = c_13;
  } else {
    a_00 = 1.0 / E[0 + bs * 0];
    c_00 *= a_00;
    c_10 *= a_00;
    D[0 + bs * 0] = c_00;
    if (km >= 2)
      D[1 + bs * 0] = c_10;
    a_10 = E[1 + bs * 0];
    a_11 = 1.0 / E[1 + bs * 1];
    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 >= 2)
      D[1 + bs * 1] = c_11;
    a_20 = E[2 + bs * 0];
    a_21 = E[2 + bs * 1];
    a_22 = 1.0 / E[2 + bs * 2];
    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 >= 2)
      D[1 + bs * 2] = c_12;
    if (kn == 3)
      return;
    a_30 = E[3 + bs * 0];
    a_31 = E[3 + bs * 1];
    a_32 = E[3 + bs * 2];
    a_33 = 1.0 / E[3 + bs * 3];
    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 >= 2)
      D[1 + bs * 3] = c_13;
  }
}
```