user: Translate the below assembly code into C programming language:

```asm
<lu_decomp>:
  endbr64
  push   %r15
  mov    %rcx,%r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %esi,%ebp
  push   %rbx
  mov    %rdi,%rbx
  mov    %esi,%edi
  sub    $0x58,%rsp
  mov    %rdx,0x20(%rsp)
  mov    %rcx,0x28(%rsp)
  call   <vec@plt>
  movsd  D37(%rip),%xmm5
  mov    %rax,0x10(%rsp)
  movsd  %xmm5,(%r15)
  movslq %ebp,%r15
  shl    $0x3,%r15
  lea    (%rbx,%r15,1),%r12
  cmp    %r12,%rbx
  jae    L126
  movq   D62(%rip),%xmm2
  mov    %rax,%r14
  mov    %rbx,%r13
  pxor   %xmm4,%xmm4
  nop
L115:
  mov    0x0(%r13),%rax
  movapd %xmm4,%xmm1
  lea    (%rax,%r15,1),%rdx
  cmp    %rdx,%rax
  jae    L305
  nopl   (%rax)
L40:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %rax,%rdx
  ja     L40
  ucomisd %xmm4,%xmm0
  jp     L140
  je     L305
L140:
  movapd %xmm5,%xmm0
  add    $0x8,%r14
  add    $0x8,%r13
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%r14)
  cmp    %r13,%r12
  ja     L115
L126:
  test   %ebp,%ebp
  jle    L306
  lea    -0x1(%rbp),%eax
  lea    0x8(%rbx),%r15
  xor    %r13d,%r13d
  xor    %r10d,%r10d
  mov    %eax,0x18(%rsp)
  mov    %ebp,%eax
  movq   D62(%rip),%xmm3
  mov    $0xffffffff,%r14d
  shr    %eax
  movq   D20(%rip),%xmm7
  pxor   %xmm4,%xmm4
  movq   $0x0,0x8(%rsp)
  sub    $0x1,%eax
  movsd  D0(%rip),%xmm6
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,0x30(%rsp)
  mov    %ebp,%eax
  and    $0xfffffffe,%eax
  mov    %eax,0x44(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x38(%rsp)
  mov    %ebp,%eax
  shl    $0x3,%rax
  mov    %rax,0x48(%rsp)
  nopl   (%rax)
L46:
  mov    0x10(%rsp),%r12
  mov    %r13,%r9
  movapd %xmm4,%xmm2
  movslq %r10d,%r8
  lea    0x0(,%r13,8),%rdi
  nopw   0x0(%rax,%rax,1)
L262:
  mov    (%rbx,%r9,8),%rcx
  mov    %r9d,%r11d
  lea    (%rcx,%rdi,1),%rsi
  movsd  (%rsi),%xmm1
  test   %r10d,%r10d
  je     L181
  xor    %eax,%eax
  cs nopw 0x0(%rax,%rax,1)
L236:
  mov    (%rbx,%rax,8),%rdx
  movsd  (%rdx,%rdi,1),%xmm0
  mulsd  (%rcx,%rax,8),%xmm0
  add    $0x1,%rax
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  cmp    %rax,%r8
  jne    L236
L181:
  andpd  %xmm3,%xmm1
  mulsd  (%r12,%r9,8),%xmm1
  comisd %xmm2,%xmm1
  jb     L200
  movapd %xmm1,%xmm2
  mov    %r11d,%r14d
L200:
  add    $0x1,%r9
  cmp    %r9d,%ebp
  jg     L262
  mov    -0x8(%r15),%rdx
  cmp    %r10d,%r14d
  jne    L4
L31:
  add    %rdi,%rdx
  mov    0x20(%rsp),%rax
  movsd  (%rdx),%xmm0
  mov    %r14d,(%rax,%r13,4)
  ucomisd %xmm4,%xmm0
  jp     L173
  jne    L173
  movsd  %xmm6,(%rdx)
  movapd %xmm6,%xmm0
L173:
  lea    0x1(%r10),%r9d
  cmp    %r13d,0x18(%rsp)
  je     L73
  movapd %xmm5,%xmm1
  divsd  %xmm0,%xmm1
  cmp    %r9d,%ebp
  jle    L306
  add    $0x1,%r13
  mov    %r13,%rax
  nopl   0x0(%rax,%rax,1)
L214:
  mov    (%rbx,%rax,8),%rdx
  add    $0x1,%rax
  add    %rdi,%rdx
  movsd  (%rdx),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx)
  cmp    %eax,%ebp
  jg     L214
L163:
  mov    $0x8,%r8d
  mov    $0x8,%ecx
  sub    0x8(%rsp),%r8
  mov    $0x1,%r11d
  cmp    $0x1,%r9d
  je     L285
  nop
L103:
  mov    (%rbx,%rcx,1),%rsi
  xor    %eax,%eax
  lea    (%rsi,%r8,1),%rdx
  movsd  (%rdx),%xmm1
  xchg   %ax,%ax
L219:
  mov    (%rbx,%rax,1),%rdi
  movsd  (%rdi,%r8,1),%xmm0
  mulsd  (%rsi,%rax,1),%xmm0
  add    $0x8,%rax
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  cmp    %rcx,%rax
  jne    L219
  lea    0x1(%r11),%eax
  add    $0x8,%rcx
  cmp    %r11d,%r10d
  je     L285
  mov    %eax,%r11d
  jmp    L103
  nopw   0x0(%rax,%rax,1)
L285:
  subq   $0x8,0x8(%rsp)
  add    $0x8,%r15
  mov    %r9d,%r10d
  jmp    L46
L73:
  cmp    %r9d,%ebp
  jle    L306
  add    $0x1,%r13
  jmp    L163
L4:
  movslq %r14d,%rsi
  mov    (%rbx,%rsi,8),%rax
  lea    0xf(%rax),%rcx
  sub    %rdx,%rcx
  cmp    $0x1e,%rcx
  jbe    L139
  cmpl   $0x1,0x18(%rsp)
  jbe    L139
  mov    0x30(%rsp),%r8
  xor    %ecx,%ecx
  cs nopw 0x0(%rax,%rax,1)
L124:
  movupd (%rax,%rcx,1),%xmm0
  movupd (%rdx,%rcx,1),%xmm2
  movups %xmm2,(%rax,%rcx,1)
  movups %xmm0,(%rdx,%rcx,1)
  add    $0x10,%rcx
  cmp    %r8,%rcx
  jne    L124
  mov    0x38(%rsp),%rcx
  add    %rcx,%rax
  add    %rdx,%rcx
  cmp    %ebp,0x44(%rsp)
  je     L100
  movsd  (%rax),%xmm0
  movsd  (%rcx),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rcx)
L100:
  mov    0x28(%rsp),%rax
  movsd  (%rax),%xmm0
  xorpd  %xmm7,%xmm0
  movsd  %xmm0,(%rax)
  mov    0x10(%rsp),%rax
  movsd  (%rax,%r13,8),%xmm0
  movsd  %xmm0,(%rax,%rsi,8)
  jmp    L31
L305:
  lea    D50(%rip),%rsi
  mov    $0xffffffff,%edi
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <int_error@plt>
  mov    D37(%rip),%rax
  movq   D62(%rip),%xmm2
  movsd  0x18(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm1
  movq   %rax,%xmm5
  jmp    L140
L306:
  mov    0x10(%rsp),%rdi
  add    $0x58,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1070 <free@plt>
L139:
  mov    0x48(%rsp),%rcx
  lea    (%rdx,%rcx,1),%r8
  mov    %rdx,%rcx
L248:
  movsd  (%rax),%xmm0
  movsd  (%rcx),%xmm1
  add    $0x8,%rcx
  add    $0x8,%rax
  movsd  %xmm1,-0x8(%rax)
  movsd  %xmm0,-0x8(%rcx)
  cmp    %rcx,%r8
  jne    L248
  jmp    L100
```

tool_calls: name: unpack_data
arguments: label: D37
data_type: f64
name: unpack_data
arguments: label: D62
data_type: qword
name: unpack_data
arguments: label: D20
data_type: f32[2]
name: unpack_data
arguments: label: D0
data_type: byte[8]
name: unpack_data
arguments: label: D50
data_type: string

tool: D37: 1

tool: D62: 9223372036854775807

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

tool: {"D0": [0xa0,0xc2,0xeb,0xfe,0x4b,0x48,0xb4,0x39]}

tool: D50: Singular matrix in LU-DECOMP

assistant: ```c
void lu_decomp(double **a, int n, int *indx, double *d) {
  int i, imax = -1, j, k;
  double large, dummy, temp, **ar, **lim, *limc, *ac, *dp, *vscal;
  dp = vscal = vec(n);
  *d = 1.0;
  for (ar = a, lim = &(a[n]); ar < lim; ar++) {
    large = 0.0;
    for (ac = *ar, limc = &(ac[n]); ac < limc;)
      if ((temp = fabs(*ac++)) > large)
        large = temp;
    if (large == 0.0)
      int_error((-1), "Singular matrix in LU-DECOMP");
    *dp++ = 1 / large;
  }
  ar = a;
  for (j = 0; j < n; j++, ar++) {
    for (i = 0; i < j; i++) {
      ac = &(a[i][j]);
      for (k = 0; k < i; k++)
        *ac -= a[i][k] * a[k][j];
    }
    large = 0.0;
    dp = &(vscal[j]);
    for (i = j; i < n; i++) {
      ac = &(a[i][j]);
      for (k = 0; k < j; k++)
        *ac -= a[i][k] * a[k][j];
      if ((dummy = *dp++ * fabs(*ac)) >= large) {
        large = dummy;
        imax = i;
      }
    }
    if (j != imax) {
      ac = a[imax];
      dp = *ar;
      for (k = 0; k < n; k++, ac++, dp++) {
        double temp = (*ac);
        (*ac) = (*dp);
        (*dp) = temp;
      };
      *d = -(*d);
      vscal[imax] = vscal[j];
    }
    indx[j] = imax;
    if (*(dp = &(*ar)[j]) == 0)
      *dp = 1e-30;
    if (j != n - 1) {
      dummy = 1 / (*ar)[j];
      for (i = j + 1; i < n; i++)
        a[i][j] *= dummy;
    }
  }
  free(vscal);
}
```