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

```asm
<simq>:
  endbr64
  push   %r15
  lea    -0x1(%rcx),%eax
  mov    %rdx,%r15
  push   %r14
  mov    %rdi,%r14
  push   %r13
  mov    %ecx,%r13d
  push   %r12
  mov    %r9,%r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,0x38(%rsp)
  mov    %eax,0x2c(%rsp)
  test   %r8d,%r8d
  js     L401
  test   %ecx,%ecx
  jle    L265
  mov    0x2c(%rsp),%r8d
  mov    %ecx,%r9d
  xor    %esi,%esi
  xor    %ecx,%ecx
  movq   D6(%rip),%xmm2
  movsd  D19(%rip),%xmm4
  lea    0x8(%rdi),%rdi
  pxor   %xmm3,%xmm3
  nop
L68:
  movslq %esi,%rdx
  mov    %ecx,(%r12,%rcx,4)
  movapd %xmm3,%xmm1
  lea    (%r14,%rdx,8),%rax
  add    %r8,%rdx
  lea    (%rdi,%rdx,8),%rdx
  cs nopw 0x0(%rax,%rax,1)
L155:
  movsd  (%rax),%xmm0
  comisd %xmm0,%xmm3
  jbe    L19
  xorpd  %xmm2,%xmm0
L19:
  maxsd  %xmm1,%xmm0
  add    $0x8,%rax
  movapd %xmm0,%xmm1
  cmp    %rdx,%rax
  jne    L155
  add    %r13d,%esi
  ucomisd %xmm3,%xmm0
  jp     L116
  je     L287
L116:
  movapd %xmm4,%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15,%rcx,8)
  add    $0x1,%rcx
  cmp    %rcx,%r9
  jne    L68
L265:
  mov    0x2c(%rsp),%eax
  pxor   %xmm3,%xmm3
  test   %eax,%eax
  jle    L143
  mov    0x2c(%rsp),%eax
  mov    %r13d,0x4(%rsp)
  xor    %r9d,%r9d
  xor    %ebx,%ebx
  movq   D6(%rip),%xmm6
  pxor   %xmm5,%xmm5
  mov    %eax,(%rsp)
  lea    0x10(%r14),%rax
  mov    %rax,0x30(%rsp)
  movapd %xmm6,%xmm4
  nop
L259:
  cmp    %ebx,%r13d
  je     L102
  mov    %r9,%rdx
  movapd %xmm5,%xmm3
  movapd %xmm5,%xmm1
  xor    %esi,%esi
  cs nopw 0x0(%rax,%rax,1)
L354:
  movslq (%r12,%rdx,4),%rcx
  mov    %r13d,%eax
  mov    %edx,%edi
  imul   %ecx,%eax
  add    %ebx,%eax
  cltq
  movsd  (%r14,%rax,8),%xmm0
  comisd %xmm0,%xmm5
  jbe    L136
  xorpd  %xmm6,%xmm0
L136:
  mulsd  (%r15,%rcx,8),%xmm0
  comisd %xmm1,%xmm0
  maxsd  %xmm1,%xmm0
  cmova  %edi,%esi
  add    $0x1,%rdx
  movapd %xmm0,%xmm1
  movslq %esi,%rcx
  cmp    %edx,%r13d
  jg     L354
  ucomisd %xmm5,%xmm0
  jp     L121
  je     L102
L121:
  cmp    %ecx,%ebx
  je     L4
  lea    (%r12,%rcx,4),%rax
  mov    (%r12,%r9,4),%edx
  mov    (%rax),%ecx
  mov    %ecx,(%r12,%r9,4)
  mov    %edx,(%rax)
L4:
  mov    (%r12,%r9,4),%eax
  lea    0x1(%rbx),%edi
  mov    %edi,0xc(%rsp)
  imul   %r13d,%eax
  lea    (%rax,%rbx,1),%edx
  movslq %edx,%rdx
  movsd  (%r14,%rdx,8),%xmm7
  cmp    %edi,%r13d
  jle    L190
  mov    (%rsp),%r11d
  mov    %edi,%esi
  movslq %eax,%rdi
  lea    0x1(%r9),%rbp
  lea    0x2(%r9,%rdi,1),%rdx
  mov    %rdi,0x10(%rsp)
  mov    %rbp,%r8
  mov    %r11d,%edi
  lea    0x0(,%rdx,8),%r10
  mov    %r11d,%edx
  mov    %r15,0x20(%rsp)
  and    $0xfffffffe,%edi
  shr    %edx
  lea    -0x8(%r14,%r10,1),%rcx
  mov    %r10,%r15
  add    %edi,%esi
  mov    %edi,0x8(%rsp)
  sub    $0x1,%edx
  add    %esi,%eax
  add    $0x1,%rdx
  cltq
  shl    $0x4,%rdx
  lea    (%r14,%rax,8),%rdi
  lea    -0x1(%r11),%eax
  mov    %eax,0x28(%rsp)
  add    %r9,%rax
  mov    %rax,0x18(%rsp)
  nopl   0x0(%rax,%rax,1)
L286:
  mov    (%r12,%r8,4),%r10d
  imul   %r13d,%r10d
  lea    (%r10,%rbx,1),%eax
  movslq %r10d,%r9
  cltq
  lea    (%r14,%rax,8),%rax
  movsd  (%rax),%xmm0
  xorpd  %xmm4,%xmm0
  divsd  %xmm7,%xmm0
  movapd %xmm0,%xmm1
  xorpd  %xmm4,%xmm1
  movsd  %xmm1,(%rax)
  lea    0x0(%rbp,%r9,1),%rax
  shl    $0x3,%rax
  cmp    %rax,%r15
  je     L324
  cmpl   $0x2,0x4(%rsp)
  je     L324
  movapd %xmm0,%xmm2
  add    %r14,%rax
  xor    %r9d,%r9d
  unpcklpd %xmm2,%xmm2
  nopl   0x0(%rax,%rax,1)
L275:
  movupd (%rcx,%r9,1),%xmm1
  movupd (%rax,%r9,1),%xmm8
  mulpd  %xmm2,%xmm1
  addpd  %xmm8,%xmm1
  movups %xmm1,(%rax,%r9,1)
  add    $0x10,%r9
  cmp    %r9,%rdx
  jne    L275
  mov    0x8(%rsp),%r11d
  cmp    %r11d,(%rsp)
  je     L246
  mulsd  (%rdi),%xmm0
  add    %esi,%r10d
  movslq %r10d,%r10
  lea    (%r14,%r10,8),%rax
  addsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L246:
  add    $0x1,%r8
  cmp    %r8d,%r13d
  jg     L286
  mov    0x20(%rsp),%r15
L209:
  mov    0x28(%rsp),%eax
  subl   $0x1,0x4(%rsp)
  mov    %rbp,%r9
  mov    0xc(%rsp),%ebx
  mov    %eax,(%rsp)
  cmp    %ebx,0x2c(%rsp)
  jne    L259
L143:
  movslq %r13d,%r8
  mov    -0x4(%r12,%r8,4),%eax
  imul   %r13d,%eax
  lea    -0x1(%r13,%rax,1),%eax
  cltq
  lea    (%r14,%rax,8),%r9
  ucomisd (%r9),%xmm3
  jp     L372
  jne    L372
  lea    D48(%rip),%rdi
  call   <puts@plt>
  mov    $0x3,%eax
  jmp    L332
  xchg   %ax,%ax
L324:
  mov    0x18(%rsp),%r11
  add    %r14,%rax
  lea    (%r11,%r9,1),%r10
  mov    0x30(%rsp),%r11
  lea    (%r11,%r10,8),%r11
  mov    0x10(%rsp),%r10
  sub    %r9,%r10
  nopl   (%rax)
L103:
  movsd  (%rax,%r10,8),%xmm1
  add    $0x8,%rax
  mulsd  %xmm0,%xmm1
  addsd  -0x8(%rax),%xmm1
  movsd  %xmm1,-0x8(%rax)
  cmp    %r11,%rax
  jne    L103
  jmp    L246
L190:
  mov    (%rsp),%eax
  lea    0x1(%r9),%rbp
  sub    $0x1,%eax
  mov    %eax,0x28(%rsp)
  jmp    L209
L287:
  lea    D50(%rip),%rdi
  call   <puts@plt>
  mov    $0x1,%eax
L332:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L401:
  movslq %ecx,%r8
  mov    -0x4(%r9,%r8,4),%eax
  imul   %ecx,%eax
  lea    -0x1(%rcx,%rax,1),%eax
  cltq
  lea    (%rdi,%rax,8),%r9
L372:
  movslq (%r12),%rax
  mov    0x38(%rsp),%r10
  movsd  (%r10,%rax,8),%xmm0
  movsd  %xmm0,(%r15)
  cmp    $0x1,%r13d
  jle    L250
  mov    $0x1,%esi
  pxor   %xmm3,%xmm3
  nopl   0x0(%rax)
L177:
  movslq (%r12,%rsi,4),%rdi
  mov    %r13d,%edx
  mov    %esi,%r11d
  imul   %edi,%edx
  cmp    $0x1,%rsi
  je     L300
  mov    %esi,%ecx
  movslq %edx,%rax
  movapd %xmm3,%xmm1
  shr    %ecx
  lea    (%r14,%rax,8),%rbx
  xor    %eax,%eax
  shl    $0x4,%rcx
  nopl   0x0(%rax)
L140:
  movupd (%r15,%rax,1),%xmm0
  movupd (%rbx,%rax,1),%xmm6
  add    $0x10,%rax
  mulpd  %xmm6,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%rcx
  jne    L140
  mov    %r11d,%ecx
  and    $0xfffffffe,%ecx
  add    %ecx,%edx
  cmp    %ecx,%r11d
  je     L245
L171:
  movslq %ecx,%rcx
  movslq %edx,%rax
  movsd  (%r15,%rcx,8),%xmm0
  mulsd  (%r14,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
L245:
  movsd  (%r10,%rdi,8),%xmm0
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15,%rsi,8)
  add    $0x1,%rsi
  cmp    %r8,%rsi
  jne    L177
  lea    -0x8(%r15,%rsi,8),%rax
  mov    $0x1,%r8d
  sub    $0x1,%rsi
  movsd  (%rax),%xmm0
  divsd  (%r9),%xmm0
  movsd  %xmm0,(%rax)
  movslq 0x2c(%rsp),%rax
  mov    %rax,%r9
  lea    (%r15,%rax,8),%rdi
  nopl   0x0(%rax)
L409:
  mov    -0x4(%r12,%rsi,4),%ecx
  mov    %r9d,%r10d
  sub    $0x1,%r9d
  mov    %r10d,%eax
  imul   %r13d,%ecx
  cmp    %r10d,%r13d
  jle    L335
  cmp    $0x1,%r8d
  je     L238
  movslq %ecx,%rax
  mov    %r8d,%edx
  movapd %xmm3,%xmm1
  add    %rsi,%rax
  shr    %edx
  lea    (%r14,%rax,8),%r11
  shl    $0x4,%rdx
  xor    %eax,%eax
  nopw   0x0(%rax,%rax,1)
L30:
  movupd (%rdi,%rax,1),%xmm0
  movupd (%r11,%rax,1),%xmm7
  add    $0x10,%rax
  mulpd  %xmm7,%xmm0
  addsd  %xmm0,%xmm1
  unpckhpd %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%rdx
  jne    L30
  mov    %r8d,%edx
  and    $0xfffffffe,%edx
  lea    (%r10,%rdx,1),%eax
  cmp    %edx,%r8d
  je     L45
L131:
  lea    (%rcx,%rax,1),%edx
  cltq
  movslq %edx,%rdx
  movsd  (%r14,%rdx,8),%xmm0
  mulsd  (%r15,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
L45:
  lea    (%rcx,%r9,1),%eax
  add    $0x1,%r8d
  sub    $0x8,%rdi
  movsd  (%rdi),%xmm0
  cltq
  sub    $0x1,%rsi
  subsd  %xmm1,%xmm0
  divsd  (%r14,%rax,8),%xmm0
  movsd  %xmm0,(%rdi)
  cmp    %r8d,%r13d
  jne    L409
  xor    %eax,%eax
L35:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L335:
  movapd %xmm3,%xmm1
  jmp    L45
L300:
  movapd %xmm3,%xmm1
  xor    %ecx,%ecx
  jmp    L171
L238:
  movapd %xmm3,%xmm1
  jmp    L131
L102:
  lea    D49(%rip),%rdi
  call   <puts@plt>
  add    $0x48,%rsp
  mov    $0x2,%eax
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L250:
  lea    -0x8(%r15,%r8,8),%rax
  movsd  (%rax),%xmm0
  divsd  (%r9),%xmm0
  movsd  %xmm0,(%rax)
  xor    %eax,%eax
  jmp    L35
```

tool_calls: name: parse_data
arguments: label: D6
type_guessed: f32[2]
name: parse_data
arguments: label: D19
type_guessed: f64
name: parse_data
arguments: label: D48
type_guessed: string
name: parse_data
arguments: label: D50
type_guessed: string
name: parse_data
arguments: label: D49
type_guessed: string

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

tool: D19: 1

tool: D48: SIMQ A[kpn]=0

tool: D50: SIMQ ROWNRM=0

tool: D49: SIMQ BIG=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);
}
```