user: What is the c source code of the assembly code below?

```asm
<fnMH_C>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %r15
  mov    %rdi,%r15
  push   %r14
  push   %r13
  mov    %rcx,%r13
  push   %r12
  push   %rbx
  mov    %r9,%rbx
  sub    $0x48,%rsp
  mov    0x10(%rbp),%rax
  mov    %rsi,-0x58(%rbp)
  mov    %rdx,-0x48(%rbp)
  mov    %rsp,%rsi
  mov    %r8,-0x60(%rbp)
  mov    %rax,-0x68(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x38(%rbp)
  xor    %eax,%eax
  movslq (%rdx),%rax
  mov    %rax,%rcx
  lea    0xf(,%rax,8),%rax
  mov    %rax,%rdx
  and    $0xfffffffffffff000,%rax
  sub    %rax,%rsi
  and    $0xfffffffffffffff0,%rdx
  cmp    %rsi,%rsp
  je     L158
L122:
  sub    $0x1000,%rsp
  orq    $0x0,0xff8(%rsp)
  cmp    %rsi,%rsp
  jne    L122
L158:
  and    $0xfff,%edx
  sub    %rdx,%rsp
  test   %rdx,%rdx
  jne    L52
L187:
  mov    %rsp,%r12
  test   %ecx,%ecx
  jle    L107
  lea    -0x1(%rcx),%eax
  cmp    $0x1,%eax
  jbe    L105
  lea    0x8(%r15),%rax
  cmp    %rax,%rbx
  je     L105
  mov    %ecx,%edx
  xor    %eax,%eax
  shr    %edx
  shl    $0x4,%rdx
  nopl   0x0(%rax,%rax,1)
L130:
  movupd (%r15,%rax,1),%xmm0
  movups %xmm0,(%r12,%rax,1)
  movups %xmm0,(%rbx,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L130
  mov    %ecx,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%ecx
  je     L107
  mov    %eax,%edx
  cltq
  movsd  (%r15,%rdx,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  movsd  %xmm0,(%rbx,%rdx,8)
L107:
  mov    -0x58(%rbp),%rax
  cmpl   $0x1,(%rax)
  jle    L61
  movl   $0x0,-0x4c(%rbp)
  mov    $0x1,%r14d
  jmp    L147
  nopl   0x0(%rax,%rax,1)
L140:
  test   %edx,%edx
  jle    L113
  movslq %r8d,%r8
  shl    $0x3,%rdx
  mov    %r12,%rsi
  lea    (%rbx,%r8,8),%rdi
  call   <memcpy@plt>
L113:
  mov    -0x58(%rbp),%rax
  add    $0x1,%r14
  cmp    %r14d,(%rax)
  jle    L61
L147:
  movslq -0x4c(%rbp),%rax
  movsd  0x0(%r13,%r14,8),%xmm0
  mov    %r14d,-0x50(%rbp)
  subsd  0x0(%r13,%rax,8),%xmm0
  call   <exp@plt>
  mov    -0x48(%rbp),%rax
  mov    %r14d,%r8d
  movapd %xmm0,%xmm1
  movsd  D7(%rip),%xmm0
  movslq (%rax),%rdx
  mov    -0x60(%rbp),%rax
  minsd  %xmm1,%xmm0
  imul   %edx,%r8d
  comisd (%rax,%r14,8),%xmm0
  jb     L140
  test   %edx,%edx
  jle    L123
  movslq %r8d,%rax
  shl    $0x3,%rdx
  mov    %r12,%rdi
  mov    %r8d,-0x4c(%rbp)
  lea    (%r15,%rax,8),%rsi
  call   <memcpy@plt>
  mov    -0x4c(%rbp),%r8d
L123:
  mov    -0x68(%rbp),%rax
  mov    %r14d,-0x4c(%rbp)
  addl   $0x1,(%rax)
  mov    -0x48(%rbp),%rax
  movslq (%rax),%rdx
  jmp    L140
  nopl   0x0(%rax,%rax,1)
L61:
  mov    -0x38(%rbp),%rax
  sub    %fs:0x28,%rax
  jne    L149
  lea    -0x28(%rbp),%rsp
  pop    %rbx
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  pop    %rbp
  ret
L52:
  orq    $0x0,-0x8(%rsp,%rdx,1)
  jmp    L187
L105:
  mov    %ecx,%ecx
  xor    %eax,%eax
  nopl   (%rax)
L180:
  movsd  (%r15,%rax,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
  movsd  %xmm0,(%rbx,%rax,8)
  add    $0x1,%rax
  cmp    %rcx,%rax
  jne    L180
  jmp    L107
L149:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: retrieve_data
arguments: tag: D7
type: byte[8]

tool: {"D7": [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];
  }
}
```