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

```asm
<MultiNomialAliasSetTable>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  mov    %edi,-0x24(%rbp)
  mov    %rsi,-0x30(%rbp)
  mov    %rdx,-0x38(%rbp)
  mov    %rcx,-0x40(%rbp)
  mov    %r8,-0x48(%rbp)
  mov    -0x48(%rbp),%rax
  mov    %rax,-0x8(%rbp)
  movl   $0x0,-0x18(%rbp)
  jmp    L92
L86:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movl   $0xfffffff7,(%rax)
  addl   $0x1,-0x18(%rbp)
L92:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L86
  movl   $0x0,-0x18(%rbp)
  jmp    L81
L144:
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x24(%rbp),%xmm1
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x18(%rbp)
L81:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L144
  movl   $0x0,-0x18(%rbp)
  movl   $0x0,-0xc(%rbp)
  jmp    L3
L189:
  mov    -0x18(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  D2(%rip),%xmm1
  comisd %xmm1,%xmm0
  jb     L68
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x1,(%rax)
  jmp    L165
L68:
  mov    -0x18(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0xff,(%rax)
  addl   $0x1,-0xc(%rbp)
L165:
  addl   $0x1,-0x18(%rbp)
L3:
  mov    -0x18(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L189
  movl   $0x0,-0x18(%rbp)
  jmp    L99
L84:
  movl   $0x0,-0x14(%rbp)
  jmp    L116
L115:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0xff,%al
  je     L161
  addl   $0x1,-0x14(%rbp)
L116:
  mov    -0x14(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L115
  jmp    L109
L161:
  nop
L109:
  movl   $0x0,-0x10(%rbp)
  jmp    L153
L34:
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movzbl (%rax),%eax
  cmp    $0x1,%al
  je     L33
  addl   $0x1,-0x10(%rbp)
L153:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  jl     L34
  jmp    L179
L33:
  nop
L179:
  mov    -0x10(%rbp),%eax
  cmp    -0x24(%rbp),%eax
  je     L121
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x40(%rbp),%rax
  add    %rax,%rdx
  mov    -0x10(%rbp),%eax
  mov    %eax,(%rdx)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x14(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D2(%rip),%xmm1
  subsd  %xmm2,%xmm1
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x10(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D2(%rip),%xmm0
  comisd %xmm1,%xmm0
  jbe    L200
  mov    -0x10(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0xff,(%rax)
  addl   $0x1,-0xc(%rbp)
L200:
  mov    -0x14(%rbp),%eax
  movslq %eax,%rdx
  mov    -0x8(%rbp),%rax
  add    %rdx,%rax
  movb   $0x0,(%rax)
  subl   $0x1,-0xc(%rbp)
  addl   $0x1,-0x18(%rbp)
L99:
  cmpl   $0x0,-0xc(%rbp)
  jg     L84
  jmp    L103
L121:
  nop
L103:
  mov    $0x0,%eax
  pop    %rbp
  ret
```

tool_calls: name: disassemble_data
arguments: label: D2
type: byte[8]

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

assistant: ```c
int MultiNomialAliasSetTable(int ncat, double prob[], double F[], int L[], double space[]) {
  signed char *I = (signed char *)space;
  int i, j, k, nsmall;
  for (i = 0; i < ncat; i++)
    L[i] = -9;
  for (i = 0; i < ncat; i++)
    F[i] = ncat * prob[i];
  for (i = 0, nsmall = 0; i < ncat; i++) {
    if (F[i] >= 1)
      I[i] = 1;
    else {
      I[i] = -1;
      nsmall++;
    }
  }
  for (i = 0; nsmall > 0; i++) {
    for (j = 0; j < ncat; j++)
      if (I[j] == -1)
        break;
    for (k = 0; k < ncat; k++)
      if (I[k] == 1)
        break;
    if (k == ncat)
      break;
    L[j] = k;
    F[k] -= 1 - F[j];
    if (F[k] < 1) {
      I[k] = -1;
      nsmall++;
    }
    I[j] = 0;
    nsmall--;
  }
  return (0);
}
```