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

```asm
<kernel_dtrsm_nn_ru_2x2_vs_lib4>:
  endbr64
  push   %r13
  mov    %edi,%r11d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    0x30(%rsp),%r12
  mov    0x38(%rsp),%rbp
  mov    0x40(%rsp),%r13
  test   %edx,%edx
  jle    L145
  mov    %edx,%r10d
  mov    %rcx,%rax
  cmp    $0x3,%edx
  jle    L156
  lea    -0x4(%rdx),%edi
  shl    $0x2,%r9d
  pxor   %xmm1,%xmm1
  mov    %r8,%rdx
  shr    $0x2,%edi
  movapd %xmm1,%xmm6
  movapd %xmm1,%xmm2
  movslq %r9d,%rsi
  lea    0x1(%rdi),%r9d
  shl    $0x3,%rsi
  movapd %xmm1,%xmm0
  mov    %r9,%rcx
  mov    %r9,%rdi
  shl    $0x7,%rcx
  add    %rax,%rcx
  nopw   0x0(%rax,%rax,1)
L25:
  movsd  0x20(%rdx),%xmm7
  movsd  (%rax),%xmm4
  sub    $0xffffffffffffff80,%rax
  movsd  (%rdx),%xmm5
  movsd  -0x78(%rax),%xmm3
  movapd %xmm4,%xmm8
  mulsd  %xmm7,%xmm4
  mulsd  %xmm5,%xmm8
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  movsd  0x28(%rdx),%xmm7
  subsd  %xmm4,%xmm2
  movsd  -0x60(%rax),%xmm4
  subsd  %xmm8,%xmm0
  subsd  %xmm5,%xmm6
  movsd  0x8(%rdx),%xmm5
  movapd %xmm4,%xmm8
  subsd  %xmm3,%xmm1
  movsd  -0x58(%rax),%xmm3
  mulsd  %xmm7,%xmm4
  mulsd  %xmm5,%xmm8
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  movsd  0x30(%rdx),%xmm7
  subsd  %xmm4,%xmm2
  movsd  -0x40(%rax),%xmm4
  subsd  %xmm8,%xmm0
  subsd  %xmm5,%xmm6
  movsd  0x10(%rdx),%xmm5
  movapd %xmm4,%xmm8
  subsd  %xmm3,%xmm1
  movsd  -0x38(%rax),%xmm3
  mulsd  %xmm7,%xmm4
  mulsd  %xmm5,%xmm8
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  movsd  0x38(%rdx),%xmm7
  subsd  %xmm4,%xmm2
  movsd  -0x20(%rax),%xmm4
  subsd  %xmm8,%xmm0
  subsd  %xmm5,%xmm6
  movsd  0x18(%rdx),%xmm5
  movapd %xmm4,%xmm8
  add    %rsi,%rdx
  subsd  %xmm3,%xmm1
  movsd  -0x18(%rax),%xmm3
  mulsd  %xmm7,%xmm4
  mulsd  %xmm5,%xmm8
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  subsd  %xmm4,%xmm2
  subsd  %xmm8,%xmm0
  subsd  %xmm5,%xmm6
  subsd  %xmm3,%xmm1
  cmp    %rcx,%rax
  jne    L25
  imul   %r9,%rsi
  shl    $0x2,%edi
  add    %rsi,%r8
  cmp    %edi,%r10d
  jle    L79
L12:
  movsd  (%rcx),%xmm4
  movsd  0x8(%rcx),%xmm3
  add    $0x1,%edi
  add    $0x20,%rcx
  movsd  (%r8),%xmm5
  movsd  0x20(%r8),%xmm7
  add    $0x8,%r8
  movapd %xmm4,%xmm8
  mulsd  %xmm5,%xmm8
  mulsd  %xmm7,%xmm4
  mulsd  %xmm3,%xmm5
  mulsd  %xmm7,%xmm3
  subsd  %xmm8,%xmm0
  subsd  %xmm4,%xmm2
  subsd  %xmm5,%xmm6
  subsd  %xmm3,%xmm1
  cmp    %edi,%r10d
  jg     L12
L79:
  mov    0x28(%rsp),%edx
  test   %edx,%edx
  je     L23
  addsd  (%r12),%xmm0
  addsd  0x8(%r12),%xmm6
  addsd  0x20(%r12),%xmm2
  addsd  0x28(%r12),%xmm1
L23:
  mov    0x48(%rsp),%eax
  test   %eax,%eax
  je     L11
  mov    0x50(%rsp),%rax
  movsd  (%rax),%xmm3
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x1,%r11d
  jle    L122
  mulsd  %xmm3,%xmm6
  movsd  %xmm6,0x8(%rbp)
  cmp    $0x1,%ebx
  jle    L131
  mov    0x50(%rsp),%rax
  movsd  0x20(%r13),%xmm4
  movsd  0x8(%rax),%xmm3
L71:
  mulsd  %xmm4,%xmm0
  mulsd  %xmm4,%xmm6
  subsd  %xmm0,%xmm2
  subsd  %xmm6,%xmm1
  mulsd  %xmm3,%xmm2
  mulsd  %xmm1,%xmm3
  movsd  %xmm2,0x20(%rbp)
  movsd  %xmm3,0x28(%rbp)
L131:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopw   0x0(%rax,%rax,1)
L122:
  cmp    $0x1,%ebx
  jle    L131
  mulsd  0x20(%r13),%xmm0
  mov    0x50(%rsp),%rax
  subsd  %xmm0,%xmm2
  mulsd  0x8(%rax),%xmm2
  movsd  %xmm2,0x20(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   (%rax)
L11:
  movsd  D8(%rip),%xmm3
  movapd %xmm3,%xmm4
  divsd  0x0(%r13),%xmm4
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x0(%rbp)
  cmp    $0x1,%r11d
  jle    L49
  mulsd  %xmm4,%xmm6
  movsd  %xmm6,0x8(%rbp)
  cmp    $0x1,%ebx
  jle    L131
  movsd  0x20(%r13),%xmm4
  divsd  0x28(%r13),%xmm3
  jmp    L71
L145:
  pxor   %xmm1,%xmm1
  movapd %xmm1,%xmm6
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm0
  jmp    L79
  nopl   (%rax)
L49:
  cmp    $0x1,%ebx
  jle    L131
  mulsd  0x20(%r13),%xmm0
  divsd  0x28(%r13),%xmm3
  subsd  %xmm0,%xmm2
  mulsd  %xmm2,%xmm3
  movsd  %xmm3,0x20(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L156:
  pxor   %xmm1,%xmm1
  xor    %edi,%edi
  movapd %xmm1,%xmm6
  movapd %xmm1,%xmm2
  movapd %xmm1,%xmm0
  jmp    L12
```

tool_calls: name: read_data
arguments: data_label: D8
type_infered: f64

tool: D8: 1

assistant: ```c
void kernel_dtrsm_nn_ru_2x2_vs_lib4(int km, int kn, int kmax, double *A, double *B, int sdb, int alg, double *C, double *D, double *E, int use_inv_diag_E, double *inv_diag_E) {
  const int bs = 4;
  int k;
  double tmp, a_0, a_1, b_0, b_1, e_00, e_01, e_11, d_00 = 0, d_01 = 0, d_10 = 0, d_11 = 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];
    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_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    a_0 = A[0 + bs * 1];
    a_1 = A[1 + 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_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    a_0 = A[0 + bs * 2];
    a_1 = A[1 + 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_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    a_0 = A[0 + bs * 3];
    a_1 = A[1 + 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_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    A += 16;
    B += 4 * sdb;
  }
  for (; k < kmax; k++) {
    a_0 = A[0 + bs * 0];
    a_1 = A[1 + 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_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    A += 4;
    B += 1;
  }
add:
  if (alg != 0) {
    d_00 += C[0 + bs * 0];
    d_10 += C[1 + bs * 0];
    d_01 += C[0 + bs * 1];
    d_11 += C[1 + bs * 1];
  }
  if (use_inv_diag_E) {
    e_00 = inv_diag_E[0];
    d_00 *= e_00;
    d_10 *= e_00;
    D[0 + bs * 0] = d_00;
    if (km >= 2)
      D[1 + bs * 0] = d_10;
    if (kn < 2)
      return;
    e_01 = E[0 + bs * 1];
    e_11 = inv_diag_E[1];
    d_01 -= d_00 * e_01;
    d_11 -= d_10 * e_01;
    d_01 *= e_11;
    d_11 *= e_11;
    D[0 + bs * 1] = d_01;
    if (km >= 2)
      D[1 + bs * 1] = d_11;
  } else {
    e_00 = 1.0 / E[0 + bs * 0];
    d_00 *= e_00;
    d_10 *= e_00;
    D[0 + bs * 0] = d_00;
    if (km >= 2)
      D[1 + bs * 0] = d_10;
    if (kn < 2)
      return;
    e_01 = E[0 + bs * 1];
    e_11 = 1.0 / E[1 + bs * 1];
    d_01 -= d_00 * e_01;
    d_11 -= d_10 * e_01;
    d_01 *= e_11;
    d_11 *= e_11;
    D[0 + bs * 1] = d_01;
    if (km >= 2)
      D[1 + bs * 1] = d_11;
  }
  return;
}
```