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

```asm
<kernel_dgemm_nt_4x2_unpack_lib>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,-0x2c(%rsp)
  mov    %edx,-0x10(%rsp)
  mov    %rcx,%r15
  mov    %r8d,-0xc(%rsp)
  mov    %r9,-0x8(%rsp)
  lea    -0x3(%rdi),%eax
  mov    %eax,-0x30(%rsp)
  test   %eax,%eax
  jle    L29
  mov    %r8d,%ecx
  movslq %edx,%r10
  shl    $0x3,%r10
  lea    0x8(%r10),%rax
  mov    %rax,-0x68(%rsp)
  lea    0x10(%r10),%rax
  mov    %rax,-0x60(%rsp)
  lea    0x18(%r10),%rax
  mov    %rax,-0x58(%rsp)
  movslq %r8d,%rax
  lea    0x0(,%rax,8),%r14
  lea    0x8(%r14),%rax
  mov    %rax,-0x50(%rsp)
  lea    (%rdx,%rdx,1),%edi
  movslq %edi,%rax
  lea    0x0(,%rax,8),%r13
  lea    0x1(%rdi),%r9d
  movslq %r9d,%r9
  shl    $0x3,%r9
  lea    0x10(%r13),%rax
  mov    %rax,-0x48(%rsp)
  lea    0x10(%r9),%rax
  mov    %rax,-0x40(%rsp)
  lea    (%r8,%r8,1),%r8d
  movslq %r8d,%r12
  shl    $0x3,%r12
  lea    0x1(%r8),%r11d
  movslq %r11d,%r11
  shl    $0x3,%r11
  mov    %edx,%eax
  add    %edx,%edi
  movslq %edi,%rbx
  shl    $0x3,%rbx
  add    $0x1,%edi
  movslq %edi,%rdi
  shl    $0x3,%rdi
  lea    0x8(%rdi),%rdx
  mov    %rdx,-0x38(%rsp)
  lea    0x18(%rbx),%rbp
  mov    %rbp,-0x28(%rsp)
  add    %ecx,%r8d
  movslq %r8d,%rbp
  shl    $0x3,%rbp
  add    $0x1,%r8d
  movslq %r8d,%r8
  shl    $0x3,%r8
  shl    $0x2,%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,-0x78(%rsp)
  lea    0x0(,%rcx,4),%eax
  cltq
  shl    $0x3,%rax
  mov    %rax,-0x70(%rsp)
  mov    %r15,%rdx
  mov    %rsi,%rax
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm11
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm12
  mov    $0x0,%ecx
  mov    %rsi,-0x20(%rsp)
  mov    %r15,-0x18(%rsp)
  mov    -0x28(%rsp),%r15
L17:
  movsd  (%rax),%xmm3
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm5
  movsd  0x18(%rax),%xmm4
  movsd  (%rdx),%xmm15
  movsd  0x8(%rdx),%xmm13
  movapd %xmm3,%xmm14
  mulsd  %xmm15,%xmm14
  addsd  %xmm12,%xmm14
  movapd %xmm6,%xmm12
  mulsd  %xmm15,%xmm12
  addsd  %xmm11,%xmm12
  movapd %xmm5,%xmm7
  mulsd  %xmm15,%xmm7
  addsd  %xmm10,%xmm7
  mulsd  %xmm4,%xmm15
  addsd  %xmm15,%xmm0
  mulsd  %xmm13,%xmm3
  addsd  %xmm9,%xmm3
  mulsd  %xmm13,%xmm6
  addsd  %xmm8,%xmm6
  mulsd  %xmm13,%xmm5
  addsd  %xmm2,%xmm5
  mulsd  %xmm13,%xmm4
  addsd  %xmm4,%xmm1
  movsd  (%rax,%r10,1),%xmm9
  mov    -0x68(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm8
  mov    -0x60(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm2
  mov    -0x58(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm4
  movsd  (%rdx,%r14,1),%xmm15
  mov    -0x50(%rsp),%rsi
  movsd  (%rdx,%rsi,1),%xmm13
  movapd %xmm9,%xmm11
  mulsd  %xmm15,%xmm11
  addsd  %xmm14,%xmm11
  movapd %xmm8,%xmm10
  mulsd  %xmm15,%xmm10
  addsd  %xmm12,%xmm10
  movapd %xmm2,%xmm14
  mulsd  %xmm15,%xmm14
  addsd  %xmm7,%xmm14
  mulsd  %xmm4,%xmm15
  addsd  %xmm15,%xmm0
  mulsd  %xmm13,%xmm9
  addsd  %xmm3,%xmm9
  mulsd  %xmm13,%xmm8
  addsd  %xmm6,%xmm8
  mulsd  %xmm13,%xmm2
  addsd  %xmm5,%xmm2
  mulsd  %xmm13,%xmm4
  addsd  %xmm4,%xmm1
  movsd  (%rax,%r13,1),%xmm7
  movsd  (%rax,%r9,1),%xmm6
  mov    -0x48(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm5
  mov    -0x40(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm4
  movsd  (%rdx,%r12,1),%xmm3
  movsd  (%rdx,%r11,1),%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  %xmm9,%xmm7
  mulsd  %xmm13,%xmm6
  addsd  %xmm8,%xmm6
  mulsd  %xmm13,%xmm5
  addsd  %xmm2,%xmm5
  mulsd  %xmm13,%xmm4
  addsd  %xmm1,%xmm4
  movsd  (%rax,%rbx,1),%xmm9
  movsd  (%rax,%rdi,1),%xmm8
  mov    -0x38(%rsp),%rsi
  movsd  (%rax,%rsi,1),%xmm2
  movsd  (%rax,%r15,1),%xmm1
  movsd  (%rdx,%rbp,1),%xmm0
  movsd  (%rdx,%r8,1),%xmm13
  movapd %xmm9,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm12
  movapd %xmm8,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm11
  movapd %xmm2,%xmm14
  mulsd  %xmm0,%xmm14
  addsd  %xmm14,%xmm10
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm13,%xmm9
  addsd  %xmm7,%xmm9
  mulsd  %xmm13,%xmm8
  addsd  %xmm6,%xmm8
  mulsd  %xmm13,%xmm2
  addsd  %xmm5,%xmm2
  mulsd  %xmm13,%xmm1
  addsd  %xmm4,%xmm1
  add    -0x78(%rsp),%rax
  add    -0x70(%rsp),%rdx
  add    $0x4,%ecx
  cmp    -0x30(%rsp),%ecx
  jl     L17
  mov    -0x20(%rsp),%rsi
  mov    -0x18(%rsp),%r15
  mov    -0x2c(%rsp),%eax
  sub    $0x4,%eax
  shr    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,%ecx
  mov    -0x78(%rsp),%rdx
  imul   %rcx,%rdx
  add    %rdx,%rsi
  mov    -0x70(%rsp),%rdx
  imul   %rcx,%rdx
  add    %rdx,%r15
  shl    $0x2,%eax
L73:
  mov    -0x2c(%rsp),%edi
  cmp    %eax,%edi
  jle    L66
  movslq -0x10(%rsp),%rcx
  shl    $0x3,%rcx
  movslq -0xc(%rsp),%rdx
  shl    $0x3,%rdx
L64:
  movsd  (%rsi),%xmm13
  movsd  0x8(%rsi),%xmm7
  movsd  0x10(%rsi),%xmm6
  movsd  0x18(%rsi),%xmm4
  movsd  (%r15),%xmm3
  movsd  0x8(%r15),%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,%xmm9
  mulsd  %xmm5,%xmm7
  addsd  %xmm7,%xmm8
  mulsd  %xmm5,%xmm6
  addsd  %xmm6,%xmm2
  mulsd  %xmm5,%xmm4
  addsd  %xmm4,%xmm1
  add    %rcx,%rsi
  add    %rdx,%r15
  add    $0x1,%eax
  cmp    %eax,%edi
  jne    L64
L66:
  cmpl   $0x0,0x50(%rsp)
  je     L6
  mov    -0x8(%rsp),%rbx
  movsd  (%rbx),%xmm15
  movsd  0x8(%rbx),%xmm14
  movsd  0x10(%rbx),%xmm13
  movsd  0x18(%rbx),%xmm7
  movslq 0x38(%rsp),%rdx
  lea    0x0(,%rdx,8),%rax
  movsd  (%rbx,%rdx,8),%xmm6
  movsd  0x8(%rbx,%rax,1),%xmm5
  movsd  0x10(%rbx,%rax,1),%xmm4
  movsd  0x18(%rbx,%rax,1),%xmm3
  cmpl   $0x1,0x50(%rsp)
  je     L18
  subsd  %xmm12,%xmm15
  movapd %xmm15,%xmm12
  subsd  %xmm11,%xmm14
  movapd %xmm14,%xmm11
  subsd  %xmm10,%xmm13
  movapd %xmm13,%xmm10
  subsd  %xmm0,%xmm7
  movapd %xmm7,%xmm0
  subsd  %xmm9,%xmm6
  movapd %xmm6,%xmm9
  subsd  %xmm8,%xmm5
  movapd %xmm5,%xmm8
  subsd  %xmm2,%xmm4
  movapd %xmm4,%xmm2
  subsd  %xmm1,%xmm3
  movapd %xmm3,%xmm1
L6:
  mov    0x40(%rsp),%rax
  movsd  %xmm12,(%rax)
  movsd  %xmm11,0x8(%rax)
  movsd  %xmm10,0x10(%rax)
  movsd  %xmm0,0x18(%rax)
  movslq 0x48(%rsp),%rdx
  lea    0x0(,%rdx,8),%rax
  mov    0x40(%rsp),%rdi
  movsd  %xmm9,(%rdi,%rdx,8)
  movsd  %xmm8,0x8(%rdi,%rax,1)
  movsd  %xmm2,0x10(%rdi,%rax,1)
  movsd  %xmm1,0x18(%rdi,%rax,1)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L29:
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm0
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm10
  movapd %xmm1,%xmm8
  movapd %xmm1,%xmm11
  movapd %xmm1,%xmm9
  movapd %xmm1,%xmm12
  mov    $0x0,%eax
  jmp    L73
L18:
  addsd  %xmm15,%xmm12
  addsd  %xmm14,%xmm11
  addsd  %xmm13,%xmm10
  addsd  %xmm7,%xmm0
  addsd  %xmm6,%xmm9
  addsd  %xmm5,%xmm8
  addsd  %xmm4,%xmm2
  addsd  %xmm3,%xmm1
  jmp    L6
```

assistant: ```c
void kernel_dgemm_nt_4x2_unpack_lib(int kmax, double *A, int lda, double *B, int ldb, double *C, int ldc, double *D, int ldd, int alg, int tc, int td) {
  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;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    a_2 = A[2 + lda * 0];
    a_3 = A[3 + lda * 0];
    b_0 = B[0 + ldb * 0];
    b_1 = B[1 + ldb * 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 = A[0 + lda * 1];
    a_1 = A[1 + lda * 1];
    a_2 = A[2 + lda * 1];
    a_3 = A[3 + lda * 1];
    b_0 = B[0 + ldb * 1];
    b_1 = B[1 + ldb * 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 = A[0 + lda * 2];
    a_1 = A[1 + lda * 2];
    a_2 = A[2 + lda * 2];
    a_3 = A[3 + lda * 2];
    b_0 = B[0 + ldb * 2];
    b_1 = B[1 + ldb * 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 = A[0 + lda * 3];
    a_1 = A[1 + lda * 3];
    a_2 = A[2 + lda * 3];
    a_3 = A[3 + lda * 3];
    b_0 = B[0 + ldb * 3];
    b_1 = B[1 + ldb * 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;
    A += 4 * lda;
    B += 4 * ldb;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    a_2 = A[2 + lda * 0];
    a_3 = A[3 + lda * 0];
    b_0 = B[0 + ldb * 0];
    b_1 = B[1 + ldb * 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 += 1 * lda;
    B += 1 * ldb;
  }
  double d_00, d_01, d_10, d_11, d_20, d_21, d_30, d_31;
  if (alg == 0) {
    goto store;
  } else {
    d_00 = C[0 + ldc * 0];
    d_10 = C[1 + ldc * 0];
    d_20 = C[2 + ldc * 0];
    d_30 = C[3 + ldc * 0];
    d_01 = C[0 + ldc * 1];
    d_11 = C[1 + ldc * 1];
    d_21 = C[2 + ldc * 1];
    d_31 = C[3 + ldc * 1];
    if (alg == 1) {
      c_00 = d_00 + c_00;
      c_10 = d_10 + c_10;
      c_20 = d_20 + c_20;
      c_30 = d_30 + c_30;
      c_01 = d_01 + c_01;
      c_11 = d_11 + c_11;
      c_21 = d_21 + c_21;
      c_31 = d_31 + c_31;
    } else {
      c_00 = d_00 - c_00;
      c_10 = d_10 - c_10;
      c_20 = d_20 - c_20;
      c_30 = d_30 - c_30;
      c_01 = d_01 - c_01;
      c_11 = d_11 - c_11;
      c_21 = d_21 - c_21;
      c_31 = d_31 - c_31;
    }
    goto store;
  }
store:
  D[0 + ldd * 0] = c_00;
  D[1 + ldd * 0] = c_10;
  D[2 + ldd * 0] = c_20;
  D[3 + ldd * 0] = c_30;
  D[0 + ldd * 1] = c_01;
  D[1 + ldd * 1] = c_11;
  D[2 + ldd * 1] = c_21;
  D[3 + ldd * 1] = c_31;
  return;
}
```