user: Translate the below assembly code into C programming language:

```asm
<R_Dirac>:
  endbr64
  lea    0x1(%rsi),%eax
  push   %r15
  pxor   %xmm4,%xmm4
  movapd %xmm0,%xmm1
  imul   %esi,%eax
  push   %r14
  push   %r13
  push   %r12
  push   %rbp
  cvtsi2sd %eax,%xmm4
  push   %rbx
  sub    $0x188,%rsp
  movsd  (%r9),%xmm6
  mov    %edi,0xe8(%rsp)
  mov    0x1c0(%rsp),%rbx
  mov    %esi,0xd4(%rsp)
  mov    0x1c8(%rsp),%r14
  mov    %rcx,0x90(%rsp)
  mov    %r8,0x130(%rsp)
  mov    %r9,0x138(%rsp)
  movsd  %xmm6,0x28(%rsp)
  movsd  %xmm4,0x40(%rsp)
  test   %esi,%esi
  je     L567
  test   %edx,%edx
  jle    L783
  not    %esi
  pxor   %xmm0,%xmm0
  cvtsi2sd %esi,%xmm0
  movsd  %xmm0,0x50(%rsp)
  mulsd  %xmm0,%xmm0
  jmp    L103
L567:
  movsd  D278(%rip),%xmm6
  movsd  D392(%rip),%xmm0
  movsd  %xmm6,0x50(%rsp)
L103:
  movsd  D204(%rip),%xmm2
  pxor   %xmm3,%xmm3
  mulsd  %xmm1,%xmm2
  mulsd  %xmm2,%xmm1
  subsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm3
  ja     L591
  sqrtsd %xmm0,%xmm0
  movsd  %xmm0,0xb0(%rsp)
L793:
  xor    %eax,%eax
  call   <N_LogGrid@plt>
  mov    %eax,0x9c(%rsp)
  mov    %eax,%r15d
  xor    %eax,%eax
  call   <log_amesh_LogGrid@plt>
  xor    %eax,%eax
  movapd %xmm0,%xmm4
  movsd  %xmm0,0x8(%rsp)
  mulsd  %xmm0,%xmm4
  movsd  %xmm4,0x48(%rsp)
  call   <r_LogGrid@plt>
  mov    %rax,%r12
  mov    %rax,0xa8(%rsp)
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  mov    %rax,%r13
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  mov    %rax,%rbp
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  mov    %rax,0x10(%rsp)
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  mov    %rax,0x18(%rsp)
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  movslq %r15d,%rdx
  movsd  D241(%rip),%xmm2
  mov    %r12,%rcx
  mov    %rax,0xa0(%rsp)
  lea    0x0(,%rdx,8),%rax
  mulsd  0x40(%rsp),%xmm2
  movsd  -0x8(%r12,%rax,1),%xmm0
  mov    0x90(%rsp),%rsi
  mov    %rax,0xd8(%rsp)
  mulsd  %xmm0,%xmm0
  movapd %xmm2,%xmm1
  divsd  %xmm0,%xmm1
  addsd  -0x8(%rsi,%rax,1),%xmm1
  movsd  %xmm1,0xb8(%rsp)
  test   %edx,%edx
  jle    L384
  xor    %eax,%eax
  pxor   %xmm3,%xmm3
  nopw   0x0(%rax,%rax,1)
L738:
  movsd  (%rcx,%rax,8),%xmm0
  movapd %xmm2,%xmm1
  mulsd  %xmm0,%xmm0
  divsd  %xmm0,%xmm1
  addsd  (%rsi,%rax,8),%xmm1
  add    $0x1,%rax
  minsd  %xmm1,%xmm3
  cmp    %rdx,%rax
  jne    L738
  movsd  %xmm3,0xc8(%rsp)
L401:
  movsd  0xb8(%rsp),%xmm6
  movsd  0x28(%rsp),%xmm5
  comisd %xmm6,%xmm5
  jbe    L667
  mulsd  D123(%rip),%xmm6
  movsd  %xmm6,0x28(%rsp)
L667:
  movsd  0xc8(%rsp),%xmm3
  comisd 0x28(%rsp),%xmm3
  jbe    L424
  mulsd  D114(%rip),%xmm3
  movsd  %xmm3,0x28(%rsp)
L424:
  movsd  0xb8(%rsp),%xmm4
  movsd  0x28(%rsp),%xmm3
  comisd %xmm4,%xmm3
  jbe    L641
  movsd  0xc8(%rsp),%xmm0
  addsd  %xmm4,%xmm0
  mulsd  D241(%rip),%xmm0
  movsd  %xmm0,0x28(%rsp)
L641:
  lea    0x1f(%rbp),%rax
  mov    %rax,%rdx
  sub    %r14,%rdx
  cmp    $0x3e,%rdx
  seta   %dl
  sub    %rbx,%rax
  cmp    $0x3e,%rax
  seta   %al
  test   %al,%dl
  je     L123
  lea    0x1f(%rbx),%rax
  sub    %r14,%rax
  cmp    $0x3e,%rax
  jbe    L123
  pxor   %xmm0,%xmm0
  movups %xmm0,(%rbx)
  movups %xmm0,0x10(%rbx)
  movups %xmm0,(%r14)
  movups %xmm0,0x10(%r14)
  movups %xmm0,0x0(%rbp)
  movups %xmm0,0x10(%rbp)
L183:
  mov    0x9c(%rsp),%ecx
  mov    0x90(%rsp),%r15
  movl   $0x64,0x110(%rsp)
  mov    0xe8(%rsp),%eax
  sub    0xd4(%rsp),%eax
  sub    $0x1,%eax
  lea    0x8(%r15),%r11
  cmp    $0x1,%ecx
  mov    0x10(%rsp),%r8
  mov    0xa8(%rsp),%r9
  setne  %r10b
  cmp    %r11,%r13
  mov    %eax,0x10c(%rsp)
  setne  %al
  lea    -0x1(%rcx),%r12d
  lea    0xf(%r8),%rsi
  movsd  0x48(%rsp),%xmm4
  lea    0x8(%r9),%rdi
  and    %r10d,%eax
  xorpd  D181(%rip),%xmm4
  mov    %r12d,0x114(%rsp)
  cmp    %rdi,%r13
  setne  %dl
  movsd  %xmm4,0x60(%rsp)
  unpcklpd %xmm4,%xmm4
  and    %edx,%eax
  movaps %xmm4,0xf0(%rsp)
  mov    %al,0x10b(%rsp)
  mov    %ecx,%eax
  and    $0xfffffffe,%ecx
  shr    %eax
  movslq %ecx,%rdx
  mov    %ecx,0xd0(%rsp)
  mov    0x18(%rsp),%rcx
  sub    $0x1,%eax
  shl    $0x3,%rdx
  add    $0x1,%rax
  shl    $0x4,%rax
  cmp    %r11,%rcx
  mov    %rax,0xc0(%rsp)
  lea    (%r9,%rdx,1),%rax
  mov    %rax,0x30(%rsp)
  lea    (%r15,%rdx,1),%rax
  mov    %rax,0x38(%rsp)
  lea    0x0(%r13,%rdx,1),%rax
  mov    %rax,0x80(%rsp)
  setne  %al
  and    %r10d,%eax
  cmp    %rdi,%rcx
  mov    0xa0(%rsp),%r10
  setne  %dil
  and    %edi,%eax
  lea    0x8(%r8),%rdi
  cmp    %rdi,%rcx
  setne  %dil
  and    %edi,%eax
  lea    0x8(%r10),%rdi
  cmp    %rdi,%rcx
  setne  %dil
  and    %edi,%eax
  lea    0xf(%r9),%rdi
  sub    %r8,%rdi
  cmp    $0x1e,%rdi
  seta   %dil
  and    %edi,%eax
  mov    %rsi,%rdi
  sub    %r10,%rdi
  cmp    $0x1e,%rdi
  seta   %dil
  sub    %r15,%rsi
  mov    %r14,%r15
  and    %edi,%eax
  cmp    $0x1e,%rsi
  seta   %sil
  and    %esi,%eax
  mov    %al,0x10a(%rsp)
  lea    (%r10,%rdx,1),%rax
  mov    %rax,0x68(%rsp)
  lea    (%r8,%rdx,1),%rax
  add    %rcx,%rdx
  mov    %rax,0x70(%rsp)
  movslq %r12d,%rax
  mov    %rdx,0x78(%rsp)
  mov    %rax,0xe0(%rsp)
L737:
  mov    0x9c(%rsp),%edx
  test   %edx,%edx
  jle    L329
  cmpb   $0x0,0x10b(%rsp)
  je     L600
  movsd  0x28(%rsp),%xmm4
  movsd  0x40(%rsp),%xmm3
  xor    %eax,%eax
  movsd  0x48(%rsp),%xmm2
  mov    0xa8(%rsp),%rdx
  mov    0xc0(%rsp),%rcx
  mov    0x90(%rsp),%rsi
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm3,%xmm3
  unpcklpd %xmm2,%xmm2
  cs nopw 0x0(%rax,%rax,1)
L435:
  movupd (%rsi,%rax,1),%xmm0
  movupd (%rdx,%rax,1),%xmm1
  subpd  %xmm4,%xmm0
  mulpd  %xmm1,%xmm1
  addpd  %xmm0,%xmm0
  mulpd  %xmm1,%xmm0
  addpd  %xmm3,%xmm0
  mulpd  %xmm2,%xmm0
  movups %xmm0,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%rcx
  jne    L435
  mov    0xd0(%rsp),%ecx
  cmp    %ecx,0x9c(%rsp)
  je     L562
  mov    0x30(%rsp),%rax
  movsd  (%rax),%xmm1
  mov    0x38(%rsp),%rax
  movsd  (%rax),%xmm0
  subsd  0x28(%rsp),%xmm0
  mulsd  %xmm1,%xmm1
  mov    0x80(%rsp),%rax
  addsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x40(%rsp),%xmm0
  mulsd  0x48(%rsp),%xmm0
  movsd  %xmm0,(%rax)
L562:
  mov    0xa0(%rsp),%rsi
  mov    0x90(%rsp),%rdi
  call   <Derivative_LogGrid@plt>
  cmpb   $0x0,0x10a(%rsp)
  movsd  0x8(%rsp),%xmm7
  xorpd  D181(%rip),%xmm7
  je     L238
  movsd  0x28(%rsp),%xmm1
  movsd  0x50(%rsp),%xmm6
  movapd %xmm7,%xmm5
  xor    %eax,%eax
  movapd D392(%rip),%xmm3
  movapd D204(%rip),%xmm2
  unpcklpd %xmm5,%xmm5
  mov    0x10(%rsp),%rdi
  mov    0x18(%rsp),%r8
  unpcklpd %xmm1,%xmm1
  unpcklpd %xmm6,%xmm6
  movapd D241(%rip),%xmm4
  mov    0xa8(%rsp),%rdx
  mov    0xa0(%rsp),%rcx
  mov    0xc0(%rsp),%r9
  mov    0x90(%rsp),%rsi
  movapd 0xf0(%rsp),%xmm8
  nopl   0x0(%rax,%rax,1)
L280:
  movupd (%rsi,%rax,1),%xmm12
  movapd %xmm1,%xmm10
  movupd (%rcx,%rax,1),%xmm0
  mulpd  D182(%rip),%xmm0
  movupd (%rdx,%rax,1),%xmm9
  subpd  %xmm12,%xmm10
  movupd (%rsi,%rax,1),%xmm11
  mulpd  D182(%rip),%xmm10
  subpd  %xmm1,%xmm11
  mulpd  %xmm6,%xmm0
  addpd  %xmm3,%xmm10
  mulpd  %xmm9,%xmm10
  mulpd  %xmm9,%xmm9
  divpd  %xmm10,%xmm0
  movapd %xmm11,%xmm10
  mulpd  %xmm2,%xmm10
  mulpd  %xmm8,%xmm9
  mulpd  %xmm11,%xmm10
  addpd  %xmm10,%xmm0
  mulpd  %xmm9,%xmm0
  movapd %xmm1,%xmm9
  movups %xmm0,(%rdi,%rax,1)
  movupd (%rdx,%rax,1),%xmm0
  movupd (%rsi,%rax,1),%xmm14
  movupd (%rcx,%rax,1),%xmm13
  mulpd  %xmm5,%xmm0
  subpd  %xmm14,%xmm9
  mulpd  D182(%rip),%xmm9
  mulpd  %xmm4,%xmm0
  addpd  %xmm3,%xmm9
  mulpd  %xmm2,%xmm0
  mulpd  %xmm13,%xmm0
  divpd  %xmm9,%xmm0
  movups %xmm0,(%r8,%rax,1)
  add    $0x10,%rax
  cmp    %rax,%r9
  jne    L280
  mov    0xd0(%rsp),%ecx
  cmp    %ecx,0x9c(%rsp)
  je     L623
  mov    0x38(%rsp),%rcx
  movsd  0x28(%rsp),%xmm6
  movsd  D182(%rip),%xmm3
  mov    0x68(%rsp),%rdi
  movsd  (%rcx),%xmm4
  movapd %xmm6,%xmm2
  mov    0x30(%rsp),%rax
  movsd  (%rdi),%xmm0
  mov    0x70(%rsp),%rsi
  subsd  %xmm4,%xmm2
  movapd %xmm4,%xmm5
  movsd  D392(%rip),%xmm4
  movsd  (%rax),%xmm1
  mulsd  %xmm3,%xmm0
  subsd  %xmm6,%xmm5
  mulsd  0x50(%rsp),%xmm0
  mulsd  %xmm3,%xmm2
  addsd  %xmm4,%xmm2
  mulsd  %xmm1,%xmm2
  mulsd  %xmm1,%xmm1
  mulsd  0x60(%rsp),%xmm1
  divsd  %xmm2,%xmm0
  movsd  D204(%rip),%xmm2
  mulsd  %xmm5,%xmm2
  mulsd  %xmm5,%xmm2
  addsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm0
  movsd  %xmm0,(%rsi)
  mulsd  (%rax),%xmm7
  subsd  (%rcx),%xmm6
  movsd  D241(%rip),%xmm0
  mov    0x78(%rsp),%rax
  movapd %xmm6,%xmm1
  mulsd  %xmm3,%xmm1
  mulsd  %xmm7,%xmm0
  mulsd  D204(%rip),%xmm0
  mulsd  (%rdi),%xmm0
  addsd  %xmm4,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
L623:
  mov    0xd8(%rsp),%rax
  mov    0xe0(%rsp),%r14
  movsd  -0x8(%r13,%rax,1),%xmm1
  jmp    L746
  xchg   %ax,%ax
L345:
  sub    $0x1,%r14
  cmp    $0x1,%r14d
  jle    L400
L746:
  movapd %xmm1,%xmm0
  movsd  -0x8(%r13,%r14,8),%xmm1
  pxor   %xmm7,%xmm7
  lea    0x0(,%r14,8),%rax
  mulsd  %xmm1,%xmm0
  comisd %xmm7,%xmm0
  ja     L345
  mov    0x10c(%rsp),%edx
  mov    %rax,0x100(%rsp)
  mov    %r14d,0x150(%rsp)
  mov    %r14d,0xec(%rsp)
  test   %edx,%edx
  jle    L588
  movsd  D392(%rip),%xmm7
  movq   D181(%rip),%xmm1
  xor    %eax,%eax
  movsd  %xmm7,0x148(%rsp)
  movapd %xmm7,%xmm2
  nopl   (%rax)
L167:
  add    $0x1,%eax
  xorpd  %xmm1,%xmm2
  cmp    %eax,%edx
  jne    L167
L690:
  movsd  0xb0(%rsp),%xmm4
  xor    %r12d,%r12d
  mov    %rbx,%rax
  mov    %r14,0x88(%rsp)
  mulsd  0x8(%rsp),%xmm4
  mov    %r12,%r14
  mov    %r13,%rbx
  mov    0xa8(%rsp),%r12
  movsd  %xmm2,0x58(%rsp)
  mov    %rax,%r13
  movsd  %xmm4,0x20(%rsp)
L742:
  movsd  0xb0(%rsp),%xmm1
  movsd  (%r12,%r14,1),%xmm0
  call   <pow@plt>
  mulsd  0x58(%rsp),%xmm0
  mov    0x10(%rsp),%rax
  movsd  0x8(%rsp),%xmm2
  movsd  %xmm0,0x0(%r13,%r14,1)
  mulsd  0x20(%rsp),%xmm0
  movsd  %xmm0,(%r15,%r14,1)
  movsd  (%rbx,%r14,1),%xmm1
  addsd  (%rax,%r14,1),%xmm1
  mov    0x18(%rsp),%rax
  mulsd  0x0(%r13,%r14,1),%xmm1
  addsd  (%rax,%r14,1),%xmm2
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%r14,1)
  add    $0x8,%r14
  cmp    $0x20,%r14
  jne    L742
  mov    %r13,%rax
  cmpl   $0x3,0xec(%rsp)
  mov    %rbx,%r13
  mov    0x88(%rsp),%r14
  mov    %rax,%rbx
  jle    L580
  mov    %r14d,%eax
  mov    $0x3,%r12d
  mov    %r15,%r14
  movl   $0x0,0x58(%rsp)
  mov    %rax,0x88(%rsp)
  mov    %r12,%r15
  nopw   0x0(%rax,%rax,1)
L214:
  mov    %r14,%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <Predictor_Out@plt>
  mov    %rbp,%rdx
  mov    %r14,%rsi
  mov    %r15d,%edi
  movsd  %xmm0,0x8(%rbx,%r15,8)
  call   <Predictor_Out@plt>
  mov    %r14,%rax
  movl   $0x6,0x20(%rsp)
  movsd  %xmm0,0x8(%r14,%r15,8)
  movapd %xmm0,%xmm2
  mov    %rbp,%r14
  mov    %rax,%r12
  movsd  0x8(%rbx,%r15,8),%xmm1
  mov    %rbx,%rbp
  mov    %r15d,%ebx
  movapd %xmm1,%xmm0
  jmp    L587
  nopw   0x0(%rax,%rax,1)
L621:
  movsd  0x8(%r12,%r15,8),%xmm2
L587:
  mov    0x10(%rsp),%rax
  mov    %r14,%rdx
  mov    %r12,%rsi
  mov    %ebx,%edi
  movsd  0x8(%r13,%r15,8),%xmm1
  addsd  0x8(%rax,%r15,8),%xmm1
  mov    0x18(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  addsd  0x8(%rax,%r15,8),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x8(%r14,%r15,8)
  call   <Corrector_Out@plt>
  mov    %r12,%rdx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  movsd  %xmm0,0x8(%r12,%r15,8)
  call   <Corrector_Out@plt>
  subl   $0x1,0x20(%rsp)
  movsd  %xmm0,0x8(%rbp,%r15,8)
  jne    L621
  mov    %rbp,%rbx
  movapd %xmm0,%xmm1
  pxor   %xmm4,%xmm4
  mov    %r14,%rbp
  mulsd  (%rbx,%r15,8),%xmm1
  mov    %r12,%r14
  comisd %xmm1,%xmm4
  sbbl   $0xffffffff,0x58(%rsp)
  add    $0x1,%r15
  cmp    %r15,0x88(%rsp)
  jne    L214
  mov    %r12,%r15
L69:
  mov    0x100(%rsp),%rcx
  lea    (%rbx,%rcx,1),%rax
  movsd  (%rax),%xmm4
  mov    %rax,0x118(%rsp)
  lea    (%r15,%rcx,1),%rax
  movsd  (%rax),%xmm6
  mov    %rax,0x120(%rsp)
  movsd  %xmm4,0x128(%rsp)
  mov    0x58(%rsp),%eax
  sub    0xe8(%rsp),%eax
  movsd  %xmm6,0x140(%rsp)
  add    0xd4(%rsp),%eax
  cmp    $0xffffffff,%eax
  jl     L817
  je     L628
  movsd  0xc8(%rsp),%xmm0
  movsd  0x28(%rsp),%xmm5
  movsd  %xmm5,0xb8(%rsp)
  addsd  %xmm5,%xmm0
  mulsd  D241(%rip),%xmm0
  movsd  %xmm0,0x28(%rsp)
L314:
  subl   $0x1,0x110(%rsp)
  jne    L737
  mov    $0x64,%esi
  lea    D223(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
  mov    0x130(%rsp),%rax
  mov    0xec(%rsp),%ecx
  movsd  0x28(%rsp),%xmm7
  mov    %ecx,(%rax)
  mov    0x138(%rsp),%rax
  movsd  %xmm7,(%rax)
  jmp    L447
  cs nopw 0x0(%rax,%rax,1)
L400:
  lea    D281(%rip),%rdi
  call   <puts@plt>
L447:
  mov    %r13,%rdi
  call   <dealloc_LogGrid@plt>
  mov    %rbp,%rdi
  call   <dealloc_LogGrid@plt>
  mov    0x10(%rsp),%rdi
  call   <dealloc_LogGrid@plt>
  mov    0x18(%rsp),%rdi
  call   <dealloc_LogGrid@plt>
  mov    0xa0(%rsp),%rdi
  add    $0x188,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1240 <dealloc_LogGrid@plt>
L783:
  pxor   %xmm0,%xmm0
  cvtsi2sdl 0xd4(%rsp),%xmm0
  movsd  %xmm0,0x50(%rsp)
  mulsd  %xmm0,%xmm0
  jmp    L103
L817:
  movsd  0xb8(%rsp),%xmm0
  movsd  0x28(%rsp),%xmm5
  movsd  %xmm5,0xc8(%rsp)
  addsd  %xmm5,%xmm0
  mulsd  D241(%rip),%xmm0
  movsd  %xmm0,0x28(%rsp)
  jmp    L314
L238:
  mov    0x114(%rsp),%edx
  movsd  D392(%rip),%xmm4
  xor    %eax,%eax
  movsd  D182(%rip),%xmm3
  movsd  0x28(%rsp),%xmm2
  movsd  0x50(%rsp),%xmm5
  mov    0xa8(%rsp),%rcx
  mov    0x10(%rsp),%r8
  mov    0x18(%rsp),%r9
  mov    0xa0(%rsp),%rsi
  mov    0x90(%rsp),%rdi
  movsd  0x60(%rsp),%xmm6
  cs nopw 0x0(%rax,%rax,1)
L571:
  movsd  (%rdi,%rax,8),%xmm10
  movapd %xmm2,%xmm8
  movsd  (%rsi,%rax,8),%xmm0
  mov    %rax,%r10
  movsd  (%rcx,%rax,8),%xmm1
  subsd  %xmm10,%xmm8
  mulsd  %xmm3,%xmm0
  movapd %xmm10,%xmm9
  subsd  %xmm2,%xmm9
  mulsd  %xmm3,%xmm8
  mulsd  %xmm5,%xmm0
  addsd  %xmm4,%xmm8
  mulsd  %xmm1,%xmm8
  mulsd  %xmm1,%xmm1
  divsd  %xmm8,%xmm0
  movsd  D204(%rip),%xmm8
  mulsd  %xmm6,%xmm1
  mulsd  %xmm9,%xmm8
  mulsd  %xmm9,%xmm8
  addsd  %xmm8,%xmm0
  mulsd  %xmm1,%xmm0
  movapd %xmm2,%xmm1
  movsd  %xmm0,(%r8,%rax,8)
  subsd  (%rdi,%rax,8),%xmm1
  movsd  (%rcx,%rax,8),%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  %xmm3,%xmm1
  mulsd  D241(%rip),%xmm0
  mulsd  D204(%rip),%xmm0
  mulsd  (%rsi,%rax,8),%xmm0
  addsd  %xmm4,%xmm1
  divsd  %xmm1,%xmm0
  movsd  %xmm0,(%r9,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%r10
  jne    L571
  jmp    L623
L600:
  mov    0x114(%rsp),%esi
  movsd  0x28(%rsp),%xmm2
  xor    %eax,%eax
  movsd  0x40(%rsp),%xmm3
  movsd  0x48(%rsp),%xmm4
  mov    0xa8(%rsp),%rcx
  mov    0x90(%rsp),%rdi
  nopl   0x0(%rax,%rax,1)
L122:
  movsd  (%rdi,%rax,8),%xmm0
  movsd  (%rcx,%rax,8),%xmm1
  mov    %rax,%rdx
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %rdx,%rsi
  jne    L122
  jmp    L562
L329:
  mov    0xa0(%rsp),%rsi
  mov    0x90(%rsp),%rdi
  call   <Derivative_LogGrid@plt>
  jmp    L623
L384:
  movq   $0x0,0xc8(%rsp)
  jmp    L401
L588:
  movsd  D392(%rip),%xmm6
  movsd  %xmm6,0x148(%rsp)
  movapd %xmm6,%xmm2
  jmp    L690
L580:
  movl   $0x0,0x58(%rsp)
  jmp    L69
L123:
  movq   $0x0,(%rbx)
  movq   $0x0,(%r14)
  movq   $0x0,0x0(%rbp)
  movq   $0x0,0x8(%rbx)
  movq   $0x0,0x8(%r14)
  movq   $0x0,0x8(%rbp)
  movq   $0x0,0x10(%rbx)
  movq   $0x0,0x10(%r14)
  movq   $0x0,0x10(%rbp)
  movq   $0x0,0x18(%rbx)
  movq   $0x0,0x18(%r14)
  movq   $0x0,0x18(%rbp)
  jmp    L183
L628:
  movsd  D300(%rip),%xmm0
  divsd  0x8(%rsp),%xmm0
  call   <floor@plt>
  add    0xec(%rsp),%eax
  mov    %eax,0x154(%rsp)
  lea    0x4(%rax),%r12d
  mov    0x9c(%rsp),%eax
  cmp    %eax,%r12d
  jge    L616
L34:
  movslq 0x154(%rsp),%rax
  movsd  0x40(%rsp),%xmm1
  pxor   %xmm7,%xmm7
  lea    0x0(,%rax,8),%rcx
  mov    %rax,0x158(%rsp)
  mov    %rcx,%rsi
  mov    %rcx,0x178(%rsp)
  mov    0xa8(%rsp),%rcx
  add    %rsi,%rcx
  movsd  (%rcx),%xmm2
  mov    %rcx,0x170(%rsp)
  mov    0x90(%rsp),%rcx
  movapd %xmm2,%xmm3
  mulsd  %xmm2,%xmm3
  movsd  (%rcx,%rax,8),%xmm0
  subsd  0x28(%rsp),%xmm0
  addsd  %xmm0,%xmm0
  divsd  %xmm3,%xmm1
  addsd  %xmm1,%xmm0
  ucomisd %xmm0,%xmm7
  ja     L457
  sqrtsd %xmm0,%xmm0
  mov    %rax,%r14
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm0,%xmm5
L709:
  movq   D181(%rip),%xmm1
  mov    %r12d,0x88(%rsp)
  mov    %rbx,%r12
  mov    %r13,%rbx
  mov    %r14,%r13
  mov    0xa8(%rsp),%r14
  xorpd  %xmm1,%xmm5
  movaps %xmm1,0x160(%rsp)
  movsd  %xmm5,0x58(%rsp)
  jmp    L438
L118:
  mov    0x170(%rsp),%rax
  movsd  (%rax),%xmm2
L438:
  movsd  (%r14,%r13,8),%xmm0
  subsd  %xmm2,%xmm0
  mulsd  0x58(%rsp),%xmm0
  call   <exp@plt>
  movsd  0x8(%rsp),%xmm7
  mov    0x10(%rsp),%rax
  movsd  %xmm0,(%r12,%r13,8)
  movsd  (%r14,%r13,8),%xmm1
  movapd %xmm0,%xmm2
  xorpd  0x160(%rsp),%xmm1
  movapd %xmm1,%xmm0
  mulsd  %xmm7,%xmm0
  mulsd  0x20(%rsp),%xmm0
  mulsd  %xmm2,%xmm0
  movsd  %xmm0,(%r15,%r13,8)
  movsd  (%rbx,%r13,8),%xmm1
  addsd  (%rax,%r13,8),%xmm1
  mov    0x18(%rsp),%rax
  mulsd  (%r12,%r13,8),%xmm1
  addsd  (%rax,%r13,8),%xmm7
  mulsd  %xmm7,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,0x0(%rbp,%r13,8)
  add    $0x1,%r13
  cmp    %r13d,0x88(%rsp)
  jge    L118
  mov    %rbx,%r13
  mov    0x154(%rsp),%ecx
  mov    %r12,%rbx
  cmp    %ecx,0xec(%rsp)
  jge    L423
  mov    %rax,%rcx
  mov    0x178(%rsp),%rax
  mov    0x158(%rsp),%r12
  mov    %r13,0x160(%rsp)
  add    %rax,%rcx
  lea    0x0(%r13,%rax,1),%rsi
  mov    %r15,%r13
  mov    %r12,%r15
  mov    %rcx,0x58(%rsp)
  mov    0x10(%rsp),%rcx
  mov    %rsi,%r12
  add    %rax,%rcx
  mov    %rcx,0x20(%rsp)
L54:
  mov    %r13,%rdx
  mov    %rbx,%rsi
  mov    %r15d,%edi
  call   <Predictor_In@plt>
  mov    %rbp,%rdx
  mov    %r13,%rsi
  mov    %r15d,%edi
  movsd  %xmm0,-0x8(%rbx,%r15,8)
  call   <Predictor_In@plt>
  mov    %r13,%rax
  movl   $0x6,0x88(%rsp)
  movsd  %xmm0,-0x8(%r13,%r15,8)
  movapd %xmm0,%xmm2
  mov    %rbp,%r13
  mov    %rax,%r14
  movsd  -0x8(%rbx,%r15,8),%xmm1
  mov    %rbx,%rbp
  mov    %r15d,%ebx
  movapd %xmm1,%xmm0
  jmp    L688
  nop
L96:
  movsd  -0x8(%r14,%r15,8),%xmm2
L688:
  mov    0x20(%rsp),%rax
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %ebx,%edi
  movsd  -0x8(%r12),%xmm1
  addsd  -0x8(%rax),%xmm1
  mov    0x58(%rsp),%rax
  mulsd  %xmm0,%xmm1
  movsd  0x8(%rsp),%xmm0
  addsd  -0x8(%rax),%xmm0
  mulsd  %xmm2,%xmm0
  addsd  %xmm0,%xmm1
  movsd  %xmm1,-0x8(%r13,%r15,8)
  call   <Corrector_In@plt>
  mov    %r14,%rdx
  mov    %rbp,%rsi
  mov    %ebx,%edi
  movsd  %xmm0,-0x8(%r14,%r15,8)
  call   <Corrector_In@plt>
  subl   $0x1,0x88(%rsp)
  movsd  %xmm0,-0x8(%rbp,%r15,8)
  jne    L96
  mov    %rbp,%rbx
  sub    $0x1,%r15
  mov    %r13,%rbp
  sub    $0x8,%r12
  subq   $0x8,0x58(%rsp)
  mov    %r14,%r13
  subq   $0x8,0x20(%rsp)
  cmp    %r15d,0xec(%rsp)
  jl     L54
  movslq 0xec(%rsp),%rax
  mov    0x118(%rsp),%rcx
  mov    %r14,%r15
  movsd  0x128(%rsp),%xmm0
  mov    0x160(%rsp),%r13
  lea    0x10(,%rax,8),%rdx
  divsd  (%rcx),%xmm0
  lea    (%r14,%rdx,1),%rsi
  cmp    %rsi,%rcx
  setae  %sil
  add    %rbx,%rdx
  cmp    %rdx,0x120(%rsp)
  setae  %dl
  or     %dl,%sil
  je     L612
  mov    0x154(%rsp),%ecx
  cmp    %ecx,%eax
  jge    L612
  mov    $0x1,%eax
  movapd %xmm0,%xmm2
  mov    0x120(%rsp),%rdi
  mov    %eax,%edx
  sub    0x150(%rsp),%edx
  unpcklpd %xmm2,%xmm2
  add    %ecx,%edx
  cmp    %ecx,0xec(%rsp)
  mov    0x118(%rsp),%rcx
  cmovg  %eax,%edx
  xor    %eax,%eax
  mov    %edx,%esi
  shr    %esi
  shl    $0x4,%rsi
L168:
  movupd (%rcx,%rax,1),%xmm1
  mulpd  %xmm2,%xmm1
  movups %xmm1,(%rcx,%rax,1)
  movupd (%rdi,%rax,1),%xmm1
  mulpd  %xmm2,%xmm1
  movups %xmm1,(%rdi,%rax,1)
  add    $0x10,%rax
  cmp    %rsi,%rax
  jne    L168
  mov    0xec(%rsp),%eax
  mov    %edx,%esi
  and    $0xfffffffe,%esi
  add    %esi,%eax
  cmp    %edx,%esi
  je     L164
  cltq
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rdx
  add    %r15,%rax
  movsd  (%rdx),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rdx)
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L164:
  mov    0x120(%rsp),%rax
  mov    0x154(%rsp),%edi
  mov    %rbx,%rsi
  movsd  0xb0(%rsp),%xmm0
  mov    (%rax),%r12
  call   <Norm_LogGrid@plt>
  pxor   %xmm5,%xmm5
  ucomisd %xmm0,%xmm5
  ja     L654
  movapd %xmm0,%xmm1
  sqrtsd %xmm1,%xmm1
L109:
  movsd  0x148(%rsp),%xmm0
  movq   %r12,%xmm6
  movsd  0x128(%rsp),%xmm3
  movsd  0x140(%rsp),%xmm4
  mov    0x154(%rsp),%eax
  divsd  %xmm1,%xmm0
  mulsd  %xmm0,%xmm6
  mulsd  %xmm0,%xmm3
  mulsd  %xmm0,%xmm4
  movsd  %xmm6,0x20(%rsp)
  test   %eax,%eax
  js     L484
  lea    0xf(%rbx),%rax
  sub    %r15,%rax
  cmp    $0x1e,%rax
  jbe    L485
  mov    0x154(%rsp),%eax
  test   %eax,%eax
  je     L485
  lea    0x1(%rax),%edx
  movapd %xmm0,%xmm2
  xor    %eax,%eax
  mov    %edx,%esi
  unpcklpd %xmm2,%xmm2
  shr    %esi
  shl    $0x4,%rsi
L37:
  movupd (%rbx,%rax,1),%xmm1
  mulpd  %xmm2,%xmm1
  movups %xmm1,(%rbx,%rax,1)
  movupd (%r15,%rax,1),%xmm1
  mulpd  %xmm2,%xmm1
  movups %xmm1,(%r15,%rax,1)
  add    $0x10,%rax
  cmp    %rsi,%rax
  jne    L37
  mov    %edx,%eax
  and    $0xfffffffe,%eax
  test   $0x1,%dl
  je     L479
  cltq
  shl    $0x3,%rax
  lea    (%rbx,%rax,1),%rsi
  add    %r15,%rax
  movsd  (%rsi),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rsi)
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L479:
  cmp    %edx,0x9c(%rsp)
  jle    L318
  mov    0x9c(%rsp),%eax
  mov    0x158(%rsp),%rcx
  mov    0x178(%rsp),%rdi
  lea    -0x2(%rax),%esi
  sub    0x154(%rsp),%esi
  lea    0x1(%rcx),%rdx
  lea    0x2(%rsi,%rcx,1),%rax
  add    $0x8,%rdi
  shl    $0x3,%rax
  lea    (%r15,%rdi,1),%r12
  add    %rbx,%rdi
  lea    (%r15,%rax,1),%r10
  cmp    %r10,%rdi
  jae    L494
  add    %rbx,%rax
  cmp    %rax,%r12
  jb     L240
L494:
  lea    0x8(,%rsi,8),%r14
  xor    %esi,%esi
  movsd  %xmm3,0x58(%rsp)
  movsd  %xmm4,0x88(%rsp)
  mov    %r14,%rdx
  call   <memset@plt>
  mov    %r14,%rdx
  xor    %esi,%esi
  mov    %r12,%rdi
  call   <memset@plt>
  movsd  0x58(%rsp),%xmm3
  movsd  0x88(%rsp),%xmm4
L318:
  movsd  D241(%rip),%xmm0
  subsd  0x20(%rsp),%xmm4
  mov    0xa8(%rsp),%rax
  mov    0x100(%rsp),%rcx
  mulsd  %xmm3,%xmm0
  movsd  0x8(%rsp),%xmm1
  movsd  0x28(%rsp),%xmm7
  mulsd  (%rax,%rcx,1),%xmm1
  mulsd  %xmm4,%xmm0
  divsd  %xmm1,%xmm0
  movq   D273(%rip),%xmm1
  movapd %xmm0,%xmm2
  andpd  %xmm1,%xmm2
  andpd  %xmm7,%xmm1
  comisd D17(%rip),%xmm1
  ja     L97
  movsd  D358(%rip),%xmm1
L179:
  comisd %xmm2,%xmm1
  ja     L58
  pxor   %xmm1,%xmm1
  movsd  0x28(%rsp),%xmm6
  movsd  0xb8(%rsp),%xmm2
  movsd  0xc8(%rsp),%xmm5
  cmpltsd %xmm0,%xmm1
  movapd %xmm1,%xmm3
  andpd  %xmm1,%xmm2
  andnpd %xmm6,%xmm3
  orpd   %xmm2,%xmm3
  movapd %xmm6,%xmm2
  movsd  %xmm3,0xb8(%rsp)
  andpd  %xmm1,%xmm2
  andnpd %xmm5,%xmm1
  movapd %xmm0,%xmm5
  addsd  %xmm6,%xmm5
  movapd %xmm1,%xmm7
  orpd   %xmm2,%xmm7
  movsd  %xmm7,0xc8(%rsp)
  comisd %xmm3,%xmm5
  movsd  %xmm5,0x28(%rsp)
  ja     L465
  comisd %xmm5,%xmm7
  jbe    L314
L465:
  movsd  0xb8(%rsp),%xmm0
  addsd  0xc8(%rsp),%xmm0
  mulsd  D241(%rip),%xmm0
  movsd  %xmm0,0x28(%rsp)
  jmp    L314
L423:
  jne    L164
  mov    0x118(%rsp),%rax
  movsd  0x128(%rsp),%xmm0
  divsd  (%rax),%xmm0
  movslq 0xec(%rsp),%rax
L612:
  movsd  (%rbx,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%rax,8)
  movsd  (%r15,%rax,8),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r15,%rax,8)
  add    $0x1,%rax
  cmp    %eax,0x154(%rsp)
  jge    L612
  jmp    L164
L240:
  movq   $0x0,(%rbx,%rdx,8)
  movq   $0x0,(%r15,%rdx,8)
  add    $0x1,%rdx
  cmp    %edx,0x9c(%rsp)
  jg     L240
  jmp    L318
L616:
  sub    $0x5,%eax
  mov    0x114(%rsp),%r12d
  mov    %eax,0x154(%rsp)
  jmp    L34
L97:
  mulsd  D395(%rip),%xmm1
  jmp    L179
L485:
  mov    0x158(%rsp),%rax
  lea    0x8(,%rax,8),%rdx
  xor    %eax,%eax
L138:
  movsd  (%rbx,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%rbx,%rax,1)
  movsd  (%r15,%rax,1),%xmm1
  mulsd  %xmm0,%xmm1
  movsd  %xmm1,(%r15,%rax,1)
  add    $0x8,%rax
  cmp    %rax,%rdx
  jne    L138
L484:
  mov    0x154(%rsp),%eax
  lea    0x1(%rax),%edx
  jmp    L479
L591:
  call   <sqrt@plt>
  movsd  %xmm0,0xb0(%rsp)
  jmp    L793
L58:
  mov    0x130(%rsp),%rax
  mov    0xec(%rsp),%ecx
  movsd  0x28(%rsp),%xmm3
  mov    %ecx,(%rax)
  mov    0x138(%rsp),%rax
  movsd  %xmm3,(%rax)
  jmp    L447
L654:
  call   <sqrt@plt>
  movapd %xmm0,%xmm1
  jmp    L109
L457:
  movsd  %xmm2,0x58(%rsp)
  call   <sqrt@plt>
  movsd  0x58(%rsp),%xmm2
  mov    0x158(%rsp),%r14
  movsd  %xmm0,0x20(%rsp)
  movapd %xmm0,%xmm5
  jmp    L709
```

tool_calls: name: extract_symbolic_data
arguments: label: D278
type_guessed: f32[2]
name: extract_symbolic_data
arguments: label: D392
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D204
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D241
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D123
type_guessed: f64
name: extract_symbolic_data
arguments: label: D114
type_guessed: f64
name: extract_symbolic_data
arguments: label: D181
type_guessed: f32[4]
name: extract_symbolic_data
arguments: label: D182
type_guessed: byte[16]
name: extract_symbolic_data
arguments: label: D223
type_guessed: string
name: extract_symbolic_data
arguments: label: D281
type_guessed: string
name: extract_symbolic_data
arguments: label: D300
type_guessed: f64
name: extract_symbolic_data
arguments: label: D273
type_guessed: qword
name: extract_symbolic_data
arguments: label: D17
type_guessed: f64[2]
name: extract_symbolic_data
arguments: label: D358
type_guessed: byte[8]
name: extract_symbolic_data
arguments: label: D395
type_guessed: byte[8]

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

tool: {"D392": [1.0,1.0]}

tool: {"D204": [0xfc,0x1c,0xef,0x0c,0x46,0xeb,0x0b,0x3f,0xfc,0x1c,0xef,0x0c,0x46,0xeb,0x0b,0x3f]}

tool: {"D241": [0.5,0.5]}

tool: D123: 1.25

tool: D114: 0.75

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

tool: {"D182": [0xfc,0x1c,0xef,0x0c,0x46,0xeb,0xfb,0x3e,0xfc,0x1c,0xef,0x0c,0x46,0xeb,0xfb,0x3e]}

tool: D223: Error R_Dirac: More than %d iterations


tool: D281: Error in R_Dirac: no turning point

tool: D300: 2.3

tool: D273: 9223372036854775807

tool: {"D17": [0.2,1e-10]}

tool: {"D358": [0x96,0x64,0x79,0xe1,0x7f,0xfd,0xb5,0x3d]}

tool: {"D395": [0xbb,0xbd,0xd7,0xd9,0xdf,0x7c,0xdb,0x3d]}

assistant: ```c
void R_Dirac(int n, int l, int s2, double Z, const double *v, int *mch, double *Eig, double *u, double *uprime) {
  int i, j, iteration, node, match, Ninf, Ngrid;
  double E, de, kappa, Emax, Emin, log_amesh, log_amesh2, fss, gamma, L2, L0, r2, sum, a, scale, m1scale, uout, upout, upin, *r, *f_upp, *dv, *frp, *fr, *upp;
  E = *Eig;
  L2 = ((double)(l * (l + 1)));
  fss = 1.0 / 137.03602;
  fss = fss * fss;
  kappa = -1;
  if (l) {
    if (s2 > 0) {
      kappa = -(l + 1);
    } else {
      kappa = l;
    }
  }
  gamma = sqrt(kappa * kappa - fss * Z * Z);
  Ngrid = N_LogGrid();
  log_amesh = log_amesh_LogGrid();
  log_amesh2 = log_amesh * log_amesh;
  r = r_LogGrid();
  f_upp = alloc_LogGrid();
  upp = alloc_LogGrid();
  fr = alloc_LogGrid();
  frp = alloc_LogGrid();
  dv = alloc_LogGrid();
  Emax = v[Ngrid - 1] + 0.5 * L2 / (r[Ngrid - 1] * r[Ngrid - 1]);
  Emin = 0.0;
  for (i = 0; i < Ngrid; ++i) {
    r2 = r[i];
    r2 = r2 * r2;
    Emin = ((Emin < (v[i] + 0.5 * L2 / r2)) ? Emin : (v[i] + 0.5 * L2 / r2));
  }
  if (E > Emax)
    E = 1.25 * Emax;
  if (E < Emin)
    E = 0.75 * Emin;
  if (E > Emax)
    E = 0.5 * (Emax + Emin);
  for (i = 0; i < 4; ++i) {
    u[i] = 0.0;
    uprime[i] = 0.0;
    upp[i] = 0.0;
  }
  iteration = 0;
  while (iteration < 100) {
    ++iteration;
    for (i = 0; i < Ngrid; ++i) {
      r2 = r[i];
      r2 = r2 * r2;
      f_upp[i] = log_amesh2 * (L2 + 2.0 * (v[i] - E) * r2);
    }
    Derivative_LogGrid(v, dv);
    for (i = 0; i < Ngrid; ++i) {
      r2 = r[i] * r[i];
      fr[i] = -log_amesh2 * r2 * (fss * (v[i] - E) * (v[i] - E) + 0.5 * fss * dv[i] * kappa / (r[i] * (1.0 + 0.5 * fss * (E - v[i]))));
      frp[i] = -log_amesh * r[i] * 0.5 * fss * dv[i] / (1.0 + 0.5 * fss * (E - v[i]));
    }
    match = Ngrid - 1;
    while (f_upp[match - 1] * f_upp[match] > 0.0) {
      match = match - 1;
      if (match < 2) {
        printf("Error in R_Dirac: no turning point\n");
        dealloc_LogGrid(f_upp);
        dealloc_LogGrid(upp);
        dealloc_LogGrid(fr);
        dealloc_LogGrid(frp);
        dealloc_LogGrid(dv);
        return;
      }
    }
    m1scale = 1.0;
    for (i = 0; i < (n - l - 1); ++i)
      m1scale *= -1.0;
    for (i = 0; i < 4; ++i) {
      u[i] = m1scale * pow(r[i], gamma);
      uprime[i] = log_amesh * gamma * u[i];
      upp[i] = (log_amesh + frp[i]) * uprime[i] + (f_upp[i] + fr[i]) * u[i];
    }
    node = 0;
    for (i = 3; i < match; ++i) {
      u[i + 1] = Predictor_Out(i, u, uprime);
      uprime[i + 1] = Predictor_Out(i, uprime, upp);
      for (j = 0; j < 6; ++j) {
        upp[i + 1] = (log_amesh + frp[i + 1]) * uprime[i + 1] + (f_upp[i + 1] + fr[i + 1]) * u[i + 1];
        uprime[i + 1] = Corrector_Out(i, uprime, upp);
        u[i + 1] = Corrector_Out(i, u, uprime);
      }
      if (u[i + 1] * u[i] <= 0)
        node = node + 1;
    }
    uout = u[match];
    upout = uprime[match];
    if ((node - n + l + 1) < 0) {
      Emin = E;
      E = 0.5 * (Emin + Emax);
    } else if ((node - n + l + 1) > 0) {
      Emax = E;
      E = 0.5 * (Emin + Emax);
    } else {
      Ninf = match + floor(2.3 / log_amesh);
      if ((Ninf + 5) > Ngrid)
        Ninf = Ngrid - 5;
      a = sqrt(L2 / (r[Ninf] * r[Ninf]) + 2.0 * (v[Ninf] - E));
      for (i = Ninf; i <= (Ninf + 4); ++i) {
        u[i] = exp(-a * (r[i] - r[Ninf]));
        uprime[i] = -r[i] * log_amesh * a * u[i];
        upp[i] = (log_amesh + frp[i]) * uprime[i] + (f_upp[i] + fr[i]) * u[i];
      }
      for (i = Ninf; i >= (match + 1); --i) {
        u[i - 1] = Predictor_In(i, u, uprime);
        uprime[i - 1] = Predictor_In(i, uprime, upp);
        for (j = 0; j < 6; ++j) {
          upp[i - 1] = (log_amesh + frp[i - 1]) * uprime[i - 1] + (f_upp[i - 1] + fr[i - 1]) * u[i - 1];
          uprime[i - 1] = Corrector_In(i, uprime, upp);
          u[i - 1] = Corrector_In(i, u, uprime);
        }
      }
      scale = uout / u[match];
      for (i = match; i <= Ninf; ++i) {
        u[i] = scale * u[i];
        uprime[i] = scale * uprime[i];
      }
      upin = uprime[match];
      sum = Norm_LogGrid(Ninf, gamma, u);
      sum = 1.0 / sqrt(sum);
      uout = sum * uout;
      upout = sum * upout;
      upin = sum * upin;
      for (i = 0; i <= Ninf; ++i) {
        u[i] = sum * u[i];
        uprime[i] = sum * uprime[i];
      }
      for (i = Ninf + 1; i < Ngrid; ++i) {
        u[i] = 0.0;
        uprime[i] = 0.0;
      }
      de = 0.5 * uout * (upout - upin) / (log_amesh * r[match]);
      if (fabs(de) < (((fabs(E) > 0.2) ? fabs(E) : 0.2) * 1.0e-10)) {
        *mch = match;
        *Eig = E;
        dealloc_LogGrid(f_upp);
        dealloc_LogGrid(upp);
        dealloc_LogGrid(fr);
        dealloc_LogGrid(frp);
        dealloc_LogGrid(dv);
        return;
      }
      if (de > 0.0)
        Emin = E;
      else
        Emax = E;
      E = E + de;
      if ((E > Emax) || (E < Emin))
        E = 0.5 * (Emin + Emax);
    }
  }
  printf("Error R_Dirac: More than %d iterations\n", 100);
  *mch = match;
  *Eig = E;
  dealloc_LogGrid(f_upp);
  dealloc_LogGrid(upp);
  dealloc_LogGrid(fr);
  dealloc_LogGrid(frp);
  dealloc_LogGrid(dv);
  return;
}
```