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

```asm
<SHOKcumulative>:
  endbr64
  push   %r14
  movapd %xmm0,%xmm2
  push   %r13
  lea    (%rsi,%rsi,1),%r13d
  push   %r12
  sub    %edx,%r13d
  mov    %esi,%r12d
  mov    $0x8,%esi
  push   %rbp
  push   %rbx
  mov    %rdi,%rbx
  mov    %r13d,%edi
  sub    $0x10,%rsp
  movsd  D69(%rip),%xmm1
  movsd  D39(%rip),%xmm7
  addsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm1
  addsd  %xmm7,%xmm0
  mulsd  D90(%rip),%xmm0
  mulsd  D37(%rip),%xmm1
  divsd  %xmm2,%xmm0
  movsd  %xmm1,0x8(%rsp)
  addsd  D10(%rip),%xmm0
  cvttsd2si %xmm0,%r14
  cmp    %r14d,%r13d
  cmovbe %r13d,%r14d
  call   <chk_calloc@plt>
  mov    %r13d,%edi
  mov    $0x8,%esi
  mov    %rax,%rbp
  call   <chk_calloc@plt>
  movsd  0x8(%rsp),%xmm1
  lea    -0x1(%r14),%ecx
  mov    %rax,%r13
  mov    D39(%rip),%rax
  movapd %xmm1,%xmm8
  movq   %rax,%xmm7
  addsd  %xmm7,%xmm8
  divsd  %xmm8,%xmm1
  movsd  %xmm1,0x0(%rbp)
  cmp    $0x1,%ecx
  jbe    L14
  lea    -0x3(%r14),%eax
  lea    -0x2(%r14),%esi
  cmp    $0x2,%eax
  jbe    L81
  mov    %esi,%edx
  movapd %xmm8,%xmm6
  movdqa D62(%rip),%xmm3
  movdqa D70(%rip),%xmm9
  unpcklpd %xmm6,%xmm6
  shr    $0x2,%edx
  lea    0x8(%rbp),%rax
  pxor   %xmm4,%xmm4
  sub    $0x1,%edx
  movapd D29(%rip),%xmm5
  movapd D39(%rip),%xmm2
  shl    $0x5,%rdx
  lea    0x28(%rbp,%rdx,1),%rdx
  nopw   0x0(%rax,%rax,1)
L94:
  movdqa %xmm3,%xmm0
  add    $0x20,%rax
  paddd  %xmm9,%xmm3
  cvtdq2pd %xmm0,%xmm10
  movapd %xmm10,%xmm1
  pshufd $0xee,%xmm0,%xmm0
  cmpltpd %xmm4,%xmm1
  cvtdq2pd %xmm0,%xmm0
  andpd  %xmm5,%xmm1
  addpd  %xmm1,%xmm10
  movapd %xmm0,%xmm1
  cmpltpd %xmm4,%xmm1
  andpd  %xmm5,%xmm1
  addpd  %xmm1,%xmm0
  movapd %xmm10,%xmm1
  addpd  %xmm2,%xmm1
  mulpd  %xmm10,%xmm1
  movapd %xmm2,%xmm10
  mulpd  %xmm6,%xmm1
  divpd  %xmm1,%xmm10
  movapd %xmm0,%xmm1
  addpd  %xmm2,%xmm1
  mulpd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  mulpd  %xmm6,%xmm0
  divpd  %xmm0,%xmm1
  movups %xmm10,-0x20(%rax)
  movups %xmm1,-0x10(%rax)
  cmp    %rdx,%rax
  jne    L94
  mov    %esi,%edx
  and    $0xfffffffc,%edx
  lea    0x1(%rdx),%eax
  cmp    %esi,%edx
  je     L14
L6:
  mov    %eax,%edx
  pxor   %xmm1,%xmm1
  cvtsi2sd %rdx,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm8,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%rdx,8)
  lea    0x1(%rax),%edx
  cmp    %ecx,%edx
  jae    L14
  pxor   %xmm1,%xmm1
  add    $0x2,%eax
  cvtsi2sd %rdx,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm8,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%rdx,8)
  cmp    %eax,%ecx
  jbe    L14
  pxor   %xmm1,%xmm1
  cvtsi2sd %rax,%xmm1
  movapd %xmm1,%xmm0
  addsd  %xmm7,%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm7,%xmm1
  mulsd  %xmm8,%xmm0
  divsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%rax,8)
L14:
  mov    %r14d,%r14d
  pxor   %xmm0,%xmm0
  cvtsi2sd %r14,%xmm0
  mulsd  %xmm8,%xmm0
  divsd  %xmm0,%xmm7
  movsd  %xmm7,0x0(%rbp,%r14,8)
  test   %r12d,%r12d
  je     L144
  cmp    $0x1,%r12d
  je     L35
  mov    %r12d,%edx
  pxor   %xmm0,%xmm0
  mov    %rbp,%rax
  shr    %edx
  movapd %xmm0,%xmm2
  shl    $0x4,%rdx
  add    %rbp,%rdx
  nopl   0x0(%rax,%rax,1)
L78:
  movsd  (%rax),%xmm1
  add    $0x10,%rax
  addsd  %xmm1,%xmm2
  movsd  -0x8(%rax),%xmm1
  addsd  %xmm1,%xmm2
  cmp    %rdx,%rax
  jne    L78
  mov    %r12d,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%r12b
  je     L52
L99:
  addsd  0x0(%rbp,%rax,8),%xmm2
L52:
  mov    %r13,%rsi
  mov    %rbp,%rax
  xor    %edx,%edx
  sub    %rbp,%rsi
  nopw   0x0(%rax,%rax,1)
L64:
  movsd  (%rax),%xmm1
  lea    0x1(%rdx),%ecx
  pxor   %xmm3,%xmm3
  cvtsi2sd %rcx,%xmm3
  mov    %rcx,%rdx
  divsd  %xmm2,%xmm1
  movsd  %xmm1,(%rsi,%rax,1)
  mulsd  %xmm3,%xmm1
  add    $0x8,%rax
  addsd  %xmm1,%xmm0
  cmp    %r12d,%ecx
  jne    L64
  movsd  0x0(%r13),%xmm1
  movsd  %xmm1,(%rbx)
  cmp    $0x1,%ecx
  je     L156
  sub    $0x2,%edx
  lea    0x8(%r13),%rax
  sub    %r13,%rbx
  lea    0x10(%r13,%rdx,8),%rdx
  nopl   0x0(%rax,%rax,1)
L54:
  addsd  (%rax),%xmm1
  movsd  %xmm1,(%rbx,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L54
L156:
  mov    %rbp,%rdi
  movsd  %xmm0,0x8(%rsp)
  call   <free@plt>
  mov    %r13,%rdi
  call   <free@plt>
  movsd  0x8(%rsp),%xmm0
  add    $0x10,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  ret
  nopl   0x0(%rax,%rax,1)
L144:
  movsd  0x0(%r13),%xmm0
  movsd  %xmm0,(%rbx)
  pxor   %xmm0,%xmm0
  jmp    L156
L35:
  pxor   %xmm0,%xmm0
  xor    %eax,%eax
  movapd %xmm0,%xmm2
  jmp    L99
L81:
  mov    $0x1,%eax
  jmp    L6
```

tool_calls: name: extract_symbolic_data
arguments: label: D69
type_guessed: f64
name: extract_symbolic_data
arguments: label: D39
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D90
type_guessed: f64
name: extract_symbolic_data
arguments: label: D37
type_guessed: f32[2]
name: extract_symbolic_data
arguments: label: D10
type_guessed: f64
name: extract_symbolic_data
arguments: label: D62
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D70
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D29
type_guessed: f32[4]

tool: D69: 2

tool: {"D39": [1.0,1.0]}

tool: D90: 4

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

tool: D10: 0.5

tool: {"D62": [0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D70": [0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00]}

tool: {"D29": [0.0,30.0,0.0,30.0]}

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