user: Translate the below assembly code into C programming language:

```asm
<kernel_dtrsv_t_2_lib4_new>:
  endbr64
  test   %edi,%edi
  jle    L172
  push   %r15
  mov    %edi,%r11d
  mov    %rsi,%r10
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  cmp    $0x4,%edi
  jg     L123
  pxor   %xmm0,%xmm0
  lea    0x10(%rsi),%rdi
  lea    0x10(%r9),%rcx
  mov    $0x2,%ebp
  movapd %xmm0,%xmm1
L114:
  cmp    %r11d,%ebp
  jge    L37
  sub    %ebp,%r11d
  cmp    $0x1,%r11d
  je     L45
  mov    %r11d,%r13d
  lea    0x20(%rdi),%r12
  shr    %r13d
  lea    -0x1(%r13),%eax
  cmp    $0x1,%eax
  jbe    L88
  lea    -0x3(%r13),%eax
  movupd 0x10(%rdi),%xmm4
  movupd (%rdi),%xmm2
  mov    %rcx,%rsi
  and    $0xfffffffe,%eax
  xor    %r14d,%r14d
  lea    0x2(%rax),%edx
  jmp    L160
  nopl   0x0(%rax)
L147:
  movapd %xmm5,%xmm2
L160:
  movupd (%rsi),%xmm7
  movupd (%r12),%xmm5
  mov    %r14d,%r15d
  mov    %r12,%rbp
  add    $0x20,%rsi
  add    $0x20,%r12
  add    $0x2,%r14d
  mulpd  %xmm7,%xmm2
  addsd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  movapd %xmm2,%xmm3
  addsd  %xmm1,%xmm3
  movapd %xmm7,%xmm1
  mulpd  %xmm5,%xmm1
  addsd  %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  movapd %xmm1,%xmm2
  movupd -0x10(%rsi),%xmm1
  mulpd  %xmm4,%xmm1
  addsd  %xmm0,%xmm2
  movupd -0x10(%r12),%xmm4
  movapd %xmm1,%xmm0
  unpckhpd %xmm1,%xmm1
  addsd  %xmm3,%xmm0
  addsd  %xmm0,%xmm1
  movupd -0x10(%rsi),%xmm0
  mulpd  %xmm4,%xmm0
  addsd  %xmm0,%xmm2
  unpckhpd %xmm0,%xmm0
  addsd  %xmm2,%xmm0
  cmp    %r15d,%eax
  jne    L147
L120:
  xor    %eax,%eax
  nopl   0x0(%rax)
L42:
  movupd (%rsi,%rax,1),%xmm7
  movupd 0x0(%rbp,%rax,1),%xmm2
  add    $0x1,%edx
  mulpd  %xmm7,%xmm2
  addsd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  movupd (%r12,%rax,1),%xmm2
  add    $0x10,%rax
  mulpd  %xmm7,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %r13d,%edx
  jb     L42
  mov    %r11d,%edx
  and    $0xfffffffe,%edx
  mov    %edx,%eax
  shl    $0x3,%rax
  add    %rax,%rdi
  add    %rax,%rcx
  cmp    %edx,%r11d
  je     L37
L45:
  movsd  (%rcx),%xmm2
  movsd  (%rdi),%xmm3
  mulsd  %xmm2,%xmm3
  mulsd  0x20(%rdi),%xmm2
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
L37:
  movsd  0x8(%r9),%xmm2
  movsd  (%r9),%xmm3
  subsd  %xmm0,%xmm2
  test   %ebx,%ebx
  je     L169
  mulsd  0x8(%r8),%xmm2
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  movsd  %xmm2,0x8(%r9)
  mulsd  0x8(%r10),%xmm2
  subsd  %xmm2,%xmm3
  subsd  %xmm1,%xmm3
  mulsd  (%r8),%xmm3
  movsd  %xmm3,(%r9)
  ret
  nopl   0x0(%rax,%rax,1)
L123:
  movsd  0x10(%r9),%xmm1
  movsd  0x10(%rsi),%xmm3
  pxor   %xmm2,%xmm2
  lea    0x0(,%rdx,4),%ebp
  movsd  0x18(%r9),%xmm0
  movslq %ebp,%rbp
  mulsd  %xmm1,%xmm3
  lea    0x0(,%rbp,8),%r12
  mulsd  0x30(%rsi),%xmm1
  lea    (%rsi,%r12,1),%rdi
  prefetcht0 (%rdi)
  addsd  %xmm2,%xmm3
  addsd  %xmm1,%xmm2
  movsd  0x18(%rsi),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x38(%rsi),%xmm0
  lea    0x20(%r9),%rsi
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  cmp    $0xb,%r11d
  jle    L26
  shl    $0x4,%rbp
  lea    -0xc(%r11),%r13d
  lea    (%rdi,%r12,1),%rcx
  cmp    $0x1,%edx
  mov    %r13d,%eax
  jne    L38
  shr    $0x3,%eax
  mov    %rsi,%rdx
  shl    $0x6,%rax
  lea    0x60(%r9,%rax,1),%r14
  mov    %rdi,%rax
  nopl   (%rax)
L100:
  movsd  (%rdx),%xmm5
  movsd  (%rax),%xmm6
  add    $0x40,%rdx
  prefetcht0 (%rcx)
  movsd  -0x38(%rdx),%xmm4
  movsd  -0x30(%rdx),%xmm3
  mulsd  %xmm5,%xmm6
  movsd  -0x28(%rdx),%xmm2
  mulsd  0x20(%rax),%xmm5
  addsd  %xmm1,%xmm6
  movsd  0x8(%rax),%xmm1
  addsd  %xmm0,%xmm5
  movsd  0x10(%rax),%xmm0
  mulsd  %xmm4,%xmm1
  mulsd  0x28(%rax),%xmm4
  mulsd  %xmm3,%xmm0
  mulsd  0x30(%rax),%xmm3
  addsd  %xmm6,%xmm1
  movsd  0x18(%rax),%xmm6
  addsd  %xmm5,%xmm4
  movsd  (%rcx),%xmm5
  mulsd  %xmm2,%xmm6
  mulsd  0x38(%rax),%xmm2
  addsd  %xmm1,%xmm0
  movsd  -0x10(%rdx),%xmm1
  add    %rbp,%rax
  addsd  %xmm4,%xmm3
  prefetcht0 (%rax)
  addsd  %xmm0,%xmm6
  movsd  -0x8(%rdx),%xmm0
  movapd %xmm2,%xmm4
  movsd  -0x18(%rdx),%xmm2
  addsd  %xmm3,%xmm4
  movsd  -0x20(%rdx),%xmm3
  mulsd  %xmm3,%xmm5
  mulsd  0x20(%rcx),%xmm3
  addsd  %xmm6,%xmm5
  addsd  %xmm4,%xmm3
  movsd  0x8(%rcx),%xmm4
  mulsd  %xmm2,%xmm4
  mulsd  0x28(%rcx),%xmm2
  addsd  %xmm5,%xmm4
  addsd  %xmm3,%xmm2
  movsd  0x10(%rcx),%xmm3
  mulsd  %xmm1,%xmm3
  mulsd  0x30(%rcx),%xmm1
  addsd  %xmm4,%xmm3
  addsd  %xmm1,%xmm2
  movsd  0x18(%rcx),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x38(%rcx),%xmm0
  add    %rbp,%rcx
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  cmp    %rdx,%r14
  jne    L100
L186:
  shr    $0x3,%r13d
  mov    %r12,%rdx
  lea    0x1(%r13),%eax
  lea    0xc(,%r13,8),%ebp
  imul   %rax,%rdx
  shl    $0x6,%rax
  add    %rax,%rsi
  lea    (%rdi,%rdx,2),%rdi
L69:
  lea    -0x3(%r11),%eax
  cmp    %eax,%ebp
  jge    L54
  lea    -0x4(%r11),%r13d
  mov    %rdi,%rdx
  sub    %ebp,%r13d
  shr    $0x2,%r13d
  lea    0x1(%r13),%r14d
  mov    %r14,%rcx
  shl    $0x5,%rcx
  add    %rsi,%rcx
  nopl   0x0(%rax)
L159:
  mov    %rdx,%rax
  movsd  (%rsi),%xmm4
  movsd  0x8(%rsi),%xmm3
  add    %r12,%rdx
  movsd  (%rax),%xmm6
  movsd  0x10(%rsi),%xmm2
  add    $0x20,%rsi
  prefetcht0 (%rdx)
  movsd  -0x8(%rsi),%xmm5
  mulsd  %xmm4,%xmm6
  mulsd  0x20(%rax),%xmm4
  addsd  %xmm1,%xmm6
  movsd  0x8(%rax),%xmm1
  addsd  %xmm0,%xmm4
  movsd  0x10(%rax),%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  %xmm2,%xmm0
  mulsd  0x28(%rax),%xmm3
  mulsd  0x30(%rax),%xmm2
  addsd  %xmm6,%xmm1
  addsd  %xmm4,%xmm3
  addsd  %xmm1,%xmm0
  movsd  0x18(%rax),%xmm1
  mulsd  %xmm5,%xmm1
  addsd  %xmm3,%xmm2
  mulsd  0x38(%rax),%xmm5
  addsd  %xmm0,%xmm1
  addsd  %xmm2,%xmm5
  movapd %xmm5,%xmm0
  cmp    %rcx,%rsi
  jne    L159
  imul   %r14,%r12
  lea    0x4(%rbp,%r13,4),%ebp
  add    %r12,%rdi
  jmp    L114
  nopl   0x0(%rax)
L169:
  divsd  0x28(%r10),%xmm2
  movsd  %xmm2,0x8(%r9)
  pop    %rbx
  pop    %rbp
  mulsd  0x8(%r10),%xmm2
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  subsd  %xmm2,%xmm3
  subsd  %xmm1,%xmm3
  divsd  (%r10),%xmm3
  movsd  %xmm3,(%r9)
  ret
  nopw   0x0(%rax,%rax,1)
L172:
  ret
L38:
  shr    $0x3,%eax
  mov    %rsi,%rdx
  shl    $0x6,%rax
  lea    0x60(%r9,%rax,1),%r14
  mov    %rdi,%rax
  nopl   0x0(%rax,%rax,1)
L27:
  movsd  (%rdx),%xmm5
  movsd  (%rax),%xmm6
  add    $0x40,%rdx
  prefetcht0 (%rcx)
  movsd  -0x38(%rdx),%xmm3
  movsd  -0x30(%rdx),%xmm2
  mulsd  %xmm5,%xmm6
  movsd  -0x28(%rdx),%xmm4
  mulsd  0x20(%rax),%xmm5
  addsd  %xmm1,%xmm6
  movsd  0x8(%rax),%xmm1
  addsd  %xmm0,%xmm5
  movsd  0x10(%rax),%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  0x28(%rax),%xmm3
  mulsd  %xmm2,%xmm0
  mulsd  0x30(%rax),%xmm2
  addsd  %xmm6,%xmm1
  movsd  0x18(%rax),%xmm6
  addsd  %xmm5,%xmm3
  movsd  (%rcx),%xmm5
  mulsd  %xmm4,%xmm6
  mulsd  0x38(%rax),%xmm4
  addsd  %xmm1,%xmm0
  movsd  -0x10(%rdx),%xmm1
  add    %rbp,%rax
  addsd  %xmm3,%xmm2
  movsd  -0x20(%rdx),%xmm3
  prefetcht0 (%rax)
  mulsd  %xmm3,%xmm5
  mulsd  0x20(%rcx),%xmm3
  addsd  %xmm0,%xmm6
  movsd  -0x8(%rdx),%xmm0
  addsd  %xmm2,%xmm4
  movsd  -0x18(%rdx),%xmm2
  addsd  %xmm6,%xmm5
  addsd  %xmm4,%xmm3
  movsd  0x8(%rcx),%xmm4
  mulsd  %xmm2,%xmm4
  mulsd  0x28(%rcx),%xmm2
  addsd  %xmm5,%xmm4
  addsd  %xmm3,%xmm2
  movsd  0x10(%rcx),%xmm3
  mulsd  %xmm1,%xmm3
  mulsd  0x30(%rcx),%xmm1
  addsd  %xmm4,%xmm3
  addsd  %xmm1,%xmm2
  movsd  0x18(%rcx),%xmm1
  mulsd  %xmm0,%xmm1
  mulsd  0x38(%rcx),%xmm0
  add    %rbp,%rcx
  addsd  %xmm3,%xmm1
  addsd  %xmm2,%xmm0
  cmp    %rdx,%r14
  jne    L27
  jmp    L186
L88:
  mov    %rdi,%rbp
  mov    %rcx,%rsi
  xor    %edx,%edx
  jmp    L120
L26:
  mov    $0x4,%ebp
  jmp    L69
L54:
  mov    %rsi,%rcx
  jmp    L114
```

assistant: ```c
void kernel_dtrsv_t_2_lib4_new(int kmax, double *A, int sda, int use_inv_diag_A, double *inv_diag_A, 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;
  k = 2;
  if (kmax > 4) {
    x_2 = x[2];
    x_3 = x[3];
    y_0 += A[2 + lda * 0] * x_2;
    y_1 += A[2 + lda * 1] * x_2;
    y_0 += A[3 + lda * 0] * x_3;
    y_1 += A[3 + lda * 1] * x_3;
    k = 4;
    A += 4 + (sda - 1) * lda;
    x += 4;
    __builtin_prefetch(A);
    for (; k < kmax - 7; k += 8) {
      __builtin_prefetch(A + sda * bs);
      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_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
      __builtin_prefetch(A + sda * bs);
      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_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
    }
    for (; k < kmax - 3; k += 4) {
      __builtin_prefetch(A + sda * bs);
      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_0 += A[1 + lda * 0] * x_1;
      y_1 += A[1 + lda * 1] * x_1;
      y_0 += A[2 + lda * 0] * x_2;
      y_1 += A[2 + lda * 1] * x_2;
      y_0 += A[3 + lda * 0] * x_3;
      y_1 += A[3 + lda * 1] * x_3;
      A += sda * bs;
      x += 4;
    }
  } else {
    A += 2;
    x += 2;
  }
  for (; k < kmax; k++) {
    x_0 = x[0];
    y_0 += A[0 + lda * 0] * x_0;
    y_1 += A[0 + lda * 1] * x_0;
    A += 1;
    x += 1;
  }
  A = tA;
  x = tx;
  if (use_inv_diag_A) {
    y_1 = x[1] - y_1;
    y_1 *= inv_diag_A[1];
    x[1] = y_1;
    y_0 = x[0] - A[1 + lda * 0] * y_1 - y_0;
    y_0 *= inv_diag_A[0];
    x[0] = y_0;
  } else {
    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;
  }
}
```