user: 请从给定的汇编指令推导出C源代码：

```asm
<RandomDirichlet_rejection>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %rdi,-0x28(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %edx,-0x34(%rbp)
  movl   $0xffffffff,-0x1c(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L48
L47:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  setae  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  addl   $0x1,-0x20(%rbp)
L48:
  mov    -0x20(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L47
L54:
  addl   $0x1,-0x1c(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x20(%rbp)
  jmp    L5
L53:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    $0x0,%eax
  call   <RandomStandardUniform@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D8(%rip),%xmm0
  divsd  %xmm1,%xmm0
  cvttsd2si %xmm0,%edx
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x30(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%rax
  mov    -0x20(%rbp),%ecx
  movslq %ecx,%rcx
  lea    0x0(,%rcx,8),%rsi
  mov    -0x30(%rbp),%rcx
  lea    (%rsi,%rcx,1),%rbx
  mov    %edx,%edi
  movq   %rax,%xmm0
  call   <pow@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x20(%rbp)
L5:
  mov    -0x20(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L53
  mov    $0x0,%eax
  call   <RandomStandardUniform@plt>
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movsd  -0x18(%rbp),%xmm0
  movsd  D8(%rip),%xmm1
  comisd %xmm1,%xmm0
  ja     L54
  movl   $0x0,-0x20(%rbp)
  jmp    L67
L11:
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  setae  %al
  movzbl %al,%eax
  mov    %eax,%edi
  call   <assert@plt>
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x20(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  divsd  -0x18(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x20(%rbp)
L67:
  mov    -0x20(%rbp),%eax
  cmp    -0x34(%rbp),%eax
  jl     L11
  mov    $0x0,%eax
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: disassemble_data
arguments: data_label: D8
data_type: f64

tool: D8: 1

assistant: ```c
int RandomDirichlet_rejection(double *a, double *p, int n) {
  int b;
  int reject = -1;
  double t;
  for (b = 0; b < n; b++)
    assert(a[b] >= 0.);
  do {
    reject++;
    t = 0.;
    for (b = 0; b < n; b++) {
      p[b] = RandomStandardUniform();
      p[b] = pow(p[b], 1. / a[b]);
      t += p[b];
    }
    t += RandomStandardUniform();
  } while (t > 1.);
  for (b = 0; b < n; b++) {
    assert(p[b] >= 0.);
    p[b] /= t;
  }
  return 0;
}
```