user: Demonstrate the C code that generates the assembly output below:

```asm
<kernel_dgemm_dtrsm_nt_2x4_vs_lib4_new>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r11d
  mov    %esi,%r15d
  mov    %edx,%edi
  mov    0x40(%rsp),%rdx
  mov    0x48(%rsp),%rax
  mov    0x58(%rsp),%rbp
  mov    0x60(%rsp),%rbx
  mov    0x68(%rsp),%r10
  mov    0x78(%rsp),%r14
  test   %edi,%edi
  jle    L163
  cmp    $0x1,%ecx
  je     L153
  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,%r13d
L10:
  lea    -0x3(%rdi),%ecx
  cmp    %ecx,%r13d
  jge    L72
  lea    -0x4(%rdi),%r12d
  sub    %r13d,%r12d
  shr    $0x2,%r12d
  lea    0x1(%r12),%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  mov    %rcx,-0x8(%rsp)
  lea    (%r8,%rcx,1),%rsi
  mov    %r9,%rcx
L223:
  movsd  (%r8),%xmm13
  movsd  0x8(%r8),%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(%r8),%xmm15
  movsd  0x28(%r8),%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(%r8),%xmm5
  movsd  0x48(%r8),%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(%r8),%xmm1
  movsd  0x68(%r8),%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,%r8
  sub    $0xffffffffffffff80,%rcx
  cmp    %r8,%rsi
  jne    L223
  add    -0x8(%rsp),%r9
  lea    0x4(%r13,%r12,4),%r13d
L165:
  cmp    %r13d,%edi
  jle    L96
  lea    -0x1(%rdi),%ecx
  sub    %r13d,%ecx
  add    $0x1,%rcx
  shl    $0x5,%rcx
  add    %rsi,%rcx
L113:
  movsd  (%rsi),%xmm6
  movsd  0x8(%rsi),%xmm5
  movsd  (%r9),%xmm13
  movsd  0x8(%r9),%xmm9
  movsd  0x10(%r9),%xmm7
  movsd  0x18(%r9),%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,%rsi
  add    $0x20,%r9
  cmp    %rsi,%rcx
  jne    L113
L96:
  cmpl   $0x3,0x38(%rsp)
  jle    L177
  mov    0x38(%rsp),%edi
  lea    -0x4(%rdi),%ecx
  shr    $0x2,%ecx
  add    $0x1,%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  add    %rdx,%rcx
L32:
  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),%xmm9
  movsd  0x38(%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
  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    %rdx,%rcx
  jne    L32
L177:
  cmpl   $0x0,0x50(%rsp)
  je     L20
  addsd  0x0(%rbp),%xmm11
  addsd  0x8(%rbp),%xmm4
  addsd  0x20(%rbp),%xmm10
  addsd  0x28(%rbp),%xmm3
  addsd  0x40(%rbp),%xmm8
  addsd  0x48(%rbp),%xmm2
  addsd  0x60(%rbp),%xmm1
  addsd  0x68(%rbp),%xmm0
L20:
  cmpl   $0x0,0x70(%rsp)
  je     L54
  movsd  (%r14),%xmm5
  mulsd  %xmm5,%xmm11
  mulsd  %xmm5,%xmm4
  movsd  %xmm11,(%rbx)
  cmp    $0x1,%r11d
  jle    L107
  movsd  %xmm4,0x8(%rbx)
  movsd  0x8(%r10),%xmm5
  movsd  0x8(%r14),%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(%rbx)
  movsd  %xmm3,0x28(%rbx)
  movsd  0x10(%r10),%xmm7
  movsd  0x30(%r10),%xmm5
  movsd  0x10(%r14),%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(%rbx)
  movsd  %xmm2,0x48(%rbx)
L48:
  cmp    $0x3,%r15d
  je     L231
  movsd  0x18(%r10),%xmm9
  movsd  0x38(%r10),%xmm7
  movsd  0x58(%r10),%xmm6
  movsd  0x18(%r14),%xmm5
  mulsd  %xmm9,%xmm11
  subsd  %xmm11,%xmm1
  mulsd  %xmm7,%xmm10
  subsd  %xmm10,%xmm1
  mulsd  %xmm6,%xmm8
  subsd  %xmm8,%xmm1
  mulsd  %xmm5,%xmm1
  movsd  %xmm1,0x60(%rbx)
  cmp    $0x1,%r11d
  jle    L231
  mulsd  %xmm4,%xmm9
  subsd  %xmm9,%xmm0
  mulsd  %xmm3,%xmm7
  subsd  %xmm7,%xmm0
  mulsd  %xmm2,%xmm6
  subsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x68(%rbx)
L231:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L153:
  cmp    $0x1,%edi
  jle    L129
  movsd  (%r8),%xmm0
  movapd %xmm0,%xmm10
  mulsd  (%r9),%xmm10
  pxor   %xmm5,%xmm5
  addsd  %xmm5,%xmm10
  movapd %xmm0,%xmm8
  mulsd  0x8(%r9),%xmm8
  addsd  %xmm5,%xmm8
  movapd %xmm0,%xmm9
  mulsd  0x10(%r9),%xmm9
  addsd  %xmm5,%xmm9
  mulsd  0x18(%r9),%xmm0
  addsd  %xmm5,%xmm0
  movapd %xmm0,%xmm6
  movsd  0x20(%r8),%xmm1
  movsd  0x28(%r8),%xmm0
  movsd  0x20(%r9),%xmm4
  movsd  0x28(%r9),%xmm3
  movsd  0x30(%r9),%xmm2
  movsd  0x38(%r9),%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,%r8
  add    $0x40,%r9
  mov    $0x2,%r13d
  jmp    L10
L129:
  movsd  (%r8),%xmm1
  movapd %xmm1,%xmm11
  mulsd  (%r9),%xmm11
  pxor   %xmm4,%xmm4
  addsd  %xmm4,%xmm11
  movapd %xmm1,%xmm10
  mulsd  0x8(%r9),%xmm10
  addsd  %xmm4,%xmm10
  movapd %xmm1,%xmm8
  mulsd  0x10(%r9),%xmm8
  addsd  %xmm4,%xmm8
  mulsd  0x18(%r9),%xmm1
  addsd  %xmm4,%xmm1
  movapd %xmm4,%xmm0
  movapd %xmm4,%xmm2
  movapd %xmm4,%xmm3
  jmp    L96
L72:
  mov    %r8,%rsi
  jmp    L165
L163:
  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    L96
L54:
  movsd  D25(%rip),%xmm5
  divsd  (%r10),%xmm5
  mulsd  %xmm5,%xmm11
  mulsd  %xmm5,%xmm4
  movsd  %xmm11,(%rbx)
  cmp    $0x1,%r11d
  jle    L28
  movsd  %xmm4,0x8(%rbx)
  movsd  0x8(%r10),%xmm6
  movsd  D25(%rip),%xmm5
  movapd %xmm5,%xmm7
  divsd  0x28(%r10),%xmm7
  movapd %xmm11,%xmm9
  mulsd  %xmm6,%xmm9
  subsd  %xmm9,%xmm10
  mulsd  %xmm4,%xmm6
  subsd  %xmm6,%xmm3
  mulsd  %xmm7,%xmm10
  mulsd  %xmm7,%xmm3
  movsd  %xmm10,0x20(%rbx)
  movsd  %xmm3,0x28(%rbx)
  movsd  0x10(%r10),%xmm7
  movsd  0x30(%r10),%xmm6
  divsd  0x50(%r10),%xmm5
  movapd %xmm11,%xmm9
  mulsd  %xmm7,%xmm9
  subsd  %xmm9,%xmm8
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm2
  movapd %xmm6,%xmm7
  mulsd  %xmm10,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm3,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm5,%xmm8
  mulsd  %xmm5,%xmm2
  movsd  %xmm8,0x40(%rbx)
  movsd  %xmm2,0x48(%rbx)
L59:
  cmp    $0x3,%r15d
  je     L231
  movsd  0x18(%r10),%xmm9
  movsd  0x38(%r10),%xmm7
  movsd  0x58(%r10),%xmm6
  movsd  D25(%rip),%xmm5
  divsd  0x78(%r10),%xmm5
  mulsd  %xmm9,%xmm11
  subsd  %xmm11,%xmm1
  mulsd  %xmm7,%xmm10
  subsd  %xmm10,%xmm1
  mulsd  %xmm6,%xmm8
  subsd  %xmm8,%xmm1
  mulsd  %xmm5,%xmm1
  movsd  %xmm1,0x60(%rbx)
  cmp    $0x1,%r11d
  jle    L231
  mulsd  %xmm4,%xmm9
  subsd  %xmm9,%xmm0
  mulsd  %xmm3,%xmm7
  subsd  %xmm7,%xmm0
  mulsd  %xmm2,%xmm6
  subsd  %xmm6,%xmm0
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x68(%rbx)
  jmp    L231
L107:
  movsd  0x8(%r10),%xmm5
  movsd  0x8(%r14),%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(%rbx)
  movsd  0x10(%r10),%xmm7
  movsd  0x30(%r10),%xmm5
  movsd  0x10(%r14),%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(%rbx)
  jmp    L48
L28:
  movsd  0x8(%r10),%xmm6
  movsd  D25(%rip),%xmm5
  movapd %xmm5,%xmm7
  divsd  0x28(%r10),%xmm7
  movapd %xmm11,%xmm9
  mulsd  %xmm6,%xmm9
  subsd  %xmm9,%xmm10
  mulsd  %xmm4,%xmm6
  subsd  %xmm6,%xmm3
  mulsd  %xmm7,%xmm10
  mulsd  %xmm7,%xmm3
  movsd  %xmm10,0x20(%rbx)
  movsd  0x10(%r10),%xmm7
  movsd  0x30(%r10),%xmm6
  divsd  0x50(%r10),%xmm5
  movapd %xmm11,%xmm9
  mulsd  %xmm7,%xmm9
  subsd  %xmm9,%xmm8
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm2
  movapd %xmm6,%xmm7
  mulsd  %xmm10,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm3,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm5,%xmm8
  mulsd  %xmm5,%xmm2
  movsd  %xmm8,0x40(%rbx)
  jmp    L59
```

tool_calls: name: extract_symbolic_data
arguments: data_label: D25
datatype: f64

tool: D25: 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;
  }
}
```