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

```asm
<invert>:
  endbr64
  push   %rbp
  pxor   %xmm0,%xmm0
  push   %rbx
  mov    %rdi,%rbx
  sub    $0x118,%rsp
  movupd (%rdi),%xmm3
  movupd 0x10(%rdi),%xmm4
  mov    %fs:0x28,%rax
  mov    %rax,0x108(%rsp)
  xor    %eax,%eax
  movupd 0x20(%rdi),%xmm5
  movupd 0x30(%rdi),%xmm6
  mov    %rsp,%rbp
  movq   D0(%rip),%xmm2
  movapd D2(%rip),%xmm1
  movaps %xmm3,(%rsp)
  movupd 0x40(%rdi),%xmm7
  movupd 0x50(%rdi),%xmm3
  movaps %xmm4,0x10(%rsp)
  movaps %xmm5,0x40(%rsp)
  movupd 0x60(%rdi),%xmm4
  movupd 0x70(%rdi),%xmm5
  mov    %rbp,%rdi
  movaps %xmm2,0x20(%rsp)
  movaps %xmm0,0x30(%rsp)
  movaps %xmm6,0x50(%rsp)
  movaps %xmm1,0x60(%rsp)
  movaps %xmm0,0x70(%rsp)
  movaps %xmm7,0x80(%rsp)
  movaps %xmm3,0x90(%rsp)
  movaps %xmm0,0xa0(%rsp)
  movaps %xmm2,0xb0(%rsp)
  movaps %xmm4,0xc0(%rsp)
  movaps %xmm5,0xd0(%rsp)
  movaps %xmm0,0xe0(%rsp)
  movaps %xmm1,0xf0(%rsp)
  call   <gauss_elim@plt>
  mov    %rbp,%rax
  lea    0x60(%rbx),%rcx
  mov    %rbp,%rdx
  mov    $0x6,%edi
  mov    $0x5,%esi
  mov    $0x4,%r8d
L86:
  cmp    $0x4,%r8d
  je     L114
L82:
  movsd  0xe0(%rdx),%xmm1
  mulsd  0x120(%rax),%xmm1
  movsd  0xe0(%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xe0(%rax)
  cmp    $0x4,%esi
  je     L4
  movsd  0xe8(%rdx),%xmm1
  mulsd  0x160(%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xe0(%rax)
  cmp    $0x4,%edi
  je     L4
  movsd  0xf0(%rdx),%xmm1
  mulsd  0x1a0(%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xe0(%rax)
L4:
  movsd  0xe0(%rax),%xmm0
  divsd  0xd8(%rdx),%xmm0
  movsd  %xmm0,0xe0(%rax)
  movsd  0xe0(%rdx),%xmm1
  mulsd  0x128(%rax),%xmm1
  movsd  %xmm0,(%rcx)
  movsd  0xe8(%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xe8(%rax)
  cmp    $0x4,%esi
  je     L84
  movsd  0xe8(%rdx),%xmm2
  mulsd  0x168(%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0xe8(%rax)
  movapd %xmm1,%xmm0
  cmp    $0x4,%edi
  je     L84
  movsd  0xf0(%rdx),%xmm0
  mulsd  0x1a8(%rax),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0xe8(%rax)
  movapd %xmm1,%xmm0
L84:
  divsd  0xd8(%rdx),%xmm0
  movsd  %xmm0,0xe8(%rax)
  movsd  0xe0(%rdx),%xmm1
  mulsd  0x130(%rax),%xmm1
  movsd  %xmm0,0x8(%rcx)
  movsd  0xf0(%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xf0(%rax)
  cmp    $0x4,%esi
  je     L67
  movsd  0xe8(%rdx),%xmm1
  mulsd  0x170(%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xf0(%rax)
  cmp    $0x4,%edi
  je     L67
  movsd  0xf0(%rdx),%xmm1
  mulsd  0x1b0(%rax),%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xf0(%rax)
L67:
  movsd  0xf0(%rax),%xmm0
  movsd  0x138(%rax),%xmm1
  divsd  0xd8(%rdx),%xmm0
  movsd  %xmm0,0xf0(%rax)
  mulsd  0xe0(%rdx),%xmm1
  movsd  %xmm0,0x10(%rcx)
  movsd  0xf8(%rax),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,0xf8(%rax)
  cmp    $0x4,%esi
  je     L77
  movsd  0xe8(%rdx),%xmm2
  mulsd  0x178(%rax),%xmm2
  movapd %xmm0,%xmm1
  subsd  %xmm2,%xmm1
  movsd  %xmm1,0xf8(%rax)
  movapd %xmm1,%xmm0
  cmp    $0x4,%edi
  je     L77
  movsd  0xf0(%rdx),%xmm0
  mulsd  0x1b8(%rax),%xmm0
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0xf8(%rax)
  movapd %xmm1,%xmm0
L77:
  sub    $0x40,%rax
  sub    $0x48,%rdx
  sub    $0x20,%rcx
  sub    $0x1,%esi
  divsd  0x120(%rdx),%xmm0
  sub    $0x1,%edi
  movsd  %xmm0,0x138(%rax)
  movsd  %xmm0,0x38(%rcx)
  sub    $0x1,%r8d
  jne    L86
  mov    0x108(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L37
  add    $0x118,%rsp
  pop    %rbx
  pop    %rbp
  ret
  nopl   0x0(%rax)
L114:
  mov    $0x3,%r8d
  sub    $0x40,%rax
  sub    $0x1,%esi
  sub    $0x1,%edi
  movsd  0x120(%rax),%xmm0
  sub    $0x48,%rdx
  divsd  0x120(%rdx),%xmm0
  sub    $0x20,%rcx
  movsd  %xmm0,0x120(%rax)
  movsd  %xmm0,0x20(%rcx)
  movsd  0x128(%rax),%xmm0
  divsd  0x120(%rdx),%xmm0
  movsd  %xmm0,0x128(%rax)
  movsd  %xmm0,0x28(%rcx)
  movsd  0x130(%rax),%xmm0
  divsd  0x120(%rdx),%xmm0
  movsd  %xmm0,0x130(%rax)
  movsd  %xmm0,0x30(%rcx)
  movsd  0x138(%rax),%xmm0
  divsd  0x120(%rdx),%xmm0
  movsd  %xmm0,0x138(%rax)
  movsd  %xmm0,0x38(%rcx)
  jmp    L82
L37:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: read_data
arguments: label: D0
type_infered: byte[8]
name: read_data
arguments: label: D2
type_infered: byte[16]

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

tool: {"D2": [0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,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];
    }
}
```