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

```asm
<kernel_dtrsm_nn_ll_diag_4x2_vs_lib4>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r13d
  mov    %esi,%ebp
  mov    0x38(%rsp),%rbx
  mov    0x40(%rsp),%r10
  mov    0x48(%rsp),%r11
  test   %edx,%edx
  jle    L55
  mov    %edx,%edi
  mov    %rcx,%rax
  cmp    $0x3,%edx
  jle    L32
  shl    $0x2,%r9d
  movslq %r9d,%rsi
  shl    $0x3,%rsi
  lea    -0x4(%rdx),%r9d
  shr    $0x2,%r9d
  lea    0x1(%r9),%edx
  mov    %edx,%r12d
  mov    %r12,%rcx
  shl    $0x7,%rcx
  add    %rax,%rcx
  mov    %r8,%rdx
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm6
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm1
  mov    %r9d,%r14d
  movapd %xmm0,%xmm12
L109:
  movsd  (%rax),%xmm14
  movsd  0x8(%rax),%xmm13
  movsd  0x10(%rax),%xmm10
  movsd  0x18(%rax),%xmm8
  movsd  (%rdx),%xmm7
  movsd  0x20(%rdx),%xmm9
  movapd %xmm14,%xmm15
  mulsd  %xmm7,%xmm15
  subsd  %xmm15,%xmm1
  movq   %xmm1,%r9
  movapd %xmm13,%xmm1
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm2
  movapd %xmm10,%xmm1
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm3
  mulsd  %xmm8,%xmm7
  subsd  %xmm7,%xmm5
  mulsd  %xmm9,%xmm14
  subsd  %xmm14,%xmm4
  mulsd  %xmm9,%xmm13
  subsd  %xmm13,%xmm12
  mulsd  %xmm9,%xmm10
  subsd  %xmm10,%xmm6
  mulsd  %xmm9,%xmm8
  subsd  %xmm8,%xmm0
  movsd  0x20(%rax),%xmm11
  movsd  0x28(%rax),%xmm10
  movsd  0x30(%rax),%xmm9
  movsd  0x38(%rax),%xmm7
  movsd  0x8(%rdx),%xmm1
  movsd  0x28(%rdx),%xmm8
  movapd %xmm11,%xmm13
  mulsd  %xmm1,%xmm13
  movq   %r9,%xmm14
  subsd  %xmm13,%xmm14
  movapd %xmm10,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm2
  movapd %xmm9,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm3
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm5
  mulsd  %xmm8,%xmm11
  subsd  %xmm11,%xmm4
  mulsd  %xmm8,%xmm10
  subsd  %xmm10,%xmm12
  mulsd  %xmm8,%xmm9
  subsd  %xmm9,%xmm6
  mulsd  %xmm8,%xmm7
  subsd  %xmm7,%xmm0
  movsd  0x40(%rax),%xmm11
  movsd  0x48(%rax),%xmm10
  movsd  0x50(%rax),%xmm9
  movsd  0x58(%rax),%xmm7
  movsd  0x10(%rdx),%xmm1
  movsd  0x30(%rdx),%xmm8
  movapd %xmm11,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm14
  movq   %xmm14,%r9
  movapd %xmm10,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm2
  movapd %xmm9,%xmm13
  mulsd  %xmm1,%xmm13
  subsd  %xmm13,%xmm3
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm5
  mulsd  %xmm8,%xmm11
  subsd  %xmm11,%xmm4
  mulsd  %xmm8,%xmm10
  subsd  %xmm10,%xmm12
  movapd %xmm12,%xmm11
  mulsd  %xmm8,%xmm9
  subsd  %xmm9,%xmm6
  mulsd  %xmm8,%xmm7
  subsd  %xmm7,%xmm0
  movsd  0x60(%rax),%xmm13
  movsd  0x68(%rax),%xmm10
  movsd  0x70(%rax),%xmm9
  movsd  0x78(%rax),%xmm7
  movsd  0x18(%rdx),%xmm14
  movsd  0x38(%rdx),%xmm8
  movapd %xmm13,%xmm15
  mulsd  %xmm14,%xmm15
  movq   %r9,%xmm1
  subsd  %xmm15,%xmm1
  movapd %xmm10,%xmm12
  mulsd  %xmm14,%xmm12
  subsd  %xmm12,%xmm2
  movapd %xmm9,%xmm12
  mulsd  %xmm14,%xmm12
  subsd  %xmm12,%xmm3
  mulsd  %xmm7,%xmm14
  subsd  %xmm14,%xmm5
  mulsd  %xmm8,%xmm13
  subsd  %xmm13,%xmm4
  mulsd  %xmm8,%xmm10
  subsd  %xmm10,%xmm11
  movapd %xmm11,%xmm12
  mulsd  %xmm8,%xmm9
  subsd  %xmm9,%xmm6
  mulsd  %xmm8,%xmm7
  subsd  %xmm7,%xmm0
  sub    $0xffffffffffffff80,%rax
  add    %rsi,%rdx
  cmp    %rcx,%rax
  jne    L109
  imul   %r12,%rsi
  add    %rsi,%r8
  lea    0x4(,%r14,4),%eax
  cmp    %eax,%edi
  jle    L113
L105:
  movsd  (%rcx),%xmm13
  movsd  0x8(%rcx),%xmm12
  movsd  0x10(%rcx),%xmm10
  movsd  0x18(%rcx),%xmm8
  movsd  (%r8),%xmm7
  movsd  0x20(%r8),%xmm9
  movapd %xmm13,%xmm14
  mulsd  %xmm7,%xmm14
  subsd  %xmm14,%xmm1
  movapd %xmm12,%xmm14
  mulsd  %xmm7,%xmm14
  subsd  %xmm14,%xmm2
  movapd %xmm10,%xmm14
  mulsd  %xmm7,%xmm14
  subsd  %xmm14,%xmm3
  mulsd  %xmm8,%xmm7
  subsd  %xmm7,%xmm5
  mulsd  %xmm9,%xmm13
  subsd  %xmm13,%xmm4
  mulsd  %xmm9,%xmm12
  subsd  %xmm12,%xmm11
  mulsd  %xmm9,%xmm10
  subsd  %xmm10,%xmm6
  mulsd  %xmm9,%xmm8
  subsd  %xmm8,%xmm0
  add    $0x20,%rcx
  add    $0x8,%r8
  add    $0x1,%eax
  cmp    %eax,%edi
  jg     L105
L113:
  cmpl   $0x0,0x30(%rsp)
  je     L25
  addsd  (%rbx),%xmm1
  addsd  0x8(%rbx),%xmm2
  addsd  0x10(%rbx),%xmm3
  addsd  0x18(%rbx),%xmm5
  addsd  0x20(%rbx),%xmm4
  addsd  0x28(%rbx),%xmm11
  addsd  0x30(%rbx),%xmm6
  addsd  0x38(%rbx),%xmm0
L25:
  movsd  %xmm1,(%r10)
  cmp    $0x1,%ebp
  jle    L96
  movsd  %xmm4,0x20(%r10)
L96:
  movsd  0x8(%r11),%xmm8
  movsd  0x10(%r11),%xmm7
  movsd  0x18(%r11),%xmm9
  movapd %xmm1,%xmm10
  mulsd  %xmm8,%xmm10
  subsd  %xmm10,%xmm2
  movapd %xmm1,%xmm10
  mulsd  %xmm7,%xmm10
  subsd  %xmm10,%xmm3
  mulsd  %xmm9,%xmm1
  subsd  %xmm1,%xmm5
  mulsd  %xmm4,%xmm8
  subsd  %xmm8,%xmm11
  mulsd  %xmm4,%xmm7
  subsd  %xmm7,%xmm6
  mulsd  %xmm9,%xmm4
  subsd  %xmm4,%xmm0
  movsd  %xmm2,0x8(%r10)
  cmp    $0x1,%ebp
  jle    L17
  movsd  %xmm11,0x28(%r10)
  movsd  0x30(%r11),%xmm1
  movsd  0x38(%r11),%xmm4
  movapd %xmm2,%xmm7
  mulsd  %xmm1,%xmm7
  subsd  %xmm7,%xmm3
  mulsd  %xmm11,%xmm1
  subsd  %xmm1,%xmm6
  movsd  %xmm3,0x10(%r10)
  movsd  %xmm6,0x30(%r10)
  cmp    $0x3,%r13d
  jle    L58
  movsd  0x58(%r11),%xmm1
  mulsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm5
  mulsd  %xmm4,%xmm11
  subsd  %xmm11,%xmm0
  mulsd  %xmm1,%xmm3
  subsd  %xmm3,%xmm5
  movsd  %xmm5,0x18(%r10)
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm0
  movsd  %xmm0,0x38(%r10)
L58:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L32:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm6
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm11
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm1
  mov    $0x0,%eax
  jmp    L105
L55:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm6
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm11
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm1
  jmp    L113
L17:
  movsd  0x38(%r11),%xmm0
  movapd %xmm2,%xmm1
  mulsd  0x30(%r11),%xmm1
  subsd  %xmm1,%xmm3
  movsd  %xmm3,0x10(%r10)
  cmp    $0x3,%r13d
  jle    L58
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm5
  mulsd  0x58(%r11),%xmm3
  subsd  %xmm3,%xmm5
  movsd  %xmm5,0x18(%r10)
  jmp    L58
```

assistant: ```c
void kernel_dtrsm_nn_ll_diag_4x2_vs_lib4(int km, int kn, int kmax, double *A, double *B, int sdb, int alg, double *C, double *D, double *E) {
  const int bs = 4;
  int k;
  double tmp, a_0, a_1, a_2, a_3, b_0, b_1, e_1, e_2, e_3, d_00 = 0, d_01 = 0, d_10 = 0, d_11 = 0, d_20 = 0, d_21 = 0, d_30 = 0, d_31 = 0;
  if (kmax <= 0)
    goto add;
  for (k = 0; 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[0 + bs * 1];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_20 -= a_2 * b_0;
    d_30 -= a_3 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_21 -= a_2 * b_1;
    d_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[1 + bs * 0];
    b_1 = B[1 + bs * 1];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_20 -= a_2 * b_0;
    d_30 -= a_3 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_21 -= a_2 * b_1;
    d_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[2 + bs * 0];
    b_1 = B[2 + bs * 1];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_20 -= a_2 * b_0;
    d_30 -= a_3 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_21 -= a_2 * b_1;
    d_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[3 + bs * 0];
    b_1 = B[3 + bs * 1];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_20 -= a_2 * b_0;
    d_30 -= a_3 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_21 -= a_2 * b_1;
    d_31 -= a_3 * b_1;
    A += 16;
    B += 4 * sdb;
  }
  for (; k < kmax; k++) {
    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[0 + bs * 1];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_20 -= a_2 * b_0;
    d_30 -= a_3 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_21 -= a_2 * b_1;
    d_31 -= a_3 * b_1;
    A += 4;
    B += 1;
  }
add:
  if (alg != 0) {
    d_00 += C[0 + bs * 0];
    d_10 += C[1 + bs * 0];
    d_20 += C[2 + bs * 0];
    d_30 += C[3 + bs * 0];
    d_01 += C[0 + bs * 1];
    d_11 += C[1 + bs * 1];
    d_21 += C[2 + bs * 1];
    d_31 += C[3 + bs * 1];
  }
  D[0 + bs * 0] = d_00;
  if (kn >= 2)
    D[0 + bs * 1] = d_01;
  e_1 = E[1 + bs * 0];
  e_2 = E[2 + bs * 0];
  e_3 = E[3 + bs * 0];
  d_10 -= e_1 * d_00;
  d_20 -= e_2 * d_00;
  d_30 -= e_3 * d_00;
  d_11 -= e_1 * d_01;
  d_21 -= e_2 * d_01;
  d_31 -= e_3 * d_01;
  D[1 + bs * 0] = d_10;
  if (kn >= 2)
    D[1 + bs * 1] = d_11;
  e_2 = E[2 + bs * 1];
  e_3 = E[3 + bs * 1];
  d_20 -= e_2 * d_10;
  d_30 -= e_3 * d_10;
  d_21 -= e_2 * d_11;
  d_31 -= e_3 * d_11;
  D[2 + bs * 0] = d_20;
  if (kn >= 2)
    D[2 + bs * 1] = d_21;
  if (km < 4)
    return;
  e_3 = E[3 + bs * 2];
  d_30 -= e_3 * d_20;
  d_31 -= e_3 * d_21;
  D[3 + bs * 0] = d_30;
  if (kn >= 2)
    D[3 + bs * 1] = d_31;
  return;
}
```