user: Please show me the C implementation that matches the assembly code listed below:

```asm
<svd_gr>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xc8,%rsp
  mov    %rdi,%rbx
  mov    %esi,%ebp
  mov    %edx,%r12d
  mov    %rcx,%r14
  mov    %rcx,0x38(%rsp)
  mov    %r8,0x40(%rsp)
  mov    %r9,%r13
  movslq %edx,%rax
  mov    %rax,0xa8(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x50(%rsp)
  mov    %rax,%rdi
  call   <malloc@plt>
  mov    %rax,%r15
  mov    $0x0,%eax
  call   <macheps@plt>
  pxor   %xmm6,%xmm6
  cvtsi2sd %eax,%xmm6
  movsd  %xmm6,0xb0(%rsp)
  mov    %r12d,%edx
  imul   %ebp,%edx
  test   %edx,%edx
  jle    L694
  mov    %edx,%edx
  mov    $0x0,%eax
  mov    %r14,%rcx
L1228:
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%rcx,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L1228
L694:
  test   %r12d,%r12d
  jle    L717
  lea    -0x2(%r12),%eax
  mov    %eax,0x28(%rsp)
  lea    0x1(%r12),%eax
  mov    %eax,0x90(%rsp)
  mov    %r13,0x58(%rsp)
  mov    0x50(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x98(%rsp)
  mov    0x38(%rsp),%rax
  mov    %rax,0x88(%rsp)
  movl   $0x1,0x48(%rsp)
  movl   $0x0,0x30(%rsp)
  mov    $0x1,%ebx
  mov    $0x0,%r14d
  pxor   %xmm1,%xmm1
  movsd  %xmm1,0x8(%rsp)
  movsd  %xmm1,0x10(%rsp)
  mov    %r13,0xa0(%rsp)
  jmp    L929
L707:
  movslq 0x30(%rsp),%rax
  mov    %rax,0xb8(%rsp)
  add    %r14,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
  mov    %rax,0x60(%rsp)
  mov    %rax,%rdx
  mov    %r13d,%eax
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
L1109:
  movsd  (%rdx),%xmm0
  andpd  D253(%rip),%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  mov    %eax,0x8(%rsp)
  add    $0x1,%eax
  add    0x50(%rsp),%rdx
  cmp    %eax,%ebp
  jne    L1109
  ucomisd D240(%rip),%xmm0
  jp     L110
  pxor   %xmm0,%xmm0
  jne    L110
L539:
  mov    0x58(%rsp),%rax
  mov    %rax,0x18(%rsp)
  mulsd  (%rsp),%xmm0
  movsd  %xmm0,(%rax)
  lea    -0x1(%r12),%eax
  cmp    0x68(%rsp),%eax
  jne    L1332
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L403
L110:
  mov    0x60(%rsp),%rax
  mov    %r13d,%edx
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x18(%rsp)
L481:
  movsd  (%rax),%xmm0
  divsd  (%rsp),%xmm0
  movsd  %xmm0,(%rax)
  mulsd  %xmm0,%xmm0
  addsd  0x18(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  mov    %edx,%ecx
  add    $0x1,%edx
  add    0x50(%rsp),%rax
  cmp    %ecx,0x8(%rsp)
  jne    L481
  mov    0x48(%rsp),%eax
  sub    $0x1,%eax
  cltq
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
  mov    %rax,0x80(%rsp)
  movsd  (%rax),%xmm6
  movsd  %xmm6,0x70(%rsp)
  pxor   %xmm0,%xmm0
  comisd %xmm6,%xmm0
  ja     L224
  pxor   %xmm0,%xmm0
  movsd  0x18(%rsp),%xmm6
  ucomisd %xmm6,%xmm0
  ja     L1320
  sqrtsd %xmm6,%xmm6
  movapd %xmm6,%xmm0
L1369:
  xorpd  D247(%rip),%xmm0
L222:
  movsd  0x70(%rsp),%xmm1
  subsd  %xmm0,%xmm1
  mov    0x80(%rsp),%rax
  movsd  %xmm1,(%rax)
  lea    -0x1(%r12),%eax
  cmp    0x68(%rsp),%eax
  jg     L1356
  mov    0x60(%rsp),%rax
L435:
  movsd  (%rsp),%xmm1
  mulsd  (%rax),%xmm1
  movsd  %xmm1,(%rax)
  mov    %r13d,%edx
  add    $0x1,%r13d
  add    0x50(%rsp),%rax
  cmp    %edx,0x8(%rsp)
  jne    L435
  jmp    L539
L224:
  movsd  0x18(%rsp),%xmm7
  ucomisd %xmm7,%xmm0
  ja     L687
  sqrtsd %xmm7,%xmm7
  movapd %xmm7,%xmm0
  jmp    L222
L687:
  movsd  0x18(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L222
L1320:
  movsd  0x18(%rsp),%xmm0
  call   <sqrt@plt>
  jmp    L1369
L1356:
  cmp    %ebx,%r12d
  jle    L243
  movsd  0x70(%rsp),%xmm3
  mulsd  %xmm0,%xmm3
  subsd  0x18(%rsp),%xmm3
  mov    0xb8(%rsp),%rax
  add    %rbx,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rdi
  mov    0x28(%rsp),%eax
  mov    $0xfffffffffffffffe,%rsi
  sub    %rax,%rsi
  mov    $0x1,%ecx
  mov    $0xffffffffffffffff,%rdx
  mov    0x8(%rsp),%r8d
  jmp    L1115
L982:
  add    $0x8,%rdi
  sub    $0x1,%rdx
  add    $0x1,%rcx
  cmp    %rsi,%rdx
  je     L134
L1115:
  mov    0x88(%rsp),%rax
  mov    %r13d,%r9d
  pxor   %xmm1,%xmm1
L983:
  movsd  (%rax),%xmm2
  mulsd  (%rax,%rcx,8),%xmm2
  addsd  %xmm2,%xmm1
  mov    %r9d,%r10d
  add    $0x1,%r9d
  add    0x50(%rsp),%rax
  cmp    %r10d,%r8d
  jne    L983
  divsd  %xmm3,%xmm1
  mov    %rdi,%rax
  mov    %r13d,%r9d
L1156:
  movapd %xmm1,%xmm2
  mulsd  (%rax,%rdx,8),%xmm2
  addsd  (%rax),%xmm2
  movsd  %xmm2,(%rax)
  mov    %r9d,%r10d
  add    $0x1,%r9d
  add    0x50(%rsp),%rax
  cmp    %r10d,%r8d
  jne    L1156
  jmp    L982
L243:
  mov    0x60(%rsp),%rax
  jmp    L435
L134:
  mov    0x60(%rsp),%rax
  jmp    L435
L1332:
  mov    %ebx,0x68(%rsp)
  cmp    %ebx,%ebp
  jle    L1181
  movslq 0x30(%rsp),%rsi
  mov    %rsi,0x60(%rsp)
  lea    (%rsi,%rbx,1),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%r13
  add    $0x10,%rdi
  mov    %rdi,0x70(%rsp)
  lea    -0x1(%rbp),%eax
  sub    0x78(%rsp),%eax
  lea    (%rsi,%r14,1),%rdx
  add    %rdx,%rax
  lea    (%rdi,%rax,8),%rdx
  mov    %r13,%rax
  pxor   %xmm6,%xmm6
  movapd %xmm6,%xmm1
L187:
  movsd  (%rax),%xmm0
  andpd  D253(%rip),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L187
  movsd  %xmm1,0x8(%rsp)
  ucomisd D240(%rip),%xmm1
  jp     L337
  je     L403
L337:
  cmp    0x68(%rsp),%r12d
  jle    L86
  mov    0x28(%rsp),%eax
  add    0x60(%rsp),%rax
  add    %r14,%rax
  mov    0x70(%rsp),%rsi
  lea    (%rsi,%rax,8),%rdx
  mov    %r13,%rax
  pxor   %xmm5,%xmm5
  movsd  %xmm5,(%rsp)
L334:
  movsd  (%rax),%xmm0
  divsd  0x8(%rsp),%xmm0
  movsd  %xmm0,(%rax)
  mulsd  %xmm0,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L334
  movslq 0x48(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  movsd  (%rax),%xmm7
  movsd  %xmm7,0x80(%rsp)
  pxor   %xmm0,%xmm0
  comisd %xmm7,%xmm0
  ja     L424
  pxor   %xmm0,%xmm0
  ucomisd (%rsp),%xmm0
  ja     L1234
L551:
  movsd  (%rsp),%xmm1
  sqrtsd %xmm1,%xmm1
L32:
  xorpd  D247(%rip),%xmm1
L1130:
  movsd  0x80(%rsp),%xmm5
  movapd %xmm5,%xmm0
  mulsd  %xmm1,%xmm0
  subsd  (%rsp),%xmm0
  subsd  %xmm1,%xmm5
  mov    0x78(%rsp),%rax
  movsd  %xmm5,(%rax)
  cmp    0x68(%rsp),%r12d
  jle    L1189
L736:
  mov    0x38(%rsp),%rax
  mov    0x60(%rsp),%rsi
  lea    (%rax,%rsi,8),%rdx
  mov    %rbx,%rax
L1061:
  movsd  (%rdx,%rax,8),%xmm2
  divsd  %xmm0,%xmm2
  movsd  %xmm2,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L1061
L1189:
  mov    0x30(%rsp),%eax
  lea    (%rax,%r12,1),%ecx
  movslq %ecx,%rcx
  mov    0x38(%rsp),%rax
  lea    (%rax,%rcx,8),%rdx
  mov    0x60(%rsp),%rsi
  sub    %rcx,%rsi
  mov    0x28(%rsp),%eax
  add    %r14,%rax
  add    %rcx,%rax
  mov    0x70(%rsp),%rdi
  lea    (%rdi,%rax,8),%rcx
  lea    0x0(,%rbx,8),%r8
  mov    0x20(%rsp),%edi
L199:
  cmp    0x68(%rsp),%r12d
  jle    L1302
  lea    (%rdx,%r8,1),%rax
  pxor   %xmm2,%xmm2
L200:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rsi,8),%xmm0
  addsd  %xmm0,%xmm2
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L200
  mov    %rbx,%rax
L60:
  movapd %xmm2,%xmm0
  mulsd  (%r15,%rax,8),%xmm0
  addsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,%r12d
  jg     L60
L1302:
  add    $0x1,%edi
  mov    0x50(%rsp),%rax
  add    %rax,%rdx
  sub    0xa8(%rsp),%rsi
  add    %rax,%rcx
  cmp    %edi,%ebp
  jne    L199
  cmp    0x68(%rsp),%r12d
  jle    L100
  mov    0x28(%rsp),%eax
  add    0x60(%rsp),%rax
  add    %r14,%rax
  mov    0x70(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
L917:
  movsd  0x8(%rsp),%xmm0
  mulsd  0x0(%r13),%xmm0
  movsd  %xmm0,0x0(%r13)
  add    $0x8,%r13
  cmp    %rax,%r13
  jne    L917
  movsd  (%r15,%r14,8),%xmm0
  movq   D253(%rip),%xmm3
  andpd  %xmm3,%xmm0
  mov    0x18(%rsp),%rax
  movsd  (%rax),%xmm2
  andpd  %xmm3,%xmm2
  addsd  %xmm2,%xmm0
  maxsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x10(%rsp)
  jmp    L388
L424:
  ucomisd (%rsp),%xmm0
  ja     L950
L1019:
  movsd  (%rsp),%xmm1
  sqrtsd %xmm1,%xmm1
  jmp    L1130
L21:
  pxor   %xmm6,%xmm6
  movsd  %xmm6,(%rsp)
  jmp    L1019
L950:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  0x80(%rsp),%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  subsd  (%rsp),%xmm0
  subsd  %xmm1,%xmm7
  mov    0x78(%rsp),%rax
  movsd  %xmm7,(%rax)
  jmp    L736
L1234:
  movsd  (%rsp),%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L32
L1181:
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
  jmp    L403
L323:
  movslq %r14d,%rax
  mov    0x38(%rsp),%rsi
  mulsd  0x8(%rsi,%rax,8),%xmm1
  cmp    %r9d,%r12d
  jle    L772
  movslq %r9d,%r8
  mov    0x8(%rsp),%rax
  lea    (%r8,%rax,1),%rdi
  lea    (%rsi,%rdi,8),%rbp
  mov    %rbp,0x18(%rsp)
  mov    %r12d,%edx
  imul   %r9d,%edx
  movslq %edx,%rdx
  lea    (%rdx,%r10,1),%rax
  mov    0x40(%rsp),%rsi
  lea    (%rsi,%rax,8),%rsi
  mov    0x88(%rsp),%eax
  sub    %r9d,%eax
  add    %rdi,%rax
  mov    0x90(%rsp),%rdi
  lea    (%rdi,%rax,8),%rdi
  mov    %rbp,%rax
L656:
  movsd  (%rax),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi)
  add    $0x8,%rax
  add    %rcx,%rsi
  cmp    %rdi,%rax
  jne    L656
  add    %r8,%rdx
  mov    0x40(%rsp),%rax
  lea    (%rax,%rdx,8),%rbp
  mov    %r10,%rsi
  sub    %r8,%rsi
  mov    %r9d,%r13d
  jmp    L353
L648:
  lea    0x1(%r13),%eax
  add    $0x8,%rbp
  sub    $0x1,%rsi
  cmp    %r8d,%r13d
  je     L1111
  mov    %eax,%r13d
L353:
  mov    %rbp,%rdx
  mov    0x18(%rsp),%rax
  pxor   %xmm1,%xmm1
L498:
  movsd  (%rax),%xmm0
  mulsd  (%rdx),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x8,%rax
  add    %rcx,%rdx
  cmp    %rdi,%rax
  jne    L498
  mov    %rbp,%rax
  mov    %r9d,%edx
L1345:
  movapd %xmm1,%xmm0
  mulsd  (%rax,%rsi,8),%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  mov    %edx,%r8d
  add    $0x1,%edx
  add    %rcx,%rax
  cmp    %edx,%r12d
  jne    L1345
  jmp    L648
L1111:
  movslq %r9d,%rax
  mov    %r9d,%edx
  imul   %r12d,%edx
  movslq %edx,%rdx
  add    %r10,%rdx
  mov    0x40(%rsp),%rdi
  lea    (%rdi,%rdx,8),%rdx
L272:
  movq   $0x0,(%rdx)
  movq   $0x0,(%rbx,%rax,8)
  add    $0x1,%rax
  add    %rcx,%rdx
  cmp    %eax,%r12d
  jg     L272
L772:
  movsd  %xmm2,(%r11)
  movsd  (%r15,%r10,8),%xmm1
  sub    $0x1,%r10
  add    0x58(%rsp),%r11
  add    0x48(%rsp),%r14d
  add    0x30(%rsp),%rbx
  mov    0x28(%rsp),%rdi
  add    %rdi,0x8(%rsp)
  test   %r10d,%r10d
  js     L493
L1212:
  mov    0x20(%rsp),%r9d
  mov    %r10d,0x20(%rsp)
  cmp    %r10d,(%rsp)
  jle    L772
  ucomisd D240(%rip),%xmm1
  jp     L323
  jne    L323
  cmp    %r9d,%r12d
  jg     L1111
  jmp    L772
L493:
  mov    0x98(%rsp),%ebp
  mov    0xa0(%rsp),%r13
  mov    0x80(%rsp),%r14
  mov    0x38(%rsp),%rdi
  add    %rdi,%r14
  mov    %r12d,0x18(%rsp)
  lea    -0x2(%r12),%eax
  mov    (%rsp),%esi
  sub    %esi,%eax
  mov    %eax,0x20(%rsp)
  mov    0x28(%rsp),%rax
  sub    $0x1,%rax
  mov    %rax,0x90(%rsp)
  imul   %r12d,%esi
  mov    %esi,0x30(%rsp)
  mov    %r12d,%eax
  imul   %r12d,%eax
  mov    %eax,0x80(%rsp)
  mov    0x70(%rsp),%rbx
  lea    0x10(%rdi),%rax
  mov    %rax,0x98(%rsp)
  movsd  D258(%rip),%xmm3
  mov    0x50(%rsp),%rdx
  mov    %r15,0xa0(%rsp)
  mov    %r13,0x88(%rsp)
  jmp    L645
L695:
  cmp    %r9d,%r12d
  jle    L775
  movslq %r9d,%rax
  add    0x60(%rsp),%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
  mov    0x20(%rsp),%esi
  add    0x68(%rsp),%rsi
  mov    0x98(%rsp),%rdi
  lea    (%rdi,%rsi,8),%rsi
L542:
  movq   $0x0,(%rax)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L542
  ucomisd D240(%rip),%xmm2
  jp     L591
  je     L201
L591:
  movslq 0x78(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%r11
  movslq %r9d,%rsi
  movslq 0x30(%rsp),%rax
  add    %rax,%rsi
  lea    (%rdi,%rsi,8),%r8
  mov    0x20(%rsp),%eax
  lea    0x2(%rax),%r13
  movslq 0x80(%rsp),%rax
  add    %rbx,%rax
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x8(%rsp)
  mov    $0xffffffffffffffff,%rdi
  mov    $0x1,%esi
  jmp    L333
L665:
  cmp    %r10d,(%rsp)
  jne    L816
  mov    (%rsp),%ecx
L312:
  cmp    %ecx,%ebp
  jle    L1248
  mov    %r12d,%eax
  imul   %ecx,%eax
  cltq
  add    %rbx,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
L393:
  movsd  (%rax),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%ecx
  add    %rdx,%rax
  cmp    %ecx,%ebp
  jne    L393
L1248:
  movapd %xmm3,%xmm0
  addsd  (%r14),%xmm0
  movsd  %xmm0,(%r14)
  sub    $0x1,%rbx
  add    0x58(%rsp),%r14
  subl   $0x1,0x18(%rsp)
  mov    0x28(%rsp),%rsi
  add    %rsi,0x60(%rsp)
  addl   $0x1,0x20(%rsp)
  mov    0x90(%rsp),%rsi
  add    %rsi,0x68(%rsp)
  mov    0x48(%rsp),%esi
  add    %esi,0x78(%rsp)
  sub    %r12d,0x30(%rsp)
  sub    %r12d,0x80(%rsp)
  test   %ebx,%ebx
  js     L1349
L645:
  mov    %ebx,%ecx
  mov    0x18(%rsp),%r9d
  mov    0x88(%rsp),%rax
  movsd  (%rax,%rbx,8),%xmm2
  mov    %ebx,%r10d
  cmp    %ebx,(%rsp)
  jg     L695
  ucomisd D240(%rip),%xmm2
  jp     L665
  jne    L665
L201:
  cmp    %r10d,%ebp
  jle    L1248
  movslq 0x30(%rsp),%rax
  add    %rbx,%rax
  mov    0x38(%rsp),%rsi
  lea    (%rsi,%rax,8),%rax
L933:
  movq   $0x0,(%rax)
  add    $0x1,%ecx
  add    %rdx,%rax
  cmp    %ecx,%ebp
  jne    L933
  jmp    L1248
L816:
  cmp    %r9d,%r12d
  jg     L591
  jmp    L312
L239:
  mov    0x8(%rsp),%rax
  mov    %r9d,%r15d
  pxor   %xmm1,%xmm1
L1004:
  movsd  (%rax),%xmm0
  mulsd  (%rax,%rsi,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%r15d
  add    %rdx,%rax
  cmp    %r15d,%ebp
  jne    L1004
L342:
  divsd  (%r11),%xmm1
  divsd  %xmm2,%xmm1
  cmp    %r10d,%ebp
  jle    L942
  mov    %r8,%rax
  mov    %ecx,%r15d
L58:
  movapd %xmm1,%xmm0
  mulsd  (%rax,%rdi,8),%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%r15d
  add    %rdx,%rax
  cmp    %r15d,%ebp
  jne    L58
L942:
  add    $0x1,%rsi
  add    $0x8,%r8
  sub    $0x1,%rdi
  cmp    %r13,%rsi
  je     L312
L333:
  pxor   %xmm1,%xmm1
  cmp    %r9d,%ebp
  jg     L239
  jmp    L342
L1349:
  mov    0xa0(%rsp),%r15
  mov    0x88(%rsp),%r13
  movsd  0x10(%rsp),%xmm6
  mulsd  0xb0(%rsp),%xmm6
  movsd  %xmm6,0x48(%rsp)
  mov    0x70(%rsp),%rax
  shl    $0x3,%rax
  mov    %rax,0x58(%rsp)
  mov    %ebp,%r14d
  mov    %r12d,%eax
  mov    %r15,%r12
  mov    %r13,%rbx
  mov    %eax,%r15d
  jmp    L177
L62:
  mov    0x88(%rsp),%eax
  mov    %eax,0x20(%rsp)
  jmp    L17
L448:
  lea    D77(%rip),%rdi
  call   <puts@plt>
  mov    $0xf,%eax
L465:
  add    $0xc8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L296:
  add    $0x1,%rbx
  sub    $0x1,%r12
  cmp    %ebx,0x30(%rsp)
  jl     L932
L385:
  movsd  0x0(%r13,%rbx,8),%xmm0
  movapd %xmm4,%xmm7
  mulsd  %xmm0,%xmm7
  movsd  %xmm7,(%rsp)
  mulsd  %xmm3,%xmm0
  movsd  %xmm0,0x0(%r13,%rbx,8)
  movapd %xmm7,%xmm0
  andpd  D253(%rip),%xmm0
  movsd  0x48(%rsp),%xmm5
  comisd %xmm0,%xmm5
  jae    L1353
  movsd  (%r15,%rbx,8),%xmm6
  movsd  %xmm6,0x8(%rsp)
  movapd %xmm6,%xmm1
  movapd %xmm7,%xmm0
  call   <hypot@plt>
  movsd  %xmm0,(%r15,%rbx,8)
  movsd  0x8(%rsp),%xmm3
  divsd  %xmm0,%xmm3
  movsd  (%rsp),%xmm4
  xorpd  D247(%rip),%xmm4
  divsd  %xmm0,%xmm4
  test   %r14d,%r14d
  jle    L296
  mov    0x38(%rsp),%rax
  lea    (%rax,%rbx,8),%rax
  mov    $0x0,%edx
L676:
  movsd  -0x8(%rax,%r12,8),%xmm1
  movsd  (%rax),%xmm0
  movapd %xmm3,%xmm2
  mulsd  %xmm1,%xmm2
  movapd %xmm4,%xmm5
  mulsd  %xmm0,%xmm5
  addsd  %xmm5,%xmm2
  movsd  %xmm2,-0x8(%rax,%r12,8)
  mulsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rbp,%rax
  cmp    %edx,%r14d
  jne    L676
  jmp    L296
L932:
  mov    %r15,%rbp
  mov    0x10(%rsp),%r15d
  jmp    L710
L426:
  mov    %eax,0x20(%rsp)
L710:
  mov    0x58(%rsp),%rax
  mov    0x0(%rbp,%rax,1),%r12
  mov    0x30(%rsp),%edi
  cmp    %edi,0x20(%rsp)
  je     L599
L304:
  movslq 0x20(%rsp),%rax
  mov    %rax,0x68(%rsp)
  movsd  0x0(%rbp,%rax,8),%xmm5
  movsd  %xmm5,0x18(%rsp)
  mov    0x58(%rsp),%rax
  mov    -0x8(%rbp,%rax,1),%rbx
  movsd  -0x8(%r13,%rax,1),%xmm1
  add    %r13,%rax
  mov    %rax,0x60(%rsp)
  movsd  (%rax),%xmm7
  movsd  %xmm7,0x8(%rsp)
  movq   %r12,%xmm0
  addsd  %xmm1,%xmm0
  divsd  %xmm7,%xmm0
  movq   %r12,%xmm6
  subsd  %xmm6,%xmm1
  movq   %rbx,%xmm5
  divsd  %xmm5,%xmm1
  mulsd  %xmm1,%xmm0
  movq   %rbx,%xmm1
  divsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  divsd  %xmm5,%xmm7
  subsd  %xmm7,%xmm0
  mulsd  D150(%rip),%xmm0
  movsd  D258(%rip),%xmm1
  movsd  %xmm0,(%rsp)
  call   <hypot@plt>
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm6
  comisd %xmm6,%xmm1
  ja     L414
  movsd  (%rsp),%xmm1
  addsd  %xmm0,%xmm1
L863:
  movq   %rbx,%xmm0
  divsd  %xmm1,%xmm0
  movsd  0x8(%rsp),%xmm5
  subsd  %xmm5,%xmm0
  movsd  0x18(%rsp),%xmm6
  divsd  %xmm6,%xmm5
  mulsd  %xmm5,%xmm0
  movq   %r12,%xmm1
  divsd  %xmm6,%xmm1
  movq   %r12,%xmm7
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm6
  addsd  %xmm6,%xmm0
  movsd  %xmm0,0x10(%rsp)
  mov    0x20(%rsp),%ebx
  add    $0x1,%ebx
  cmp    %ebx,0x30(%rsp)
  jl     L547
  movslq %ebx,%rbx
  movsd  D258(%rip),%xmm7
  movsd  %xmm7,0x8(%rsp)
  movsd  %xmm7,(%rsp)
  mov    %rbp,%r12
  mov    0x50(%rsp),%rbp
  jmp    L938
L1353:
  mov    %r15,%rbp
  mov    0x10(%rsp),%r15d
  jmp    L710
L414:
  subsd  %xmm0,%xmm6
  movapd %xmm6,%xmm1
  jmp    L863
L600:
  movsd  0x10(%rsp),%xmm7
  divsd  %xmm0,%xmm7
  movsd  %xmm7,0x8(%rsp)
  movsd  0x18(%rsp),%xmm7
  divsd  %xmm0,%xmm7
  movsd  %xmm7,(%rsp)
L136:
  movsd  0x8(%rsp),%xmm7
  movapd %xmm7,%xmm1
  movsd  0x28(%rsp),%xmm6
  mulsd  %xmm6,%xmm1
  movsd  (%rsp),%xmm5
  movapd %xmm5,%xmm0
  movsd  0x20(%rsp),%xmm4
  mulsd  %xmm4,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  mulsd  %xmm7,%xmm4
  movapd %xmm4,%xmm1
  mulsd  %xmm5,%xmm6
  subsd  %xmm6,%xmm1
  movsd  %xmm1,0x18(%rsp)
  test   %r14d,%r14d
  jle    L618
  mov    0x38(%rsp),%rax
  lea    (%rax,%rbx,8),%rax
  mov    $0x0,%edx
L1135:
  movsd  -0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  movsd  0x8(%rsp),%xmm5
  movapd %xmm5,%xmm2
  mulsd  %xmm1,%xmm2
  movsd  (%rsp),%xmm4
  movapd %xmm4,%xmm3
  mulsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
  movsd  %xmm2,-0x8(%rax)
  mulsd  %xmm5,%xmm0
  mulsd  %xmm4,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rbp,%rax
  cmp    %edx,%r14d
  jne    L1135
L618:
  add    $0x1,%rbx
  cmp    %ebx,0x30(%rsp)
  jl     L1263
L938:
  movsd  0x0(%r13,%rbx,8),%xmm0
  movsd  (%r12,%rbx,8),%xmm7
  movsd  %xmm7,0x20(%rsp)
  movsd  (%rsp),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsp)
  mulsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x28(%rsp)
  movsd  0x10(%rsp),%xmm0
  call   <hypot@plt>
  movsd  %xmm0,-0x8(%r13,%rbx,8)
  movsd  0x10(%rsp),%xmm6
  divsd  %xmm0,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movsd  (%rsp),%xmm4
  divsd  %xmm0,%xmm4
  movsd  %xmm4,(%rsp)
  movapd %xmm6,%xmm1
  movsd  0x18(%rsp),%xmm5
  mulsd  %xmm5,%xmm1
  movsd  0x28(%rsp),%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x10(%rsp)
  mulsd  %xmm6,%xmm7
  movapd %xmm7,%xmm0
  mulsd  %xmm4,%xmm5
  subsd  %xmm5,%xmm0
  movsd  %xmm0,0x28(%rsp)
  movsd  0x20(%rsp),%xmm7
  movapd %xmm7,%xmm5
  mulsd  %xmm4,%xmm5
  movsd  %xmm5,0x18(%rsp)
  mulsd  %xmm6,%xmm7
  movsd  %xmm7,0x20(%rsp)
  test   %r15d,%r15d
  jle    L541
  mov    0x40(%rsp),%rax
  lea    (%rax,%rbx,8),%rax
  mov    $0x0,%edx
L897:
  movsd  -0x8(%rax),%xmm1
  movsd  (%rax),%xmm0
  movsd  0x8(%rsp),%xmm6
  movapd %xmm6,%xmm2
  mulsd  %xmm1,%xmm2
  movsd  (%rsp),%xmm7
  movapd %xmm7,%xmm3
  mulsd  %xmm0,%xmm3
  addsd  %xmm3,%xmm2
  movsd  %xmm2,-0x8(%rax)
  mulsd  %xmm6,%xmm0
  mulsd  %xmm7,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    %rbp,%rax
  cmp    %edx,%r15d
  jne    L897
L541:
  movsd  0x18(%rsp),%xmm1
  movsd  0x10(%rsp),%xmm0
  call   <hypot@plt>
  movsd  %xmm0,-0x8(%r12,%rbx,8)
  pxor   %xmm7,%xmm7
  ucomisd %xmm7,%xmm0
  jp     L600
  je     L136
  jmp    L600
L1263:
  mov    %r12,%rbp
L547:
  mov    0x68(%rsp),%rax
  movq   $0x0,0x0(%r13,%rax,8)
  mov    0x60(%rsp),%rax
  movsd  0x10(%rsp),%xmm7
  movsd  %xmm7,(%rax)
  mov    0x78(%rsp),%rax
  movsd  0x18(%rsp),%xmm5
  movsd  %xmm5,(%rax)
  subl   $0x1,0x80(%rsp)
  je     L448
L972:
  mov    0x70(%rsp),%rdi
  mov    %edi,0x30(%rsp)
  mov    %rdi,%rax
  movsd  0x48(%rsp),%xmm1
  test   %edi,%edi
  js     L62
L254:
  movsd  0x0(%r13,%rax,8),%xmm0
  andpd  D253(%rip),%xmm0
  comisd %xmm0,%xmm1
  jae    L426
  movsd  -0x8(%rbp,%rax,8),%xmm0
  andpd  D253(%rip),%xmm0
  comisd %xmm0,%xmm1
  jae    L650
  lea    -0x1(%rax),%edx
  sub    $0x1,%rax
  test   %eax,%eax
  jns    L254
  mov    %edx,0x20(%rsp)
  jmp    L17
L599:
  movq   %r12,%xmm6
  mov    %r13,%r12
  mov    %rbp,%rbx
  pxor   %xmm0,%xmm0
  comisd %xmm6,%xmm0
  ja     L769
L913:
  subq   $0x1,0x70(%rsp)
  mov    0x70(%rsp),%rax
  subq   $0x8,0x58(%rsp)
  test   %eax,%eax
  js     L518
L177:
  mov    0x70(%rsp),%eax
  mov    %eax,0x88(%rsp)
  mov    0x58(%rsp),%rax
  add    %rbx,%rax
  mov    %rax,0x78(%rsp)
  movl   $0x32,0x80(%rsp)
  mov    %r12,%r13
  mov    %rbx,%rbp
  jmp    L972
L769:
  movapd %xmm6,%xmm0
  xorpd  D247(%rip),%xmm0
  mov    0x58(%rsp),%rsi
  movsd  %xmm0,0x0(%rbp,%rsi,1)
  test   %r15d,%r15d
  jle    L913
  mov    0x40(%rsp),%rax
  add    %rsi,%rax
  mov    $0x0,%edx
  movq   D247(%rip),%xmm1
L183:
  movsd  (%rax),%xmm0
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  add    $0x1,%edx
  add    0x50(%rsp),%rax
  cmp    %edx,%r15d
  jne    L183
  jmp    L913
L518:
  mov    %r14d,%ebp
  mov    %r15d,%eax
  mov    %r12,%r15
  mov    %rbx,%r13
  mov    %eax,%r12d
L717:
  mov    %r13,%r8
  mov    0x40(%rsp),%rcx
  mov    %r12d,%edx
  mov    %ebp,%esi
  mov    0x38(%rsp),%rdi
  mov    $0x0,%eax
  call   <svd_sort@plt>
  mov    %r15,%rdi
  call   <free@plt>
  mov    $0x0,%eax
  jmp    L465
L1100:
  mov    0x58(%rsp),%rax
  mov    0x0(%rbp,%rax,1),%r12
  jmp    L304
L650:
  mov    %eax,0x20(%rsp)
L17:
  mov    0x20(%rsp),%esi
  cmp    %esi,0x30(%rsp)
  jl     L1100
  movslq 0x20(%rsp),%rbx
  mov    $0x0,%r12d
  pxor   %xmm3,%xmm3
  movsd  D258(%rip),%xmm4
  mov    %r15d,0x10(%rsp)
  mov    %rbp,%r15
  mov    0x50(%rsp),%rbp
  jmp    L385
L708:
  mov    0xa0(%rsp),%r13
  movsd  %xmm0,0x10(%rsp)
  jmp    L777
L738:
  mov    0xa0(%rsp),%r13
L777:
  lea    -0x1(%r12),%esi
  mov    %esi,(%rsp)
  movslq %esi,%rdi
  mov    %rdi,0x70(%rsp)
  mov    %r12d,%eax
  not    %eax
  mov    %eax,0x48(%rsp)
  cltq
  shl    $0x3,%rax
  mov    %rax,0x58(%rsp)
  mov    %esi,%eax
  imul   %r12d,%eax
  movslq %eax,%rbx
  mov    %rbx,0x60(%rsp)
  mov    %rdi,%rcx
  add    %rbx,%rcx
  mov    %rcx,0x68(%rsp)
  shl    $0x3,%rcx
  mov    %rcx,%rdx
  mov    %rcx,0x80(%rsp)
  mov    0x40(%rsp),%rcx
  mov    %rcx,%r11
  add    %rdx,%r11
  add    %esi,%eax
  mov    %eax,%r14d
  mov    %eax,0x78(%rsp)
  mov    %r12d,%eax
  neg    %eax
  cltq
  mov    %rax,0x28(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x30(%rsp)
  mov    %rbx,%rax
  lea    (%rcx,%rbx,8),%rbx
  mov    %rax,0x8(%rsp)
  mov    %esi,0x88(%rsp)
  mov    0x38(%rsp),%rax
  add    $0x8,%rax
  mov    %rax,0x90(%rsp)
  movsd  D258(%rip),%xmm2
  mov    0x50(%rsp),%rcx
  mov    %rdi,%r10
  mov    %ebp,0x98(%rsp)
  mov    %r13,0xa0(%rsp)
  jmp    L1212
L86:
  movslq 0x48(%rsp),%rax
  mov    0x38(%rsp),%rdi
  lea    (%rdi,%rax,8),%rax
  mov    %rax,0x78(%rsp)
  movsd  (%rax),%xmm5
  movsd  %xmm5,0x80(%rsp)
  pxor   %xmm0,%xmm0
  comisd %xmm5,%xmm0
  ja     L21
  movsd  %xmm0,(%rsp)
  jmp    L551
L775:
  ucomisd D240(%rip),%xmm2
  jp     L312
  je     L201
  jmp    L312
L100:
  mov    0x18(%rsp),%rax
  movsd  (%rax),%xmm0
  andpd  D253(%rip),%xmm0
  movsd  (%r15,%r14,8),%xmm2
  andpd  D253(%rip),%xmm2
  addsd  %xmm2,%xmm0
  comisd 0x10(%rsp),%xmm0
  ja     L708
L1001:
  cmp    %ebx,%r12d
  jle    L738
L388:
  add    $0x1,%r14
  add    $0x1,%rbx
  add    %r12d,0x30(%rsp)
  subl   $0x1,0x28(%rsp)
  mov    0x90(%rsp),%edi
  add    %edi,0x48(%rsp)
  addq   $0x8,0x58(%rsp)
  mov    0x98(%rsp),%rdi
  add    %rdi,0x88(%rsp)
L929:
  mov    %ebx,0x78(%rsp)
  lea    -0x1(%rbx),%r13d
  mov    %ebx,0x20(%rsp)
  mulsd  0x8(%rsp),%xmm1
  movsd  %xmm1,(%r15,%r14,8)
  mov    %r14d,0x68(%rsp)
  cmp    %r14d,%ebp
  jg     L707
  mov    0x58(%rsp),%rax
  mov    %rax,0x18(%rsp)
  movq   $0x0,(%rax)
  pxor   %xmm5,%xmm5
  movsd  %xmm5,0x8(%rsp)
L403:
  mov    0x18(%rsp),%rax
  movsd  (%rax),%xmm0
  andpd  D253(%rip),%xmm0
  movsd  (%r15,%r14,8),%xmm1
  andpd  D253(%rip),%xmm1
  addsd  %xmm1,%xmm0
  pxor   %xmm1,%xmm1
  comisd 0x10(%rsp),%xmm0
  jbe    L1001
  movsd  %xmm0,0x10(%rsp)
  pxor   %xmm1,%xmm1
  jmp    L1001
```

tool_calls: name: retrieve_data
arguments: label: D253
type_infered: qword[2]
name: retrieve_data
arguments: label: D240
type_infered: f64
name: retrieve_data
arguments: label: D247
type_infered: byte[16]
name: retrieve_data
arguments: label: D258
type_infered: f64
name: retrieve_data
arguments: label: D77
type_infered: string
name: retrieve_data
arguments: label: D150
type_infered: f64

tool: {"D253": [0x7fffffffffffffff,0x0000000000000000]}

tool: D240: 0

tool: {"D247": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00]}

tool: D258: 1

tool: D77: Convergence Not Achieved 

tool: D150: 0.5

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;
}
```