user: 请从给定的汇编指令推导出C源代码：

```asm
<tw>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x48,%rsp
  mov    %rsi,0x30(%rsp)
  mov    %rdx,0x38(%rsp)
  test   %r8d,%r8d
  jle    L17
  mov    %rdi,%r14
  mov    %rcx,%r15
  mov    %rdi,%rax
  lea    -0x1(%r8),%edx
  lea    0x8(%rdi,%rdx,8),%rdx
  pxor   %xmm6,%xmm6
  movsd  %xmm6,0x8(%rsp)
  movsd  %xmm6,(%rsp)
L22:
  movsd  (%rax),%xmm0
  movsd  (%rsp),%xmm6
  addsd  %xmm0,%xmm6
  movsd  %xmm6,(%rsp)
  mulsd  %xmm0,%xmm0
  addsd  0x8(%rsp),%xmm0
  movsd  %xmm0,0x8(%rsp)
  add    $0x8,%rax
  cmp    %rdx,%rax
  jne    L22
  lea    0x2(%r8),%r12d
  mov    $0x0,%ebx
L4:
  lea    -0x2(%r12),%ebp
  pxor   %xmm1,%xmm1
  cvtsi2sd %ebp,%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sd %r12d,%xmm0
  movsd  (%rsp),%xmm4
  mulsd  %xmm4,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  0x8(%rsp),%xmm2
  mulsd  %xmm1,%xmm2
  movapd %xmm4,%xmm3
  mulsd  %xmm4,%xmm3
  subsd  %xmm3,%xmm2
  movapd %xmm0,%xmm5
  divsd  %xmm2,%xmm5
  mulsd  (%r14,%rbx,1),%xmm1
  divsd  %xmm4,%xmm1
  movsd  %xmm1,0x28(%rsp)
  movsd  %xmm5,0x10(%rsp)
  movapd %xmm5,%xmm0
  subsd  D27(%rip),%xmm0
  cvttsd2si %xmm0,%r13d
  mov    %r13d,%edi
  call   <sqrt@plt>
  movsd  %xmm0,0x18(%rsp)
  mov    %ebp,%edi
  call   <sqrt@plt>
  movapd %xmm0,%xmm7
  addsd  0x18(%rsp),%xmm7
  movsd  %xmm7,0x18(%rsp)
  mov    %r13d,%edi
  call   <sqrt@plt>
  movsd  %xmm0,0x20(%rsp)
  mov    %ebp,%edi
  call   <sqrt@plt>
  addsd  0x20(%rsp),%xmm0
  mulsd  0x18(%rsp),%xmm0
  movapd %xmm0,%xmm6
  divsd  0x10(%rsp),%xmm6
  movsd  %xmm6,0x20(%rsp)
  mov    %r13d,%edi
  call   <sqrt@plt>
  movsd  %xmm0,0x18(%rsp)
  mov    %ebp,%edi
  call   <sqrt@plt>
  addsd  0x18(%rsp),%xmm0
  divsd  0x10(%rsp),%xmm0
  movsd  %xmm0,0x18(%rsp)
  mov    %r13d,%edi
  call   <sqrt@plt>
  movq   %xmm0,%r13
  mov    %ebp,%edi
  call   <sqrt@plt>
  movapd %xmm0,%xmm2
  movsd  D27(%rip),%xmm7
  movq   %r13,%xmm8
  divsd  %xmm8,%xmm7
  movapd %xmm7,%xmm0
  movsd  D27(%rip),%xmm7
  divsd  %xmm2,%xmm7
  addsd  %xmm7,%xmm0
  mov    D11(%rip),%rax
  movq   %rax,%xmm1
  call   <pow@plt>
  movsd  0x28(%rsp),%xmm1
  subsd  0x20(%rsp),%xmm1
  mulsd  0x18(%rsp),%xmm0
  divsd  %xmm0,%xmm1
  movq   %xmm1,%rbp
  movapd %xmm1,%xmm0
  call   <twtest@plt>
  mov    0x30(%rsp),%rax
  movsd  %xmm0,(%rax,%rbx,1)
  mov    0x38(%rsp),%rax
  mov    %rbp,(%rax,%rbx,1)
  movsd  0x10(%rsp),%xmm5
  movsd  %xmm5,(%r15,%rbx,1)
  movsd  (%r14,%rbx,1),%xmm0
  movsd  (%rsp),%xmm4
  subsd  %xmm0,%xmm4
  movsd  %xmm4,(%rsp)
  mulsd  %xmm0,%xmm0
  movsd  0x8(%rsp),%xmm2
  subsd  %xmm0,%xmm2
  movsd  %xmm2,0x8(%rsp)
  sub    $0x1,%r12d
  add    $0x8,%rbx
  cmp    $0x2,%r12d
  jne    L4
L17:
  add    $0x48,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D27
data_type: f64
name: parse_data
arguments: data_tag: D11
data_type: byte[8]

tool: D27: 1

tool: {"D11": [0x55,0x55,0x55,0x55,0x55,0x55,0xd5,0x3f]}

assistant: ```c
void tw(double *values, double *pvalues, double *twstat, double *effectn, int M) {
  int Mp, i;
  double nhat, lambda, mu, sigma, s, s2;
  s = 0;
  s2 = 0;
  for (i = 0; i < M; i++) {
    s += values[i];
    s2 += values[i] * values[i];
  }
  for (i = 0; i < M; i++) {
    Mp = M - i;
    nhat = (Mp + 2) * s * s / (Mp * s2 - s * s);
    lambda = values[i] * Mp / s;
    mu = (sqrt(nhat - 1) + sqrt(Mp)) * (sqrt(nhat - 1) + sqrt(Mp)) / nhat;
    sigma = (sqrt(nhat - 1) + sqrt(Mp)) / nhat * pow(1.0 / sqrt(nhat - 1) + 1.0 / sqrt(Mp), (double)(1.0 / 3.0));
    lambda = (lambda - mu) / sigma;
    pvalues[i] = twtest(lambda);
    twstat[i] = lambda;
    effectn[i] = nhat;
    s -= values[i];
    s2 -= values[i] * values[i];
  }
}
```