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

```asm
<rludecomp>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L241
L94:
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x3c(%rbp),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  cvttsd2si %xmm0,%eax
  mov    %eax,(%rdx)
  addl   $0x1,-0x3c(%rbp)
L241:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L94
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jle    L270
  movl   $0x0,-0x3c(%rbp)
  jmp    L255
L3:
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D23(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L331
L332:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D23(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L234
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L234:
  addl   $0x1,-0x38(%rbp)
L331:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L332
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L247
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x30(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0x38(%rbp)
  jmp    L303
L207:
  mov    -0x2c(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rcx,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L303:
  mov    -0x38(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L207
L247:
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L185
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L128
L185:
  mov    -0x3c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L128
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L103
L211:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x2c(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L82
L314:
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x8(%rbp),%xmm1
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L82:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L314
  addl   $0x1,-0x38(%rbp)
L103:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L211
L128:
  addl   $0x1,-0x3c(%rbp)
L255:
  mov    -0x3c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L3
  jmp    L36
L270:
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jge    L107
  movl   $0x0,-0x3c(%rbp)
  jmp    L216
L186:
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D23(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x3c(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L248
L198:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D23(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x20(%rbp),%xmm0
  jbe    L10
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x30(%rbp)
L10:
  addl   $0x1,-0x38(%rbp)
L248:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L198
  mov    -0x30(%rbp),%eax
  cmp    -0x3c(%rbp),%eax
  je     L337
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x30(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x30(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x24(%rbp)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    -0x30(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x58(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x24(%rbp),%eax
  mov    %eax,(%rdx)
  movl   $0x0,-0x38(%rbp)
  jmp    L43
L237:
  mov    -0x2c(%rbp),%edx
  mov    -0x38(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    -0x2c(%rbp),%eax
  movslq %eax,%rcx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rcx,%rax
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x28(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x38(%rbp),%eax
  cltq
  add    %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L43:
  mov    -0x38(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L237
L337:
  mov    -0x3c(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x28(%rbp)
  mov    -0x28(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  jp     L250
  pxor   %xmm0,%xmm0
  ucomisd -0x10(%rbp),%xmm0
  je     L194
L250:
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L53
L142:
  mov    -0x38(%rbp),%eax
  imul   -0x50(%rbp),%eax
  mov    %eax,-0x2c(%rbp)
  mov    -0x2c(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x2c(%rbp),%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x34(%rbp)
  jmp    L95
L208:
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x28(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  -0x8(%rbp),%xmm1
  mov    -0x2c(%rbp),%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L95:
  mov    -0x34(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jl     L208
  addl   $0x1,-0x38(%rbp)
L53:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L142
L194:
  addl   $0x1,-0x3c(%rbp)
L216:
  mov    -0x4c(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x3c(%rbp)
  jl     L186
  jmp    L36
L107:
  mov    -0x4c(%rbp),%eax
  cmp    -0x50(%rbp),%eax
  jne    L36
  mov    -0x58(%rbp),%rdx
  mov    -0x50(%rbp),%ecx
  mov    -0x48(%rbp),%rax
  mov    %ecx,%esi
  mov    %rax,%rdi
  call   <pludecomp@plt>
L36:
  mov    $0x0,%eax
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D23
datatype: qword

tool: D23: 9223372036854775807

assistant: ```c
int rludecomp(double *A, int M, int N, int *ipiv) {
  int k, j, l, c1, c2, mind, tempi;
  double ld, mult, mval, temp;
  for (k = 0; k < M; ++k)
    ipiv[k] = (double)k;
  if (M > N) {
    for (k = 0; k < N; ++k) {
      mval = fabs(A[k * N + k]);
      mind = k;
      for (j = k + 1; j < M; ++j) {
        if (mval < fabs(A[j * N + k])) {
          mval = A[j * N + k];
          mind = j;
        }
      }
      if (mind != k) {
        c1 = k * N;
        c2 = mind * N;
        tempi = ipiv[mind];
        ipiv[mind] = ipiv[k];
        ipiv[k] = tempi;
        for (j = 0; j < N; j++) {
          temp = A[c1 + j];
          *(A + c1 + j) = *(A + c2 + j);
          *(A + c2 + j) = temp;
        }
      }
      c2 = k * N;
      ld = A[c2 + k];
      if (ld != 0. && k < N) {
        for (j = k + 1; j < M; ++j) {
          c1 = j * N;
          mult = A[c1 + k] /= ld;
          for (l = k + 1; l < N; ++l) {
            A[c1 + l] -= mult * A[c2 + l];
          }
        }
      }
    }
  } else if (M < N) {
    for (k = 0; k < M - 1; ++k) {
      mval = fabs(A[k * N + k]);
      mind = k;
      for (j = k + 1; j < M; ++j) {
        if (mval < fabs(A[j * N + k])) {
          mval = A[j * N + k];
          mind = j;
        }
      }
      if (mind != k) {
        c1 = k * N;
        c2 = mind * N;
        tempi = ipiv[mind];
        ipiv[mind] = ipiv[k];
        ipiv[k] = tempi;
        for (j = 0; j < N; j++) {
          temp = A[c1 + j];
          *(A + c1 + j) = *(A + c2 + j);
          *(A + c2 + j) = temp;
        }
      }
      c2 = k * N;
      ld = A[c2 + k];
      if (ld != 0.) {
        for (j = k + 1; j < M; ++j) {
          c1 = j * N;
          mult = A[c1 + k] /= ld;
          for (l = k + 1; l < N; ++l) {
            A[c1 + l] -= mult * A[c2 + l];
          }
        }
      }
    }
  } else if (M == N) {
    pludecomp(A, N, ipiv);
  }
  return 0;
}
```