user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<WebRtcIsac_GetVarsUB>:
  endbr64
  push   %rbp
  mov    %rdi,%rax
  mov    %rdx,%rbp
  lea    0x1e0(%rdi),%rdx
  push   %rbx
  mov    %rsi,%rbx
  sub    $0x38,%rsp
  mov    D13(%rip),%rcx
  movq   %rcx,%xmm2
  cs nopw 0x0(%rax,%rax,1)
L34:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm2
  cmp    %rdx,%rax
  jne    L34
  mov    D13(%rip),%rcx
  lea    0x3c0(%rdi),%rdx
  movq   %rcx,%xmm3
  nopl   0x0(%rax,%rax,1)
L16:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm3
  cmp    %rax,%rdx
  jne    L16
  mov    D13(%rip),%rsi
  lea    0x5a0(%rdi),%rax
  movq   %rsi,%xmm4
  nopl   0x0(%rax,%rax,1)
L17:
  movsd  (%rdx),%xmm0
  add    $0x8,%rdx
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm4
  cmp    %rdx,%rax
  jne    L17
  mov    D13(%rip),%rcx
  lea    0x780(%rdi),%rdx
  movq   %rcx,%xmm1
  nopl   0x0(%rax,%rax,1)
L15:
  movsd  (%rax),%xmm0
  add    $0x8,%rax
  mulsd  %xmm0,%xmm0
  addsd  %xmm0,%xmm1
  cmp    %rax,%rdx
  jne    L15
  movapd %xmm1,%xmm0
  movsd  %xmm1,0x28(%rsp)
  divsd  %xmm4,%xmm0
  movsd  %xmm2,0x10(%rsp)
  movsd  %xmm3,0x18(%rsp)
  movsd  %xmm4,0x8(%rsp)
  call   <log10@plt>
  movsd  0x18(%rsp),%xmm3
  movsd  0x8(%rsp),%xmm4
  movsd  %xmm0,0x20(%rsp)
  divsd  %xmm3,%xmm4
  movsd  %xmm3,0x8(%rsp)
  movapd %xmm4,%xmm0
  call   <log10@plt>
  movsd  0x10(%rsp),%xmm2
  movsd  0x8(%rsp),%xmm3
  movsd  %xmm0,0x18(%rsp)
  divsd  %xmm2,%xmm3
  movapd %xmm3,%xmm0
  call   <log10@plt>
  movsd  0x10(%rsp),%xmm2
  divsd  (%rbx),%xmm2
  movsd  %xmm0,0x8(%rsp)
  movapd %xmm2,%xmm0
  call   <log10@plt>
  movsd  D94(%rip),%xmm7
  movsd  0x20(%rsp),%xmm5
  movsd  0x18(%rsp),%xmm4
  movsd  0x8(%rsp),%xmm3
  mulsd  %xmm7,%xmm5
  movq   D70(%rip),%xmm6
  mulsd  %xmm7,%xmm4
  mulsd  %xmm7,%xmm3
  mulsd  %xmm7,%xmm0
  andpd  %xmm6,%xmm5
  movapd %xmm5,%xmm2
  andpd  %xmm6,%xmm4
  addsd  %xmm4,%xmm2
  andpd  %xmm6,%xmm3
  andpd  %xmm6,%xmm0
  addsd  %xmm3,%xmm2
  addsd  %xmm0,%xmm2
  mulsd  D76(%rip),%xmm2
  movsd  D22(%rip),%xmm0
  mulsd  D21(%rip),%xmm2
  addsd  D17(%rip),%xmm2
  divsd  %xmm2,%xmm0
  call   <exp@plt>
  movsd  0x28(%rsp),%xmm1
  movsd  %xmm0,0x0(%rbp)
  movsd  %xmm1,(%rbx)
  add    $0x38,%rsp
  pop    %rbx
  pop    %rbp
  ret
```

tool_calls: name: read_data
arguments: data_tag: D13
type_infered: f64
name: read_data
arguments: data_tag: D94
type_infered: f64
name: read_data
arguments: data_tag: D70
type_infered: qword
name: read_data
arguments: data_tag: D76
type_infered: f64
name: read_data
arguments: data_tag: D22
type_infered: byte[8]
name: read_data
arguments: data_tag: D21
type_infered: f64
name: read_data
arguments: data_tag: D17
type_infered: f64

tool: D13: 0.0001

tool: D94: 10

tool: D70: 9223372036854775807

tool: D76: 0.25

tool: {"D22": [0x66,0x66,0x66,0x66,0x66,0x66,0xf6,0xbf]}

tool: D21: 0.4

tool: D17: 1

assistant: ```c
void WebRtcIsac_GetVarsUB(const double *input, double *oldEnergy, double *varscale) {
  double nrg[4], chng;
  int k;
  nrg[0] = 0.0001;
  for (k = 0; k < (120) / 2; k++) {
    nrg[0] += input[k] * input[k];
  }
  nrg[1] = 0.0001;
  for (; k < (240) / 2; k++) {
    nrg[1] += input[k] * input[k];
  }
  nrg[2] = 0.0001;
  for (; k < (480 * 3 / 4) / 2; k++) {
    nrg[2] += input[k] * input[k];
  }
  nrg[3] = 0.0001;
  for (; k < (480) / 2; k++) {
    nrg[3] += input[k] * input[k];
  }
  chng = 0.25 * (fabs(10.0 * log10(nrg[3] / nrg[2])) + fabs(10.0 * log10(nrg[2] / nrg[1])) + fabs(10.0 * log10(nrg[1] / nrg[0])) + fabs(10.0 * log10(nrg[0] / *oldEnergy)));
  *varscale = exp(-1.4 / (1.0 + 0.4 * chng));
  *oldEnergy = nrg[3];
}
```