user: Demonstrate the C code that generates the assembly output below:

```asm
<mx_inv>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  movsd  %xmm0,-0x60(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L201
L128:
  mov    -0x40(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x38(%rbp)
  jmp    L198
L35:
  mov    -0x38(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D42(%rip),%xmm1
  andpd  %xmm1,%xmm0
  mov    -0x3c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movq   D42(%rip),%xmm2
  andpd  %xmm2,%xmm1
  comisd %xmm1,%xmm0
  jbe    L99
  mov    -0x38(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
L99:
  addl   $0x1,-0x38(%rbp)
L198:
  mov    -0x38(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L35
  mov    -0x3c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x40(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D42(%rip),%xmm1
  andpd  %xmm0,%xmm1
  movsd  -0x60(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L218
  mov    $0xffffffff,%eax
  jmp    L30
L218:
  movl   $0x0,-0x34(%rbp)
  jmp    L217
L123:
  mov    -0x40(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x8(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x34(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rcx
  mov    -0x58(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  imul   -0x44(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x34(%rbp)
L217:
  mov    -0x34(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L123
  movl   $0x0,-0x30(%rbp)
  jmp    L16
L96:
  mov    -0x40(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x3c(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rax,%rdx
  mov    -0x40(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x30(%rbp),%eax
  add    %ecx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rcx
  mov    -0x50(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x3c(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x30(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x30(%rbp)
L16:
  mov    -0x30(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jb     L96
  mov    -0x40(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x2c(%rbp)
  jmp    L147
L9:
  mov    -0x2c(%rbp),%r8d
  mov    -0x40(%rbp),%edi
  mov    -0x48(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x50(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <calc@plt>
  addl   $0x1,-0x2c(%rbp)
L147:
  mov    -0x2c(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L9
  addl   $0x1,-0x40(%rbp)
L201:
  mov    -0x40(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L128
  mov    -0x44(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x28(%rbp)
  jmp    L127
L79:
  mov    -0x28(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x24(%rbp)
  jmp    L179
L17:
  mov    -0x24(%rbp),%r8d
  mov    -0x28(%rbp),%edi
  mov    -0x48(%rbp),%ecx
  mov    -0x44(%rbp),%edx
  mov    -0x50(%rbp),%rsi
  mov    -0x58(%rbp),%rax
  mov    %r8d,%r9d
  mov    %edi,%r8d
  mov    %rax,%rdi
  call   <calc@plt>
  subl   $0x1,-0x24(%rbp)
L179:
  cmpl   $0x0,-0x24(%rbp)
  jns    L17
  subl   $0x1,-0x28(%rbp)
L127:
  cmpl   $0x0,-0x28(%rbp)
  jns    L79
  movl   $0x0,-0x20(%rbp)
  jmp    L72
L177:
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D54(%rip),%xmm1
  subsd  %xmm1,%xmm0
  movq   D42(%rip),%xmm1
  andpd  %xmm1,%xmm0
  comisd -0x60(%rbp),%xmm0
  jbe    L118
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D54(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L207
L74:
  mov    -0x20(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%eax
  imul   -0x48(%rbp),%eax
  mov    %eax,%edx
  mov    -0x1c(%rbp),%eax
  add    %edx,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x50(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L207:
  mov    -0x1c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jb     L74
  mov    -0x44(%rbp),%eax
  add    $0x1,%eax
  imul   -0x20(%rbp),%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  D54(%rip),%xmm0
  movsd  %xmm0,(%rax)
L118:
  addl   $0x1,-0x20(%rbp)
L72:
  mov    -0x20(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jb     L177
  mov    $0x0,%eax
L30:
  leave
  ret
```

tool_calls: name: read_data
arguments: data_label: D42
data_type: qword
name: read_data
arguments: data_label: D54
data_type: f64

tool: D42: 9223372036854775807

tool: D54: 1

assistant: ```c
int mx_inv(unsigned int n, unsigned int r, double *b, double *a, double eps) {
  for (unsigned k = 0; k < n; k++) {
    unsigned int m = k;
    for (unsigned l = k + 1; l < n; l++) {
      if (fabs(a[l * n + k]) > fabs(a[m * n + k])) {
        m = l;
      }
    }
    if (fabs(a[m * n + k]) < eps) {
      return -1;
    }
    for (unsigned l = 0; l < n; l++) {
      double t = a[k * n + l];
      a[k * n + l] = a[m * n + l];
      a[m * n + l] = t;
    }
    for (unsigned l = 0; l < r; l++) {
      double t = b[k * r + l];
      b[k * r + l] = b[m * r + l];
      b[m * r + l] = t;
    }
    for (unsigned j = k + 1; j < n; j++) {
      calc(a, b, n, r, k, j);
    }
  }
  for (int k = n - 1; k >= 0; k--) {
    for (int j = k - 1; j >= 0; j--) {
      calc(a, b, n, r, k, j);
    }
  }
  for (unsigned k = 0; k < n; k++) {
    if (fabs(a[k * n + k] - 1.0) > eps) {
      double t = 1.0 / a[k * n + k];
      for (unsigned j = 0; j < r; j++) {
        b[k * r + j] *= t;
      }
      a[k * n + k] = 1.0;
    }
  }
  return 0;
}
```