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

```asm
<kernel_dgemm_dtrsm_nt_4x2_vs_lib4_new>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r11d
  mov    %esi,%ebx
  mov    %edx,%edi
  mov    0x40(%rsp),%rax
  mov    0x48(%rsp),%rdx
  mov    0x58(%rsp),%r12
  mov    0x60(%rsp),%r10
  mov    0x68(%rsp),%r15
  test   %edi,%edi
  jle    L197
  mov    %ecx,%ebp
  cmp    $0x1,%ecx
  je     L102
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm11
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm12
  mov    $0x0,%ebp
L196:
  lea    -0x3(%rdi),%ecx
  cmp    %ecx,%ebp
  jge    L124
  lea    -0x4(%rdi),%r13d
  sub    %ebp,%r13d
  shr    $0x2,%r13d
  lea    0x1(%r13),%r14d
  mov    %r14d,%r14d
  shl    $0x7,%r14
  lea    (%r8,%r14,1),%rsi
  mov    %r9,%rcx
L80:
  movsd  (%r8),%xmm7
  movsd  0x8(%r8),%xmm6
  movsd  0x10(%r8),%xmm5
  movsd  0x18(%r8),%xmm4
  movsd  (%rcx),%xmm15
  movsd  0x8(%rcx),%xmm13
  movapd %xmm7,%xmm3
  mulsd  %xmm15,%xmm3
  addsd  %xmm3,%xmm12
  movapd %xmm6,%xmm3
  mulsd  %xmm15,%xmm3
  addsd  %xmm11,%xmm3
  movapd %xmm5,%xmm14
  mulsd  %xmm15,%xmm14
  addsd  %xmm10,%xmm14
  mulsd  %xmm4,%xmm15
  addsd  %xmm15,%xmm0
  mulsd  %xmm13,%xmm7
  addsd  %xmm2,%xmm7
  mulsd  %xmm13,%xmm6
  addsd  %xmm8,%xmm6
  mulsd  %xmm13,%xmm5
  addsd  %xmm9,%xmm5
  mulsd  %xmm13,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0x20(%r8),%xmm2
  movsd  0x28(%r8),%xmm9
  movsd  0x30(%r8),%xmm8
  movsd  0x38(%r8),%xmm4
  movsd  0x20(%rcx),%xmm15
  movsd  0x28(%rcx),%xmm13
  movapd %xmm2,%xmm11
  mulsd  %xmm15,%xmm11
  addsd  %xmm12,%xmm11
  movapd %xmm9,%xmm10
  mulsd  %xmm15,%xmm10
  addsd  %xmm3,%xmm10
  movapd %xmm8,%xmm3
  mulsd  %xmm15,%xmm3
  addsd  %xmm3,%xmm14
  mulsd  %xmm4,%xmm15
  addsd  %xmm15,%xmm0
  mulsd  %xmm13,%xmm2
  addsd  %xmm7,%xmm2
  mulsd  %xmm13,%xmm9
  addsd  %xmm6,%xmm9
  mulsd  %xmm13,%xmm8
  addsd  %xmm5,%xmm8
  mulsd  %xmm13,%xmm4
  addsd  %xmm4,%xmm1
  movsd  0x40(%r8),%xmm7
  movsd  0x48(%r8),%xmm6
  movsd  0x50(%r8),%xmm5
  movsd  0x58(%r8),%xmm4
  movsd  0x40(%rcx),%xmm3
  movsd  0x48(%rcx),%xmm13
  movapd %xmm7,%xmm12
  mulsd  %xmm3,%xmm12
  addsd  %xmm11,%xmm12
  movapd %xmm6,%xmm11
  mulsd  %xmm3,%xmm11
  addsd  %xmm10,%xmm11
  movapd %xmm5,%xmm10
  mulsd  %xmm3,%xmm10
  addsd  %xmm14,%xmm10
  mulsd  %xmm4,%xmm3
  addsd  %xmm0,%xmm3
  mulsd  %xmm13,%xmm7
  addsd  %xmm2,%xmm7
  mulsd  %xmm13,%xmm6
  addsd  %xmm9,%xmm6
  mulsd  %xmm13,%xmm5
  addsd  %xmm8,%xmm5
  mulsd  %xmm13,%xmm4
  addsd  %xmm1,%xmm4
  movsd  0x60(%r8),%xmm2
  movsd  0x68(%r8),%xmm8
  movsd  0x70(%r8),%xmm9
  movsd  0x78(%r8),%xmm1
  movsd  0x60(%rcx),%xmm0
  movsd  0x68(%rcx),%xmm13
  movapd %xmm2,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm12
  movapd %xmm8,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm11
  movapd %xmm9,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm10
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm13,%xmm2
  addsd  %xmm7,%xmm2
  mulsd  %xmm13,%xmm8
  addsd  %xmm6,%xmm8
  mulsd  %xmm13,%xmm9
  addsd  %xmm5,%xmm9
  mulsd  %xmm13,%xmm1
  addsd  %xmm4,%xmm1
  sub    $0xffffffffffffff80,%r8
  sub    $0xffffffffffffff80,%rcx
  cmp    %rsi,%r8
  jne    L80
  add    %r14,%r9
  lea    0x4(%rbp,%r13,4),%ebp
L187:
  cmp    %ebp,%edi
  jle    L121
  lea    -0x1(%rdi),%ecx
  sub    %ebp,%ecx
  add    $0x1,%rcx
  shl    $0x5,%rcx
  add    %rsi,%rcx
L59:
  movsd  (%rsi),%xmm13
  movsd  0x8(%rsi),%xmm7
  movsd  0x10(%rsi),%xmm6
  movsd  0x18(%rsi),%xmm4
  movsd  (%r9),%xmm3
  movsd  0x8(%r9),%xmm5
  movapd %xmm13,%xmm14
  mulsd  %xmm3,%xmm14
  addsd  %xmm14,%xmm12
  movapd %xmm7,%xmm14
  mulsd  %xmm3,%xmm14
  addsd  %xmm14,%xmm11
  movapd %xmm6,%xmm14
  mulsd  %xmm3,%xmm14
  addsd  %xmm14,%xmm10
  mulsd  %xmm4,%xmm3
  addsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm13
  addsd  %xmm13,%xmm2
  mulsd  %xmm5,%xmm7
  addsd  %xmm7,%xmm8
  mulsd  %xmm5,%xmm6
  addsd  %xmm6,%xmm9
  mulsd  %xmm5,%xmm4
  addsd  %xmm4,%xmm1
  add    $0x20,%rsi
  add    $0x20,%r9
  cmp    %rcx,%rsi
  jne    L59
L121:
  cmpl   $0x3,0x38(%rsp)
  jle    L183
  mov    0x38(%rsp),%edi
  lea    -0x4(%rdi),%ecx
  shr    $0x2,%ecx
  add    $0x1,%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  add    %rax,%rcx
L112:
  movsd  (%rax),%xmm7
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm5
  movsd  0x18(%rax),%xmm4
  movsd  (%rdx),%xmm3
  movsd  0x8(%rdx),%xmm13
  movapd %xmm7,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm12
  movapd %xmm6,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm11
  movapd %xmm5,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  mulsd  %xmm13,%xmm7
  subsd  %xmm7,%xmm2
  mulsd  %xmm13,%xmm6
  subsd  %xmm6,%xmm8
  mulsd  %xmm13,%xmm5
  subsd  %xmm5,%xmm9
  mulsd  %xmm13,%xmm4
  subsd  %xmm4,%xmm1
  movsd  0x20(%rax),%xmm6
  movsd  0x28(%rax),%xmm15
  movsd  0x30(%rax),%xmm14
  movsd  0x38(%rax),%xmm4
  movsd  0x20(%rdx),%xmm3
  movsd  0x28(%rdx),%xmm13
  movapd %xmm6,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm12
  movapd %xmm15,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm11
  movapd %xmm14,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm10
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  mulsd  %xmm13,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm13,%xmm15
  subsd  %xmm15,%xmm8
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm9
  mulsd  %xmm13,%xmm4
  subsd  %xmm4,%xmm1
  movsd  0x40(%rax),%xmm6
  movsd  0x48(%rax),%xmm15
  movsd  0x50(%rax),%xmm14
  movsd  0x58(%rax),%xmm4
  movsd  0x40(%rdx),%xmm3
  movsd  0x48(%rdx),%xmm13
  movapd %xmm6,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm12
  movapd %xmm15,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm11
  movapd %xmm14,%xmm5
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm10
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  mulsd  %xmm13,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm13,%xmm15
  subsd  %xmm15,%xmm8
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm9
  mulsd  %xmm13,%xmm4
  subsd  %xmm4,%xmm1
  movsd  0x60(%rax),%xmm13
  movsd  0x68(%rax),%xmm7
  movsd  0x70(%rax),%xmm6
  movsd  0x78(%rax),%xmm4
  movsd  0x60(%rdx),%xmm3
  movsd  0x68(%rdx),%xmm5
  movapd %xmm13,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm12
  movapd %xmm7,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm11
  movapd %xmm6,%xmm14
  mulsd  %xmm3,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm2
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm5,%xmm6
  subsd  %xmm6,%xmm9
  mulsd  %xmm5,%xmm4
  subsd  %xmm4,%xmm1
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%rdx
  cmp    %rax,%rcx
  jne    L112
L183:
  cmpl   $0x0,0x50(%rsp)
  je     L55
  addsd  (%r12),%xmm12
  addsd  0x8(%r12),%xmm11
  addsd  0x10(%r12),%xmm10
  addsd  0x18(%r12),%xmm0
  addsd  0x20(%r12),%xmm2
  addsd  0x28(%r12),%xmm8
  addsd  0x30(%r12),%xmm9
  addsd  0x38(%r12),%xmm1
L55:
  cmpl   $0x0,0x70(%rsp)
  je     L171
  mov    0x78(%rsp),%rax
  movsd  (%rax),%xmm3
  mulsd  %xmm3,%xmm12
  mulsd  %xmm3,%xmm11
  mulsd  %xmm3,%xmm10
  mulsd  %xmm0,%xmm3
  movsd  %xmm12,(%r10)
  movsd  %xmm11,0x8(%r10)
  movsd  %xmm10,0x10(%r10)
  cmp    $0x3,%r11d
  jle    L163
  movsd  %xmm3,0x18(%r10)
L163:
  cmp    $0x1,%ebx
  je     L60
  movsd  0x8(%r15),%xmm4
  mov    0x78(%rsp),%rax
  movsd  0x8(%rax),%xmm0
  mulsd  %xmm4,%xmm12
  subsd  %xmm12,%xmm2
  movapd %xmm2,%xmm7
  mulsd  %xmm4,%xmm11
  movapd %xmm8,%xmm6
  subsd  %xmm11,%xmm6
  mulsd  %xmm4,%xmm10
  movapd %xmm9,%xmm5
  subsd  %xmm10,%xmm5
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,0x20(%r10)
  mulsd  %xmm0,%xmm6
  movsd  %xmm6,0x28(%r10)
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x30(%r10)
  cmp    $0x3,%r11d
  jle    L60
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x38(%r10)
L60:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L102:
  cmp    $0x3,%edi
  jle    L86
  movsd  (%r8),%xmm0
  movapd %xmm0,%xmm5
  mulsd  (%r9),%xmm5
  pxor   %xmm3,%xmm3
  addsd  %xmm3,%xmm5
  mulsd  0x8(%r9),%xmm0
  addsd  %xmm3,%xmm0
  movsd  0x20(%r8),%xmm2
  movsd  0x28(%r8),%xmm1
  movsd  0x20(%r9),%xmm4
  movsd  0x28(%r9),%xmm6
  movapd %xmm2,%xmm7
  mulsd  %xmm4,%xmm7
  addsd  %xmm5,%xmm7
  mulsd  %xmm1,%xmm4
  addsd  %xmm3,%xmm4
  mulsd  %xmm6,%xmm2
  addsd  %xmm0,%xmm2
  movapd %xmm2,%xmm5
  mulsd  %xmm6,%xmm1
  addsd  %xmm3,%xmm1
  movsd  0x40(%r8),%xmm15
  movsd  0x48(%r8),%xmm14
  movsd  0x50(%r8),%xmm13
  movsd  0x40(%r9),%xmm0
  movsd  0x48(%r9),%xmm6
  movapd %xmm15,%xmm8
  mulsd  %xmm0,%xmm8
  addsd  %xmm7,%xmm8
  movapd %xmm14,%xmm2
  mulsd  %xmm0,%xmm2
  addsd  %xmm4,%xmm2
  mulsd  %xmm13,%xmm0
  addsd  %xmm3,%xmm0
  movapd %xmm0,%xmm4
  mulsd  %xmm6,%xmm15
  addsd  %xmm5,%xmm15
  mulsd  %xmm6,%xmm14
  addsd  %xmm1,%xmm14
  mulsd  %xmm6,%xmm13
  addsd  %xmm3,%xmm13
  movsd  0x60(%r8),%xmm7
  movsd  0x68(%r8),%xmm6
  movsd  0x70(%r8),%xmm9
  movsd  0x78(%r8),%xmm1
  movsd  0x60(%r9),%xmm0
  movsd  0x68(%r9),%xmm5
  movapd %xmm7,%xmm12
  mulsd  %xmm0,%xmm12
  addsd  %xmm8,%xmm12
  movapd %xmm6,%xmm11
  mulsd  %xmm0,%xmm11
  addsd  %xmm2,%xmm11
  movapd %xmm9,%xmm10
  mulsd  %xmm0,%xmm10
  addsd  %xmm4,%xmm10
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm5,%xmm7
  movapd %xmm7,%xmm2
  addsd  %xmm15,%xmm2
  mulsd  %xmm5,%xmm6
  addsd  %xmm14,%xmm6
  movapd %xmm6,%xmm8
  mulsd  %xmm5,%xmm9
  addsd  %xmm13,%xmm9
  mulsd  %xmm5,%xmm1
  addsd  %xmm3,%xmm1
  sub    $0xffffffffffffff80,%r8
  sub    $0xffffffffffffff80,%r9
  mov    $0x4,%ebp
  jmp    L196
L86:
  movsd  (%r8),%xmm7
  movapd %xmm7,%xmm12
  mulsd  (%r9),%xmm12
  pxor   %xmm0,%xmm0
  addsd  %xmm0,%xmm12
  mulsd  0x8(%r9),%xmm7
  movapd %xmm7,%xmm2
  addsd  %xmm0,%xmm2
  cmp    $0x1,%edi
  jle    L231
  movsd  0x20(%r8),%xmm0
  movsd  0x28(%r8),%xmm6
  movsd  0x20(%r9),%xmm11
  movsd  0x28(%r9),%xmm3
  movapd %xmm0,%xmm1
  mulsd  %xmm11,%xmm1
  addsd  %xmm1,%xmm12
  mulsd  %xmm6,%xmm11
  pxor   %xmm1,%xmm1
  addsd  %xmm1,%xmm11
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm2
  mulsd  %xmm3,%xmm6
  addsd  %xmm1,%xmm6
  movapd %xmm6,%xmm8
  cmp    $0x3,%edi
  jne    L222
  movsd  0x40(%r8),%xmm1
  movsd  0x48(%r8),%xmm0
  movsd  0x50(%r8),%xmm5
  movsd  0x40(%r9),%xmm10
  movsd  0x48(%r9),%xmm3
  movapd %xmm1,%xmm4
  mulsd  %xmm10,%xmm4
  addsd  %xmm4,%xmm12
  movapd %xmm0,%xmm4
  mulsd  %xmm10,%xmm4
  addsd  %xmm4,%xmm11
  mulsd  %xmm5,%xmm10
  pxor   %xmm4,%xmm4
  addsd  %xmm4,%xmm10
  mulsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm2
  mulsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm8
  mulsd  %xmm3,%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm5,%xmm9
  mov    %edi,%ebp
  jmp    L138
L124:
  mov    %r8,%rsi
  jmp    L187
L197:
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm11
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm12
  jmp    L121
L171:
  movsd  D5(%rip),%xmm3
  divsd  (%r15),%xmm3
  mulsd  %xmm3,%xmm12
  mulsd  %xmm3,%xmm11
  mulsd  %xmm3,%xmm10
  mulsd  %xmm0,%xmm3
  movsd  %xmm12,(%r10)
  movsd  %xmm11,0x8(%r10)
  movsd  %xmm10,0x10(%r10)
  cmp    $0x3,%r11d
  jle    L76
  movsd  %xmm3,0x18(%r10)
L76:
  cmp    $0x1,%ebx
  je     L60
  movsd  0x8(%r15),%xmm4
  movsd  D5(%rip),%xmm0
  divsd  0x28(%r15),%xmm0
  mulsd  %xmm4,%xmm12
  subsd  %xmm12,%xmm2
  movapd %xmm2,%xmm7
  mulsd  %xmm4,%xmm11
  movapd %xmm8,%xmm6
  subsd  %xmm11,%xmm6
  mulsd  %xmm4,%xmm10
  movapd %xmm9,%xmm5
  subsd  %xmm10,%xmm5
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,0x20(%r10)
  mulsd  %xmm0,%xmm6
  movsd  %xmm6,0x28(%r10)
  mulsd  %xmm0,%xmm5
  movsd  %xmm5,0x30(%r10)
  cmp    $0x3,%r11d
  jle    L60
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,0x38(%r10)
  jmp    L60
L231:
  pxor   %xmm9,%xmm9
  movapd %xmm9,%xmm10
  movapd %xmm9,%xmm8
  movapd %xmm9,%xmm11
L138:
  mov    %r8,%rsi
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  jmp    L187
L222:
  pxor   %xmm9,%xmm9
  movapd %xmm9,%xmm10
  mov    $0x2,%ebp
  jmp    L138
```

tool_calls: name: extract_symbolic_data
arguments: tag: D5
type: f64

tool: D5: 1

assistant: ```c
void kernel_dgemm_dtrsm_nt_4x2_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, a_2, a_3, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0, c_20 = 0, c_21 = 0, c_30 = 0, c_31 = 0;
  k = 0;
  if (kadd > 0) {
    if (tri_A == 1) {
      if (kadd >= 4) {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        a_0 = Ap[0 + bs * 1];
        a_1 = Ap[1 + bs * 1];
        b_0 = Bp[0 + bs * 1];
        b_1 = Bp[1 + 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;
        a_0 = Ap[0 + bs * 2];
        a_1 = Ap[1 + bs * 2];
        a_2 = Ap[2 + bs * 2];
        b_0 = Bp[0 + bs * 2];
        b_1 = Bp[1 + bs * 2];
        c_00 += a_0 * b_0;
        c_10 += a_1 * b_0;
        c_20 += a_2 * b_0;
        c_01 += a_0 * b_1;
        c_11 += a_1 * b_1;
        c_21 += a_2 * b_1;
        a_0 = Ap[0 + bs * 3];
        a_1 = Ap[1 + bs * 3];
        a_2 = Ap[2 + bs * 3];
        a_3 = Ap[3 + bs * 3];
        b_0 = Bp[0 + bs * 3];
        b_1 = Bp[1 + bs * 3];
        c_00 += a_0 * b_0;
        c_10 += a_1 * b_0;
        c_20 += a_2 * b_0;
        c_30 += a_3 * b_0;
        c_01 += a_0 * b_1;
        c_11 += a_1 * b_1;
        c_21 += a_2 * b_1;
        c_31 += a_3 * b_1;
        Ap += 16;
        Bp += 16;
        k += 4;
      } else {
        a_0 = Ap[0 + bs * 0];
        b_0 = Bp[0 + bs * 0];
        b_1 = Bp[1 + bs * 0];
        c_00 += a_0 * b_0;
        c_01 += a_0 * b_1;
        k += 1;
        if (kadd > 1) {
          a_0 = Ap[0 + bs * 1];
          a_1 = Ap[1 + bs * 1];
          b_0 = Bp[0 + bs * 1];
          b_1 = Bp[1 + 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;
          k += 1;
          if (kadd > 2) {
            a_0 = Ap[0 + bs * 2];
            a_1 = Ap[1 + bs * 2];
            a_2 = Ap[2 + bs * 2];
            b_0 = Bp[0 + bs * 2];
            b_1 = Bp[1 + bs * 2];
            c_00 += a_0 * b_0;
            c_10 += a_1 * b_0;
            c_20 += a_2 * b_0;
            c_01 += a_0 * b_1;
            c_11 += a_1 * b_1;
            c_21 += a_2 * b_1;
            k += 1;
          }
        }
      }
    }
    for (; k < kadd - 3; k += 4) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      a_2 = Ap[2 + bs * 0];
      a_3 = Ap[3 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 0];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_20 += a_2 * b_0;
      c_30 += a_3 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_21 += a_2 * b_1;
      c_31 += a_3 * b_1;
      a_0 = Ap[0 + bs * 1];
      a_1 = Ap[1 + bs * 1];
      a_2 = Ap[2 + bs * 1];
      a_3 = Ap[3 + bs * 1];
      b_0 = Bp[0 + bs * 1];
      b_1 = Bp[1 + bs * 1];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_20 += a_2 * b_0;
      c_30 += a_3 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_21 += a_2 * b_1;
      c_31 += a_3 * b_1;
      a_0 = Ap[0 + bs * 2];
      a_1 = Ap[1 + bs * 2];
      a_2 = Ap[2 + bs * 2];
      a_3 = Ap[3 + bs * 2];
      b_0 = Bp[0 + bs * 2];
      b_1 = Bp[1 + bs * 2];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_20 += a_2 * b_0;
      c_30 += a_3 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_21 += a_2 * b_1;
      c_31 += a_3 * b_1;
      a_0 = Ap[0 + bs * 3];
      a_1 = Ap[1 + bs * 3];
      a_2 = Ap[2 + bs * 3];
      a_3 = Ap[3 + bs * 3];
      b_0 = Bp[0 + bs * 3];
      b_1 = Bp[1 + bs * 3];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_20 += a_2 * b_0;
      c_30 += a_3 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_21 += a_2 * b_1;
      c_31 += a_3 * b_1;
      Ap += 16;
      Bp += 16;
    }
    for (; k < kadd; k++) {
      a_0 = Ap[0 + bs * 0];
      a_1 = Ap[1 + bs * 0];
      a_2 = Ap[2 + bs * 0];
      a_3 = Ap[3 + bs * 0];
      b_0 = Bp[0 + bs * 0];
      b_1 = Bp[1 + bs * 0];
      c_00 += a_0 * b_0;
      c_10 += a_1 * b_0;
      c_20 += a_2 * b_0;
      c_30 += a_3 * b_0;
      c_01 += a_0 * b_1;
      c_11 += a_1 * b_1;
      c_21 += a_2 * b_1;
      c_31 += a_3 * b_1;
      Ap += 4;
      Bp += 4;
    }
  }
  for (k = 0; k < ksub - 3; k += 4) {
    a_0 = Am[0 + bs * 0];
    a_1 = Am[1 + bs * 0];
    a_2 = Am[2 + bs * 0];
    a_3 = Am[3 + bs * 0];
    b_0 = Bm[0 + bs * 0];
    b_1 = Bm[1 + bs * 0];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_20 -= a_2 * b_0;
    c_30 -= a_3 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_21 -= a_2 * b_1;
    c_31 -= a_3 * b_1;
    a_0 = Am[0 + bs * 1];
    a_1 = Am[1 + bs * 1];
    a_2 = Am[2 + bs * 1];
    a_3 = Am[3 + bs * 1];
    b_0 = Bm[0 + bs * 1];
    b_1 = Bm[1 + bs * 1];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_20 -= a_2 * b_0;
    c_30 -= a_3 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_21 -= a_2 * b_1;
    c_31 -= a_3 * b_1;
    a_0 = Am[0 + bs * 2];
    a_1 = Am[1 + bs * 2];
    a_2 = Am[2 + bs * 2];
    a_3 = Am[3 + bs * 2];
    b_0 = Bm[0 + bs * 2];
    b_1 = Bm[1 + bs * 2];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_20 -= a_2 * b_0;
    c_30 -= a_3 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_21 -= a_2 * b_1;
    c_31 -= a_3 * b_1;
    a_0 = Am[0 + bs * 3];
    a_1 = Am[1 + bs * 3];
    a_2 = Am[2 + bs * 3];
    a_3 = Am[3 + bs * 3];
    b_0 = Bm[0 + bs * 3];
    b_1 = Bm[1 + bs * 3];
    c_00 -= a_0 * b_0;
    c_10 -= a_1 * b_0;
    c_20 -= a_2 * b_0;
    c_30 -= a_3 * b_0;
    c_01 -= a_0 * b_1;
    c_11 -= a_1 * b_1;
    c_21 -= a_2 * b_1;
    c_31 -= a_3 * b_1;
    Am += 16;
    Bm += 16;
  }
  if (alg != 0) {
    c_00 += C[0 + bs * 0];
    c_10 += C[1 + bs * 0];
    c_20 += C[2 + bs * 0];
    c_30 += C[3 + bs * 0];
    c_01 += C[0 + bs * 1];
    c_11 += C[1 + bs * 1];
    c_21 += C[2 + bs * 1];
    c_31 += C[3 + bs * 1];
  }
  double a_00, a_10, a_11;
  if (use_inv_diag_E) {
    a_00 = inv_diag_E[0];
    c_00 *= a_00;
    c_10 *= a_00;
    c_20 *= a_00;
    c_30 *= a_00;
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    D[2 + bs * 0] = c_20;
    if (km >= 4)
      D[3 + bs * 0] = c_30;
    if (kn == 1)
      return;
    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_21 -= c_20 * a_10;
    c_31 -= c_30 * a_10;
    c_01 *= a_11;
    c_11 *= a_11;
    c_21 *= a_11;
    c_31 *= a_11;
    D[0 + bs * 1] = c_01;
    D[1 + bs * 1] = c_11;
    D[2 + bs * 1] = c_21;
    if (km >= 4)
      D[3 + bs * 1] = c_31;
  } else {
    a_00 = 1.0 / E[0 + bs * 0];
    c_00 *= a_00;
    c_10 *= a_00;
    c_20 *= a_00;
    c_30 *= a_00;
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    D[2 + bs * 0] = c_20;
    if (km >= 4)
      D[3 + bs * 0] = c_30;
    if (kn == 1)
      return;
    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_21 -= c_20 * a_10;
    c_31 -= c_30 * a_10;
    c_01 *= a_11;
    c_11 *= a_11;
    c_21 *= a_11;
    c_31 *= a_11;
    D[0 + bs * 1] = c_01;
    D[1 + bs * 1] = c_11;
    D[2 + bs * 1] = c_21;
    if (km >= 4)
      D[3 + bs * 1] = c_31;
  }
}
```