user: Translate the below assembly code into C programming language:

```asm
<invert_matrix>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  mov    %rdi,%rbp
  push   %rbx
  mov    %esi,%ebx
  lea    0x0(,%rbx,8),%r15
  mov    %r15,%rdi
  sub    $0x28,%rsp
  mov    %ebx,0x1c(%rsp)
  call   <malloc@plt>
  mov    %rax,%r13
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <check_alloc@plt>
  test   %ebx,%ebx
  je     L29
  lea    (%r15,%r13,1),%rax
  mov    %r13,(%rsp)
  mov    %r13,%r14
  mov    %rax,0x8(%rsp)
L70:
  mov    %r15,%rdi
  add    $0x8,%r14
  call   <malloc@plt>
  mov    %rax,-0x8(%r14)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <check_alloc@plt>
  cmp    0x8(%rsp),%r14
  jne    L70
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,%r12
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <check_alloc@plt>
  lea    (%r12,%r15,1),%rax
  mov    %r12,%r14
  mov    %rax,0x10(%rsp)
  nopw   0x0(%rax,%rax,1)
L43:
  mov    %r15,%rdi
  add    $0x8,%r14
  call   <malloc@plt>
  mov    %rax,-0x8(%r14)
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <check_alloc@plt>
  cmp    0x10(%rsp),%r14
  jne    L43
  mov    %r15,%rdi
  xor    %r15d,%r15d
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    %rax,%r14
  xor    %eax,%eax
  call   <check_alloc@plt>
  pxor   %xmm1,%xmm1
  nopl   (%rax)
L11:
  xor    %edi,%edi
  nopw   0x0(%rax,%rax,1)
L93:
  movapd %xmm1,%xmm0
  cmp    %r15d,%edi
  je     L26
L40:
  mov    0x0(%rbp,%rdi,8),%rsi
  mov    0x0(%r13,%rdi,8),%rdx
  movsd  %xmm0,(%r14,%rdi,8)
  xor    %eax,%eax
  nop
L81:
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L81
  add    $0x1,%rdi
  cmp    %rbx,%rdi
  jne    L93
  mov    0x1c(%rsp),%edx
  mov    %r14,%rsi
  mov    %r13,%rdi
  call   <solvele@plt>
  lea    0x0(,%r15,8),%rsi
  xor    %eax,%eax
  pxor   %xmm1,%xmm1
  nopl   0x0(%rax)
L106:
  movsd  (%r14,%rax,8),%xmm0
  mov    (%r12,%rax,8),%rdx
  add    $0x1,%rax
  movsd  %xmm0,(%rdx,%rsi,1)
  cmp    %rax,%rbx
  jne    L106
  add    $0x1,%r15
  cmp    %rbx,%r15
  jne    L11
  mov    %r14,%rdi
  call   <free@plt>
  nopl   (%rax)
L80:
  mov    (%rsp),%rbx
  mov    (%rbx),%rdi
  call   <free@plt>
  mov    %rbx,%rax
  add    $0x8,%rax
  mov    %rax,(%rsp)
  cmp    0x8(%rsp),%rax
  jne    L80
L6:
  mov    %r13,%rdi
  call   <free@plt>
  add    $0x28,%rsp
  mov    %r12,%rax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   0x0(%rax,%rax,1)
L26:
  mov    D1(%rip),%rax
  movq   %rax,%xmm0
  jmp    L40
L29:
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,%rdi
  mov    %rax,%r12
  xor    %eax,%eax
  call   <check_alloc@plt>
  mov    %r15,%rdi
  call   <malloc@plt>
  mov    %rax,%rbp
  mov    %rax,%rdi
  xor    %eax,%eax
  call   <check_alloc@plt>
  mov    %rbp,%rdi
  call   <free@plt>
  jmp    L6
```

tool_calls: name: parse_data
arguments: label: D1
type_guessed: f64

tool: D1: 1

assistant: ```c
double **invert_matrix(double **mat, unsigned int size) {
  int i, j, k;
  double **hmat, **imat, *vec;
  extern void solvele(double **, double *, unsigned int);
  check_alloc(hmat = (double **)malloc(sizeof(double *) * size));
  for (i = 0; i < size; i++) {
    check_alloc(hmat[i] = (double *)malloc(sizeof(double) * size));
  }
  check_alloc(imat = (double **)malloc(sizeof(double *) * size));
  for (i = 0; i < size; i++) {
    check_alloc(imat[i] = (double *)malloc(sizeof(double) * size));
  }
  check_alloc(vec = (double *)malloc(sizeof(double) * size));
  for (i = 0; i < size; i++) {
    for (j = 0; j < size; j++) {
      vec[j] = (i == j) ? 1.0 : 0.0;
      for (k = 0; k < size; k++)
        hmat[j][k] = mat[j][k];
    }
    solvele(hmat, vec, size);
    for (j = 0; j < size; j++)
      imat[j][i] = vec[j];
  }
  free(vec);
  for (i = 0; i < size; i++)
    free(hmat[i]);
  free(hmat);
  return imat;
}
```