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

```asm
<compute_evt_plane_avg>:
  endbr64
  push   %r15
  pxor   %xmm4,%xmm4
  push   %r14
  push   %r13
  mov    %r9,%r13
  push   %r12
  xor    %r12d,%r12d
  push   %rbp
  mov    %rdx,%rbp
  push   %rbx
  sub    $0x78,%rsp
  mov    %rdi,0x50(%rsp)
  lea    0x68(%rsp),%r14
  mov    %rsi,0x58(%rsp)
  mov    %rcx,0x38(%rsp)
  mov    %r8,0x40(%rsp)
  movq   $0x0,0x48(%rsp)
  movsd  %xmm4,0x18(%rsp)
  movsd  %xmm4,0x10(%rsp)
  movsd  %xmm4,(%rsp)
  movsd  %xmm4,0x8(%rsp)
  nopl   0x0(%rax,%rax,1)
L29:
  mov    0x0(%rbp),%eax
  mov    0x48(%rsp),%r15
  xor    %ebx,%ebx
  test   %eax,%eax
  jle    L17
  mov    %r12d,%eax
  mov    %r15,%r12
  mov    %eax,%r15d
  nopl   0x0(%rax,%rax,1)
L3:
  movsd  0x0(%r13,%r12,1),%xmm0
  call   <abs@plt>
  movsd  D13(%rip),%xmm3
  comisd %xmm0,%xmm3
  jb     L7
  mov    0x38(%rsp),%rax
  lea    0x60(%rsp),%rsi
  mov    %r14,%rdi
  add    $0x1,%r15d
  mov    %rsi,0x28(%rsp)
  movsd  (%rax,%r12,1),%xmm1
  mov    0x40(%rsp),%rax
  movsd  (%rax,%r12,1),%xmm2
  movsd  %xmm1,0x20(%rsp)
  movapd %xmm2,%xmm0
  movsd  %xmm2,0x30(%rsp)
  addsd  %xmm2,%xmm0
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm0
  mov    %r14,%rdi
  movsd  0x30(%rsp),%xmm2
  mov    0x28(%rsp),%rsi
  mulsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  0x60(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  addsd  (%rsp),%xmm0
  movsd  %xmm0,(%rsp)
  movsd  D14(%rip),%xmm0
  mulsd  %xmm2,%xmm0
  call   <sincos@plt>
  movsd  0x20(%rsp),%xmm1
  movsd  0x68(%rsp),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  0x60(%rsp),%xmm1
  addsd  0x10(%rsp),%xmm0
  addsd  0x18(%rsp),%xmm1
  movsd  %xmm0,0x10(%rsp)
  movsd  %xmm1,0x18(%rsp)
L7:
  add    $0x1,%ebx
  add    $0xc8,%r12
  cmp    %ebx,0x0(%rbp)
  jg     L3
  mov    %r15d,%r12d
L17:
  addq   $0x8,0x48(%rsp)
  mov    0x48(%rsp),%rax
  add    $0x4,%rbp
  cmp    $0xc8,%rax
  jne    L29
  pxor   %xmm1,%xmm1
  movsd  (%rsp),%xmm0
  mov    0x50(%rsp),%rax
  cvtsi2sd %r12d,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  movsd  0x8(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%rax)
  movsd  0x18(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%rax)
  movsd  0x10(%rsp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x18(%rax)
  mov    0x58(%rsp),%rax
  mov    %r12d,(%rax)
  add    $0x78,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: label: D13
datatype: f64
name: parse_data
arguments: label: D14
datatype: f64

tool: D13: 2

tool: D14: 3

assistant: ```c
void compute_evt_plane_avg(double *evtPlaneMeans, int *nEvtPlane, int *ptCount, double ptArray[][25], double phiArray[][25], double rapArray[][25], int chArray[][25]) {
  int i, j;
  int nloop = 0;
  double meanSinV2 = 0.0;
  double meanCosV2 = 0.0;
  double meanSinV3 = 0.0;
  double meanCosV3 = 0.0;
  double rapCutEvtPlane = 2.0;
  for (i = 0; i < 25; i++) {
    for (j = 0; j < ptCount[i]; j++) {
      if (abs(rapArray[j][i]) <= rapCutEvtPlane) {
        nloop++;
        meanSinV2 += ptArray[j][i] * sin(2.0 * phiArray[j][i]);
        meanCosV2 += ptArray[j][i] * cos(2.0 * phiArray[j][i]);
        meanSinV3 += ptArray[j][i] * sin(3.0 * phiArray[j][i]);
        meanCosV3 += ptArray[j][i] * cos(3.0 * phiArray[j][i]);
      }
    }
  }
  meanCosV2 = meanCosV2 / (double)nloop;
  meanCosV3 = meanCosV3 / (double)nloop;
  meanSinV2 = meanSinV2 / (double)nloop;
  meanSinV3 = meanSinV3 / (double)nloop;
  evtPlaneMeans[0] = meanCosV2;
  evtPlaneMeans[1] = meanSinV2;
  evtPlaneMeans[2] = meanCosV3;
  evtPlaneMeans[3] = meanSinV3;
  *nEvtPlane = nloop;
}
```