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

```asm
<gaussj>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  mov    %edi,%r12d
  push   %rbp
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x2d8,%rsp
  mov    %fs:0x28,%rax
  mov    %rax,0x2c8(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rdi),%eax
  mov    %eax,0x4c(%rsp)
  test   %edi,%edi
  jle    L47
  movslq %edi,%r14
  mov    %rcx,%rbp
  lea    0x60(%rsp),%rcx
  mov    %edx,%r13d
  xor    %esi,%esi
  lea    0x0(,%r14,4),%rdx
  mov    %rcx,%rdi
  call   <memset@plt>
  mov    %r12d,%esi
  mov    %r13d,%r10d
  pxor   %xmm3,%xmm3
  movq   $0x0,0x28(%rsp)
  mov    %rax,%rcx
  lea    0x0(,%r14,8),%rax
  mov    %rax,0x50(%rsp)
  movslq %r13d,%rax
  shl    $0x3,%rax
  cmp    $0x1,%r12d
  mov    %r15d,%r12d
  mov    %r14,%r15
  setne  %dl
  cmp    $0x1,%r13d
  mov    %rax,0x58(%rsp)
  mov    %rbp,%r13
  setne  %al
  or     %eax,%edx
  lea    0x130(%rsp),%rax
  mov    %rax,0x40(%rsp)
  lea    0x200(%rsp),%rax
  mov    %dl,0x1f(%rsp)
  mov    %rax,0x38(%rsp)
  nopl   0x0(%rax,%rax,1)
L277:
  xor    %edx,%edx
  mov    %r12d,0x18(%rsp)
  movapd %xmm3,%xmm1
  mov    %rbx,%r12
  mov    %r13,0x30(%rsp)
  mov    %esi,%ebx
  mov    %r15,%r13
  mov    %rdx,%r15
  mov    %r10d,0x48(%rsp)
  jmp    L370
  nopw   0x0(%rax,%rax,1)
L287:
  add    $0x1,%r15
  cmp    %r15,%r13
  je     L424
L370:
  cmpl   $0x1,(%rcx,%r15,4)
  mov    %r15d,%r14d
  je     L287
  mov    %r15d,0x14(%rsp)
  xor    %ebp,%ebp
  mov    %r15,0x20(%rsp)
  mov    %r12,%r15
  mov    %ebx,%r12d
  mov    %rcx,%rbx
  jmp    L350
  xchg   %ax,%ax
L262:
  movslq %r14d,%rax
  movsd  (%r15,%rax,8),%xmm0
  andpd  D1(%rip),%xmm0
  comisd %xmm1,%xmm0
  jb     L402
  mov    0x14(%rsp),%eax
  mov    %ebp,0x18(%rsp)
  movapd %xmm0,%xmm1
  mov    %eax,(%rsp)
L402:
  add    $0x1,%rbp
  add    %r12d,%r14d
  cmp    %rbp,%r13
  je     L457
L350:
  mov    (%rbx,%rbp,4),%eax
  test   %eax,%eax
  je     L262
  cmp    $0x1,%eax
  jle    L402
  lea    D17(%rip),%rdi
  movsd  %xmm1,0x8(%rsp)
  add    $0x1,%rbp
  add    %r12d,%r14d
  call   <printf@plt>
  mov    $0x63,%edi
  call   <exit@plt>
  movsd  0x8(%rsp),%xmm1
  pxor   %xmm3,%xmm3
  cmp    %rbp,%r13
  jne    L350
L457:
  mov    %rbx,%rcx
  mov    %r12d,%ebx
  mov    %r15,%r12
  mov    0x20(%rsp),%r15
  add    $0x1,%r15
  cmp    %r15,%r13
  jne    L370
L424:
  movslq 0x18(%rsp),%r14
  mov    %r13,%r15
  mov    %ebx,%esi
  mov    0x48(%rsp),%r10d
  mov    %r12,%rbx
  mov    0x30(%rsp),%r13
  addl   $0x1,0x60(%rsp,%r14,4)
  mov    %r14,%r12
  cmp    (%rsp),%r14d
  jne    L429
  nopl   (%rax)
L485:
  mov    0x28(%rsp),%rax
  mov    0x40(%rsp),%rdi
  mov    %r12d,%r8d
  mov    (%rsp),%edx
  imul   %esi,%r8d
  mov    %edx,(%rdi,%rax,4)
  mov    0x38(%rsp),%rdi
  mov    %r12d,(%rdi,%rax,4)
  lea    (%r8,%r12,1),%eax
  cltq
  lea    (%rbx,%rax,8),%rbp
  movsd  0x0(%rbp),%xmm1
  ucomisd %xmm3,%xmm1
  jp     L35
  je     L503
L35:
  mov    D5(%rip),%rax
  movsd  D5(%rip),%xmm0
  mov    %rax,0x0(%rbp)
  divsd  %xmm1,%xmm0
  lea    (%rbx,%r14,8),%rax
  cmp    $0x1,%esi
  jne    L211
  movsd  (%rax),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
L517:
  test   %r10d,%r10d
  jle    L48
  cmp    $0x1,%r10d
  jne    L152
  lea    0x0(,%r14,8),%rax
  cmpb   $0x0,0x1f(%rsp)
  lea    0x0(%r13,%rax,1),%rdx
  mulsd  (%rdx),%xmm0
  movsd  %xmm0,(%rdx)
  jne    L48
  test   %r12d,%r12d
  je     L169
  add    %rbx,%rax
  movsd  (%rax),%xmm0
  movq   $0x0,(%rax)
  movsd  (%rbx),%xmm1
  movapd %xmm0,%xmm2
  mulsd  %xmm3,%xmm2
  subsd  %xmm2,%xmm1
  movsd  %xmm1,(%rbx)
  mulsd  0x0(%r13,%r14,8),%xmm0
  movsd  0x0(%r13),%xmm1
  subsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%r13)
L169:
  addq   $0x1,0x28(%rsp)
  mov    0x28(%rsp),%rax
  cmp    %rax,%r15
  jne    L277
  mov    %esi,%r12d
L5:
  mov    %r12d,%eax
  movslq 0x4c(%rsp),%rsi
  mov    %r12d,%r8d
  lea    0x8(%rbx),%r15
  shr    %eax
  mov    %r15,0x8(%rsp)
  mov    0x38(%rsp),%r13
  and    $0xfffffffe,%r8d
  lea    -0x1(%rax),%r9d
  mov    %esi,%r14d
  add    $0x1,%r9
  mov    %r14,(%rsp)
  mov    0x40(%rsp),%r14
  shl    $0x4,%r9
  jmp    L514
L160:
  sub    $0x1,%rsi
  test   %esi,%esi
  js     L220
L514:
  mov    (%r14,%rsi,4),%edx
  mov    0x0(%r13,%rsi,4),%eax
  cmp    %eax,%edx
  je     L160
  test   %r12d,%r12d
  jle    L160
  imul   %r12d,%eax
  imul   %r12d,%edx
  movslq %eax,%r10
  movslq %edx,%r11
  lea    0x0(,%r10,8),%rcx
  lea    0x10(%rcx),%r15
  lea    0x0(,%r11,8),%rdi
  lea    0x10(,%r11,8),%rbp
  cmp    %r15,%rdi
  setge  %r15b
  cmp    %rbp,%rcx
  setge  %bpl
  or     %r15b,%bpl
  je     L428
  cmpl   $0x1,0x4c(%rsp)
  jbe    L428
  add    %rbx,%rdi
  add    %rbx,%rcx
  xor    %r10d,%r10d
  nopw   0x0(%rax,%rax,1)
L385:
  movupd (%rdi,%r10,1),%xmm0
  movupd (%rcx,%r10,1),%xmm4
  movups %xmm4,(%rdi,%r10,1)
  movups %xmm0,(%rcx,%r10,1)
  add    $0x10,%r10
  cmp    %r9,%r10
  jne    L385
  cmp    %r12d,%r8d
  je     L160
  add    %r8d,%edx
  add    %r8d,%eax
  sub    $0x1,%rsi
  movslq %edx,%rdx
  cltq
  lea    (%rbx,%rdx,8),%rdx
  lea    (%rbx,%rax,8),%rax
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  test   %esi,%esi
  jns    L514
L220:
  mov    0x2c8(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L73
  add    $0x2d8,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L429:
  movslq (%rsp),%rax
  cmp    $0x1,%esi
  jne    L256
  lea    (%rbx,%rax,8),%rdi
  lea    (%rbx,%r14,8),%rdx
  movsd  (%rdi),%xmm0
  movsd  (%rdx),%xmm1
  movsd  %xmm1,(%rdi)
  movsd  %xmm0,(%rdx)
L422:
  test   %r10d,%r10d
  jle    L485
  lea    0x0(%r13,%rax,8),%rdx
  cmp    $0x1,%r10d
  jne    L195
  lea    0x0(%r13,%r14,8),%rax
  movsd  (%rdx),%xmm0
  movsd  (%rax),%xmm1
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rax)
  jmp    L485
L503:
  lea    D17(%rip),%rdi
  mov    %rcx,0x20(%rsp)
  mov    %r10d,0x18(%rsp)
  mov    %esi,0x14(%rsp)
  mov    %r8d,0x8(%rsp)
  call   <printf@plt>
  mov    $0x63,%edi
  call   <exit@plt>
  movsd  0x0(%rbp),%xmm1
  mov    0x20(%rsp),%rcx
  pxor   %xmm3,%xmm3
  mov    0x18(%rsp),%r10d
  mov    0x14(%rsp),%esi
  mov    0x8(%rsp),%r8d
  jmp    L35
L152:
  mov    0x58(%rsp),%rdi
  lea    0x0(%r13,%r14,8),%rax
  xor    %edx,%edx
  nopl   (%rax)
L9:
  movsd  (%rax),%xmm1
  add    $0x1,%edx
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  add    %rdi,%rax
  cmp    %edx,%r10d
  jne    L9
  nopw   0x0(%rax,%rax,1)
L48:
  mov    %r15,0x8(%rsp)
  mov    %r14,%rax
  mov    0x58(%rsp),%r9
  mov    %r13,%rbp
  mov    0x50(%rsp),%r14
  mov    %rbx,%r11
  xor    %edi,%edi
  nopw   0x0(%rax,%rax,1)
L299:
  cmp    %edi,%r12d
  je     L495
  lea    (%rdi,%r8,1),%edx
  xor    %r15d,%r15d
  movslq %edx,%rdx
  lea    (%rbx,%rdx,8),%rdx
  movsd  (%rdx),%xmm1
  movq   $0x0,(%rdx)
  mov    %r11,%rdx
  nopl   0x0(%rax)
L189:
  movsd  (%rdx,%rax,8),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x1,%r15d
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %r14,%rdx
  cmp    %r15d,%esi
  jne    L189
  test   %r10d,%r10d
  jle    L495
  mov    %rbp,%rdx
  xor    %r15d,%r15d
  nopl   0x0(%rax)
L413:
  movsd  (%rdx,%rax,8),%xmm2
  movsd  (%rdx),%xmm0
  add    $0x1,%r15d
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  add    %r9,%rdx
  cmp    %r15d,%r10d
  jne    L413
L495:
  add    $0x1,%edi
  add    $0x8,%rbp
  sub    $0x1,%rax
  add    $0x8,%r11
  cmp    %edi,%esi
  jne    L299
  mov    0x8(%rsp),%r15
  jmp    L169
L211:
  mov    0x50(%rsp),%rdi
  xor    %edx,%edx
  nopl   0x0(%rax)
L265:
  movsd  (%rax),%xmm1
  add    $0x1,%edx
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  add    %rdi,%rax
  cmp    %edx,%esi
  jne    L265
  jmp    L517
L256:
  mov    %r14,%r11
  mov    0x50(%rsp),%r8
  lea    (%rbx,%rax,8),%rdx
  xor    %edi,%edi
  sub    %rax,%r11
  nopl   0x0(%rax)
L273:
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%r11,8),%xmm1
  add    $0x1,%edi
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%r11,8)
  add    %r8,%rdx
  cmp    %edi,%esi
  jne    L273
  jmp    L422
L428:
  mov    (%rsp),%rcx
  lea    (%rbx,%r11,8),%rax
  sub    %r11,%r10
  lea    (%rcx,%r11,1),%rdx
  mov    0x8(%rsp),%rcx
  lea    (%rcx,%rdx,8),%rdx
  nopl   0x0(%rax,%rax,1)
L279:
  movsd  (%rax),%xmm0
  movsd  (%rax,%r10,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%r10,8)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L279
  jmp    L160
L195:
  mov    %r14,%r11
  xor    %edi,%edi
  sub    %rax,%r11
  mov    0x58(%rsp),%rax
  nopw   0x0(%rax,%rax,1)
L289:
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%r11,8),%xmm1
  add    $0x1,%edi
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%r11,8)
  add    %rax,%rdx
  cmp    %edi,%r10d
  jne    L289
  jmp    L485
L47:
  mov    0x4c(%rsp),%eax
  test   %eax,%eax
  js     L220
  lea    0x130(%rsp),%rax
  mov    %rax,0x40(%rsp)
  lea    0x200(%rsp),%rax
  mov    %rax,0x38(%rsp)
  jmp    L5
L73:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: data_tag: D1
data_type: qword[2]
name: retrieve_data
arguments: data_tag: D17
data_type: string
name: retrieve_data
arguments: data_tag: D5
data_type: f64

tool: {"D1": [0x7fffffffffffffff,0x0000000000000000]}

tool: D17: Error: singular matrix in gaussj


tool: D5: 1

assistant: ```c
void gaussj(int n, double a[], int m, double b[]) {
  int i, j, k, l, ll;
  int icol, irow;
  int ipiv[50], indxr[50], indxc[50];
  double big, dum, pivinv;
  for (j = 0; j < n; ++j)
    ipiv[j] = 0;
  for (i = 0; i < n; ++i) {
    big = 0.0;
    for (j = 0; j < n; ++j) {
      if (ipiv[j] != 1) {
        for (k = 0; k < n; ++k) {
          if (ipiv[k] == 0) {
            if (fabs(a[j + k * n]) >= big) {
              big = fabs(a[j + k * n]);
              irow = j;
              icol = k;
            }
          } else if (ipiv[k] > 1) {
            printf("Error: singular matrix in gaussj\n");
            exit(99);
          }
        }
      }
    }
    ++ipiv[icol];
    if (irow != icol) {
      for (l = 0; l < n; ++l) {
        dum = a[irow + l * n];
        a[irow + l * n] = a[icol + l * n];
        a[icol + l * n] = dum;
      }
      for (l = 0; l < m; ++l) {
        dum = b[irow + l * m];
        b[irow + l * m] = b[icol + l * m];
        b[icol + l * m] = dum;
      }
    }
    indxr[i] = irow;
    indxc[i] = icol;
    if (a[icol + n * icol] == 0.0) {
      printf("Error: singular matrix in gaussj\n");
      exit(99);
    }
    pivinv = 1.0 / a[icol + icol * n];
    a[icol + icol * n] = 1.0;
    for (l = 0; l < n; ++l)
      a[icol + l * n] *= pivinv;
    for (l = 0; l < m; ++l)
      b[icol + l * m] *= pivinv;
    for (ll = 0; ll < n; ++ll) {
      if (ll != icol) {
        dum = a[ll + icol * n];
        a[ll + icol * n] = 0.0;
        for (l = 0; l < n; ++l)
          a[ll + l * n] -= a[icol + l * n] * dum;
        for (l = 0; l < m; ++l)
          b[ll + l * m] -= b[icol + l * m] * dum;
      }
    }
  }
  for (l = (n - 1); l >= 0; --l) {
    if (indxr[l] != indxc[l]) {
      for (k = 0; k < n; ++k) {
        dum = a[k + indxr[l] * n];
        a[k + indxr[l] * n] = a[k + indxc[l] * n];
        a[k + indxc[l] * n] = dum;
      }
    }
  }
}
```