user: 请将以下的汇编代码转换成C语言代码:

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

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;
}
```