user: Please show me the C implementation that matches the assembly code listed below:

```asm
<ludcmp>:
  endbr64
  push   %r15
  push   %r14
  mov    %rcx,%r14
  push   %r13
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  mov    $0x1,%esi
  mov    %ebx,%edi
  sub    $0x48,%rsp
  mov    %rcx,0x10(%rsp)
  call   <mat@plt>
  movsd  D1(%rip),%xmm5
  mov    %rax,%r9
  movsd  %xmm5,(%r14)
  test   %ebx,%ebx
  jle    L83
  movslq %ebx,%r15
  movq   D23(%rip),%xmm2
  mov    %rbp,%rdi
  xor    %esi,%esi
  lea    0x0(,%r15,8),%rdx
  pxor   %xmm3,%xmm3
  xchg   %ax,%ax
L59:
  mov    %rdi,%rcx
  xor    %eax,%eax
  movapd %xmm3,%xmm1
  nopl   0x0(%rax)
L157:
  movsd  (%rcx),%xmm0
  add    $0x1,%eax
  add    %rdx,%rcx
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %ebx,%eax
  jne    L157
  comisd %xmm3,%xmm0
  jbe    L77
  movapd %xmm5,%xmm0
  add    $0x8,%rdi
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r9,%rsi,8)
  add    $0x1,%rsi
  cmp    %r15,%rsi
  jne    L59
  cmp    $0x1,%eax
  jne    L123
  ucomisd 0x0(%rbp),%xmm3
  movl   $0x0,(%r12)
  jp     L83
  je     L77
L83:
  mov    %r9,%rdi
  call   <free@plt>
  add    $0x48,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L77:
  mov    %r9,%rdi
  call   <free@plt>
  add    $0x48,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L123:
  lea    0x8(%rdx),%rax
  mov    %r12,0x38(%rsp)
  xor    %edi,%edi
  mov    %rbp,%r13
  mov    %rax,0x18(%rsp)
  lea    0x8(%rbp),%rax
  xor    %r11d,%r11d
  xor    %r10d,%r10d
  mov    %rax,0x20(%rsp)
  movq   D4(%rip),%xmm6
  xor    %r14d,%r14d
  mov    %rax,0x8(%rsp)
  lea    -0x1(%rbx),%eax
  movl   $0x0,0x28(%rsp)
  mov    %eax,0x2c(%rsp)
  mov    %r15,0x30(%rsp)
  mov    %rdi,%r15
L133:
  test   %r10d,%r10d
  je     L40
  cmp    $0x1,%r10d
  je     L40
  mov    %r11,%r8
  lea    0x8(%r13),%rsi
  mov    $0x1,%edi
  neg    %r8
  shl    $0x3,%r8
  nopl   0x0(%rax,%rax,1)
L84:
  movsd  (%rsi),%xmm1
  lea    (%rsi,%r8,1),%rcx
  mov    %r13,%rax
  nopl   0x0(%rax,%rax,1)
L265:
  movsd  (%rcx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rdx,%rcx
  subsd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L265
  add    $0x1,%edi
  movsd  %xmm1,(%rsi)
  add    $0x8,%rsi
  cmp    %r10d,%edi
  jne    L84
L40:
  mov    0x20(%rsp),%rdi
  lea    -0x1(%r10),%eax
  lea    0x0(%rbp,%r15,8),%r8
  movapd %xmm3,%xmm4
  add    %r11,%rax
  lea    (%rdi,%rax,8),%rsi
  mov    %r15,%rdi
  nopl   0x0(%rax)
L32:
  movsd  (%r8,%r11,8),%xmm1
  mov    %edi,%r12d
  test   %r10d,%r10d
  je     L90
  mov    %r13,%rax
  mov    %r8,%rcx
  nopl   0x0(%rax)
L13:
  movsd  (%rcx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rdx,%rcx
  subsd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L13
L90:
  movsd  %xmm1,(%r8,%r11,8)
  andpd  %xmm2,%xmm1
  mulsd  (%r9,%rdi,8),%xmm1
  comisd %xmm4,%xmm1
  jb     L202
  mov    %r12d,%r14d
  movapd %xmm1,%xmm4
L202:
  add    $0x1,%rdi
  add    $0x8,%r8
  cmp    %edi,%ebx
  jg     L32
  cmp    %r10d,%r14d
  jne    L139
L70:
  mov    0x38(%rsp),%rax
  mov    %r14d,(%rax,%r15,4)
  mov    0x8(%rsp),%rax
  movsd  -0x8(%rax),%xmm1
  ucomisd %xmm3,%xmm1
  jp     L247
  je     L77
L247:
  add    $0x1,%r10d
  cmp    %r15d,0x2c(%rsp)
  je     L100
  movapd %xmm5,%xmm0
  divsd  %xmm1,%xmm0
  cmp    %r10d,%ebx
  jle    L83
  mov    %ebx,%eax
  mov    %ebx,%ecx
  sub    %r15d,%eax
  sub    %r10d,%ecx
  cmp    $0x2,%eax
  je     L250
  mov    %ecx,%eax
  mov    0x8(%rsp),%rdi
  movapd %xmm0,%xmm4
  shr    %eax
  unpcklpd %xmm4,%xmm4
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%rdi,%rax,1),%rsi
  mov    %rdi,%rax
L187:
  movupd (%rax),%xmm1
  add    $0x10,%rax
  mulpd  %xmm4,%xmm1
  movups %xmm1,-0x10(%rax)
  cmp    %rax,%rsi
  jne    L187
  mov    %ecx,%esi
  and    $0xfffffffe,%esi
  lea    (%rsi,%r10,1),%eax
  cmp    %esi,%ecx
  je     L289
L286:
  add    0x28(%rsp),%eax
  cltq
  lea    0x0(%rbp,%rax,8),%rax
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L289:
  mov    0x18(%rsp),%rdi
  add    %ebx,0x28(%rsp)
  add    $0x1,%r15
  add    %rdx,%r13
  add    %rdi,0x8(%rsp)
  add    0x30(%rsp),%r11
  jmp    L133
L100:
  cmp    %r10d,%ebx
  jg     L289
  jmp    L83
  nopw   0x0(%rax,%rax,1)
L139:
  movslq %r14d,%rdi
  mov    %r15,%rsi
  xor    %ecx,%ecx
  lea    0x0(%rbp,%rdi,8),%rax
  sub    %rdi,%rsi
L270:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rsi,8),%xmm1
  add    $0x1,%ecx
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rsi,8)
  add    %rdx,%rax
  cmp    %ecx,%ebx
  jne    L270
  mov    0x10(%rsp),%rax
  movsd  (%rax),%xmm0
  xorpd  %xmm6,%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%r9,%r15,8),%xmm0
  movsd  %xmm0,(%r9,%rdi,8)
  jmp    L70
L250:
  mov    %r10d,%eax
  jmp    L286
```

tool_calls: name: parse_data
arguments: data_label: D1
type: f64
name: parse_data
arguments: data_label: D23
type: qword
name: parse_data
arguments: data_label: D4
type: f32[2]

tool: D1: 1

tool: D23: 9223372036854775807

tool: {"D4": [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;
}
```