user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<kernel_dtrsv_t_4_lib4>:
  endbr64
  test   %edi,%edi
  jle    L22
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r11d
  mov    %esi,%ebx
  mov    %rdx,%r10
  shl    $0x2,%ecx
  movslq %ecx,%rdi
  lea    0x0(,%rdi,8),%rbp
  lea    (%rdx,%rbp,1),%r9
  lea    0x20(%r8),%rsi
  cmp    $0xb,%r11d
  jle    L3
  shl    $0x4,%rdi
  lea    (%r9,%rbp,1),%rdx
  lea    -0xc(%r11),%r13d
  shr    $0x3,%r13d
  mov    %r13d,%r14d
  mov    %r14,%rax
  shl    $0x6,%rax
  lea    0x60(%r8,%rax,1),%r12
  mov    %rsi,%rcx
  mov    %r9,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm7
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm6
L4:
  movsd  (%rcx),%xmm4
  movsd  0x8(%rcx),%xmm3
  movsd  0x10(%rcx),%xmm2
  movsd  0x18(%rcx),%xmm1
  movapd %xmm4,%xmm8
  mulsd  (%rax),%xmm8
  addsd  %xmm6,%xmm8
  movapd %xmm4,%xmm6
  mulsd  0x20(%rax),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm4,%xmm5
  mulsd  0x40(%rax),%xmm5
  addsd  %xmm7,%xmm5
  mulsd  0x60(%rax),%xmm4
  addsd  %xmm0,%xmm4
  movapd %xmm3,%xmm7
  mulsd  0x8(%rax),%xmm7
  addsd  %xmm8,%xmm7
  movapd %xmm3,%xmm0
  mulsd  0x28(%rax),%xmm0
  addsd  %xmm6,%xmm0
  movapd %xmm3,%xmm6
  mulsd  0x48(%rax),%xmm6
  addsd  %xmm5,%xmm6
  mulsd  0x68(%rax),%xmm3
  addsd  %xmm4,%xmm3
  movapd %xmm2,%xmm5
  mulsd  0x10(%rax),%xmm5
  addsd  %xmm7,%xmm5
  movapd %xmm2,%xmm4
  mulsd  0x30(%rax),%xmm4
  addsd  %xmm0,%xmm4
  movapd %xmm2,%xmm0
  mulsd  0x50(%rax),%xmm0
  addsd  %xmm6,%xmm0
  mulsd  0x70(%rax),%xmm2
  addsd  %xmm3,%xmm2
  movapd %xmm1,%xmm6
  mulsd  0x18(%rax),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm1,%xmm5
  mulsd  0x38(%rax),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm1,%xmm8
  mulsd  0x58(%rax),%xmm8
  addsd  %xmm0,%xmm8
  mulsd  0x78(%rax),%xmm1
  movapd %xmm1,%xmm4
  addsd  %xmm2,%xmm4
  movsd  0x20(%rcx),%xmm3
  movsd  0x28(%rcx),%xmm2
  movsd  0x30(%rcx),%xmm1
  movsd  0x38(%rcx),%xmm0
  movapd %xmm3,%xmm7
  mulsd  (%rdx),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm3,%xmm6
  mulsd  0x20(%rdx),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm3,%xmm5
  mulsd  0x40(%rdx),%xmm5
  addsd  %xmm8,%xmm5
  mulsd  0x60(%rdx),%xmm3
  addsd  %xmm4,%xmm3
  movapd %xmm2,%xmm4
  mulsd  0x8(%rdx),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm2,%xmm7
  mulsd  0x28(%rdx),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm2,%xmm6
  mulsd  0x48(%rdx),%xmm6
  addsd  %xmm5,%xmm6
  mulsd  0x68(%rdx),%xmm2
  addsd  %xmm3,%xmm2
  movapd %xmm1,%xmm5
  mulsd  0x10(%rdx),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm1,%xmm4
  mulsd  0x30(%rdx),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm1,%xmm3
  mulsd  0x50(%rdx),%xmm3
  addsd  %xmm6,%xmm3
  mulsd  0x70(%rdx),%xmm1
  addsd  %xmm2,%xmm1
  movapd %xmm0,%xmm6
  mulsd  0x18(%rdx),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm0,%xmm5
  mulsd  0x38(%rdx),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm0,%xmm7
  mulsd  0x58(%rdx),%xmm7
  addsd  %xmm3,%xmm7
  mulsd  0x78(%rdx),%xmm0
  addsd  %xmm1,%xmm0
  add    %rdi,%rax
  add    $0x40,%rcx
  add    %rdi,%rdx
  cmp    %rcx,%r12
  jne    L4
  lea    0x1(%r14),%rax
  imul   %rax,%rdi
  add    %rdi,%r9
  shl    $0x6,%rax
  add    %rax,%rsi
  lea    0xc(,%r13,8),%ecx
L40:
  lea    -0x3(%r11),%eax
  cmp    %ecx,%eax
  jle    L45
  lea    -0x4(%r11),%edi
  sub    %ecx,%edi
  shr    $0x2,%edi
  lea    0x1(%rdi),%r12d
  mov    %r12d,%r12d
  mov    %r12,%rdx
  shl    $0x5,%rdx
  add    %rsi,%rdx
  mov    %r9,%rax
L55:
  movsd  (%rsi),%xmm2
  movsd  0x8(%rsi),%xmm1
  movsd  0x10(%rsi),%xmm3
  movsd  0x18(%rsi),%xmm4
  movapd %xmm2,%xmm8
  mulsd  (%rax),%xmm8
  addsd  %xmm8,%xmm6
  movapd %xmm2,%xmm8
  mulsd  0x20(%rax),%xmm8
  addsd  %xmm5,%xmm8
  movapd %xmm2,%xmm5
  mulsd  0x40(%rax),%xmm5
  addsd  %xmm7,%xmm5
  mulsd  0x60(%rax),%xmm2
  addsd  %xmm0,%xmm2
  movapd %xmm1,%xmm7
  mulsd  0x8(%rax),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm1,%xmm6
  mulsd  0x28(%rax),%xmm6
  addsd  %xmm8,%xmm6
  movapd %xmm1,%xmm0
  mulsd  0x48(%rax),%xmm0
  addsd  %xmm5,%xmm0
  mulsd  0x68(%rax),%xmm1
  addsd  %xmm2,%xmm1
  movapd %xmm3,%xmm5
  mulsd  0x10(%rax),%xmm5
  addsd  %xmm7,%xmm5
  movapd %xmm3,%xmm7
  mulsd  0x30(%rax),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm3,%xmm2
  mulsd  0x50(%rax),%xmm2
  addsd  %xmm0,%xmm2
  mulsd  0x70(%rax),%xmm3
  movapd %xmm3,%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm4,%xmm6
  mulsd  0x18(%rax),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm4,%xmm5
  mulsd  0x38(%rax),%xmm5
  addsd  %xmm7,%xmm5
  movapd %xmm4,%xmm7
  mulsd  0x58(%rax),%xmm7
  addsd  %xmm2,%xmm7
  movapd %xmm4,%xmm1
  mulsd  0x78(%rax),%xmm1
  addsd  %xmm1,%xmm0
  add    %rbp,%rax
  add    $0x20,%rsi
  cmp    %rdx,%rsi
  jne    L55
  mov    %rbp,%rax
  imul   %r12,%rax
  add    %rax,%r9
  lea    0x4(%rcx,%rdi,4),%ecx
L41:
  cmp    %ecx,%r11d
  jle    L99
  sub    $0x1,%r11d
  sub    %ecx,%r11d
  lea    0x8(%r9,%r11,8),%rax
L52:
  movsd  (%rdx),%xmm1
  movapd %xmm1,%xmm2
  mulsd  (%r9),%xmm2
  addsd  %xmm2,%xmm6
  movapd %xmm1,%xmm2
  mulsd  0x20(%r9),%xmm2
  addsd  %xmm2,%xmm5
  movapd %xmm1,%xmm2
  mulsd  0x40(%r9),%xmm2
  addsd  %xmm2,%xmm7
  mulsd  0x60(%r9),%xmm1
  addsd  %xmm1,%xmm0
  add    $0x8,%r9
  add    $0x8,%rdx
  cmp    %rax,%r9
  jne    L52
L99:
  test   %ebx,%ebx
  je     L104
  movsd  0x18(%r8),%xmm1
  subsd  %xmm0,%xmm1
  mulsd  0x78(%r10),%xmm1
  movsd  %xmm1,0x18(%r8)
  movapd %xmm1,%xmm2
  mulsd  0x58(%r10),%xmm2
  movsd  0x10(%r8),%xmm0
  subsd  %xmm2,%xmm0
  subsd  %xmm7,%xmm0
  mulsd  0x50(%r10),%xmm0
  movsd  %xmm0,0x10(%r8)
  movapd %xmm0,%xmm2
  mulsd  0x10(%r10),%xmm2
  movapd %xmm1,%xmm3
  mulsd  0x18(%r10),%xmm3
  addsd  %xmm3,%xmm2
  addsd  %xmm6,%xmm2
  mulsd  0x30(%r10),%xmm0
  mulsd  0x38(%r10),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm5,%xmm0
  movsd  0x8(%r8),%xmm1
  subsd  %xmm0,%xmm1
  mulsd  0x28(%r10),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%r8)
  mulsd  0x8(%r10),%xmm0
  movsd  (%r8),%xmm1
  subsd  %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  mulsd  (%r10),%xmm1
  movsd  %xmm1,(%r8)
L85:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L3:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm7
  movapd %xmm0,%xmm5
  movapd %xmm0,%xmm6
  mov    $0x4,%ecx
  jmp    L40
L45:
  mov    %rsi,%rdx
  jmp    L41
L104:
  movsd  0x18(%r8),%xmm1
  subsd  %xmm0,%xmm1
  divsd  0x78(%r10),%xmm1
  movsd  %xmm1,0x18(%r8)
  movapd %xmm1,%xmm2
  mulsd  0x58(%r10),%xmm2
  movsd  0x10(%r8),%xmm0
  subsd  %xmm2,%xmm0
  subsd  %xmm7,%xmm0
  divsd  0x50(%r10),%xmm0
  movsd  %xmm0,0x10(%r8)
  movapd %xmm0,%xmm2
  mulsd  0x10(%r10),%xmm2
  movapd %xmm1,%xmm3
  mulsd  0x18(%r10),%xmm3
  addsd  %xmm3,%xmm2
  addsd  %xmm6,%xmm2
  mulsd  0x30(%r10),%xmm0
  mulsd  0x38(%r10),%xmm1
  addsd  %xmm1,%xmm0
  addsd  %xmm5,%xmm0
  movsd  0x8(%r8),%xmm1
  subsd  %xmm0,%xmm1
  divsd  0x28(%r10),%xmm1
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x8(%r8)
  mulsd  0x8(%r10),%xmm0
  movsd  (%r8),%xmm1
  subsd  %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  divsd  (%r10),%xmm1
  movsd  %xmm1,(%r8)
  jmp    L85
L22:
  ret
```

assistant: ```c
void kernel_dtrsv_t_4_lib4(int kmax, int inverted_diag, double *A, int sda, double *x) {
  if (kmax <= 0)
    return;
  const int lda = 4;
  const int bs = 4;
  int k;
  double *tA, *tx;
  tA = A;
  tx = x;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0, y_2 = 0, y_3 = 0;
  k = 4;
  A += 4 + (sda - 1) * lda;
  x += 4;
  for (; k < kmax - 7; k += 8) {
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    y_0 += A[1 + lda * 0] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[1 + lda * 2] * x_1;
    y_3 += A[1 + lda * 3] * x_1;
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[2 + lda * 3] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    y_2 += A[3 + lda * 2] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += sda * bs;
    x += 4;
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    y_0 += A[1 + lda * 0] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[1 + lda * 2] * x_1;
    y_3 += A[1 + lda * 3] * x_1;
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[2 + lda * 3] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    y_2 += A[3 + lda * 2] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += sda * bs;
    x += 4;
  }
  for (; k < kmax - 3; k += 4) {
    x_0 = x[0];
    x_1 = x[1];
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    y_0 += A[1 + lda * 0] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[1 + lda * 2] * x_1;
    y_3 += A[1 + lda * 3] * x_1;
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[2 + lda * 3] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    y_2 += A[3 + lda * 2] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += sda * bs;
    x += 4;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    y_2 += A[0 + lda * 2] * x_0;
    y_3 += A[0 + lda * 3] * x_0;
    A += 1;
    x += 1;
  }
  A = tA;
  x = tx;
  if (inverted_diag) {
    y_3 = x[3] - y_3;
    y_3 *= A[3 + lda * 3];
    x[3] = y_3;
    y_2 = x[2] - A[3 + lda * 2] * y_3 - y_2;
    y_2 *= A[2 + lda * 2];
    x[2] = y_2;
    y_0 += A[2 + lda * 0] * y_2 + A[3 + lda * 0] * y_3;
    y_1 += A[2 + lda * 1] * y_2 + A[3 + lda * 1] * y_3;
    y_1 = x[1] - y_1;
    y_1 *= A[1 + lda * 1];
    x[1] = y_1;
    y_0 = x[0] - A[1 + lda * 0] * y_1 - y_0;
    y_0 *= A[0 + lda * 0];
    x[0] = y_0;
  } else {
    y_3 = x[3] - y_3;
    y_3 /= A[3 + lda * 3];
    x[3] = y_3;
    y_2 = x[2] - A[3 + lda * 2] * y_3 - y_2;
    y_2 /= A[2 + lda * 2];
    x[2] = y_2;
    y_0 += A[2 + lda * 0] * y_2 + A[3 + lda * 0] * y_3;
    y_1 += A[2 + lda * 1] * y_2 + A[3 + lda * 1] * y_3;
    y_1 = x[1] - y_1;
    y_1 /= A[1 + lda * 1];
    x[1] = y_1;
    y_0 = x[0] - A[1 + lda * 0] * y_1 - y_0;
    y_0 /= A[0 + lda * 0];
    x[0] = y_0;
  }
}
```