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

```asm
<svdval>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x68,%rsp
  cmp    %ecx,%edx
  mov    %rdi,0x28(%rsp)
  mov    %ecx,0x8(%rsp)
  jl     L501
  mov    %rsi,%r14
  mov    %edx,%edi
  mov    $0x8,%esi
  mov    %edx,%r12d
  call   <calloc@plt>
  mov    0x8(%rsp),%r9d
  mov    %rax,0x18(%rsp)
  lea    -0x1(%r9),%r13d
  mov    %r13d,0x58(%rsp)
  test   %r9d,%r9d
  jle    L344
  mov    %r9d,%r8d
  lea    -0x1(%r12),%eax
  movslq %r9d,%rbx
  mov    %r9d,%r15d
  imul   %r12d,%r8d
  sub    %r9d,%r12d
  mov    %eax,0x10(%rsp)
  shl    $0x3,%rbx
  lea    0x1(%r12),%eax
  lea    0x8(%rbx),%r10
  pxor   %xmm3,%xmm3
  mov    %r14,%rbp
  movq   D46(%rip),%xmm4
  mov    %eax,0x14(%rsp)
  lea    0x8(%r14),%r11
  mov    %r14,0x30(%rsp)
  mov    %r8d,%r9d
  movapd %xmm4,%xmm5
  jmp    L42
  nopl   0x0(%rax)
L266:
  lea    -0x1(%r13),%eax
  lea    0x0(%rbp,%r10,1),%rdi
  mov    %eax,0x8(%rsp)
  cmp    $0x1,%r13d
  jg     L178
L152:
  mov    0x8(%rsp),%r13d
  subl   $0x1,0x10(%rsp)
  mov    %rdi,%rbp
  add    %r10,%r11
  sub    %r15d,%r9d
  cmp    $0xffffffff,%r13d
  je     L367
L42:
  mov    0x14(%rsp),%eax
  add    %r13d,%eax
  cmp    $0x1,%eax
  jle    L266
  mov    0x18(%rsp),%rdi
  mov    0x10(%rsp),%r14d
  mov    %rbp,%rdx
  movapd %xmm3,%xmm1
  lea    0x8(%rdi),%r12
  mov    %rdi,%rax
  lea    (%r12,%r14,8),%rcx
  cmp    $0x1,%r15d
  jne    L123
  cs nopw 0x0(%rax,%rax,1)
L165:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L165
L185:
  comisd %xmm3,%xmm1
  jbe    L266
  ucomisd %xmm1,%xmm3
  ja     L343
  movapd %xmm1,%xmm0
  sqrtsd %xmm0,%xmm0
L143:
  movsd  0x0(%rbp),%xmm2
  movapd %xmm0,%xmm6
  xorpd  %xmm4,%xmm6
  comisd %xmm2,%xmm3
  ja     L212
L181:
  mulsd  %xmm0,%xmm2
  mov    0x18(%rsp),%rax
  movsd  D20(%rip),%xmm7
  addsd  (%rax),%xmm0
  addsd  %xmm1,%xmm2
  movsd  %xmm0,(%rax)
  lea    0x1(%r13),%eax
  divsd  %xmm2,%xmm7
  cmp    $0x1,%eax
  jle    L100
  lea    -0x1(%r13),%eax
  mov    0x18(%rsp),%rcx
  lea    (%r12,%r14,8),%rsi
  mov    %r11,%rdi
  mov    %eax,0x8(%rsp)
  lea    0x10(%rbp,%rax,8),%r8
  cmp    $0x1,%r15d
  jne    L118
  nopl   0x0(%rax)
L296:
  mov    %rdi,%rdx
  mov    %rcx,%rax
  movapd %xmm3,%xmm1
  mov    %rdi,%r12
  nopl   (%rax)
L351:
  movsd  (%r12),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rbx,%r12
  addsd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L351
  mulsd  %xmm7,%xmm1
  mov    %rcx,%rax
  nopl   0x0(%rax)
L85:
  movsd  (%rax),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rbx,%rdx
  cmp    %rsi,%rax
  jne    L85
  add    $0x8,%rdi
  cmp    %r8,%rdi
  jne    L296
L289:
  movsd  %xmm6,0x0(%rbp)
  lea    0x0(%rbp,%r10,1),%rdi
  cmp    $0x1,%r13d
  jle    L152
  nopl   (%rax)
L178:
  mov    %r13d,%ecx
  movapd %xmm3,%xmm1
  shr    %ecx
  lea    -0x1(%rcx),%eax
  shl    $0x4,%rax
  lea    0x18(%rbp,%rax,1),%rdx
  mov    %r11,%rax
  nopl   0x0(%rax,%rax,1)
L378:
  movupd (%rax),%xmm2
  add    $0x10,%rax
  mulpd  %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm1
  cmp    %rdx,%rax
  jne    L378
  mov    %r13d,%r14d
  and    $0xfffffffe,%r14d
  mov    %r14d,%eax
  shl    $0x3,%rax
  mov    %rax,0x20(%rsp)
  lea    (%r11,%rax,1),%r12
  cmp    %r13d,%r14d
  je     L69
  movsd  (%r12),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
L69:
  comisd %xmm3,%xmm1
  ja     L316
  lea    0x0(%rbp,%r10,1),%rdi
  jmp    L152
  nopl   0x0(%rax,%rax,1)
L123:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L123
  jmp    L185
  nopw   0x0(%rax,%rax,1)
L464:
  mulsd  %xmm7,%xmm1
  mov    %rcx,%rax
  nop
L447:
  movsd  (%rax),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rbx,%rdx
  cmp    %rsi,%rax
  jne    L447
  add    $0x8,%rdi
  cmp    %r8,%rdi
  je     L289
L118:
  mov    %rdi,%rdx
  mov    %rcx,%rax
  movapd %xmm3,%xmm1
  mov    %rdi,%r12
  nopw   0x0(%rax,%rax,1)
L430:
  movsd  (%rax),%xmm0
  mulsd  (%r12),%xmm0
  add    $0x8,%rax
  add    %rbx,%r12
  addsd  %xmm0,%xmm1
  cmp    %rsi,%rax
  jne    L430
  jmp    L464
  nopl   0x0(%rax)
L367:
  mov    0x18(%rsp),%rdi
  mov    0x28(%rsp),%rcx
  mov    %r15d,%r9d
  xor    %edx,%edx
  mov    0x30(%rsp),%r14
  mov    0x58(%rsp),%esi
  mov    %rdi,%rax
  sub    %rdi,%rcx
  xchg   %ax,%ax
L229:
  movsd  (%r14),%xmm0
  movsd  %xmm0,(%rcx,%rax,1)
  cmp    %esi,%edx
  je     L116
  movsd  0x8(%r14),%xmm0
  add    $0x1,%edx
  add    %r10,%r14
  add    $0x8,%rax
  movsd  %xmm0,-0x8(%rax)
  cmp    %edx,%r9d
  jne    L229
L147:
  mov    0x28(%rsp),%rbx
  mov    0x18(%rsp),%rsi
  mov    %r9d,%edx
  mov    %rbx,%rdi
  call   <qrbdi@plt>
  mov    0x58(%rsp),%edx
  mov    %rbx,%rax
  pxor   %xmm3,%xmm3
  movq   D46(%rip),%xmm1
  lea    0x8(%rbx,%rdx,8),%rdx
  nopl   0x0(%rax)
L399:
  movsd  (%rax),%xmm0
  comisd %xmm0,%xmm3
  jbe    L298
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L298:
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L399
L323:
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  xor    %eax,%eax
L35:
  add    $0x68,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L116:
  movq   $0x0,(%rax)
  jmp    L147
  nopl   0x0(%rax)
L316:
  ucomisd %xmm1,%xmm3
  ja     L45
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L24:
  movsd  (%r11),%xmm0
  movapd %xmm2,%xmm6
  xorpd  %xmm5,%xmm6
  comisd %xmm0,%xmm3
  ja     L436
L265:
  movapd %xmm0,%xmm7
  addsd  %xmm2,%xmm0
  lea    0x0(%rbp,%r10,1),%rdi
  mulsd  %xmm2,%xmm7
  movsd  %xmm0,(%r11)
  addsd  %xmm7,%xmm1
  movsd  D20(%rip),%xmm7
  divsd  %xmm1,%xmm7
  cmp    %r9d,%r15d
  jge    L47
  mov    0x8(%rsp),%eax
  mov    %ecx,%esi
  mov    %r10,0x38(%rsp)
  mov    %rdi,%rdx
  mov    %r11,0x40(%rsp)
  shl    $0x4,%rsi
  mov    0x20(%rsp),%r11
  mov    %r15d,%r8d
  mov    %rdi,0x20(%rsp)
  mov    %r10,%rdi
  mov    %rax,%r10
  nopw   0x0(%rax,%rax,1)
L115:
  xor    %eax,%eax
  movapd %xmm3,%xmm0
  xchg   %ax,%ax
L402:
  movupd (%rdx,%rax,1),%xmm2
  movupd 0x8(%rbp,%rax,1),%xmm1
  add    $0x10,%rax
  mulpd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rax,%rsi
  jne    L402
  lea    (%rdx,%r11,1),%rcx
  cmp    %r13d,%r14d
  je     L146
  movsd  (%rcx),%xmm1
  mulsd  (%r12),%xmm1
  addsd  %xmm1,%xmm0
L146:
  mulsd  %xmm7,%xmm0
  cmp    $0x10,%rdi
  je     L379
  movapd %xmm0,%xmm8
  xor    %eax,%eax
  unpcklpd %xmm8,%xmm8
  nopl   0x0(%rax)
L405:
  movupd 0x8(%rbp,%rax,1),%xmm2
  movupd (%rdx,%rax,1),%xmm1
  mulpd  %xmm8,%xmm2
  subpd  %xmm2,%xmm1
  movups %xmm1,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rsi
  jne    L405
  cmp    %r13d,%r14d
  je     L483
  mulsd  (%r12),%xmm0
  movsd  (%rcx),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx)
L483:
  add    %r15d,%r8d
  add    %rbx,%rdx
  add    %rbx,%rdi
  cmp    %r9d,%r8d
  jl     L115
  mov    0x38(%rsp),%r10
  mov    0x40(%rsp),%r11
  mov    0x20(%rsp),%rdi
L47:
  movsd  %xmm6,(%r11)
  jmp    L152
  nopl   0x0(%rax,%rax,1)
L379:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L70:
  movsd  0x8(%rbp,%rax,8),%xmm2
  movsd  (%rdx,%rax,8),%xmm1
  mov    %rax,%rcx
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%r10
  jne    L70
  jmp    L483
L436:
  movq   %xmm2,%rax
  movapd %xmm6,%xmm2
  movq   %rax,%xmm6
  jmp    L265
L212:
  movq   %xmm0,%rax
  movapd %xmm6,%xmm0
  movq   %rax,%xmm6
  jmp    L181
L344:
  mov    0x28(%rsp),%rdi
  mov    %rax,%rsi
  mov    %r9d,%edx
  call   <qrbdi@plt>
  jmp    L323
L100:
  lea    -0x1(%r13),%eax
  mov    %eax,0x8(%rsp)
  jmp    L289
L501:
  mov    $0xffffffff,%eax
  jmp    L35
L45:
  movapd %xmm1,%xmm0
  mov    %r9d,0x5c(%rsp)
  mov    %r11,0x50(%rsp)
  mov    %r10,0x48(%rsp)
  mov    %ecx,0x40(%rsp)
  movsd  %xmm1,0x38(%rsp)
  call   <sqrt@plt>
  mov    0x5c(%rsp),%r9d
  mov    0x50(%rsp),%r11
  pxor   %xmm3,%xmm3
  movq   D46(%rip),%xmm5
  mov    0x48(%rsp),%r10
  movapd %xmm0,%xmm2
  mov    0x40(%rsp),%ecx
  movsd  0x38(%rsp),%xmm1
  movapd %xmm5,%xmm4
  jmp    L24
L343:
  movapd %xmm1,%xmm0
  mov    %r9d,0x40(%rsp)
  mov    %r11,0x38(%rsp)
  mov    %r10,0x20(%rsp)
  movsd  %xmm1,0x8(%rsp)
  call   <sqrt@plt>
  mov    0x40(%rsp),%r9d
  mov    0x38(%rsp),%r11
  pxor   %xmm3,%xmm3
  movq   D46(%rip),%xmm5
  mov    0x20(%rsp),%r10
  movsd  0x8(%rsp),%xmm1
  movapd %xmm5,%xmm4
  jmp    L143
```

tool_calls: name: read_data
arguments: data_tag: D46
type_infered: f32[2]
name: read_data
arguments: data_tag: D20
type_infered: f64

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

tool: D20: 1

assistant: ```c
int svdval(double *d, double *a, int m, int n) {
  double *p, *p1, *q, *w, *v;
  double s, h, u;
  int i, j, k, mm, nm, ms;
  if (m < n)
    return -1;
  w = (double *)calloc(m, sizeof(double));
  for (i = 0, mm = m, nm = n - 1, p = a; i < n; ++i, --mm, --nm, p += n + 1) {
    if (mm > 1) {
      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;
        w[0] += h;
        for (k = 1, ms = n - i; k < ms; ++k) {
          for (j = 0, q = p + k, u = 0.; j < mm; q += n)
            u += w[j++] * *q;
          u *= s;
          for (j = 0, q = p + k; j < mm; q += n)
            *q -= u * w[j++];
        }
        *p = -h;
      }
    }
    p1 = p + 1;
    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;
        s += *p1 * h;
        s = 1. / s;
        *p1 += h;
        for (k = n, ms = n * (m - i); k < ms; k += n) {
          for (j = 0, q = p1, v = p1 + k, u = 0.; j < nm; ++j)
            u += *q++ * *v++;
          u *= s;
          for (j = 0, q = p1, v = p1 + k; j < nm; ++j)
            *v++ -= u * *q++;
        }
        *p1 = -h;
      }
    }
  }
  for (j = 0, p = a; j < n; ++j, p += n + 1) {
    d[j] = *p;
    if (j != n - 1)
      w[j] = *(p + 1);
    else
      w[j] = 0.;
  }
  qrbdi(d, w, n);
  for (i = 0; i < n; ++i)
    if (d[i] < 0.)
      d[i] = -d[i];
  free(w);
  return 0;
}
```