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

```asm
<ludcmp>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %rdi,%rbp
  mov    %esi,%ebx
  mov    %rdx,0x30(%rsp)
  mov    %rcx,%r14
  mov    %rcx,0x50(%rsp)
  mov    $0x1,%esi
  mov    %ebx,%edi
  call   <mat@plt>
  mov    %rax,%r15
  mov    D31(%rip),%rax
  mov    %rax,(%r14)
  test   %ebx,%ebx
  jle    L133
  mov    %ebx,%r9d
  movslq %ebx,%rcx
  shl    $0x3,%rcx
  mov    %rbp,%rsi
  mov    $0x0,%edx
  mov    $0x0,%r8d
  movq   D28(%rip),%xmm2
  pxor   %xmm3,%xmm3
  movsd  D31(%rip),%xmm4
  jmp    L128
L23:
  mov    %edi,%r10d
L274:
  movsd  (%rax),%xmm0
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  lea    0x1(%r10),%edi
  add    %rcx,%rax
  cmp    %edi,%ebx
  jne    L23
  comisd %xmm3,%xmm0
  jbe    L22
  movapd %xmm4,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15,%rdx,8)
  add    $0x1,%rdx
  add    $0x8,%rsi
  cmp    %r9,%rdx
  je     L242
L128:
  mov    %rsi,%rax
  mov    %r8d,%r10d
  pxor   %xmm1,%xmm1
  jmp    L274
L242:
  movslq %edi,%rax
  mov    %rax,0x38(%rsp)
  add    $0x1,%rax
  mov    %rax,0x40(%rsp)
  movq   $0x0,0x18(%rsp)
  movq   $0x0,0x20(%rsp)
  movl   $0x0,0x14(%rsp)
  movl   $0x1,0x10(%rsp)
  mov    $0x0,%ebx
  movl   $0x0,0xc(%rsp)
  mov    %rbp,%r14
  lea    0x8(%rbp),%rax
  mov    %rax,0x48(%rsp)
  pxor   %xmm6,%xmm6
  movq   D28(%rip),%xmm3
  movq   D53(%rip),%xmm8
  movapd %xmm6,%xmm5
  movapd %xmm6,%xmm4
  movsd  D31(%rip),%xmm7
  lea    0x10(%rbp),%rax
  mov    %rax,0x58(%rsp)
  mov    %r10d,0x2c(%rsp)
  jmp    L253
L22:
  mov    %r15,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
L99:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L295:
  mov    %rsi,%r9
  movsd  (%rsi),%xmm1
  test   %r8d,%r8d
  jle    L261
  lea    (%rsi,%r10,1),%rdx
  mov    %r11,%rax
L105:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  subsd  %xmm0,%xmm1
  add    %rcx,%rdx
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L105
L261:
  add    $0x8,%rsi
L263:
  movsd  %xmm1,(%r9)
  add    $0x1,%r8d
  cmp    %ebx,%r8d
  jne    L295
L8:
  mov    %ebx,%r12d
  cmp    %ebx,%edi
  jle    L104
  lea    (%r14,%rbx,8),%r9
  movslq 0x14(%rsp),%r10
  lea    (%r14,%r10,8),%r13
  lea    -0x1(%rbp),%eax
  add    %r10,%rax
  mov    0x48(%rsp),%rsi
  lea    (%rsi,%rax,8),%rsi
  mov    %rbx,%r8
  movapd %xmm6,%xmm2
  jmp    L285
L87:
  add    $0x1,%r8
  add    $0x8,%r9
  cmp    %r8d,%edi
  jle    L104
L285:
  mov    %r8d,%ebp
  mov    %r9,%r11
  movsd  (%r9,%r10,8),%xmm1
  test   %r12d,%r12d
  jle    L54
  mov    %r13,%rax
  mov    %r9,%rdx
L211:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  subsd  %xmm0,%xmm1
  add    %rcx,%rdx
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L211
L54:
  movsd  %xmm1,(%r11,%r10,8)
  andpd  %xmm3,%xmm1
  mulsd  (%r15,%r8,8),%xmm1
  comisd %xmm2,%xmm1
  jb     L87
  mov    %ebp,0xc(%rsp)
  movapd %xmm1,%xmm2
  jmp    L87
L104:
  mov    0xc(%rsp),%eax
  cmp    %r12d,%eax
  jne    L18
L280:
  mov    0x30(%rsp),%rax
  mov    0xc(%rsp),%esi
  mov    %esi,(%rax,%rbx,4)
  mov    0x18(%rsp),%rax
  movsd  (%r14,%rax,8),%xmm0
  ucomisd %xmm5,%xmm0
  jp     L19
  ucomisd %xmm4,%xmm0
  je     L10
L19:
  mov    0x2c(%rsp),%esi
  mov    0x28(%rsp),%eax
  cmp    %eax,%esi
  je     L175
  movapd %xmm7,%xmm1
  divsd  %xmm0,%xmm1
  mov    0x10(%rsp),%r11d
  cmp    %edi,%r11d
  jge    L133
  movslq %r11d,%rax
  add    0x20(%rsp),%rax
  lea    (%r14,%rax,8),%rax
  mov    %esi,%edx
  sub    %r11d,%edx
  add    0x18(%rsp),%rdx
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rdx,8),%rdx
L21:
  movapd %xmm1,%xmm0
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L21
L282:
  add    $0x1,%rbx
  addl   $0x1,0x10(%rsp)
  add    %edi,0x14(%rsp)
  mov    0x38(%rsp),%rsi
  add    %rsi,0x20(%rsp)
  mov    0x40(%rsp),%rsi
  add    %rsi,0x18(%rsp)
L253:
  mov    %ebx,%ebp
  mov    0x10(%rsp),%eax
  sub    $0x1,%eax
  mov    %eax,0x28(%rsp)
  test   %eax,%eax
  jle    L8
  movslq 0x14(%rsp),%r10
  lea    (%r14,%r10,8),%r9
  movsd  (%r9),%xmm1
  lea    0x8(%r14,%r10,8),%rsi
  neg    %r10
  shl    $0x3,%r10
  mov    %r9,%r11
  mov    $0x0,%r8d
  jmp    L263
L18:
  movslq %eax,%r9
  lea    (%r14,%r9,8),%rax
  mov    $0x0,%edx
  mov    %rbx,%rsi
  sub    %r9,%rsi
  mov    0x2c(%rsp),%r10d
L203:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rsi,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rsi,8)
  mov    %edx,%r8d
  add    $0x1,%edx
  add    %rcx,%rax
  cmp    %r8d,%r10d
  jne    L203
  mov    0x50(%rsp),%rax
  movsd  (%rax),%xmm0
  xorpd  %xmm8,%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%r15,%rbx,8),%xmm0
  movsd  %xmm0,(%r15,%r9,8)
  jmp    L280
L10:
  mov    %r15,%rdi
  call   <free@plt>
  mov    $0xffffffff,%eax
  jmp    L99
L175:
  cmp    %edi,0x10(%rsp)
  jl     L282
L133:
  mov    %r15,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L99
```

tool_calls: name: unpack_data
arguments: data_label: D31
data_type: f64
name: unpack_data
arguments: data_label: D28
data_type: qword
name: unpack_data
arguments: data_label: D53
data_type: f32[2]

tool: D31: 1

tool: D28: 9223372036854775807

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

assistant: ```c
int ludcmp(double *A, int n, int *indx, double *d) {
  double big, s, tmp, *vv = mat(n, 1);
  int i, imax = 0, j, k;
  *d = 1.0;
  for (i = 0; i < n; i++) {
    big = 0.0;
    for (j = 0; j < n; j++)
      if ((tmp = fabs(A[i + j * n])) > big)
        big = tmp;
    if (big > 0.0)
      vv[i] = 1.0 / big;
    else {
      free(vv);
      return -1;
    }
  }
  for (j = 0; j < n; j++) {
    for (i = 0; i < j; i++) {
      s = A[i + j * n];
      for (k = 0; k < i; k++)
        s -= A[i + k * n] * A[k + j * n];
      A[i + j * n] = s;
    }
    big = 0.0;
    for (i = j; i < n; i++) {
      s = A[i + j * n];
      for (k = 0; k < j; k++)
        s -= A[i + k * n] * A[k + j * n];
      A[i + j * n] = s;
      if ((tmp = vv[i] * fabs(s)) >= big) {
        big = tmp;
        imax = i;
      }
    }
    if (j != imax) {
      for (k = 0; k < n; k++) {
        tmp = A[imax + k * n];
        A[imax + k * n] = A[j + k * n];
        A[j + k * n] = tmp;
      }
      *d = -(*d);
      vv[imax] = vv[j];
    }
    indx[j] = imax;
    if (A[j + j * n] == 0.0) {
      free(vv);
      return -1;
    }
    if (j != n - 1) {
      tmp = 1.0 / A[j + j * n];
      for (i = j + 1; i < n; i++)
        A[i + j * n] *= tmp;
    }
  }
  free(vv);
  return 0;
}
```