user: 请从给定的汇编指令推导出C源代码：

```asm
<kernel_dtrsv_t_4_lib4>:
  endbr64
  test   %edi,%edi
  jle    L23
  shl    $0x2,%ecx
  mov    %esi,%r11d
  push   %r14
  mov    %edi,%r10d
  movslq %ecx,%rsi
  push   %r13
  mov    %rdx,%r9
  push   %r12
  push   %rbp
  lea    0x20(%r8),%rbp
  push   %rbx
  lea    0x0(,%rsi,8),%rbx
  lea    (%rdx,%rbx,1),%rdi
  cmp    $0xb,%r10d
  jle    L75
  lea    -0xc(%r10),%r13d
  pxor   %xmm0,%xmm0
  shl    $0x4,%rsi
  lea    (%rdi,%rbx,1),%rdx
  shr    $0x3,%r13d
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm1
  mov    %rbp,%rcx
  mov    %r13d,%r14d
  movapd %xmm0,%xmm7
  mov    %r14,%rax
  shl    $0x6,%rax
  lea    0x60(%r8,%rax,1),%r12
  mov    %rdi,%rax
  nopl   0x0(%rax,%rax,1)
L65:
  movsd  (%rcx),%xmm5
  movsd  (%rax),%xmm9
  add    $0x40,%rcx
  movsd  0x20(%rax),%xmm6
  movsd  -0x38(%rcx),%xmm4
  mulsd  %xmm5,%xmm9
  movsd  -0x30(%rcx),%xmm3
  movsd  -0x28(%rcx),%xmm2
  mulsd  %xmm5,%xmm6
  addsd  %xmm7,%xmm9
  movsd  0x40(%rax),%xmm7
  addsd  %xmm1,%xmm6
  movsd  0x8(%rax),%xmm1
  mulsd  %xmm5,%xmm7
  mulsd  0x60(%rax),%xmm5
  mulsd  %xmm4,%xmm1
  addsd  %xmm8,%xmm7
  movsd  0x58(%rax),%xmm8
  addsd  %xmm0,%xmm5
  movsd  0x28(%rax),%xmm0
  addsd  %xmm9,%xmm1
  mulsd  %xmm2,%xmm8
  mulsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm0
  movsd  0x48(%rax),%xmm6
  mulsd  %xmm4,%xmm6
  mulsd  0x68(%rax),%xmm4
  addsd  %xmm7,%xmm6
  movsd  (%rdx),%xmm7
  addsd  %xmm5,%xmm4
  movsd  0x10(%rax),%xmm5
  mulsd  %xmm3,%xmm5
  addsd  %xmm1,%xmm5
  movsd  0x30(%rax),%xmm1
  mulsd  %xmm3,%xmm1
  addsd  %xmm0,%xmm1
  movsd  0x50(%rax),%xmm0
  mulsd  %xmm3,%xmm0
  mulsd  0x70(%rax),%xmm3
  addsd  %xmm6,%xmm0
  movsd  0x18(%rax),%xmm6
  addsd  %xmm4,%xmm3
  mulsd  %xmm2,%xmm6
  addsd  %xmm0,%xmm8
  movsd  -0x8(%rcx),%xmm0
  addsd  %xmm5,%xmm6
  movsd  0x38(%rax),%xmm5
  mulsd  %xmm2,%xmm5
  mulsd  0x78(%rax),%xmm2
  add    %rsi,%rax
  addsd  %xmm1,%xmm5
  movsd  -0x10(%rcx),%xmm1
  movapd %xmm2,%xmm4
  movsd  -0x18(%rcx),%xmm2
  addsd  %xmm3,%xmm4
  movsd  -0x20(%rcx),%xmm3
  mulsd  %xmm3,%xmm7
  addsd  %xmm6,%xmm7
  movsd  0x20(%rdx),%xmm6
  mulsd  %xmm3,%xmm6
  addsd  %xmm5,%xmm6
  movsd  0x40(%rdx),%xmm5
  mulsd  %xmm3,%xmm5
  mulsd  0x60(%rdx),%xmm3
  addsd  %xmm8,%xmm5
  addsd  %xmm4,%xmm3
  movsd  0x8(%rdx),%xmm4
  mulsd  %xmm2,%xmm4
  addsd  %xmm7,%xmm4
  movsd  0x28(%rdx),%xmm7
  mulsd  %xmm2,%xmm7
  addsd  %xmm6,%xmm7
  movsd  0x48(%rdx),%xmm6
  mulsd  %xmm2,%xmm6
  mulsd  0x68(%rdx),%xmm2
  addsd  %xmm5,%xmm6
  movsd  0x10(%rdx),%xmm5
  movsd  0x58(%rdx),%xmm8
  addsd  %xmm3,%xmm2
  movsd  0x50(%rdx),%xmm3
  mulsd  %xmm1,%xmm5
  mulsd  %xmm1,%xmm3
  mulsd  %xmm0,%xmm8
  addsd  %xmm4,%xmm5
  movsd  0x30(%rdx),%xmm4
  addsd  %xmm6,%xmm3
  mulsd  %xmm1,%xmm4
  mulsd  0x70(%rdx),%xmm1
  addsd  %xmm3,%xmm8
  addsd  %xmm7,%xmm4
  movsd  0x18(%rdx),%xmm7
  addsd  %xmm1,%xmm2
  movsd  0x38(%rdx),%xmm1
  mulsd  %xmm0,%xmm7
  mulsd  %xmm0,%xmm1
  mulsd  0x78(%rdx),%xmm0
  add    %rsi,%rdx
  addsd  %xmm5,%xmm7
  addsd  %xmm4,%xmm1
  addsd  %xmm2,%xmm0
  cmp    %r12,%rcx
  jne    L65
  lea    0x1(%r14),%rax
  lea    0xc(,%r13,8),%r12d
  imul   %rax,%rsi
  shl    $0x6,%rax
  add    %rax,%rbp
  add    %rsi,%rdi
L66:
  lea    -0x3(%r10),%eax
  cmp    %r12d,%eax
  jle    L25
  lea    -0x4(%r10),%r13d
  mov    %rdi,%rax
  mov    %rbp,%rdx
  xor    %ecx,%ecx
  sub    %r12d,%r13d
  shr    $0x2,%r13d
  lea    0x1(%r13),%esi
  xchg   %ax,%ax
L103:
  movupd (%rdx),%xmm12
  movupd (%rax),%xmm5
  add    $0x1,%ecx
  add    $0x20,%rdx
  movupd 0x20(%rax),%xmm4
  movupd -0x10(%rdx),%xmm6
  mulpd  %xmm12,%xmm5
  movupd 0x10(%rax),%xmm11
  movupd 0x30(%rax),%xmm10
  mulpd  %xmm12,%xmm4
  movupd 0x50(%rax),%xmm9
  movupd 0x70(%rax),%xmm13
  mulpd  %xmm6,%xmm11
  mulpd  %xmm6,%xmm10
  mulpd  %xmm6,%xmm9
  mulpd  %xmm13,%xmm6
  movapd %xmm5,%xmm2
  unpckhpd %xmm5,%xmm5
  addsd  %xmm7,%xmm2
  addsd  %xmm4,%xmm1
  unpckhpd %xmm4,%xmm4
  movapd %xmm11,%xmm7
  unpckhpd %xmm11,%xmm11
  addsd  %xmm2,%xmm5
  movupd 0x40(%rax),%xmm2
  addsd  %xmm1,%xmm4
  movapd %xmm10,%xmm1
  unpckhpd %xmm10,%xmm10
  mulpd  %xmm12,%xmm2
  addsd  %xmm5,%xmm7
  addsd  %xmm4,%xmm1
  addsd  %xmm11,%xmm7
  addsd  %xmm10,%xmm1
  movapd %xmm2,%xmm3
  unpckhpd %xmm2,%xmm2
  addsd  %xmm8,%xmm3
  movapd %xmm9,%xmm8
  unpckhpd %xmm9,%xmm9
  addsd  %xmm2,%xmm3
  movupd 0x60(%rax),%xmm2
  add    %rbx,%rax
  mulpd  %xmm12,%xmm2
  addsd  %xmm3,%xmm8
  addsd  %xmm9,%xmm8
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm0,%xmm2
  movapd %xmm6,%xmm0
  unpckhpd %xmm6,%xmm6
  addsd  %xmm2,%xmm0
  addsd  %xmm6,%xmm0
  cmp    %ecx,%esi
  ja     L103
  imul   %rsi,%rbx
  shl    $0x5,%rsi
  lea    0x4(%r12,%r13,4),%r12d
  add    %rsi,%rbp
  add    %rbx,%rdi
L25:
  cmp    %r12d,%r10d
  jle    L15
  sub    %r12d,%r10d
  cmp    $0x1,%r10d
  je     L98
  movupd 0x0(%rbp),%xmm3
  movupd (%rdi),%xmm2
  mov    %r10d,%eax
  shr    %eax
  mulpd  %xmm3,%xmm2
  movapd %xmm2,%xmm4
  unpckhpd %xmm2,%xmm2
  addsd  %xmm7,%xmm4
  movapd %xmm2,%xmm7
  movupd 0x20(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  addsd  %xmm4,%xmm7
  addsd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  movupd 0x40(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  movapd %xmm2,%xmm4
  unpckhpd %xmm2,%xmm2
  addsd  %xmm8,%xmm4
  addsd  %xmm4,%xmm2
  movapd %xmm2,%xmm8
  movupd 0x60(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    $0x1,%eax
  je     L7
  movupd 0x10(%rbp),%xmm3
  movupd 0x10(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  movapd %xmm2,%xmm4
  unpckhpd %xmm2,%xmm2
  addsd  %xmm7,%xmm4
  movapd %xmm2,%xmm7
  movupd 0x30(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  addsd  %xmm4,%xmm7
  addsd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  movupd 0x50(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  movapd %xmm2,%xmm4
  unpckhpd %xmm2,%xmm2
  addsd  %xmm8,%xmm4
  addsd  %xmm4,%xmm2
  movapd %xmm2,%xmm8
  movupd 0x70(%rdi),%xmm2
  mulpd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
L7:
  mov    %r10d,%edx
  and    $0xfffffffe,%edx
  mov    %edx,%eax
  shl    $0x3,%rax
  add    %rax,%rdi
  add    %rax,%rbp
  cmp    %r10d,%edx
  je     L15
L98:
  movsd  0x0(%rbp),%xmm2
  movsd  (%rdi),%xmm3
  mulsd  %xmm2,%xmm3
  addsd  %xmm3,%xmm7
  movsd  0x20(%rdi),%xmm3
  mulsd  %xmm2,%xmm3
  addsd  %xmm3,%xmm1
  movsd  0x40(%rdi),%xmm3
  mulsd  %xmm2,%xmm3
  mulsd  0x60(%rdi),%xmm2
  addsd  %xmm3,%xmm8
  addsd  %xmm2,%xmm0
L15:
  movsd  0x18(%r8),%xmm5
  movsd  0x78(%r9),%xmm6
  movsd  0x10(%r8),%xmm2
  movsd  0x8(%r8),%xmm3
  subsd  %xmm0,%xmm5
  movsd  (%r8),%xmm4
  test   %r11d,%r11d
  jne    L85
  divsd  %xmm6,%xmm5
  movapd %xmm2,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  movsd  %xmm5,0x18(%r8)
  movsd  0x58(%r9),%xmm6
  mulsd  %xmm5,%xmm6
  subsd  %xmm6,%xmm0
  subsd  %xmm8,%xmm0
  divsd  0x50(%r9),%xmm0
  movsd  %xmm0,0x10(%r8)
  movsd  0x10(%r9),%xmm2
  movsd  0x18(%r9),%xmm6
  mulsd  %xmm0,%xmm2
  mulsd  %xmm5,%xmm6
  mulsd  0x30(%r9),%xmm0
  mulsd  0x38(%r9),%xmm5
  addsd  %xmm6,%xmm2
  addsd  %xmm5,%xmm0
  addsd  %xmm7,%xmm2
  addsd  %xmm1,%xmm0
  subsd  %xmm0,%xmm3
  divsd  0x28(%r9),%xmm3
  movsd  %xmm3,0x8(%r8)
  mulsd  0x8(%r9),%xmm3
  subsd  %xmm3,%xmm4
  subsd  %xmm2,%xmm4
  divsd  (%r9),%xmm4
  movsd  %xmm4,(%r8)
  ret
  xchg   %ax,%ax
L85:
  movapd %xmm6,%xmm0
  pop    %rbx
  pop    %rbp
  mulsd  %xmm5,%xmm0
  pop    %r12
  pop    %r13
  pop    %r14
  movsd  %xmm0,0x18(%r8)
  movsd  0x58(%r9),%xmm5
  mulsd  %xmm0,%xmm5
  subsd  %xmm5,%xmm2
  subsd  %xmm8,%xmm2
  mulsd  0x50(%r9),%xmm2
  movsd  %xmm2,0x10(%r8)
  movsd  0x10(%r9),%xmm5
  movsd  0x18(%r9),%xmm6
  mulsd  %xmm2,%xmm5
  mulsd  %xmm0,%xmm6
  mulsd  0x30(%r9),%xmm2
  mulsd  0x38(%r9),%xmm0
  addsd  %xmm6,%xmm5
  addsd  %xmm0,%xmm2
  addsd  %xmm7,%xmm5
  addsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm3
  mulsd  0x28(%r9),%xmm3
  movsd  %xmm3,0x8(%r8)
  mulsd  0x8(%r9),%xmm3
  subsd  %xmm3,%xmm4
  subsd  %xmm5,%xmm4
  mulsd  (%r9),%xmm4
  movsd  %xmm4,(%r8)
  ret
  xchg   %ax,%ax
L23:
  ret
  nopl   0x0(%rax)
L75:
  pxor   %xmm0,%xmm0
  mov    $0x4,%r12d
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm7
  jmp    L66
```

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;
  }
}
```