user: 下面的汇编指令对应的C源代码是什么:

```asm
<sv2uv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %ecx,%ebx
  sub    $0x98,%rsp
  mov    %rdi,0x18(%rsp)
  mov    %rsi,0x28(%rsp)
  mov    %rdx,0x30(%rsp)
  mov    %ecx,0x80(%rsp)
  mov    %r8,0x38(%rsp)
  cmp    %r9d,%ecx
  jl     L303
  mov    %rdi,%r14
  mov    %rsi,%rbp
  lea    (%rcx,%r9,1),%edi
  mov    $0x8,%esi
  mov    %r9d,%r15d
  call   <calloc@plt>
  mov    %rax,%r13
  movslq %ebx,%rax
  mov    %rax,%rcx
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  add    %r13,%rax
  mov    %rax,0x20(%rsp)
  test   %r15d,%r15d
  jle    L10
  movslq %r15d,%rbx
  mov    %r14,0x8(%rsp)
  mov    %r14,%r10
  mov    %r13,%rdi
  shl    $0x3,%rbx
  lea    -0x1(%rcx),%r12d
  pxor   %xmm3,%xmm3
  mov    %rbp,%r14
  lea    0x8(%rbx),%r8
  movq   D107(%rip),%xmm5
  mov    %r15d,%r9d
  mov    %r15d,%r13d
  mov    %r8,0x10(%rsp)
  jmp    L88
  nopl   0x0(%rax,%rax,1)
L239:
  lea    -0x1(%r12),%r12d
  jne    L645
  movsd  (%r14),%xmm0
  movsd  %xmm0,(%r10)
L645:
  add    %r8,%r14
  add    $0x8,%r10
  sub    $0x1,%r13d
  je     L450
L88:
  lea    0x1(%r12),%eax
  cmp    $0x1,%eax
  jle    L239
  mov    %r12d,%eax
  lea    0x8(%rdi),%r15
  movapd %xmm3,%xmm1
  mov    %r14,%rdx
  lea    (%r15,%rax,8),%rbp
  mov    %rdi,%rax
  nopl   (%rax)
L107:
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rdx
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rbp,%rax
  jne    L107
  comisd %xmm3,%xmm1
  ja     L623
  mov    D107(%rip),%rax
  movapd %xmm3,%xmm4
  sub    $0x1,%r12d
  movq   %rax,%xmm6
L420:
  movsd  %xmm4,(%r14)
  add    $0x8,%r10
  add    %r8,%r14
  movsd  %xmm6,-0x8(%r10)
  sub    $0x1,%r13d
  jne    L88
L450:
  mov    0x28(%rsp),%rbp
  mov    0x30(%rsp),%rsi
  mov    %r9d,%r15d
  mov    %r9d,%ecx
  mov    0x80(%rsp),%edx
  mov    %rdi,%r13
  mov    0x8(%rsp),%r14
  mov    %rbp,%rdi
  call   <ldumat@plt>
  lea    -0x1(%r15),%eax
  mov    %r15d,%ecx
  mov    %rbp,%rsi
  mov    %rax,0x40(%rsp)
  mov    0x18(%rsp),%r8
  xor    %edx,%edx
  pxor   %xmm3,%xmm3
  lea    0x0(,%rcx,8),%rdi
  nopl   0x0(%rax)
L78:
  xor    %eax,%eax
  jmp    L684
  nopl   0x0(%rax)
L441:
  movq   $0x0,(%rsi,%rax,8)
L268:
  add    $0x1,%rax
  cmp    %rax,%rcx
  je     L185
L684:
  cmp    %eax,%edx
  jg     L441
  jne    L268
  movsd  (%r8,%rdx,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %rax,%rcx
  jne    L684
  nopl   0x0(%rax,%rax,1)
L185:
  add    $0x1,%rdx
  add    %rdi,%rsi
  cmp    %rdx,%rcx
  jne    L78
  mov    %r13,%rax
  mov    %r15d,%r11d
  sub    0x30(%rsp),%rax
  mov    %r14,0x48(%rsp)
  mov    %rax,0x8(%rsp)
  imul   %r15d,%r11d
  mov    0x28(%rsp),%r12
  xor    %edi,%edi
  lea    -0x2(%r15),%r10d
  mov    %r15d,%ebp
  nopl   0x0(%rax,%rax,1)
L167:
  test   %edi,%edi
  je     L546
  cmp    $0x1,%ebp
  jg     L666
L546:
  cmp    $0x1,%ebp
  je     L466
  lea    -0x1(%rbp),%r14d
  cmp    $0x1,%r14d
  jg     L448
L641:
  mov    0x10(%rsp),%rax
  lea    (%r12,%rax,1),%r8
  jne    L41
  movsd  0x8(%r12),%xmm0
  mov    0x20(%rsp),%rax
  mov    %r8,%r12
  sub    %r15d,%r11d
  subq   $0x8,0x8(%rsp)
  mov    $0x1,%ebp
  sub    $0x1,%r10d
  movsd  %xmm0,(%rax,%rdi,8)
  add    $0x1,%rdi
  test   %edi,%edi
  je     L546
  cmp    $0x1,%ebp
  jle    L546
L666:
  mov    %r13,%rcx
  mov    %r12,%rdx
  movapd %xmm3,%xmm1
  xor    %eax,%eax
  xchg   %ax,%ax
L330:
  movsd  (%rdx),%xmm0
  add    $0x1,%eax
  add    %rbx,%rdx
  add    $0x8,%rcx
  movsd  %xmm0,-0x8(%rcx)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %eax,%ebp
  jg     L330
  comisd %xmm3,%xmm1
  movsd  D107(%rip),%xmm4
  movapd %xmm3,%xmm5
  ja     L557
L130:
  mov    0x18(%rsp),%rax
  lea    -0x1(%rbp),%r14d
  movsd  %xmm5,(%r12)
  movsd  %xmm4,(%rax,%rdi,8)
  cmp    $0x1,%r14d
  jle    L641
L448:
  mov    %r10d,%esi
  lea    0x8(%r12),%rax
  movapd %xmm3,%xmm1
  lea    0x10(%r12,%rsi,8),%rdx
  nopl   0x0(%rax)
L567:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L567
  comisd %xmm3,%xmm1
  ja     L200
  mov    D107(%rip),%rax
  movapd %xmm3,%xmm4
  movq   %rax,%xmm5
  mov    0x10(%rsp),%rax
  lea    (%r12,%rax,1),%r8
L681:
  mov    0x20(%rsp),%rax
  movsd  %xmm4,0x8(%r12)
  movsd  %xmm5,(%rax,%rdi,8)
L41:
  subq   $0x8,0x8(%rsp)
  mov    %r14d,%ebp
  mov    %r8,%r12
  add    $0x1,%rdi
  sub    $0x1,%r10d
  sub    %r15d,%r11d
  test   %r14d,%r14d
  jne    L167
  mov    0x38(%rsp),%rbp
  mov    0x28(%rsp),%rdi
  mov    %r15d,%edx
  mov    0x48(%rsp),%r14
  mov    %rbp,%rsi
  call   <ldvmat@plt>
  mov    0x18(%rsp),%r12
  mov    %r15d,%r9d
  mov    %rbp,%r8
  mov    0x80(%rsp),%ecx
  mov    0x20(%rsp),%rsi
  mov    0x30(%rsp),%rdx
  mov    %r12,%rdi
  call   <qrbdv@plt>
  mov    0x40(%rsp),%rdi
  mov    %rbp,%rcx
  pxor   %xmm3,%xmm3
  movq   D107(%rip),%xmm1
  lea    0x8(%r12,%rdi,8),%rsi
  jmp    L572
  nopw   0x0(%rax,%rax,1)
L5:
  add    $0x8,%r14
  add    $0x8,%rcx
  cmp    %r14,%rsi
  je     L213
L572:
  movsd  (%r14),%xmm0
  comisd %xmm0,%xmm3
  jbe    L5
  xorpd  %xmm1,%xmm0
  mov    %rcx,%rax
  xor    %edx,%edx
  movsd  %xmm0,(%r14)
  cs nopw 0x0(%rax,%rax,1)
L632:
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    %rbx,%rax
  cmp    %edx,%r15d
  jne    L632
  add    $0x8,%r14
  add    $0x8,%rcx
  cmp    %r14,%rsi
  jne    L572
  nopl   0x0(%rax)
L213:
  mov    %r13,%rdi
  call   <free@plt>
  xor    %eax,%eax
L433:
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax)
L466:
  mov    0x18(%rsp),%rax
  movsd  (%r12),%xmm0
  xor    %r14d,%r14d
  movsd  %xmm0,(%rax,%rdi,8)
  mov    0x10(%rsp),%rax
  lea    (%r12,%rax,1),%r8
  jmp    L41
L623:
  ucomisd %xmm1,%xmm3
  ja     L122
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L526:
  movsd  (%r14),%xmm0
  movapd %xmm2,%xmm6
  xorpd  %xmm5,%xmm6
  comisd %xmm0,%xmm3
  ja     L336
L68:
  mulsd  %xmm2,%xmm0
  movsd  D148(%rip),%xmm7
  mov    %r9d,0x78(%rsp)
  movsd  D148(%rip),%xmm8
  mov    %r10,0x70(%rsp)
  mov    %r8,0x68(%rsp)
  mov    %rdi,0x48(%rsp)
  movsd  %xmm6,0x60(%rsp)
  addsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm8
  movsd  (%rdi),%xmm0
  addsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdi)
  divsd  %xmm0,%xmm7
  movsd  (%r14),%xmm0
  movsd  %xmm8,0x58(%rsp)
  divsd  %xmm2,%xmm0
  movsd  %xmm7,0x40(%rsp)
  call   <fabs@plt>
  pxor   %xmm4,%xmm4
  cmp    $0x1,%r13d
  movsd  0x40(%rsp),%xmm7
  cvtsi2sd %eax,%xmm4
  mov    0x48(%rsp),%rdi
  addsd  D148(%rip),%xmm4
  pxor   %xmm3,%xmm3
  movsd  0x58(%rsp),%xmm8
  movsd  0x60(%rsp),%xmm6
  movq   D107(%rip),%xmm5
  mov    0x68(%rsp),%r8
  mov    0x70(%rsp),%r10
  mov    0x78(%rsp),%r9d
  je     L621
  lea    -0x2(%r13),%eax
  lea    0x8(%r14),%rsi
  lea    0x10(%r14,%rax,8),%r11
  nopl   0x0(%rax,%rax,1)
L691:
  mov    %rsi,%rdx
  mov    %rdi,%rax
  movapd %xmm3,%xmm1
  mov    %rsi,%rcx
  nopl   (%rax)
L488:
  movsd  (%rax),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0x8,%rax
  add    %rbx,%rcx
  addsd  %xmm0,%xmm1
  cmp    %rbp,%rax
  jne    L488
  mulsd  %xmm8,%xmm1
  mov    %rdi,%rax
L586:
  movsd  (%rax),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x8,%rax
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %rbx,%rdx
  cmp    %rbp,%rax
  jne    L586
  add    $0x8,%rsi
  cmp    %rsi,%r11
  jne    L691
L621:
  lea    -0x1(%r12),%eax
  mov    %rax,%r12
  lea    0x10(%rdi,%rax,8),%rdx
  mov    %r14,%rax
  nopl   0x0(%rax)
L54:
  movsd  (%r15),%xmm0
  add    %rbx,%rax
  add    $0x8,%r15
  mulsd  %xmm7,%xmm0
  movsd  %xmm0,(%rax)
  cmp    %r15,%rdx
  jne    L54
  jmp    L420
L200:
  ucomisd %xmm1,%xmm3
  ja     L180
  movapd %xmm1,%xmm2
  sqrtsd %xmm2,%xmm2
L638:
  movsd  0x8(%r12),%xmm0
  movapd %xmm2,%xmm5
  xorpd  D107(%rip),%xmm5
  comisd %xmm0,%xmm3
  ja     L478
L326:
  divsd  %xmm2,%xmm0
  mov    %rdi,0x88(%rsp)
  mov    %r11d,0x84(%rsp)
  mov    %r10d,0x78(%rsp)
  mov    %rsi,0x68(%rsp)
  movsd  %xmm5,0x70(%rsp)
  movsd  %xmm1,0x60(%rsp)
  movsd  %xmm2,0x58(%rsp)
  call   <fabs@plt>
  movsd  0x8(%r12),%xmm0
  movsd  0x58(%rsp),%xmm2
  pxor   %xmm4,%xmm4
  movsd  0x60(%rsp),%xmm1
  cvtsi2sd %eax,%xmm4
  mov    0x84(%rsp),%r11d
  pxor   %xmm3,%xmm3
  movapd %xmm0,%xmm6
  addsd  %xmm2,%xmm0
  movsd  D148(%rip),%xmm7
  mov    0x10(%rsp),%rax
  mulsd  %xmm2,%xmm6
  cmp    %r15d,%r11d
  mov    0x68(%rsp),%rsi
  addsd  D148(%rip),%xmm4
  movsd  0x70(%rsp),%xmm5
  mov    0x78(%rsp),%r10d
  lea    (%r12,%rax,1),%r8
  mov    0x88(%rsp),%rdi
  movsd  %xmm0,0x8(%r12)
  addsd  %xmm6,%xmm1
  movsd  D148(%rip),%xmm6
  divsd  %xmm0,%xmm6
  divsd  %xmm1,%xmm7
  jle    L365
  mov    %r8,%rcx
  shl    $0x3,%rsi
  mov    %r15d,%r9d
L535:
  movapd %xmm0,%xmm1
  xor    %edx,%edx
  movapd %xmm3,%xmm2
  jmp    L516
  nopl   0x0(%rax)
L17:
  movsd  0x10(%r12,%rdx,1),%xmm1
  add    $0x8,%rdx
L516:
  mulsd  (%rcx,%rdx,1),%xmm1
  addsd  %xmm1,%xmm2
  cmp    %rdx,%rsi
  jne    L17
  mulsd  %xmm7,%xmm2
  xor    %eax,%eax
  jmp    L463
  nopl   0x0(%rax)
L355:
  movsd  0x10(%r12,%rax,1),%xmm0
  add    $0x8,%rax
L463:
  mulsd  %xmm2,%xmm0
  movsd  (%rcx,%rax,1),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rcx,%rax,1)
  cmp    %rax,%rdx
  jne    L355
  add    %r15d,%r9d
  add    %rbx,%rcx
  cmp    %r9d,%r11d
  jle    L365
  movsd  0x8(%r12),%xmm0
  jmp    L535
L365:
  lea    -0x3(%rbp),%edx
  lea    0x10(%r12),%rax
  lea    0x18(%r12,%rdx,8),%rdx
  nopl   0x0(%rax,%rax,1)
L520:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm6,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %rdx,%rax
  jne    L520
  jmp    L681
L478:
  movq   %xmm2,%rax
  movapd %xmm5,%xmm2
  movq   %rax,%xmm5
  jmp    L326
L336:
  movq   %xmm2,%rax
  movapd %xmm6,%xmm2
  movq   %rax,%xmm6
  jmp    L68
L557:
  ucomisd %xmm1,%xmm3
  ja     L36
  movapd %xmm1,%xmm5
  sqrtsd %xmm5,%xmm5
L22:
  movsd  (%r12),%xmm0
  movapd %xmm5,%xmm4
  xorpd  D107(%rip),%xmm4
  comisd %xmm0,%xmm3
  jbe    L33
  movq   %xmm5,%rax
  movapd %xmm4,%xmm5
  movq   %rax,%xmm4
L33:
  mulsd  %xmm5,%xmm0
  movsd  D148(%rip),%xmm2
  mov    %rdi,0x78(%rsp)
  mov    %r11d,0x70(%rsp)
  mov    %r10d,0x68(%rsp)
  movsd  %xmm4,0x60(%rsp)
  addsd  %xmm1,%xmm0
  divsd  %xmm0,%xmm2
  movsd  0x0(%r13),%xmm0
  addsd  %xmm5,%xmm0
  movsd  %xmm0,0x0(%r13)
  movsd  (%r12),%xmm0
  divsd  %xmm5,%xmm0
  movsd  %xmm2,0x58(%rsp)
  call   <fabs@plt>
  pxor   %xmm5,%xmm5
  mov    0x70(%rsp),%r11d
  mov    0x78(%rsp),%rdi
  cvtsi2sd %eax,%xmm5
  mov    0x68(%rsp),%eax
  lea    0x8(%r12),%r8
  movsd  0x60(%rsp),%xmm4
  addsd  D148(%rip),%xmm5
  movsd  0x58(%rsp),%xmm2
  pxor   %xmm3,%xmm3
  mov    %rax,%r10
  lea    0x10(%r12,%rax,8),%r9
  nopw   0x0(%rax,%rax,1)
L419:
  mov    %r8,%rax
  mov    %r13,%rsi
  mov    %r8,%rcx
  xor    %edx,%edx
  movapd %xmm3,%xmm1
  nopw   0x0(%rax,%rax,1)
L339:
  movsd  (%rsi),%xmm0
  mulsd  (%rcx),%xmm0
  add    $0x1,%edx
  add    %rbx,%rcx
  add    $0x8,%rsi
  addsd  %xmm0,%xmm1
  cmp    %edx,%ebp
  jg     L339
  mulsd  %xmm2,%xmm1
  mov    %r13,%rcx
  xor    %edx,%edx
  nopl   0x0(%rax,%rax,1)
L562:
  movsd  (%rcx),%xmm6
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  add    $0x8,%rcx
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm0
  movsd  %xmm0,(%rax)
  add    %rbx,%rax
  cmp    %edx,%ebp
  jg     L562
  add    $0x8,%r8
  cmp    %r8,%r9
  jne    L419
  mov    0x8(%rsp),%r8
  mov    0x80(%rsp),%eax
  xor    %r9d,%r9d
  mov    %r8,%rsi
  neg    %rsi
  test   %eax,%eax
  jle    L130
  mov    %rbx,0x58(%rsp)
  mov    0x80(%rsp),%r14d
  mov    0x50(%rsp),%rbx
  nopw   0x0(%rax,%rax,1)
L405:
  lea    0x0(%r13,%rsi,1),%rax
  mov    %r13,%rdx
  movapd %xmm3,%xmm1
  xor    %ecx,%ecx
  cs nopw 0x0(%rax,%rax,1)
L34:
  movsd  (%rdx),%xmm0
  mulsd  (%rsi,%rdx,1),%xmm0
  add    $0x1,%ecx
  add    $0x8,%rdx
  addsd  %xmm0,%xmm1
  cmp    %ecx,%ebp
  jg     L34
  mulsd  %xmm2,%xmm1
  xor    %edx,%edx
  xchg   %ax,%ax
L485:
  movsd  (%rax,%r8,1),%xmm6
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  add    $0x8,%rax
  mulsd  %xmm1,%xmm6
  subsd  %xmm6,%xmm0
  movsd  %xmm0,-0x8(%rax)
  cmp    %edx,%ebp
  jg     L485
  add    $0x1,%r9d
  sub    %rbx,%r8
  add    %rbx,%rsi
  cmp    %r9d,%r14d
  jne    L405
  mov    0x58(%rsp),%rbx
  jmp    L130
L10:
  mov    0x80(%rsp),%r12d
  mov    0x30(%rsp),%rbp
  mov    %r15d,%ecx
  mov    0x28(%rsp),%r14
  mov    %r12d,%edx
  mov    %rbp,%rsi
  mov    %r14,%rdi
  call   <ldumat@plt>
  mov    0x38(%rsp),%rbx
  mov    %r15d,%edx
  mov    %r14,%rdi
  mov    %rbx,%rsi
  call   <ldvmat@plt>
  mov    0x20(%rsp),%rsi
  mov    %r15d,%r9d
  mov    %rbx,%r8
  mov    0x18(%rsp),%rdi
  mov    %r12d,%ecx
  mov    %rbp,%rdx
  call   <qrbdv@plt>
  jmp    L213
L303:
  mov    $0xffffffff,%eax
  jmp    L433
L122:
  movapd %xmm1,%xmm0
  mov    %r9d,0x68(%rsp)
  mov    %r10,0x60(%rsp)
  mov    %rdi,0x58(%rsp)
  mov    %r8,0x48(%rsp)
  movsd  %xmm1,0x40(%rsp)
  call   <sqrt@plt>
  mov    0x68(%rsp),%r9d
  mov    0x60(%rsp),%r10
  pxor   %xmm3,%xmm3
  mov    0x58(%rsp),%rdi
  mov    0x48(%rsp),%r8
  movapd %xmm0,%xmm2
  movq   D107(%rip),%xmm5
  movsd  0x40(%rsp),%xmm1
  jmp    L526
L36:
  movapd %xmm1,%xmm0
  mov    %rdi,0x70(%rsp)
  mov    %r11d,0x68(%rsp)
  mov    %r10d,0x60(%rsp)
  movsd  %xmm1,0x58(%rsp)
  call   <sqrt@plt>
  mov    0x70(%rsp),%rdi
  mov    0x68(%rsp),%r11d
  pxor   %xmm3,%xmm3
  mov    0x60(%rsp),%r10d
  movsd  0x58(%rsp),%xmm1
  movapd %xmm0,%xmm5
  jmp    L22
L180:
  movapd %xmm1,%xmm0
  mov    %rdi,0x78(%rsp)
  mov    %r11d,0x70(%rsp)
  mov    %r10d,0x68(%rsp)
  mov    %rsi,0x60(%rsp)
  movsd  %xmm1,0x58(%rsp)
  call   <sqrt@plt>
  mov    0x78(%rsp),%rdi
  mov    0x70(%rsp),%r11d
  pxor   %xmm3,%xmm3
  mov    0x68(%rsp),%r10d
  mov    0x60(%rsp),%rsi
  movapd %xmm0,%xmm2
  movsd  0x58(%rsp),%xmm1
  jmp    L638
```

tool_calls: name: retrieve_data
arguments: data_tag: D107
type: f32[4]
name: retrieve_data
arguments: data_tag: D148
type: f64

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

tool: D148: 1

assistant: ```c
int sv2uv(double *d, double *a, double *u, int m, double *v, int n) {
  double *p, *p1, *q, *pp, *w, *e;
  double s, t, h, r, 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, p = a; i < n; ++i, --mm, 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 = 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) = w[j++] * t;
      }
      *p = sv;
      d[i] = -h;
    }
    if (mm == 1)
      d[i] = *p;
  }
  ldumat(a, u, m, n);
  for (i = 0, q = a; i < n; ++i) {
    for (j = 0; j < n; ++j, ++q) {
      if (j < i)
        *q = 0.;
      else if (j == i)
        *q = d[i];
    }
  }
  for (i = 0, mm = n, nm = n - 1, p = a; i < n; ++i, --mm, --nm, p += n + 1) {
    if (i && 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;
          for (j = 0, q = p + k, r *= s; j < mm; q += n)
            *q -= r * w[j++];
        }
        for (k = 0, p1 = u + i; k < m; ++k, p1 += m) {
          for (j = 0, q = p1, r = 0.; j < mm;)
            r += w[j++] * *q++;
          for (j = 0, q = p1, r *= s; j < mm;)
            *q++ -= r * w[j++];
        }
      }
      *p = sv;
      d[i] = -h;
    }
    if (mm == 1)
      d[i] = *p;
    p1 = p + 1;
    if (nm > 1) {
      sv = h = 0.;
      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 * (n - i); k < ms; k += n) {
          for (j = 0, q = p1, pp = p1 + k, r = 0.; j < nm; ++j)
            r += *q++ * *pp++;
          for (j = 0, q = p1, pp = p1 + k, r *= s; 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);
  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;
}
```