user: 下面的汇编指令对应的C源代码是什么:

```asm
<genPi>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x38,%rsp
  mov    %edi,-0x24(%rbp)
  movsd  %xmm0,-0x30(%rbp)
  mov    %rsi,-0x38(%rbp)
  movl   $0x0,-0x20(%rbp)
  movsd  -0x30(%rbp),%xmm0
  movsd  D38(%rip),%xmm1
  comisd %xmm1,%xmm0
  setae  %dl
  pxor   %xmm0,%xmm0
  comisd -0x30(%rbp),%xmm0
  setae  %al
  or     %edx,%eax
  test   %al,%al
  je     L32
  movl   $0x0,-0x1c(%rbp)
  jmp    L21
L54:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  D38(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L21:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L54
  jmp    L40
L32:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  movl   $0x0,-0x1c(%rbp)
  jmp    L82
L58:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  lea    (%rdx,%rax,1),%rbx
  mov    D38(%rip),%rax
  movq   %rax,%xmm0
  call   <rgamma@plt>
  movq   %xmm0,%rax
  mov    %rax,(%rbx)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x18(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x18(%rbp)
  addl   $0x1,-0x1c(%rbp)
L82:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L58
  movl   $0x0,-0x1c(%rbp)
  jmp    L73
L124:
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  divsd  -0x18(%rbp),%xmm1
  pxor   %xmm0,%xmm0
  cvtsi2sdl -0x24(%rbp),%xmm0
  movapd %xmm0,%xmm2
  mulsd  -0x30(%rbp),%xmm2
  movsd  D38(%rip),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  addsd  -0x30(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0x30(%rbp),%xmm0
  comisd %xmm1,%xmm0
  jbe    L17
  movl   $0x1,-0x20(%rbp)
  jmp    L103
L17:
  addl   $0x1,-0x1c(%rbp)
L73:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L124
L103:
  cmpl   $0x1,-0x20(%rbp)
  jne    L40
  movl   $0x0,-0x1c(%rbp)
  jmp    L6
L9:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x1c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  D38(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x1c(%rbp)
L6:
  mov    -0x1c(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L9
L40:
  nop
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: retrieve_data
arguments: data_tag: D38
type_infered: f64

tool: D38: 1

assistant: ```c
void genPi(int K, double PiLow, double *Pi) {
  int flag, k;
  double s;
  flag = 0;
  if ((PiLow >= 1) | (PiLow <= 0)) {
    for (k = 0; k < K; k++) {
      Pi[k] = 1.0 / K;
    }
  } else {
    s = 0.0;
    for (k = 0; k < K; k++) {
      Pi[k] = rgamma(1.0);
      s += Pi[k];
    }
    for (k = 0; k < K; k++) {
      Pi[k] = PiLow + Pi[k] / s * (1 - K * PiLow);
      if (Pi[k] < PiLow) {
        flag = 1;
        break;
      }
    }
    if (flag == 1) {
      for (k = 0; k < K; k++) {
        Pi[k] = 1.0 / K;
      }
    }
  }
}
```