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

```asm
<compute_scale>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x60,%rsp
  mov    %rdi,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x48(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x44(%rbp)
  jmp    L44
L47:
  mov    -0x44(%rbp),%eax
  cltq
  lea    (%rax,%rax,1),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movzwl (%rax),%eax
  cwtl
  mov    %eax,-0x34(%rbp)
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x34(%rbp),%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x34(%rbp),%eax
  imul   %eax,%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x1,-0x40(%rbp)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x3c(%rbp)
  movl   $0x0,-0x38(%rbp)
  jmp    L16
L34:
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rax
  imul   $0x55555556,%rax,%rax
  shr    $0x20,%rax
  mov    %edx,%ecx
  sar    $0x1f,%ecx
  sub    %ecx,%eax
  mov    %eax,%ecx
  add    %ecx,%ecx
  add    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  cmp    $0x2,%eax
  jne    L33
  shll   -0x40(%rbp)
L33:
  mov    -0x3c(%rbp),%eax
  movslq %eax,%rdx
  imul   $0x55555556,%rdx,%rdx
  shr    $0x20,%rdx
  sar    $0x1f,%eax
  mov    %eax,%ecx
  mov    %edx,%eax
  sub    %ecx,%eax
  mov    %eax,-0x3c(%rbp)
  addl   $0x1,-0x38(%rbp)
L16:
  cmpl   $0x9,-0x38(%rbp)
  jle    L34
  mov    -0x40(%rbp),%eax
  add    %eax,-0x48(%rbp)
  mov    -0x40(%rbp),%eax
  imul   -0x34(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x40(%rbp),%eax
  imul   -0x34(%rbp),%eax
  imul   -0x34(%rbp),%eax
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x44(%rbp)
L44:
  cmpl   $0xe6a8,-0x44(%rbp)
  jle    L47
  movsd  -0x30(%rbp),%xmm0
  movsd  D2(%rip),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  movsd  -0x28(%rbp),%xmm0
  movsd  D2(%rip),%xmm2
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x48(%rbp),%xmm1
  movsd  -0x20(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  pxor   %xmm2,%xmm2
  cvtsi2sdl -0x48(%rbp),%xmm2
  movsd  -0x18(%rbp),%xmm0
  movapd %xmm0,%xmm1
  divsd  %xmm2,%xmm1
  movsd  -0x10(%rbp),%xmm0
  mulsd  %xmm0,%xmm0
  subsd  %xmm0,%xmm1
  movq   %xmm1,%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  pxor   %xmm0,%xmm0
  cvtsd2ss -0x8(%rbp),%xmm0
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D2
data_type: byte[8]

tool: {"D2": [0x00,0x00,0x00,0x00,0x20,0xd5,0xec,0x40]}

assistant: ```c
float compute_scale(short *table) {
  double sums;
  double sums2;
  int sumw;
  double sumws;
  double sumws2;
  int i;
  double mean;
  double sdev;
  sums = 0;
  sums2 = 0;
  sumw = 0;
  sumws = 0;
  sumws2 = 0;
  for (i = 0; i < 59049; i++) {
    int score;
    int weight;
    int temp;
    int j;
    score = table[i];
    sums += score;
    sums2 += score * score;
    weight = 1;
    temp = i;
    for (j = 0; j < 10; j++) {
      if (temp % 3 == 2)
        weight *= 2;
      temp /= 3;
    }
    sumw += weight;
    sumws += weight * score;
    sumws2 += weight * score * score;
  }
  mean = sums / 59049;
  sdev = sqrt(sums2 / 59049 - mean * mean);
  mean = sumws / sumw;
  sdev = sqrt(sumws2 / sumw - mean * mean);
  return sdev;
}
```