user: 这段汇编代码用C语言表示是什么样的:

```asm
<R_Schrodinger_Fixed_Logderiv>:
  endbr64
  lea    0x1(%rsi),%eax
  pxor   %xmm2,%xmm2
  push   %r15
  pxor   %xmm7,%xmm7
  cvtsi2sd %eax,%xmm2
  push   %r14
  mov    %r9,%r14
  imul   %esi,%eax
  push   %r13
  push   %r12
  mov    %ecx,%r12d
  push   %rbp
  push   %rbx
  cvtsi2sd %eax,%xmm7
  xor    %eax,%eax
  sub    $0x158,%rsp
  movsd  (%r8),%xmm4
  mov    %edi,0xc0(%rsp)
  mov    0x190(%rsp),%r13
  mov    %esi,0xc4(%rsp)
  mov    %rdx,0xd0(%rsp)
  mov    %ecx,0xb8(%rsp)
  movsd  %xmm0,0x148(%rsp)
  movsd  %xmm4,0x30(%rsp)
  movsd  %xmm7,0x38(%rsp)
  mov    %r8,0x100(%rsp)
  movsd  %xmm2,0x60(%rsp)
  call   <N_LogGrid@plt>
  mov    %eax,%ebx
  mov    %eax,0x8c(%rsp)
  xor    %eax,%eax
  call   <log_amesh_LogGrid@plt>
  pxor   %xmm2,%xmm2
  cvtsi2sd %eax,%xmm2
  xor    %eax,%eax
  movsd  %xmm2,0x10(%rsp)
  mulsd  %xmm2,%xmm2
  movsd  %xmm2,0x40(%rsp)
  call   <r_LogGrid@plt>
  cltq
  mov    %rax,%rbp
  mov    %rax,0x80(%rsp)
  xor    %eax,%eax
  call   <alloc_LogGrid@plt>
  movslq %eax,%r8
  xor    %eax,%eax
  mov    %r8,0x78(%rsp)
  call   <alloc_LogGrid@plt>
  mov    0x78(%rsp),%r8
  lea    0x8(%rbp),%rdx
  mov    %ebx,%edi
  movslq %eax,%r15
  movslq %r12d,%rax
  mov    0xd0(%rsp),%r9
  movsd  D41(%rip),%xmm0
  mov    %rax,%r10
  shl    $0x3,%rax
  movsd  0x30(%rsp),%xmm4
  movl   $0x1f4,0xbc(%rsp)
  lea    (%r14,%rax,1),%rcx
  lea    0x1(%r10),%r11d
  mov    %rcx,0xa8(%rsp)
  lea    0x0(%r13,%rax,1),%rcx
  add    %rbp,%rax
  movapd %xmm4,%xmm7
  mov    %rax,0x108(%rsp)
  lea    0x8(%r9),%rax
  subsd  %xmm0,%xmm4
  cmp    %rax,%r8
  mov    %rcx,0xb0(%rsp)
  mov    %edi,%ecx
  addsd  %xmm0,%xmm7
  setne  %al
  cmp    $0x1,%ebx
  mov    %r11d,0xfc(%rsp)
  movsd  %xmm4,0x98(%rsp)
  setne  %sil
  movsd  0x60(%rsp),%xmm4
  mulsd  0x10(%rsp),%xmm4
  and    %esi,%eax
  cmp    %rdx,%r8
  movsd  %xmm7,0x90(%rsp)
  setne  %sil
  and    $0xfffffffe,%ecx
  and    %esi,%eax
  mov    %ecx,0xf8(%rsp)
  mov    %al,0x115(%rsp)
  mov    %ebx,%eax
  mov    %rbp,%rbx
  shr    %eax
  sub    $0x1,%eax
  shl    $0x4,%rax
  lea    0x10(%rbp,%rax,1),%rax
  mov    %rax,0xd8(%rsp)
  movslq %ecx,%rax
  shl    $0x3,%rax
  lea    0x0(%rbp,%rax,1),%rcx
  mov    %rcx,0x48(%rsp)
  lea    (%r9,%rax,1),%rcx
  add    %r8,%rax
  mov    %rax,0x58(%rsp)
  lea    -0x1(%rdi),%eax
  lea    (%rdx,%rax,8),%rax
  mov    %rcx,0x50(%rsp)
  mov    %edi,%ecx
  mov    %r11d,%edi
  mov    %rax,0xe8(%rsp)
  lea    0xf(%r14),%rax
  sub    %r13,%rax
  cmp    $0x1e,%rax
  seta   %dl
  test   %r10d,%r10d
  setne  %al
  and    %eax,%edx
  mov    %r11d,%eax
  and    $0xfffffffe,%r11d
  shr    %eax
  mov    %dl,0x116(%rsp)
  sub    $0x1,%eax
  mov    %r11d,0x110(%rsp)
  add    $0x1,%rax
  shl    $0x4,%rax
  mov    %rax,0x130(%rsp)
  movslq %r11d,%rax
  shl    $0x3,%rax
  lea    (%r14,%rax,1),%rsi
  add    %r13,%rax
  mov    %rax,0xe0(%rsp)
  mov    %r10d,%eax
  lea    0x8(,%rax,8),%rax
  mov    %rsi,0xf0(%rsp)
  mov    %rax,0x120(%rsp)
  movslq %edi,%rax
  lea    0x0(,%rax,8),%rdx
  mov    %rax,0x140(%rsp)
  mov    %ecx,%eax
  sub    %r10d,%eax
  lea    (%r14,%rdx,1),%rdi
  sub    $0x2,%eax
  mov    %rdi,0x118(%rsp)
  lea    0x8(,%rax,8),%rsi
  lea    0x2(%r10),%eax
  cmp    %eax,%ecx
  mov    $0x8,%eax
  lea    0x0(%r13,%rdx,1),%rcx
  cmovge %rsi,%rax
  mov    %rcx,0x128(%rsp)
  mov    %rax,0x138(%rsp)
  add    %rdx,%rax
  lea    0x0(%r13,%rax,1),%rdx
  cmp    %rdx,%rdi
  setae  %dl
  add    %r14,%rax
  cmp    %rax,%rcx
  mov    %r14,%rcx
  setae  %al
  neg    %rbx
  sub    %rbp,%rcx
  or     %eax,%edx
  lea    0x20(%rbp),%rax
  mov    %dl,0x117(%rsp)
  mov    %rax,0x70(%rsp)
  movsd  %xmm4,0x68(%rsp)
  mov    %rbx,0xa0(%rsp)
  mov    %rcx,0xc8(%rsp)
  nopw   0x0(%rax,%rax,1)
L178:
  mov    0x8c(%rsp),%edx
  test   %edx,%edx
  jle    L157
  cmpb   $0x0,0x115(%rsp)
  je     L179
  mov    0x80(%rsp),%rcx
  mov    0xd0(%rsp),%rsi
  mov    0x78(%rsp),%rdx
  movsd  0x30(%rsp),%xmm4
  movsd  0x38(%rsp),%xmm3
  movsd  0x40(%rsp),%xmm2
  mov    %rcx,%rax
  sub    %rcx,%rsi
  sub    %rcx,%rdx
  mov    0xd8(%rsp),%rcx
  unpcklpd %xmm4,%xmm4
  unpcklpd %xmm3,%xmm3
  unpcklpd %xmm2,%xmm2
  nopl   0x0(%rax)
L38:
  movupd (%rsi,%rax,1),%xmm0
  movupd (%rax),%xmm1
  subpd  %xmm4,%xmm0
  mulpd  %xmm1,%xmm1
  addpd  %xmm0,%xmm0
  mulpd  %xmm1,%xmm0
  addpd  %xmm3,%xmm0
  mulpd  %xmm2,%xmm0
  movups %xmm0,(%rdx,%rax,1)
  add    $0x10,%rax
  cmp    %rcx,%rax
  jne    L38
  mov    0xf8(%rsp),%ecx
  cmp    %ecx,0x8c(%rsp)
  je     L157
  mov    0x48(%rsp),%rax
  movsd  (%rax),%xmm1
  mov    0x50(%rsp),%rax
  movsd  (%rax),%xmm0
  subsd  0x30(%rsp),%xmm0
  mulsd  %xmm1,%xmm1
  mov    0x58(%rsp),%rax
  addsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  0x38(%rsp),%xmm0
  mulsd  0x40(%rsp),%xmm0
  movsd  %xmm0,(%rax)
L157:
  mov    0x80(%rsp),%rbx
  mov    0xa0(%rsp),%rbp
  mov    0xc8(%rsp),%r12
L266:
  movsd  (%rbx),%xmm0
  movsd  0x60(%rsp),%xmm1
  call   <pow@plt>
  lea    0x0(%r13,%rbp,1),%rdx
  movsd  %xmm0,(%r12,%rbx,1)
  mulsd  0x68(%rsp),%xmm0
  movsd  %xmm0,(%rdx,%rbx,1)
  add    $0x8,%rbx
  cmp    %rbx,0x70(%rsp)
  jne    L266
  mov    0x78(%rsp),%rax
  movsd  0x0(%r13),%xmm1
  movsd  0x10(%rsp),%xmm7
  mov    0xb8(%rsp),%edi
  movsd  (%rax),%xmm0
  mulsd  (%r14),%xmm0
  mov    %rax,%rcx
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%r15)
  movsd  0x8(%r13),%xmm1
  movsd  0x8(%rax),%xmm0
  mulsd  0x8(%r14),%xmm0
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x8(%r15)
  movsd  0x10(%r13),%xmm1
  movsd  0x10(%rax),%xmm0
  mulsd  0x10(%r14),%xmm0
  mulsd  %xmm7,%xmm1
  addsd  %xmm1,%xmm0
  movsd  %xmm0,0x10(%r15)
  mulsd  0x18(%r13),%xmm7
  movsd  0x18(%rax),%xmm0
  mulsd  0x18(%r14),%xmm0
  addsd  %xmm7,%xmm0
  movsd  %xmm0,0x18(%r15)
  cmp    $0x3,%edi
  jle    L255
  lea    0x20(%rax),%rax
  movl   $0x0,0x18(%rsp)
  mov    $0x3,%ebx
  mov    %rax,(%rsp)
  lea    -0x4(%rdi),%eax
  add    $0x4,%rax
  mov    %rax,0x20(%rsp)
  mov    %r15,%rax
  sub    %rcx,%rax
  mov    %rax,0x28(%rsp)
  cs nopw 0x0(%rax,%rax,1)
L69:
  mov    %r13,%rdx
  mov    %r14,%rsi
  mov    %ebx,%edi
  xor    %eax,%eax
  call   <Predictor_Out@plt>
  pxor   %xmm0,%xmm0
  mov    %r15,%rdx
  mov    %r13,%rsi
  cvtsi2sd %eax,%xmm0
  mov    %ebx,%edi
  xor    %eax,%eax
  mov    %ebx,%r12d
  mov    $0x6,%ebp
  movsd  %xmm0,0x8(%r14,%rbx,8)
  call   <Predictor_Out@plt>
  pxor   %xmm1,%xmm1
  cvtsi2sd %eax,%xmm1
  mov    0x28(%rsp),%rax
  add    (%rsp),%rax
  mov    %rax,0x8(%rsp)
  movsd  %xmm1,0x8(%r13,%rbx,8)
  movsd  0x8(%r14,%rbx,8),%xmm0
  jmp    L220
  nopl   0x0(%rax,%rax,1)
L105:
  movsd  0x8(%r13,%rbx,8),%xmm1
L220:
  mov    (%rsp),%rax
  mulsd  0x10(%rsp),%xmm1
  mov    %r15,%rdx
  mov    %r13,%rsi
  mov    %r12d,%edi
  mulsd  (%rax),%xmm0
  mov    0x8(%rsp),%rax
  addsd  %xmm1,%xmm0
  movsd  %xmm0,(%rax)
  xor    %eax,%eax
  call   <Corrector_Out@plt>
  pxor   %xmm0,%xmm0
  mov    %r13,%rdx
  mov    %r14,%rsi
  cvtsi2sd %eax,%xmm0
  mov    %r12d,%edi
  xor    %eax,%eax
  movsd  %xmm0,0x8(%r13,%rbx,8)
  call   <Corrector_Out@plt>
  pxor   %xmm0,%xmm0
  cvtsi2sd %eax,%xmm0
  movsd  %xmm0,0x8(%r14,%rbx,8)
  sub    $0x1,%ebp
  jne    L105
  mulsd  (%r14,%rbx,8),%xmm0
  pxor   %xmm6,%xmm6
  comisd %xmm0,%xmm6
  sbbl   $0xffffffff,0x18(%rsp)
  add    $0x1,%rbx
  addq   $0x8,(%rsp)
  cmp    0x20(%rsp),%rbx
  jne    L69
L304:
  mov    0xa8(%rsp),%rax
  movsd  (%rax),%xmm1
  mov    0xb0(%rsp),%rax
  movsd  (%rax),%xmm2
  mov    0x18(%rsp),%eax
  sub    0xc0(%rsp),%eax
  add    0xc4(%rsp),%eax
  cmp    $0xffffffff,%eax
  jl     L331
  je     L291
  movsd  0x98(%rsp),%xmm0
  movsd  0x30(%rsp),%xmm7
  movsd  %xmm7,0x90(%rsp)
  addsd  %xmm7,%xmm0
  mulsd  D49(%rip),%xmm0
  movsd  %xmm0,0x30(%rsp)
L100:
  subl   $0x1,0xbc(%rsp)
  jne    L178
  mov    $0x1f4,%esi
  lea    D63(%rip),%rdi
  xor    %eax,%eax
  call   <printf@plt>
L173:
  mov    0x100(%rsp),%rax
  movsd  0x30(%rsp),%xmm2
  mov    %r15,%rdi
  movsd  %xmm2,(%rax)
  xor    %eax,%eax
  call   <dealloc_LogGrid@plt>
  mov    0x78(%rsp),%rdi
  xor    %eax,%eax
  add    $0x158,%rsp
  pop    %rbx
  pop    %rbp
  pop    %r12
  pop    %r13
  pop    %r14
  pop    %r15
  jmp    1190 <dealloc_LogGrid@plt>
L331:
  movsd  0x90(%rsp),%xmm0
  movsd  0x30(%rsp),%xmm4
  movsd  %xmm4,0x98(%rsp)
  addsd  %xmm4,%xmm0
  mulsd  D49(%rip),%xmm0
  movsd  %xmm0,0x30(%rsp)
  jmp    L100
L179:
  mov    0x80(%rsp),%rcx
  mov    0x78(%rsp),%rsi
  mov    0xd0(%rsp),%rdx
  movsd  0x30(%rsp),%xmm2
  mov    %rcx,%rax
  sub    %rcx,%rsi
  movsd  0x38(%rsp),%xmm3
  movsd  0x40(%rsp),%xmm4
  sub    %rcx,%rdx
  mov    0xe8(%rsp),%rcx
L244:
  movsd  (%rdx,%rax,1),%xmm0
  movsd  (%rax),%xmm1
  subsd  %xmm2,%xmm0
  mulsd  %xmm1,%xmm1
  addsd  %xmm0,%xmm0
  mulsd  %xmm1,%xmm0
  addsd  %xmm3,%xmm0
  mulsd  %xmm4,%xmm0
  movsd  %xmm0,(%rsi,%rax,1)
  add    $0x8,%rax
  cmp    %rcx,%rax
  jne    L244
  jmp    L157
L255:
  movl   $0x0,0x18(%rsp)
  jmp    L304
L291:
  movsd  0x60(%rsp),%xmm0
  mov    %r14,%rsi
  mov    $0x1,%eax
  movsd  %xmm1,(%rsp)
  movsd  0x148(%rsp),%xmm7
  mov    0xb8(%rsp),%edi
  movsd  %xmm2,0x8(%rsp)
  mulsd  %xmm1,%xmm7
  movq   %xmm7,%rbx
  call   <Norm_LogGrid@plt>
  pxor   %xmm0,%xmm0
  pxor   %xmm7,%xmm7
  movsd  (%rsp),%xmm1
  cvtsi2sd %eax,%xmm0
  movsd  0x8(%rsp),%xmm2
  ucomisd %xmm0,%xmm7
  ja     L48
  movapd %xmm0,%xmm3
  sqrtsd %xmm3,%xmm3
L270:
  movsd  D1(%rip),%xmm0
  movq   %rbx,%xmm7
  mov    0xb8(%rsp),%eax
  divsd  %xmm3,%xmm0
  mulsd  %xmm0,%xmm7
  mulsd  %xmm0,%xmm1
  mulsd  %xmm0,%xmm2
  movsd  %xmm7,(%rsp)
  test   %eax,%eax
  js     L264
  cmpb   $0x0,0x116(%rsp)
  je     L117
  movapd %xmm0,%xmm4
  mov    0x130(%rsp),%rdx
  xor    %eax,%eax
  unpcklpd %xmm4,%xmm4
L129:
  movupd (%r14,%rax,1),%xmm3
  mulpd  %xmm4,%xmm3
  movups %xmm3,(%r14,%rax,1)
  movupd 0x0(%r13,%rax,1),%xmm3
  mulpd  %xmm4,%xmm3
  movups %xmm3,0x0(%r13,%rax,1)
  add    $0x10,%rax
  cmp    %rdx,%rax
  jne    L129
  mov    0xfc(%rsp),%ecx
  cmp    %ecx,0x110(%rsp)
  je     L264
  mov    0xf0(%rsp),%rax
  movsd  (%rax),%xmm3
  mulsd  %xmm0,%xmm3
  movsd  %xmm3,(%rax)
  mov    0xe0(%rsp),%rax
  mulsd  (%rax),%xmm0
  movsd  %xmm0,(%rax)
L264:
  mov    0xfc(%rsp),%ecx
  cmp    %ecx,0x8c(%rsp)
  jle    L181
  cmpb   $0x0,0x117(%rsp)
  je     L83
  mov    0x138(%rsp),%rbx
  mov    0x118(%rsp),%rdi
  xor    %esi,%esi
  movsd  %xmm2,0x18(%rsp)
  movsd  %xmm1,0x8(%rsp)
  mov    %rbx,%rdx
  call   <memset@plt>
  mov    0x128(%rsp),%rdi
  mov    %rbx,%rdx
  xor    %esi,%esi
  call   <memset@plt>
  movsd  0x8(%rsp),%xmm1
  movsd  0x18(%rsp),%xmm2
L181:
  mulsd  D49(%rip),%xmm1
  subsd  (%rsp),%xmm2
  mov    0x108(%rsp),%rax
  mulsd  %xmm2,%xmm1
  movapd %xmm1,%xmm0
  movsd  0x10(%rsp),%xmm1
  mulsd  (%rax),%xmm1
  divsd  %xmm1,%xmm0
  movsd  0x30(%rsp),%xmm1
  andpd  D13(%rip),%xmm1
  comisd D107(%rip),%xmm1
  movapd %xmm0,%xmm2
  andpd  D13(%rip),%xmm2
  ja     L166
  movsd  D67(%rip),%xmm1
L1:
  comisd %xmm2,%xmm1
  ja     L173
  pxor   %xmm1,%xmm1
  movsd  0x30(%rsp),%xmm7
  movsd  0x90(%rsp),%xmm2
  movsd  0x98(%rsp),%xmm4
  cmpltsd %xmm0,%xmm1
  movapd %xmm1,%xmm3
  andpd  %xmm1,%xmm2
  andnpd %xmm7,%xmm3
  movapd %xmm3,%xmm6
  orpd   %xmm2,%xmm6
  movapd %xmm7,%xmm2
  movsd  %xmm6,0x90(%rsp)
  andpd  %xmm1,%xmm2
  andnpd %xmm4,%xmm1
  movapd %xmm0,%xmm4
  addsd  %xmm7,%xmm4
  orpd   %xmm2,%xmm1
  movsd  %xmm1,0x98(%rsp)
  comisd %xmm6,%xmm4
  movsd  %xmm4,0x30(%rsp)
  ja     L63
  comisd %xmm4,%xmm1
  jbe    L100
L63:
  movsd  0x90(%rsp),%xmm0
  addsd  0x98(%rsp),%xmm0
  mulsd  D49(%rip),%xmm0
  movsd  %xmm0,0x30(%rsp)
  jmp    L100
L166:
  mulsd  D72(%rip),%xmm1
  jmp    L1
L117:
  xor    %eax,%eax
L7:
  movsd  (%r14,%rax,1),%xmm3
  mulsd  %xmm0,%xmm3
  movsd  %xmm3,(%r14,%rax,1)
  movsd  0x0(%r13,%rax,1),%xmm3
  mulsd  %xmm0,%xmm3
  movsd  %xmm3,0x0(%r13,%rax,1)
  add    $0x8,%rax
  cmp    0x120(%rsp),%rax
  jne    L7
  jmp    L264
L83:
  mov    0x140(%rsp),%rax
L86:
  movq   $0x0,(%r14,%rax,8)
  movq   $0x0,0x0(%r13,%rax,8)
  add    $0x1,%rax
  cmp    %eax,0x8c(%rsp)
  jg     L86
  jmp    L181
L48:
  movsd  %xmm2,0x8(%rsp)
  movsd  %xmm1,(%rsp)
  call   <sqrt@plt>
  movsd  0x8(%rsp),%xmm2
  movsd  (%rsp),%xmm1
  movapd %xmm0,%xmm3
  jmp    L270
```

tool_calls: name: disassemble_data
arguments: data_label: D41
type_infered: f64
name: disassemble_data
arguments: data_label: D49
type_infered: f64
name: disassemble_data
arguments: data_label: D63
type_infered: string
name: disassemble_data
arguments: data_label: D1
type_infered: f64
name: disassemble_data
arguments: data_label: D13
type_infered: qword[2]
name: disassemble_data
arguments: data_label: D107
type_infered: f64[2]
name: disassemble_data
arguments: data_label: D67
type_infered: byte[8]
name: disassemble_data
arguments: data_label: D72
type_infered: byte[8]

tool: D41: 10

tool: D49: 0.5

tool: D63: Error R_Schrodinger_Fixed_Logderiv: More than %d iterations


tool: D1: 1

tool: {"D13": [0x7fffffffffffffff,0x0000000000000000]}

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

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

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

assistant: ```c
void R_Schrodinger_Fixed_Logderiv(n, l, v, match, u_logderiv, Eig, u, uprime) int n, l;
double v[];
int match;
double u_logderiv;
double *Eig;
double u[], uprime[];
{
  int i, j, iteration, node, Ngrid;
  double E, de, Emax, Emin, log_amesh, log_amesh2, gamma, L2, r2, sum, uout, upout, upin, *r, *f_upp, *upp;
  E = *Eig;
  gamma = ((double)(l + 1));
  L2 = ((double)(l * (l + 1)));
  Ngrid = N_LogGrid();
  log_amesh = log_amesh_LogGrid();
  log_amesh2 = log_amesh * log_amesh;
  r = (double *)r_LogGrid();
  f_upp = (double *)alloc_LogGrid();
  upp = (double *)alloc_LogGrid();
  Emax = E + 10.0;
  Emin = E - 10.0;
  iteration = 0;
  while (iteration < 500) {
    ++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);
    }
    for (i = 0; i < 4; ++i) {
      u[i] = pow(r[i], gamma);
      uprime[i] = log_amesh * gamma * u[i];
    }
    for (i = 0; i < 4; ++i)
      upp[i] = log_amesh * uprime[i] + f_upp[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 * uprime[i + 1] + f_upp[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 {
      upin = u_logderiv * uout;
      sum = Norm_LogGrid(match, gamma, u);
      sum = 1.0 / sqrt(sum);
      uout = sum * uout;
      upout = sum * upout;
      upin = sum * upin;
      for (i = 0; i <= match; ++i) {
        u[i] = sum * u[i];
        uprime[i] = sum * uprime[i];
      }
      for (i = match + 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)) {
        *Eig = E;
        dealloc_LogGrid(upp);
        dealloc_LogGrid(f_upp);
        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_Schrodinger_Fixed_Logderiv: More than %d iterations\n", 500);
  *Eig = E;
  dealloc_LogGrid(upp);
  dealloc_LogGrid(f_upp);
  return;
}
```