user: Converte this assembly snippet into its equivalent C code:

```asm
<ludcmp>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %esi,%ebx
  mov    $0x1,%esi
  sub    $0x58,%rsp
  mov    %rdi,0x8(%rsp)
  mov    %ebx,%edi
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x38(%rsp)
  call   <mat@plt>
  movsd  D26(%rip),%xmm5
  mov    %rax,%rbp
  movsd  %xmm5,(%r15)
  test   %ebx,%ebx
  jle    L35
  movslq %ebx,%r9
  mov    0x8(%rsp),%rsi
  xor    %edx,%edx
  pxor   %xmm4,%xmm4
  mov    %r9,0x28(%rsp)
  movq   D11(%rip),%xmm2
  lea    0x0(,%r9,8),%rcx
  nopl   (%rax)
L21:
  mov    %rsi,%rax
  xor    %r8d,%r8d
  movapd %xmm4,%xmm1
  jmp    L170
  nopl   0x0(%rax)
L123:
  mov    %edi,%r8d
L170:
  movsd  (%rax),%xmm0
  lea    0x1(%r8),%edi
  add    %rcx,%rax
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %edi,%ebx
  jne    L123
  comisd %xmm4,%xmm0
  jbe    L178
  movapd %xmm5,%xmm0
  add    $0x8,%rsi
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%rdx,8)
  add    $0x1,%rdx
  cmp    %r9,%rdx
  jne    L21
  mov    0x28(%rsp),%rax
  xor    %r9d,%r9d
  xor    %r11d,%r11d
  xor    %r12d,%r12d
  movq   $0x0,0x10(%rsp)
  movq   D4(%rip),%xmm6
  add    $0x1,%rax
  mov    %rax,0x30(%rsp)
  mov    0x8(%rsp),%rax
  lea    0x8(%rax),%rbx
  mov    %rax,%r10
  add    $0x10,%rax
  mov    %rbx,0x18(%rsp)
  lea    -0x1(%r8),%ebx
  mov    %ebx,0x44(%rsp)
  mov    %rax,0x48(%rsp)
  nopl   (%rax)
L28:
  mov    %r11d,0x40(%rsp)
  mov    %r11d,%ebx
  test   %r11,%r11
  je     L179
  movsd  (%r10),%xmm1
  mov    %r9,%r15
  xor    %r13d,%r13d
  mov    %r10,%r14
  neg    %r15
  add    $0x1,%r13d
  lea    0x8(%r10),%rsi
  shl    $0x3,%r15
  movsd  %xmm1,(%r14)
  cmp    %ebx,%r13d
  je     L179
  nopl   0x0(%rax)
L163:
  movsd  (%rsi),%xmm1
  lea    (%rsi,%r15,1),%rdx
  mov    %r10,%rax
  nopl   0x0(%rax,%rax,1)
L25:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rcx,%rdx
  subsd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L25
  add    $0x1,%r13d
  add    $0x8,%r14
  add    $0x8,%rsi
  movsd  %xmm1,(%r14)
  cmp    %ebx,%r13d
  jne    L163
L179:
  mov    0x8(%rsp),%rax
  mov    0x18(%rsp),%rsi
  mov    %r11,%r13
  movapd %xmm4,%xmm3
  lea    (%rax,%r11,8),%r14
  mov    0x40(%rsp),%eax
  sub    $0x1,%eax
  add    %r9,%rax
  lea    (%rsi,%rax,8),%rsi
  nopl   0x0(%rax)
L117:
  movsd  (%r14,%r9,8),%xmm1
  mov    %r13d,%r15d
  test   %r11,%r11
  je     L227
  mov    %r10,%rax
  mov    %r14,%rdx
  nopl   0x0(%rax)
L229:
  movsd  (%rdx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rcx,%rdx
  subsd  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L229
L227:
  movsd  %xmm1,(%r14,%r9,8)
  andpd  %xmm2,%xmm1
  mulsd  0x0(%rbp,%r13,8),%xmm1
  comisd %xmm3,%xmm1
  jb     L139
  mov    %r15d,%r12d
  movapd %xmm1,%xmm3
L139:
  add    $0x1,%r13
  add    $0x8,%r14
  cmp    %r13d,%edi
  jg     L117
  cmp    %ebx,%r12d
  jne    L119
L58:
  mov    0x20(%rsp),%rax
  mov    0x10(%rsp),%rsi
  mov    %r12d,(%rax,%r11,4)
  mov    0x8(%rsp),%rax
  movsd  (%rax,%rsi,8),%xmm0
  ucomisd %xmm4,%xmm0
  jp     L110
  je     L178
L110:
  mov    0x40(%rsp),%esi
  lea    0x1(%rsi),%eax
  cmp    %ebx,%r8d
  je     L208
  movapd %xmm5,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %eax,%edi
  jle    L35
  mov    0x44(%rsp),%edx
  mov    0x10(%rsp),%rbx
  mov    0x18(%rsp),%rax
  sub    %esi,%edx
  add    %rbx,%rdx
  lea    (%rax,%rbx,8),%rax
  mov    0x48(%rsp),%rbx
  lea    (%rbx,%rdx,8),%rdx
  nopl   0x0(%rax)
L38:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L38
L32:
  mov    0x30(%rsp),%rbx
  add    $0x1,%r11
  add    %rbx,0x10(%rsp)
  add    %rcx,%r10
  add    0x28(%rsp),%r9
  jmp    L28
L178:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x58,%rsp
  mov    $0xffffffff,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L208:
  cmp    %eax,%edi
  jg     L32
L35:
  mov    %rbp,%rdi
  call   <free@plt>
  add    $0x58,%rsp
  xor    %eax,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L119:
  mov    0x8(%rsp),%rax
  movslq %r12d,%r14
  mov    %r11,%rsi
  xor    %edx,%edx
  sub    %r14,%rsi
  lea    (%rax,%r14,8),%rax
  xchg   %ax,%ax
L126:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rsi,8),%xmm1
  mov    %edx,%r13d
  add    $0x1,%edx
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rsi,8)
  add    %rcx,%rax
  cmp    %r8d,%r13d
  jne    L126
  mov    0x38(%rsp),%rax
  movsd  (%rax),%xmm0
  xorpd  %xmm6,%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x0(%rbp,%r11,8),%xmm0
  movsd  %xmm0,0x0(%rbp,%r14,8)
  jmp    L58
```

tool_calls: name: parse_data
arguments: data_label: D26
type_infered: f64
name: parse_data
arguments: data_label: D11
type_infered: qword
name: parse_data
arguments: data_label: D4
type_infered: f32[2]

tool: D26: 1

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