user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<kernel_dgemm_nn_2x2_vs_lib4>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x18,%rsp
  mov    %edi,-0x74(%rbp)
  mov    %esi,-0x78(%rbp)
  mov    %edx,-0x7c(%rbp)
  mov    %rcx,-0x88(%rbp)
  mov    %r8,-0x90(%rbp)
  mov    %r9d,-0x80(%rbp)
  movl   $0x4,-0x64(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L82
L79:
  mov    -0x88(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x88(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x90(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x90(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x64(%rbp),%eax
  add    %eax,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x64(%rbp),%eax
  add    %eax,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x90(%rbp),%rax
  movsd  0x10(%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x2,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  mov    -0x64(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x64(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %edx,%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x90(%rbp),%rax
  movsd  0x18(%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x3,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  subq   $0xffffffffffffff80,-0x88(%rbp)
  mov    -0x80(%rbp),%eax
  shl    $0x2,%eax
  cltq
  shl    $0x3,%rax
  add    %rax,-0x90(%rbp)
  addl   $0x4,-0x68(%rbp)
L82:
  mov    -0x7c(%rbp),%eax
  sub    $0x3,%eax
  cmp    %eax,-0x68(%rbp)
  jl     L79
  jmp    L210
L136:
  mov    -0x88(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x88(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x90(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x60(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x20(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x18(%rbp),%xmm0
  mulsd  -0x8(%rbp),%xmm0
  movsd  -0x48(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x48(%rbp)
  addq   $0x20,-0x88(%rbp)
  addq   $0x8,-0x90(%rbp)
  addl   $0x1,-0x68(%rbp)
L210:
  mov    -0x68(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L136
  cmpl   $0x0,0x10(%rbp)
  jne    L90
  cmpl   $0x0,0x30(%rbp)
  jne    L178
  jmp    L46
L90:
  cmpl   $0x0,0x28(%rbp)
  jne    L101
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    0x18(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
  jmp    L57
L101:
  mov    0x18(%rbp),%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    0x18(%rbp),%rax
  movsd  0x8(%rax),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x28(%rbp)
L57:
  cmpl   $0x1,0x10(%rbp)
  jne    L9
  movsd  -0x60(%rbp),%xmm0
  addsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x50(%rbp),%xmm0
  addsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x58(%rbp),%xmm0
  addsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x48(%rbp),%xmm0
  addsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
  jmp    L201
L9:
  movsd  -0x40(%rbp),%xmm0
  subsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,-0x60(%rbp)
  movsd  -0x30(%rbp),%xmm0
  subsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movsd  -0x38(%rbp),%xmm0
  subsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movsd  -0x28(%rbp),%xmm0
  subsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,-0x48(%rbp)
L201:
  cmpl   $0x0,0x30(%rbp)
  jne    L87
  nop
L46:
  cmpl   $0x1,-0x74(%rbp)
  jle    L198
  mov    0x20(%rbp),%rax
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x20(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x78(%rbp)
  jle    L187
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L187
L198:
  mov    0x20(%rbp),%rax
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x78(%rbp)
  jle    L187
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L187
L178:
  nop
  jmp    L49
L87:
  nop
L49:
  cmpl   $0x1,-0x78(%rbp)
  jle    L162
  mov    0x20(%rbp),%rax
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x20(%rbp),%rax
  add    $0x8,%rax
  movsd  -0x58(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x74(%rbp)
  jle    L171
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x48(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L171
L162:
  mov    0x20(%rbp),%rax
  movsd  -0x60(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  cmpl   $0x1,-0x74(%rbp)
  jle    L171
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  jmp    L171
L187:
  nop
  jmp    L133
L171:
  nop
L133:
  leave
  ret
```

assistant: ```c
void kernel_dgemm_nn_2x2_vs_lib4(int km, int kn, int kmax, double *A, double *B, int sdb, int alg, double *C, double *D, int tc, int td) {
  const int bs = 4;
  int k;
  double a_0, a_1, b_0, b_1, c_00 = 0, c_01 = 0, c_10 = 0, c_11 = 0;
  for (k = 0; k < kmax - 3; k += 4) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    b_0 = B[0 + bs * 0];
    b_1 = B[0 + 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 = A[0 + bs * 1];
    a_1 = A[1 + bs * 1];
    b_0 = B[1 + bs * 0];
    b_1 = B[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 = A[0 + bs * 2];
    a_1 = A[1 + bs * 2];
    b_0 = B[2 + bs * 0];
    b_1 = B[2 + 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 = A[0 + bs * 3];
    a_1 = A[1 + bs * 3];
    b_0 = B[3 + bs * 0];
    b_1 = B[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;
    A += 16;
    B += 4 * sdb;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    b_0 = B[0 + bs * 0];
    b_1 = B[0 + 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 += 4;
    B += 1;
  }
  double d_00, d_01, d_10, d_11;
  if (alg == 0) {
    if (td == 0) {
      goto store_n;
    } else {
      goto store_t;
    }
  } else {
    if (tc == 0) {
      d_00 = C[0 + bs * 0];
      d_10 = C[1 + bs * 0];
      d_01 = C[0 + bs * 1];
      d_11 = C[1 + bs * 1];
    } else {
      d_00 = C[0 + bs * 0];
      d_01 = C[1 + bs * 0];
      d_10 = C[0 + bs * 1];
      d_11 = C[1 + bs * 1];
    }
    if (alg == 1) {
      c_00 = d_00 + c_00;
      c_10 = d_10 + c_10;
      c_01 = d_01 + c_01;
      c_11 = d_11 + c_11;
    } else {
      c_00 = d_00 - c_00;
      c_10 = d_10 - c_10;
      c_01 = d_01 - c_01;
      c_11 = d_11 - c_11;
    }
    if (td == 0) {
      goto store_n;
    } else {
      goto store_t;
    }
  }
store_n:
  if (km >= 2) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    if (kn >= 2) {
      D[0 + bs * 1] = c_01;
      D[1 + bs * 1] = c_11;
    }
  } else {
    D[0 + bs * 0] = c_00;
    if (kn >= 2) {
      D[0 + bs * 1] = c_01;
    }
  }
  return;
store_t:
  if (kn >= 2) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_01;
    if (km >= 2) {
      D[0 + bs * 1] = c_10;
      D[1 + bs * 1] = c_11;
    }
  } else {
    D[0 + bs * 0] = c_00;
    if (km >= 2) {
      D[0 + bs * 1] = c_10;
    }
  }
  return;
}
```