user: Converte this assembly snippet into its equivalent C code:

```asm
<invert>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x130,%rsp
  mov    %rdi,-0x128(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x8(%rbp)
  xor    %eax,%eax
  movl   $0x0,-0x11c(%rbp)
  jmp    L30
L85:
  movl   $0x0,-0x118(%rbp)
  jmp    L104
L93:
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  mov    %rax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  mov    -0x118(%rbp),%eax
  cltq
  movsd  (%rdx,%rax,8),%xmm0
  mov    -0x118(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,-0x110(%rbp,%rax,8)
  mov    -0x11c(%rbp),%eax
  cmp    -0x118(%rbp),%eax
  jne    L46
  movsd  D1(%rip),%xmm0
  jmp    L49
L46:
  pxor   %xmm0,%xmm0
L49:
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,-0x110(%rbp,%rax,8)
  addl   $0x1,-0x118(%rbp)
L104:
  cmpl   $0x3,-0x118(%rbp)
  jle    L93
  addl   $0x1,-0x11c(%rbp)
L30:
  cmpl   $0x3,-0x11c(%rbp)
  jle    L85
  lea    -0x110(%rbp),%rax
  mov    %rax,%rdi
  call   <gauss_elim@plt>
  movl   $0x3,-0x11c(%rbp)
  jmp    L114
L100:
  movl   $0x0,-0x118(%rbp)
  jmp    L129
L40:
  mov    -0x11c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x114(%rbp)
  jmp    L53
L57:
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x110(%rbp,%rax,8),%xmm0
  mov    -0x114(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x110(%rbp,%rax,8),%xmm2
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  movslq %eax,%rdx
  mov    -0x114(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x110(%rbp,%rax,8),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  subsd  %xmm1,%xmm0
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,-0x110(%rbp,%rax,8)
  addl   $0x1,-0x114(%rbp)
L53:
  cmpl   $0x3,-0x114(%rbp)
  jle    L57
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  -0x110(%rbp,%rax,8),%xmm0
  mov    -0x11c(%rbp),%eax
  movslq %eax,%rdx
  mov    %rdx,%rax
  shl    $0x3,%rax
  add    %rdx,%rax
  shl    $0x3,%rax
  add    %rbp,%rax
  sub    $0x110,%rax
  movsd  (%rax),%xmm1
  mov    -0x118(%rbp),%eax
  add    $0x4,%eax
  divsd  %xmm1,%xmm0
  movslq %eax,%rdx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  %xmm0,-0x110(%rbp,%rax,8)
  mov    -0x118(%rbp),%eax
  lea    0x4(%rax),%ecx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x5,%rax
  mov    %rax,%rdx
  mov    -0x128(%rbp),%rax
  add    %rax,%rdx
  movslq %ecx,%rcx
  mov    -0x11c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rcx,%rax
  movsd  -0x110(%rbp,%rax,8),%xmm0
  mov    -0x118(%rbp),%eax
  cltq
  movsd  %xmm0,(%rdx,%rax,8)
  addl   $0x1,-0x118(%rbp)
L129:
  cmpl   $0x3,-0x118(%rbp)
  jle    L40
  subl   $0x1,-0x11c(%rbp)
L114:
  cmpl   $0x0,-0x11c(%rbp)
  jns    L100
  nop
  mov    -0x8(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L38
  call   <__stack_chk_fail@plt>
L38:
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: label: D1
type_infered: byte[8]

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

assistant: ```c
void invert(double a[4][4]) {
  int i, j, k;
  double e[4][8];
  for (i = 0; i < 4; ++i)
    for (j = 0; j < 4; ++j) {
      e[i][j] = a[i][j];
      e[i][4 + j] = i == j ? 1 : 0;
    }
  gauss_elim(e);
  for (i = 4 - 1; i >= 0; --i)
    for (j = 0; j < 4; ++j) {
      for (k = i + 1; k < 4; ++k)
        e[i][4 + j] -= e[i][k] * e[k][4 + j];
      e[i][4 + j] /= e[i][i];
      a[i][j] = e[i][j + 4];
    }
}
```