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

```asm
<mvvm_sampler_gibbs>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x68,%rsp
  mov    %edi,-0x44(%rbp)
  mov    %esi,-0x48(%rbp)
  mov    %rdx,-0x50(%rbp)
  mov    %rcx,-0x58(%rbp)
  mov    %r8,-0x60(%rbp)
  mov    %r9d,-0x64(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L71
L127:
  mov    -0x40(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  D8(%rip),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x40(%rbp)
L71:
  mov    -0x40(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L127
  mov    -0x44(%rbp),%eax
  cltq
  mov    %eax,%edx
  mov    -0x48(%rbp),%eax
  cltq
  imul   %edx,%eax
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  movl   $0x0,-0x40(%rbp)
  jmp    L26
L36:
  movl   $0x0,-0x3c(%rbp)
  jmp    L13
L61:
  mov    -0x60(%rbp),%r9
  mov    -0x58(%rbp),%r8
  mov    -0x50(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x3c(%rbp),%esi
  mov    -0x48(%rbp),%eax
  lea    -0x30(%rbp),%rdi
  push   %rdi
  lea    -0x38(%rbp),%rdi
  push   %rdi
  mov    %eax,%edi
  call   <condKappaMu@plt>
  add    $0x10,%rsp
  movsd  -0x30(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <rvm_s@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x3c(%rbp)
L13:
  mov    -0x3c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L61
  addl   $0x1,-0x40(%rbp)
L26:
  mov    -0x40(%rbp),%eax
  cmp    -0x64(%rbp),%eax
  jle    L36
  movl   $0x0,-0x40(%rbp)
  jmp    L53
L63:
  movl   $0x0,-0x3c(%rbp)
  jmp    L66
L69:
  mov    -0x60(%rbp),%r9
  mov    -0x58(%rbp),%r8
  mov    -0x50(%rbp),%rcx
  mov    -0x28(%rbp),%rdx
  mov    -0x3c(%rbp),%esi
  mov    -0x48(%rbp),%eax
  lea    -0x30(%rbp),%rdi
  push   %rdi
  lea    -0x38(%rbp),%rdi
  push   %rdi
  mov    %eax,%edi
  call   <condKappaMu@plt>
  add    $0x10,%rsp
  movsd  -0x30(%rbp),%xmm0
  mov    -0x38(%rbp),%rax
  mov    -0x3c(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,8),%rcx
  mov    -0x28(%rbp),%rdx
  lea    (%rcx,%rdx,1),%rbx
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <rvm_s@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  addl   $0x1,-0x3c(%rbp)
L66:
  mov    -0x3c(%rbp),%eax
  cmp    -0x48(%rbp),%eax
  jl     L69
  cmpl   $0x0,-0x40(%rbp)
  je     L102
  mov    -0x40(%rbp),%eax
  cltd
  idivl  0x10(%rbp)
  mov    %edx,%eax
  test   %eax,%eax
  jne    L102
  mov    -0x48(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%esi
  mov    -0x40(%rbp),%eax
  cltd
  idivl  0x10(%rbp)
  sub    $0x1,%eax
  imul   -0x48(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  lea    (%rdx,%rax,1),%rcx
  mov    -0x28(%rbp),%rax
  mov    %esi,%edx
  mov    %rax,%rsi
  mov    %rcx,%rdi
  call   <memcpy@plt>
L102:
  addl   $0x1,-0x40(%rbp)
L53:
  mov    0x10(%rbp),%eax
  imul   -0x44(%rbp),%eax
  cmp    %eax,-0x40(%rbp)
  jle    L63
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    -0x18(%rbp),%rdx
  sub    %fs:0x28,%rdx
  je     L77
  call   <__stack_chk_fail@plt>
L77:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: tag: D8
datatype: byte[8]

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

assistant: ```c
double *mvvm_sampler_gibbs(int n, int p, double *mu, double *kappa, double *lambda, int initk, int k) {
  double *theta;
  double *ret;
  double mu_c, kappa_c;
  int i, j;
  theta = malloc(sizeof(double) * p);
  for (i = 0; i < p; i++)
    theta[i] = 1;
  ret = malloc(sizeof(double) * n * p);
  for (i = 0; i <= initk; i++) {
    for (j = 0; j < p; j++) {
      condKappaMu(p, j, theta, mu, kappa, lambda, &mu_c, &kappa_c);
      theta[j] = rvm_s(mu_c, kappa_c);
    }
  }
  for (i = 0; i <= (k * n); i++) {
    for (j = 0; j < p; j++) {
      condKappaMu(p, j, theta, mu, kappa, lambda, &mu_c, &kappa_c);
      theta[j] = rvm_s(mu_c, kappa_c);
    }
    if (i != 0 && i % k == 0)
      memcpy(ret + ((i / k) - 1) * p, theta, sizeof(double) * p);
  }
  free(theta);
  return ret;
}
```