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

```asm
<ssvdinv>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0xe8,%rsp
  mov    %rdi,0x58(%rsp)
  mov    %rsi,0xd8(%rsp)
  mov    %edx,%r15d
  movslq %edx,%rbp
  mov    %rbp,0xa0(%rsp)
  lea    0x0(,%rdx,4),%ebx
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,%r14
  mov    %rax,0x68(%rsp)
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0xc0(%rsp)
  mov    %r15d,%edi
  imul   %r15d,%edi
  shl    $0x2,%edi
  call   <malloc@plt>
  mov    %rax,0x60(%rsp)
  mov    %ebx,%edi
  call   <malloc@plt>
  mov    %rax,0x18(%rsp)
  test   %r15d,%r15d
  jle    L807
  lea    0x1(%r15),%edi
  mov    %edi,0x88(%rsp)
  lea    -0x2(%r15),%esi
  mov    %esi,0x78(%rsp)
  lea    0x4(%r14),%rsi
  mov    %rsi,0x38(%rsp)
  mov    %r15d,%esi
  mov    %rsi,0x90(%rsp)
  lea    0x0(,%rbp,4),%rsi
  mov    %rsi,0x10(%rsp)
  movl   $0x1,0x7c(%rsp)
  movl   $0x0,0x48(%rsp)
  movq   $0x1,0x30(%rsp)
  movq   $0x0,0x28(%rsp)
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x8(%rsp)
  movss  %xmm4,0x20(%rsp)
  movss  %xmm4,0x50(%rsp)
  sub    $0x4,%rax
  sub    %r14,%rax
  mov    %rax,0x98(%rsp)
  jmp    L174
L496:
  mov    %r13,%rax
  mov    %r14d,%edx
  pxor   %xmm5,%xmm5
  movss  %xmm5,0x20(%rsp)
L1182:
  movss  (%rax),%xmm0
  divss  0x8(%rsp),%xmm0
  movss  %xmm0,(%rax)
  mulss  %xmm0,%xmm0
  addss  0x20(%rsp),%xmm0
  movss  %xmm0,0x20(%rsp)
  mov    %edx,%ecx
  add    $0x1,%edx
  add    0x10(%rsp),%rax
  cmp    %ecx,%ebx
  jne    L1182
  mov    0x7c(%rsp),%eax
  sub    $0x1,%eax
  cltq
  mov    0x58(%rsp),%rdi
  lea    (%rdi,%rax,4),%r12
  movss  (%r12),%xmm6
  movss  %xmm6,0xa8(%rsp)
  comiss D347(%rip),%xmm6
  jb     L1225
  cvtss2sd %xmm0,%xmm0
  call   <sqrt@plt>
  call   <fabs@plt>
  movaps %xmm0,%xmm4
  xorps  D9(%rip),%xmm4
L614:
  movss  0xa8(%rsp),%xmm5
  movaps %xmm5,%xmm3
  mulss  %xmm4,%xmm3
  subss  0x20(%rsp),%xmm3
  subss  %xmm4,%xmm5
  movss  %xmm5,(%r12)
  mov    0x30(%rsp),%rdi
  cmp    %edi,%ebp
  jle    L370
  mov    0x80(%rsp),%rax
  add    %rdi,%rax
  mov    0x58(%rsp),%rdi
  lea    (%rdi,%rax,4),%rsi
  mov    0x78(%rsp),%eax
  mov    $0xfffffffffffffffe,%rdi
  sub    %rax,%rdi
  mov    $0x1,%ecx
  mov    $0xffffffffffffffff,%rdx
  mov    0x10(%rsp),%r8
  mov    0x44(%rsp),%r9d
  jmp    L136
L1225:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x20(%rsp),%xmm0
  call   <sqrt@plt>
  call   <fabs@plt>
  movaps %xmm0,%xmm4
  jmp    L614
L841:
  movaps %xmm1,%xmm0
  mulss  (%rax,%rdx,4),%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  mov    %r10d,%r11d
  add    $0x1,%r10d
  add    %r8,%rax
  cmp    %r11d,%ebx
  jne    L841
L929:
  add    $0x4,%rsi
  sub    $0x1,%rdx
  add    $0x1,%rcx
  cmp    %rdi,%rdx
  je     L370
L136:
  mov    %r13,%rax
  mov    %r14d,%r10d
  pxor   %xmm1,%xmm1
  cmp    %r9d,%ebp
  jle    L929
L1293:
  movss  (%rax),%xmm0
  mulss  (%rax,%rcx,4),%xmm0
  addss  %xmm0,%xmm1
  mov    %r10d,%r11d
  add    $0x1,%r10d
  add    %r8,%rax
  cmp    %r11d,%ebx
  jne    L1293
  divss  %xmm3,%xmm1
  mov    %rsi,%rax
  mov    %r14d,%r10d
  jmp    L841
L370:
  cmp    0x44(%rsp),%ebp
  jle    L388
L403:
  movss  0x8(%rsp),%xmm0
  mulss  0x0(%r13),%xmm0
  movss  %xmm0,0x0(%r13)
  mov    %r14d,%eax
  add    $0x1,%r14d
  add    0x10(%rsp),%r13
  cmp    %eax,%ebx
  jne    L403
  jmp    L388
L918:
  pxor   %xmm5,%xmm5
  movss  %xmm5,0x8(%rsp)
  movaps %xmm5,%xmm4
  jmp    L388
L379:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x44(%rsp),%xmm0
  call   <sqrt@plt>
  call   <fabs@plt>
  movss  %xmm0,0x20(%rsp)
  jmp    L712
L808:
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x8(%rsp)
  movss  %xmm7,0x20(%rsp)
L320:
  movss  0x0(%r13),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x44(%rsp)
  mov    0x70(%rsp),%rax
  movss  (%rax),%xmm0
  call   <fabs@plt>
  addss  0x44(%rsp),%xmm0
  movss  0x50(%rsp),%xmm5
  maxss  %xmm0,%xmm5
  movss  %xmm5,0x50(%rsp)
  addq   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%rax
  addq   $0x1,0x30(%rsp)
  add    %r15d,0x48(%rsp)
  mov    0x88(%rsp),%esi
  add    %esi,0x7c(%rsp)
  subl   $0x1,0x78(%rsp)
  addq   $0x4,0x38(%rsp)
  cmp    0x90(%rsp),%rax
  je     L647
L174:
  mov    0x28(%rsp),%rax
  mov    %eax,%r14d
  mov    0x30(%rsp),%edi
  mov    %edi,0xb8(%rsp)
  mov    0x38(%rsp),%rsi
  lea    -0x4(%rsi),%rdi
  mov    %rdi,0x70(%rsp)
  movss  0x20(%rsp),%xmm0
  mulss  0x8(%rsp),%xmm0
  movss  %xmm0,-0x4(%rsi)
  mov    %eax,0x44(%rsp)
  mov    %rax,%rdi
  cmp    %eax,%r15d
  jle    L918
  movslq 0x48(%rsp),%rax
  mov    %rax,0x80(%rsp)
  add    %rdi,%rax
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%r13
  mov    %r13,%r12
  mov    %r14d,%ebp
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x8(%rsp)
L549:
  movss  (%r12),%xmm0
  call   <fabs@plt>
  addss  0x8(%rsp),%xmm0
  movss  %xmm0,0x8(%rsp)
  mov    %ebp,%ebx
  add    $0x1,%ebp
  add    0x10(%rsp),%r12
  cmp    %ebp,%r15d
  jne    L549
  movss  0x8(%rsp),%xmm6
  ucomiss D347(%rip),%xmm6
  jp     L496
  pxor   %xmm4,%xmm4
  jne    L496
L388:
  mov    0x98(%rsp),%r13
  add    0x38(%rsp),%r13
  mulss  0x8(%rsp),%xmm4
  movss  %xmm4,0x0(%r13)
  mov    0x30(%rsp),%rax
  cmp    %eax,%r15d
  je     L808
  jle    L1121
  movslq 0x48(%rsp),%r14
  add    %r14,%rax
  mov    0x58(%rsp),%rdi
  lea    (%rdi,%rax,4),%r12
  mov    0x78(%rsp),%eax
  mov    %rax,0x80(%rsp)
  add    %r14,%rax
  add    0x28(%rsp),%rax
  lea    0x8(%rdi,%rax,4),%rbp
  mov    %r12,%rbx
  pxor   %xmm5,%xmm5
  movss  %xmm5,0x8(%rsp)
L983:
  movss  (%rbx),%xmm0
  call   <fabs@plt>
  addss  0x8(%rsp),%xmm0
  movss  %xmm0,0x8(%rsp)
  add    $0x4,%rbx
  cmp    %rbp,%rbx
  jne    L983
  movss  0x8(%rsp),%xmm6
  ucomiss D347(%rip),%xmm6
  jp     L1287
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x20(%rsp)
  je     L320
L1287:
  mov    %r12,%rax
  pxor   %xmm5,%xmm5
  movss  %xmm5,0x44(%rsp)
L1344:
  movss  (%rax),%xmm0
  divss  0x8(%rsp),%xmm0
  movss  %xmm0,(%rax)
  mulss  %xmm0,%xmm0
  addss  0x44(%rsp),%xmm0
  movss  %xmm0,0x44(%rsp)
  add    $0x4,%rax
  cmp    %rbp,%rax
  jne    L1344
  movslq 0x7c(%rsp),%rax
  mov    0x58(%rsp),%rdi
  lea    (%rdi,%rax,4),%rbx
  movss  (%rbx),%xmm4
  movss  %xmm4,0xa8(%rsp)
  comiss D347(%rip),%xmm4
  jb     L379
  cvtss2sd %xmm0,%xmm0
  call   <sqrt@plt>
  call   <fabs@plt>
  xorps  D9(%rip),%xmm0
  movss  %xmm0,0x20(%rsp)
L712:
  movss  0x20(%rsp),%xmm5
  movaps %xmm5,%xmm1
  movss  0xa8(%rsp),%xmm7
  mulss  %xmm7,%xmm1
  subss  0x44(%rsp),%xmm1
  subss  %xmm5,%xmm7
  movss  %xmm7,(%rbx)
  mov    0x80(%rsp),%rax
  add    0x28(%rsp),%rax
  mov    0x68(%rsp),%rcx
  lea    0x8(%rcx,%rax,4),%rsi
  lea    0x0(,%r14,4),%rdi
  mov    %rdi,%rdx
  sub    %rcx,%rdx
  add    0x58(%rsp),%rdx
  mov    0x38(%rsp),%rax
L404:
  movss  (%rdx,%rax,1),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L404
  mov    0x48(%rsp),%eax
  lea    (%rax,%r15,1),%ecx
  movslq %ecx,%rcx
  shl    $0x2,%rcx
  mov    %rcx,%rdx
  sub    0x68(%rsp),%rdx
  mov    0x58(%rsp),%rax
  add    %rax,%rdx
  add    %rax,%rcx
  add    %rax,%rdi
  mov    0xb8(%rsp),%r8d
  mov    0x30(%rsp),%r9
  mov    0x38(%rsp),%r10
L1137:
  mov    %r9,%rax
  pxor   %xmm1,%xmm1
L990:
  movss  (%rcx,%rax,4),%xmm0
  mulss  (%rdi,%rax,4),%xmm0
  addss  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%r15d
  jg     L990
  mov    %r10,%rax
L1040:
  movaps %xmm1,%xmm0
  mulss  (%rax),%xmm0
  addss  (%rdx,%rax,1),%xmm0
  movss  %xmm0,(%rdx,%rax,1)
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L1040
  add    $0x1,%r8d
  mov    0x10(%rsp),%rax
  add    %rax,%rdx
  add    %rax,%rcx
  cmp    %r8d,%r15d
  jne    L1137
L947:
  movss  0x8(%rsp),%xmm0
  mulss  (%r12),%xmm0
  movss  %xmm0,(%r12)
  add    $0x4,%r12
  cmp    %rbp,%r12
  jne    L947
  jmp    L320
L1121:
  pxor   %xmm7,%xmm7
  movss  %xmm7,0x8(%rsp)
  movss  %xmm7,0x20(%rsp)
  jmp    L320
L807:
  jne    L887
  mov    %r15d,%ebx
L705:
  mov    0xc0(%rsp),%rdi
  call   <free@plt>
  mov    0x68(%rsp),%rdi
  call   <free@plt>
  mov    0x60(%rsp),%rdi
  call   <free@plt>
  mov    0x18(%rsp),%rdi
  call   <free@plt>
  jmp    L1268
L887:
  lea    -0x1(%r15),%eax
  movss  D352(%rip),%xmm5
  movss  %xmm5,0x28(%rsp)
  pxor   %xmm4,%xmm4
  movss  %xmm4,0x20(%rsp)
  mov    $0x0,%ecx
  jmp    L147
L1336:
  cmp    %ecx,%r15d
  jle    L626
  lea    0x0(%r13,%rcx,1),%eax
  cltq
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%r9
  movslq %ecx,%r8
  movslq %r13d,%rax
  add    %r8,%rax
  lea    (%rsi,%rax,4),%r10
  mov    %r10,0x10(%rsp)
  mov    %r15d,%esi
  imul   %ecx,%esi
  movslq %esi,%rsi
  lea    (%rsi,%rbx,1),%rdx
  mov    0x60(%rsp),%rdi
  lea    (%rdi,%rdx,4),%rdx
  mov    0x78(%rsp),%edi
  sub    %ecx,%edi
  add    %rax,%rdi
  mov    0x70(%rsp),%rax
  lea    (%rax,%rdi,4),%rdi
  mov    %r10,%rax
L429:
  movss  (%rax),%xmm0
  divss  (%r9),%xmm0
  divss  %xmm1,%xmm0
  movss  %xmm0,(%rdx)
  add    $0x4,%rax
  add    %r14,%rdx
  cmp    %rdi,%rax
  jne    L429
  add    %r8,%rsi
  mov    0x60(%rsp),%rax
  lea    (%rax,%rsi,4),%r9
  mov    %rbx,%rsi
  sub    %r8,%rsi
  shl    $0x2,%rsi
  mov    %ecx,%r10d
L467:
  mov    %r9,%rdx
  mov    0x10(%rsp),%rax
  pxor   %xmm1,%xmm1
L695:
  movss  (%rax),%xmm0
  mulss  (%rdx),%xmm0
  addss  %xmm0,%xmm1
  add    $0x4,%rax
  add    %r14,%rdx
  cmp    %rdi,%rax
  jne    L695
  mov    %r9,%rax
  mov    %ecx,%edx
L1187:
  movaps %xmm1,%xmm0
  mulss  (%rax,%rsi,1),%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  mov    %edx,%r8d
  add    $0x1,%edx
  add    %r14,%rax
  cmp    %edx,%r15d
  jne    L1187
  lea    0x1(%r10),%eax
  add    $0x4,%r9
  sub    $0x4,%rsi
  cmp    %r8d,%r10d
  je     L318
  mov    %eax,%r10d
  jmp    L467
L318:
  mov    %r15d,%eax
  imul   %ecx,%eax
  cltq
  add    %rbx,%rax
  mov    0x60(%rsp),%rdi
  lea    (%rdi,%rax,4),%rdx
  movslq %r13d,%rax
  movslq %ecx,%rsi
  add    %rsi,%rax
  lea    (%rdi,%rax,4),%rax
L142:
  movl   $0x0,(%rdx)
  movl   $0x0,(%rax)
  add    $0x1,%ecx
  add    %r14,%rdx
  add    $0x4,%rax
  cmp    %ecx,%r15d
  jg     L142
L626:
  movss  %xmm2,(%r12)
  movss  0x0(%rbp),%xmm1
  sub    $0x1,%rbx
  add    0x30(%rsp),%r12
  sub    $0x4,%rbp
  sub    %r15d,%r13d
  cmp    0xa8(%rsp),%rbx
  je     L935
  mov    %r11d,%ecx
L35:
  mov    %r11d,%eax
  mov    %ebx,%r11d
  cmp    %eax,%r15d
  jle    L626
  ucomiss D347(%rip),%xmm1
  jp     L1336
  jne    L1336
  cmp    %ecx,%r15d
  jg     L318
  jmp    L626
L935:
  mov    0x48(%rsp),%rax
  add    0x18(%rsp),%rax
  mov    %rax,0x10(%rsp)
  mov    0x38(%rsp),%rax
  mov    0x58(%rsp),%rsi
  add    %rsi,%rax
  mov    %rax,0x20(%rsp)
  lea    0x1(%r15),%eax
  imul   0x50(%rsp),%eax
  mov    %eax,0x38(%rsp)
  mov    0xb0(%rsp),%r12
  mov    %r15d,%r13d
  movss  D44(%rip),%xmm7
  lea    -0x1(%r15),%eax
  mov    %eax,0x48(%rsp)
  lea    0x4(%rsi),%rax
  mov    %rax,0x50(%rsp)
  pxor   %xmm5,%xmm5
  movaps %xmm5,%xmm4
  movaps %xmm7,%xmm6
  movaps %xmm7,%xmm3
  jmp    L22
L606:
  lea    0x1(%r10),%eax
  add    $0x4,%r9
  sub    $0x1,%r8
  add    $0x1,%rdi
  cmp    %ecx,%r10d
  je     L326
  mov    %eax,%r10d
L453:
  mov    %rbx,%rdx
  mov    %r11d,%eax
  pxor   %xmm1,%xmm1
L1342:
  movss  (%rdx),%xmm0
  mulss  (%rdx,%rdi,4),%xmm0
  addss  %xmm0,%xmm1
  mov    %eax,%ecx
  add    $0x1,%eax
  add    %r14,%rdx
  cmp    %eax,%r15d
  jne    L1342
  divss  0x0(%rbp),%xmm1
  mulss  %xmm2,%xmm1
  cmp    %r12d,%eax
  jle    L606
  mov    %r9,%rax
  mov    %r13d,%edx
L43:
  movaps %xmm1,%xmm0
  mulss  (%rax,%r8,4),%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  mov    %edx,%esi
  add    $0x1,%edx
  add    %r14,%rax
  cmp    %esi,%ecx
  jne    L43
  jmp    L606
L1201:
  mov    %r15d,0xbc(%rsp)
  movl   $0x0,0x38(%rsp)
  mov    %r15d,%eax
  mov    %r14,%r15
  mov    %eax,%r14d
  jmp    L862
L1117:
  mov    %r15d,0x38(%rsp)
  mov    0x8(%rsp),%r15
L623:
  mov    0xb0(%rsp),%rax
  mov    %eax,0x44(%rsp)
  cmp    %eax,%r13d
  jg     L490
  movslq %r13d,%rbp
  mov    0x68(%rsp),%rax
  lea    (%rax,%rbp,4),%rbx
  movslq 0x38(%rsp),%rax
  sub    %rax,%rbp
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%rax
  mov    %rax,0x48(%rsp)
  movss  D44(%rip),%xmm4
  pxor   %xmm3,%xmm3
  mov    %r13d,0x50(%rsp)
  mov    %r12d,0x88(%rsp)
  jmp    L738
L118:
  divss  %xmm7,%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  movss  0x20(%rsp),%xmm1
  mulss  %xmm0,%xmm1
L1090:
  movss  %xmm1,(%r12)
  movss  D44(%rip),%xmm0
  divss  %xmm1,%xmm0
  movss  0x10(%rsp),%xmm3
  mulss  %xmm0,%xmm3
  movss  0x8(%rsp),%xmm4
  xorps  D9(%rip),%xmm4
  mulss  %xmm0,%xmm4
  test   %r14d,%r14d
  jle    L1021
  mov    0x48(%rsp),%rax
  mov    $0x0,%edx
L1251:
  movss  (%rax),%xmm1
  movss  (%rax,%rbp,4),%xmm0
  movaps %xmm3,%xmm2
  mulss  %xmm1,%xmm2
  movaps %xmm4,%xmm5
  mulss  %xmm0,%xmm5
  addss  %xmm5,%xmm2
  movss  %xmm2,(%rax)
  mulss  %xmm3,%xmm0
  mulss  %xmm4,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,(%rax,%rbp,4)
  add    $0x1,%edx
  add    %r15,%rax
  cmp    %edx,%r14d
  jne    L1251
L1021:
  add    $0x1,%r13d
  add    $0x4,%rbx
  add    $0x1,%rbp
  cmp    0x44(%rsp),%r13d
  jg     L713
L738:
  movss  (%rbx),%xmm0
  mulss  %xmm0,%xmm4
  movss  %xmm4,0x8(%rsp)
  mulss  %xmm3,%xmm0
  movss  %xmm0,(%rbx)
  movaps %xmm4,%xmm0
  call   <fabs@plt>
  movss  0x28(%rsp),%xmm6
  comiss %xmm0,%xmm6
  jae    L868
  mov    0x18(%rsp),%r12
  sub    0x68(%rsp),%r12
  add    %rbx,%r12
  movss  (%r12),%xmm5
  movss  %xmm5,0x10(%rsp)
  movss  0x8(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x20(%rsp)
  movss  0x10(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x30(%rsp)
  movss  0x20(%rsp),%xmm7
  comiss %xmm0,%xmm7
  ja     L118
  movss  0x30(%rsp),%xmm4
  ucomiss D347(%rip),%xmm4
  jp     L609
  pxor   %xmm1,%xmm1
  je     L1090
L609:
  movss  0x20(%rsp),%xmm0
  divss  0x30(%rsp),%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  movss  0x30(%rsp),%xmm1
  mulss  %xmm0,%xmm1
  jmp    L1090
L713:
  mov    0x50(%rsp),%r13d
  mov    0x88(%rsp),%r12d
  jmp    L490
L351:
  mov    %r15d,0x38(%rsp)
  mov    0x8(%rsp),%r15
  mov    $0x1,%r12d
  jmp    L490
L32:
  mov    %r15d,0x38(%rsp)
  mov    0x8(%rsp),%r15
L490:
  mov    0x70(%rsp),%rax
  mov    (%rax),%ebx
  cmp    0x7c(%rsp),%r12d
  je     L444
  cmpl   $0x1,0xb8(%rsp)
  je     L409
  movslq %r13d,%rax
  mov    %rax,0x88(%rsp)
  lea    0x0(,%rax,4),%rbp
  mov    0x18(%rsp),%rdi
  movss  (%rdi,%rax,4),%xmm5
  movss  %xmm5,0x30(%rsp)
  mov    0x98(%rsp),%rax
  movss  (%rax),%xmm7
  movss  %xmm7,0x38(%rsp)
  mov    0xa0(%rsp),%rax
  movss  (%rax),%xmm1
  mov    0x80(%rsp),%rax
  movss  (%rax),%xmm6
  movss  %xmm6,0x44(%rsp)
  movaps %xmm7,%xmm0
  movd   %ebx,%xmm4
  subss  %xmm4,%xmm0
  movd   %ebx,%xmm2
  addss  %xmm7,%xmm2
  mulss  %xmm2,%xmm0
  movaps %xmm1,%xmm2
  subss  %xmm6,%xmm2
  addss  %xmm6,%xmm1
  mulss  %xmm2,%xmm1
  addss  %xmm1,%xmm0
  cvtss2sd %xmm0,%xmm0
  pxor   %xmm1,%xmm1
  cvtss2sd %xmm6,%xmm1
  addsd  %xmm1,%xmm1
  pxor   %xmm2,%xmm2
  cvtss2sd %xmm7,%xmm2
  mulsd  %xmm2,%xmm1
  divsd  %xmm1,%xmm0
  pxor   %xmm5,%xmm5
  cvtsd2ss %xmm0,%xmm5
  movss  %xmm5,0x8(%rsp)
  movaps %xmm5,%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x10(%rsp)
  movss  D44(%rip),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x20(%rsp)
  movss  0x10(%rsp),%xmm7
  comiss %xmm0,%xmm7
  ja     L835
  movss  0x20(%rsp),%xmm7
  ucomiss D347(%rip),%xmm7
  jp     L860
  pxor   %xmm0,%xmm0
  jne    L860
L1316:
  movss  0x30(%rsp),%xmm7
  movaps %xmm7,%xmm2
  movd   %ebx,%xmm6
  subss  %xmm6,%xmm2
  movd   %ebx,%xmm1
  addss  %xmm7,%xmm1
  mulss  %xmm1,%xmm2
  movss  %xmm2,0x10(%rsp)
  movss  0x8(%rsp),%xmm5
  comiss D347(%rip),%xmm5
  jb     L284
  call   <fabs@plt>
  movaps %xmm0,%xmm1
L758:
  addss  0x8(%rsp),%xmm1
  movss  0x38(%rsp),%xmm0
  divss  %xmm1,%xmm0
  movss  0x44(%rsp),%xmm7
  subss  %xmm7,%xmm0
  mulss  %xmm7,%xmm0
  addss  0x10(%rsp),%xmm0
  divss  0x30(%rsp),%xmm0
  movss  %xmm0,0x20(%rsp)
  cmp    %r13d,0x78(%rsp)
  jl     L168
  mov    0x68(%rsp),%rax
  lea    0x0(%rbp,%rax,1),%r12
  add    0x18(%rsp),%rbp
  movss  D44(%rip),%xmm4
  movss  %xmm4,0x10(%rsp)
  movss  %xmm4,0x8(%rsp)
  jmp    L564
L868:
  mov    0x50(%rsp),%r13d
  mov    0x88(%rsp),%r12d
  jmp    L490
L444:
  pxor   %xmm0,%xmm0
  movd   %ebx,%xmm7
  comiss %xmm7,%xmm0
  ja     L486
L435:
  subq   $0x1,0xb0(%rsp)
  mov    0xb0(%rsp),%rax
  cmp    0xa8(%rsp),%rax
  je     L102
L862:
  mov    0xbc(%rsp),%edi
  mov    %edi,0x7c(%rsp)
  mov    0xb0(%rsp),%rax
  mov    %eax,0xbc(%rsp)
  lea    0x0(,%rax,4),%rsi
  mov    %rsi,0xc8(%rsp)
  mov    %rsi,%rax
  mov    0x18(%rsp),%rcx
  add    %rcx,%rax
  mov    %rax,0x70(%rsp)
  lea    -0x2(%rdi),%eax
  mov    %eax,0x78(%rsp)
  cltq
  shl    $0x2,%rax
  lea    (%rcx,%rax,1),%rbx
  mov    %rbx,0x98(%rsp)
  mov    0x68(%rsp),%rbx
  add    %rbx,%rax
  mov    %rax,0xa0(%rsp)
  add    %rbx,%rsi
  mov    %rsi,0x80(%rsp)
  movslq %edi,%rax
  lea    -0x8(%rcx,%rax,4),%rax
  mov    %rax,0x90(%rsp)
  movl   $0x1e,0xb8(%rsp)
  jmp    L1141
L486:
  movd   %ebx,%xmm0
  xorps  D9(%rip),%xmm0
  movss  %xmm0,(%rax)
  test   %r14d,%r14d
  jle    L435
  mov    0xc8(%rsp),%rax
  add    0x60(%rsp),%rax
  mov    $0x0,%edx
  movss  D9(%rip),%xmm1
L970:
  movss  (%rax),%xmm0
  xorps  %xmm1,%xmm0
  movss  %xmm0,(%rax)
  add    $0x1,%edx
  add    %r15,%rax
  cmp    %edx,%r14d
  jne    L970
  jmp    L435
L835:
  divss  %xmm7,%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x10(%rsp),%xmm0
  jmp    L1316
L860:
  movss  0x10(%rsp),%xmm0
  divss  0x20(%rsp),%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x20(%rsp),%xmm0
  jmp    L1316
L284:
  call   <fabs@plt>
  movaps %xmm0,%xmm1
  xorps  D9(%rip),%xmm1
  jmp    L758
L70:
  divss  %xmm4,%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x8(%rsp),%xmm0
  jmp    L944
L412:
  movss  0x8(%rsp),%xmm0
  divss  0x38(%rsp),%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x38(%rsp),%xmm0
  jmp    L944
L362:
  divss  %xmm4,%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x20(%rsp),%xmm0
L932:
  movss  %xmm0,(%rbx)
  ucomiss D347(%rip),%xmm0
  jp     L884
  je     L966
L884:
  movss  D44(%rip),%xmm1
  divss  %xmm0,%xmm1
  movss  0x30(%rsp),%xmm7
  mulss  %xmm1,%xmm7
  movss  %xmm7,0x8(%rsp)
  mulss  0x38(%rsp),%xmm1
  movss  %xmm1,0x10(%rsp)
L966:
  movss  0x8(%rsp),%xmm7
  movaps %xmm7,%xmm1
  movss  0x48(%rsp),%xmm6
  mulss  %xmm6,%xmm1
  movss  0x10(%rsp),%xmm4
  movaps %xmm4,%xmm0
  movss  0x50(%rsp),%xmm5
  mulss  %xmm5,%xmm0
  addss  %xmm0,%xmm1
  movss  %xmm1,0x20(%rsp)
  mulss  %xmm7,%xmm5
  movaps %xmm5,%xmm1
  mulss  %xmm4,%xmm6
  subss  %xmm6,%xmm1
  movss  %xmm1,0x30(%rsp)
  test   %r14d,%r14d
  jle    L478
  mov    0x58(%rsp),%rax
  sub    0x18(%rsp),%rax
  add    %rbx,%rax
  mov    $0x0,%edx
L548:
  movss  (%rax),%xmm1
  movss  0x4(%rax),%xmm0
  movss  0x8(%rsp),%xmm5
  movaps %xmm5,%xmm2
  mulss  %xmm1,%xmm2
  movss  0x10(%rsp),%xmm4
  movaps %xmm4,%xmm3
  mulss  %xmm0,%xmm3
  addss  %xmm3,%xmm2
  movss  %xmm2,(%rax)
  mulss  %xmm5,%xmm0
  mulss  %xmm4,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,0x4(%rax)
  add    $0x1,%edx
  add    %r15,%rax
  cmp    %edx,%r14d
  jne    L548
L478:
  cmp    %r13d,0x78(%rsp)
  jl     L168
L564:
  add    $0x1,%r13d
  mov    %r12,0x50(%rsp)
  add    $0x4,%r12
  movss  (%r12),%xmm0
  mov    %rbp,%rbx
  add    $0x4,%rbp
  movss  0x0(%rbp),%xmm4
  movss  %xmm4,0x44(%rsp)
  movss  0x10(%rsp),%xmm4
  mulss  %xmm0,%xmm4
  movss  %xmm4,0x10(%rsp)
  movaps %xmm0,%xmm7
  mulss  0x8(%rsp),%xmm7
  movss  %xmm7,0x48(%rsp)
  movss  0x20(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x8(%rsp)
  movss  0x10(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x38(%rsp)
  movss  0x8(%rsp),%xmm4
  comiss %xmm0,%xmm4
  ja     L70
  movss  0x38(%rsp),%xmm4
  ucomiss D347(%rip),%xmm4
  jp     L412
  pxor   %xmm0,%xmm0
  jne    L412
L944:
  mov    0x50(%rsp),%rax
  movss  %xmm0,(%rax)
  movss  0x20(%rsp),%xmm7
  divss  %xmm0,%xmm7
  movss  %xmm7,0x8(%rsp)
  movss  0x10(%rsp),%xmm6
  divss  %xmm0,%xmm6
  movss  %xmm6,0x10(%rsp)
  movaps %xmm7,%xmm1
  movss  0x30(%rsp),%xmm5
  mulss  %xmm5,%xmm1
  movss  0x48(%rsp),%xmm4
  movaps %xmm4,%xmm0
  mulss  %xmm6,%xmm0
  addss  %xmm0,%xmm1
  movss  %xmm1,0x30(%rsp)
  mulss  %xmm7,%xmm4
  movaps %xmm4,%xmm0
  mulss  %xmm6,%xmm5
  subss  %xmm5,%xmm0
  movss  %xmm0,0x48(%rsp)
  movss  0x44(%rsp),%xmm5
  movaps %xmm5,%xmm4
  mulss  %xmm6,%xmm4
  movss  %xmm4,0x38(%rsp)
  mulss  %xmm7,%xmm5
  movss  %xmm5,0x50(%rsp)
  test   %r14d,%r14d
  jle    L768
  mov    0x60(%rsp),%rax
  sub    0x18(%rsp),%rax
  add    %rbx,%rax
  mov    $0x0,%edx
L1325:
  movss  (%rax),%xmm1
  movss  0x4(%rax),%xmm0
  movss  0x8(%rsp),%xmm7
  movaps %xmm7,%xmm2
  mulss  %xmm1,%xmm2
  movss  0x10(%rsp),%xmm6
  movaps %xmm6,%xmm3
  mulss  %xmm0,%xmm3
  addss  %xmm3,%xmm2
  movss  %xmm2,(%rax)
  mulss  %xmm7,%xmm0
  mulss  %xmm6,%xmm1
  subss  %xmm1,%xmm0
  movss  %xmm0,0x4(%rax)
  add    $0x1,%edx
  add    %r15,%rax
  cmp    %edx,%r14d
  jne    L1325
L768:
  movss  0x30(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x20(%rsp)
  movss  0x38(%rsp),%xmm0
  call   <fabs@plt>
  movss  %xmm0,0x44(%rsp)
  movss  0x20(%rsp),%xmm4
  comiss %xmm0,%xmm4
  ja     L362
  movss  0x44(%rsp),%xmm6
  ucomiss D347(%rip),%xmm6
  jp     L830
  jne    L830
  movl   $0x0,(%rbx)
  jmp    L966
L830:
  movss  0x20(%rsp),%xmm0
  divss  0x44(%rsp),%xmm0
  mulss  %xmm0,%xmm0
  cvtss2sd %xmm0,%xmm0
  addsd  D321(%rip),%xmm0
  call   <sqrt@plt>
  mulss  0x44(%rsp),%xmm0
  jmp    L932
L168:
  mov    0x68(%rsp),%rax
  mov    0x88(%rsp),%rsi
  movl   $0x0,(%rax,%rsi,4)
  mov    0x80(%rsp),%rax
  movss  0x20(%rsp),%xmm5
  movss  %xmm5,(%rax)
  mov    0x70(%rsp),%rax
  movss  0x30(%rsp),%xmm6
  movss  %xmm6,(%rax)
  subl   $0x1,0xb8(%rsp)
  mov    0x78(%rsp),%eax
  mov    %eax,0x38(%rsp)
L1141:
  mov    0x90(%rsp),%rbx
  mov    0x7c(%rsp),%r13d
  mov    0x68(%rsp),%rax
  lea    0x4(%rax),%rbp
  mov    %r15,0x8(%rsp)
  mov    0x38(%rsp),%r15d
L512:
  mov    %r13d,%r12d
  sub    $0x1,%r13d
  test   %r12d,%r12d
  je     L1117
  lea    -0x2(%r12),%r15d
  mov    %rbp,%rax
  sub    0x18(%rsp),%rax
  movss  (%rax,%rbx,1),%xmm0
  call   <fabs@plt>
  movss  0x28(%rsp),%xmm7
  comiss %xmm0,%xmm7
  jae    L32
  test   %r13d,%r13d
  je     L351
  movss  (%rbx),%xmm0
  call   <fabs@plt>
  sub    $0x4,%rbx
  movss  0x28(%rsp),%xmm7
  comiss %xmm0,%xmm7
  jb     L512
  mov    %r15d,0x38(%rsp)
  mov    0x8(%rsp),%r15
  jmp    L623
L102:
  mov    %r14d,%eax
  mov    %r15,%r14
  mov    %eax,%r15d
  mov    0x18(%rsp),%rdx
  mov    0xd0(%rsp),%rax
  lea    0x4(%rdx,%rax,4),%rax
  pxor   %xmm0,%xmm0
L167:
  movss  (%rdx),%xmm1
  maxss  %xmm0,%xmm1
  movaps %xmm1,%xmm0
  add    $0x4,%rdx
  cmp    %rdx,%rax
  jne    L167
  mulss  D352(%rip),%xmm0
  mov    0x18(%rsp),%rax
  mov    $0x0,%ebx
  movss  D44(%rip),%xmm3
  jmp    L428
L407:
  movss  %xmm1,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  je     L1013
L428:
  movss  (%rax),%xmm2
  pxor   %xmm1,%xmm1
  comiss %xmm2,%xmm0
  jae    L407
  add    $0x1,%ebx
  movaps %xmm3,%xmm1
  divss  %xmm2,%xmm1
  jmp    L407
L1013:
  test   %r15d,%r15d
  jle    L705
  mov    0x60(%rsp),%rcx
  mov    0x18(%rsp),%rbp
  sub    %rbp,%rcx
  mov    0xd8(%rsp),%r10
  mov    %r15d,%eax
  lea    0x0(%rbp,%rax,4),%rsi
  mov    $0x0,%r9d
  mov    $0x0,%r11d
  jmp    L750
L1207:
  lea    0x1(%r9),%eax
  add    %r14,%rcx
  add    $0x4,%r10
  cmp    %r9d,%r8d
  je     L705
  mov    %eax,%r9d
L750:
  mov    0x58(%rsp),%rdx
  sub    %rbp,%rdx
  mov    %r10,%rdi
  mov    %r11d,%r8d
L613:
  mov    %rbp,%rax
  pxor   %xmm1,%xmm1
L1170:
  movss  (%rcx,%rax,1),%xmm0
  mulss  (%rdx,%rax,1),%xmm0
  mulss  (%rax),%xmm0
  addss  %xmm0,%xmm1
  add    $0x4,%rax
  cmp    %rsi,%rax
  jne    L1170
  movss  %xmm1,(%rdi)
  lea    0x1(%r8),%eax
  add    %r14,%rdi
  add    %r14,%rdx
  cmp    %eax,%r15d
  je     L1207
  mov    %eax,%r8d
  jmp    L613
L409:
  mov    $0x0,%ebx
L1268:
  mov    %ebx,%eax
  add    $0xe8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L790:
  movaps %xmm6,%xmm2
  divss  %xmm0,%xmm2
  movslq 0x38(%rsp),%rax
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%rbp
  mov    %r12,%r8
  sub    %rdi,%r8
  sub    %r12,%rdi
  mov    %r15d,%eax
  imul   %r11d,%eax
  cltq
  add    %r12,%rax
  lea    (%rsi,%rax,4),%rbx
  mov    %r11d,%r10d
  jmp    L453
L1062:
  ucomiss D347(%rip),%xmm0
  jp     L1248
  je     L491
L1248:
  movaps %xmm7,%xmm2
  divss  %xmm0,%xmm2
L326:
  cmp    %r12d,%r15d
  jle    L658
  movslq 0x8(%rsp),%rax
  add    %r12,%rax
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%rax
  mov    %r13d,%edx
L742:
  movaps %xmm2,%xmm0
  mulss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  add    $0x1,%edx
  add    %r14,%rax
  cmp    %edx,%r15d
  jne    L742
L658:
  mov    0x20(%rsp),%rax
  movaps %xmm3,%xmm0
  addss  (%rax),%xmm0
  movss  %xmm0,(%rax)
  sub    $0x1,%r12
  subq   $0x4,0x10(%rsp)
  mov    0x30(%rsp),%rdi
  add    %rdi,%rax
  mov    %rax,0x20(%rsp)
  sub    %r15d,0x8(%rsp)
  mov    0x44(%rsp),%edi
  add    %edi,0x38(%rsp)
  cmp    0xa8(%rsp),%r12
  je     L1201
L22:
  mov    %r13d,%r11d
  mov    %r12d,%r13d
  mov    0x10(%rsp),%rax
  movss  (%rax),%xmm0
  cmp    %r11d,%r15d
  jle    L1062
  movslq %r11d,%rdi
  movslq 0x8(%rsp),%rax
  add    %rdi,%rax
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%r9
  mov    0x48(%rsp),%edx
  sub    %r11d,%edx
  add    %rax,%rdx
  mov    0x50(%rsp),%rax
  lea    (%rax,%rdx,4),%rdx
  mov    %r9,%rax
L1136:
  movl   $0x0,(%rax)
  add    $0x4,%rax
  cmp    %rdx,%rax
  jne    L1136
  ucomiss %xmm5,%xmm0
  jp     L790
  ucomiss %xmm4,%xmm0
  jne    L790
L491:
  cmp    %r12d,%r15d
  jle    L658
  movslq 0x8(%rsp),%rax
  add    %r12,%rax
  mov    0x58(%rsp),%rsi
  lea    (%rsi,%rax,4),%rdx
  mov    %r13d,%eax
L390:
  movl   $0x0,(%rdx)
  add    $0x1,%eax
  add    %r14,%rdx
  cmp    %eax,%r15d
  jne    L390
  jmp    L658
L647:
  movss  0x50(%rsp),%xmm6
  mulss  D352(%rip),%xmm6
  movss  %xmm6,0x28(%rsp)
  lea    -0x1(%r15),%eax
  mov    %r15d,%ecx
L147:
  movslq %eax,%rbx
  mov    %rbx,0xb0(%rsp)
  mov    %r15d,%edi
  not    %edi
  mov    %edi,0x44(%rsp)
  movslq %edi,%rdx
  lea    0x0(,%rdx,4),%rdi
  mov    %rdi,0x30(%rsp)
  mov    %r15d,%edx
  imul   %eax,%edx
  movslq %edx,%rsi
  add    %rbx,%rsi
  shl    $0x2,%rsi
  mov    %rsi,0x38(%rsp)
  add    0x60(%rsp),%rsi
  mov    %rsi,%r12
  lea    0x0(,%rbx,4),%rdi
  mov    %rdi,0x48(%rsp)
  add    0x68(%rsp),%rdi
  mov    %rdi,%rbp
  mov    %eax,0x50(%rsp)
  mov    %edx,0x8(%rsp)
  mov    %eax,%esi
  mov    %rsi,0xd0(%rsp)
  lea    -0x1(%rbx),%rax
  sub    %rsi,%rax
  mov    %rax,0xa8(%rsp)
  mov    0xa0(%rsp),%r14
  shl    $0x2,%r14
  mov    %edx,%r13d
  mov    %r15d,%r11d
  lea    -0x1(%r15),%eax
  mov    %eax,0x78(%rsp)
  mov    0x58(%rsp),%rax
  add    $0x4,%rax
  mov    %rax,0x70(%rsp)
  movss  D44(%rip),%xmm2
  movss  0x20(%rsp),%xmm1
  jmp    L35
```

tool_calls: name: unpack_data
arguments: data_tag: D347
type: f64
name: unpack_data
arguments: data_tag: D9
type: byte[16]
name: unpack_data
arguments: data_tag: D352
type: byte[4]
name: unpack_data
arguments: data_tag: D44
type: f32
name: unpack_data
arguments: data_tag: D321
type: byte[8]

tool: D347: 0

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

tool: {"D352": [0xbd,0x37,0x86,0x35]}

tool: D44: 1

tool: {"D321": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
int ssvdinv(float *a, float *b, int m) {
  int flag, i, its, j, jj, k, l, nm, rank;
  float *vmat, *wmat, *w, *rv1, *tmp, c, f, h, s, x, y, z, anorm, g, scale, at, bt, ct, maxarg1, maxarg2, thresh, wmax, tol, tanorm;
  anorm = g = scale = 0.0;
  tanorm = tol = sizeof(anorm) > 4 ? 1.0e-9 : 1.0e-6;
  rv1 = (float *)malloc(m * sizeof(float));
  tmp = (float *)malloc(m * sizeof(float));
  vmat = (float *)malloc(m * m * sizeof(float));
  wmat = (float *)malloc(m * sizeof(float));
  l = nm = 0;
  for (i = 0; i < m; i++) {
    l = i + 1;
    rv1[i] = scale * g;
    g = s = scale = 0.0;
    for (k = i; k < m; k++)
      scale += fabs(a[k * m + i]);
    if (scale) {
      for (k = i; k < m; k++) {
        a[k * m + i] /= scale;
        s += a[k * m + i] * a[k * m + i];
      }
      f = a[i * m + i];
      g = -((f) >= 0.0 ? fabs(sqrt(s)) : -fabs(sqrt(s)));
      h = f * g - s;
      a[i * m + i] = f - g;
      for (j = l; j < m; j++) {
        s = 0.0;
        for (k = i; k < m; k++)
          s += a[k * m + i] * a[k * m + j];
        f = s / h;
        for (k = i; k < m; k++)
          a[k * m + j] += f * a[k * m + i];
      }
      for (k = i; k < m; k++)
        a[k * m + i] *= scale;
    }
    wmat[i] = scale * g;
    g = s = scale = 0.0;
    if (l != m) {
      for (k = l; k < m; k++)
        scale += fabs(a[i * m + k]);
      if (scale) {
        for (k = l; k < m; k++) {
          a[i * m + k] /= scale;
          s += a[i * m + k] * a[i * m + k];
        }
        f = a[i * m + l];
        g = -((f) >= 0.0 ? fabs(sqrt(s)) : -fabs(sqrt(s)));
        h = f * g - s;
        a[i * m + l] = f - g;
        for (k = l; k < m; k++)
          rv1[k] = a[i * m + k] / h;
        for (j = l; j < m; j++) {
          s = 0.0;
          for (k = l; k < m; k++)
            s += a[j * m + k] * a[i * m + k];
          for (k = l; k < m; k++)
            a[j * m + k] += s * rv1[k];
        }
        for (k = l; k < m; k++)
          a[i * m + k] *= scale;
      }
    }
    anorm = (maxarg1 = (anorm), maxarg2 = ((fabs(wmat[i]) + fabs(rv1[i]))), (maxarg1) > (maxarg2) ? (maxarg1) : (maxarg2));
    tanorm = tol * anorm;
  }
  for (i = m; i--;) {
    if (i < m - 1) {
      if (g) {
        for (j = l; j < m; j++)
          vmat[j * m + i] = (a[i * m + j] / a[i * m + l]) / g;
        for (j = l; j < m; j++) {
          s = 0.0;
          for (k = l; k < m; k++)
            s += a[i * m + k] * vmat[k * m + j];
          for (k = l; k < m; k++)
            vmat[k * m + j] += s * vmat[k * m + i];
        }
      }
      for (j = l; j < m; j++)
        vmat[i * m + j] = vmat[j * m + i] = 0.0;
    }
    vmat[i * m + i] = 1.0;
    g = rv1[i];
    l = i;
  }
  for (i = m; i--;) {
    l = i + 1;
    g = wmat[i];
    for (j = l; j < m; j++)
      a[i * m + j] = 0.0;
    if (g) {
      g = 1.0 / g;
      for (j = l; j < m; j++) {
        s = 0.0;
        for (k = l; k < m; k++)
          s += a[k * m + i] * a[k * m + j];
        f = (s / a[i * m + i]) * g;
        for (k = i; k < m; k++)
          a[k * m + j] += f * a[k * m + i];
      }
      for (j = i; j < m; j++)
        a[j * m + i] *= g;
    } else
      for (j = i; j < m; j++)
        a[j * m + i] = 0.0;
    ++a[i * m + i];
  }
  for (k = m; k--;) {
    for (its = 0; its < 30; its++) {
      flag = 1;
      for (l = k + 1; l--;) {
        nm = l - 1;
        if (fabs(rv1[l]) <= tanorm || !l) {
          flag = 0;
          break;
        }
        if (fabs(wmat[nm]) <= tanorm)
          break;
      }
      if (flag) {
        c = 0.0;
        s = 1.0;
        for (i = l; i <= k; i++) {
          f = s * rv1[i];
          rv1[i] = c * rv1[i];
          if (fabs(f) <= tanorm)
            break;
          g = wmat[i];
          h = ((at = fabs(f)) > (bt = fabs(g)) ? (ct = bt / at, at * sqrt(1.0 + ct * ct)) : (bt ? (ct = at / bt, bt * sqrt(1.0 + ct * ct)) : 0.0));
          wmat[i] = h;
          h = 1.0 / h;
          c = g * h;
          s = -f * h;
          for (j = 0; j < m; j++) {
            y = a[j * m + nm];
            z = a[j * m + i];
            a[j * m + nm] = y * c + z * s;
            a[j * m + i] = z * c - y * s;
          }
        }
      }
      z = wmat[k];
      if (l == k) {
        if (z < 0.0) {
          wmat[k] = -z;
          for (j = 0; j < m; j++)
            vmat[j * m + k] = -vmat[j * m + k];
        }
        break;
      }
      if (its == 29)
        return 0;
      x = wmat[l];
      nm = k - 1;
      y = wmat[nm];
      g = rv1[nm];
      h = rv1[k];
      f = ((y - z) * (y + z) + (g - h) * (g + h)) / (2.0 * h * y);
      g = ((at = fabs(f)) > (bt = fabs(1.0)) ? (ct = bt / at, at * sqrt(1.0 + ct * ct)) : (bt ? (ct = at / bt, bt * sqrt(1.0 + ct * ct)) : 0.0));
      f = ((x - z) * (x + z) + h * ((y / (f + ((f) >= 0.0 ? fabs(g) : -fabs(g)))) - h)) / x;
      c = s = 1.0;
      for (j = l; j <= nm; j++) {
        i = j + 1;
        g = rv1[i];
        y = wmat[i];
        h = s * g;
        g = c * g;
        z = ((at = fabs(f)) > (bt = fabs(h)) ? (ct = bt / at, at * sqrt(1.0 + ct * ct)) : (bt ? (ct = at / bt, bt * sqrt(1.0 + ct * ct)) : 0.0));
        rv1[j] = z;
        c = f / z;
        s = h / z;
        f = x * c + g * s;
        g = g * c - x * s;
        h = y * s;
        y *= c;
        for (jj = 0; jj < m; jj++) {
          x = vmat[jj * m + j];
          z = vmat[jj * m + i];
          vmat[jj * m + j] = x * c + z * s;
          vmat[jj * m + i] = z * c - x * s;
        }
        z = ((at = fabs(f)) > (bt = fabs(h)) ? (ct = bt / at, at * sqrt(1.0 + ct * ct)) : (bt ? (ct = at / bt, bt * sqrt(1.0 + ct * ct)) : 0.0));
        wmat[j] = z;
        if (z) {
          z = 1.0 / z;
          c = f * z;
          s = h * z;
        }
        f = c * g + s * y;
        x = c * y - s * g;
        for (jj = 0; jj < m; jj++) {
          y = a[jj * m + j];
          z = a[jj * m + i];
          a[jj * m + j] = y * c + z * s;
          a[jj * m + i] = z * c - y * s;
        }
      }
      rv1[l] = 0.0;
      rv1[k] = f;
      wmat[k] = x;
    }
  }
  wmax = 0.0;
  w = wmat;
  for (j = m; j--; w++)
    if (*w > wmax)
      wmax = *w;
  thresh = tol * wmax;
  rank = 0;
  w = wmat;
  for (j = m; j--; w++)
    if (*w <= thresh)
      *w = 0.0;
    else {
      rank++;
      *w = 1.0 / *w;
    }
  for (j = 0; j < m; j++)
    for (i = 0; i < m; i++) {
      s = 0.0;
      for (k = 0; k < m; k++)
        s += vmat[k + j * m] * a[k + i * m] * wmat[k];
      b[j + i * m] = s;
    }
  free(tmp);
  free(rv1);
  free(vmat);
  free(wmat);
  return rank;
}
```