user: Converte this assembly snippet into its equivalent C code:

```asm
<kernel_dtrmm_nt_l_2x2_lib4>:
  endbr64
  mov    %rcx,%r8
  cmp    $0x4,%edi
  jle    L26
  lea    -0x5(%rdi),%ecx
  pxor   %xmm1,%xmm1
  mov    %rdx,%rax
  movapd %xmm1,%xmm3
  shr    $0x2,%ecx
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm6
  add    $0x1,%ecx
  shl    $0x7,%rcx
  lea    (%rsi,%rcx,1),%rdi
  nopl   0x0(%rax)
L3:
  movsd  (%rsi),%xmm4
  movsd  (%rax),%xmm5
  sub    $0xffffffffffffff80,%rsi
  sub    $0xffffffffffffff80,%rax
  movsd  -0x78(%rax),%xmm8
  movsd  -0x78(%rsi),%xmm0
  movapd %xmm4,%xmm7
  mulsd  %xmm8,%xmm4
  mulsd  %xmm5,%xmm7
  mulsd  %xmm0,%xmm5
  mulsd  %xmm8,%xmm0
  movsd  -0x58(%rax),%xmm8
  addsd  %xmm2,%xmm4
  movsd  -0x60(%rsi),%xmm2
  addsd  %xmm6,%xmm7
  addsd  %xmm3,%xmm5
  movsd  -0x60(%rax),%xmm3
  movapd %xmm2,%xmm6
  addsd  %xmm0,%xmm1
  movsd  -0x58(%rsi),%xmm0
  mulsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm6
  mulsd  %xmm0,%xmm3
  mulsd  %xmm8,%xmm0
  movsd  -0x38(%rax),%xmm8
  addsd  %xmm2,%xmm4
  movsd  -0x40(%rsi),%xmm2
  addsd  %xmm7,%xmm6
  addsd  %xmm3,%xmm5
  movsd  -0x40(%rax),%xmm3
  movapd %xmm2,%xmm7
  addsd  %xmm0,%xmm1
  movsd  -0x38(%rsi),%xmm0
  mulsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm7
  mulsd  %xmm0,%xmm3
  mulsd  %xmm8,%xmm0
  movsd  -0x18(%rax),%xmm8
  addsd  %xmm2,%xmm4
  movsd  -0x20(%rsi),%xmm2
  addsd  %xmm6,%xmm7
  addsd  %xmm3,%xmm5
  movsd  -0x20(%rax),%xmm3
  movapd %xmm2,%xmm6
  addsd  %xmm1,%xmm0
  movsd  -0x18(%rsi),%xmm1
  mulsd  %xmm8,%xmm2
  mulsd  %xmm3,%xmm6
  mulsd  %xmm1,%xmm3
  mulsd  %xmm8,%xmm1
  addsd  %xmm4,%xmm2
  addsd  %xmm7,%xmm6
  addsd  %xmm5,%xmm3
  addsd  %xmm0,%xmm1
  cmp    %rdi,%rsi
  jne    L3
  add    %rcx,%rdx
L25:
  movsd  (%rdi),%xmm0
  movsd  0x8(%rdi),%xmm4
  movsd  (%rdx),%xmm5
  movsd  0x8(%rdx),%xmm8
  movapd %xmm0,%xmm7
  mulsd  %xmm5,%xmm7
  mulsd  %xmm4,%xmm5
  mulsd  %xmm8,%xmm0
  mulsd  %xmm8,%xmm4
  addsd  %xmm6,%xmm7
  addsd  %xmm3,%xmm5
  addsd  %xmm0,%xmm2
  movsd  %xmm7,(%r8)
  addsd  %xmm1,%xmm4
  movsd  %xmm5,0x8(%r8)
  movsd  0x28(%rdx),%xmm0
  movsd  0x28(%rdi),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x20(%rdi),%xmm0
  addsd  %xmm4,%xmm1
  addsd  %xmm2,%xmm0
  movsd  %xmm1,0x28(%r8)
  movsd  %xmm0,0x20(%r8)
  ret
  nopw   0x0(%rax,%rax,1)
L26:
  pxor   %xmm1,%xmm1
  mov    %rsi,%rdi
  movapd %xmm1,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm6
  jmp    L25
```

assistant: ```c
void kernel_dtrmm_nt_l_2x2_lib4(int kmax, double *A, double *B, double *D) {
  const int lda = 4;
  const int ldc = 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 - 4; k += 4) {
    a_0 = A[0 + lda * 0];
    a_1 = A[1 + lda * 0];
    b_0 = B[0 + lda * 0];
    b_1 = B[1 + lda * 0];
    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 + lda * 1];
    a_1 = A[1 + lda * 1];
    b_0 = B[0 + lda * 1];
    b_1 = B[1 + lda * 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 + lda * 2];
    a_1 = A[1 + lda * 2];
    b_0 = B[0 + lda * 2];
    b_1 = B[1 + lda * 2];
    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 + lda * 3];
    a_1 = A[1 + lda * 3];
    b_0 = B[0 + lda * 3];
    b_1 = B[1 + lda * 3];
    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 += 16;
  }
  a_0 = A[0 + lda * 0];
  a_1 = A[1 + lda * 0];
  b_0 = B[0 + lda * 0];
  b_1 = B[1 + lda * 0];
  c_00 += a_0 * b_0;
  c_10 += a_1 * b_0;
  D[0 + ldc * 0] = c_00;
  D[1 + ldc * 0] = c_10;
  c_01 += a_0 * b_1;
  c_11 += a_1 * b_1;
  a_0 = A[0 + lda * 1];
  a_1 = A[1 + lda * 1];
  b_1 = B[1 + lda * 1];
  c_01 += a_0 * b_1;
  c_11 += a_1 * b_1;
  D[0 + ldc * 1] = c_01;
  D[1 + ldc * 1] = c_11;
}
```