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

```asm
<getP3>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  sub    $0xe0,%rsp
  mov    %rdi,-0xa8(%rbp)
  mov    %rsi,-0xb0(%rbp)
  mov    %rdx,-0xb8(%rbp)
  mov    %rcx,-0xc0(%rbp)
  mov    %r8,-0xc8(%rbp)
  mov    %r9,-0xd0(%rbp)
  mov    0x18(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x48(%rbp)
  cmpl   $0x0,0x10(%rbp)
  jne    L109
  movl   $0x0,-0x9c(%rbp)
  jmp    L331
L285:
  mov    -0x9c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x9c(%rbp)
L331:
  mov    0x18(%rbp),%eax
  imul   %eax,%eax
  cmp    %eax,-0x9c(%rbp)
  jl     L285
  mov    -0x48(%rbp),%rax
  jmp    L146
L109:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    0x18(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x40(%rbp)
  mov    0x18(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x38(%rbp)
  mov    0x10(%rbp),%eax
  imul   %eax,%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x30(%rbp)
  mov    0x10(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x28(%rbp)
  mov    0x10(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x20(%rbp)
  mov    0x18(%rbp),%eax
  imul   %eax,%eax
  imul   0x10(%rbp),%eax
  imul   0x10(%rbp),%eax
  cltq
  shl    $0x3,%eax
  mov    %eax,%edi
  call   <malloc@plt>
  mov    %rax,-0x18(%rbp)
  movl   $0x0,-0x98(%rbp)
  jmp    L123
L130:
  mov    0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x98(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D43(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movsd  D43(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x10(%rbp)
  mov    -0x10(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movq   %xmm0,%rax
  mov    %rax,-0x8(%rbp)
  movsd  -0x8(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mulsd  -0x10(%rbp),%xmm0
  mov    -0x98(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    0x18(%rbp),%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x98(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x98(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x10(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x98(%rbp)
L123:
  mov    -0x98(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L130
  movl   $0x0,-0x94(%rbp)
  jmp    L18
L344:
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D40(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movapd %xmm0,%xmm1
  addsd  %xmm0,%xmm1
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D61(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xa8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D61(%rip),%xmm1
  mulsd  %xmm1,%xmm2
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  mov    -0x94(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x94(%rbp)
L18:
  mov    -0x94(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L344
  movl   $0x0,-0x90(%rbp)
  jmp    L31
L9:
  movl   $0x0,-0x8c(%rbp)
  jmp    L83
L181:
  mov    0x10(%rbp),%eax
  imul   %eax,%eax
  lea    (%rax,%rax,1),%edx
  mov    -0x90(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D63(%rip),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x90(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb8(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  mov    0x10(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    -0x90(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm3
  movsd  D21(%rip),%xmm0
  mulsd  %xmm0,%xmm3
  mov    -0x90(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm4
  mov    -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm4,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  mov    -0x90(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  D83(%rip),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x8c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x28(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm2
  mov    -0x90(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    0x20(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm2,%xmm0
  mov    -0x90(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x8c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x8c(%rbp)
L83:
  mov    -0x8c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L181
  addl   $0x1,-0x90(%rbp)
L31:
  mov    -0x90(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L9
  movl   $0x0,-0x88(%rbp)
  jmp    L152
L193:
  movl   $0x0,-0x84(%rbp)
  jmp    L301
L38:
  movl   $0x0,-0x80(%rbp)
  jmp    L113
L252:
  movl   $0x0,-0x7c(%rbp)
  jmp    L335
L59:
  mov    -0x80(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x7c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x30(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm5
  movsd  %xmm5,-0xd8(%rbp)
  mov    -0x88(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movq   D53(%rip),%xmm1
  xorpd  %xmm0,%xmm1
  mov    -0x80(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mov    -0x84(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  mov    -0x7c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xc0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <exp@plt>
  mov    -0x88(%rbp),%eax
  imul   0x18(%rbp),%eax
  imul   0x10(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x84(%rbp),%eax
  imul   0x10(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x80(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x7c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0xd8(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x7c(%rbp)
L335:
  mov    -0x7c(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L59
  addl   $0x1,-0x80(%rbp)
L113:
  mov    -0x80(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L252
  addl   $0x1,-0x84(%rbp)
L301:
  mov    -0x84(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L38
  addl   $0x1,-0x88(%rbp)
L152:
  mov    -0x88(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L193
  movl   $0x0,-0x78(%rbp)
  jmp    L52
L257:
  mov    -0x78(%rbp),%eax
  mov    %eax,-0x74(%rbp)
  jmp    L157
L105:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  movl   $0x0,-0x70(%rbp)
  jmp    L350
L294:
  movl   $0x0,-0x6c(%rbp)
  jmp    L296
L8:
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  movl   $0x0,-0x68(%rbp)
  jmp    L70
L118:
  movl   $0x0,-0x64(%rbp)
  jmp    L71
L327:
  mov    -0x70(%rbp),%eax
  imul   0x18(%rbp),%eax
  imul   0x10(%rbp),%eax
  imul   0x10(%rbp),%eax
  mov    %eax,%edx
  mov    -0x6c(%rbp),%eax
  imul   0x10(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x68(%rbp),%eax
  imul   0x10(%rbp),%eax
  add    %eax,%edx
  mov    -0x64(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x18(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0x58(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x58(%rbp)
  addl   $0x1,-0x64(%rbp)
L71:
  mov    -0x64(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L327
  addl   $0x1,-0x68(%rbp)
L70:
  mov    -0x68(%rbp),%eax
  cmp    0x10(%rbp),%eax
  jl     L118
  mov    0x18(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x78(%rbp),%eax
  imul   0x18(%rbp),%eax
  add    %eax,%edx
  mov    -0x70(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    0x18(%rbp),%eax
  imul   %eax,%eax
  mov    %eax,%edx
  mov    %edx,%eax
  add    %eax,%eax
  add    %eax,%edx
  mov    -0x74(%rbp),%eax
  imul   0x18(%rbp),%eax
  add    %eax,%edx
  mov    -0x6c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xd0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x70(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm0,%xmm1
  mov    -0x6c(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x38(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mulsd  %xmm1,%xmm0
  mulsd  -0x58(%rbp),%xmm0
  movsd  -0x50(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0x50(%rbp)
  addl   $0x1,-0x6c(%rbp)
L296:
  mov    -0x6c(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L8
  addl   $0x1,-0x70(%rbp)
L350:
  mov    -0x70(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L294
  mov    0x18(%rbp),%eax
  imul   -0x78(%rbp),%eax
  mov    %eax,%edx
  mov    -0x74(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  -0x50(%rbp),%xmm1
  movsd  D51(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x74(%rbp)
L157:
  mov    -0x74(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L105
  addl   $0x1,-0x78(%rbp)
L52:
  mov    -0x78(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L257
  movl   $0x0,-0x60(%rbp)
  jmp    L49
L159:
  mov    -0x60(%rbp),%eax
  add    $0x1,%eax
  mov    %eax,-0x5c(%rbp)
  jmp    L238
L352:
  mov    0x18(%rbp),%eax
  imul   -0x60(%rbp),%eax
  mov    %eax,%edx
  mov    -0x5c(%rbp),%eax
  add    %edx,%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rax,%rdx
  mov    0x18(%rbp),%eax
  imul   -0x5c(%rbp),%eax
  mov    %eax,%ecx
  mov    -0x60(%rbp),%eax
  add    %ecx,%eax
  cltq
  lea    0x0(,%rax,8),%rcx
  mov    -0x48(%rbp),%rax
  add    %rcx,%rax
  movsd  (%rdx),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x5c(%rbp)
L238:
  mov    -0x5c(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L352
  addl   $0x1,-0x60(%rbp)
L49:
  mov    -0x60(%rbp),%eax
  cmp    0x18(%rbp),%eax
  jl     L159
  mov    -0x38(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x40(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x30(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x28(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x20(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x18(%rbp),%rax
  mov    %rax,%rdi
  call   <free@plt>
  mov    -0x48(%rbp),%rax
L146:
  leave
  ret
```

tool_calls: name: parse_data
arguments: tag: D43
type: f64
name: parse_data
arguments: tag: D40
type: f32[2]
name: parse_data
arguments: tag: D61
type: f32[2]
name: parse_data
arguments: tag: D63
type: f64
name: parse_data
arguments: tag: D21
type: f64
name: parse_data
arguments: tag: D83
type: f64
name: parse_data
arguments: tag: D53
type: f32[2]
name: parse_data
arguments: tag: D51
type: byte[8]

tool: D43: 1

tool: {"D40": [0.0,2.25]}

tool: {"D61": [0.0,2.125]}

tool: D63: 2.5

tool: D21: 15

tool: D83: 1.5

tool: {"D53": [0.0,-0.0]}

tool: {"D51": [0x23,0x7d,0x86,0x30,0x95,0x45,0x11,0x40]}

assistant: ```c
double *getP3(double *x, double *y, double *z, double *r2, double *alphas, double *betas, int Asize, int Nsize, double *ReX) {
  double *P3 = (double *)malloc(Nsize * Nsize * sizeof(double));
  if (Asize == 0) {
    for (int n = 0; n < Nsize * Nsize; n++) {
      P3[n] = 0.0;
    }
    return P3;
  }
  double sumsInner = 0;
  double sumsOuter = 0;
  double oneO1Palpha;
  double oneO1PalphaSqrt;
  double *alphaO1Palpha = (double *)malloc(Nsize * sizeof(double));
  double *oneO1PalphaSqrt9 = (double *)malloc(Nsize * sizeof(double));
  double *ReXStripe = (double *)malloc(Asize * Asize * sizeof(double));
  double *zxy4 = (double *)malloc(Asize * sizeof(double));
  double *zxy233 = (double *)malloc(Asize * sizeof(double));
  double *kkdij = (double *)malloc(Nsize * Nsize * Asize * Asize * sizeof(double));
  for (int n = 0; n < Nsize; n++) {
    oneO1Palpha = 1.0 / (1.00000000 + alphas[3 * Nsize + n]);
    oneO1PalphaSqrt = sqrt(oneO1Palpha);
    oneO1PalphaSqrt9[n] = oneO1PalphaSqrt * oneO1Palpha * oneO1Palpha * oneO1Palpha * oneO1Palpha;
    alphaO1Palpha[n] = alphas[3 * Nsize + n] * oneO1Palpha;
  }
  for (int i = 0; i < Asize; i++) {
    zxy4[i] = (4 * z[i] * z[i] - x[i] * x[i] - y[i] * y[i]);
    zxy233[i] = (2 * z[i] * z[i] - 3 * x[i] * x[i] - 3 * y[i] * y[i]);
  }
  for (int i = 0; i < Asize; i++) {
    for (int j = 0; j < Asize; j++) {
      ReXStripe[i * Asize + j] = 2.5 * ReX[2 * Asize * Asize + i * Asize + j] + z[i] * z[j] * (15.0 * ReX[Asize * Asize + i * Asize + j] + zxy233[i] * zxy233[j]) + 1.5 * zxy4[i] * zxy4[j] * ReX[i * Asize + j];
    }
  }
  for (int k = 0; k < Nsize; k++) {
    for (int kd = 0; kd < Nsize; kd++) {
      for (int i = 0; i < Asize; i++) {
        for (int j = 0; j < Asize; j++) {
          kkdij[k * Nsize * Asize * Asize + kd * Asize * Asize + i * Asize + j] = ReXStripe[i * Asize + j] * exp(-alphaO1Palpha[k] * r2[i] - alphaO1Palpha[kd] * r2[j]);
        }
      }
    }
  }
  for (int n = 0; n < Nsize; n++) {
    for (int nd = n; nd < Nsize; nd++) {
      sumsOuter = 0;
      for (int k = 0; k < Nsize; k++) {
        for (int kd = 0; kd < Nsize; kd++) {
          sumsInner = 0;
          for (int i = 0; i < Asize; i++) {
            for (int j = 0; j < Asize; j++) {
              sumsInner += kkdij[k * Nsize * Asize * Asize + kd * Asize * Asize + i * Asize + j];
            }
          }
          sumsOuter += betas[3 * Nsize * Nsize + n * Nsize + k] * betas[3 * Nsize * Nsize + nd * Nsize + kd] * oneO1PalphaSqrt9[k] * oneO1PalphaSqrt9[kd] * sumsInner;
        }
      }
      P3[Nsize * n + nd] = 7.0 * 9.86960440108936 * 0.0625 * sumsOuter;
    }
  }
  for (int n = 0; n < Nsize; n++) {
    for (int nd = n + 1; nd < Nsize; nd++) {
      P3[Nsize * nd + n] = P3[Nsize * n + nd];
    }
  }
  free(oneO1PalphaSqrt9);
  free(alphaO1Palpha);
  free(ReXStripe);
  free(zxy4);
  free(zxy233);
  free(kkdij);
  return P3;
}
```