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

```asm
<svd_gr>:
  endbr64
  push   %r15
  movslq %edx,%rax
  mov    %rdi,%r15
  push   %r14
  push   %r13
  lea    0x0(,%rax,8),%r13
  push   %r12
  mov    %r13,%rdi
  mov    %esi,%r12d
  push   %rbp
  mov    %rax,%rbp
  push   %rbx
  mov    %r9,%rbx
  sub    $0xf8,%rsp
  mov    %rcx,0x58(%rsp)
  mov    %r8,0x60(%rsp)
  mov    %rax,0x88(%rsp)
  call   <malloc@plt>
  mov    %rax,%r14
  xor    %eax,%eax
  call   <macheps@plt>
  pxor   %xmm7,%xmm7
  mov    %ebp,%edx
  cvtsi2sd %eax,%xmm7
  imul   %r12d,%edx
  movsd  %xmm7,0xb8(%rsp)
  test   %edx,%edx
  jle    L184
  movslq %edx,%rcx
  mov    0x58(%rsp),%rdx
  xor    %eax,%eax
L1121:
  movsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L1121
L184:
  lea    -0x1(%rbp),%eax
  mov    %eax,0x8(%rsp)
  test   %ebp,%ebp
  jle    L569
  lea    0x1(%rbp),%eax
  pxor   %xmm2,%xmm2
  lea    -0x2(%rbp),%ecx
  mov    $0x1,%esi
  mov    %eax,0xa0(%rsp)
  xor    %r10d,%r10d
  xor    %r8d,%r8d
  mov    %r14,%rdx
  movq   D64(%rip),%xmm7
  mov    %r12d,0x70(%rsp)
  movapd %xmm2,%xmm3
  mov    %rsi,%r12
  mov    %rax,0xa8(%rsp)
  mov    0x58(%rsp),%rax
  mov    %rbx,0x28(%rsp)
  mov    %r10,%rbx
  add    $0x10,%rax
  mov    %ecx,0x20(%rsp)
  movl   $0x0,0x50(%rsp)
  mov    %rax,0x68(%rsp)
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movaps %xmm7,0x30(%rsp)
  jmp    L1150
L677:
  mov    0x28(%rsp),%rax
  movsd  0x48(%rsp),%xmm2
  lea    (%r8,%rbp,1),%r11d
  movq   $0x0,(%rax,%rbx,8)
  movapd %xmm2,%xmm3
  movapd %xmm2,%xmm0
L1005:
  subl   $0x1,0x20(%rsp)
  add    $0x1,%rbx
  add    $0x1,%r12
  mov    %r11d,%r8d
  andpd  0x30(%rsp),%xmm4
  mov    0xa0(%rsp),%esi
  add    %esi,0x50(%rsp)
  addsd  %xmm4,%xmm0
  maxsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  cmp    0xa8(%rsp),%r12
  je     L487
L1150:
  movapd %xmm2,%xmm4
  mov    %r12d,0x78(%rsp)
  mov    %ebx,%r10d
  mulsd  %xmm3,%xmm4
  mov    %r12d,0xb0(%rsp)
  mov    %ebx,0x80(%rsp)
  movsd  %xmm4,(%rdx,%rbx,8)
  cmp    %ebx,0x70(%rsp)
  jle    L677
  mov    0x58(%rsp),%rcx
  movslq %r8d,%rax
  mov    %ebx,%r15d
  pxor   %xmm2,%xmm2
  mov    %rax,0x18(%rsp)
  add    %rbx,%rax
  mov    %rax,0xc0(%rsp)
  lea    (%rcx,%rax,8),%rax
  mov    0x70(%rsp),%ecx
  mov    %rax,0x40(%rsp)
L427:
  movsd  (%rax),%xmm0
  andpd  0x30(%rsp),%xmm0
  mov    %r15d,%r14d
  add    %r13,%rax
  add    $0x1,%r15d
  addsd  %xmm0,%xmm2
  cmp    %r15d,%ecx
  jne    L427
  movsd  0x48(%rsp),%xmm7
  ucomisd %xmm7,%xmm2
  jp     L302
  movapd %xmm7,%xmm0
  lea    (%r8,%rbp,1),%r11d
  jne    L302
L1079:
  mulsd  %xmm2,%xmm0
  mov    0x28(%rsp),%rax
  mov    0x80(%rsp),%ecx
  movsd  %xmm0,(%rax,%rbx,8)
  cmp    %ecx,0x8(%rsp)
  jne    L1093
L854:
  movsd  0x48(%rsp),%xmm2
  andpd  0x30(%rsp),%xmm0
  movapd %xmm2,%xmm3
  jmp    L1005
L1093:
  mov    %r12d,0x40(%rsp)
  cmp    %r12d,%r15d
  jle    L854
  mov    0x18(%rsp),%rax
  mov    0x58(%rsp),%rcx
  pxor   %xmm3,%xmm3
  add    %r12,%rax
  lea    (%rcx,%rax,8),%r15
  mov    0x68(%rsp),%rcx
  mov    %r14d,%eax
  sub    0xb0(%rsp),%eax
  add    0xc0(%rsp),%rax
  lea    (%rcx,%rax,8),%rsi
  mov    %r15,%rax
L1071:
  movsd  (%rax),%xmm1
  andpd  0x30(%rsp),%xmm1
  add    $0x8,%rax
  addsd  %xmm1,%xmm3
  cmp    %rax,%rsi
  jne    L1071
  movsd  0x48(%rsp),%xmm2
  ucomisd %xmm2,%xmm3
  jp     L195
  jne    L195
  andpd  0x30(%rsp),%xmm0
  jmp    L1005
L487:
  mov    %ebp,0x18(%rsp)
  mov    0x70(%rsp),%r12d
  mov    %rdx,%r14
  mov    0x28(%rsp),%rbx
L1096:
  mov    %ebp,%eax
  movslq 0x8(%rsp),%r15
  mov    %r12d,0xa8(%rsp)
  not    %eax
  mov    %rbx,0xb0(%rsp)
  mov    %eax,0x28(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %r15,0x68(%rsp)
  mov    %rax,0x20(%rsp)
  mov    %r15d,%eax
  imul   %ebp,%eax
  movslq %eax,%rsi
  add    %r15d,%eax
  mov    %rsi,%rdx
  mov    %eax,%ecx
  mov    %eax,0x80(%rsp)
  mov    %ebp,%eax
  add    %r15,%rdx
  neg    %eax
  mov    %rsi,0x50(%rsp)
  shl    $0x3,%rdx
  cltq
  mov    %rsi,0x98(%rsp)
  mov    %rdx,%r9
  mov    %rdx,0x90(%rsp)
  mov    0x60(%rsp),%rdx
  mov    %rax,0x70(%rsp)
  mov    0x58(%rsp),%rax
  mov    %rdx,%rdi
  mov    %ecx,0x78(%rsp)
  lea    (%rdx,%rsi,8),%r11
  add    %r9,%rdi
  add    $0x8,%rax
  mov    %rdi,0x40(%rsp)
  mov    %rax,0xa0(%rsp)
  jmp    L441
L960:
  mov    0x40(%rsp),%rax
  mov    D119(%rip),%rsi
  sub    %r13,%r11
  movsd  (%r14,%r15,8),%xmm2
  sub    $0x1,%r15
  mov    %rsi,(%rax)
  mov    0x20(%rsp),%rsi
  add    %rsi,%rax
  mov    0x28(%rsp),%esi
  add    %esi,0x78(%rsp)
  mov    %rax,0x40(%rsp)
  mov    0x70(%rsp),%rsi
  add    %rsi,0x50(%rsp)
  test   %r15d,%r15d
  js     L1118
L441:
  mov    0x18(%rsp),%r9d
  mov    %r15d,0x18(%rsp)
  cmp    %r15d,0x8(%rsp)
  jle    L960
  ucomisd 0x48(%rsp),%xmm2
  jp     L1045
  jne    L1045
  movslq %r9d,%rcx
  cmp    %r9d,%ebp
  jle    L960
L58:
  mov    %r9d,%eax
  mov    0x60(%rsp),%rsi
  imul   %ebp,%eax
  cltq
  add    %r15,%rax
  lea    (%rsi,%rax,8),%rax
L93:
  movq   $0x0,(%rax)
  add    %r13,%rax
  movq   $0x0,(%r11,%rcx,8)
  add    $0x1,%rcx
  cmp    %ecx,%ebp
  jg     L93
  jmp    L960
L1118:
  mov    0x58(%rsp),%rcx
  mov    0x90(%rsp),%rax
  mov    %ebp,%r15d
  mov    0xb0(%rsp),%rbx
  mov    0x68(%rsp),%r8
  add    %rcx,%rax
  mov    0xa8(%rsp),%r12d
  mov    %rax,0x40(%rsp)
  mov    0x8(%rsp),%eax
  imul   %ebp,%eax
  mov    %eax,0x18(%rsp)
  mov    0x70(%rsp),%rax
  mov    %rbx,0x70(%rsp)
  mov    %r8,%rbx
  lea    -0x8(,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  mov    0x88(%rsp),%rax
  add    0x98(%rsp),%rax
  mov    %r14,0x88(%rsp)
  lea    (%rcx,%rax,8),%rax
  mov    %ebp,%ecx
  mov    %rax,0x50(%rsp)
L235:
  mov    0x70(%rsp),%rax
  mov    %ebx,%r11d
  mov    %ebx,%r14d
  mov    %ebx,%ebp
  movsd  (%rax,%rbx,8),%xmm2
  cmp    0x8(%rsp),%ebx
  jl     L593
  ucomisd 0x48(%rsp),%xmm2
  jp     L265
  je     L1190
L265:
  cmp    0x8(%rsp),%ebp
  jne    L1018
L1050:
  cmp    %ebp,%r12d
  jle    L197
  movslq 0x18(%rsp),%rax
  mov    0x58(%rsp),%rsi
  add    %rbx,%rax
  lea    (%rsi,%rax,8),%rax
  nopl   0x0(%rax,%rax,1)
L174:
  movsd  (%rax),%xmm0
  add    $0x1,%r14d
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    %r13,%rax
  cmp    %r14d,%r12d
  jne    L174
L197:
  mov    0x40(%rsp),%rax
  sub    $0x1,%rbx
  sub    %ecx,0x18(%rsp)
  sub    $0x1,%r15d
  movsd  D119(%rip),%xmm0
  mov    0x20(%rsp),%rsi
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    %rsi,%rax
  mov    0x28(%rsp),%esi
  mov    %rax,0x40(%rsp)
  add    %esi,0x80(%rsp)
  mov    0x78(%rsp),%rsi
  add    %rsi,0x50(%rsp)
  test   %ebx,%ebx
  jns    L235
  movsd  0x10(%rsp),%xmm7
  mov    0x70(%rsp),%rbx
  mov    %ecx,%ebp
  mulsd  0xb8(%rsp),%xmm7
  mov    0x88(%rsp),%r14
  mov    %rbx,%r15
  movsd  %xmm7,0x70(%rsp)
L283:
  movl   $0x32,0x90(%rsp)
  mov    0x68(%rsp),%rax
  lea    0x0(,%rax,8),%rcx
  movsd  (%r14,%rax,8),%xmm6
  mov    %eax,0x88(%rsp)
  mov    %rcx,0x80(%rsp)
  mov    %eax,0x50(%rsp)
  mov    %r15,%rax
  mov    %r14,%r15
  mov    %r12d,%r14d
  mov    %rax,%r12
  nopw   0x0(%rax,%rax,1)
L253:
  mov    0x80(%rsp),%rax
  mov    0x88(%rsp),%edx
  movapd %xmm6,%xmm0
  movsd  0x70(%rsp),%xmm1
  jmp    L702
  nopl   0x0(%rax,%rax,1)
L170:
  movsd  (%r15,%rax,1),%xmm0
  mov    %edi,%edx
L702:
  movapd 0x30(%rsp),%xmm7
  andpd  %xmm7,%xmm0
  comisd %xmm0,%xmm1
  jae    L1133
  movsd  -0x8(%r12,%rax,1),%xmm0
  lea    -0x1(%rdx),%edi
  andpd  %xmm7,%xmm0
  comisd %xmm0,%xmm1
  jae    L830
  sub    $0x8,%rax
  cmp    $0xffffffff,%edi
  jne    L170
  lea    -0x8(%r15),%rax
  mov    $0xffffffff,%edx
  mov    $0xfffffffe,%edi
  mov    %rax,0x78(%rsp)
  mov    $0xfffffffffffffff8,%rax
  cmp    0x68(%rsp),%edx
  jg     L810
L288:
  mov    0x58(%rsp),%rax
  movslq %edi,%rdi
  movslq %edx,%r11
  mov    %edx,0x20(%rsp)
  mov    %r11,%rbx
  mov    %ebp,0x28(%rsp)
  pxor   %xmm1,%xmm1
  mov    %r11,%rbp
  lea    (%rax,%rdi,8),%rax
  sub    %rdi,%rbx
  mov    %rax,0x18(%rsp)
  mov    D119(%rip),%rax
  movq   %rax,%xmm4
  mov    %r12,%rax
  mov    %r13,%r12
  mov    %r15,%r13
  mov    %r14d,%r15d
  mov    %rbx,%r14
  mov    %rax,%rbx
  nopl   0x0(%rax,%rax,1)
L136:
  movsd  0x0(%r13,%rbp,8),%xmm0
  movapd 0x30(%rsp),%xmm7
  mulsd  %xmm0,%xmm4
  mulsd  %xmm1,%xmm0
  andpd  %xmm4,%xmm7
  movsd  %xmm0,0x0(%r13,%rbp,8)
  movapd %xmm7,%xmm0
  movsd  0x70(%rsp),%xmm7
  comisd %xmm0,%xmm7
  jae    L56
  movsd  (%rbx,%rbp,8),%xmm1
  movapd %xmm4,%xmm0
  movsd  %xmm4,0x8(%rsp)
  movsd  %xmm1,0x10(%rsp)
  call   <hypot@plt>
  movsd  0x10(%rsp),%xmm1
  movsd  0x8(%rsp),%xmm4
  xor    %edx,%edx
  xorpd  D39(%rip),%xmm4
  mov    0x18(%rsp),%rax
  movsd  %xmm0,(%rbx,%rbp,8)
  divsd  %xmm0,%xmm1
  divsd  %xmm0,%xmm4
  test   %r15d,%r15d
  jle    L225
  nopl   0x0(%rax,%rax,1)
L490:
  movsd  (%rax),%xmm2
  movapd %xmm1,%xmm3
  movapd %xmm4,%xmm5
  add    $0x1,%edx
  movsd  (%rax,%r14,8),%xmm0
  mulsd  %xmm2,%xmm3
  mulsd  %xmm0,%xmm5
  mulsd  %xmm4,%xmm2
  mulsd  %xmm1,%xmm0
  addsd  %xmm5,%xmm3
  subsd  %xmm2,%xmm0
  movsd  %xmm3,(%rax)
  movsd  %xmm0,(%rax,%r14,8)
  add    %r12,%rax
  cmp    %edx,%r15d
  jne    L490
L225:
  add    $0x1,%rbp
  add    $0x1,%r14
  cmp    %ebp,0x50(%rsp)
  jge    L136
L56:
  mov    0x20(%rsp),%edx
  mov    0x28(%rsp),%ebp
  mov    %r15d,%r14d
  mov    %r13,%r15
  mov    %r12,%r13
  mov    %rbx,%r12
L1133:
  mov    0x68(%rsp),%rcx
  movsd  (%r12,%rcx,8),%xmm4
  cmp    %ecx,%edx
  je     L198
  movslq %edx,%rax
  movsd  (%r15,%rcx,8),%xmm6
  shl    $0x3,%rax
  lea    (%r15,%rax,1),%rsi
  mov    %rsi,0x78(%rsp)
L1062:
  movsd  (%r12,%rax,1),%xmm8
  mov    0x68(%rsp),%rax
  movapd %xmm4,%xmm2
  mov    %edx,0x40(%rsp)
  movsd  %xmm4,0x20(%rsp)
  movsd  -0x8(%r15,%rax,8),%xmm0
  movsd  -0x8(%r12,%rax,8),%xmm3
  movsd  %xmm8,0x28(%rsp)
  mov    D119(%rip),%rax
  movsd  %xmm6,0x18(%rsp)
  addsd  %xmm0,%xmm2
  subsd  %xmm4,%xmm0
  movsd  %xmm3,0x10(%rsp)
  movq   %rax,%xmm1
  divsd  %xmm3,%xmm0
  divsd  %xmm6,%xmm2
  mulsd  %xmm0,%xmm2
  movapd %xmm3,%xmm0
  divsd  %xmm6,%xmm0
  addsd  %xmm0,%xmm2
  movapd %xmm6,%xmm0
  divsd  %xmm3,%xmm0
  subsd  %xmm0,%xmm2
  mulsd  D52(%rip),%xmm2
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x8(%rsp)
  call   <hypot@plt>
  movsd  0x48(%rsp),%xmm7
  mov    0x40(%rsp),%edx
  movsd  0x8(%rsp),%xmm2
  movsd  0x10(%rsp),%xmm3
  movsd  0x18(%rsp),%xmm6
  movsd  0x20(%rsp),%xmm4
  comisd %xmm2,%xmm7
  movsd  0x28(%rsp),%xmm8
  ja     L649
  addsd  %xmm0,%xmm2
L1230:
  divsd  %xmm2,%xmm3
  movapd %xmm4,%xmm0
  add    $0x1,%edx
  divsd  %xmm8,%xmm0
  subsd  %xmm6,%xmm3
  divsd  %xmm8,%xmm6
  mulsd  %xmm0,%xmm4
  mulsd  %xmm6,%xmm3
  movapd %xmm8,%xmm6
  subsd  %xmm4,%xmm6
  addsd  %xmm3,%xmm6
  cmp    0x68(%rsp),%edx
  jg     L646
  mov    D119(%rip),%rax
  movslq %edx,%rbx
  movq   %rax,%xmm4
  movq   %rax,%xmm2
  mov    %r14d,%eax
  mov    %r13,%r14
  mov    %rbx,%r13
  mov    %eax,%ebx
  nopl   (%rax)
L643:
  movsd  (%r15,%r13,8),%xmm7
  movsd  (%r12,%r13,8),%xmm3
  movapd %xmm6,%xmm0
  movsd  %xmm8,0x28(%rsp)
  movsd  %xmm6,0x8(%rsp)
  mulsd  %xmm7,%xmm2
  movsd  %xmm3,0x20(%rsp)
  mulsd  %xmm4,%xmm7
  movapd %xmm2,%xmm1
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm7,0x18(%rsp)
  call   <hypot@plt>
  movsd  0x10(%rsp),%xmm1
  xor    %edi,%edi
  movsd  0x8(%rsp),%xmm6
  movsd  0x18(%rsp),%xmm7
  movsd  0x28(%rsp),%xmm8
  movsd  %xmm0,-0x8(%r15,%r13,8)
  divsd  %xmm0,%xmm6
  movapd %xmm1,%xmm2
  movsd  0x20(%rsp),%xmm3
  mov    0x60(%rsp),%rax
  movapd %xmm3,%xmm1
  lea    (%rax,%r13,8),%rax
  divsd  %xmm0,%xmm2
  movapd %xmm7,%xmm0
  mulsd  %xmm6,%xmm3
  movapd %xmm6,%xmm9
  movapd %xmm6,%xmm4
  mulsd  %xmm8,%xmm9
  mulsd  %xmm6,%xmm7
  mulsd  %xmm2,%xmm0
  mulsd  %xmm2,%xmm1
  addsd  %xmm0,%xmm9
  movapd %xmm8,%xmm0
  movapd %xmm3,%xmm8
  mulsd  %xmm2,%xmm0
  subsd  %xmm0,%xmm7
  test   %ebp,%ebp
  jle    L460
  cs nopw 0x0(%rax,%rax,1)
L907:
  movsd  -0x8(%rax),%xmm3
  movsd  (%rax),%xmm0
  movapd %xmm4,%xmm5
  add    $0x1,%edi
  movapd %xmm2,%xmm6
  mulsd  %xmm3,%xmm5
  mulsd  %xmm0,%xmm6
  mulsd  %xmm2,%xmm3
  mulsd  %xmm4,%xmm0
  addsd  %xmm6,%xmm5
  subsd  %xmm3,%xmm0
  movsd  %xmm5,-0x8(%rax)
  movsd  %xmm0,(%rax)
  add    %r14,%rax
  cmp    %edi,%ebp
  jne    L907
L460:
  movapd %xmm9,%xmm0
  movsd  %xmm8,0x20(%rsp)
  movsd  %xmm7,0x18(%rsp)
  movsd  %xmm1,0x10(%rsp)
  movsd  %xmm9,0x8(%rsp)
  movsd  %xmm4,0x40(%rsp)
  movsd  %xmm2,0x28(%rsp)
  call   <hypot@plt>
  ucomisd 0x48(%rsp),%xmm0
  movsd  0x8(%rsp),%xmm9
  movsd  0x10(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm7
  movsd  %xmm0,-0x8(%r12,%r13,8)
  movsd  0x20(%rsp),%xmm8
  jp     L500
  movsd  0x28(%rsp),%xmm2
  movsd  0x40(%rsp),%xmm4
  je     L933
L500:
  movapd %xmm9,%xmm4
  movapd %xmm1,%xmm2
  divsd  %xmm0,%xmm4
  divsd  %xmm0,%xmm2
L933:
  movapd %xmm4,%xmm6
  movapd %xmm2,%xmm0
  mov    0x58(%rsp),%rax
  xor    %edi,%edi
  mulsd  %xmm7,%xmm6
  mulsd  %xmm8,%xmm0
  lea    (%rax,%r13,8),%rax
  mulsd  %xmm4,%xmm8
  mulsd  %xmm2,%xmm7
  addsd  %xmm0,%xmm6
  subsd  %xmm7,%xmm8
  test   %ebx,%ebx
  jle    L156
  cs nopw 0x0(%rax,%rax,1)
L10:
  movsd  -0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  movapd %xmm4,%xmm3
  add    $0x1,%edi
  movapd %xmm2,%xmm5
  mulsd  %xmm1,%xmm3
  mulsd  %xmm0,%xmm5
  mulsd  %xmm2,%xmm1
  mulsd  %xmm4,%xmm0
  addsd  %xmm5,%xmm3
  subsd  %xmm1,%xmm0
  movsd  %xmm3,-0x8(%rax)
  movsd  %xmm0,(%rax)
  add    %r14,%rax
  cmp    %edi,%ebx
  jne    L10
L156:
  add    $0x1,%r13
  cmp    %r13d,0x50(%rsp)
  jge    L643
  mov    %r14,%r13
  mov    %ebx,%r14d
L646:
  mov    0x78(%rsp),%rax
  subl   $0x1,0x90(%rsp)
  movq   $0x0,(%rax)
  mov    0x68(%rsp),%rax
  movsd  %xmm6,(%r15,%rax,8)
  movsd  %xmm8,(%r12,%rax,8)
  jne    L253
  lea    D98(%rip),%rdi
  call   <puts@plt>
  mov    $0xf,%eax
L1234:
  add    $0xf8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L649:
  subsd  %xmm0,%xmm2
  jmp    L1230
L830:
  lea    (%r15,%rax,1),%rsi
  mov    %rsi,0x78(%rsp)
  cmp    0x68(%rsp),%edx
  jle    L288
L810:
  mov    0x68(%rsp),%rcx
  movsd  (%r12,%rcx,8),%xmm4
  jmp    L1062
L1090:
  ucomisd 0x48(%rsp),%xmm2
  jp     L1050
  jne    L1050
L1190:
  cmp    %ebp,%r12d
  jle    L197
  movslq 0x18(%rsp),%rax
  mov    0x58(%rsp),%rsi
  add    %rbx,%rax
  lea    (%rsi,%rax,8),%rax
  nopw   0x0(%rax,%rax,1)
L69:
  add    $0x1,%r14d
  movq   $0x0,(%rax)
  add    %r13,%rax
  cmp    %r14d,%r12d
  jne    L69
  jmp    L197
L593:
  cmp    %r15d,%ecx
  jle    L1090
  lea    -0x2(%rcx),%r9d
  mov    0x50(%rsp),%rdi
  xor    %esi,%esi
  mov    %ecx,0xa0(%rsp)
  mov    %r9d,%eax
  mov    %r9d,0x98(%rsp)
  sub    %ebx,%eax
  mov    %ebx,0x90(%rsp)
  lea    0x8(,%rax,8),%rdx
  movsd  %xmm2,0xa8(%rsp)
  call   <memset@plt>
  mov    0x90(%rsp),%r11d
  movsd  0xa8(%rsp),%xmm2
  ucomisd 0x48(%rsp),%xmm2
  mov    0x98(%rsp),%r9d
  mov    0xa0(%rsp),%ecx
  jp     L1002
  je     L1190
L1002:
  mov    0x58(%rsp),%rsi
  movslq %r15d,%rdx
  sub    %r11d,%r9d
  mov    $0xfffffffffffffffe,%r8
  movslq 0x80(%rsp),%rax
  sub    %r9,%r8
  lea    (%rsi,%rax,8),%r10
  movslq 0x18(%rsp),%rax
  add    %rdx,%rax
  mov    $0xffffffffffffffff,%rdx
  lea    (%rsi,%rax,8),%rdi
  mov    0x18(%rsp),%eax
  add    %ecx,%eax
  cltq
  add    %rbx,%rax
  lea    (%rsi,%rax,8),%r9
  mov    $0x1,%esi
L728:
  mov    %r9,%rax
  mov    %r15d,%r11d
  pxor   %xmm1,%xmm1
  cmp    %r15d,%r12d
  jle    L692
  xchg   %ax,%ax
L929:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rsi,8),%xmm0
  add    $0x1,%r11d
  add    %r13,%rax
  addsd  %xmm0,%xmm1
  cmp    %r11d,%r12d
  jne    L929
L692:
  divsd  (%r10),%xmm1
  divsd  %xmm2,%xmm1
  mov    %rdi,%rax
  mov    %r14d,%r11d
  cmp    %ebp,%r12d
  jle    L552
  nopl   (%rax)
L1146:
  movsd  (%rax,%rdx,8),%xmm0
  add    $0x1,%r11d
  mulsd  %xmm1,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    %r13,%rax
  cmp    %r11d,%r12d
  jne    L1146
L552:
  sub    $0x1,%rdx
  add    $0x8,%rdi
  add    $0x1,%rsi
  cmp    %rdx,%r8
  jne    L728
  jmp    L1050
L198:
  movsd  0x48(%rsp),%xmm7
  mov    %r12,%rax
  mov    %r14d,%r12d
  mov    %r15,%r14
  mov    %rax,%r15
  comisd %xmm4,%xmm7
  ja     L650
L420:
  subq   $0x1,0x68(%rsp)
  mov    0x68(%rsp),%rax
  test   %eax,%eax
  jns    L283
  mov    %r15,%rbx
L270:
  mov    0x60(%rsp),%rcx
  mov    0x58(%rsp),%rdi
  mov    %rbx,%r8
  mov    %ebp,%edx
  mov    %r12d,%esi
  xor    %eax,%eax
  call   <svd_sort@plt>
  mov    %r14,%rdi
  call   <free@plt>
  xor    %eax,%eax
  jmp    L1234
L1018:
  cmp    %r15d,%ecx
  jle    L1050
  lea    -0x2(%rcx),%r9d
  jmp    L1002
L1045:
  movslq 0x78(%rsp),%rax
  mov    0x58(%rsp),%rsi
  mulsd  0x8(%rsi,%rax,8),%xmm2
  cmp    %r9d,%ebp
  jle    L960
  mov    %ebp,%edx
  mov    0x50(%rsp),%rax
  movslq %r9d,%rcx
  imul   %r9d,%edx
  lea    (%rax,%rcx,1),%rdi
  lea    (%rsi,%rdi,8),%rbx
  mov    0x60(%rsp),%rsi
  movslq %edx,%rdx
  lea    (%r15,%rdx,1),%rax
  lea    (%rsi,%rax,8),%rsi
  mov    0x8(%rsp),%eax
  sub    %r9d,%eax
  add    %rdi,%rax
  mov    0xa0(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %rbx,%rax
L948:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsi)
  add    %r13,%rsi
  cmp    %rax,%rdi
  jne    L948
  mov    0x60(%rsp),%rax
  add    %rcx,%rdx
  mov    %r15,%rsi
  mov    %r9d,%r12d
  sub    %rcx,%rsi
  lea    (%rax,%rdx,8),%r10
L1155:
  mov    %r10,%rdx
  mov    %rbx,%rax
  pxor   %xmm1,%xmm1
  xchg   %ax,%ax
L8:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  add    $0x8,%rax
  add    %r13,%rdx
  addsd  %xmm0,%xmm1
  cmp    %rax,%rdi
  jne    L8
  mov    %r10,%rax
  mov    %r9d,%edx
  xchg   %ax,%ax
L1053:
  movsd  (%rax,%rsi,8),%xmm0
  mov    %edx,%r8d
  add    $0x1,%edx
  mulsd  %xmm1,%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    %r13,%rax
  cmp    %edx,%ebp
  jne    L1053
  lea    0x1(%r12),%eax
  add    $0x8,%r10
  sub    $0x1,%rsi
  cmp    %r8d,%r12d
  je     L58
  mov    %eax,%r12d
  jmp    L1155
L302:
  mov    0x40(%rsp),%rax
  mov    %r10d,%edi
  pxor   %xmm3,%xmm3
L786:
  movsd  (%rax),%xmm0
  mov    %edi,%ecx
  add    $0x1,%edi
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  mulsd  %xmm0,%xmm0
  add    %r13,%rax
  addsd  %xmm0,%xmm3
  cmp    %ecx,%r14d
  jne    L786
  movslq 0x50(%rsp),%rax
  mov    0x58(%rsp),%rcx
  movsd  0x48(%rsp),%xmm6
  lea    (%rcx,%rax,8),%rax
  movsd  (%rax),%xmm7
  mov    %rax,0x90(%rsp)
  movsd  %xmm7,0x98(%rsp)
  comisd %xmm7,%xmm6
  ja     L724
  movsd  0x48(%rsp),%xmm7
  ucomisd %xmm3,%xmm7
  ja     L1114
  movapd %xmm3,%xmm0
  sqrtsd %xmm0,%xmm0
L530:
  xorpd  D39(%rip),%xmm0
L1122:
  movsd  0x98(%rsp),%xmm1
  mov    0x90(%rsp),%rax
  lea    (%r8,%rbp,1),%r11d
  mov    0x80(%rsp),%ecx
  subsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  cmp    %ecx,0x8(%rsp)
  jg     L968
L626:
  mov    0x40(%rsp),%rax
  jmp    L1220
L703:
  movsd  (%rax),%xmm1
  mov    %ecx,%r10d
L1220:
  mulsd  %xmm2,%xmm1
  lea    0x1(%r10),%ecx
  movsd  %xmm1,(%rax)
  add    %r13,%rax
  cmp    %r10d,%r14d
  jne    L703
  jmp    L1079
L724:
  ucomisd %xmm3,%xmm6
  ja     L1208
  movapd %xmm3,%xmm0
  sqrtsd %xmm0,%xmm0
  jmp    L1122
L650:
  xorpd  D39(%rip),%xmm4
  mov    0x68(%rsp),%rax
  movsd  %xmm4,(%r15,%rax,8)
  test   %ebp,%ebp
  jle    L420
  mov    0x80(%rsp),%rax
  xor    %edx,%edx
  add    0x60(%rsp),%rax
L812:
  movsd  (%rax),%xmm0
  xorpd  D39(%rip),%xmm0
  add    $0x1,%edx
  movsd  %xmm0,(%rax)
  add    %r13,%rax
  cmp    %edx,%ebp
  jne    L812
  jmp    L420
L195:
  mov    0x50(%rsp),%eax
  mov    0x58(%rsp),%rcx
  add    $0x1,%eax
  cltq
  lea    (%rcx,%rax,8),%rsi
  movsd  (%rsi),%xmm1
  cmp    0x40(%rsp),%ebp
  jle    L994
  mov    0x20(%rsp),%r10d
  mov    0x18(%rsp),%rax
  pxor   %xmm4,%xmm4
  mov    0x68(%rsp),%rcx
  add    %r10,%rax
  add    %rbx,%rax
  lea    (%rcx,%rax,8),%rdi
  mov    %r15,%rax
L361:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  divsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%rax)
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm4
  cmp    %rax,%rdi
  jne    L361
  movsd  (%rsi),%xmm1
  movsd  0x48(%rsp),%xmm7
  comisd %xmm1,%xmm7
  ja     L680
  movsd  0x48(%rsp),%xmm7
  ucomisd %xmm4,%xmm7
  ja     L333
L298:
  movapd %xmm4,%xmm2
  sqrtsd %xmm2,%xmm2
L1218:
  xorpd  D39(%rip),%xmm2
L47:
  movapd %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rsi)
  subsd  %xmm4,%xmm0
  cmp    0x40(%rsp),%ebp
  jle    L1205
L951:
  mov    0x58(%rsp),%rax
  mov    0x18(%rsp),%rsi
  lea    (%rax,%rsi,8),%rsi
  mov    %r12,%rax
  jmp    L546
L57:
  movsd  (%rsi,%rax,8),%xmm1
L546:
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L57
L1205:
  mov    0x58(%rsp),%rax
  movslq %r11d,%rdi
  mov    0x68(%rsp),%rcx
  mov    0x18(%rsp),%r8
  mov    0x78(%rsp),%r9d
  lea    (%rax,%rdi,8),%rsi
  lea    (%r10,%rbx,1),%rax
  add    %rdi,%rax
  sub    %rdi,%r8
  lea    (%rcx,%rax,8),%rdi
  lea    0x0(,%r12,8),%rcx
L48:
  lea    (%rsi,%rcx,1),%rax
  pxor   %xmm1,%xmm1
  cmp    0x40(%rsp),%ebp
  jle    L274
  nopl   0x0(%rax,%rax,1)
L383:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%r8,8),%xmm0
  add    $0x8,%rax
  addsd  %xmm0,%xmm1
  cmp    %rax,%rdi
  jne    L383
  mov    %r12,%rax
  nopw   0x0(%rax,%rax,1)
L986:
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rsi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%ebp
  jg     L986
L274:
  lea    0x1(%r9),%eax
  add    %r13,%rsi
  sub    0x88(%rsp),%r8
  add    %r13,%rdi
  cmp    %r9d,%r14d
  je     L219
  mov    %eax,%r9d
  jmp    L48
L219:
  cmp    0x40(%rsp),%ebp
  jle    L409
  mov    0x18(%rsp),%rax
  mov    0x68(%rsp),%rsi
  add    %r10,%rax
  add    %rbx,%rax
  lea    (%rsi,%rax,8),%rax
L1038:
  movsd  (%r15),%xmm0
  add    $0x8,%r15
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,-0x8(%r15)
  cmp    %r15,%rax
  jne    L1038
L409:
  mov    0x28(%rsp),%rax
  movsd  (%rdx,%rbx,8),%xmm4
  movsd  (%rax,%rbx,8),%xmm0
  andpd  0x30(%rsp),%xmm0
  jmp    L1005
L968:
  cmp    %r12d,%ebp
  jle    L626
  movsd  0x98(%rsp),%xmm6
  mov    0x18(%rsp),%rcx
  mov    0x58(%rsp),%rsi
  mulsd  %xmm0,%xmm6
  lea    (%rcx,%r12,1),%rax
  lea    (%rsi,%rax,8),%r9
  mov    %rbx,%rsi
  movslq %r11d,%rax
  sub    %r12,%rsi
  sub    %rcx,%rsi
  mov    0x78(%rsp),%ecx
  add    %rax,%rsi
  subsd  %xmm3,%xmm6
L250:
  mov    %r9,%rax
  movapd %xmm1,%xmm3
  pxor   %xmm5,%xmm5
  mov    %r10d,%edi
  jmp    L462
L1206:
  movsd  (%rax,%rsi,8),%xmm3
  mov    %r8d,%edi
  add    %r13,%rax
L462:
  mulsd  (%rax),%xmm3
  lea    0x1(%rdi),%r8d
  addsd  %xmm3,%xmm5
  cmp    %edi,%r14d
  jne    L1206
  divsd  %xmm6,%xmm5
  mov    %r9,%rax
  mov    %r10d,%edi
  jmp    L708
L734:
  movsd  (%rax,%rsi,8),%xmm1
  mov    %r8d,%edi
  add    %r13,%rax
L708:
  mulsd  %xmm5,%xmm1
  lea    0x1(%rdi),%r8d
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  cmp    %edi,%r14d
  jne    L734
  mov    0x90(%rsp),%rax
  add    $0x1,%ecx
  add    $0x8,%r9
  sub    $0x1,%rsi
  movsd  (%rax),%xmm1
  cmp    %ecx,%ebp
  jne    L250
  jmp    L626
L680:
  ucomisd %xmm4,%xmm7
  ja     L390
L152:
  movapd %xmm4,%xmm2
  sqrtsd %xmm2,%xmm2
  jmp    L47
L569:
  mov    0x8(%rsp),%eax
  test   %eax,%eax
  js     L270
  movq   D64(%rip),%xmm7
  pxor   %xmm2,%xmm2
  movsd  %xmm2,0x48(%rsp)
  movsd  %xmm2,0x10(%rsp)
  movaps %xmm7,0x30(%rsp)
  jmp    L1096
  nopl   0x0(%rax,%rax,1)
L994:
  movsd  0x48(%rsp),%xmm7
  comisd %xmm1,%xmm7
  ja     L192
  mov    0x20(%rsp),%r10d
  movapd %xmm7,%xmm4
  jmp    L298
L390:
  movapd %xmm4,%xmm0
  mov    %rdx,0xd0(%rsp)
  mov    %r11d,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  mov    %rsi,0xb0(%rsp)
  movsd  %xmm3,0x98(%rsp)
  movsd  %xmm1,0x90(%rsp)
  movsd  %xmm4,0x80(%rsp)
  call   <sqrt@plt>
  mov    0xb0(%rsp),%rsi
  movsd  0x90(%rsp),%xmm1
  movapd %xmm0,%xmm2
  mov    0xc0(%rsp),%r10
  movsd  0x80(%rsp),%xmm4
  movapd %xmm1,%xmm0
  subsd  %xmm2,%xmm1
  movsd  0x98(%rsp),%xmm3
  mov    0xc8(%rsp),%r11d
  mulsd  %xmm2,%xmm0
  mov    0xd0(%rsp),%rdx
  movsd  %xmm1,(%rsi)
  subsd  %xmm4,%xmm0
  jmp    L951
L1208:
  movapd %xmm3,%xmm0
  mov    %r8d,0xec(%rsp)
  mov    %rdx,0xe0(%rsp)
  mov    %r10d,0xe8(%rsp)
  movsd  %xmm2,0xd8(%rsp)
  movsd  %xmm4,0xd0(%rsp)
  movsd  %xmm3,0xc8(%rsp)
  call   <sqrt@plt>
  mov    0xe8(%rsp),%r10d
  movsd  0xc8(%rsp),%xmm3
  mov    0xe0(%rsp),%rdx
  mov    0xec(%rsp),%r8d
  movsd  0xd0(%rsp),%xmm4
  movsd  0xd8(%rsp),%xmm2
  jmp    L1122
  xchg   %ax,%ax
L192:
  mov    0x20(%rsp),%r10d
  pxor   %xmm4,%xmm4
  jmp    L152
L333:
  movapd %xmm4,%xmm0
  mov    %rdx,0xd0(%rsp)
  mov    %r11d,0xc8(%rsp)
  mov    %r10,0xc0(%rsp)
  mov    %rsi,0xb0(%rsp)
  movsd  %xmm3,0x98(%rsp)
  movsd  %xmm1,0x90(%rsp)
  movsd  %xmm4,0x80(%rsp)
  call   <sqrt@plt>
  mov    0xd0(%rsp),%rdx
  mov    0xc8(%rsp),%r11d
  mov    0xc0(%rsp),%r10
  movapd %xmm0,%xmm2
  mov    0xb0(%rsp),%rsi
  movsd  0x98(%rsp),%xmm3
  movsd  0x90(%rsp),%xmm1
  movsd  0x80(%rsp),%xmm4
  jmp    L1218
L1114:
  movapd %xmm3,%xmm0
  mov    %r8d,0xec(%rsp)
  mov    %rdx,0xe0(%rsp)
  mov    %r10d,0xe8(%rsp)
  movsd  %xmm2,0xd8(%rsp)
  movsd  %xmm4,0xd0(%rsp)
  movsd  %xmm3,0xc8(%rsp)
  call   <sqrt@plt>
  mov    0xec(%rsp),%r8d
  mov    0xe0(%rsp),%rdx
  mov    0xe8(%rsp),%r10d
  movsd  0xd8(%rsp),%xmm2
  movsd  0xd0(%rsp),%xmm4
  movsd  0xc8(%rsp),%xmm3
  jmp    L530
```

tool_calls: name: parse_data
arguments: data_tag: D64
type_guessed: qword
name: parse_data
arguments: data_tag: D119
type_guessed: f64
name: parse_data
arguments: data_tag: D39
type_guessed: f32[4]
name: parse_data
arguments: data_tag: D52
type_guessed: f64
name: parse_data
arguments: data_tag: D98
type_guessed: string

tool: D64: 9223372036854775807

tool: D119: 1

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

tool: D52: 0.5

tool: D98: Convergence Not Achieved 

assistant: ```c
int svd_gr(double *A, int M, int N, double *U, double *V, double *q) {
  int i, j, k, l, t, t2, ierr, cancel, iter, l1;
  double eps, g, x, s, temp, f, h, scale, c, y, z;
  double *e;
  e = (double *)malloc(sizeof(double) * N);
  ierr = 0;
  eps = macheps();
  g = scale = x = 0.0;
  for (i = 0; i < M * N; ++i) {
    U[i] = A[i];
  }
  for (i = 0; i < N; ++i) {
    l = i + 1;
    e[i] = scale * g;
    g = 0.0;
    s = 0.0;
    scale = 0.0;
    if (i < M) {
      for (k = i; k < M; ++k) {
        scale += fabs(U[k * N + i]);
      }
      if (scale != 0.0) {
        for (k = i; k < M; ++k) {
          t = k * N;
          U[t + i] /= scale;
          temp = U[t + i];
          s += temp * temp;
        }
        f = U[i * N + i];
        g = (f < 0) ? sqrt(s) : -sqrt(s);
        h = f * g - s;
        U[i * N + i] = f - g;
        if (i < N - 1) {
          for (j = l; j < N; ++j) {
            s = 0.0;
            for (k = i; k < M; ++k) {
              t = k * N;
              s += U[t + i] * U[t + j];
            }
            f = s / h;
            for (k = i; k < M; ++k) {
              t = k * N;
              U[t + j] += f * U[t + i];
            }
          }
        }
        for (k = i; k < M; ++k) {
          t = k * N;
          U[t + i] *= scale;
        }
      }
    }
    q[i] = scale * g;
    g = 0.0;
    s = 0.0;
    scale = 0.0;
    if (i < M && i != N - 1) {
      t = i * N;
      for (k = l; k < M; ++k) {
        scale += fabs(U[t + k]);
      }
      if (scale != 0.0) {
        for (k = l; k < N; ++k) {
          U[t + k] /= scale;
          temp = U[t + k];
          s = s + temp * temp;
        }
        f = U[t + l];
        g = (f < 0) ? sqrt(s) : -sqrt(s);
        h = f * g - s;
        U[t + l] = f - g;
        for (k = l; k < N; ++k) {
          e[k] = U[t + k] / h;
        }
        for (j = l; j < M; j++) {
          s = 0.0;
          t2 = j * N;
          for (k = l; k < N; k++) {
            s += U[t2 + k] * U[t + k];
          }
          for (k = l; k < N; k++) {
            U[t2 + k] += s * e[k];
          }
        }
        for (k = l; k < N; k++)
          U[t + k] *= scale;
      }
    }
    temp = fabs(q[i]) + fabs(e[i]);
    if (x < temp) {
      x = temp;
    }
  }
  for (i = N - 1; i >= 0; --i) {
    t = i * N;
    if (i < N - 1) {
      if (g != 0.0) {
        h = U[t + i + 1] * g;
        for (j = l; j < N; ++j) {
          V[j * N + i] = U[t + j] / h;
        }
        for (j = l; j < N; ++j) {
          s = 0.0;
          for (k = l; k < N; ++k) {
            s += U[t + k] * V[k * N + j];
          }
          for (k = l; k < N; ++k) {
            V[k * N + j] += (s * V[k * N + i]);
          }
        }
      }
      for (j = l; j < N; ++j) {
        V[t + j] = V[j * N + i] = 0.0;
      }
    }
    V[t + i] = 1.0;
    g = e[i];
    l = i;
  }
  for (i = N - 1; i >= 0; --i) {
    t = i * N;
    l = i + 1;
    g = q[i];
    if (i < N - 1) {
      for (j = l; j < N; ++j) {
        U[t + j] = 0.0;
      }
    }
    if (g != 0.0) {
      if (i != N - 1) {
        for (j = l; j < N; ++j) {
          s = 0.0;
          for (k = l; k < M; ++k) {
            s += (U[k * N + i] * U[k * N + j]);
          }
          f = (s / U[t + i]) / g;
          for (k = i; k < M; ++k) {
            U[k * N + j] += (f * U[k * N + i]);
          }
        }
      }
      for (j = i; j < M; ++j) {
        U[j * N + i] = U[j * N + i] / g;
      }
    } else {
      for (j = i; j < M; ++j) {
        U[j * N + i] = 0.0;
      }
    }
    U[t + i] += 1.0;
  }
  eps = eps * x;
  for (k = N - 1; k >= 0; --k) {
    iter = 0;
    while (1) {
      iter++;
      if (iter > 50) {
        printf("Convergence Not Achieved \n");
        return 15;
      }
      cancel = 1;
      for (l = k; l >= 0; --l) {
        if (fabs(e[l]) <= eps) {
          cancel = 0;
          break;
        }
        if (fabs(q[l - 1]) <= eps) {
          break;
        }
      }
      if (cancel) {
        c = 0.0;
        s = 1.0;
        l1 = l - 1;
        for (i = l; i <= k; ++i) {
          f = s * e[i];
          e[i] *= c;
          if (fabs(f) <= eps) {
            break;
          }
          g = q[i];
          h = q[i] = hypot(f, g);
          c = g / h;
          s = -f / h;
          for (j = 0; j < M; ++j) {
            t = j * N;
            y = U[t + l1];
            z = U[t + i];
            U[t + l1] = y * c + z * s;
            U[t + i] = z * c - y * s;
          }
        }
      }
      z = q[k];
      if (l != k) {
        x = q[l];
        y = q[k - 1];
        g = e[k - 1];
        h = e[k];
        f = 0.5 * (((g + z) / h) * ((g - z) / y) + y / h - h / y);
        g = hypot(f, 1.0);
        if (f < 0.0) {
          temp = f - g;
        } else {
          temp = f + g;
        }
        f = x - (z / x) * z + (h / x) * (y / temp - h);
        c = s = 1.0;
        for (i = l + 1; i <= k; ++i) {
          g = e[i];
          y = q[i];
          h = s * g;
          g = c * g;
          e[i - 1] = z = hypot(f, h);
          c = f / z;
          s = h / z;
          f = x * c + g * s;
          g = g * c - x * s;
          h = y * s;
          y *= c;
          for (j = 0; j < N; ++j) {
            t = j * N;
            x = V[t + i - 1];
            z = V[t + i];
            V[t + i - 1] = x * c + z * s;
            V[t + i] = z * c - x * s;
          }
          q[i - 1] = z = hypot(f, h);
          if (z != 0.0) {
            c = f / z;
            s = h / z;
          }
          f = c * g + s * y;
          x = c * y - s * g;
          for (j = 0; j < M; ++j) {
            t = j * N;
            y = U[t + i - 1];
            z = U[t + i];
            U[t + i - 1] = y * c + z * s;
            U[t + i] = z * c - y * s;
          }
        }
        e[l] = 0.0;
        e[k] = f;
        q[k] = x;
      } else {
        if (z < 0.0) {
          q[k] = -z;
          for (j = 0; j < N; j++) {
            t = j * N;
            V[t + k] = -V[t + k];
          }
        }
        break;
      }
    }
  }
  svd_sort(U, M, N, V, q);
  free(e);
  return ierr;
}
```