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

```asm
<LUCroutDecompose>:
  endbr64
  test   %edi,%edi
  jle    L98
  push   %r15
  movsd  D2(%rip),%xmm0
  mov    %rcx,%rax
  xor    %r10d,%r10d
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  movslq %edi,%rbx
  lea    0x8(,%rbx,8),%rdx
  mov    %rdx,-0x18(%rsp)
  mov    %rbx,-0x8(%rsp)
  mov    %rcx,%rbx
  nopw   0x0(%rax,%rax,1)
L20:
  mov    %r10d,%ecx
  add    $0x1,%r10d
  movsd  %xmm0,(%rax)
  add    %rdx,%rax
  cmp    %r10d,%edi
  jne    L20
  lea    0x2(%rcx),%eax
  mov    %ecx,-0x34(%rsp)
  mov    %rbp,%r13
  xor    %r9d,%r9d
  mov    %eax,-0xc(%rsp)
  mov    -0x18(%rsp),%rax
  pxor   %xmm2,%xmm2
  movq   $0x0,-0x40(%rsp)
  lea    -0x8(%rax),%rcx
  lea    0x8(%rbp),%rax
  movl   $0x0,-0x38(%rsp)
  movl   $0x0,-0x44(%rsp)
  movq   $0x0,-0x50(%rsp)
  movl   $0xffffffff,-0x48(%rsp)
  mov    %rax,-0x30(%rsp)
  mov    %r10d,-0x10(%rsp)
  nopl   0x0(%rax)
L24:
  mov    -0x48(%rsp),%esi
  mov    -0x50(%rsp),%rax
  mov    %r9d,%r10d
  mov    %r9d,%r15d
  mov    -0x30(%rsp),%rdi
  mov    -0x40(%rsp),%r8
  add    %rsi,%rax
  mov    -0x34(%rsp),%r11d
  lea    (%rdi,%rax,8),%rdi
  nopl   (%rax)
L83:
  movsd  (%r12,%r8,1),%xmm1
  test   %r9,%r9
  je     L46
  lea    (%r8,%r13,1),%rax
  mov    %rbx,%rdx
  nopw   0x0(%rax,%rax,1)
L84:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rcx,%rdx
  subsd  %xmm0,%xmm1
  cmp    %rax,%rdi
  jne    L84
L46:
  movsd  %xmm1,0x0(%rbp,%r8,1)
  lea    0x1(%r10),%eax
  add    %rcx,%rdi
  add    %rcx,%r8
  cmp    %r10d,%r11d
  jle    L26
  mov    %eax,%r10d
  jmp    L83
  nopl   0x0(%rax,%rax,1)
L26:
  movslq -0x44(%rsp),%r11
  movslq -0x38(%rsp),%rax
  mov    %rbx,-0x20(%rsp)
  mov    %rbx,%r8
  mov    -0x30(%rsp),%rdi
  mov    -0x10(%rsp),%ebx
  mov    %r9,-0x28(%rsp)
  lea    0x0(,%r11,8),%r10
  lea    0x0(%rbp,%rax,8),%r14
  add    %r11,%rsi
  lea    0x0(%rbp,%r10,1),%rax
  lea    (%rdi,%rsi,8),%rsi
  add    %r12,%r10
  mov    %r9,%rdi
  mov    %rax,%r9
  nopw   0x0(%rax,%rax,1)
L54:
  mov    %r8,%rdx
  mov    %r9,%rax
  movapd %xmm2,%xmm1
  test   %r15d,%r15d
  je     L62
  nopw   0x0(%rax,%rax,1)
L58:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rcx,%rdx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L58
L62:
  movsd  (%r10,%rdi,8),%xmm0
  add    $0x1,%rdi
  subsd  %xmm1,%xmm0
  divsd  (%r14),%xmm0
  movsd  %xmm0,(%r8,%r11,8)
  add    $0x8,%r8
  cmp    %edi,%ebx
  jg     L54
  mov    -0x28(%rsp),%r9
  mov    -0x20(%rsp),%rbx
  sub    $0x8,%r13
  mov    -0x8(%rsp),%rdi
  addl   $0x1,-0x48(%rsp)
  add    %rdi,-0x50(%rsp)
  mov    -0x48(%rsp),%eax
  add    $0x1,%r9
  add    $0x8,%rbx
  mov    -0x10(%rsp),%edi
  add    %edi,-0x44(%rsp)
  mov    -0xc(%rsp),%edi
  add    %edi,-0x38(%rsp)
  mov    -0x18(%rsp),%rdi
  add    %rdi,-0x40(%rsp)
  cmp    -0x34(%rsp),%eax
  jne    L24
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L98:
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D2
datatype: f64

tool: D2: 1

assistant: ```c
void LUCroutDecompose(int n, double *A, double *L, double *U) {
  int i, j, k;
  double soma;
  for (i = 0; i < n; i++) {
    U[i * n + i] = 1.0;
  }
  for (j = 0; j < n; j++) {
    for (i = j; i < n; i++) {
      soma = A[i * n + j];
      for (k = 0; k < j; k++) {
        soma -= L[i * n + k] * U[k * n + j];
      }
      L[i * n + j] = soma;
    }
    for (i = j; i < n; i++) {
      soma = 0.0;
      for (k = 0; k < j; k++) {
        soma += L[j * n + k] * U[k * n + i];
      }
      U[j * n + i] = (A[j * n + i] - soma) / L[j * n + j];
    }
  }
  return;
}
```