user: 请从给定的汇编指令推导出C源代码:

```asm
<gaussj>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x348,%rsp
  mov    %rdx,0x8(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x338(%rsp)
  xor    %eax,%eax
  cmp    $0x40,%esi
  jg     L87
  test   %esi,%esi
  jle    L275
  movslq %esi,%r9
  lea    0x30(%rsp),%r8
  mov    %rdi,%rbx
  mov    %ecx,%r11d
  lea    0x0(,%r9,4),%rdx
  mov    %r8,%rdi
  cmp    $0x8,%edx
  jae    L261
  and    $0x4,%edx
  jne    L205
L262:
  movq   $0x0,(%rsp)
  movq   D18(%rip),%xmm3
  xor    %r14d,%r14d
  xor    %r15d,%r15d
  lea    0x0(,%r9,8),%rcx
L97:
  xor    %r10d,%r10d
  pxor   %xmm1,%xmm1
  jmp    L187
L246:
  add    $0x1,%r10
  cmp    %r10,%r9
  je     L77
L187:
  cmpl   $0x1,(%r8,%r10,4)
  mov    %r10d,%edx
  mov    %r10d,%ebp
  je     L246
  xor    %eax,%eax
  jmp    L197
  xchg   %ax,%ax
L283:
  movslq %edx,%rdi
  movsd  (%rbx,%rdi,8),%xmm0
  andpd  %xmm3,%xmm0
  comisd %xmm1,%xmm0
  jb     L324
  movapd %xmm0,%xmm1
  mov    %ebp,%r14d
  mov    %eax,%r15d
L324:
  add    $0x1,%rax
  add    %esi,%edx
  cmp    %rax,%r9
  je     L246
L197:
  mov    (%r8,%rax,4),%edi
  test   %edi,%edi
  je     L283
  cmp    $0x1,%edi
  jle    L324
L87:
  mov    $0x1,%eax
L339:
  mov    0x338(%rsp),%rdx
  sub    %fs:0x28,%rdx
  jne    L254
  add    $0x348,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopw   0x0(%rax,%rax,1)
L205:
  movl   $0x0,(%rdi)
  jmp    L262
L261:
  mov    %edx,%ecx
  shr    $0x3,%ecx
  and    $0x4,%edx
  rep stos %rax,%es:(%rdi)
  je     L262
  jmp    L205
L77:
  movslq %r15d,%rdi
  addl   $0x1,0x30(%rsp,%rdi,4)
  cmp    %r14d,%r15d
  jne    L172
L147:
  mov    (%rsp),%rdx
  lea    0x230(%rsp),%rax
  pxor   %xmm4,%xmm4
  mov    %rax,0x20(%rsp)
  mov    %r14d,(%rax,%rdx,4)
  lea    0x130(%rsp),%rax
  mov    %rax,0x28(%rsp)
  mov    %r15d,(%rax,%rdx,4)
  mov    %r15d,%eax
  imul   %esi,%eax
  mov    %eax,0x14(%rsp)
  add    %r15d,%eax
  cltq
  lea    (%rbx,%rax,8),%rax
  movsd  (%rax),%xmm1
  ucomisd %xmm4,%xmm1
  jp     L10
  je     L87
L10:
  movsd  D5(%rip),%xmm0
  mov    D5(%rip),%rdx
  xor    %r10d,%r10d
  divsd  %xmm1,%xmm0
  mov    %rdx,(%rax)
  lea    0x0(,%rdi,8),%rax
  lea    (%rbx,%rax,1),%rdx
  nopl   0x0(%rax)
L21:
  movsd  (%rdx),%xmm1
  mov    %r10d,%ebp
  lea    0x1(%r10),%r10d
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  add    %rcx,%rdx
  cmp    %r10d,%esi
  jne    L21
  test   %r11d,%r11d
  jle    L316
  add    0x8(%rsp),%rax
  xor    %edx,%edx
  nopw   0x0(%rax,%rax,1)
L367:
  movsd  (%rax),%xmm1
  add    $0x1,%edx
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rax)
  add    %rcx,%rax
  cmp    %edx,%r11d
  jne    L367
L316:
  mov    0x8(%rsp),%rax
  mov    %esi,0x1c(%rsp)
  mov    %rbx,%r13
  xor    %r12d,%r12d
  mov    0x14(%rsp),%esi
  mov    %r14d,0x18(%rsp)
  mov    %rax,%r14
  nopw   0x0(%rax,%rax,1)
L115:
  cmp    %r12d,%r15d
  je     L85
  lea    (%r12,%rsi,1),%eax
  xor    %edx,%edx
  cltq
  lea    (%rbx,%rax,8),%rax
  movsd  (%rax),%xmm1
  movq   $0x0,(%rax)
  mov    %r13,%rax
  nopw   0x0(%rax,%rax,1)
L225:
  movsd  (%rax,%rdi,8),%xmm2
  movsd  (%rax),%xmm0
  mov    %edx,%r10d
  add    $0x1,%edx
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    %rcx,%rax
  cmp    %ebp,%r10d
  jne    L225
  test   %r11d,%r11d
  jle    L85
  mov    %r14,%rax
  xor    %edx,%edx
  nopl   (%rax)
L88:
  movsd  (%rax,%rdi,8),%xmm2
  movsd  (%rax),%xmm0
  add    $0x1,%edx
  mulsd  %xmm1,%xmm2
  subsd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  add    %rcx,%rax
  cmp    %edx,%r11d
  jne    L88
L85:
  lea    0x1(%r12),%eax
  add    $0x8,%r14
  sub    $0x1,%rdi
  add    $0x8,%r13
  cmp    %ebp,%r12d
  je     L163
  movslq %eax,%r12
  jmp    L115
L163:
  addq   $0x1,(%rsp)
  mov    (%rsp),%rax
  mov    0x18(%rsp),%r14d
  mov    0x1c(%rsp),%esi
  cmp    %rax,%r9
  jne    L97
  mov    0x20(%rsp),%r9
  mov    0x28(%rsp),%r10
  lea    -0x1(%rsi),%r8d
  lea    0x8(%rbx),%rdi
  jmp    L362
  nopl   (%rax)
L238:
  sub    $0x1,%r12
  test   %r12d,%r12d
  js     L275
L362:
  mov    (%r9,%r12,4),%ecx
  mov    (%r10,%r12,4),%eax
  cmp    %eax,%ecx
  je     L238
  imul   %esi,%ecx
  imul   %esi,%eax
  movslq %ecx,%rcx
  movslq %eax,%rdx
  lea    (%r8,%rcx,1),%r11
  lea    (%rbx,%rcx,8),%rax
  lea    (%rdi,%r11,8),%r11
  sub    %rcx,%rdx
  nopl   0x0(%rax)
L314:
  movsd  (%rax),%xmm0
  movsd  (%rax,%rdx,8),%xmm1
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%rdx,8)
  add    $0x8,%rax
  cmp    %r11,%rax
  jne    L314
  jmp    L238
L172:
  movslq %r14d,%r12
  mov    %rdi,%r10
  xor    %ebp,%ebp
  lea    0x0(,%r12,8),%rax
  sub    %r12,%r10
  lea    (%rbx,%rax,1),%rdx
  nopl   0x0(%rax)
L282:
  movsd  (%rdx),%xmm0
  movsd  (%rdx,%r10,8),%xmm1
  add    $0x1,%ebp
  movsd  %xmm1,(%rdx)
  movsd  %xmm0,(%rdx,%r10,8)
  add    %rcx,%rdx
  cmp    %ebp,%esi
  jne    L282
  test   %r11d,%r11d
  jle    L147
  add    0x8(%rsp),%rax
  xor    %edx,%edx
  xchg   %ax,%ax
L253:
  movsd  (%rax),%xmm0
  movsd  (%rax,%r10,8),%xmm1
  add    $0x1,%edx
  movsd  %xmm1,(%rax)
  movsd  %xmm0,(%rax,%r10,8)
  add    %rcx,%rax
  cmp    %edx,%r11d
  jne    L253
  jmp    L147
L275:
  xor    %eax,%eax
  jmp    L339
L254:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: unpack_data
arguments: tag: D18
data_type: qword
name: unpack_data
arguments: tag: D5
data_type: f64

tool: D18: 9223372036854775807

tool: D5: 1

assistant: ```c
int gaussj(double *a, int n, double *b, int m) {
  int icol = 0, ipiv[64], irow = 0, i, j, k, l, indxc[64], indxr[64], ll;
  double pivinv, big, dum;
  if (n > 64)
    return (1);
  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)
            return (1);
        }
    ++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 * n];
        b[irow + l * n] = b[icol + l * n];
        b[icol + l * n] = dum;
      }
    }
    indxr[i] = irow;
    indxc[i] = icol;
    if (a[icol + icol * n] == 0.0)
      return (1);
    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 * n] *= 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 * n] -= b[icol + l * n] * 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;
      }
  return (0);
}
```