user: 请将以下的汇编代码转换成C语言代码：

```asm
<lu>:
  endbr64
  push   %r15
  mov    %rdx,%r15
  push   %r14
  push   %r13
  push   %r12
  mov    %rsi,%r12
  push   %rbp
  push   %rbx
  movslq %edi,%rbx
  lea    0x0(,%rbx,8),%edi
  sub    $0x48,%rsp
  call   <malloc@plt>
  mov    %rax,0x30(%rsp)
  test   %ebx,%ebx
  jle    L14
  mov    %rax,%rsi
  mov    %ebx,0x8(%rsp)
  lea    -0x1(%rbx),%eax
  mov    %rbx,%r13
  mov    %eax,0x3c(%rsp)
  mov    $0xfffffffffffffff8,%rdi
  mov    %ebx,%r9d
  xor    %ecx,%ecx
  shl    $0x3,%rax
  movq   D6(%rip),%xmm3
  pxor   %xmm5,%xmm5
  movsd  D34(%rip),%xmm4
  lea    0x0(,%rbx,8),%r8
  lea    0x8(%r12,%rax,1),%rdx
  sub    %rax,%rdi
  nopl   0x0(%rax)
L9:
  mov    %ecx,(%r15,%rcx,4)
  lea    (%rdi,%rdx,1),%rax
  movapd %xmm5,%xmm1
  nopl   0x0(%rax)
L58:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  andpd  %xmm3,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L58
  ucomisd %xmm5,%xmm0
  jp     L19
  je     L49
L19:
  movapd %xmm4,%xmm0
  add    $0x1,%rcx
  add    $0x8,%rsi
  add    %r8,%rdx
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x8(%rsi)
  cmp    %r9,%rcx
  jne    L9
  lea    0x10(%r12),%rbx
  mov    0x3c(%rsp),%eax
  mov    %r13d,%edx
  xor    %r14d,%r14d
  mov    %rbx,0x28(%rsp)
  movsd  D16(%rip),%xmm6
  movq   D13(%rip),%xmm7
  mov    %eax,0x10(%rsp)
  xor    %eax,%eax
  nopl   0x0(%rax)
L72:
  mov    0x30(%rsp),%r8
  mov    %rax,%rcx
  movapd %xmm6,%xmm1
  nopl   0x0(%rax)
L90:
  movslq (%r15,%rcx,4),%rdi
  mov    %r13d,%esi
  imul   %edi,%esi
  add    %r14d,%esi
  movslq %esi,%rsi
  movsd  (%r12,%rsi,8),%xmm0
  andpd  %xmm3,%xmm0
  mulsd  (%r8,%rdi,8),%xmm0
  comisd %xmm1,%xmm0
  maxsd  %xmm1,%xmm0
  cmova  %ecx,%edx
  add    $0x1,%rcx
  movapd %xmm0,%xmm1
  cmp    %ecx,%r13d
  jg     L90
  movslq %edx,%rcx
  lea    (%r15,%rcx,4),%rcx
  mov    (%rcx),%edi
  cmp    %edx,%r14d
  je     L71
  mov    (%r15,%rax,4),%edx
  xorpd  %xmm7,%xmm4
  mov    %edx,(%rcx)
  mov    %edi,(%r15,%rax,4)
L71:
  imul   %r13d,%edi
  lea    (%rdi,%r14,1),%edx
  movslq %edx,%rdx
  movsd  (%r12,%rdx,8),%xmm9
  mulsd  %xmm9,%xmm4
  ucomisd %xmm5,%xmm9
  jp     L8
  je     L49
L8:
  lea    0x1(%r14),%r11d
  mov    %r11d,0x38(%rsp)
  cmp    %r11d,%r13d
  je     L126
  mov    0x10(%rsp),%esi
  mov    0x3c(%rsp),%r9d
  movslq %edi,%rbx
  lea    0x1(%rax),%rbp
  mov    %rbx,0x18(%rsp)
  lea    0x2(%rax,%rbx,1),%rbx
  mov    %rbp,%r8
  mov    %esi,%edx
  sub    %r11d,%r9d
  and    $0xfffffffe,%esi
  shl    $0x3,%rbx
  mov    %esi,0x14(%rsp)
  shr    %edx
  add    %r11d,%esi
  add    %r9,%rax
  sub    $0x1,%edx
  add    %esi,%edi
  mov    %rax,0x20(%rsp)
  lea    -0x8(%r12,%rbx,1),%rcx
  add    $0x1,%rdx
  movslq %edi,%rdi
  shl    $0x4,%rdx
  lea    (%r12,%rdi,8),%rdi
  nopl   0x0(%rax)
L82:
  mov    (%r15,%r8,4),%r10d
  imul   %r13d,%r10d
  lea    (%r10,%r14,1),%eax
  movslq %r10d,%r9
  cltq
  lea    (%r12,%rax,8),%rax
  movsd  (%rax),%xmm0
  divsd  %xmm9,%xmm0
  movsd  %xmm0,(%rax)
  lea    0x0(%rbp,%r9,1),%rax
  shl    $0x3,%rax
  cmp    %rax,%rbx
  je     L175
  cmpl   $0x2,0x8(%rsp)
  je     L175
  movapd %xmm0,%xmm8
  add    %r12,%rax
  xor    %r9d,%r9d
  unpcklpd %xmm8,%xmm8
  nop
L168:
  movupd (%rcx,%r9,1),%xmm2
  movupd (%rax,%r9,1),%xmm1
  mulpd  %xmm8,%xmm2
  subpd  %xmm2,%xmm1
  movups %xmm1,(%rax,%r9,1)
  add    $0x10,%r9
  cmp    %rdx,%r9
  jne    L168
  mov    0x14(%rsp),%r11d
  cmp    %r11d,0x10(%rsp)
  je     L23
  mulsd  (%rdi),%xmm0
  add    %esi,%r10d
  movslq %r10d,%r10
  lea    (%r12,%r10,8),%rax
  movsd  (%rax),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L23:
  add    $0x1,%r8
  cmp    %r8d,%r13d
  jg     L82
  mov    0x38(%rsp),%r14d
  subl   $0x1,0x8(%rsp)
  mov    0x8(%rsp),%eax
  subl   $0x1,0x10(%rsp)
  mov    %r14d,%edx
  add    %eax,%edx
  mov    %rbp,%rax
  jmp    L72
L49:
  movapd %xmm5,%xmm4
L173:
  add    $0x48,%rsp
  movapd %xmm4,%xmm0
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L175:
  mov    0x20(%rsp),%r11
  add    %r12,%rax
  lea    (%r11,%r9,1),%r10
  mov    0x28(%rsp),%r11
  lea    (%r11,%r10,8),%r11
  mov    0x18(%rsp),%r10
  sub    %r9,%r10
  nopl   (%rax)
L166:
  movsd  (%rax,%r10,8),%xmm2
  movsd  (%rax),%xmm1
  add    $0x8,%rax
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,-0x8(%rax)
  cmp    %rax,%r11
  jne    L166
  jmp    L23
L14:
  movsd  D34(%rip),%xmm4
L126:
  mov    0x30(%rsp),%rdi
  movsd  %xmm4,0x8(%rsp)
  call   <free@plt>
  movsd  0x8(%rsp),%xmm4
  jmp    L173
```

tool_calls: name: retrieve_data
arguments: data_label: D6
datatype: qword
name: retrieve_data
arguments: data_label: D34
datatype: byte[8]
name: retrieve_data
arguments: data_label: D16
datatype: byte[8]
name: retrieve_data
arguments: data_label: D13
datatype: byte[8]

tool: D6: 9223372036854775807

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

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

tool: {"D13": [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;
}
```