user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<quatVectLoopf>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x98,%rsp
  mov    %rdi,%rbp
  mov    %rsi,0x8(%rsp)
  mov    %rdx,%rbx
  mov    %r9d,%r12d
  mov    %fs:0x28,%rax
  mov    %rax,0x88(%rsp)
  xor    %eax,%eax
  cmp    $0x1,%r8
  je     L248
  cmp    $0x1,%rcx
  jbe    L234
  cmp    $0x1,%r8
  jbe    L234
  cmp    %r8,%rcx
  cmovbe %rcx,%r8
  mov    %r8,%r13
  cmp    $0x1,%rcx
  setne  %al
  movzbl %al,%eax
  shl    $0x2,%rax
  movq   $0x3,(%rsp)
L65:
  shl    $0x2,%rax
  mov    %rax,0x10(%rsp)
  lea    0x0(%r13,%r13,2),%rax
  mov    %rax,0x18(%rsp)
  mov    $0x0,%r15d
  mov    $0x0,%r14d
  lea    0x40(%rsp),%r13
  jmp    L205
L248:
  movq   $0x0,(%rsp)
L91:
  cmp    %r8,%rcx
  mov    %r8,%r13
  cmovae %rcx,%r13
  cmp    $0x1,%r13
  seta   %dl
  cmp    $0x1,%rcx
  jne    L247
  test   %dl,%dl
  je     L247
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp),%xmm0
  movsd  %xmm0,0x60(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x4(%rbp),%xmm0
  movsd  %xmm0,0x68(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x8(%rbp),%xmm0
  movsd  %xmm0,0x70(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0xc(%rbp),%xmm0
  movsd  %xmm0,0x78(%rsp)
  mov    (%rsp),%rax
  shl    $0x2,%rax
  mov    %rax,(%rsp)
  mov    0x8(%rsp),%rbp
  mov    $0x0,%r15d
  lea    0x40(%rsp),%r14
  jmp    L215
L234:
  movq   $0x3,(%rsp)
  jmp    L91
L140:
  add    $0x1,%r15
  add    $0xc,%rbx
  add    (%rsp),%rbp
  cmp    %r15,%r13
  jbe    L159
L215:
  mov    $0x0,%eax
L106:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp,%rax,4),%xmm0
  movsd  %xmm0,0x20(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L106
  lea    0x20(%rsp),%rsi
  lea    0x60(%rsp),%rdi
  mov    %r12d,%ecx
  mov    %r14,%rdx
  call   <quatVector@plt>
  mov    $0x0,%eax
L43:
  pxor   %xmm0,%xmm0
  cvtsd2ss (%r14,%rax,8),%xmm0
  movss  %xmm0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L43
  jmp    L140
L247:
  cmp    $0x1,%rcx
  setne  %al
  movzbl %al,%eax
  shl    $0x2,%rax
  cmp    $0x1,%r8
  jne    L184
  test   %dl,%dl
  je     L184
  mov    0x8(%rsp),%rcx
  pxor   %xmm0,%xmm0
  cvtss2sd (%rcx),%xmm0
  movsd  %xmm0,0x20(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x4(%rcx),%xmm0
  movsd  %xmm0,0x28(%rsp)
  pxor   %xmm0,%xmm0
  cvtss2sd 0x8(%rcx),%xmm0
  movsd  %xmm0,0x30(%rsp)
  shl    $0x2,%rax
  mov    %rax,(%rsp)
  mov    $0x0,%r15d
  lea    0x40(%rsp),%r14
  jmp    L97
L184:
  test   %r13,%r13
  jne    L65
L159:
  mov    0x88(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L147
  mov    $0x1,%eax
  add    $0x98,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L90:
  add    $0x1,%r15
  add    $0xc,%rbx
  add    (%rsp),%rbp
  cmp    %r15,%r13
  jbe    L159
L97:
  mov    $0x0,%eax
L212:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp,%rax,4),%xmm0
  movsd  %xmm0,0x60(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    $0x4,%rax
  jne    L212
  lea    0x20(%rsp),%rsi
  lea    0x60(%rsp),%rdi
  mov    %r12d,%ecx
  mov    %r14,%rdx
  call   <quatVector@plt>
  mov    $0x0,%eax
L259:
  pxor   %xmm0,%xmm0
  cvtsd2ss (%r14,%rax,8),%xmm0
  movss  %xmm0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L259
  jmp    L90
L8:
  add    $0x3,%r14
  add    $0xc,%rbx
  add    0x10(%rsp),%rbp
  add    (%rsp),%r15
  cmp    0x18(%rsp),%r14
  je     L159
L205:
  mov    0x8(%rsp),%rax
  lea    (%rax,%r15,4),%rdx
  mov    $0x0,%eax
L183:
  pxor   %xmm0,%xmm0
  cvtss2sd (%rdx,%rax,4),%xmm0
  movsd  %xmm0,0x20(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L183
  mov    $0x0,%eax
L108:
  pxor   %xmm0,%xmm0
  cvtss2sd 0x0(%rbp,%rax,4),%xmm0
  movsd  %xmm0,0x60(%rsp,%rax,8)
  add    $0x1,%rax
  cmp    $0x4,%rax
  jne    L108
  lea    0x20(%rsp),%rsi
  lea    0x60(%rsp),%rdi
  mov    %r12d,%ecx
  mov    %r13,%rdx
  call   <quatVector@plt>
  mov    $0x0,%eax
L145:
  pxor   %xmm0,%xmm0
  cvtsd2ss 0x0(%r13,%rax,8),%xmm0
  movss  %xmm0,(%rbx,%rax,4)
  add    $0x1,%rax
  cmp    $0x3,%rax
  jne    L145
  jmp    L8
L147:
  call   <__stack_chk_fail@plt>
```

assistant: ```c
int quatVectLoopf(float *q, float *v, float *vout, unsigned long long nq, unsigned long long nv, int p) {
  unsigned long long i, j, qstep, vstep, voutstep, n, istep;
  int trash;
  double qtemp[4], vtemp[3], vouttemp[3];
  voutstep = 3;
  qstep = (nq == 1) ? 0 : 4;
  vstep = (nv == 1) ? 0 : 3;
  if ((nq > 1) && (nv > 1)) {
    n = (nq <= nv) ? nq : nv;
  } else {
    n = (nq >= nv) ? nq : nv;
  }
  if ((nq == 1) && (n > 1)) {
#pragma omp parallel shared(q, v, vout) private(i, j, trash, qtemp, vtemp, vouttemp) firstprivate(qstep, vstep, voutstep, n, p)
    {
      for (j = 0; j < 4; j++)
        qtemp[j] = (double)q[j];
#pragma omp for schedule(static) nowait
      for (i = 0; i < n; i++) {
        for (j = 0; j < 3; j++)
          vtemp[j] = (double)v[i * vstep + j];
        trash = quatVector(qtemp, vtemp, vouttemp, p);
        for (j = 0; j < 3; j++)
          vout[i * voutstep + j] = (float)vouttemp[j];
      }
    }
  } else if ((nv == 1) && n > 1) {
#pragma omp parallel shared(q, v, vout) private(i, j, trash, qtemp, vtemp, vouttemp) firstprivate(qstep, vstep, voutstep, n, p)
    {
      for (j = 0; j < 3; j++)
        vtemp[j] = (double)v[j];
#pragma omp for schedule(static) nowait
      for (i = 0; i < n; i++) {
        for (j = 0; j < 4; j++)
          qtemp[j] = (double)q[i * qstep + j];
        trash = quatVector(qtemp, vtemp, vouttemp, p);
        for (j = 0; j < 3; j++)
          vout[i * voutstep + j] = (float)vouttemp[j];
      }
    }
  } else {
#pragma omp parallel shared(q, v, vout) private(i, j, trash, qtemp, vtemp, vouttemp) firstprivate(qstep, vstep, voutstep, n, p)
    {
#pragma omp for schedule(static) nowait
      for (i = 0; i < n; i++) {
        for (j = 0; j < 3; j++) {
          vtemp[j] = (double)v[i * vstep + j];
        }
        for (j = 0; j < 4; j++) {
          qtemp[j] = (double)q[i * qstep + j];
        }
        trash = quatVector(qtemp, vtemp, vouttemp, p);
        for (j = 0; j < 3; j++)
          vout[i * voutstep + j] = (float)vouttemp[j];
      }
    }
  }
  return 1;
}
```