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

```asm
<weightExpVec>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x28,%rsp
  mov    %edi,0x1c(%rsp)
  mov    %edx,0x18(%rsp)
  mov    %rcx,0x8(%rsp)
  mov    %r8,0x10(%rsp)
  mov    %r9,%r12
  mov    0x60(%rsp),%rdx
  mov    %esi,%eax
  imul   %edi,%eax
  test   %eax,%eax
  jle    L154
  mov    %rdx,%r13
  lea    -0x1(%rax),%eax
  lea    0x8(%rdx,%rax,8),%rax
  mov    %rax,(%rsp)
  mov    $0x0,%r15d
  jmp    L27
L55:
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rbx,%rax,4),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rbp,%rax
  jne    L55
L94:
  add    $0x8,%r13
  add    0x18(%rsp),%r15d
  cmp    (%rsp),%r13
  je     L154
L27:
  cmpl   $0x0,0x18(%rsp)
  jle    L106
  mov    0x18(%rsp),%ebp
  movslq %r15d,%r14
  mov    0x8(%rsp),%rax
  lea    (%rax,%r14,4),%rbx
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
L156:
  pxor   %xmm0,%xmm0
  cvtsi2sdl (%rbx,%rax,4),%xmm0
  mulsd  (%r12,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rbp,%rax
  jne    L156
  xorpd  D11(%rip),%xmm1
  movapd %xmm1,%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x0(%r13)
  mov    0x68(%rsp),%rax
  lea    (%rax,%r14,8),%rdx
  mov    $0x0,%eax
  jmp    L55
L154:
  mov    0x1c(%rsp),%eax
  test   %eax,%eax
  jle    L36
  mov    0x70(%rsp),%r13
  lea    -0x1(%rax),%eax
  lea    0x8(%r13,%rax,8),%rax
  mov    %rax,(%rsp)
  mov    $0x0,%r14d
  jmp    L83
L65:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x0(%rbp,%rax,4),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %rbx,%rax
  jne    L65
L117:
  add    $0x8,%r13
  add    0x18(%rsp),%r14d
  cmp    (%rsp),%r13
  je     L36
L83:
  cmpl   $0x0,0x18(%rsp)
  jle    L35
  mov    0x18(%rsp),%ebx
  movslq %r14d,%r15
  mov    0x10(%rsp),%rax
  lea    (%rax,%r15,4),%rbp
  mov    $0x0,%eax
  pxor   %xmm1,%xmm1
L85:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0x0(%rbp,%rax,4),%xmm0
  mulsd  (%r12,%rax,8),%xmm0
  addsd  %xmm0,%xmm1
  add    $0x1,%rax
  cmp    %rax,%rbx
  jne    L85
  xorpd  D11(%rip),%xmm1
  movapd %xmm1,%xmm0
  call   <exp@plt>
  movapd %xmm0,%xmm1
  movsd  %xmm0,0x0(%r13)
  mov    0x78(%rsp),%rax
  lea    (%rax,%r15,8),%rdx
  mov    $0x0,%eax
  jmp    L65
L35:
  movsd  D18(%rip),%xmm2
  movsd  %xmm2,0x0(%r13)
  jmp    L117
L106:
  movsd  D18(%rip),%xmm3
  movsd  %xmm3,0x0(%r13)
  jmp    L94
L36:
  add    $0x28,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
```

tool_calls: name: parse_data
arguments: data_tag: D11
type_infered: f32[4]
name: parse_data
arguments: data_tag: D18
type_infered: f32[2]

tool: {"D11": [0.0,-0.0,0.0,0.0]}

tool: {"D18": [0.0,1.875]}

assistant: ```c
void weightExpVec(const int16_t ns, const int16_t nc, const int16_t dims, const int16_t *restrict tcounts, const int16_t *restrict fcounts, const double *restrict weights, double *restrict tprob, double *restrict tvec, double *restrict fprob, double *restrict fvec) {
  for (int t = 0; t < ns * nc; ++t) {
    double lp = 0;
    for (int i = 0; i < dims; ++i)
      lp += tcounts[t * dims + i] * weights[i];
    double p = exp(-lp);
    tprob[t] = p;
    for (int i = 0; i < dims; ++i)
      tvec[t * dims + i] = p * tcounts[t * dims + i];
  }
  for (int t = 0; t < ns; ++t) {
    double lp = 0;
    for (int i = 0; i < dims; ++i)
      lp += fcounts[t * dims + i] * weights[i];
    double p = exp(-lp);
    fprob[t] = p;
    for (int i = 0; i < dims; ++i)
      fvec[t * dims + i] = p * fcounts[t * dims + i];
  }
}
```