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

```asm
<kernel_dsyrk_nn_2x2_lib4>:
  endbr64
  push   %rbp
  mov    %rdx,%r10
  push   %rbx
  mov    0x18(%rsp),%r11d
  cmp    $0x3,%edi
  jle    L24
  shl    $0x2,%ecx
  lea    -0x4(%rdi),%edx
  movslq %ecx,%rbx
  mov    %edx,%eax
  shl    $0x3,%rbx
  shr    $0x2,%eax
  cmp    $0x3,%edx
  jbe    L60
  mov    %rsi,%rcx
  mov    %r10,%rdx
  pxor   %xmm3,%xmm3
  xor    %ebp,%ebp
  pxor   %xmm4,%xmm4
  nopw   0x0(%rax,%rax,1)
L55:
  movupd (%rcx),%xmm1
  movupd (%rdx),%xmm6
  add    $0x1,%ebp
  sub    $0xffffffffffffff80,%rcx
  movupd -0x60(%rcx),%xmm8
  movlpd -0x78(%rcx),%xmm8
  movhpd -0x60(%rcx),%xmm1
  movupd -0x40(%rcx),%xmm0
  movupd 0x10(%rdx),%xmm5
  mulpd  %xmm6,%xmm1
  movupd -0x20(%rcx),%xmm7
  movlpd -0x38(%rcx),%xmm7
  mulpd  %xmm8,%xmm6
  movhpd -0x20(%rcx),%xmm0
  mulpd  %xmm5,%xmm0
  mulpd  %xmm7,%xmm5
  movapd %xmm1,%xmm2
  unpcklpd %xmm6,%xmm2
  unpckhpd %xmm6,%xmm1
  addpd  %xmm3,%xmm2
  addpd  %xmm2,%xmm1
  movapd %xmm0,%xmm2
  unpckhpd %xmm5,%xmm0
  unpcklpd %xmm5,%xmm2
  addpd  %xmm2,%xmm1
  movupd 0x20(%rdx),%xmm2
  mulpd  %xmm8,%xmm2
  movapd %xmm1,%xmm3
  movupd 0x30(%rdx),%xmm1
  add    %rbx,%rdx
  addpd  %xmm0,%xmm3
  mulpd  %xmm7,%xmm1
  movapd %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm4,%xmm0
  addsd  %xmm2,%xmm0
  addsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  movapd %xmm0,%xmm4
  addsd  %xmm1,%xmm4
  cmp    %eax,%ebp
  jb     L55
  mov    %eax,%edx
  mov    %rdx,%rcx
  imul   %rbx,%rdx
  shl    $0x7,%rcx
  add    %rsi,%rcx
  add    %r10,%rdx
L62:
  movupd (%rcx),%xmm7
  movsd  0x20(%rdx),%xmm1
  movsd  0x28(%rdx),%xmm0
  movupd 0x60(%rcx),%xmm2
  movapd %xmm7,%xmm6
  unpckhpd %xmm6,%xmm6
  mulsd  %xmm6,%xmm1
  movupd 0x20(%rcx),%xmm6
  movapd %xmm6,%xmm5
  unpckhpd %xmm5,%xmm5
  mulsd  %xmm5,%xmm0
  movupd 0x40(%rcx),%xmm5
  addsd  %xmm4,%xmm1
  movapd %xmm5,%xmm4
  unpckhpd %xmm4,%xmm4
  mulsd  0x30(%rdx),%xmm4
  addsd  %xmm1,%xmm0
  movupd (%rdx),%xmm1
  unpckhpd %xmm1,%xmm1
  mulpd  %xmm6,%xmm1
  addsd  %xmm0,%xmm4
  movupd (%rdx),%xmm0
  unpcklpd %xmm0,%xmm0
  mulpd  %xmm7,%xmm0
  addpd  %xmm3,%xmm0
  addpd  %xmm1,%xmm0
  movupd 0x10(%rdx),%xmm1
  unpcklpd %xmm1,%xmm1
  mulpd  %xmm5,%xmm1
  addpd  %xmm1,%xmm0
  movupd 0x10(%rdx),%xmm1
  unpckhpd %xmm1,%xmm1
  mulpd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  mulsd  0x38(%rdx),%xmm2
  lea    0x1(%rax),%edx
  imul   %rdx,%rbx
  mov    %rdx,%rcx
  mov    %rdx,%rax
  shl    $0x7,%rcx
  shl    $0x2,%eax
  add    %rcx,%rsi
  addpd  %xmm1,%xmm0
  add    %rbx,%r10
  addsd  %xmm4,%xmm2
L98:
  cmp    %eax,%edi
  jle    L2
  lea    -0x1(%rdi),%edx
  sub    %eax,%edx
  cmp    $0x1,%edx
  jbe    L4
  movupd 0x10(%rsi),%xmm4
  movupd 0x30(%rsi),%xmm1
  and    $0xfffffffe,%edx
  movlpd 0x28(%rsi),%xmm1
  movlpd 0x8(%rsi),%xmm4
  mov    %edx,%ecx
  add    %edx,%eax
  movupd 0x20(%rsi),%xmm3
  mov    %rcx,%rbx
  unpcklpd %xmm1,%xmm4
  movupd (%rsi),%xmm1
  shl    $0x5,%rbx
  movhpd 0x30(%rsi),%xmm3
  movhpd 0x10(%rsi),%xmm1
  add    %rbx,%rsi
  unpcklpd %xmm3,%xmm1
  movupd (%r10),%xmm3
  mulpd  %xmm3,%xmm1
  mulpd  %xmm4,%xmm3
  movapd %xmm1,%xmm5
  unpcklpd %xmm3,%xmm5
  unpckhpd %xmm3,%xmm1
  addpd  %xmm5,%xmm0
  addpd  %xmm1,%xmm0
  movupd 0x20(%r10),%xmm1
  lea    (%r10,%rcx,8),%r10
  mulpd  %xmm4,%xmm1
  addsd  %xmm1,%xmm2
  unpckhpd %xmm1,%xmm1
  addsd  %xmm1,%xmm2
L4:
  movupd (%r10),%xmm1
  movupd (%rsi),%xmm7
  add    $0x1,%eax
  unpcklpd %xmm1,%xmm1
  mulpd  %xmm7,%xmm1
  addpd  %xmm1,%xmm0
  movsd  0x8(%rsi),%xmm1
  mulsd  0x20(%r10),%xmm1
  addsd  %xmm1,%xmm2
  cmp    %eax,%edi
  jle    L2
  movupd 0x8(%r10),%xmm3
  movupd 0x20(%rsi),%xmm1
  unpcklpd %xmm3,%xmm3
  mulpd  %xmm1,%xmm3
  unpckhpd %xmm1,%xmm1
  mulsd  0x28(%r10),%xmm1
  addpd  %xmm3,%xmm0
  addsd  %xmm1,%xmm2
L2:
  test   %r11d,%r11d
  je     L25
  movupd (%r8),%xmm3
  movsd  0x28(%r8),%xmm1
  cmp    $0x1,%r11d
  je     L22
  subpd  %xmm0,%xmm3
  subsd  %xmm2,%xmm1
  movapd %xmm3,%xmm0
  movapd %xmm1,%xmm2
L25:
  pop    %rbx
  movups %xmm0,(%r9)
  pop    %rbp
  movsd  %xmm2,0x28(%r9)
  ret
  cs nopw 0x0(%rax,%rax,1)
L22:
  addpd  %xmm3,%xmm0
  addsd  %xmm1,%xmm2
  pop    %rbx
  pop    %rbp
  movups %xmm0,(%r9)
  movsd  %xmm2,0x28(%r9)
  ret
  nopl   (%rax)
L24:
  pxor   %xmm0,%xmm0
  pxor   %xmm2,%xmm2
  xor    %eax,%eax
  jmp    L98
L60:
  mov    %r10,%rdx
  pxor   %xmm3,%xmm3
  pxor   %xmm4,%xmm4
  mov    %rsi,%rcx
  jmp    L62
```

assistant: ```c
void kernel_dsyrk_nn_2x2_lib4(int kmax, double *A, double *B, int sdb, double *C, double *D, int alg) {
  const int bs = 4;
  int k;
  double a_0, a_1, b_0, b_1, c_00 = 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_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_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_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_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_11 += a_1 * b_1;
    A += 4;
    B += 1;
  }
  double d_00, d_10, d_11;
  if (alg == 0) {
    D[0 + bs * 0] = c_00;
    D[1 + bs * 0] = c_10;
    D[1 + bs * 1] = c_11;
  } else {
    d_00 = C[0 + bs * 0];
    d_10 = C[1 + bs * 0];
    d_11 = C[1 + bs * 1];
    if (alg == 1) {
      d_00 += c_00;
      d_10 += c_10;
      d_11 += c_11;
    } else {
      d_00 -= c_00;
      d_10 -= c_10;
      d_11 -= c_11;
    }
    D[0 + bs * 0] = d_00;
    D[1 + bs * 0] = d_10;
    D[1 + bs * 1] = d_11;
  }
}
```