user: 请将这段汇编代码片段转换成等效的C代码:

```asm
<makeP_Flex_Ancestral>:
  endbr64
  push   %r15
  lea    -0x1(%r9),%r15d
  push   %r14
  mov    %ecx,%r14d
  push   %r13
  mov    %rdx,%r13
  push   %r12
  mov    %r8,%r12
  push   %rbp
  mov    %rdi,%rbp
  xor    %edi,%edi
  push   %rbx
  mov    %rsi,%rbx
  mov    %r9d,%esi
  imul   %r9d,%esi
  sub    $0x478,%rsp
  mov    %r9d,0x3c(%rsp)
  mov    %fs:0x28,%rax
  mov    %rax,0x468(%rsp)
  xor    %eax,%eax
  cmp    $0x40,%r9d
  mov    %r15d,0xc(%rsp)
  setle  %dil
  mov    %esi,0x4c(%rsp)
  call   <assert@plt>
  test   %r15d,%r15d
  jle    L88
  cmpl   $0x2,0x3c(%rsp)
  je     L71
  mov    0xc(%rsp),%edx
  xor    %eax,%eax
  lea    0x60(%rsp),%rcx
  pxor   %xmm1,%xmm1
  shr    %edx
  shl    $0x4,%rdx
L144:
  movupd 0x0(%r13,%rax,1),%xmm0
  mulpd  %xmm1,%xmm0
  movaps %xmm0,(%rcx,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L144
  mov    0xc(%rsp),%edi
  mov    %edi,%eax
  and    $0xfffffffe,%eax
  and    $0x1,%edi
  je     L88
L142:
  cltq
  pxor   %xmm0,%xmm0
  mulsd  0x0(%r13,%rax,8),%xmm0
  movsd  %xmm0,0x60(%rsp,%rax,8)
L88:
  test   %r14d,%r14d
  jle    L36
  lea    -0x1(%r14),%eax
  mov    0xc(%rsp),%esi
  mov    %rbp,0x20(%rsp)
  lea    0x8(%rbp,%rax,8),%rax
  movl   $0x0,0x48(%rsp)
  mov    %rax,0x50(%rsp)
  movslq 0x3c(%rsp),%rax
  mov    %rax,%rdi
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  mov    %esi,%eax
  shr    %eax
  sub    $0x1,%eax
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,%r15
  mov    %esi,%eax
  and    $0xfffffffe,%esi
  mov    %esi,%ebp
  mov    %eax,%esi
  lea    -0x2(%rdi),%eax
  mov    %r15,%r9
  mov    %eax,0x38(%rsp)
  lea    0x60(%rsp),%rax
  or     $0x1,%esi
  mov    %rax,0x58(%rsp)
  mov    %esi,%r13d
  nopl   0x0(%rax,%rax,1)
L136:
  mov    0xc(%rsp),%eax
  test   %eax,%eax
  jle    L89
  mov    0x20(%rsp),%rax
  xor    %r15d,%r15d
  mov    %r9,0x28(%rsp)
  lea    0x260(%rsp),%r14
  mov    %rbx,0x40(%rsp)
  mov    %r15,%rbx
  mov    0x58(%rsp),%r15
  movsd  (%rax),%xmm2
  mov    0x38(%rsp),%eax
  mov    %r13d,0x30(%rsp)
  movsd  %xmm2,0x10(%rsp)
  mov    %rax,%r13
L187:
  movsd  0x10(%rsp),%xmm0
  mulsd  (%r15,%rbx,8),%xmm0
  call   <exp@plt>
  mov    %rbx,%rdx
  movsd  %xmm0,(%r14,%rbx,8)
  add    $0x1,%rbx
  cmp    %r13,%rdx
  jne    L187
  mov    0x28(%rsp),%r9
  mov    0x30(%rsp),%r13d
  mov    0x40(%rsp),%rbx
L89:
  mov    0x3c(%rsp),%edx
  test   %edx,%edx
  jle    L116
  movslq 0x48(%rsp),%rax
  mov    0x3c(%rsp),%r14d
  xor    %ecx,%ecx
  xor    %r11d,%r11d
  lea    0x260(%rsp),%rdi
  movslq %ebp,%r8
  mov    %rax,%rsi
  lea    0x8(%r12,%rax,8),%rdx
  mov    0x38(%rsp),%eax
  mov    %rax,0x30(%rsp)
  nopl   0x0(%rax)
L170:
  mov    D0(%rip),%rax
  mov    %rax,-0x8(%rdx)
  cmp    $0x1,%r14d
  je     L92
  lea    0x1(%rcx),%eax
  cltq
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%r10
  cmp    %r10,%rdx
  je     L104
  cmpl   $0x1,0x38(%rsp)
  jbe    L104
  lea    -0x8(%rbx,%rax,1),%r10
  xor    %eax,%eax
  nopl   0x0(%rax)
L189:
  movupd (%r10,%rax,1),%xmm0
  mulpd  (%rdi,%rax,1),%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r9
  jne    L189
  cmp    0xc(%rsp),%ebp
  je     L92
  lea    (%rcx,%rbp,1),%r10d
  lea    (%rsi,%r13,1),%eax
  movslq %r10d,%r10
  cltq
  movsd  (%rbx,%r10,8),%xmm0
  mulsd  0x260(%rsp,%r8,8),%xmm0
  movsd  %xmm0,(%r12,%rax,8)
L92:
  add    $0x1,%r11d
  add    0xc(%rsp),%ecx
  add    %r14d,%esi
  add    0x18(%rsp),%rdx
  cmp    %r11d,%r14d
  jne    L170
L116:
  addq   $0x8,0x20(%rsp)
  mov    0x4c(%rsp),%esi
  mov    0x20(%rsp),%rax
  add    %esi,0x48(%rsp)
  cmp    0x50(%rsp),%rax
  jne    L136
L36:
  mov    0x468(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L153
  add    $0x478,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
  nopl   (%rax)
L104:
  mov    %r9,0x10(%rsp)
  lea    -0x8(%rdx),%r10
  lea    -0x8(%rbx,%rax,1),%r15
  xor    %eax,%eax
  mov    %rdx,0x28(%rsp)
  mov    0x30(%rsp),%rdx
  nopw   0x0(%rax,%rax,1)
L179:
  movsd  (%r15,%rax,8),%xmm0
  mulsd  (%rdi,%rax,8),%xmm0
  mov    %rax,%r9
  movsd  %xmm0,0x8(%r10,%rax,8)
  add    $0x1,%rax
  cmp    %r9,%rdx
  jne    L179
  mov    0x10(%rsp),%r9
  mov    0x28(%rsp),%rdx
  jmp    L92
L71:
  xor    %eax,%eax
  jmp    L142
L153:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: disassemble_data
arguments: tag: D0
type: f64

tool: D0: 1

assistant: ```c
void makeP_Flex_Ancestral(double *rptr, double *EI, double *EIGN, int numberOfCategories, double *left, const int numStates) {
  int i, j, k;
  const int rates = numStates - 1, statesSquare = numStates * numStates;
  double z1 = 0.0, lz1[64], d1[64];
  assert(numStates <= 64);
  for (i = 0; i < rates; i++)
    lz1[i] = EIGN[i] * z1;
  for (i = 0; i < numberOfCategories; i++) {
    for (j = 0; j < rates; j++)
      d1[j] = exp(rptr[i] * lz1[j]);
    for (j = 0; j < numStates; j++) {
      left[statesSquare * i + numStates * j] = 1.0;
      for (k = 1; k < numStates; k++)
        left[statesSquare * i + numStates * j + k] = d1[k - 1] * EI[rates * j + (k - 1)];
    }
  }
}
```