user: Translate the below assembly code into C programming language:

```asm
<kernel_dgemm_nt_4x2_vs_lib4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %edi,0x24(%rsp)
  mov    %esi,0x30(%rsp)
  mov    %edx,%ebx
  mov    %edx,0x20(%rsp)
  mov    %rcx,%r15
  mov    %r8,%r14
  mov    %r8,0x18(%rsp)
  mov    %r9,0x28(%rsp)
  mov    $0x0,%eax
  call   <_mm_setzero_pd@plt>
  mov    %eax,(%rsp)
  mov    $0x0,%eax
  call   <_mm_setzero_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    $0x0,%eax
  call   <_mm_setzero_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    $0x0,%eax
  call   <_mm_setzero_pd@plt>
  mov    %eax,0xc(%rsp)
  cmp    $0x3,%ebx
  jle    L17
  lea    -0x4(%rbx),%eax
  shr    $0x2,%eax
  mov    %eax,0x34(%rsp)
  add    $0x1,%eax
  mov    %eax,%eax
  shl    $0x7,%rax
  mov    %rax,0x38(%rsp)
  add    %r15,%rax
  mov    %rax,0x10(%rsp)
L238:
  mov    %r15,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r13d
  lea    0x10(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  mov    %r14,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    $0x1,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r12d
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    (%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,(%rsp)
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x8(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0xc(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0xc(%rsp)
  lea    0x20(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r13d
  lea    0x30(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  lea    0x20(%r14),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    $0x1,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r12d
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    (%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,(%rsp)
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x8(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0xc(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0xc(%rsp)
  lea    0x40(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r13d
  lea    0x50(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  lea    0x40(%r14),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    $0x1,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r12d
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    (%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,(%rsp)
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x8(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0xc(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0xc(%rsp)
  lea    0x60(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r13d
  lea    0x70(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  lea    0x60(%r14),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    $0x1,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r12d
  mov    %ebx,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    (%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,(%rsp)
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    %r12d,%esi
  mov    %r13d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x8(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    %r12d,%esi
  mov    %ebp,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0xc(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0xc(%rsp)
  sub    $0xffffffffffffff80,%r15
  sub    $0xffffffffffffff80,%r14
  cmp    0x10(%rsp),%r15
  jne    L238
  mov    0x38(%rsp),%rcx
  add    %rcx,0x18(%rsp)
  mov    0x34(%rsp),%eax
  lea    0x4(,%rax,4),%edx
L110:
  mov    0x20(%rsp),%eax
  cmp    %edx,%eax
  jle    L252
  sub    $0x1,%eax
  sub    %edx,%eax
  add    $0x1,%rax
  shl    $0x5,%rax
  mov    0x10(%rsp),%rbp
  lea    0x0(%rbp,%rax,1),%r14
  mov    %r14,0x10(%rsp)
  mov    0x18(%rsp),%r15
L81:
  mov    %rbp,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r14d
  lea    0x10(%rbp),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r12d
  mov    %r15,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    $0x1,%edx
  mov    %eax,%esi
  mov    %eax,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r13d
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    (%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,(%rsp)
  mov    %ebx,%esi
  mov    %r12d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    %r13d,%esi
  mov    %r14d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0x8(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0x8(%rsp)
  mov    %r13d,%esi
  mov    %r12d,%edi
  call   <_mm_mul_pd@plt>
  mov    %eax,%esi
  mov    0xc(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,0xc(%rsp)
  add    $0x20,%rbp
  add    $0x20,%r15
  cmp    0x10(%rsp),%rbp
  jne    L81
L252:
  cmpl   $0x0,0x88(%rsp)
  jne    L224
  cmpl   $0x0,0x98(%rsp)
  jne    L216
  mov    $0x2,%edx
  mov    0x8(%rsp),%r15d
  mov    %r15d,%esi
  mov    (%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r14d
  mov    $0x2,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%ebp
  mov    $0x2,%edx
  mov    0xc(%rsp),%r15d
  mov    %r15d,%esi
  mov    0x4(%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r13d
  mov    $0x2,%edx
  mov    %ebx,%esi
  mov    %r15d,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r15d
L126:
  cmpl   $0x3,0x24(%rsp)
  jle    L138
  mov    %r14d,%esi
  mov    0x80(%rsp),%rdi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x10(%rax),%rdi
  mov    %r13d,%esi
  call   <_mm_store_pd@plt>
  cmpl   $0x1,0x30(%rsp)
  jle    L235
  mov    0x80(%rsp),%rax
  lea    0x20(%rax),%rdi
  mov    %ebp,%esi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x30(%rax),%rdi
  mov    %r15d,%esi
  call   <_mm_store_pd@plt>
  jmp    L235
L17:
  mov    %r15,0x10(%rsp)
  mov    $0x0,%edx
  jmp    L110
L216:
  mov    0x8(%rsp),%r14d
  mov    %r14d,%esi
  mov    (%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r12d
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%ebp
  mov    0xc(%rsp),%r15d
  mov    %r15d,%esi
  mov    0x4(%rsp),%r14d
  mov    %r14d,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%ebx
  mov    %r14d,%esi
  mov    %r15d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%r15d
L99:
  cmpl   $0x1,0x30(%rsp)
  jle    L19
  mov    %r12d,%esi
  mov    0x80(%rsp),%rdi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x20(%rax),%rdi
  mov    %ebp,%esi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x40(%rax),%rdi
  mov    %ebx,%esi
  call   <_mm_store_pd@plt>
  cmpl   $0x3,0x24(%rsp)
  jg     L221
L235:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L224:
  cmpl   $0x0,0x90(%rsp)
  jne    L151
  mov    $0x2,%edx
  mov    0x8(%rsp),%r14d
  mov    %r14d,%esi
  mov    (%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,(%rsp)
  mov    $0x2,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r13d
  mov    $0x2,%edx
  mov    0xc(%rsp),%r14d
  mov    %r14d,%esi
  mov    0x4(%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,%r12d
  mov    $0x2,%edx
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <_mm_shuffle_pd@plt>
  mov    %eax,0x4(%rsp)
  mov    0x28(%rsp),%r15
  mov    %r15,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r14d
  lea    0x10(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  lea    0x20(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  lea    0x30(%r15),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r15d
  cmpl   $0x1,0x88(%rsp)
  je     L75
  mov    (%rsp),%esi
  mov    %r14d,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%r14d
  mov    %r13d,%esi
  mov    %ebp,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%ebp
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%r13d
  mov    0x4(%rsp),%esi
  mov    %r15d,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%r15d
L26:
  cmpl   $0x0,0x98(%rsp)
  je     L126
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r12d
  mov    %ebp,%esi
  mov    %r14d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%ebp
  mov    %r15d,%esi
  mov    %r13d,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%ebx
  mov    %r15d,%esi
  mov    %r13d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%r15d
  jmp    L99
L75:
  mov    (%rsp),%esi
  mov    %r14d,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%r14d
  mov    %r13d,%esi
  mov    %ebp,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%ebp
  mov    %r12d,%esi
  mov    %ebx,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%r13d
  mov    0x4(%rsp),%esi
  mov    %r15d,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%r15d
  jmp    L26
L151:
  mov    0x8(%rsp),%r14d
  mov    %r14d,%esi
  mov    (%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r15d
  mov    %ebx,%esi
  mov    %r14d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%r14d
  mov    0xc(%rsp),%ebp
  mov    %ebp,%esi
  mov    0x4(%rsp),%ebx
  mov    %ebx,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r13d
  mov    %ebx,%esi
  mov    %ebp,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,(%rsp)
  mov    0x28(%rsp),%rbx
  mov    %rbx,%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%r12d
  lea    0x20(%rbx),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebp
  mov    %rbx,0x28(%rsp)
  lea    0x40(%rbx),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,%ebx
  mov    0x28(%rsp),%rax
  lea    0x60(%rax),%rdi
  call   <_mm_load_pd@plt>
  mov    %eax,0x4(%rsp)
  cmpl   $0x1,0x88(%rsp)
  je     L155
  mov    %r15d,%esi
  mov    %r12d,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%r12d
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%ebp
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%ebx
  mov    (%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <_mm_sub_pd@plt>
  mov    %eax,%r15d
L52:
  cmpl   $0x0,0x98(%rsp)
  jne    L99
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r14d
  mov    %ebp,%esi
  mov    %r12d,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%ebp
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <_mm_unpacklo_pd@plt>
  mov    %eax,%r13d
  mov    %r15d,%esi
  mov    %ebx,%edi
  call   <_mm_unpackhi_pd@plt>
  mov    %eax,%r15d
  jmp    L126
L155:
  mov    %r15d,%esi
  mov    %r12d,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%r12d
  mov    %r14d,%esi
  mov    %ebp,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%ebp
  mov    %r13d,%esi
  mov    %ebx,%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%ebx
  mov    (%rsp),%esi
  mov    0x4(%rsp),%edi
  call   <_mm_add_pd@plt>
  mov    %eax,%r15d
  jmp    L52
L138:
  mov    %r14d,%esi
  mov    0x80(%rsp),%rdi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x10(%rax),%rdi
  mov    %r13d,%esi
  call   <_mm_store_sd@plt>
  cmpl   $0x1,0x30(%rsp)
  jle    L235
  mov    0x80(%rsp),%rax
  lea    0x20(%rax),%rdi
  mov    %ebp,%esi
  call   <_mm_store_pd@plt>
  mov    0x80(%rsp),%rax
  lea    0x30(%rax),%rdi
  mov    %r15d,%esi
  call   <_mm_store_sd@plt>
  jmp    L235
L221:
  mov    0x80(%rsp),%rax
  lea    0x60(%rax),%rdi
  mov    %r15d,%esi
  call   <_mm_store_pd@plt>
  jmp    L235
L19:
  mov    %r12d,%esi
  mov    0x80(%rsp),%rdi
  call   <_mm_store_sd@plt>
  mov    0x80(%rsp),%rax
  lea    0x20(%rax),%rdi
  mov    %ebp,%esi
  call   <_mm_store_sd@plt>
  mov    0x80(%rsp),%rax
  lea    0x40(%rax),%rdi
  mov    %ebx,%esi
  call   <_mm_store_sd@plt>
  cmpl   $0x3,0x24(%rsp)
  jle    L235
  mov    0x80(%rsp),%rax
  lea    0x60(%rax),%rdi
  mov    %r15d,%esi
  call   <_mm_store_sd@plt>
  jmp    L235
```

assistant: ```c
void kernel_dgemm_nt_4x2_vs_lib4(int km, int kn, int kmax, double *A, double *B, double *C, double *D, int alg, int tc, int td) {
  const int ldc = 4;
  int k;
  __m128d c_00_11, c_01_10, c_20_31, c_21_30, a_01, a_23, b_01, b_10, b_temp_0, b_temp_1;
  c_00_11 = _mm_setzero_pd();
  c_01_10 = _mm_setzero_pd();
  c_20_31 = _mm_setzero_pd();
  c_21_30 = _mm_setzero_pd();
  k = 0;
  for (; k < kmax - 3; k += 4) {
    a_01 = _mm_load_pd(&A[0]);
    a_23 = _mm_load_pd(&A[2]);
    b_01 = _mm_load_pd(&B[0]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_temp_0 = b_01;
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_temp_0 = _mm_mul_pd(a_23, b_temp_0);
    c_20_31 = _mm_add_pd(c_20_31, b_temp_0);
    b_temp_1 = b_10;
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    b_temp_1 = _mm_mul_pd(a_23, b_temp_1);
    c_21_30 = _mm_add_pd(c_21_30, b_temp_1);
    a_01 = _mm_load_pd(&A[4]);
    a_23 = _mm_load_pd(&A[6]);
    b_01 = _mm_load_pd(&B[4]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_temp_0 = b_01;
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_temp_0 = _mm_mul_pd(a_23, b_temp_0);
    c_20_31 = _mm_add_pd(c_20_31, b_temp_0);
    b_temp_1 = b_10;
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    b_temp_1 = _mm_mul_pd(a_23, b_temp_1);
    c_21_30 = _mm_add_pd(c_21_30, b_temp_1);
    a_01 = _mm_load_pd(&A[8]);
    a_23 = _mm_load_pd(&A[10]);
    b_01 = _mm_load_pd(&B[8]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_temp_0 = b_01;
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_temp_0 = _mm_mul_pd(a_23, b_temp_0);
    c_20_31 = _mm_add_pd(c_20_31, b_temp_0);
    b_temp_1 = b_10;
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    b_temp_1 = _mm_mul_pd(a_23, b_temp_1);
    c_21_30 = _mm_add_pd(c_21_30, b_temp_1);
    a_01 = _mm_load_pd(&A[12]);
    a_23 = _mm_load_pd(&A[14]);
    b_01 = _mm_load_pd(&B[12]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_temp_0 = b_01;
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_temp_0 = _mm_mul_pd(a_23, b_temp_0);
    c_20_31 = _mm_add_pd(c_20_31, b_temp_0);
    b_temp_1 = b_10;
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    b_temp_1 = _mm_mul_pd(a_23, b_temp_1);
    c_21_30 = _mm_add_pd(c_21_30, b_temp_1);
    A += 16;
    B += 16;
  }
  for (; k < kmax; k++) {
    a_01 = _mm_load_pd(&A[0]);
    a_23 = _mm_load_pd(&A[2]);
    b_01 = _mm_load_pd(&B[0]);
    b_10 = _mm_shuffle_pd(b_01, b_01, 1);
    b_temp_0 = b_01;
    b_01 = _mm_mul_pd(a_01, b_01);
    c_00_11 = _mm_add_pd(c_00_11, b_01);
    b_temp_0 = _mm_mul_pd(a_23, b_temp_0);
    c_20_31 = _mm_add_pd(c_20_31, b_temp_0);
    b_temp_1 = b_10;
    b_10 = _mm_mul_pd(a_01, b_10);
    c_01_10 = _mm_add_pd(c_01_10, b_10);
    b_temp_1 = _mm_mul_pd(a_23, b_temp_1);
    c_21_30 = _mm_add_pd(c_21_30, b_temp_1);
    A += 4;
    B += 4;
  }
  __m128d t_0, c_0, c_1, c_2, c_3, d_0, d_1, d_2, d_3;
  if (alg == 0) {
    if (td == 0) {
      d_0 = _mm_shuffle_pd(c_00_11, c_01_10, 0x2);
      d_1 = _mm_shuffle_pd(c_01_10, c_00_11, 0x2);
      d_2 = _mm_shuffle_pd(c_20_31, c_21_30, 0x2);
      d_3 = _mm_shuffle_pd(c_21_30, c_20_31, 0x2);
      goto store_n;
    } else {
      d_0 = _mm_unpacklo_pd(c_00_11, c_01_10);
      d_1 = _mm_unpackhi_pd(c_01_10, c_00_11);
      d_2 = _mm_unpacklo_pd(c_20_31, c_21_30);
      d_3 = _mm_unpackhi_pd(c_21_30, c_20_31);
      goto store_t;
    }
  } else {
    if (tc == 0) {
      c_0 = _mm_shuffle_pd(c_00_11, c_01_10, 0x2);
      c_1 = _mm_shuffle_pd(c_01_10, c_00_11, 0x2);
      c_2 = _mm_shuffle_pd(c_20_31, c_21_30, 0x2);
      c_3 = _mm_shuffle_pd(c_21_30, c_20_31, 0x2);
      d_0 = _mm_load_pd(&C[0 + ldc * 0]);
      d_2 = _mm_load_pd(&C[2 + ldc * 0]);
      d_1 = _mm_load_pd(&C[0 + ldc * 1]);
      d_3 = _mm_load_pd(&C[2 + ldc * 1]);
      if (alg == 1) {
        d_0 = _mm_add_pd(d_0, c_0);
        d_1 = _mm_add_pd(d_1, c_1);
        d_2 = _mm_add_pd(d_2, c_2);
        d_3 = _mm_add_pd(d_3, c_3);
      } else {
        d_0 = _mm_sub_pd(d_0, c_0);
        d_1 = _mm_sub_pd(d_1, c_1);
        d_2 = _mm_sub_pd(d_2, c_2);
        d_3 = _mm_sub_pd(d_3, c_3);
      }
      if (td == 0) {
        goto store_n;
      } else {
        t_0 = d_0;
        d_0 = _mm_unpacklo_pd(d_0, d_1);
        d_1 = _mm_unpackhi_pd(t_0, d_1);
        t_0 = d_2;
        d_2 = _mm_unpacklo_pd(d_2, d_3);
        d_3 = _mm_unpackhi_pd(t_0, d_3);
        goto store_t;
      }
    } else {
      c_0 = _mm_unpacklo_pd(c_00_11, c_01_10);
      c_1 = _mm_unpackhi_pd(c_01_10, c_00_11);
      c_2 = _mm_unpacklo_pd(c_20_31, c_21_30);
      c_3 = _mm_unpackhi_pd(c_21_30, c_20_31);
      d_0 = _mm_load_pd(&C[0 + ldc * 0]);
      d_1 = _mm_load_pd(&C[0 + ldc * 1]);
      d_2 = _mm_load_pd(&C[0 + ldc * 2]);
      d_3 = _mm_load_pd(&C[0 + ldc * 3]);
      if (alg == 1) {
        d_0 = _mm_add_pd(d_0, c_0);
        d_1 = _mm_add_pd(d_1, c_1);
        d_2 = _mm_add_pd(d_2, c_2);
        d_3 = _mm_add_pd(d_3, c_3);
      } else {
        d_0 = _mm_sub_pd(d_0, c_0);
        d_1 = _mm_sub_pd(d_1, c_1);
        d_2 = _mm_sub_pd(d_2, c_2);
        d_3 = _mm_sub_pd(d_3, c_3);
      }
      if (td == 0) {
        t_0 = d_0;
        d_0 = _mm_unpacklo_pd(d_0, d_1);
        d_1 = _mm_unpackhi_pd(t_0, d_1);
        t_0 = d_2;
        d_2 = _mm_unpacklo_pd(d_2, d_3);
        d_3 = _mm_unpackhi_pd(t_0, d_3);
        goto store_n;
      } else {
        goto store_t;
      }
    }
  }
store_n:
  if (km >= 4) {
    _mm_store_pd(&D[0 + ldc * 0], d_0);
    _mm_store_pd(&D[2 + ldc * 0], d_2);
    if (kn >= 2) {
      _mm_store_pd(&D[0 + ldc * 1], d_1);
      _mm_store_pd(&D[2 + ldc * 1], d_3);
    }
  } else {
    _mm_store_pd(&D[0 + ldc * 0], d_0);
    _mm_store_sd(&D[2 + ldc * 0], d_2);
    if (kn >= 2) {
      _mm_store_pd(&D[0 + ldc * 1], d_1);
      _mm_store_sd(&D[2 + ldc * 1], d_3);
    }
  }
  return;
store_t:
  if (kn >= 2) {
    _mm_store_pd(&D[0 + ldc * 0], d_0);
    _mm_store_pd(&D[0 + ldc * 1], d_1);
    _mm_store_pd(&D[0 + ldc * 2], d_2);
    if (km >= 4)
      _mm_store_pd(&D[0 + ldc * 3], d_3);
  } else {
    _mm_store_sd(&D[0 + ldc * 0], d_0);
    _mm_store_sd(&D[0 + ldc * 1], d_1);
    _mm_store_sd(&D[0 + ldc * 2], d_2);
    if (km >= 4)
      _mm_store_sd(&D[0 + ldc * 3], d_3);
  }
  return;
}
```