user: Please show me the C implementation that matches the assembly code listed below:

```asm
<solve_Troullier>:
  endbr64
  push   %rbp
  mov    %rsp,%rbp
  push   %rbx
  sub    $0x1b8,%rsp
  mov    %edi,-0x114(%rbp)
  mov    %rsi,-0x120(%rbp)
  mov    %rdx,-0x128(%rbp)
  mov    %rcx,-0x130(%rbp)
  mov    %r8,-0x138(%rbp)
  mov    %r9,-0x140(%rbp)
  mov    0x10(%rbp),%rax
  mov    %rax,-0x148(%rbp)
  mov    0x18(%rbp),%rax
  mov    %rax,-0x150(%rbp)
  mov    0x20(%rbp),%rax
  mov    %rax,-0x158(%rbp)
  mov    0x28(%rbp),%rax
  mov    %rax,-0x160(%rbp)
  mov    0x30(%rbp),%rax
  mov    %rax,-0x168(%rbp)
  mov    0x38(%rbp),%rax
  mov    %rax,-0x170(%rbp)
  mov    0x40(%rbp),%rax
  mov    %rax,-0x178(%rbp)
  mov    0x48(%rbp),%rax
  mov    %rax,-0x180(%rbp)
  mov    0x50(%rbp),%rax
  mov    %rax,-0x188(%rbp)
  mov    0x58(%rbp),%rax
  mov    %rax,-0x190(%rbp)
  mov    0x60(%rbp),%rax
  mov    %rax,-0x198(%rbp)
  mov    0x68(%rbp),%rax
  mov    %rax,-0x1a0(%rbp)
  mov    0x70(%rbp),%rax
  mov    %rax,-0x1a8(%rbp)
  mov    0x78(%rbp),%rax
  mov    %rax,-0x1b0(%rbp)
  mov    0x80(%rbp),%rax
  mov    %rax,-0x1b8(%rbp)
  mov    %fs:0x28,%rax
  mov    %rax,-0x18(%rbp)
  xor    %eax,%eax
  mov    $0x0,%eax
  call   <Vall_Atom@plt>
  cltq
  mov    %rax,-0xb8(%rbp)
  mov    $0x0,%eax
  call   <r_LogGrid@plt>
  cltq
  mov    %rax,-0xb0(%rbp)
  mov    $0x0,%eax
  call   <N_LogGrid@plt>
  mov    %eax,-0xf8(%rbp)
  mov    $0x0,%eax
  call   <log_amesh_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0xa8(%rbp)
  mov    $0x0,%eax
  call   <amesh_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0xa0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  pxor   %xmm0,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L190
L2:
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  pxor   %xmm0,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L190:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L2
  mov    $0x0,%eax
  call   <debug_print@plt>
  test   %eax,%eax
  je     L181
  lea    D169(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D78(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L181:
  movl   $0x0,-0x100(%rbp)
  jmp    L244
L140:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x148(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x150(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jp     L359
  pxor   %xmm1,%xmm1
  ucomisd %xmm1,%xmm0
  jne    L359
  movsd  D102(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rcx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x120(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  movsd  -0x50(%rbp),%xmm0
  movapd %xmm0,%xmm1
  movq   %rcx,%xmm0
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x2,%eax
  call   <solve_Scattering_State_Atom@plt>
  mov    $0x0,%eax
  call   <Nvalence_Atom@plt>
  mov    %eax,%ebx
  mov    $0x0,%eax
  call   <Ncore_Atom@plt>
  add    %ebx,%eax
  mov    %eax,-0x108(%rbp)
  mov    -0xb0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x50(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm6
  divsd  -0xa8(%rbp),%xmm6
  movq   %xmm6,%rax
  movq   %rax,%xmm0
  call   <rint@plt>
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x10c(%rbp)
  mov    -0x108(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <r_psi_Atom@plt>
  cltq
  mov    %rax,-0x48(%rbp)
  mov    -0x108(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <r_psi_prime_Atom@plt>
  cltq
  mov    %rax,-0x40(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x100(%rbp),%xmm1
  movsd  D59(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rdx
  mov    -0x10c(%rbp),%eax
  mov    -0x48(%rbp),%rcx
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %eax,%edi
  mov    $0x1,%eax
  call   <Norm_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D59(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x104(%rbp)
  jmp    L301
L187:
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x104(%rbp)
L301:
  mov    -0x104(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L187
  jmp    L17
L359:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%edx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x120(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  mov    %edx,%esi
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <state_Atom@plt>
  mov    %eax,-0x108(%rbp)
L17:
  mov    -0x108(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <r_psi_Atom@plt>
  cltq
  mov    %rax,-0x48(%rbp)
  mov    -0x108(%rbp),%eax
  mov    %eax,%edi
  mov    $0x0,%eax
  call   <r_psi_prime_Atom@plt>
  cltq
  mov    %rax,-0x40(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x140(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xb0(%rbp),%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm7
  divsd  -0xa8(%rbp),%xmm7
  movq   %xmm7,%rax
  movq   %rax,%xmm0
  call   <rint@plt>
  cvttsd2si %xmm0,%eax
  mov    %eax,-0xf4(%rbp)
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x30(%rbp)
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  pxor   %xmm0,%xmm0
  comisd %xmm1,%xmm0
  jbe    L122
  movsd  D50(%rip),%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x104(%rbp)
  jmp    L165
L369:
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x104(%rbp)
L165:
  mov    -0x104(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L369
L122:
  movsd  -0xf0(%rbp),%xmm0
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdi
  mov    -0x68(%rbp),%r9
  mov    -0x40(%rbp),%r8
  mov    -0x48(%rbp),%rcx
  mov    -0xb8(%rbp),%rdx
  mov    -0xf4(%rbp),%esi
  mov    -0x100(%rbp),%eax
  push   -0x58(%rbp)
  push   -0x60(%rbp)
  movapd %xmm0,%xmm1
  movq   %rdi,%xmm0
  mov    %eax,%edi
  mov    $0x2,%eax
  call   <init_xpansion@plt>
  add    $0x10,%rsp
  mov    $0x0,%eax
  call   <psi_xpansion@plt>
  mov    $0x0,%eax
  call   <dpsi_xpansion@plt>
  mov    $0x0,%eax
  call   <psp_xpansion@plt>
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L271
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x100(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x128(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  lea    0x1(%rdx),%edi
  mov    -0x60(%rbp),%r8
  lea    -0xf0(%rbp),%rsi
  lea    -0x10c(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  sub    $0x8,%rsp
  push   -0x58(%rbp)
  mov    %r8,%r9
  mov    %rsi,%r8
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <R_Schrodinger@plt>
  add    $0x10,%rsp
  jmp    L267
L271:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x100(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x128(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  lea    0x1(%rdx),%edi
  mov    -0x60(%rbp),%r9
  lea    -0xf0(%rbp),%r8
  mov    -0x30(%rbp),%rsi
  mov    -0xf4(%rbp),%ecx
  mov    -0x68(%rbp),%rdx
  sub    $0x8,%rsp
  push   -0x58(%rbp)
  movq   %rsi,%xmm0
  mov    %eax,%esi
  mov    $0x1,%eax
  call   <R_Schrodinger_Fixed_Logderiv@plt>
  add    $0x10,%rsp
  mov    -0xf0(%rbp),%rcx
  mov    -0xf8(%rbp),%eax
  lea    -0x1(%rax),%esi
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x100(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rdi
  mov    -0x128(%rbp),%rdx
  add    %rdi,%rdx
  mov    (%rdx),%edx
  lea    0x1(%rdx),%edi
  mov    -0x58(%rbp),%r9
  mov    -0x60(%rbp),%r8
  mov    -0x68(%rbp),%rdx
  movq   %rcx,%xmm0
  mov    %esi,%ecx
  mov    %eax,%esi
  mov    $0x1,%eax
  call   <R_Schrodinger_Fixed_E@plt>
  movsd  D102(%rip),%xmm0
  movsd  %xmm0,-0x50(%rbp)
  mov    -0xb0(%rbp),%rax
  movsd  (%rax),%xmm1
  movsd  -0x50(%rbp),%xmm0
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movq   %rax,%xmm0
  call   <log@plt>
  movq   %xmm0,%rax
  movq   %rax,%xmm5
  divsd  -0xa8(%rbp),%xmm5
  movq   %xmm5,%rax
  movq   %rax,%xmm0
  call   <rint@plt>
  cvttsd2si %xmm0,%eax
  mov    %eax,-0x10c(%rbp)
  pxor   %xmm1,%xmm1
  cvtsi2sdl -0x100(%rbp),%xmm1
  movsd  D59(%rip),%xmm0
  addsd  %xmm0,%xmm1
  movq   %xmm1,%rdx
  mov    -0x10c(%rbp),%eax
  mov    -0x60(%rbp),%rcx
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %eax,%edi
  mov    $0x1,%eax
  call   <Norm_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  mov    -0x38(%rbp),%rax
  movq   %rax,%xmm0
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  movsd  D59(%rip),%xmm0
  divsd  %xmm1,%xmm0
  movsd  %xmm0,-0x38(%rbp)
  movl   $0x0,-0x104(%rbp)
  jmp    L351
L292:
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  mulsd  -0x38(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0x104(%rbp)
L351:
  mov    -0x104(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L292
L267:
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x48(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movq   D175(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x28(%rbp)
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x40(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x58(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movq   D175(%rip),%xmm1
  andpd  %xmm1,%xmm0
  movsd  %xmm0,-0x20(%rbp)
  mov    $0x0,%eax
  call   <debug_print@plt>
  test   %eax,%eax
  je     L71
  movsd  -0xf0(%rbp),%xmm2
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xf4(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x140(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x128(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  movsd  -0x20(%rbp),%xmm4
  movsd  -0x28(%rbp),%xmm3
  movapd %xmm4,%xmm5
  movapd %xmm3,%xmm4
  movapd %xmm2,%xmm3
  movapd %xmm1,%xmm2
  movapd %xmm0,%xmm1
  movq   %rdx,%xmm0
  mov    %eax,%esi
  lea    D80(%rip),%rax
  mov    %rax,%rdi
  mov    $0x6,%eax
  call   <printf@plt>
L71:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  mov    $0x0,%eax
  call   <psi_xpansion@plt>
  mov    $0x0,%eax
  call   <dpsi_xpansion@plt>
  mov    $0x0,%eax
  call   <psp_xpansion@plt>
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  pxor   %xmm1,%xmm1
  comisd %xmm1,%xmm0
  jbe    L105
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  -0xf0(%rbp),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  -0xc0(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc0(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  movsd  -0xc8(%rbp),%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xc8(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L254
L274:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x138(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm2
  movsd  %xmm2,-0x1c0(%rbp)
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x60(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0xb0(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movq   %xmm0,%rax
  movsd  D135(%rip),%xmm0
  movapd %xmm0,%xmm1
  movq   %rax,%xmm0
  call   <pow@plt>
  movsd  -0x1c0(%rbp),%xmm1
  mulsd  %xmm0,%xmm1
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L254:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L274
L105:
  addl   $0x1,-0x100(%rbp)
L244:
  mov    -0x100(%rbp),%eax
  cmp    -0x114(%rbp),%eax
  jl     L140
  mov    $0x0,%eax
  call   <debug_print@plt>
  test   %eax,%eax
  je     L175
  lea    D77(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
  lea    D4(%rip),%rax
  mov    %rax,%rdi
  call   <puts@plt>
L175:
  movl   $0x0,-0x104(%rbp)
  movl   $0x0,-0x100(%rbp)
  jmp    L93
L58:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x68(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x130(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  movsd  D3(%rip),%xmm0
  addsd  %xmm1,%xmm0
  movsd  %xmm0,-0xf0(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L341
L136:
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1b0(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x60(%rbp)
  mov    -0x104(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x1b8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rax
  mov    %rax,-0x58(%rbp)
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  mov    -0x100(%rbp),%edx
  movslq %edx,%rdx
  lea    0x0(,%rdx,4),%rcx
  mov    -0x128(%rbp),%rdx
  add    %rcx,%rdx
  mov    (%rdx),%edx
  lea    0x2(%rdx),%ecx
  mov    -0xfc(%rbp),%edx
  lea    (%rcx,%rdx,1),%edi
  mov    -0x60(%rbp),%r8
  lea    -0xf0(%rbp),%rsi
  lea    -0x10c(%rbp),%rcx
  mov    -0x68(%rbp),%rdx
  sub    $0x8,%rsp
  push   -0x58(%rbp)
  mov    %r8,%r9
  mov    %rsi,%r8
  mov    %eax,%esi
  mov    $0x0,%eax
  call   <R_Schrodinger@plt>
  add    $0x10,%rsp
  addl   $0x1,-0x104(%rbp)
  mov    $0x0,%eax
  call   <debug_print@plt>
  test   %eax,%eax
  je     L104
  mov    -0xf0(%rbp),%rdx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rcx
  mov    -0x128(%rbp),%rax
  add    %rcx,%rax
  mov    (%rax),%eax
  lea    0x2(%rax),%ecx
  mov    -0xfc(%rbp),%eax
  add    %eax,%ecx
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rsi
  mov    -0x128(%rbp),%rax
  add    %rsi,%rax
  mov    (%rax),%eax
  movq   %rdx,%xmm0
  mov    %ecx,%edx
  mov    %eax,%esi
  lea    D87(%rip),%rax
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <printf@plt>
L104:
  addl   $0x1,-0xfc(%rbp)
L341:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x128(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  cltq
  lea    0x0(,%rax,4),%rdx
  mov    -0x1a8(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%eax
  sub    $0x1,%eax
  cmp    %eax,-0xfc(%rbp)
  jl     L136
  addl   $0x1,-0x100(%rbp)
L93:
  mov    -0x100(%rbp),%eax
  cmp    -0x114(%rbp),%eax
  jl     L58
  mov    $0x0,%eax
  call   <alloc_LogGrid@plt>
  cltq
  mov    %rax,-0x98(%rbp)
  mov    $0x0,%eax
  call   <alloc_LogGrid@plt>
  cltq
  mov    %rax,-0x90(%rbp)
  mov    $0x0,%eax
  call   <alloc_LogGrid@plt>
  cltq
  mov    %rax,-0x88(%rbp)
  mov    -0x98(%rbp),%rcx
  mov    -0xc8(%rbp),%rdx
  mov    -0x158(%rbp),%rax
  mov    %rcx,%rsi
  movq   %rdx,%xmm0
  mov    %rax,%rdi
  mov    $0x1,%eax
  call   <R_Hartree_DFT@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0x80(%rbp)
  movsd  -0x80(%rbp),%xmm1
  movsd  D177(%rip),%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,-0x78(%rbp)
  mov    $0x0,%eax
  call   <alloc_LogGrid@plt>
  cltq
  mov    %rax,-0x70(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L87
L295:
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x160(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L87:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L295
  lea    -0xe8(%rbp),%rcx
  lea    -0xd8(%rbp),%rdx
  mov    -0x90(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <R_Exchange_DFT@plt>
  lea    -0xe0(%rbp),%rcx
  lea    -0xd0(%rbp),%rdx
  mov    -0x88(%rbp),%rsi
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <R_Correlation_DFT@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <R_Screening_Cut@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <R_Screening_Cut@plt>
  movl   $0x0,-0xfc(%rbp)
  jmp    L219
L300:
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L219:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L300
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Integrate_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0xe8(%rbp)
  movl   $0x0,-0xfc(%rbp)
  jmp    L281
L152:
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x158(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x70(%rbp),%rax
  add    %rdx,%rax
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L281:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L152
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <Integrate_LogGrid@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,-0xe0(%rbp)
  movsd  -0xc0(%rbp),%xmm0
  movapd %xmm0,%xmm1
  addsd  -0x78(%rbp),%xmm1
  movsd  -0xd8(%rbp),%xmm0
  addsd  %xmm0,%xmm1
  movsd  -0xd0(%rbp),%xmm0
  addsd  %xmm1,%xmm0
  subsd  -0x80(%rbp),%xmm0
  movsd  -0xe8(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  movsd  -0xe0(%rbp),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0x170(%rbp),%rax
  movsd  %xmm0,(%rax)
  mov    -0x178(%rbp),%rax
  movsd  -0x78(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  mov    -0x180(%rbp),%rax
  movsd  -0x80(%rbp),%xmm0
  movsd  %xmm0,(%rax)
  movsd  -0xd8(%rbp),%xmm0
  mov    -0x188(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0xe8(%rbp),%xmm0
  mov    -0x190(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0xd0(%rbp),%xmm0
  mov    -0x198(%rbp),%rax
  movsd  %xmm0,(%rax)
  movsd  -0xe0(%rbp),%xmm0
  mov    -0x1a0(%rbp),%rax
  movsd  %xmm0,(%rax)
  movl   $0x0,-0x100(%rbp)
  jmp    L199
L147:
  movl   $0x0,-0xfc(%rbp)
  jmp    L184
L119:
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x98(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x90(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  subsd  %xmm1,%xmm0
  mov    -0xfc(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x88(%rbp),%rax
  add    %rdx,%rax
  movsd  (%rax),%xmm1
  mov    -0x100(%rbp),%eax
  cltq
  lea    0x0(,%rax,8),%rdx
  mov    -0x168(%rbp),%rax
  add    %rdx,%rax
  mov    (%rax),%rdx
  mov    -0xfc(%rbp),%eax
  cltq
  shl    $0x3,%rax
  add    %rdx,%rax
  subsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  addl   $0x1,-0xfc(%rbp)
L184:
  mov    -0xfc(%rbp),%eax
  cmp    -0xf8(%rbp),%eax
  jl     L119
  addl   $0x1,-0x100(%rbp)
L199:
  mov    -0x100(%rbp),%eax
  cmp    -0x114(%rbp),%eax
  jl     L147
  mov    -0x98(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dealloc_LogGrid@plt>
  mov    -0x90(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dealloc_LogGrid@plt>
  mov    -0x88(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dealloc_LogGrid@plt>
  mov    -0x70(%rbp),%rax
  mov    %rax,%rdi
  mov    $0x0,%eax
  call   <dealloc_LogGrid@plt>
  nop
  mov    -0x18(%rbp),%rax
  sub    %fs:0x28,%rax
  je     L204
  call   <__stack_chk_fail@plt>
L204:
  mov    -0x8(%rbp),%rbx
  leave
  ret
```

tool_calls: name: parse_data
arguments: data_label: D169
data_type: string
name: parse_data
arguments: data_label: D78
data_type: string
name: parse_data
arguments: data_label: D102
data_type: f64
name: parse_data
arguments: data_label: D59
data_type: f64
name: parse_data
arguments: data_label: D50
data_type: f32[2]
name: parse_data
arguments: data_label: D175
data_type: qword
name: parse_data
arguments: data_label: D80
data_type: string
name: parse_data
arguments: data_label: D135
data_type: f64
name: parse_data
arguments: data_label: D77
data_type: string
name: parse_data
arguments: data_label: D4
data_type: string
name: parse_data
arguments: data_label: D3
data_type: f64
name: parse_data
arguments: data_label: D87
data_type: string
name: parse_data
arguments: data_label: D177
data_type: f64

tool: D169: 

Troullier pseudopotential check


tool: D78: l	rcore     rmatch    E in       E psp      norm test slope test

tool: D102: 20

tool: D59: 1

tool: {"D50": [0.0,-1.875]}

tool: D175: 9223372036854775807

tool: D80: %d	%lf  %lf  %lf  %lf  %lf  %lf


tool: D135: 2

tool: D77: 

Troullier pseudopotential extra states


tool: D4: l	n	E psp

tool: D3: 0.1

tool: D87: %d	%d	%lf


tool: D177: 0.5

assistant: ```c
void solve_Troullier(num_psp, n_psp, l_psp, e_psp, fill_psp, rcut_psp, r_psi_psp, r_psi_prime_psp, rho_psp, rho_semicore, V_psp, eall_psp, eh_psp, ph_psp, ex_psp, px_psp, ec_psp, pc_psp, kb_expansion, r_psi_extra, r_psi_prime_extra) int num_psp;
int n_psp[];
int l_psp[];
double e_psp[];
double fill_psp[];
double rcut_psp[];
double **r_psi_psp;
double **r_psi_prime_psp;
double *rho_psp;
double *rho_semicore;
double **V_psp;
double *eall_psp;
double *eh_psp;
double *ph_psp;
double *ex_psp;
double *px_psp;
double *ec_psp;
double *pc_psp;
int kb_expansion[];
double **r_psi_extra;
double **r_psi_prime_extra;
{
  int istate, i, l, k, match, mch, Ngrid;
  double al, amesh, rmax, Zion;
  double gamma, gpr, nu0;
  double ldpsi_match;
  double el, eeig;
  double ph, px, pc, eh, ex, ec;
  double *ul, *ul_prime;
  double *wl, *wl_prime;
  double *r, *Vh, *Vx, *Vc, *rho_total, *Vall, *Vl;
  Vall = Vall_Atom();
  r = r_LogGrid();
  Ngrid = N_LogGrid();
  al = log_amesh_LogGrid();
  amesh = amesh_LogGrid();
  eeig = 0.0;
  Zion = 0.0;
  for (k = 0; k < Ngrid; ++k)
    rho_psp[k] = 0.0;
  if (debug_print()) {
    printf("\n\nTroullier pseudopotential check\n\n");
    printf("l\trcore     rmatch    E in       E psp      norm test slope test\n");
  }
  for (l = 0; l < (num_psp); ++l) {
    wl = r_psi_psp[l];
    wl_prime = r_psi_prime_psp[l];
    Vl = V_psp[l];
    if (fill_psp[l] == 0.0) {
      rmax = 20.0;
      solve_Scattering_State_Atom(n_psp[l], l_psp[l], e_psp[l], rmax);
      istate = Nvalence_Atom() + Ncore_Atom();
      mch = rint(log(rmax / r[0]) / al);
      ul = r_psi_Atom(istate);
      ul_prime = r_psi_prime_Atom(istate);
      nu0 = Norm_LogGrid(mch, (l + 1.0), ul);
      nu0 = 1.0 / sqrt(nu0);
      for (i = 0; i < Ngrid; ++i) {
        ul[i] = ul[i] * nu0;
        ul_prime[i] = ul_prime[i] * nu0;
      }
    } else
      istate = state_Atom(n_psp[l], l_psp[l]);
    ul = r_psi_Atom(istate);
    ul_prime = r_psi_prime_Atom(istate);
    el = e_psp[l];
    match = rint(log(rcut_psp[l] / r[0]) / al);
    ldpsi_match = ul_prime[match] / ul[match];
    if (ul[match] < 0.0) {
      nu0 = -1.0;
      for (i = 0; i < Ngrid; ++i) {
        ul[i] = ul[i] * nu0;
        ul_prime[i] = ul_prime[i] * nu0;
      }
    }
    init_xpansion(l, match, fill_psp[l], el, Vall, ul, ul_prime, Vl, wl, wl_prime);
    psi_xpansion();
    dpsi_xpansion();
    psp_xpansion();
    if (fill_psp[l] > 0.0) {
      R_Schrodinger(l_psp[l] + 1, l_psp[l], Vl, &mch, &el, wl, wl_prime);
    } else {
      R_Schrodinger_Fixed_Logderiv(l_psp[l] + 1, l_psp[l], Vl, match, ldpsi_match, &el, wl, wl_prime);
      R_Schrodinger_Fixed_E(l_psp[l] + 1, l_psp[l], Vl, Ngrid - 1, el, wl, wl_prime);
      rmax = 20.0;
      mch = rint(log(rmax / r[0]) / al);
      nu0 = Norm_LogGrid(mch, (l + 1.0), wl);
      nu0 = 1.0 / sqrt(nu0);
      for (i = 0; i < Ngrid; ++i) {
        wl[i] = wl[i] * nu0;
        wl_prime[i] = wl_prime[i] * nu0;
      }
    }
    gamma = fabs(ul[match] / wl[match]);
    gpr = fabs(ul_prime[match] / wl_prime[match]);
    if (debug_print()) {
      printf("%d\t%lf  %lf  %lf  %lf  %lf  %lf\n", l_psp[l], rcut_psp[l], r[match], e_psp[l], el, gamma, gpr);
    }
    el = e_psp[l];
    psi_xpansion();
    dpsi_xpansion();
    psp_xpansion();
    if (fill_psp[l] > 0.0) {
      eeig += fill_psp[l] * el;
      Zion += fill_psp[l];
      for (k = 0; k < Ngrid; ++k)
        rho_psp[k] += fill_psp[l] * pow(wl[k] / r[k], 2.0);
    }
  }
  if (debug_print()) {
    printf("\n\nTroullier pseudopotential extra states\n\n");
    printf("l\tn\tE psp\n");
  }
  i = 0;
  for (l = 0; l < num_psp; ++l) {
    Vl = V_psp[l];
    el = e_psp[l] + 0.1;
    for (k = 0; k < (kb_expansion[l_psp[l]] - 1); ++k) {
      wl = r_psi_extra[i];
      wl_prime = r_psi_prime_extra[i];
      R_Schrodinger(l_psp[l] + 2 + k, l_psp[l], Vl, &mch, &el, wl, wl_prime);
      ++i;
      if (debug_print())
        printf("%d\t%d\t%lf\n", l_psp[l], l_psp[l] + 2 + k, el);
    }
  }
  Vh = alloc_LogGrid();
  Vx = alloc_LogGrid();
  Vc = alloc_LogGrid();
  ph = R_Hartree_DFT(rho_psp, Zion, Vh);
  eh = 0.5 * ph;
  rho_total = alloc_LogGrid();
  for (k = 0; k < Ngrid; ++k)
    rho_total[k] = rho_psp[k] + rho_semicore[k];
  R_Exchange_DFT(rho_total, Vx, &ex, &px);
  R_Correlation_DFT(rho_total, Vc, &ec, &pc);
  R_Screening_Cut(Vx);
  R_Screening_Cut(Vc);
  for (k = 0; k < Ngrid; ++k)
    rho_total[k] = (rho_psp[k]) * Vx[k];
  px = Integrate_LogGrid(rho_total);
  for (k = 0; k < Ngrid; ++k)
    rho_total[k] = (rho_psp[k]) * Vc[k];
  pc = Integrate_LogGrid(rho_total);
  *eall_psp = eeig + eh + ex + ec - ph - px - pc;
  *eh_psp = eh;
  *ph_psp = ph;
  *ex_psp = ex;
  *px_psp = px;
  *ec_psp = ec;
  *pc_psp = pc;
  for (l = 0; l < num_psp; ++l)
    for (k = 0; k < Ngrid; ++k)
      V_psp[l][k] = V_psp[l][k] - Vh[k] - Vx[k] - Vc[k];
  dealloc_LogGrid(Vh);
  dealloc_LogGrid(Vx);
  dealloc_LogGrid(Vc);
  dealloc_LogGrid(rho_total);
}
```