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

```asm
<makeP_FlexLG4>:
  endbr64
  push   %r15
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  push   %rbx
  sub    $0x488,%rsp
  movsd  %xmm0,0x20(%rsp)
  movsd  %xmm1,0x28(%rsp)
  mov    %rdi,%r13
  mov    %rsi,%rbx
  mov    %rdx,%r12
  mov    %ecx,%r14d
  mov    %r8,%r15
  mov    %r9,0x68(%rsp)
  mov    0x4c0(%rsp),%ebp
  mov    %fs:0x28,%rax
  mov    %rax,0x478(%rsp)
  xor    %eax,%eax
  lea    -0x1(%rbp),%eax
  mov    %eax,0x14(%rsp)
  mov    %ebp,%eax
  imul   %ebp,%eax
  mov    %eax,0x54(%rsp)
  cmp    $0x40,%ebp
  setle  %dil
  movzbl %dil,%edi
  call   <assert@plt>
  test   %r14d,%r14d
  jle    L83
  mov    %r13,0x40(%rsp)
  lea    -0x1(%r14),%eax
  lea    0x8(%r13,%rax,8),%rax
  mov    %rax,0x58(%rsp)
  lea    -0x2(%rbp),%eax
  add    $0x1,%rax
  mov    %rax,0x38(%rsp)
  shl    $0x3,%rax
  mov    %rax,0x60(%rsp)
  movslq %ebp,%rax
  shl    $0x3,%rax
  mov    %rax,0x18(%rsp)
  movl   $0x0,0x50(%rsp)
  mov    D1(%rip),%r14
  jmp    L21
L100:
  mov    %rbx,0x30(%rsp)
  mov    0x40(%rsp),%rbx
  mov    %ebp,0x4c0(%rsp)
  mov    0x60(%rsp),%rbp
L16:
  mov    (%r12),%rax
  movsd  (%rax,%r13,1),%xmm0
  mulsd  (%rbx),%xmm0
  movsd  %xmm0,0x8(%rsp)
  mulsd  0x20(%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x70(%rsp,%r13,1)
  movsd  0x8(%rsp),%xmm0
  mulsd  0x28(%rsp),%xmm0
  call   <exp@plt>
  movsd  %xmm0,0x270(%rsp,%r13,1)
  add    $0x8,%r13
  cmp    %rbp,%r13
  jne    L16
  mov    0x30(%rsp),%rbx
  mov    0x4c0(%rsp),%ebp
L33:
  test   %ebp,%ebp
  jle    L2
  movslq 0x50(%rsp),%r10
  shl    $0x3,%r10
  mov    $0x0,%r13d
  mov    $0x0,%r11d
  lea    0x70(%rsp),%rcx
  lea    0x270(%rsp),%rax
  mov    %rax,0x30(%rsp)
  mov    %r12,0x48(%rsp)
  mov    0x68(%rsp),%r12
L29:
  mov    %r14,(%r15,%r10,1)
  mov    %r14,(%r12,%r10,1)
  cmp    $0x1,%ebp
  jle    L0
  movslq %r13d,%rdx
  lea    0x0(,%rdx,8),%rax
  mov    0x38(%rsp),%rdi
  add    %rdx,%rdi
  shl    $0x3,%rdi
  neg    %rdx
  shl    $0x3,%rdx
  lea    (%rcx,%rdx,1),%r9
  lea    (%rdx,%r10,1),%rsi
  lea    (%r15,%rsi,1),%r8
  add    0x30(%rsp),%rdx
  add    %r12,%rsi
  mov    %rcx,0x8(%rsp)
L69:
  mov    (%rbx),%rcx
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%r9,%rax,1),%xmm0
  movsd  %xmm0,0x8(%r8,%rax,1)
  mov    (%rbx),%rcx
  movsd  (%rcx,%rax,1),%xmm0
  mulsd  (%rdx,%rax,1),%xmm0
  movsd  %xmm0,0x8(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %rdi,%rax
  jne    L69
  mov    0x8(%rsp),%rcx
L0:
  add    $0x1,%r11d
  add    0x14(%rsp),%r13d
  add    0x18(%rsp),%r10
  cmp    %r11d,%ebp
  jne    L29
  mov    0x48(%rsp),%r12
L2:
  addq   $0x8,0x40(%rsp)
  mov    0x40(%rsp),%rax
  add    $0x8,%r12
  mov    0x54(%rsp),%edi
  add    %edi,0x50(%rsp)
  add    $0x8,%rbx
  cmp    0x58(%rsp),%rax
  je     L83
L21:
  mov    $0x0,%r13d
  cmpl   $0x0,0x14(%rsp)
  jg     L100
  jmp    L33
L83:
  mov    0x478(%rsp),%rax
  sub    %fs:0x28,%rax
  jne    L58
  add    $0x488,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  ret
L58:
  call   <__stack_chk_fail@plt>
```

tool_calls: name: extract_symbolic_data
arguments: tag: D1
type: f64

tool: D1: 1

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