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

```asm
<fnMH_C>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbx
  sub    $0x48,%rsp
  mov    %rdi,%r15
  mov    %rsi,-0x58(%rbp)
  mov    %rdx,%rbx
  mov    %rcx,%r14
  mov    %r8,-0x60(%rbp)
  mov    %r9,-0x50(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  mov    (%rdx),%edx
  movslq %edx,%rax
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rsi
  and    $0xfffffffffffffff0,%rsi
  and    $0xfffffffffffff000,%rax
  mov    %rsp,%rcx
  sub    %rax,%rcx
L99:
  cmp    %rcx,%rsp
  je     L116
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  jmp    L99
L116:
  mov    %rsi,%rax
  and    $0xfff,%eax
  sub    %rax,%rsp
  test   %rax,%rax
  je     L77
  orq    $0x0,-0x8(%rsp,%rax,1)
L77:
  mov    %rsp,%r12
  test   %edx,%edx
  jle    L125
  mov    $0x0,%eax
L13:
  movsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  mov    -0x50(%rbp),%rdi
  movsd  %xmm0,(%rdi,%rax,8)
  add    $0x1,%rax
  cmp    %eax,(%rbx)
  jg     L13
L125:
  mov    -0x58(%rbp),%rax
  cmpl   $0x1,(%rax)
  jle    L137
  mov    $0x1,%r13d
  movl   $0x0,-0x48(%rbp)
  jmp    L127
L93:
  movsd  (%rsi,%rax,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rax
  jne    L93
L107:
  mov    -0x68(%rbp),%rax
  addl   $0x1,(%rax)
  mov    -0x44(%rbp),%eax
  mov    %eax,-0x48(%rbp)
L83:
  cmpl   $0x0,(%rbx)
  jle    L70
  movslq %ecx,%rcx
  mov    -0x50(%rbp),%rax
  lea    (%rax,%rcx,8),%rdx
  mov    $0x0,%eax
L78:
  movsd  (%r12,%rax,8),%xmm0
  movsd  %xmm0,(%rdx,%rax,8)
  add    $0x1,%rax
  cmp    %eax,(%rbx)
  jg     L78
L70:
  add    $0x1,%r13
  mov    -0x58(%rbp),%rax
  cmp    %r13d,(%rax)
  jle    L137
L127:
  mov    %r13d,-0x44(%rbp)
  movslq -0x48(%rbp),%rax
  movsd  (%r14,%r13,8),%xmm0
  subsd  (%r14,%rax,8),%xmm0
  call   <exp@plt>
  movsd  D18(%rip),%xmm1
  cmpnltsd %xmm0,%xmm1
  andpd  %xmm1,%xmm0
  movsd  D18(%rip),%xmm2
  andnpd %xmm2,%xmm1
  orpd   %xmm1,%xmm0
  mov    (%rbx),%eax
  mov    -0x44(%rbp),%ecx
  imul   %eax,%ecx
  mov    -0x60(%rbp),%rdi
  comisd (%rdi,%r13,8),%xmm0
  jb     L83
  test   %eax,%eax
  jle    L107
  mov    %eax,%edx
  movslq %ecx,%rax
  lea    (%r15,%rax,8),%rsi
  mov    $0x0,%eax
  jmp    L93
L137:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L11
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L11:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: data_label: D18
type_guessed: byte[8]

tool: {"D18": [0x00,0x00,0x00,0x00,0x00,0x00,0xf0,0x3f]}

assistant: ```c
void fnMH_C(double *theta, int *N, int *k, double *lnw, double *u, double *draws, int *ns) {
  int m, s;
  double e;
  double tmp[*k];
  for (int j = 0; j < *k; j++) {
    tmp[j] = theta[j];
    draws[j] = theta[j];
  }
  s = 0;
  for (int i = 1; i < *N; i++) {
    e = exp(lnw[i] - lnw[s]);
    if (e > 1) {
      e = 1;
    }
    m = i * (*k);
    if (u[i] <= e) {
      for (int j = 0; j < *k; j++) {
        tmp[j] = theta[m + j];
      }
      s = i;
      *ns = *ns + 1;
    }
    for (int j = 0; j < *k; j++)
      draws[m + j] = tmp[j];
  }
}
```