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

```asm
<SHOKcumulative>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x48(%rbp)
  mov    %esi,-0x4c(%rbp)
  mov    %edx,-0x50(%rbp)
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movq   $0x0,-0x10(%rbp)
  movq   $0x0,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x38(%rbp)
  movl   $0x0,-0x34(%rbp)
  mov    -0x4c(%rbp),%eax
  add    %eax,%eax
  sub    -0x50(%rbp),%eax
  mov    %eax,-0x30(%rbp)
  movsd  -0x58(%rbp),%xmm1
  movsd  D92(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D42(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x58(%rbp),%xmm1
  movsd  D21(%rip),%xmm0
  addsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%rax
  mov    %eax,-0x2c(%rbp)
  movsd  -0x58(%rbp),%xmm1
  movsd  D67(%rip),%xmm0
  addsd  %xmm1,%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  D42(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  mov    -0x30(%rbp),%eax
  cmp    -0x2c(%rbp),%eax
  jbe    L45
  mov    -0x2c(%rbp),%eax
  mov    %eax,-0x34(%rbp)
  jmp    L145
L45:
  mov    -0x30(%rbp),%eax
  test   %rax,%rax
  js     L93
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L35
L93:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L35:
  cvttsd2si %xmm0,%rax
  mov    %eax,-0x34(%rbp)
L145:
  mov    -0x30(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <chk_calloc@plt>
  mov    %rax,-0x10(%rbp)
  mov    -0x30(%rbp),%eax
  mov    $0x8,%esi
  mov    %eax,%edi
  call   <chk_calloc@plt>
  mov    %rax,-0x8(%rbp)
  movsd  -0x18(%rbp),%xmm1
  movsd  D92(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  mov    -0x10(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x38(%rbp)
  jmp    L178
L123:
  mov    -0x38(%rbp),%eax
  test   %rax,%rax
  js     L112
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L198
L112:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L198:
  movsd  D92(%rip),%xmm1
  addsd  %xmm0,%xmm1
  mov    -0x38(%rbp),%eax
  test   %rax,%rax
  js     L89
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L19
L89:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L19:
  mulsd  %xmm0,%xmm1
  movsd  -0x18(%rbp),%xmm2
  movsd  D92(%rip),%xmm0
  addsd  %xmm2,%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  D92(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L178:
  mov    -0x34(%rbp),%eax
  sub    $0x1,%eax
  cmp    %eax,-0x38(%rbp)
  jb     L123
  mov    -0x34(%rbp),%eax
  test   %rax,%rax
  js     L43
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L50
L43:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L50:
  movsd  -0x18(%rbp),%xmm2
  movsd  D92(%rip),%xmm1
  addsd  %xmm2,%xmm1
  mulsd  %xmm0,%xmm1
  mov    -0x34(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  D92(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L184
L124:
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  addl   $0x1,-0x38(%rbp)
L184:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jb     L124
  movl   $0x0,-0x38(%rbp)
  jmp    L73
L71:
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x20(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x38(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,%eax
  test   %rax,%rax
  js     L69
  pxor   %xmm0,%xmm0
  cvtsi2sd %rax,%xmm0
  jmp    L24
L69:
  mov    %rax,%rdx
  shr    %rdx
  and    $0x1,%eax
  or     %rax,%rdx
  pxor   %xmm0,%xmm0
  cvtsi2sd %rdx,%xmm0
  addsd  %xmm0,%xmm0
L24:
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x38(%rbp)
L73:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jb     L71
  mov    -0x8(%rbp),%rax
  movsd  (%rax),%xmm0
  mov    -0x48(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x1,-0x38(%rbp)
  jmp    L118
L189:
  mov    -0x38(%rbp),%eax
  sub    $0x1,%eax
  mov    %eax,%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x38(%rbp),%eax
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L118:
  mov    -0x38(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jb     L189
  mov    -0x10(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x8(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  movsd  -0x28(%rbp),%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  leave
  ret
```

tool_calls: name: unpack_data
arguments: data_label: D92
type_guessed: f64
name: unpack_data
arguments: data_label: D42
type_guessed: f64
name: unpack_data
arguments: data_label: D21
type_guessed: f64
name: unpack_data
arguments: data_label: D67
type_guessed: f64

tool: D92: 1

tool: D42: 4

tool: D21: 0.5

tool: D67: 2

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;
}
```