user: Translate the below assembly code into C programming language:

```asm
<weightExpPartial>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0x70,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %edx,-0x4c(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x68(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L52
L17:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  movl   $0x0,-0x3c(%rbp)
  jmp    L29
L48:
  mov    -0x40(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x30(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0x40(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x3c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x3c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x28(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  addl   $0x1,-0x3c(%rbp)
L29:
  mov    -0x3c(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L48
  movsd  -0x30(%rbp),%xmm0
  movq   D18(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x28(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L52:
  mov    -0x44(%rbp),%eax
  imul   -0x48(%rbp),%eax
  cmp    %eax,-0x40(%rbp)
  jl     L17
  movl   $0x0,-0x38(%rbp)
  jmp    L31
L25:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x34(%rbp)
  jmp    L44
L7:
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x68(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x20(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    -0x38(%rbp),%eax
  imul   -0x4c(%rbp),%eax
  mov    %eax,%edx
  mov    -0x34(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    -0x34(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x10(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x34(%rbp)
L44:
  mov    -0x34(%rbp),%eax
  cmp    -0x4c(%rbp),%eax
  jl     L7
  movsd  -0x20(%rbp),%xmm0
  movq   D18(%rip),%xmm1
  xorpd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x10(%rbp)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x38(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x10(%rbp),%xmm0
  mulsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x38(%rbp)
L31:
  mov    -0x38(%rbp),%eax
  cmp    -0x44(%rbp),%eax
  jl     L25
  nop
  nop
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D18
type: f32[2]

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

assistant: ```c
void weightExpPartial(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, const double *restrict dir, double *restrict tprob, double *restrict tvec, double *restrict fprob, double *restrict fvec) {
  for (int t = 0; t < ns * nc; ++t) {
    double lp = 0;
    double v = 0;
    for (int i = 0; i < dims; ++i) {
      lp += tcounts[t * dims + i] * weights[i];
      v += tcounts[t * dims + i] * dir[i];
    }
    double p = exp(-lp);
    tprob[t] = p;
    tvec[t] = p * v;
  }
  for (int t = 0; t < ns; ++t) {
    double lp = 0;
    double v = 0;
    for (int i = 0; i < dims; ++i) {
      lp += fcounts[t * dims + i] * weights[i];
      v += fcounts[t * dims + i] * dir[i];
    }
    double p = exp(-lp);
    fprob[t] = p;
    fvec[t] = p * v;
  }
}
```