user: 请将以下的汇编代码转换成C语言代码：

```asm
<SHOKcumulative>:
  endbr64
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x10,%rsp
  mov    %rdi,%r12
  mov    %esi,%r13d
  movapd %xmm0,%xmm1
  lea    (%rsi,%rsi,1),%ebx
  sub    %edx,%ebx
  addsd  D78(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  D8(%rip),%xmm0
  movsd  %xmm0,0x8(%rsp)
  movsd  D25(%rip),%xmm6
  addsd  %xmm1,%xmm6
  movapd %xmm6,%xmm0
  mulsd  D77(%rip),%xmm0
  divsd  %xmm1,%xmm0
  addsd  D62(%rip),%xmm0
  cvttsd2si %xmm0,%r14
  cmp    %r14d,%ebx
  cmovbe %ebx,%r14d
  mov    $0x8,%esi
  mov    %ebx,%edi
  call   <chk_calloc@plt>
  mov    %rax,%rbp
  mov    $0x8,%esi
  mov    %ebx,%edi
  call   <chk_calloc@plt>
  mov    %rax,%rbx
  movsd  D25(%rip),%xmm3
  movsd  0x8(%rsp),%xmm5
  addsd  %xmm5,%xmm3
  divsd  %xmm3,%xmm5
  movsd  %xmm5,0x0(%rbp)
  lea    -0x1(%r14),%esi
  cmp    $0x1,%esi
  jbe    L47
  lea    0x8(%rbp),%rdx
  mov    $0x1,%eax
  movsd  D25(%rip),%xmm2
L54:
  mov    %eax,%ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rcx,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  %xmm3,%xmm0
  movapd %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  add    $0x1,%eax
  add    $0x8,%rdx
  cmp    %esi,%eax
  jne    L54
L47:
  mov    %r14d,%r14d
  pxor   %xmm1,%xmm1
  cvtsi2sd %r14,%xmm1
  mulsd  %xmm3,%xmm1
  movsd  D25(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,0x0(%rbp,%r14,8)
  test   %r13d,%r13d
  je     L63
  mov    %r13d,%eax
  lea    0x0(%rbp,%rax,8),%rdx
  mov    %rbp,%rax
  pxor   %xmm2,%xmm2
L60:
  addsd  (%rax),%xmm2
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L60
  mov    %rbp,%rdx
  mov    $0x0,%eax
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  mov    %rbx,%rsi
  sub    %rbp,%rsi
L35:
  movsd  (%rdx),%xmm0
  divsd  %xmm2,%xmm0
  movsd  %xmm0,(%rsi,%rdx,1)
  add    $0x1,%eax
  mov    %eax,%ecx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rcx,%xmm1
  mulsd  %xmm1,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x8,%rdx
  cmp    %r13d,%eax
  jne    L35
  movsd  (%rbx),%xmm0
  movsd  %xmm0,(%r12)
  cmp    $0x1,%r13d
  jbe    L72
  lea    -0x2(%r13),%eax
  lea    0x8(%r12,%rax,8),%rsi
  mov    %r12,%rax
  mov    $0x8,%ecx
  sub    %r12,%rcx
L46:
  lea    (%rax,%rbx,1),%rdx
  movsd  (%rdx,%rcx,1),%xmm0
  addsd  (%rax),%xmm0
  movsd  %xmm0,0x8(%rax)
  add    $0x8,%rax
  cmp    %rsi,%rax
  jne    L46
L72:
  mov    %rbp,%rdi
  call   <free@plt>
  mov    %rbx,%rdi
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
L63:
  movsd  (%rbx),%xmm0
  movsd  %xmm0,(%r12)
  pxor   %xmm7,%xmm7
  movsd  %xmm7,0x8(%rsp)
  jmp    L72
```

tool_calls: name: extract_symbolic_data
arguments: tag: D78
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D8
type_guessed: f32[2]
name: extract_symbolic_data
arguments: tag: D25
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D77
type_guessed: f64
name: extract_symbolic_data
arguments: tag: D62
type_guessed: f64

tool: D78: 2

tool: {"D8": [0.0,1.625]}

tool: D25: 1

tool: D77: 4

tool: D62: 0.5

assistant: ```c
double SHOKcumulative(double *cumulative, unsigned int w, unsigned int s, double epsShok) {
  double m = 0;
  double *omega_shok = NULL;
  double *omega_shok_norm = NULL;
  double avgDeg = 0.0;
  unsigned int i = 0;
  unsigned int ref = 0;
  unsigned int wvirt = (2 * w - s);
  unsigned int D = (unsigned int)(4.0 * (1.0 + epsShok) / epsShok + 0.5);
  m = epsShok * (2.0 + epsShok) / 4.0;
  if (wvirt > D) {
    ref = D;
  } else {
    ref = (double)wvirt;
  }
  omega_shok = (double *)chk_calloc(wvirt, sizeof(double));
  omega_shok_norm = (double *)chk_calloc(wvirt, sizeof(double));
  omega_shok[0] = ((double)m / (m + 1.0));
  for (i = 1; i < (ref - 1); i++) {
    omega_shok[i] = 1.0 / (((i + 1.0) * i) * (m + 1.0));
  }
  omega_shok[ref] = 1.0 / (ref * (m + 1.0));
  double normfact = 0.0;
  for (i = 0; i < w; i++) {
    normfact += omega_shok[i];
  }
  for (i = 0; i < w; i++) {
    omega_shok_norm[i] = omega_shok[i] / normfact;
    avgDeg += omega_shok_norm[i] * (i + 1);
  }
  cumulative[0] = omega_shok_norm[0];
  for (i = 1; i < w; i++) {
    cumulative[i] = (double)(cumulative[i - 1] + omega_shok_norm[i]);
  }
  free(omega_shok);
  free(omega_shok_norm);
  return avgDeg;
}
```