user: 请显示与下面列出的汇编代码相匹配的C语言实现：

```asm
<svduv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,(%rsp)
  mov    %rsi,0x30(%rsp)
  mov    %rdx,0x38(%rsp)
  mov    %ecx,0x50(%rsp)
  cmp    %r9d,%ecx
  jl     L191
  lea    (%rcx,%r9,1),%edi
  mov    %rsi,%rbp
  mov    $0x8,%esi
  mov    %ecx,%ebx
  mov    %r9d,%r15d
  mov    %r8,%r14
  call   <calloc@plt>
  mov    %rax,%r11
  movslq %ebx,%rax
  mov    %rax,%rdi
  lea    (%r11,%rax,8),%rax
  mov    %rax,0x20(%rsp)
  lea    -0x1(%r15),%eax
  mov    %eax,0x54(%rsp)
  mov    %eax,%r13d
  test   %r15d,%r15d
  jle    L576
  movslq %r15d,%rax
  lea    -0x1(%rdi),%r12d
  mov    %r14,0x40(%rsp)
  xor    %r10d,%r10d
  imul   %r15d,%edi
  lea    0x0(,%rax,8),%rbx
  shl    $0x4,%rax
  lea    0x8(%rbx),%rcx
  mov    %rax,0x48(%rsp)
  pxor   %xmm3,%xmm3
  mov    %rcx,0x18(%rsp)
  lea    0x0(%rbp,%rbx,1),%rcx
  mov    %rcx,0x10(%rsp)
  mov    %edi,0x8(%rsp)
  xchg   %ax,%ax
L569:
  lea    0x1(%r12),%eax
  cmp    $0x1,%eax
  jg     L399
  lea    -0x1(%r12),%r8d
  jne    L121
  movsd  0x0(%rbp),%xmm0
  mov    (%rsp),%rax
  movsd  %xmm0,(%rax,%r10,1)
L121:
  cmp    $0x1,%r13d
  jg     L413
  lea    -0x1(%r13),%edx
  je     L582
L562:
  mov    0x18(%rsp),%rdi
  sub    %r15d,0x8(%rsp)
  mov    %edx,%r13d
  mov    %r8d,%r12d
  add    %rdi,0x10(%rsp)
  add    $0x8,%r10
  add    %rdi,%rbp
  cmp    $0xffffffff,%edx
  jne    L569
  mov    0x40(%rsp),%r14
  mov    0x30(%rsp),%r12
  mov    %r15d,%edx
  mov    %r11,0x8(%rsp)
  mov    %r14,%rsi
  mov    %r12,%rdi
  call   <ldvmat@plt>
  mov    0x50(%rsp),%r13d
  mov    %r15d,%ecx
  mov    %r12,%rdi
  mov    0x38(%rsp),%rbp
  mov    %r13d,%edx
  mov    %rbp,%rsi
  call   <ldumat@plt>
  mov    0x20(%rsp),%rsi
  mov    %r15d,%r9d
  mov    %r14,%r8
  mov    (%rsp),%rdi
  mov    %r13d,%ecx
  mov    %rbp,%rdx
  call   <qrbdv@plt>
  cmp    $0x1,%r15d
  mov    0x8(%rsp),%r11
  pxor   %xmm3,%xmm3
  jne    L556
  mov    (%rsp),%rax
  movsd  (%rax),%xmm0
  comisd %xmm0,%xmm3
  jbe    L628
  movq   D83(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  (%r14),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%r14)
L628:
  mov    %r11,%rdi
  call   <free@plt>
  xor    %eax,%eax
L311:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  cs nopw 0x0(%rax,%rax,1)
L413:
  mov    %r13d,%esi
  lea    0x8(%rbp),%rax
  movapd %xmm3,%xmm1
  shr    %esi
  mov    %rax,%r12
  lea    -0x1(%rsi),%edx
  shl    $0x4,%rdx
  lea    0x18(%rbp,%rdx,1),%rdx
  nopl   0x0(%rax)
L97:
  movupd (%rax),%xmm0
  add    $0x10,%rax
  mulpd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%rdx
  jne    L97
  mov    %r13d,%r14d
  and    $0xfffffffe,%r14d
  mov    %r14d,%r9d
  lea    0x0(,%r9,8),%rax
  mov    %rax,0x28(%rsp)
  add    %rax,%r12
  cmp    %r13d,%r14d
  je     L548
  movsd  (%r12),%xmm0
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
L548:
  comisd %xmm3,%xmm1
  ja     L163
  movsd  D83(%rip),%xmm6
  movapd %xmm3,%xmm5
  lea    -0x1(%r13),%edx
L24:
  mov    0x20(%rsp),%rax
  movsd  %xmm5,0x8(%rbp)
  movsd  %xmm6,(%rax,%r10,1)
  jmp    L562
  nopl   0x0(%rax)
L399:
  lea    0x8(%r11),%r14
  mov    %r12d,%edi
  mov    %r11,%rax
  mov    %rbp,%rdx
  lea    (%r14,%rdi,8),%rcx
  movapd %xmm3,%xmm1
  cmp    $0x1,%r15d
  jne    L26
  nopl   0x0(%rax,%rax,1)
L285:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L285
L401:
  comisd %xmm3,%xmm1
  ja     L648
  mov    D83(%rip),%rax
  movapd %xmm3,%xmm5
  lea    -0x1(%r12),%r8d
  movq   %rax,%xmm7
L660:
  mov    (%rsp),%rax
  movsd  %xmm5,0x0(%rbp)
  movsd  %xmm7,(%rax,%r10,1)
  jmp    L121
L26:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rcx,%rax
  jne    L26
  jmp    L401
  nop
L582:
  movsd  0x8(%rbp),%xmm0
  mov    0x18(%rsp),%rdi
  mov    %r8d,%r12d
  xor    %r13d,%r13d
  mov    0x20(%rsp),%rax
  add    %rdi,0x10(%rsp)
  sub    %r15d,0x8(%rsp)
  add    %rdi,%rbp
  movsd  %xmm0,(%rax,%r10,1)
  add    $0x8,%r10
  jmp    L569
  nopl   0x0(%rax)
L163:
  ucomisd %xmm1,%xmm3
  ja     L339
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L122:
  movsd  0x8(%rbp),%xmm0
  movapd %xmm2,%xmm6
  xorpd  D83(%rip),%xmm6
  comisd %xmm0,%xmm3
  ja     L68
L249:
  divsd  %xmm2,%xmm0
  mov    %r10,0x88(%rsp)
  mov    %r11,0x80(%rsp)
  mov    %r8d,0x78(%rsp)
  mov    %esi,0x70(%rsp)
  movsd  %xmm6,0x68(%rsp)
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm2,0x58(%rsp)
  call   <fabs@plt>
  movsd  0x8(%rbp),%xmm0
  movsd  0x58(%rsp),%xmm2
  pxor   %xmm5,%xmm5
  movsd  0x60(%rsp),%xmm1
  cvtsi2sd %eax,%xmm5
  cmp    0x8(%rsp),%r15d
  pxor   %xmm3,%xmm3
  movapd %xmm0,%xmm7
  movsd  D99(%rip),%xmm4
  addsd  %xmm2,%xmm0
  mov    0x70(%rsp),%esi
  mulsd  %xmm2,%xmm7
  movsd  0x68(%rsp),%xmm6
  mov    0x78(%rsp),%r8d
  mov    0x80(%rsp),%r11
  mov    0x88(%rsp),%r10
  addsd  %xmm4,%xmm5
  movsd  %xmm0,0x8(%rbp)
  addsd  %xmm7,%xmm1
  movapd %xmm4,%xmm7
  divsd  %xmm0,%xmm4
  divsd  %xmm1,%xmm7
  jge    L25
  mov    0x10(%rsp),%rax
  mov    %r8d,0x60(%rsp)
  shl    $0x4,%rsi
  mov    %r15d,%edi
  mov    0x18(%rsp),%r9
  mov    0x8(%rsp),%r8d
  mov    %r11,0x58(%rsp)
  lea    0x8(%rax),%rdx
  movslq %r13d,%rax
  mov    0x28(%rsp),%r11
  mov    %r10,0x28(%rsp)
  mov    %rax,%r10
  nopl   0x0(%rax)
L281:
  xor    %eax,%eax
  movapd %xmm3,%xmm0
  xchg   %ax,%ax
L34:
  movupd 0x8(%rbp,%rax,1),%xmm2
  movupd (%rdx,%rax,1),%xmm1
  add    $0x10,%rax
  mulpd  %xmm1,%xmm2
  addsd  %xmm2,%xmm0
  unpckhpd %xmm2,%xmm2
  addsd  %xmm2,%xmm0
  cmp    %rsi,%rax
  jne    L34
  lea    (%rdx,%r11,1),%rcx
  cmp    %r13d,%r14d
  je     L587
  movsd  (%r12),%xmm1
  mulsd  (%rcx),%xmm1
  addsd  %xmm1,%xmm0
L587:
  mulsd  %xmm7,%xmm0
  cmp    $0x10,%r9
  je     L321
  movapd %xmm0,%xmm8
  xor    %eax,%eax
  unpcklpd %xmm8,%xmm8
  nopl   (%rax)
L425:
  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    %rsi,%rax
  jne    L425
  cmp    %r13d,%r14d
  je     L384
  mulsd  (%r12),%xmm0
  movsd  (%rcx),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx)
L384:
  add    %r15d,%edi
  add    %rbx,%rdx
  add    %rbx,%r9
  cmp    %r8d,%edi
  jl     L281
  mov    0x58(%rsp),%r11
  mov    0x28(%rsp),%r10
  mov    0x60(%rsp),%r8d
L25:
  lea    0x10(%rbp),%rax
  lea    -0x1(%r13),%edx
  mov    %rax,%rcx
  cmp    $0x2,%r13d
  je     L643
  mov    %edx,%esi
  movapd %xmm4,%xmm1
  shr    %esi
  unpcklpd %xmm1,%xmm1
  sub    $0x1,%esi
  shl    $0x4,%rsi
  lea    0x20(%rbp,%rsi,1),%rsi
  nopw   0x0(%rax,%rax,1)
L58:
  movupd (%rax),%xmm0
  add    $0x10,%rax
  mulpd  %xmm1,%xmm0
  movups %xmm0,-0x10(%rax)
  cmp    %rax,%rsi
  jne    L58
  mov    %edx,%eax
  and    $0xfffffffe,%eax
  mov    %eax,%esi
  lea    (%rcx,%rsi,8),%rcx
  cmp    %edx,%eax
  je     L24
L643:
  mulsd  (%rcx),%xmm4
  movsd  %xmm4,(%rcx)
  jmp    L24
  nopl   (%rax)
L321:
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L590:
  movsd  0x8(%rbp,%rax,8),%xmm2
  movsd  (%rdx,%rax,8),%xmm1
  mulsd  %xmm0,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %r10,%rax
  jne    L590
  jmp    L384
  cs nopw 0x0(%rax,%rax,1)
L648:
  ucomisd %xmm1,%xmm3
  ja     L42
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L234:
  movsd  0x0(%rbp),%xmm0
  movapd %xmm2,%xmm7
  xorpd  D83(%rip),%xmm7
  comisd %xmm0,%xmm3
  ja     L559
L699:
  mulsd  %xmm2,%xmm0
  movsd  D99(%rip),%xmm6
  mov    %r10,0x78(%rsp)
  movsd  D99(%rip),%xmm4
  mov    %rdi,0x70(%rsp)
  mov    %r11,0x58(%rsp)
  movsd  %xmm7,0x68(%rsp)
  addsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm6
  movsd  (%r11),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%r11)
  divsd  %xmm0,%xmm4
  movsd  0x0(%rbp),%xmm0
  movsd  %xmm6,0x60(%rsp)
  divsd  %xmm2,%xmm0
  movsd  %xmm4,0x28(%rsp)
  call   <fabs@plt>
  pxor   %xmm5,%xmm5
  mov    0x58(%rsp),%r11
  movsd  0x28(%rsp),%xmm4
  cvtsi2sd %eax,%xmm5
  lea    0x1(%r13),%eax
  movsd  0x60(%rsp),%xmm6
  movsd  0x68(%rsp),%xmm7
  cmp    $0x1,%eax
  mov    0x70(%rsp),%rdi
  mov    0x78(%rsp),%r10
  pxor   %xmm3,%xmm3
  addsd  D99(%rip),%xmm5
  jle    L589
  lea    -0x1(%r13),%eax
  lea    0x8(%rbp),%r8
  lea    0x10(%rbp,%rax,8),%r9
  lea    (%r14,%rdi,8),%rsi
  cmp    $0x1,%r15d
  jne    L307
  nopw   0x0(%rax,%rax,1)
L326:
  mov    %r8,%rdx
  mov    %r11,%rax
  movapd %xmm3,%xmm1
  mov    %r8,%rcx
  nopl   (%rax)
L254:
  movsd  (%rcx),%xmm0
  mulsd  (%rax),%xmm0
  add    $0x8,%rax
  add    %rbx,%rcx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L254
  mulsd  %xmm6,%xmm1
  mov    %r11,%rax
  nop
L423:
  movsd  (%rax),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rbx,%rdx
  cmp    %rax,%rsi
  jne    L423
  add    $0x8,%r8
  cmp    %r9,%r8
  jne    L326
L102:
  sub    $0x1,%rdi
  mov    %rbx,%rax
  lea    -0x1(%r12),%r8d
  xor    %edx,%edx
  imul   %rdi,%rax
  test   %rbx,%rbx
  lea    0xf(%r11,%rdi,8),%rcx
  cmovs  %rax,%rdx
  add    %rbx,%rdx
  add    %rbp,%rdx
  cmp    %rdx,%rcx
  mov    $0x7,%ecx
  setb   %dl
  add    $0x7,%rax
  test   %rbx,%rbx
  cmovs  %rcx,%rax
  add    %rbx,%rax
  add    %rbp,%rax
  cmp    %r14,%rax
  setb   %al
  or     %dl,%al
  je     L463
  cmp    $0x8,%r8d
  jbe    L463
  mov    %r12d,%eax
  movapd %xmm4,%xmm1
  mov    0x48(%rsp),%rcx
  shr    %eax
  unpcklpd %xmm1,%xmm1
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x18(%r11,%rax,1),%rdx
  mov    0x10(%rsp),%rax
  nopl   0x0(%rax)
L192:
  movupd (%r14),%xmm0
  add    $0x10,%r14
  mulpd  %xmm1,%xmm0
  movlpd %xmm0,(%rax)
  movhpd %xmm0,(%rax,%rbx,1)
  add    %rcx,%rax
  cmp    %rdx,%r14
  jne    L192
L279:
  mov    %r12d,%eax
  or     $0x1,%eax
  and    $0x1,%r12d
  je     L660
  mov    %eax,%edx
  cltq
  mulsd  (%r11,%rax,8),%xmm4
  imul   %rbx,%rdx
  movsd  %xmm4,0x0(%rbp,%rdx,1)
  jmp    L660
  nop
L485:
  mulsd  %xmm6,%xmm1
  mov    %r11,%rax
  nopw   0x0(%rax,%rax,1)
L9:
  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    L9
  add    $0x8,%r8
  cmp    %r9,%r8
  je     L361
L307:
  mov    %r8,%rdx
  mov    %r11,%rax
  movapd %xmm3,%xmm1
  mov    %r8,%rcx
  cs nopw 0x0(%rax,%rax,1)
L214:
  movsd  (%rax),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rcx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rsi
  jne    L214
  jmp    L485
L559:
  movq   %xmm2,%rax
  movapd %xmm7,%xmm2
  movq   %rax,%xmm7
  jmp    L699
L68:
  movq   %xmm2,%rax
  movapd %xmm6,%xmm2
  movq   %rax,%xmm6
  jmp    L249
L589:
  cmp    $0x1,%r15d
  je     L102
L361:
  sub    $0x1,%rdi
  mov    %rbx,%rax
  lea    -0x1(%r12),%r8d
  xor    %edx,%edx
  imul   %rdi,%rax
  test   %rbx,%rbx
  lea    0xf(%r11,%rdi,8),%rcx
  cmovs  %rax,%rdx
  add    %rbx,%rdx
  add    %rbp,%rdx
  cmp    %rdx,%rcx
  mov    $0x7,%ecx
  setb   %dl
  add    $0x7,%rax
  test   %rbx,%rbx
  cmovs  %rcx,%rax
  add    %rbx,%rax
  add    %rbp,%rax
  cmp    %r14,%rax
  setb   %al
  or     %dl,%al
  je     L365
  cmp    $0x8,%r8d
  jbe    L365
  mov    %r12d,%eax
  movapd %xmm4,%xmm1
  mov    0x48(%rsp),%rcx
  shr    %eax
  unpcklpd %xmm1,%xmm1
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x18(%r11,%rax,1),%rdx
  mov    0x10(%rsp),%rax
  nopl   (%rax)
L143:
  movupd (%r14),%xmm0
  add    $0x10,%r14
  mulpd  %xmm1,%xmm0
  movlpd %xmm0,(%rax)
  movhpd %xmm0,(%rax,%rbx,1)
  add    %rcx,%rax
  cmp    %r14,%rdx
  jne    L143
  jmp    L279
L556:
  mov    (%rsp),%rcx
  mov    0x54(%rsp),%eax
  movq   D83(%rip),%xmm1
  lea    0x8(%rcx,%rax,8),%rsi
  jmp    L630
  nopw   0x0(%rax,%rax,1)
L222:
  add    $0x8,%rcx
  add    $0x8,%r14
  cmp    %rsi,%rcx
  je     L628
L630:
  movsd  (%rcx),%xmm0
  comisd %xmm0,%xmm3
  jbe    L222
  xorpd  %xmm1,%xmm0
  mov    %r14,%rax
  xor    %edx,%edx
  movsd  %xmm0,(%rcx)
L639:
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %rbx,%rax
  cmp    %edx,%r15d
  jne    L639
  jmp    L222
L576:
  mov    0x30(%rsp),%r13
  mov    %r15d,%edx
  mov    %r14,%rsi
  mov    %r11,0x8(%rsp)
  mov    %r13,%rdi
  call   <ldvmat@plt>
  mov    0x50(%rsp),%ebp
  mov    %r15d,%ecx
  mov    %r13,%rdi
  mov    0x38(%rsp),%rbx
  mov    %ebp,%edx
  mov    %rbx,%rsi
  call   <ldumat@plt>
  mov    0x20(%rsp),%rsi
  mov    (%rsp),%rdi
  mov    %ebp,%ecx
  mov    %r15d,%r9d
  mov    %r14,%r8
  mov    %rbx,%rdx
  call   <qrbdv@plt>
  mov    0x8(%rsp),%r11
  jmp    L628
L463:
  mov    %r8d,%eax
  lea    0x10(%r11,%rax,8),%rdx
  mov    %rbp,%rax
  nopl   0x0(%rax,%rax,1)
L551:
  movsd  (%r14),%xmm0
  add    %rbx,%rax
  add    $0x8,%r14
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,(%rax)
  cmp    %r14,%rdx
  jne    L551
  jmp    L660
L365:
  mov    %r8d,%eax
  lea    0x10(%r11,%rax,8),%rdx
  mov    %rbp,%rax
L490:
  movsd  (%r14),%xmm0
  add    %rbx,%rax
  add    $0x8,%r14
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,(%rax)
  cmp    %rdx,%r14
  jne    L490
  jmp    L660
L191:
  mov    $0xffffffff,%eax
  jmp    L311
L42:
  movapd %xmm1,%xmm0
  mov    %r10,0x68(%rsp)
  mov    %r11,0x60(%rsp)
  mov    %rdi,0x58(%rsp)
  movsd  %xmm1,0x28(%rsp)
  call   <sqrt@plt>
  mov    0x68(%rsp),%r10
  mov    0x60(%rsp),%r11
  pxor   %xmm3,%xmm3
  mov    0x58(%rsp),%rdi
  movsd  0x28(%rsp),%xmm1
  movapd %xmm0,%xmm2
  jmp    L234
L339:
  movapd %xmm1,%xmm0
  mov    %r10,0x78(%rsp)
  mov    %r11,0x70(%rsp)
  mov    %r8d,0x68(%rsp)
  mov    %esi,0x60(%rsp)
  movsd  %xmm1,0x58(%rsp)
  call   <sqrt@plt>
  mov    0x78(%rsp),%r10
  mov    0x70(%rsp),%r11
  pxor   %xmm3,%xmm3
  mov    0x68(%rsp),%r8d
  mov    0x60(%rsp),%esi
  movapd %xmm0,%xmm2
  movsd  0x58(%rsp),%xmm1
  jmp    L122
```

tool_calls: name: disassemble_data
arguments: data_tag: D83
type_guessed: f32[4]
name: disassemble_data
arguments: data_tag: D99
type_guessed: f64

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

tool: D99: 1

assistant: ```c
int svduv(double *d, double *a, double *u, 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);
  ldumat(a, u, m, n);
  qrbdv(d, e, u, 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;
}
```