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

```asm
<kernel_dgetrf_nn_2x4_vs_lib4>:
  endbr64
  push   %r13
  mov    %edi,%r10d
  mov    %esi,%r11d
  push   %r12
  push   %rbp
  push   %rbx
  mov    %edx,%ebx
  mov    0x30(%rsp),%r12
  mov    0x38(%rsp),%rbp
  mov    0x40(%rsp),%r13
  test   %edx,%edx
  jle    L1
  mov    %rcx,%rdx
  cmp    $0x3,%ebx
  jle    L36
  lea    -0x4(%rbx),%edi
  shl    $0x2,%r9d
  pxor   %xmm0,%xmm0
  mov    %r8,%rax
  shr    $0x2,%edi
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm2
  movslq %r9d,%rsi
  lea    0x1(%rdi),%r9d
  movapd %xmm0,%xmm1
  shl    $0x3,%rsi
  movapd %xmm0,%xmm3
  mov    %r9,%rcx
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm9
  mov    %r9,%rdi
  shl    $0x7,%rcx
  movapd %xmm0,%xmm10
  add    %rdx,%rcx
  nopl   (%rax)
L30:
  movsd  (%rdx),%xmm6
  movsd  (%rax),%xmm12
  sub    $0xffffffffffffff80,%rdx
  movsd  0x20(%rax),%xmm13
  movsd  -0x78(%rdx),%xmm5
  movapd %xmm6,%xmm14
  movsd  0x40(%rax),%xmm7
  movsd  0x60(%rax),%xmm11
  mulsd  %xmm12,%xmm14
  mulsd  %xmm5,%xmm12
  subsd  %xmm14,%xmm10
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm12,%xmm1
  mulsd  %xmm5,%xmm13
  subsd  %xmm14,%xmm9
  subsd  %xmm13,%xmm2
  movsd  0x8(%rax),%xmm13
  movapd %xmm9,%xmm12
  movapd %xmm6,%xmm9
  mulsd  %xmm7,%xmm9
  mulsd  %xmm5,%xmm7
  mulsd  %xmm11,%xmm6
  mulsd  %xmm11,%xmm5
  movsd  0x28(%rax),%xmm11
  subsd  %xmm9,%xmm3
  movsd  0x68(%rax),%xmm9
  subsd  %xmm7,%xmm4
  movapd %xmm8,%xmm7
  movsd  0x48(%rax),%xmm8
  subsd  %xmm6,%xmm7
  movsd  -0x60(%rdx),%xmm6
  subsd  %xmm5,%xmm0
  movsd  -0x58(%rdx),%xmm5
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  mulsd  %xmm5,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm1
  movapd %xmm6,%xmm13
  mulsd  %xmm11,%xmm13
  mulsd  %xmm5,%xmm11
  subsd  %xmm13,%xmm12
  movsd  0x30(%rax),%xmm13
  subsd  %xmm11,%xmm2
  movapd %xmm6,%xmm11
  mulsd  %xmm9,%xmm6
  mulsd  %xmm8,%xmm11
  mulsd  %xmm5,%xmm8
  mulsd  %xmm9,%xmm5
  movsd  0x10(%rax),%xmm9
  subsd  %xmm6,%xmm7
  movsd  -0x40(%rdx),%xmm6
  subsd  %xmm11,%xmm3
  movsd  0x70(%rax),%xmm11
  movapd %xmm6,%xmm14
  subsd  %xmm8,%xmm4
  movsd  -0x38(%rdx),%xmm8
  mulsd  %xmm9,%xmm14
  subsd  %xmm5,%xmm0
  movsd  0x50(%rax),%xmm5
  mulsd  %xmm8,%xmm9
  subsd  %xmm14,%xmm10
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm9,%xmm1
  mulsd  %xmm8,%xmm13
  subsd  %xmm14,%xmm12
  subsd  %xmm13,%xmm2
  movsd  0x18(%rax),%xmm13
  movapd %xmm12,%xmm9
  movapd %xmm6,%xmm12
  mulsd  %xmm11,%xmm6
  mulsd  %xmm5,%xmm12
  mulsd  %xmm8,%xmm5
  mulsd  %xmm11,%xmm8
  movsd  0x78(%rax),%xmm11
  subsd  %xmm6,%xmm7
  movsd  -0x20(%rdx),%xmm6
  subsd  %xmm12,%xmm3
  movsd  0x38(%rax),%xmm12
  subsd  %xmm5,%xmm4
  movsd  -0x18(%rdx),%xmm5
  movapd %xmm6,%xmm14
  mulsd  %xmm13,%xmm14
  subsd  %xmm8,%xmm0
  movsd  0x58(%rax),%xmm8
  add    %rsi,%rax
  mulsd  %xmm5,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm1
  movapd %xmm6,%xmm13
  mulsd  %xmm12,%xmm13
  mulsd  %xmm5,%xmm12
  subsd  %xmm13,%xmm9
  subsd  %xmm12,%xmm2
  movapd %xmm6,%xmm12
  mulsd  %xmm11,%xmm6
  mulsd  %xmm8,%xmm12
  mulsd  %xmm5,%xmm8
  mulsd  %xmm11,%xmm5
  subsd  %xmm6,%xmm7
  subsd  %xmm12,%xmm3
  subsd  %xmm8,%xmm4
  subsd  %xmm5,%xmm0
  movapd %xmm7,%xmm8
  cmp    %rcx,%rdx
  jne    L30
  imul   %r9,%rsi
  shl    $0x2,%edi
  add    %rsi,%r8
  cmp    %edi,%ebx
  jle    L109
L60:
  movsd  (%rcx),%xmm6
  movsd  0x8(%rcx),%xmm5
  add    $0x1,%edi
  add    $0x20,%rcx
  movsd  (%r8),%xmm13
  movsd  0x20(%r8),%xmm11
  add    $0x8,%r8
  movapd %xmm6,%xmm14
  movsd  0x38(%r8),%xmm7
  movsd  0x58(%r8),%xmm12
  mulsd  %xmm13,%xmm14
  mulsd  %xmm5,%xmm13
  subsd  %xmm14,%xmm10
  subsd  %xmm13,%xmm1
  movapd %xmm6,%xmm13
  mulsd  %xmm11,%xmm13
  mulsd  %xmm5,%xmm11
  subsd  %xmm13,%xmm9
  subsd  %xmm11,%xmm2
  movapd %xmm6,%xmm11
  mulsd  %xmm7,%xmm11
  mulsd  %xmm12,%xmm6
  mulsd  %xmm5,%xmm7
  mulsd  %xmm12,%xmm5
  subsd  %xmm11,%xmm3
  subsd  %xmm6,%xmm8
  subsd  %xmm7,%xmm4
  subsd  %xmm5,%xmm0
  cmp    %edi,%ebx
  jg     L60
L109:
  mov    0x28(%rsp),%eax
  test   %eax,%eax
  je     L69
  addsd  (%r12),%xmm10
  addsd  0x8(%r12),%xmm1
  addsd  0x20(%r12),%xmm9
  addsd  0x28(%r12),%xmm2
  addsd  0x40(%r12),%xmm3
  addsd  0x48(%r12),%xmm4
  addsd  0x60(%r12),%xmm8
  addsd  0x68(%r12),%xmm0
L69:
  movsd  D1(%rip),%xmm5
  movapd %xmm5,%xmm6
  divsd  %xmm10,%xmm6
  mulsd  %xmm6,%xmm1
  movsd  %xmm6,0x0(%r13)
  movapd %xmm9,%xmm6
  movsd  %xmm10,0x0(%rbp)
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm2
  divsd  %xmm2,%xmm5
  cmp    $0x1,%r10d
  jle    L88
  movsd  %xmm1,0x8(%rbp)
  movsd  %xmm5,0x8(%r13)
  movsd  %xmm3,0x40(%rbp)
  mulsd  %xmm1,%xmm3
  movsd  %xmm9,0x20(%rbp)
  movsd  %xmm2,0x28(%rbp)
  subsd  %xmm3,%xmm4
  movsd  %xmm4,0x48(%rbp)
  cmp    $0x3,%r11d
  jle    L28
  mulsd  %xmm8,%xmm1
  movsd  %xmm8,0x60(%rbp)
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x68(%rbp)
L28:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L88:
  movsd  %xmm5,0x8(%r13)
  movsd  %xmm9,0x20(%rbp)
  movsd  %xmm3,0x40(%rbp)
  cmp    $0x3,%r11d
  jle    L28
  movsd  %xmm8,0x60(%rbp)
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  ret
  nopl   0x0(%rax)
L1:
  pxor   %xmm0,%xmm0
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
  jmp    L109
L36:
  pxor   %xmm0,%xmm0
  xor    %edi,%edi
  movapd %xmm0,%xmm4
  movapd %xmm0,%xmm2
  movapd %xmm0,%xmm1
  movapd %xmm0,%xmm8
  movapd %xmm0,%xmm3
  movapd %xmm0,%xmm9
  movapd %xmm0,%xmm10
  jmp    L60
```

tool_calls: name: retrieve_data
arguments: data_label: D1
type: f64

tool: D1: 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;
}
```