user: What is the c source code of the assembly code below?

```asm
<simq>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %rdi,%r10
  mov    %rsi,0x18(%rsp)
  mov    %rdx,%r11
  mov    %ecx,%edi
  lea    -0x1(%rcx),%eax
  mov    %eax,0x14(%rsp)
  test   %r8d,%r8d
  js     L216
  test   %ecx,%ecx
  jle    L288
  lea    -0x1(%rcx),%ebx
  mov    %ecx,%ebp
  mov    $0x0,%ecx
  mov    $0x0,%esi
  lea    0x8(%r10),%r8
  movq   D55(%rip),%xmm2
  pxor   %xmm3,%xmm3
  movapd %xmm3,%xmm4
  movsd  D53(%rip),%xmm5
  jmp    L220
L60:
  add    %edi,%esi
  ucomisd %xmm3,%xmm0
  jp     L211
  ucomisd %xmm4,%xmm0
  je     L249
L211:
  movapd %xmm5,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r11,%rcx,8)
  add    $0x1,%rcx
  cmp    %rbp,%rcx
  je     L288
L220:
  mov    %ecx,(%r9,%rcx,4)
  movslq %esi,%rdx
  lea    (%r10,%rdx,8),%rax
  add    %rbx,%rdx
  lea    (%r8,%rdx,8),%rdx
  pxor   %xmm1,%xmm1
L341:
  movsd  (%rax),%xmm0
  andpd  %xmm2,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L341
  jmp    L60
L249:
  lea    D17(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x1,%eax
  jmp    L64
L288:
  cmpl   $0x0,0x14(%rsp)
  jle    L346
  lea    -0x2(%rdi),%eax
  mov    %eax,0xc(%rsp)
  lea    -0x1(%rdi),%eax
  mov    %eax,0x10(%rsp)
  mov    $0x1,%r12d
  mov    $0x0,%r15d
  mov    $0x0,%ebx
  pxor   %xmm7,%xmm7
  movq   D55(%rip),%xmm4
  movapd %xmm7,%xmm6
  movapd %xmm7,%xmm5
  movq   D62(%rip),%xmm2
  lea    0x10(%r10),%r14
  jmp    L267
L12:
  lea    D59(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x2,%eax
  jmp    L64
L2:
  mov    %edi,%ebp
  imul   (%r9,%r15,4),%ebp
  lea    0x0(%rbp,%rbx,1),%eax
  cltq
  movsd  (%r10,%rax,8),%xmm3
  lea    0x1(%rbx),%eax
  mov    %eax,0x8(%rsp)
  cmp    %eax,%edi
  jle    L52
  mov    %r12,%r8
  mov    0xc(%rsp),%r13d
  add    %r15,%r13
  movslq %ebp,%rbp
L302:
  mov    %edi,%esi
  imul   (%r9,%r8,4),%esi
  lea    (%rsi,%rbx,1),%eax
  cltq
  lea    (%r10,%rax,8),%rax
  movsd  (%rax),%xmm1
  xorpd  %xmm2,%xmm1
  divsd  %xmm3,%xmm1
  movapd %xmm1,%xmm0
  xorpd  %xmm2,%xmm0
  movsd  %xmm0,(%rax)
  movslq %esi,%rsi
  lea    (%rsi,%r12,1),%rax
  lea    (%r10,%rax,8),%rax
  lea    0x0(%r13,%rsi,1),%rdx
  lea    (%r14,%rdx,8),%rcx
  mov    %rbp,%rdx
  sub    %rsi,%rdx
L172:
  movapd %xmm1,%xmm0
  mulsd  (%rax,%rdx,8),%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L172
  add    $0x1,%r8
  cmp    %r8d,%edi
  jg     L302
L52:
  add    $0x1,%r15
  add    $0x1,%r12
  subl   $0x1,0xc(%rsp)
  mov    0x8(%rsp),%ebx
  mov    0x10(%rsp),%eax
  cmp    %eax,%ebx
  je     L346
L267:
  cmp    %ebx,%edi
  je     L12
  mov    %r15,%rax
  movapd %xmm7,%xmm1
  mov    $0x0,%edx
L208:
  mov    (%r9,%rax,4),%esi
  mov    %edi,%ecx
  imul   %esi,%ecx
  add    %ebx,%ecx
  movslq %ecx,%rcx
  movsd  (%r10,%rcx,8),%xmm0
  andpd  %xmm4,%xmm0
  movslq %esi,%rsi
  mulsd  (%r11,%rsi,8),%xmm0
  comisd %xmm1,%xmm0
  maxsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  cmova  %eax,%edx
  add    $0x1,%rax
  cmp    %eax,%edi
  jg     L208
  ucomisd %xmm6,%xmm0
  jp     L281
  ucomisd %xmm5,%xmm0
  je     L12
L281:
  cmp    %ebx,%edx
  je     L2
  mov    (%r9,%r15,4),%ecx
  movslq %edx,%rdx
  lea    (%r9,%rdx,4),%rax
  mov    (%rax),%edx
  mov    %edx,(%r9,%r15,4)
  mov    %ecx,(%rax)
  jmp    L2
L346:
  movslq %edi,%rax
  mov    %edi,%ebx
  imul   -0x4(%r9,%rax,4),%ebx
  lea    -0x1(%rdi,%rbx,1),%eax
  cltq
  pxor   %xmm0,%xmm0
  ucomisd (%r10,%rax,8),%xmm0
  jp     L216
  je     L13
L216:
  movslq (%r9),%rax
  mov    0x18(%rsp),%rbx
  movsd  (%rbx,%rax,8),%xmm0
  movsd  %xmm0,(%r11)
  cmp    $0x1,%edi
  jle    L260
  mov    %edi,%r8d
  mov    $0x1,%edx
L197:
  mov    (%r9,%rdx,4),%esi
  mov    %edi,%eax
  imul   %esi,%eax
  test   %edx,%edx
  jle    L204
  cltq
  lea    (%r10,%rax,8),%rcx
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
L345:
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  (%r11,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rax,%rdx
  jne    L345
L243:
  movslq %esi,%rsi
  movsd  (%rbx,%rsi,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%r11,%rdx,8)
  add    $0x1,%rdx
  cmp    %r8,%rdx
  jne    L197
L260:
  movslq %edi,%rax
  lea    -0x8(%r11,%rax,8),%rdx
  mov    %edi,%ebx
  imul   -0x4(%r9,%rax,4),%ebx
  lea    -0x1(%rdi,%rbx,1),%eax
  cltq
  movsd  (%rdx),%xmm0
  divsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%rdx)
  cmp    $0x1,%edi
  jle    L119
  mov    0x14(%rsp),%esi
  movslq %esi,%rax
  sub    $0x1,%rax
  lea    (%r9,%rax,4),%r9
  lea    (%r11,%rax,8),%r8
L333:
  lea    -0x1(%rsi),%ebx
  mov    %edi,%ecx
  imul   (%r9),%ecx
  cmp    %esi,%edi
  jle    L48
  movslq %esi,%rax
  movslq %ecx,%rdx
  lea    (%r10,%rdx,8),%rdx
  pxor   %xmm1,%xmm1
L159:
  movsd  (%rdx,%rax,8),%xmm0
  mulsd  (%r11,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %eax,%edi
  jg     L159
L19:
  movsd  (%r8),%xmm0
  subsd  %xmm1,%xmm0
  lea    (%rcx,%rbx,1),%eax
  cltq
  divsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%r8)
  sub    $0x4,%r9
  sub    $0x8,%r8
  sub    $0x1,%esi
  jne    L333
  mov    $0x0,%eax
L64:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L13:
  lea    D2(%rip),%rdi
  mov    $0x0,%eax
  call   <printf@plt>
  mov    $0x3,%eax
  jmp    L64
L204:
  pxor   %xmm1,%xmm1
  jmp    L243
L48:
  pxor   %xmm1,%xmm1
  jmp    L19
L119:
  mov    $0x0,%eax
  jmp    L64
```

tool_calls: name: parse_data
arguments: label: D55
type_infered: qword
name: parse_data
arguments: label: D53
type_infered: f64
name: parse_data
arguments: label: D17
type_infered: string
name: parse_data
arguments: label: D62
type_infered: f32[2]
name: parse_data
arguments: label: D59
type_infered: string
name: parse_data
arguments: label: D2
type_infered: string

tool: D55: 9223372036854775807

tool: D53: 1

tool: D17: SIMQ ROWNRM=0

tool: {"D62": [0.0,-0.0]}

tool: D59: SIMQ BIG=0

tool: D2: SIMQ A[kpn]=0

assistant: ```c
int simq(A, B, X, n, flag, IPS)
double A[], B[], X[];
int n, flag;
int IPS[];
{
  int i, j, ij, ip, ipj, ipk, ipn;
  int idxpiv, iback;
  int k, kp, kp1, kpk, kpn;
  int nip, nkp, nm1;
  double em, q, rownrm, big, size, pivot, sum;
  double fabs();
  nm1 = n - 1;
  if (flag < 0)
    goto solve;
  ij = 0;
  for (i = 0; i < n; i++) {
    IPS[i] = i;
    rownrm = 0.0;
    for (j = 0; j < n; j++) {
      q = fabs(A[ij]);
      if (rownrm < q)
        rownrm = q;
      ++ij;
    }
    if (rownrm == 0.0) {
      printf("SIMQ ROWNRM=0");
      return (1);
    }
    X[i] = 1.0 / rownrm;
  }
  for (k = 0; k < nm1; k++) {
    big = 0.0;
    idxpiv = 0;
    for (i = k; i < n; i++) {
      ip = IPS[i];
      ipk = n * ip + k;
      size = fabs(A[ipk]) * X[ip];
      if (size > big) {
        big = size;
        idxpiv = i;
      }
    }
    if (big == 0.0) {
      printf("SIMQ BIG=0");
      return (2);
    }
    if (idxpiv != k) {
      j = IPS[k];
      IPS[k] = IPS[idxpiv];
      IPS[idxpiv] = j;
    }
    kp = IPS[k];
    kpk = n * kp + k;
    pivot = A[kpk];
    kp1 = k + 1;
    for (i = kp1; i < n; i++) {
      ip = IPS[i];
      ipk = n * ip + k;
      em = -A[ipk] / pivot;
      A[ipk] = -em;
      nip = n * ip;
      nkp = n * kp;
      for (j = kp1; j < n; j++) {
        ipj = nip + j;
        A[ipj] = A[ipj] + em * A[nkp + j];
      }
    }
  }
  kpn = n * IPS[n - 1] + n - 1;
  if (A[kpn] == 0.0) {
    printf("SIMQ A[kpn]=0");
    return (3);
  }
solve:
  ip = IPS[0];
  X[0] = B[ip];
  for (i = 1; i < n; i++) {
    ip = IPS[i];
    ipj = n * ip;
    sum = 0.0;
    for (j = 0; j < i; j++) {
      sum += A[ipj] * X[j];
      ++ipj;
    }
    X[i] = B[ip] - sum;
  }
  ipn = n * IPS[n - 1] + n - 1;
  X[n - 1] = X[n - 1] / A[ipn];
  for (iback = 1; iback < n; iback++) {
    i = nm1 - iback;
    ip = IPS[i];
    nip = n * ip;
    sum = 0.0;
    for (j = i + 1; j < n; j++)
      sum += A[nip + j] * X[j];
    X[i] = (X[i] - sum) / A[nip + i];
  }
  return (0);
}
```