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

```asm
<kernel_dtrsv_n_4_vs_lib4>:
  endbr64
  mov    0x8(%rsp),%r10
  prefetcht0 (%r8)
  prefetcht0 0x40(%r8)
  cmp    $0x3,%edx
  jle    L218
  lea    -0x4(%rdx),%eax
  shr    $0x2,%eax
  add    $0x1,%eax
  mov    %eax,%eax
  shl    $0x7,%rax
  add    %r8,%rax
  pxor   %xmm8,%xmm8
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm6
L68:
  sub    $0xffffffffffffff80,%r8
  prefetcht0 (%r8)
  prefetcht0 0x40(%r8)
  movsd  (%r9),%xmm2
  movsd  0x8(%r9),%xmm1
  movsd  0x10(%r9),%xmm0
  movsd  0x18(%r9),%xmm3
  movapd %xmm2,%xmm7
  mulsd  -0x80(%r8),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm2,%xmm6
  mulsd  -0x78(%r8),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm2,%xmm5
  mulsd  -0x70(%r8),%xmm5
  addsd  %xmm4,%xmm5
  mulsd  -0x68(%r8),%xmm2
  addsd  %xmm8,%xmm2
  movapd %xmm1,%xmm4
  mulsd  -0x60(%r8),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm1,%xmm7
  mulsd  -0x58(%r8),%xmm7
  addsd  %xmm6,%xmm7
  movapd %xmm1,%xmm6
  mulsd  -0x50(%r8),%xmm6
  addsd  %xmm5,%xmm6
  mulsd  -0x48(%r8),%xmm1
  addsd  %xmm2,%xmm1
  movapd %xmm0,%xmm5
  mulsd  -0x40(%r8),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm0,%xmm4
  mulsd  -0x38(%r8),%xmm4
  addsd  %xmm7,%xmm4
  movapd %xmm0,%xmm2
  mulsd  -0x30(%r8),%xmm2
  addsd  %xmm6,%xmm2
  mulsd  -0x28(%r8),%xmm0
  addsd  %xmm1,%xmm0
  movapd %xmm3,%xmm6
  mulsd  -0x20(%r8),%xmm6
  addsd  %xmm5,%xmm6
  movapd %xmm3,%xmm5
  mulsd  -0x18(%r8),%xmm5
  addsd  %xmm4,%xmm5
  movapd %xmm3,%xmm4
  mulsd  -0x10(%r8),%xmm4
  addsd  %xmm2,%xmm4
  mulsd  -0x8(%r8),%xmm3
  addsd  %xmm0,%xmm3
  movapd %xmm3,%xmm8
  add    $0x20,%r9
  cmp    %rax,%r8
  jne    L68
L116:
  movsd  (%r10),%xmm3
  subsd  %xmm6,%xmm3
  movapd %xmm3,%xmm7
  movsd  0x8(%r10),%xmm0
  subsd  %xmm5,%xmm0
  movapd %xmm0,%xmm2
  movsd  0x10(%r10),%xmm0
  movapd %xmm0,%xmm1
  subsd  %xmm4,%xmm1
  movsd  0x18(%r10),%xmm0
  subsd  %xmm8,%xmm0
  test   %ecx,%ecx
  je     L18
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm5
  movsd  0x18(%rax),%xmm4
  mulsd  (%rax),%xmm3
  movsd  %xmm3,(%r10)
  mulsd  %xmm3,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm1
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  cmp    $0x1,%esi
  je     L79
  movsd  0x30(%rax),%xmm4
  movsd  0x38(%rax),%xmm3
  mulsd  0x28(%rax),%xmm2
  movsd  %xmm2,0x8(%r10)
  mulsd  %xmm2,%xmm4
  subsd  %xmm4,%xmm1
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm0
  cmp    $0x2,%esi
  je     L38
  movsd  0x58(%rax),%xmm2
  mulsd  0x50(%rax),%xmm1
  movsd  %xmm1,0x10(%r10)
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  cmp    $0x3,%esi
  je     L200
  mulsd  0x78(%rax),%xmm0
  movsd  %xmm0,0x18(%r10)
  ret
L218:
  mov    %r8,%rax
  pxor   %xmm8,%xmm8
  movapd %xmm8,%xmm4
  movapd %xmm8,%xmm5
  movapd %xmm8,%xmm6
  jmp    L116
L79:
  cmp    $0x1,%edi
  je     L129
  movsd  %xmm2,0x8(%r10)
  cmp    $0x2,%edi
  je     L129
  movsd  %xmm1,0x10(%r10)
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
L38:
  cmp    $0x2,%edi
  je     L129
  movsd  %xmm1,0x10(%r10)
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
L200:
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
L18:
  movsd  0x8(%rax),%xmm6
  movsd  0x10(%rax),%xmm5
  movsd  0x18(%rax),%xmm4
  movsd  D7(%rip),%xmm3
  divsd  (%rax),%xmm3
  mulsd  %xmm7,%xmm3
  movsd  %xmm3,(%r10)
  mulsd  %xmm3,%xmm6
  subsd  %xmm6,%xmm2
  mulsd  %xmm3,%xmm5
  subsd  %xmm5,%xmm1
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm0
  cmp    $0x1,%esi
  je     L121
  movsd  0x30(%rax),%xmm5
  movsd  0x38(%rax),%xmm4
  movsd  D7(%rip),%xmm3
  divsd  0x28(%rax),%xmm3
  mulsd  %xmm3,%xmm2
  movsd  %xmm2,0x8(%r10)
  movapd %xmm5,%xmm3
  mulsd  %xmm2,%xmm3
  subsd  %xmm3,%xmm1
  mulsd  %xmm4,%xmm2
  subsd  %xmm2,%xmm0
  cmp    $0x2,%esi
  je     L179
  movsd  0x58(%rax),%xmm3
  movsd  D7(%rip),%xmm2
  divsd  0x50(%rax),%xmm2
  mulsd  %xmm2,%xmm1
  movsd  %xmm1,0x10(%r10)
  mulsd  %xmm3,%xmm1
  subsd  %xmm1,%xmm0
  cmp    $0x3,%esi
  je     L7
  movsd  D7(%rip),%xmm1
  divsd  0x78(%rax),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,0x18(%r10)
L129:
  ret
L121:
  cmp    $0x1,%edi
  je     L129
  movsd  %xmm2,0x8(%r10)
  cmp    $0x2,%edi
  je     L129
  movsd  %xmm1,0x10(%r10)
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
L179:
  cmp    $0x2,%edi
  je     L129
  movsd  %xmm1,0x10(%r10)
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
L7:
  cmp    $0x3,%edi
  je     L129
  movsd  %xmm0,0x18(%r10)
  ret
```

tool_calls: name: read_data
arguments: label: D7
type_infered: f64

tool: D7: 1

assistant: ```c
void kernel_dtrsv_n_4_vs_lib4(int km, int kn, int kmax, int inverted_diag, double *A, double *x, double *y) {
  __builtin_prefetch(A);
  __builtin_prefetch(A + 8);
  const int lda = 4;
  int k;
  double x_0, x_1, x_2, x_3, y_0 = 0, y_1 = 0, y_2 = 0, y_3 = 0;
  k = 0;
  for (; k < kmax - 3; k += 4) {
    __builtin_prefetch(A + 4 * lda);
    __builtin_prefetch(A + 4 * lda + 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[1 + lda * 0] * x_0;
    y_2 += A[2 + lda * 0] * x_0;
    y_3 += A[3 + lda * 0] * x_0;
    y_0 += A[0 + lda * 1] * x_1;
    y_1 += A[1 + lda * 1] * x_1;
    y_2 += A[2 + lda * 1] * x_1;
    y_3 += A[3 + lda * 1] * x_1;
    y_0 += A[0 + lda * 2] * x_2;
    y_1 += A[1 + lda * 2] * x_2;
    y_2 += A[2 + lda * 2] * x_2;
    y_3 += A[3 + lda * 2] * x_2;
    y_0 += A[0 + lda * 3] * x_3;
    y_1 += A[1 + lda * 3] * x_3;
    y_2 += A[2 + lda * 3] * x_3;
    y_3 += A[3 + lda * 3] * x_3;
    A += 4 * lda;
    x += 4;
  }
  y_0 = y[0] - y_0;
  y_1 = y[1] - y_1;
  y_2 = y[2] - y_2;
  y_3 = y[3] - y_3;
  double a_00, a_10, a_20, a_30, a_11, a_21, a_31;
  if (inverted_diag) {
    a_00 = A[0 + lda * 0];
    a_10 = A[1 + lda * 0];
    a_20 = A[2 + lda * 0];
    a_30 = A[3 + lda * 0];
    y_0 *= a_00;
    y[0] = y_0;
    y_1 -= a_10 * y_0;
    y_2 -= a_20 * y_0;
    y_3 -= a_30 * y_0;
    if (kn == 1) {
      if (km == 1)
        return;
      y[1] = y_1;
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = A[1 + lda * 1];
    a_21 = A[2 + lda * 1];
    a_31 = A[3 + lda * 1];
    y_1 *= a_11;
    y[1] = y_1;
    y_2 -= a_21 * y_1;
    y_3 -= a_31 * y_1;
    if (kn == 2) {
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_00 = A[2 + lda * 2];
    a_10 = A[3 + lda * 2];
    y_2 *= a_00;
    y[2] = y_2;
    y_3 -= a_10 * y_2;
    if (kn == 3) {
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = A[3 + lda * 3];
    y_3 *= a_11;
    y[3] = y_3;
  } else {
    a_00 = 1.0 / A[0 + lda * 0];
    a_10 = A[1 + lda * 0];
    a_20 = A[2 + lda * 0];
    a_30 = A[3 + lda * 0];
    y_0 *= a_00;
    y[0] = y_0;
    y_1 -= a_10 * y_0;
    y_2 -= a_20 * y_0;
    y_3 -= a_30 * y_0;
    if (kn == 1) {
      if (km == 1)
        return;
      y[1] = y_1;
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = 1.0 / A[1 + lda * 1];
    a_21 = A[2 + lda * 1];
    a_31 = A[3 + lda * 1];
    y_1 *= a_11;
    y[1] = y_1;
    y_2 -= a_21 * y_1;
    y_3 -= a_31 * y_1;
    if (kn == 2) {
      if (km == 2)
        return;
      y[2] = y_2;
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_00 = 1.0 / A[2 + lda * 2];
    a_10 = A[3 + lda * 2];
    y_2 *= a_00;
    y[2] = y_2;
    y_3 -= a_10 * y_2;
    if (kn == 3) {
      if (km == 3)
        return;
      y[3] = y_3;
      return;
    }
    a_11 = 1.0 / A[3 + lda * 3];
    y_3 *= a_11;
    y[3] = y_3;
  }
}
```