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

```asm
<kernel_dtrinv_4x2_lib4>:
  endbr64
  mov    %rsi,%r9
  mov    %rcx,%rsi
  movsd  (%r9),%xmm0
  movapd %xmm0,%xmm3
  mulsd  (%rdx),%xmm3
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm2
  subsd  %xmm3,%xmm2
  mulsd  0x8(%rdx),%xmm0
  movapd %xmm1,%xmm3
  subsd  %xmm0,%xmm3
  movsd  0x20(%r9),%xmm5
  movsd  0x28(%r9),%xmm0
  movsd  0x20(%rdx),%xmm4
  movsd  0x28(%rdx),%xmm7
  movapd %xmm5,%xmm6
  mulsd  %xmm4,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm0,%xmm4
  movapd %xmm4,%xmm6
  movapd %xmm1,%xmm4
  subsd  %xmm6,%xmm4
  mulsd  %xmm7,%xmm5
  subsd  %xmm5,%xmm3
  mulsd  %xmm7,%xmm0
  movapd %xmm1,%xmm8
  subsd  %xmm0,%xmm8
  movsd  0x40(%r9),%xmm9
  movsd  0x48(%r9),%xmm7
  movsd  0x50(%r9),%xmm6
  movsd  0x40(%rdx),%xmm0
  movsd  0x48(%rdx),%xmm10
  movapd %xmm9,%xmm5
  mulsd  %xmm0,%xmm5
  subsd  %xmm5,%xmm2
  movapd %xmm7,%xmm5
  mulsd  %xmm0,%xmm5
  subsd  %xmm5,%xmm4
  mulsd  %xmm6,%xmm0
  movapd %xmm1,%xmm5
  subsd  %xmm0,%xmm5
  mulsd  %xmm10,%xmm9
  subsd  %xmm9,%xmm3
  mulsd  %xmm10,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm10,%xmm6
  movapd %xmm1,%xmm13
  subsd  %xmm6,%xmm13
  movsd  0x60(%r9),%xmm12
  movsd  0x68(%r9),%xmm11
  movsd  0x70(%r9),%xmm10
  movsd  0x78(%r9),%xmm6
  movsd  0x60(%rdx),%xmm0
  movsd  0x68(%rdx),%xmm7
  movapd %xmm12,%xmm9
  mulsd  %xmm0,%xmm9
  subsd  %xmm9,%xmm2
  movapd %xmm11,%xmm9
  mulsd  %xmm0,%xmm9
  subsd  %xmm9,%xmm4
  movapd %xmm10,%xmm9
  mulsd  %xmm0,%xmm9
  subsd  %xmm9,%xmm5
  mulsd  %xmm6,%xmm0
  movapd %xmm1,%xmm9
  subsd  %xmm0,%xmm9
  mulsd  %xmm7,%xmm12
  subsd  %xmm12,%xmm3
  mulsd  %xmm7,%xmm11
  subsd  %xmm11,%xmm8
  mulsd  %xmm7,%xmm10
  subsd  %xmm10,%xmm13
  mulsd  %xmm7,%xmm6
  subsd  %xmm6,%xmm1
  lea    0x80(%r9),%rax
  sub    $0xffffffffffffff80,%rdx
  cmp    $0x7,%edi
  jle    L17
  lea    -0x8(%rdi),%ecx
  shr    $0x2,%ecx
  add    $0x2,%ecx
  mov    %ecx,%ecx
  shl    $0x7,%rcx
  add    %r9,%rcx
L5:
  movsd  (%rax),%xmm7
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm14
  movsd  0x18(%rax),%xmm10
  movsd  (%rdx),%xmm0
  movsd  0x8(%rdx),%xmm11
  movapd %xmm7,%xmm12
  mulsd  %xmm0,%xmm12
  subsd  %xmm12,%xmm2
  movapd %xmm6,%xmm12
  mulsd  %xmm0,%xmm12
  subsd  %xmm12,%xmm4
  movapd %xmm14,%xmm12
  mulsd  %xmm0,%xmm12
  subsd  %xmm12,%xmm5
  mulsd  %xmm10,%xmm0
  subsd  %xmm0,%xmm9
  mulsd  %xmm11,%xmm7
  subsd  %xmm7,%xmm3
  mulsd  %xmm11,%xmm6
  subsd  %xmm6,%xmm8
  movapd %xmm8,%xmm12
  mulsd  %xmm11,%xmm14
  subsd  %xmm14,%xmm13
  movapd %xmm10,%xmm0
  mulsd  %xmm11,%xmm0
  subsd  %xmm0,%xmm1
  movsd  0x20(%rax),%xmm8
  movsd  0x28(%rax),%xmm7
  movsd  0x30(%rax),%xmm6
  movsd  0x38(%rax),%xmm10
  movsd  0x20(%rdx),%xmm0
  movsd  0x28(%rdx),%xmm11
  movapd %xmm8,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm2
  movapd %xmm7,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm4
  movapd %xmm6,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm5
  mulsd  %xmm10,%xmm0
  subsd  %xmm0,%xmm9
  mulsd  %xmm11,%xmm8
  subsd  %xmm8,%xmm3
  mulsd  %xmm11,%xmm7
  subsd  %xmm7,%xmm12
  mulsd  %xmm11,%xmm6
  subsd  %xmm6,%xmm13
  movapd %xmm10,%xmm0
  mulsd  %xmm11,%xmm0
  subsd  %xmm0,%xmm1
  movsd  0x40(%rax),%xmm8
  movsd  0x48(%rax),%xmm7
  movsd  0x50(%rax),%xmm6
  movsd  0x58(%rax),%xmm10
  movsd  0x40(%rdx),%xmm0
  movsd  0x48(%rdx),%xmm11
  movapd %xmm8,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm2
  movapd %xmm7,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm4
  movapd %xmm6,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm5
  mulsd  %xmm10,%xmm0
  subsd  %xmm0,%xmm9
  mulsd  %xmm11,%xmm8
  subsd  %xmm8,%xmm3
  mulsd  %xmm11,%xmm7
  subsd  %xmm7,%xmm12
  mulsd  %xmm11,%xmm6
  subsd  %xmm6,%xmm13
  movapd %xmm10,%xmm0
  mulsd  %xmm11,%xmm0
  subsd  %xmm0,%xmm1
  movsd  0x60(%rax),%xmm8
  movsd  0x68(%rax),%xmm7
  movsd  0x70(%rax),%xmm6
  movsd  0x78(%rax),%xmm10
  movsd  0x60(%rdx),%xmm0
  movsd  0x68(%rdx),%xmm11
  movapd %xmm8,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm2
  movapd %xmm7,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm4
  movapd %xmm6,%xmm14
  mulsd  %xmm0,%xmm14
  subsd  %xmm14,%xmm5
  mulsd  %xmm10,%xmm0
  subsd  %xmm0,%xmm9
  mulsd  %xmm11,%xmm8
  subsd  %xmm8,%xmm3
  mulsd  %xmm11,%xmm7
  movapd %xmm12,%xmm8
  subsd  %xmm7,%xmm8
  mulsd  %xmm11,%xmm6
  subsd  %xmm6,%xmm13
  movapd %xmm10,%xmm0
  mulsd  %xmm11,%xmm0
  subsd  %xmm0,%xmm1
  sub    $0xffffffffffffff80,%rax
  sub    $0xffffffffffffff80,%rdx
  cmp    %rcx,%rax
  jne    L5
L17:
  movsd  (%r8),%xmm0
  mulsd  %xmm0,%xmm2
  mulsd  %xmm0,%xmm4
  mulsd  %xmm0,%xmm5
  mulsd  %xmm9,%xmm0
  movsd  %xmm2,(%rsi)
  movsd  %xmm4,0x8(%rsi)
  movsd  %xmm5,0x10(%rsi)
  movsd  %xmm0,0x18(%rsi)
  movsd  0x8(%r8),%xmm7
  movsd  0x10(%r8),%xmm6
  mulsd  %xmm7,%xmm2
  subsd  %xmm2,%xmm3
  mulsd  %xmm7,%xmm4
  subsd  %xmm4,%xmm8
  mulsd  %xmm7,%xmm5
  subsd  %xmm5,%xmm13
  mulsd  %xmm7,%xmm0
  subsd  %xmm0,%xmm1
  mulsd  %xmm6,%xmm3
  movsd  %xmm3,0x20(%rsi)
  mulsd  %xmm6,%xmm8
  movsd  %xmm8,0x28(%rsi)
  mulsd  %xmm6,%xmm13
  movsd  %xmm13,0x30(%rsi)
  mulsd  %xmm1,%xmm6
  movsd  %xmm6,0x38(%rsi)
  ret
```

assistant: ```c
void kernel_dtrinv_4x2_lib4(int kmax, double *A, double *B, double *C, double *fact) {
  const int bs = 4;
  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;
  a_0 = A[0 + bs * 0];
  b_0 = B[0 + bs * 0];
  b_1 = B[1 + bs * 0];
  c_00 -= a_0 * b_0;
  c_01 -= a_0 * b_1;
  a_0 = A[0 + bs * 1];
  a_1 = A[1 + bs * 1];
  b_0 = B[0 + bs * 1];
  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];
  a_2 = A[2 + bs * 2];
  b_0 = B[0 + bs * 2];
  b_1 = B[1 + bs * 2];
  c_00 -= a_0 * b_0;
  c_10 -= a_1 * b_0;
  c_20 -= a_2 * b_0;
  c_01 -= a_0 * b_1;
  c_11 -= a_1 * b_1;
  c_21 -= a_2 * b_1;
  a_0 = A[0 + bs * 3];
  a_1 = A[1 + bs * 3];
  a_2 = A[2 + bs * 3];
  a_3 = A[3 + bs * 3];
  b_0 = B[0 + bs * 3];
  b_1 = B[1 + bs * 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 += 16;
  B += 16;
  k = 4;
  for (; k < kmax - 3; k += 4) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + bs * 0];
    a_2 = A[2 + bs * 0];
    a_3 = A[3 + bs * 0];
    b_0 = B[0 + bs * 0];
    b_1 = B[1 + bs * 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 + bs * 1];
    a_1 = A[1 + bs * 1];
    a_2 = A[2 + bs * 1];
    a_3 = A[3 + bs * 1];
    b_0 = B[0 + bs * 1];
    b_1 = B[1 + bs * 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 + bs * 2];
    a_1 = A[1 + bs * 2];
    a_2 = A[2 + bs * 2];
    a_3 = A[3 + bs * 2];
    b_0 = B[0 + bs * 2];
    b_1 = B[1 + bs * 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 + bs * 3];
    a_1 = A[1 + bs * 3];
    a_2 = A[2 + bs * 3];
    a_3 = A[3 + bs * 3];
    b_0 = B[0 + bs * 3];
    b_1 = B[1 + bs * 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 += 16;
    B += 16;
  }
  double a_00, a_10, a_11;
  a_00 = fact[0];
  c_00 *= a_00;
  c_10 *= a_00;
  c_20 *= a_00;
  c_30 *= a_00;
  C[0 + bs * 0] = c_00;
  C[1 + bs * 0] = c_10;
  C[2 + bs * 0] = c_20;
  C[3 + bs * 0] = c_30;
  a_10 = fact[1];
  a_11 = fact[2];
  c_01 -= c_00 * a_10;
  c_11 -= c_10 * a_10;
  c_21 -= c_20 * a_10;
  c_31 -= c_30 * a_10;
  c_01 *= a_11;
  c_11 *= a_11;
  c_21 *= a_11;
  c_31 *= a_11;
  C[0 + bs * 1] = c_01;
  C[1 + bs * 1] = c_11;
  C[2 + bs * 1] = c_21;
  C[3 + bs * 1] = c_31;
}
```