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

```asm
<lu>:
  endbr64
  push   %r15
  push   %r14
  movslq %edi,%r14
  push   %r13
  lea    0x0(,%r14,8),%edi
  push   %r12
  mov    %rdx,%r12
  push   %rbp
  mov    %rsi,%rbp
  push   %rbx
  sub    $0x18,%rsp
  call   <malloc@plt>
  mov    %rax,%r13
  test   %r14d,%r14d
  jle    L134
  mov    %rax,%rsi
  lea    -0x1(%r14),%eax
  mov    $0xfffffffffffffff8,%rdi
  xor    %ecx,%ecx
  mov    %eax,0xc(%rsp)
  shl    $0x3,%rax
  mov    %r14,%rbx
  mov    %r14d,%r9d
  movq   D34(%rip),%xmm3
  movsd  D21(%rip),%xmm5
  pxor   %xmm6,%xmm6
  sub    %rax,%rdi
  lea    0x0(,%r14,8),%r8
  lea    0x8(%rbp,%rax,1),%rdx
  cs nopw 0x0(%rax,%rax,1)
L57:
  mov    %ecx,(%r12,%rcx,4)
  lea    (%rdi,%rdx,1),%rax
  movapd %xmm6,%xmm1
  nopl   0x0(%rax)
L90:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  andpd  %xmm3,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %rax,%rdx
  jne    L90
  ucomisd %xmm6,%xmm0
  jp     L94
  je     L88
L94:
  movapd %xmm5,%xmm0
  add    $0x1,%rcx
  add    $0x8,%rsi
  add    %r8,%rdx
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rsi)
  cmp    %rcx,%r9
  jne    L57
  lea    -0x2(%rbx),%eax
  mov    $0x1,%r11d
  xor    %r15d,%r15d
  xor    %r8d,%r8d
  movsd  D33(%rip),%xmm7
  mov    %eax,0x8(%rsp)
  lea    0x10(%rbp),%r14
  mov    %ebx,%eax
  movq   D14(%rip),%xmm8
  nopl   0x0(%rax)
L82:
  mov    %r15,%rdx
  movapd %xmm7,%xmm1
  nopw   0x0(%rax,%rax,1)
L79:
  movslq (%r12,%rdx,4),%rsi
  mov    %ebx,%ecx
  imul   %esi,%ecx
  add    %r8d,%ecx
  movslq %ecx,%rcx
  movsd  0x0(%rbp,%rcx,8),%xmm0
  andpd  %xmm3,%xmm0
  mulsd  0x0(%r13,%rsi,8),%xmm0
  comisd %xmm1,%xmm0
  maxsd  %xmm1,%xmm0
  cmova  %edx,%eax
  add    $0x1,%rdx
  movapd %xmm0,%xmm1
  cmp    %edx,%ebx
  jg     L79
  movslq %eax,%rdx
  lea    (%r12,%rdx,4),%rdx
  mov    (%rdx),%r9d
  cmp    %r8d,%eax
  je     L25
  mov    (%r12,%r15,4),%eax
  xorpd  %xmm8,%xmm5
  mov    %eax,(%rdx)
  mov    %r9d,(%r12,%r15,4)
L25:
  imul   %ebx,%r9d
  lea    (%r9,%r8,1),%eax
  cltq
  movsd  0x0(%rbp,%rax,8),%xmm4
  mulsd  %xmm4,%xmm5
  ucomisd %xmm6,%xmm4
  jp     L75
  je     L88
L75:
  lea    0x1(%r8),%eax
  mov    %eax,(%rsp)
  cmp    %eax,%ebx
  je     L129
  mov    0x8(%rsp),%r10d
  mov    %r11,%rdi
  movslq %r9d,%r9
  add    %r15,%r10
  nopw   0x0(%rax,%rax,1)
L72:
  mov    (%r12,%rdi,4),%esi
  imul   %ebx,%esi
  lea    (%rsi,%r8,1),%eax
  movslq %esi,%rsi
  cltq
  lea    (%r10,%rsi,1),%rdx
  lea    0x0(%rbp,%rax,8),%rax
  lea    (%r14,%rdx,8),%rcx
  mov    %r9,%rdx
  movsd  (%rax),%xmm2
  sub    %rsi,%rdx
  divsd  %xmm4,%xmm2
  movsd  %xmm2,(%rax)
  lea    (%r11,%rsi,1),%rax
  lea    0x0(%rbp,%rax,8),%rax
L38:
  movsd  (%rax,%rdx,8),%xmm1
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rax,%rcx
  jne    L38
  add    $0x1,%rdi
  cmp    %edi,%ebx
  jg     L72
  mov    0xc(%rsp),%eax
  mov    (%rsp),%r8d
  add    $0x1,%r11
  subl   $0x1,0x8(%rsp)
  sub    %r15d,%eax
  add    $0x1,%r15
  add    %r8d,%eax
  jmp    L82
L88:
  movapd %xmm6,%xmm5
L54:
  add    $0x18,%rsp
  movapd %xmm5,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L134:
  movsd  D21(%rip),%xmm5
L129:
  mov    %r13,%rdi
  movsd  %xmm5,(%rsp)
  call   <free@plt>
  movsd  (%rsp),%xmm5
  jmp    L54
```

tool_calls: name: extract_symbolic_data
arguments: data_tag: D34
data_type: qword
name: extract_symbolic_data
arguments: data_tag: D21
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D33
data_type: byte[8]
name: extract_symbolic_data
arguments: data_tag: D14
data_type: byte[8]

tool: D34: 9223372036854775807

tool: {"D21": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

tool: {"D33": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0xbf]}

tool: {"D14": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80]}

assistant: ```c
double lu(int n, double *a, int *ip) {
  int i, j, k, ii, ik;
  double t, u, det;
  double *weight;
  weight = (double *)malloc(sizeof(double) * n);
  det = 0;
  for (k = 0; k < n; k++) {
    ip[k] = k;
    u = 0;
    for (j = 0; j < n; j++) {
      t = fabs(a[n * k + j]);
      if (t > u)
        u = t;
    }
    if (u == 0) {
      return 0;
    }
    weight[k] = 1 / u;
  }
  det = 1;
  for (k = 0; k < n; k++) {
    u = -1;
    for (i = k; i < n; i++) {
      ii = ip[i];
      t = fabs(a[n * ii + k]) * weight[ii];
      if (t > u) {
        u = t;
        j = i;
      }
    }
    ik = ip[j];
    if (j != k) {
      ip[j] = ip[k];
      ip[k] = ik;
      det = -det;
    }
    u = a[n * ik + k];
    det *= u;
    if (u == 0) {
      return 0;
    }
    for (i = k + 1; i < n; i++) {
      ii = ip[i];
      t = (a[n * ii + k] /= u);
      for (j = k + 1; j < n; j++) {
        a[n * ii + j] -= t * a[n * ik + j];
      }
    }
  }
  free(weight);
  return det;
}
```