user: 请将这段汇编代码片段转换成等效的C代码：

```asm
<svdu1v>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x88,%rsp
  mov    %rdi,0x20(%rsp)
  mov    %rsi,0x28(%rsp)
  mov    %edx,0x34(%rsp)
  mov    %rcx,0x38(%rsp)
  cmp    %r8d,%edx
  jl     L248
  mov    %rdi,%r14
  mov    %rsi,%rbp
  lea    (%rdx,%r8,1),%edi
  mov    $0x8,%esi
  mov    %edx,%ebx
  mov    %r8d,%r15d
  call   <calloc@plt>
  mov    %rax,%rdi
  mov    %rax,0x10(%rsp)
  movslq %ebx,%rax
  lea    (%rdi,%rax,8),%r10
  mov    %rax,%rcx
  mov    %r10,0x18(%rsp)
  test   %r15d,%r15d
  jle    L59
  movslq %r15d,%rbx
  lea    -0x1(%rcx),%esi
  mov    %r14,0x40(%rsp)
  mov    %r14,%r9
  imul   %r15d,%ecx
  lea    -0x2(%r15),%r13d
  pxor   %xmm3,%xmm3
  shl    $0x3,%rbx
  lea    0x8(%rbx),%rax
  mov    %rax,0x8(%rsp)
  mov    %ecx,%r14d
  nopl   0x0(%rax)
L84:
  lea    0x1(%rsi),%eax
  cmp    $0x1,%eax
  jg     L433
  lea    -0x1(%rsi),%esi
  jne    L11
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm0,(%r9)
L11:
  lea    0x1(%r13),%eax
  cmp    $0x1,%eax
  jg     L9
  mov    0x8(%rsp),%rax
  lea    -0x1(%r13),%r13d
  lea    0x0(%rbp,%rax,1),%r8
  je     L107
L40:
  mov    %r8,%rbp
  add    $0x8,%r10
  add    $0x8,%r9
  sub    %r15d,%r14d
  cmp    $0xfffffffe,%r13d
  jne    L84
  mov    0x28(%rsp),%r13
  mov    0x38(%rsp),%rbp
  mov    %r15d,%edx
  mov    0x40(%rsp),%r14
  mov    %r13,%rdi
  mov    %rbp,%rsi
  call   <ldvmat@plt>
  mov    0x34(%rsp),%r12d
  mov    %r13,%rdi
  mov    %r15d,%edx
  mov    %r12d,%esi
  call   <atou1@plt>
  mov    %r13,%rdx
  mov    0x20(%rsp),%r13
  mov    %r12d,%ecx
  mov    0x18(%rsp),%rsi
  mov    %r15d,%r9d
  mov    %rbp,%r8
  mov    %r13,%rdi
  call   <qrbdu1@plt>
  lea    -0x1(%r15),%eax
  mov    %rbp,%rcx
  pxor   %xmm3,%xmm3
  movq   D41(%rip),%xmm1
  lea    0x8(%r13,%rax,8),%rsi
  jmp    L382
L258:
  add    $0x8,%r14
  add    $0x8,%rcx
  cmp    %rsi,%r14
  je     L271
L382:
  movsd  (%r14),%xmm0
  comisd %xmm0,%xmm3
  jbe    L258
  xorpd  %xmm1,%xmm0
  mov    %rcx,%rax
  xor    %edx,%edx
  movsd  %xmm0,(%r14)
  cs nopw 0x0(%rax,%rax,1)
L388:
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %rbx,%rax
  cmp    %edx,%r15d
  jne    L388
  add    $0x8,%r14
  add    $0x8,%rcx
  cmp    %rsi,%r14
  jne    L382
  nopl   0x0(%rax)
L271:
  mov    0x10(%rsp),%rdi
  call   <free@plt>
  xor    %eax,%eax
L238:
  add    $0x88,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L9:
  mov    %r13d,%r12d
  lea    0x8(%rbp),%rax
  movapd %xmm3,%xmm1
  lea    0x10(%rbp,%r12,8),%rdx
L212:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L212
  comisd %xmm3,%xmm1
  ja     L416
  mov    0x8(%rsp),%rax
  movsd  D41(%rip),%xmm6
  movapd %xmm3,%xmm5
  sub    $0x1,%r13d
  lea    0x0(%rbp,%rax,1),%r8
L428:
  movsd  %xmm5,0x8(%rbp)
  movsd  %xmm6,(%r10)
  jmp    L40
  nopl   0x0(%rax,%rax,1)
L433:
  mov    0x10(%rsp),%rcx
  mov    %esi,%eax
  mov    %rbp,%rdx
  movapd %xmm3,%xmm1
  lea    0x8(%rcx),%rdi
  lea    (%rdi,%rax,8),%r12
  mov    %rcx,%rax
  nopl   0x0(%rax)
L343:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%r12
  jne    L343
  comisd %xmm3,%xmm1
  ja     L25
  mov    D41(%rip),%rax
  movapd %xmm3,%xmm4
  sub    $0x1,%esi
  movq   %rax,%xmm5
L397:
  movsd  %xmm4,0x0(%rbp)
  movsd  %xmm5,(%r9)
  jmp    L11
  nopl   0x0(%rax)
L107:
  movsd  0x8(%rbp),%xmm0
  add    $0x8,%r10
  mov    %r8,%rbp
  add    $0x8,%r9
  sub    %r15d,%r14d
  movsd  %xmm0,-0x8(%r10)
  jmp    L84
  xchg   %ax,%ax
L416:
  ucomisd %xmm1,%xmm3
  ja     L93
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L344:
  movsd  0x8(%rbp),%xmm0
  movapd %xmm2,%xmm6
  xorpd  D41(%rip),%xmm6
  comisd %xmm0,%xmm3
  ja     L72
L32:
  divsd  %xmm2,%xmm0
  mov    %r9,0x70(%rsp)
  mov    %r10,0x68(%rsp)
  mov    %esi,0x60(%rsp)
  movsd  %xmm6,0x58(%rsp)
  movsd  %xmm1,0x50(%rsp)
  movsd  %xmm2,0x48(%rsp)
  call   <fabs@plt>
  pxor   %xmm5,%xmm5
  cmp    %r14d,%r15d
  mov    0x60(%rsp),%esi
  movsd  0x8(%rbp),%xmm0
  movsd  0x48(%rsp),%xmm2
  cvtsi2sd %eax,%xmm5
  pxor   %xmm3,%xmm3
  movsd  0x50(%rsp),%xmm1
  movsd  D11(%rip),%xmm4
  movapd %xmm0,%xmm7
  addsd  %xmm2,%xmm0
  mov    0x8(%rsp),%rax
  movsd  0x58(%rsp),%xmm6
  mulsd  %xmm2,%xmm7
  mov    0x68(%rsp),%r10
  mov    0x70(%rsp),%r9
  addsd  %xmm4,%xmm5
  lea    0x0(%rbp,%rax,1),%r8
  movsd  %xmm0,0x8(%rbp)
  addsd  %xmm7,%xmm1
  movapd %xmm4,%xmm7
  divsd  %xmm0,%xmm4
  divsd  %xmm1,%xmm7
  jge    L398
  mov    %r8,%rcx
  lea    0x0(,%r12,8),%rdi
  mov    %r15d,%r11d
  nopl   (%rax)
L104:
  movapd %xmm0,%xmm1
  xor    %edx,%edx
  movapd %xmm3,%xmm2
  jmp    L112
  nopl   0x0(%rax)
L83:
  movsd  0x10(%rbp,%rdx,1),%xmm1
  add    $0x8,%rdx
L112:
  mulsd  (%rcx,%rdx,1),%xmm1
  addsd  %xmm1,%xmm2
  cmp    %rdx,%rdi
  jne    L83
  mulsd  %xmm7,%xmm2
  xor    %eax,%eax
  jmp    L226
  nopl   0x0(%rax,%rax,1)
L153:
  movsd  0x10(%rbp,%rax,1),%xmm0
  add    $0x8,%rax
L226:
  mulsd  %xmm2,%xmm0
  movsd  (%rcx,%rax,1),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx,%rax,1)
  cmp    %rax,%rdx
  jne    L153
  add    %r15d,%r11d
  add    %rbx,%rcx
  cmp    %r14d,%r11d
  jge    L398
  movsd  0x8(%rbp),%xmm0
  jmp    L104
  nopl   0x0(%rax,%rax,1)
L398:
  lea    -0x1(%r13),%edx
  lea    0x10(%rbp),%rax
  mov    %rdx,%r13
  lea    0x18(%rbp,%rdx,8),%rdx
  nopl   0x0(%rax,%rax,1)
L39:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L39
  jmp    L428
  nopl   0x0(%rax,%rax,1)
L25:
  ucomisd %xmm1,%xmm3
  ja     L49
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L241:
  movsd  0x0(%rbp),%xmm0
  movapd %xmm2,%xmm5
  xorpd  D41(%rip),%xmm5
  comisd %xmm0,%xmm3
  ja     L197
L115:
  mulsd  %xmm2,%xmm0
  mov    0x10(%rsp),%rax
  movsd  D11(%rip),%xmm7
  mov    %r9,0x78(%rsp)
  movsd  D11(%rip),%xmm6
  mov    %r10,0x70(%rsp)
  mov    %esi,0x68(%rsp)
  mov    %rdi,0x58(%rsp)
  movsd  %xmm5,0x60(%rsp)
  addsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm7
  movsd  (%rax),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  divsd  %xmm0,%xmm6
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm7,0x50(%rsp)
  divsd  %xmm2,%xmm0
  movsd  %xmm6,0x48(%rsp)
  call   <fabs@plt>
  pxor   %xmm4,%xmm4
  movsd  0x48(%rsp),%xmm6
  movsd  0x50(%rsp),%xmm7
  cvtsi2sd %eax,%xmm4
  lea    0x2(%r13),%eax
  mov    0x68(%rsp),%esi
  pxor   %xmm3,%xmm3
  cmp    $0x1,%eax
  mov    0x58(%rsp),%rdi
  mov    0x70(%rsp),%r10
  addsd  D11(%rip),%xmm4
  movsd  0x60(%rsp),%xmm5
  mov    0x78(%rsp),%r9
  jle    L256
  mov    %r13d,%eax
  mov    %rbp,0x48(%rsp)
  lea    0x8(%rbp),%r8
  lea    0x10(%rbp,%rax,8),%r11
  mov    0x10(%rsp),%rbp
  nopl   0x0(%rax)
L366:
  mov    %r8,%rax
  mov    %rbp,%rdx
  movapd %xmm3,%xmm1
  mov    %r8,%rcx
  nopl   (%rax)
L230:
  movsd  (%rdx),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0x8,%rdx
  add    %rbx,%rcx
  addsd  %xmm0,%xmm1
  cmp    %rdx,%r12
  jne    L230
  mulsd  %xmm7,%xmm1
  mov    %rbp,%rdx
  nop
L357:
  movsd  (%rdx),%xmm2
  movsd  (%rax),%xmm0
  add    $0x8,%rdx
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    %rbx,%rax
  cmp    %rdx,%r12
  jne    L357
  add    $0x8,%r8
  cmp    %r8,%r11
  jne    L366
  mov    0x48(%rsp),%rbp
L256:
  mov    0x10(%rsp),%rcx
  lea    -0x1(%rsi),%eax
  mov    %rax,%rsi
  lea    0x10(%rcx,%rax,8),%rdx
  mov    %rbp,%rax
  nopl   0x0(%rax)
L31:
  movsd  (%rdi),%xmm0
  add    %rbx,%rax
  add    $0x8,%rdi
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,(%rax)
  cmp    %rdi,%rdx
  jne    L31
  jmp    L397
L197:
  movq   %xmm2,%rax
  movapd %xmm5,%xmm2
  movq   %rax,%xmm5
  jmp    L115
L72:
  movq   %xmm2,%rax
  movapd %xmm6,%xmm2
  movq   %rax,%xmm6
  jmp    L32
L59:
  mov    0x28(%rsp),%rbx
  mov    0x38(%rsp),%rbp
  mov    %r15d,%edx
  mov    %rbp,%rsi
  mov    %rbx,%rdi
  call   <ldvmat@plt>
  mov    0x34(%rsp),%r14d
  mov    %r15d,%edx
  mov    %rbx,%rdi
  mov    %r14d,%esi
  call   <atou1@plt>
  mov    0x18(%rsp),%rsi
  mov    %r15d,%r9d
  mov    %rbp,%r8
  mov    0x20(%rsp),%rdi
  mov    %r14d,%ecx
  mov    %rbx,%rdx
  call   <qrbdu1@plt>
  jmp    L271
L248:
  mov    $0xffffffff,%eax
  jmp    L238
L49:
  movapd %xmm1,%xmm0
  mov    %r9,0x68(%rsp)
  mov    %r10,0x60(%rsp)
  mov    %esi,0x58(%rsp)
  mov    %rdi,0x50(%rsp)
  movsd  %xmm1,0x48(%rsp)
  call   <sqrt@plt>
  mov    0x68(%rsp),%r9
  mov    0x60(%rsp),%r10
  pxor   %xmm3,%xmm3
  mov    0x58(%rsp),%esi
  mov    0x50(%rsp),%rdi
  movapd %xmm0,%xmm2
  movsd  0x48(%rsp),%xmm1
  jmp    L241
L93:
  movapd %xmm1,%xmm0
  mov    %r9,0x60(%rsp)
  mov    %r10,0x58(%rsp)
  mov    %esi,0x50(%rsp)
  movsd  %xmm1,0x48(%rsp)
  call   <sqrt@plt>
  mov    0x60(%rsp),%r9
  mov    0x58(%rsp),%r10
  pxor   %xmm3,%xmm3
  mov    0x50(%rsp),%esi
  movsd  0x48(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L344
```

tool_calls: name: unpack_data
arguments: label: D41
datatype: f32[4]
name: unpack_data
arguments: label: D11
datatype: f64

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

tool: D11: 1

assistant: ```c
int svdu1v(double *d, double *a, int m, double *v, int n) {
  double *p, *p1, *q, *pp, *w, *e;
  double s, h, r, t, sv;
  int i, j, k, mm, nm, ms;
  if (m < n)
    return -1;
  w = (double *)calloc(m + n, sizeof(double));
  e = w + m;
  for (i = 0, mm = m, nm = n - 1, p = a; i < n; ++i, --mm, --nm, p += n + 1) {
    if (mm > 1) {
      sv = h = 0.;
      for (j = 0, q = p, s = 0.; j < mm; ++j, q += n) {
        w[j] = *q;
        s += *q * *q;
      }
      if (s > 0.) {
        h = sqrt(s);
        if (*p < 0.)
          h = -h;
        s += *p * h;
        s = 1. / s;
        t = 1. / (w[0] += h);
        sv = 1. + fabs(*p / h);
        for (k = 1, ms = n - i; k < ms; ++k) {
          for (j = 0, q = p + k, r = 0.; j < mm; q += n)
            r += w[j++] * *q;
          r *= s;
          for (j = 0, q = p + k; j < mm; q += n)
            *q -= r * w[j++];
        }
        for (j = 1, q = p; j < mm;)
          *(q += n) = t * w[j++];
      }
      *p = sv;
      d[i] = -h;
    }
    if (mm == 1)
      d[i] = *p;
    p1 = p + 1;
    sv = h = 0.;
    if (nm > 1) {
      for (j = 0, q = p1, s = 0.; j < nm; ++j, ++q)
        s += *q * *q;
      if (s > 0.) {
        h = sqrt(s);
        if (*p1 < 0.)
          h = -h;
        sv = 1. + fabs(*p1 / h);
        s += *p1 * h;
        s = 1. / s;
        t = 1. / (*p1 += h);
        for (k = n, ms = n * (m - i); k < ms; k += n) {
          for (j = 0, q = p1, pp = p1 + k, r = 0.; j < nm; ++j)
            r += *q++ * *pp++;
          r *= s;
          for (j = 0, q = p1, pp = p1 + k; j < nm; ++j)
            *pp++ -= r * *q++;
        }
        for (j = 1, q = p1 + 1; j < nm; ++j)
          *q++ *= t;
      }
      *p1 = sv;
      e[i] = -h;
    }
    if (nm == 1)
      e[i] = *p1;
  }
  ldvmat(a, v, n);
  atou1(a, m, n);
  qrbdu1(d, e, a, m, v, n);
  for (i = 0; i < n; ++i) {
    if (d[i] < 0.) {
      d[i] = -d[i];
      for (j = 0, p = v + i; j < n; ++j, p += n)
        *p = -*p;
    }
  }
  free(w);
  return 0;
}
```