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

```asm
<invert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x98,%rsp
  mov    %edi,-0x84(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    -0x84(%rbp),%edx
  movslq %edx,%rax
  sub    $0x1,%rax
  mov    %rax,-0x68(%rbp)
  movslq %edx,%rax
  mov    %rax,%r12
  mov    $0x0,%r13d
  mov    -0x84(%rbp),%r12d
  movslq %r12d,%rax
  sub    $0x1,%rax
  mov    %rax,-0x60(%rbp)
  movslq %r12d,%rax
  mov    %rax,%rcx
  mov    $0x0,%ebx
  mov    %rsp,%rax
  mov    %rax,-0xa0(%rbp)
  mov    -0x84(%rbp),%esi
  mov    -0x84(%rbp),%edi
  movslq %esi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x58(%rbp)
  movslq %esi,%rax
  mov    %rax,-0xc0(%rbp)
  movq   $0x0,-0xb8(%rbp)
  movslq %esi,%rax
  lea    0x0(,%rax,8),%rbx
  movslq %edi,%rax
  sub    $0x1,%rax
  mov    %rax,-0x50(%rbp)
  movslq %esi,%rax
  mov    %rax,-0xb0(%rbp)
  movq   $0x0,-0xa8(%rbp)
  movslq %edi,%rax
  mov    %rax,%r14
  mov    $0x0,%r15d
  mov    -0xa8(%rbp),%rdx
  imul   %r14,%rdx
  mov    -0xb0(%rbp),%rax
  imul   %r15,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0xb0(%rbp),%rax
  mul    %r14
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rax
  mov    %rax,%r10
  mov    $0x0,%r11d
  movslq %edi,%rax
  mov    %rax,%r8
  mov    $0x0,%r9d
  mov    %r11,%rdx
  imul   %r8,%rdx
  mov    %r9,%rax
  imul   %r10,%rax
  lea    (%rdx,%rax,1),%rcx
  mov    %r10,%rax
  mul    %r8
  add    %rdx,%rcx
  mov    %rcx,%rdx
  movslq %esi,%rdx
  movslq %edi,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    $0x10,%eax
  sub    $0x1,%rax
  add    %rdx,%rax
  mov    $0x10,%edi
  mov    $0x0,%edx
  div    %rdi
  imul   $0x10,%rax,%rax
  mov    %rax,%rcx
  and    $0xfffffffffffff000,%rcx
  mov    %rsp,%rdx
  sub    %rcx,%rdx
L130:
  cmp    %rdx,%rsp
  je     L3
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L130
L3:
  mov    %rax,%rdx
  and    $0xfff,%edx
  sub    %rdx,%rsp
  mov    %rax,%rdx
  and    $0xfff,%edx
  test   %rdx,%rdx
  je     L231
  and    $0xfff,%eax
  sub    $0x8,%rax
  add    %rsp,%rax
  orq    $0x0,(%rax)
L231:
  mov    %rsp,%rax
  add    $0x7,%rax
  shr    $0x3,%rax
  shl    $0x3,%rax
  mov    %rax,-0x48(%rbp)
  movl   $0x0,-0x74(%rbp)
  jmp    L32
L61:
  movl   $0x0,-0x70(%rbp)
  jmp    L117
L50:
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x70(%rbp),%eax
  cltq
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x70(%rbp)
L117:
  mov    -0x70(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L50
  addl   $0x1,-0x74(%rbp)
L32:
  mov    -0x74(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L61
  movl   $0x0,-0x74(%rbp)
  jmp    L178
L234:
  mov    -0x74(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x74(%rbp),%eax
  cltq
  movsd  D17(%rip),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x74(%rbp)
L178:
  mov    -0x74(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L234
  mov    -0x48(%rbp),%rcx
  mov    -0x90(%rbp),%rdx
  mov    -0x84(%rbp),%esi
  mov    -0x84(%rbp),%eax
  mov    %eax,%edi
  call   <assign@plt>
  movl   $0x0,-0x74(%rbp)
  jmp    L110
L168:
  mov    -0x74(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x74(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x70(%rbp)
  jmp    L141
L186:
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x70(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  mov    (%rax,%rdx,8),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  mov    %rax,%r13
  mov    %rbx,%rdx
  shr    $0x3,%rdx
  mov    -0x48(%rbp),%rax
  lea    0x1(%rdx),%rcx
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  mov    (%rax,%rdx,8),%rax
  movq   %rax,%xmm0
  call   <fabs@plt>
  cmp    %rax,%r13
  jle    L227
  mov    -0x70(%rbp),%eax
  mov    %eax,-0x78(%rbp)
L227:
  addl   $0x1,-0x70(%rbp)
L141:
  mov    -0x70(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L186
  mov    -0x78(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  je     L51
  movl   $0x0,-0x6c(%rbp)
  jmp    L220
L197:
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    %rbx,%rsi
  shr    $0x3,%rsi
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x78(%rbp),%edx
  movslq %edx,%rdi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rsi,%rdx
  add    %rdi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    -0x48(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x78(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rax,%rdx,8)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x74(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x78(%rbp),%eax
  cltq
  movsd  (%rcx,%rax,8),%xmm0
  mov    -0x74(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x78(%rbp),%eax
  cltq
  movsd  -0x40(%rbp),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x6c(%rbp)
L220:
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L197
L51:
  mov    %rbx,%rdx
  shr    $0x3,%rdx
  mov    -0x48(%rbp),%rax
  lea    0x1(%rdx),%rcx
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  movsd  D17(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L100
L19:
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mulsd  -0x40(%rbp),%xmm0
  mov    -0x48(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x74(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mulsd  -0x40(%rbp),%xmm0
  mov    -0x74(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x6c(%rbp)
L100:
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L19
  movl   $0x0,-0x70(%rbp)
  jmp    L13
L73:
  mov    -0x70(%rbp),%eax
  cmp    -0x74(%rbp),%eax
  je     L127
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x70(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x74(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  movsd  %xmm0,-0x40(%rbp)
  movl   $0x0,-0x6c(%rbp)
  jmp    L242
L18:
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x70(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm0
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  mov    -0x48(%rbp),%rax
  mov    -0x74(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  (%rax,%rdx,8),%xmm1
  mulsd  -0x40(%rbp),%xmm1
  mov    %rbx,%rcx
  shr    $0x3,%rcx
  subsd  %xmm1,%xmm0
  mov    -0x48(%rbp),%rax
  mov    -0x70(%rbp),%edx
  movslq %edx,%rsi
  mov    -0x6c(%rbp),%edx
  movslq %edx,%rdx
  imul   %rcx,%rdx
  add    %rsi,%rdx
  movsd  %xmm0,(%rax,%rdx,8)
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x74(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  movapd %xmm0,%xmm1
  mulsd  -0x40(%rbp),%xmm1
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  mov    -0x70(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mov    -0x6c(%rbp),%eax
  movslq %eax,%rdx
  movslq %r12d,%rax
  imul   %rdx,%rax
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rax,%rdx
  subsd  %xmm1,%xmm0
  mov    -0x70(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x6c(%rbp)
L242:
  mov    -0x6c(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L18
L127:
  addl   $0x1,-0x70(%rbp)
L13:
  mov    -0x70(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L73
  addl   $0x1,-0x74(%rbp)
L110:
  mov    -0x74(%rbp),%eax
  cmp    -0x84(%rbp),%eax
  jl     L168
  mov    -0xa0(%rbp),%rsp
  nop
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L167
  call   <__stack_chk_fail@plt>
L167:
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D17
datatype: byte[8]

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

assistant: ```c
void invert(int s, double m[s][s], double m_inv[s][s]) {
  double t;
  int swap, i, j, k;
  double tmp[s][s];
  for (i = 0; i < s; i++)
    for (j = 0; j < s; j++)
      m_inv[i][j] = 0;
  for (i = 0; i < s; i++)
    m_inv[i][i] = 1;
  assign(s, s, m, tmp);
  for (i = 0; i < s; i++) {
    swap = i;
    for (j = i + 1; j < s; j++) {
      if (fabs(tmp[i][j]) > fabs(tmp[i][i]))
        swap = j;
    }
    if (swap != i) {
      for (k = 0; k < s; k++) {
        t = tmp[k][i];
        tmp[k][i] = tmp[k][swap];
        tmp[k][swap] = t;
        t = m_inv[k][i];
        m_inv[k][i] = m_inv[k][swap];
        m_inv[k][swap] = t;
      }
    }
    t = 1 / tmp[i][i];
    for (k = 0; k < s; k++) {
      tmp[k][i] *= t;
      m_inv[k][i] *= t;
    }
    for (j = 0; j < s; j++)
      if (j != i) {
        t = tmp[i][j];
        for (k = 0; k < s; k++) {
          tmp[k][j] -= tmp[k][i] * t;
          m_inv[k][j] -= m_inv[k][i] * t;
        }
      }
  }
}
```