user: What would the C source look like for the assembly code provided here?

```asm
<my_linear_eq_solve>:
  endbr64
  test   %esi,%esi
  jle    L60
  push   %r15
  movslq %esi,%rax
  mov    %rdx,%r11
  mov    %rdi,%r10
  push   %r14
  mov    %rax,%rdx
  mov    %esi,%r8d
  mov    %rcx,%r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  mov    %rax,-0x10(%rsp)
  xor    %eax,%eax
  nop
L23:
  mov    %eax,(%r11,%rax,4)
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L23
  lea    -0x2(%r8),%eax
  mov    %r14,-0x8(%rsp)
  mov    $0x1,%r12d
  movq   D6(%rip),%xmm4
  mov    %eax,-0x14(%rsp)
  xor    %eax,%eax
  pxor   %xmm5,%xmm5
  lea    0x10(%r10),%r15
  mov    %rax,%r14
  nopl   (%rax)
L216:
  mov    (%r11,%r14,4),%esi
  mov    %r14d,%ebx
  mov    %esi,%ebp
  imul   %r8d,%ebp
  lea    0x0(%rbp,%r14,1),%eax
  cltq
  movsd  (%r10,%rax,8),%xmm2
  movapd %xmm2,%xmm3
  andpd  %xmm4,%xmm3
  cmp    %r12d,%r8d
  jle    L149
  mov    %r12,%rdx
  movapd %xmm3,%xmm0
  mov    %r14d,%ecx
  nopl   0x0(%rax)
L171:
  mov    (%r11,%rdx,4),%eax
  imul   %r8d,%eax
  add    %ebx,%eax
  cltq
  movsd  (%r10,%rax,8),%xmm1
  comisd %xmm0,%xmm1
  maxsd  %xmm0,%xmm1
  cmova  %edx,%ecx
  add    $0x1,%rdx
  movapd %xmm1,%xmm0
  cmp    %edx,%r8d
  jg     L171
  cmp    %r14d,%ecx
  je     L149
  movslq %ecx,%rcx
  lea    (%r11,%rcx,4),%rax
  mov    (%rax),%ebp
  mov    %esi,(%rax)
  mov    %ebp,(%r11,%r14,4)
  imul   %r8d,%ebp
  lea    (%rbx,%rbp,1),%eax
  cltq
  movsd  (%r10,%rax,8),%xmm2
  movapd %xmm2,%xmm3
  andpd  %xmm4,%xmm3
L149:
  comisd %xmm3,%xmm5
  jae    L116
  cmp    %r12,-0x10(%rsp)
  je     L84
  mov    -0x14(%rsp),%r13d
  mov    %r12,%r9
  movslq %ebp,%rbp
  add    %r14,%r13
  nopl   0x0(%rax,%rax,1)
L17:
  mov    (%r11,%r9,4),%edi
  imul   %r8d,%edi
  lea    (%rdi,%rbx,1),%eax
  movslq %edi,%rdi
  cltq
  lea    0x0(%r13,%rdi,1),%rcx
  lea    (%r10,%rax,8),%rdx
  lea    (%r15,%rcx,8),%rsi
  mov    %rbp,%rcx
  movsd  (%rdx),%xmm0
  lea    (%r12,%rdi,1),%rax
  sub    %rdi,%rcx
  lea    (%r10,%rax,8),%rax
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rdx)
  jmp    L85
  nopl   0x0(%rax)
L78:
  movsd  (%rdx),%xmm0
L85:
  mulsd  (%rax,%rcx,8),%xmm0
  movsd  (%rax),%xmm1
  add    $0x8,%rax
  subsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%rax)
  cmp    %rax,%rsi
  jne    L78
  add    $0x1,%r9
  cmp    %r9d,%r8d
  jg     L17
  subl   $0x1,-0x14(%rsp)
  add    $0x1,%r14
  add    $0x1,%r12
  jmp    L216
L84:
  mov    -0x8(%rsp),%r14
  mov    $0x1,%edi
L97:
  movslq -0x4(%r11,%rdi,4),%rax
  lea    -0x1(%rdi),%esi
  movsd  (%r14,%rax,8),%xmm2
  cmp    %rdi,%r12
  je     L131
  mov    %rdi,%rdx
  nopw   0x0(%rax,%rax,1)
L220:
  movslq (%r11,%rdx,4),%rcx
  add    $0x1,%rdx
  mov    %rcx,%rax
  lea    (%r14,%rcx,8),%rcx
  imul   %r8d,%eax
  movsd  (%rcx),%xmm0
  add    %esi,%eax
  cltq
  movsd  (%r10,%rax,8),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rcx)
  cmp    %edx,%r8d
  jg     L220
  add    $0x1,%rdi
  jmp    L97
L116:
  pop    %rbx
  mov    $0xffffffff,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L131:
  lea    -0x1(%r8),%ebx
  mov    %r8d,%r9d
  movslq %ebx,%rdi
L93:
  movslq (%r11,%rdi,4),%rax
  mov    %edi,%r12d
  mov    %rax,%rcx
  lea    (%r14,%rax,8),%rbp
  imul   %r8d,%ecx
  movsd  0x0(%rbp),%xmm1
  cmp    %r9d,%r8d
  jle    L207
  movslq %ecx,%rdx
  movslq %r9d,%rax
  lea    (%r10,%rdx,8),%rsi
  nopl   0x0(%rax,%rax,1)
L225:
  movslq (%r11,%rax,4),%rdx
  movsd  (%r14,%rdx,8),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  add    $0x1,%rax
  subsd  %xmm0,%xmm1
  cmp    %eax,%r8d
  jg     L225
L207:
  lea    (%rcx,%r12,1),%eax
  sub    $0x1,%rdi
  sub    $0x1,%r9d
  cltq
  divsd  (%r10,%rax,8),%xmm1
  movsd  %xmm1,0x0(%rbp)
  test   %edi,%edi
  jns    L93
  lea    0x4(%r11),%rcx
  xor    %edx,%edx
  xor    %ebp,%ebp
  add    $0x8,%r11
  jmp    L34
L111:
  cmp    %r12d,%r8d
  jle    L237
L77:
  add    $0x1,%rdx
  add    $0x4,%rcx
  mov    %r12d,%ebp
L34:
  lea    0x1(%rbp),%r12d
  mov    %edx,%esi
  cmp    %edx,-0x4(%rcx)
  je     L111
  cmp    %r12d,%r8d
  jle    L237
  mov    %ebx,%eax
  sub    %r12d,%eax
  add    %rdx,%rax
  lea    (%r11,%rax,4),%rdi
  mov    %rcx,%rax
  cs nopw 0x0(%rax,%rax,1)
L28:
  cmp    %esi,(%rax)
  jne    L63
  movslq -0x4(%rcx),%r10
  movsd  (%r14,%rdx,8),%xmm1
  mov    %r10,%r9
  lea    (%r14,%r10,8),%r10
  movsd  (%r10),%xmm0
  movsd  %xmm1,(%r10)
  movsd  %xmm0,(%r14,%rdx,8)
  mov    %r9d,(%rax)
  mov    %ebp,-0x4(%rcx)
L63:
  add    $0x4,%rax
  cmp    %rax,%rdi
  jne    L28
  jmp    L77
L237:
  pop    %rbx
  xor    %eax,%eax
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L60:
  xor    %eax,%eax
  ret
```

tool_calls: name: unpack_data
arguments: data_tag: D6
type_guessed: qword

tool: D6: 9223372036854775807

assistant: ```c
int my_linear_eq_solve(double *mat_a, int dim, int *pivot, double *vec_b) {
  int i, j, k, row_index_j, row_index_i, max_j, tmp_index;
  double absmax_aji, abs_aji, pivot_aii, vec_x;
  for (i = 0; i < dim; i++)
    pivot[i] = i;
  for (i = 0; i < dim; i++) {
    absmax_aji = fabs(mat_a[pivot[i] * dim + i]);
    max_j = i;
    for (j = i + 1; j < dim; j++) {
      abs_aji = mat_a[pivot[j] * dim + i];
      if (absmax_aji < abs_aji) {
        max_j = j;
        absmax_aji = abs_aji;
      }
    }
    if (max_j != i) {
      tmp_index = pivot[max_j];
      pivot[max_j] = pivot[i];
      pivot[i] = tmp_index;
    }
    row_index_i = pivot[i] * dim;
    pivot_aii = mat_a[row_index_i + i];
    if (fabs(pivot_aii) <= 0.0)
      return -1;
    for (j = i + 1; j < dim; j++) {
      row_index_j = pivot[j] * dim;
      mat_a[row_index_j + i] /= pivot_aii;
      for (k = i + 1; k < dim; k++)
        mat_a[row_index_j + k] -= mat_a[row_index_j + i] * mat_a[row_index_i + k];
    }
  }
  for (j = 0; j < dim; j++) {
    vec_x = vec_b[pivot[j]];
    for (i = j + 1; i < dim; i++)
      vec_b[pivot[i]] -= mat_a[pivot[i] * dim + j] * vec_x;
  }
  for (i = dim - 1; i >= 0; i--) {
    vec_x = vec_b[pivot[i]];
    row_index_i = pivot[i] * dim;
    for (j = i + 1; j < dim; j++)
      vec_x -= mat_a[row_index_i + j] * vec_b[pivot[j]];
    vec_b[pivot[i]] = vec_x / mat_a[row_index_i + i];
  }
  for (i = 0; i < dim; i++) {
    if (pivot[i] != i) {
      for (j = i + 1; j < dim; j++) {
        if (pivot[j] == i) {
          vec_x = vec_b[pivot[i]];
          vec_b[pivot[i]] = vec_b[i];
          vec_b[i] = vec_x;
          pivot[j] = pivot[i];
          pivot[i] = i;
        }
      }
    }
  }
  return 0;
}
```