user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<kernel_dgetrf_nn_2x4_vs_lib4>:
  endbr64
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edi,%r10d
  mov    %esi,%r13d
  mov    %edx,%edi
  mov    0x30(%rsp),%rbx
  mov    0x38(%rsp),%r11
  mov    0x40(%rsp),%r12
  test   %edx,%edx
  jle    L19
  mov    %rcx,%rdx
  cmp    $0x3,%edi
  jle    L109
  shl    $0x2,%r9d
  movslq %r9d,%rsi
  shl    $0x3,%rsi
  lea    -0x4(%rdi),%ebp
  shr    $0x2,%ebp
  lea    0x1(%rbp),%r9d
  mov    %r9d,%r9d
  mov    %r9,%rcx
  shl    $0x7,%rcx
  add    %rdx,%rcx
  mov    %r8,%rax
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
L100:
  movsd  (%rdx),%xmm6
  movsd  0x8(%rdx),%xmm5
  movsd  (%rax),%xmm13
  movsd  0x20(%rax),%xmm11
  movsd  0x40(%rax),%xmm7
  movsd  0x60(%rax),%xmm12
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm10
  movapd %xmm13,%xmm14
  mulsd  %xmm5,%xmm14
  subsd  %xmm14,%xmm1
  movapd %xmm1,%xmm13
  movapd %xmm6,%xmm1
  mulsd  %xmm11,%xmm1
  subsd  %xmm1,%xmm9
  movapd %xmm11,%xmm1
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm2
  movapd %xmm2,%xmm11
  movapd %xmm6,%xmm1
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm8
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm3
  mulsd  %xmm12,%xmm6
  subsd  %xmm6,%xmm4
  mulsd  %xmm12,%xmm5
  subsd  %xmm5,%xmm0
  movsd  0x20(%rdx),%xmm2
  movsd  0x28(%rdx),%xmm1
  movsd  0x8(%rax),%xmm12
  movsd  0x28(%rax),%xmm7
  movsd  0x48(%rax),%xmm6
  movsd  0x68(%rax),%xmm5
  movapd %xmm2,%xmm14
  mulsd  %xmm12,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm1,%xmm12
  subsd  %xmm12,%xmm13
  movapd %xmm2,%xmm12
  mulsd  %xmm7,%xmm12
  subsd  %xmm12,%xmm9
  mulsd  %xmm1,%xmm7
  subsd  %xmm7,%xmm11
  movapd %xmm2,%xmm7
  mulsd  %xmm6,%xmm7
  subsd  %xmm7,%xmm8
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm3
  mulsd  %xmm5,%xmm2
  subsd  %xmm2,%xmm4
  mulsd  %xmm5,%xmm1
  subsd  %xmm1,%xmm0
  movsd  0x40(%rdx),%xmm7
  movsd  0x48(%rdx),%xmm6
  movsd  0x10(%rax),%xmm1
  movsd  0x30(%rax),%xmm2
  movsd  0x50(%rax),%xmm5
  movsd  0x70(%rax),%xmm12
  movapd %xmm7,%xmm14
  mulsd  %xmm1,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm6,%xmm1
  movapd %xmm1,%xmm14
  movapd %xmm13,%xmm1
  subsd  %xmm14,%xmm1
  movapd %xmm7,%xmm13
  mulsd  %xmm2,%xmm13
  subsd  %xmm13,%xmm9
  mulsd  %xmm6,%xmm2
  movapd %xmm2,%xmm13
  movapd %xmm11,%xmm2
  subsd  %xmm13,%xmm2
  movapd %xmm7,%xmm11
  mulsd  %xmm5,%xmm11
  subsd  %xmm11,%xmm8
  mulsd  %xmm6,%xmm5
  subsd  %xmm5,%xmm3
  mulsd  %xmm12,%xmm7
  subsd  %xmm7,%xmm4
  mulsd  %xmm12,%xmm6
  subsd  %xmm6,%xmm0
  movsd  0x60(%rdx),%xmm6
  movsd  0x68(%rdx),%xmm5
  movsd  0x18(%rax),%xmm13
  movsd  0x38(%rax),%xmm12
  movsd  0x58(%rax),%xmm11
  movsd  0x78(%rax),%xmm7
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm1
  movapd %xmm6,%xmm13
  mulsd  %xmm12,%xmm13
  subsd  %xmm13,%xmm9
  mulsd  %xmm5,%xmm12
  subsd  %xmm12,%xmm2
  movapd %xmm6,%xmm12
  mulsd  %xmm11,%xmm12
  subsd  %xmm12,%xmm8
  mulsd  %xmm5,%xmm11
  subsd  %xmm11,%xmm3
  mulsd  %xmm7,%xmm6
  subsd  %xmm6,%xmm4
  mulsd  %xmm7,%xmm5
  subsd  %xmm5,%xmm0
  sub    $0xffffffffffffff80,%rdx
  add    %rsi,%rax
  cmp    %rcx,%rdx
  jne    L100
  imul   %rsi,%r9
  add    %r9,%r8
  lea    0x4(,%rbp,4),%eax
  cmp    %eax,%edi
  jle    L24
L85:
  movsd  (%rcx),%xmm6
  movsd  0x8(%rcx),%xmm5
  movsd  (%r8),%xmm13
  movsd  0x20(%r8),%xmm11
  movsd  0x40(%r8),%xmm7
  movsd  0x60(%r8),%xmm12
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm14,%xmm10
  mulsd  %xmm5,%xmm13
  subsd  %xmm13,%xmm1
  movapd %xmm6,%xmm13
  mulsd  %xmm11,%xmm13
  subsd  %xmm13,%xmm9
  mulsd  %xmm5,%xmm11
  subsd  %xmm11,%xmm2
  movapd %xmm6,%xmm11
  mulsd  %xmm7,%xmm11
  subsd  %xmm11,%xmm8
  mulsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm3
  mulsd  %xmm12,%xmm6
  subsd  %xmm6,%xmm4
  mulsd  %xmm12,%xmm5
  subsd  %xmm5,%xmm0
  add    $0x20,%rcx
  add    $0x8,%r8
  add    $0x1,%eax
  cmp    %eax,%edi
  jg     L85
L24:
  cmpl   $0x0,0x28(%rsp)
  je     L12
  addsd  (%rbx),%xmm10
  addsd  0x8(%rbx),%xmm1
  addsd  0x20(%rbx),%xmm9
  addsd  0x28(%rbx),%xmm2
  addsd  0x40(%rbx),%xmm8
  addsd  0x48(%rbx),%xmm3
  addsd  0x60(%rbx),%xmm4
  addsd  0x68(%rbx),%xmm0
L12:
  movsd  D4(%rip),%xmm5
  divsd  %xmm10,%xmm5
  mulsd  %xmm5,%xmm1
  movsd  %xmm5,(%r12)
  movsd  %xmm10,(%r11)
  cmp    $0x1,%r10d
  jle    L26
  movsd  %xmm1,0x8(%r11)
  movapd %xmm9,%xmm5
  mulsd  %xmm1,%xmm5
  subsd  %xmm5,%xmm2
  movsd  D4(%rip),%xmm5
  divsd  %xmm2,%xmm5
  movsd  %xmm5,0x8(%r12)
  movsd  %xmm9,0x20(%r11)
  movsd  %xmm2,0x28(%r11)
  movsd  %xmm8,0x40(%r11)
  mulsd  %xmm1,%xmm8
  subsd  %xmm8,%xmm3
  movsd  %xmm3,0x48(%r11)
  cmp    $0x3,%r13d
  jle    L40
  movsd  %xmm4,0x60(%r11)
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x68(%r11)
L40:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
L109:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
  mov    $0x0,%eax
  jmp    L85
L19:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
  jmp    L24
L26:
  mulsd  %xmm9,%xmm1
  subsd  %xmm1,%xmm2
  movsd  D4(%rip),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,0x8(%r12)
  movsd  %xmm9,0x20(%r11)
  movsd  %xmm8,0x40(%r11)
  cmp    $0x3,%r13d
  jle    L40
  movsd  %xmm4,0x60(%r11)
  jmp    L40
```

tool_calls: name: parse_data
arguments: data_label: D4
type: f64

tool: D4: 1

assistant: ```c
void kernel_dgetrf_nn_2x4_vs_lib4(int km, int kn, int kmax, double *A, double *B, int sdb, int alg, double *C, double *D, double *inv_diag_D) {
  const int bs = 4;
  int k;
  double tmp, a_0, a_1, b_0, b_1, b_2, b_3, d_00 = 0, d_01 = 0, d_02 = 0, d_03 = 0, d_10 = 0, d_11 = 0, d_12 = 0, d_13 = 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];
    b_2 = B[0 + bs * 2];
    b_3 = B[0 + bs * 3];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_02 -= a_0 * b_2;
    d_12 -= a_1 * b_2;
    d_03 -= a_0 * b_3;
    d_13 -= a_1 * b_3;
    a_0 = A[0 + bs * 1];
    a_1 = A[1 + bs * 1];
    b_0 = B[1 + bs * 0];
    b_1 = B[1 + bs * 1];
    b_2 = B[1 + bs * 2];
    b_3 = B[1 + bs * 3];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_02 -= a_0 * b_2;
    d_12 -= a_1 * b_2;
    d_03 -= a_0 * b_3;
    d_13 -= a_1 * b_3;
    a_0 = A[0 + bs * 2];
    a_1 = A[1 + bs * 2];
    b_0 = B[2 + bs * 0];
    b_1 = B[2 + bs * 1];
    b_2 = B[2 + bs * 2];
    b_3 = B[2 + bs * 3];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_02 -= a_0 * b_2;
    d_12 -= a_1 * b_2;
    d_03 -= a_0 * b_3;
    d_13 -= a_1 * b_3;
    a_0 = A[0 + bs * 3];
    a_1 = A[1 + bs * 3];
    b_0 = B[3 + bs * 0];
    b_1 = B[3 + bs * 1];
    b_2 = B[3 + bs * 2];
    b_3 = B[3 + bs * 3];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_02 -= a_0 * b_2;
    d_12 -= a_1 * b_2;
    d_03 -= a_0 * b_3;
    d_13 -= a_1 * b_3;
    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];
    b_2 = B[0 + bs * 2];
    b_3 = B[0 + bs * 3];
    d_00 -= a_0 * b_0;
    d_10 -= a_1 * b_0;
    d_01 -= a_0 * b_1;
    d_11 -= a_1 * b_1;
    d_02 -= a_0 * b_2;
    d_12 -= a_1 * b_2;
    d_03 -= a_0 * b_3;
    d_13 -= a_1 * b_3;
    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];
    d_02 += C[0 + bs * 2];
    d_12 += C[1 + bs * 2];
    d_03 += C[0 + bs * 3];
    d_13 += C[1 + bs * 3];
  }
  tmp = 1.0 / d_00;
  d_10 *= tmp;
  inv_diag_D[0] = tmp;
  D[0 + bs * 0] = d_00;
  if (km >= 2)
    D[1 + bs * 0] = d_10;
  d_11 -= d_10 * d_01;
  tmp = 1.0 / d_11;
  inv_diag_D[1] = tmp;
  D[0 + bs * 1] = d_01;
  if (km >= 2)
    D[1 + bs * 1] = d_11;
  d_12 -= d_10 * d_02;
  D[0 + bs * 2] = d_02;
  if (km >= 2)
    D[1 + bs * 2] = d_12;
  if (kn < 4)
    return;
  d_13 -= d_10 * d_03;
  D[0 + bs * 3] = d_03;
  if (km >= 2)
    D[1 + bs * 3] = d_13;
  return;
}
```