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

```asm
<palDmat>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rsi,-0x8(%rsp)
  mov    %rcx,-0x18(%rsp)
  mov    %r8,-0x20(%rsp)
  mov    %r9,-0x10(%rsp)
  movl   $0x0,(%r8)
  mov    D45(%rip),%rbx
  mov    %rbx,(%rcx)
  test   %edi,%edi
  jle    L0
  mov    %rsi,%rax
  mov    %rdx,%rbp
  movslq %edi,%rsi
  shl    $0x3,%rsi
  lea    0x8(%rsi),%rbx
  mov    %rbx,-0x28(%rsp)
  mov    %edi,%r11d
  mov    %rax,%r12
  mov    %rax,%r13
  mov    $0x0,%r9d
  movq   D53(%rip),%xmm3
  movsd  D52(%rip),%xmm9
  movapd %xmm3,%xmm7
  movapd %xmm9,%xmm6
  movsd  D45(%rip),%xmm8
  movq   D12(%rip),%xmm5
  movapd %xmm3,%xmm2
  movapd %xmm9,%xmm4
  jmp    L254
L22:
  lea    0x1(%rdx),%r15d
  add    %rsi,%rax
  cmp    %r15d,%edi
  je     L343
  mov    %r15d,%edx
L367:
  movsd  (%rax,%rcx,1),%xmm0
  andpd  %xmm2,%xmm0
  comisd %xmm1,%xmm0
  jbe    L22
  movapd %xmm0,%xmm1
  mov    %rax,%r10
  mov    %edx,%ebx
  jmp    L22
L343:
  comisd %xmm1,%xmm4
  jbe    L378
L189:
  mov    -0x20(%rsp),%rax
  movl   $0xffffffff,(%rax)
L138:
  add    $0x1,%r9
  add    -0x28(%rsp),%r12
  cmp    %r11,%r9
  je     L257
L254:
  mov    %r9d,%ebx
  lea    0x0(,%r9,8),%rcx
  mov    %r12,%r14
  movsd  (%r12),%xmm1
  andpd  %xmm3,%xmm1
  lea    0x1(%r9),%edx
  mov    %r13,%r8
  add    %rsi,%r13
  cmp    %edx,%edi
  jle    L253
  mov    %r13,%rax
  mov    %r8,%r10
  jmp    L367
L378:
  mov    %r9d,%eax
  cmp    %r9d,%ebx
  jne    L239
L224:
  mov    -0x10(%rsp),%rbx
  mov    %eax,(%rbx,%r9,4)
  mov    -0x18(%rsp),%rax
  movsd  (%rax),%xmm0
  mulsd  (%r14),%xmm0
  movsd  %xmm0,(%rax)
  andpd  %xmm7,%xmm0
  comisd %xmm0,%xmm6
  jbe    L156
  mov    -0x20(%rsp),%rax
  movl   $0xffffffff,(%rax)
  jmp    L138
L239:
  mov    %edx,%edx
  mov    $0x0,%eax
L31:
  movsd  (%r8,%rax,8),%xmm0
  movsd  (%r10,%rax,8),%xmm1
  movsd  %xmm1,(%r8,%rax,8)
  movsd  %xmm0,(%r10,%rax,8)
  mov    %rax,%r15
  add    $0x1,%rax
  cmp    %r15,%rdx
  jne    L31
  movsd  0x0(%rbp,%r9,8),%xmm0
  movslq %ebx,%rax
  lea    0x0(%rbp,%rax,8),%rax
  movsd  (%rax),%xmm1
  movsd  %xmm1,0x0(%rbp,%r9,8)
  movsd  %xmm0,(%rax)
  mov    -0x18(%rsp),%rax
  movsd  (%rax),%xmm0
  xorpd  D12(%rip),%xmm0
  movsd  %xmm0,(%rax)
  mov    %ebx,%eax
  jmp    L224
L156:
  movapd %xmm8,%xmm0
  divsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  mov    $0x0,%eax
  mov    %r9d,%r10d
  jmp    L232
L238:
  add    $0x1,%rax
  cmp    %r11,%rax
  je     L271
L232:
  cmp    %eax,%r9d
  je     L238
  movsd  (%r8,%rax,8),%xmm0
  mulsd  (%r14),%xmm0
  movsd  %xmm0,(%r8,%rax,8)
  jmp    L238
L271:
  movsd  0x0(%rbp,%r9,8),%xmm10
  mulsd  (%r14),%xmm10
  movsd  %xmm10,0x0(%rbp,%r9,8)
  mov    -0x8(%rsp),%rdx
  mov    $0x0,%ebx
  jmp    L42
L366:
  add    $0x1,%rax
  cmp    %r11,%rax
  je     L204
L180:
  cmp    %eax,%r10d
  je     L366
  movsd  (%rdx,%rcx,1),%xmm1
  mulsd  (%r8,%rax,8),%xmm1
  movsd  (%rdx,%rax,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  jmp    L366
L204:
  movapd %xmm10,%xmm1
  mulsd  (%rdx,%rcx,1),%xmm1
  movsd  0x0(%rbp,%rbx,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rbx,8)
L210:
  add    %rsi,%rdx
  add    $0x1,%rbx
  cmp    %r11,%rbx
  je     L348
L42:
  cmp    %ebx,%r10d
  je     L210
  mov    $0x0,%eax
  jmp    L180
L348:
  add    -0x8(%rsp),%rcx
  mov    $0x0,%eax
  jmp    L247
L215:
  add    $0x1,%eax
  add    %rsi,%rcx
  cmp    %eax,%edi
  je     L138
L247:
  cmp    %r10d,%eax
  je     L215
  movsd  (%r14),%xmm0
  xorpd  %xmm5,%xmm0
  mulsd  (%rcx),%xmm0
  movsd  %xmm0,(%rcx)
  jmp    L215
L364:
  lea    -0x1(%r11),%eax
  test   %r11d,%r11d
  jle    L166
  mov    %eax,%r11d
L266:
  movslq %r11d,%r9
  mov    (%rbx,%r9,4),%ecx
  cmp    %r11d,%ecx
  je     L364
  shl    $0x3,%r9
  movslq %ecx,%rcx
  shl    $0x3,%rcx
  lea    0x0(%rbp,%r9,1),%rax
  mov    %r10d,%edx
L99:
  movsd  (%rax),%xmm0
  mov    %rax,%r8
  sub    %r9,%r8
  movsd  (%r8,%rcx,1),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%r8,%rcx,1)
  add    $0x1,%edx
  add    %rsi,%rax
  cmp    %edx,%edi
  jne    L99
  jmp    L364
L257:
  mov    -0x20(%rsp),%rax
  mov    (%rax),%r10d
  test   %r10d,%r10d
  jne    L37
  lea    -0x1(%rdi),%r11d
  mov    -0x8(%rsp),%rbp
  mov    -0x10(%rsp),%rbx
  jmp    L266
L0:
  mov    -0x20(%rsp),%rax
  cmpl   $0x0,(%rax)
  je     L166
L37:
  mov    -0x18(%rsp),%rax
  movq   $0x0,(%rax)
L166:
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L253:
  mov    %r9d,%eax
  comisd %xmm1,%xmm9
  jbe    L224
  jmp    L189
```

tool_calls: name: read_data
arguments: tag: D45
datatype: f64
name: read_data
arguments: tag: D53
datatype: qword
name: read_data
arguments: tag: D52
datatype: byte[8]
name: read_data
arguments: tag: D12
datatype: f32[4]

tool: D45: 1

tool: D53: 9223372036854775807

tool: {"D52": [0x23,0x42,0x92,0x0c,0xa1,0x9c,0xc7,0x3b]}

tool: {"D12": [0.0,-0.0,0.0,0.0]}

assistant: ```c
void palDmat(int n, double *a, double *y, double *d, int *jf, int *iw) {
  const double SFA = 1e-20;
  int k;
  double *aoff;
  *jf = 0;
  *d = 1.0;
  for (k = 0, aoff = a; k < n; k++, aoff += n) {
    int imx;
    double *aoff2 = aoff;
    double amx = fabs(aoff[k]);
    imx = k;
    if (k != n) {
      int i;
      double *apos2;
      for (i = k + 1, apos2 = aoff + n; i < n; i++, apos2 += n) {
        double t = fabs(apos2[k]);
        if (t > amx) {
          amx = t;
          imx = i;
          aoff2 = apos2;
        }
      }
    }
    if (amx < SFA) {
      *jf = -1;
    } else {
      if (imx != k) {
        double t;
        int j;
        for (j = 0; j < n; j++) {
          t = aoff[j];
          aoff[j] = aoff2[j];
          aoff2[j] = t;
        }
        t = y[k];
        y[k] = y[imx];
        y[imx] = t;
        *d = -*d;
      }
      iw[k] = imx;
      *d *= aoff[k];
      if (fabs(*d) < SFA) {
        *jf = -1;
      } else {
        double yk;
        double *apos2;
        int i, j;
        aoff[k] = 1.0 / aoff[k];
        for (j = 0; j < n; j++) {
          if (j != k) {
            aoff[j] *= aoff[k];
          }
        }
        yk = y[k] * aoff[k];
        y[k] = yk;
        for (i = 0, apos2 = a; i < n; i++, apos2 += n) {
          if (i != k) {
            for (j = 0; j < n; j++) {
              if (j != k) {
                apos2[j] -= apos2[k] * aoff[j];
              }
            }
            y[i] -= apos2[k] * yk;
          }
        }
        for (i = 0, apos2 = a; i < n; i++, apos2 += n) {
          if (i != k) {
            apos2[k] *= -aoff[k];
          }
        }
      }
    }
  }
  if (*jf != 0) {
    *d = 0.0;
  } else {
    for (k = n; k-- > 0;) {
      int ki = iw[k];
      if (k != ki) {
        int i;
        double *apos = a;
        for (i = 0; i < n; i++, apos += n) {
          double t = apos[k];
          apos[k] = apos[ki];
          apos[ki] = t;
        }
      }
    }
  }
}
```