user: 请显示与下面列出的汇编代码相匹配的C语言实现:

```asm
<simq>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xb0,%rsp
  mov    %rdi,-0x88(%rbp)
  mov    %rsi,-0x90(%rbp)
  mov    %rdx,-0x98(%rbp)
  mov    %ecx,-0x9c(%rbp)
  mov    %r8d,-0xa0(%rbp)
  mov    %r9,-0xa8(%rbp)
  mov    -0x9c(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,-0x60(%rbp)
  cmpl   $0x0,-0xa0(%rbp)
  js     L83
  movl   $0x0,-0x74(%rbp)
  movl   $0x0,-0x7c(%rbp)
  jmp    L266
L170:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x7c(%rbp),%eax
  mov    %eax,(%rdx)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x78(%rbp)
  jmp    L45
L162:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L109
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D55(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  jmp    L342
L109:
  mov    -0x74(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L342:
  movsd  %xmm0,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  comisd -0x38(%rbp),%xmm0
  jbe    L315
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,-0x38(%rbp)
L315:
  addl   $0x1,-0x74(%rbp)
  addl   $0x1,-0x78(%rbp)
L45:
  mov    -0x78(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L162
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jp     L229
  pxor   %xmm0,%xmm0
  ucomisd -0x38(%rbp),%xmm0
  jne    L229
  lea    D21(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x1,%eax
  jmp    L10
L229:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  D49(%rip),%xmm0
  divsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L266:
  mov    -0x7c(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L170
  movl   $0x0,-0x64(%rbp)
  jmp    L309
L101:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  movl   $0x0,-0x6c(%rbp)
  mov    -0x64(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L157
L265:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L256
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D55(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  jmp    L223
L256:
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
L223:
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x10(%rbp),%xmm0
  comisd -0x30(%rbp),%xmm0
  jbe    L255
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x7c(%rbp),%eax
  mov    %eax,-0x6c(%rbp)
L255:
  addl   $0x1,-0x7c(%rbp)
L157:
  mov    -0x7c(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L265
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jp     L351
  pxor   %xmm0,%xmm0
  ucomisd -0x30(%rbp),%xmm0
  jne    L351
  lea    D17(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x2,%eax
  jmp    L10
L351:
  mov    -0x6c(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  je     L139
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x78(%rbp)
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    -0x64(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0xa8(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rax),%eax
  mov    %eax,(%rdx)
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rax,%rdx
  mov    -0x78(%rbp),%eax
  mov    %eax,(%rdx)
L139:
  mov    -0x64(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x58(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x54(%rbp)
  mov    -0x54(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x64(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x50(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  jmp    L330
L252:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x48(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D55(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x18(%rbp),%xmm0
  movq   D55(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x9c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x58(%rbp),%eax
  mov    %eax,-0x40(%rbp)
  mov    -0x50(%rbp),%eax
  mov    %eax,-0x78(%rbp)
  jmp    L333
L122:
  mov    -0x44(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  mov    %eax,-0x70(%rbp)
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x40(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x78(%rbp)
L333:
  mov    -0x78(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L122
  addl   $0x1,-0x7c(%rbp)
L330:
  mov    -0x7c(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L252
  addl   $0x1,-0x64(%rbp)
L309:
  mov    -0x64(%rbp),%eax
  cmp    -0x60(%rbp),%eax
  jl     L101
  mov    -0x9c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  imul   -0x9c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x9c(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
  mov    -0x5c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L216
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L216
  lea    D27(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  mov    $0x3,%eax
  jmp    L10
L83:
  nop
L216:
  mov    -0xa8(%rbp),%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x98(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x7c(%rbp)
  jmp    L98
L42:
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x70(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x78(%rbp)
  jmp    L88
L4:
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x70(%rbp)
  addl   $0x1,-0x78(%rbp)
L88:
  mov    -0x78(%rbp),%eax
  cmp    -0x7c(%rbp),%eax
  jl     L4
  mov    -0x4c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  subsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L98:
  mov    -0x7c(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L42
  mov    -0x9c(%rbp),%eax
  cltq
  shl    $0x2,%rax
  lea    -0x4(%rax),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  imul   -0x9c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x9c(%rbp),%eax
  add    %edx,%eax
  sub    $0x1,%eax
  mov    %eax,-0x3c(%rbp)
  mov    -0x9c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x9c(%rbp),%eax
  cltq
  shl    $0x3,%rax
  lea    -0x8(%rax),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x68(%rbp)
  jmp    L46
L94:
  mov    -0x60(%rbp),%eax
  sub    -0x68(%rbp),%eax
  mov    %eax,-0x7c(%rbp)
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    %eax,-0x4c(%rbp)
  mov    -0x9c(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,-0x44(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0x7c(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x78(%rbp)
  jmp    L30
L232:
  mov    -0x44(%rbp),%edx
  mov    -0x78(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x78(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x78(%rbp)
L30:
  mov    -0x78(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L232
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  subsd  -0x28(%rbp),%xmm0
  mov    -0x44(%rbp),%edx
  mov    -0x7c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x68(%rbp)
L46:
  mov    -0x68(%rbp),%eax
  cmp    -0x9c(%rbp),%eax
  jl     L94
  mov    $0x0,%eax
L10:
  leave
  ret
```

tool_calls: name: unpack_data
arguments: tag: D55
datatype: f32[2]
name: unpack_data
arguments: tag: D21
datatype: string
name: unpack_data
arguments: tag: D49
datatype: f64
name: unpack_data
arguments: tag: D17
datatype: string
name: unpack_data
arguments: tag: D27
datatype: string

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

tool: D21: SIMQ ROWNRM=0

tool: D49: 1

tool: D17: SIMQ BIG=0

tool: D27: 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;
  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 = ((A[ij]) < 0 ? -(A[ij]) : (A[ij]));
      if (rownrm < q)
        rownrm = q;
      ++ij;
    }
    if (rownrm == 0.0) {
      puts("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 = ((A[ipk]) < 0 ? -(A[ipk]) : (A[ipk])) * X[ip];
      if (size > big) {
        big = size;
        idxpiv = i;
      }
    }
    if (big == 0.0) {
      puts("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) {
    puts("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);
}
```