double R_Hartree(n, charge, Vh)
double n[], charge, Vh[];
{
  int i, Ngrid;
  double log_amesh;
  double *rgrid, *tmp;
  double r, r2, r3, tt;
  double E;
  Ngrid = N_LogGrid();
  log_amesh = log_amesh_LogGrid();
  rgrid = r_LogGrid();
  tmp = alloc_LogGrid();
  for (i = 0; i < Ngrid; ++i) {
    r = rgrid[i];
    r3 = r * r * r;
    tmp[i] = (log_amesh * r3) * n[i];
  }
  Zero_LogGrid(Vh);
  Vh[Ngrid - 1] = charge;
  Vh[Ngrid - 2] = charge;
  Vh[Ngrid - 3] = charge;
  for (i = (Ngrid - 3); i > 0; --i) {
    Vh[i - 1] = Vh[i] + Corrector_In_F(i, tmp);
  }
  for (i = 0; i < Ngrid; ++i) {
    r = rgrid[i];
    r2 = r * r;
    tmp[i] = (log_amesh * r2) * n[i];
  }
  tt = 0.0;
  for (i = (Ngrid - 3); i > 0; --i) {
    tt = tt + Corrector_In_F(i, tmp);
    Vh[i - 1] = Vh[i - 1] - rgrid[i - 1] * tt;
  }
  for (i = 0; i < Ngrid; ++i)
    Vh[i] = Vh[i] / rgrid[i];
  for (i = 0; i < Ngrid; ++i) {
    tmp[i] = n[i] * Vh[i];
  }
  E = Integrate_LogGrid(tmp);
  dealloc_LogGrid(tmp);
  return E;
}


x86 assembly (clang, -O0):
<R_Hartree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   10a0 <N_LogGrid@plt>
mov    %eax,-0x20(%rbp)
mov    $0x0,%al
call   1040 <log_amesh_LogGrid@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    $0x0,%al
call   1060 <r_LogGrid@plt>
cltq
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1090 <alloc_LogGrid@plt>
cltq
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1234 <R_Hartree+0xb4>
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x50(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11d0 <R_Hartree+0x50>
mov    -0x18(%rbp),%rdi
mov    $0x0,%al
call   1050 <Zero_LogGrid@plt>
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x2,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
movsd  -0x10(%rbp),%xmm0
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%ecx
sub    $0x3,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x20(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    12e4 <R_Hartree+0x164>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1030 <Corrector_In_F@plt>
movsd  -0x68(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    128d <R_Hartree+0x10d>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    134a <R_Hartree+0x1ca>
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
mulsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
mulsd  -0x48(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    12eb <R_Hartree+0x16b>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x20(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    13f7 <R_Hartree+0x277>
movsd  -0x58(%rbp),%xmm0
movsd  %xmm0,-0x70(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    $0x0,%al
call   1030 <Corrector_In_F@plt>
movsd  -0x70(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  -0x58(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x18(%rbp),%rax
mov    -0x1c(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    135b <R_Hartree+0x1db>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    143f <R_Hartree+0x2bf>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x30(%rbp),%rax
movslq -0x1c(%rbp),%rcx
divsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    13fe <R_Hartree+0x27e>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    1487 <R_Hartree+0x307>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x38(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1446 <R_Hartree+0x2c6>
mov    -0x38(%rbp),%rdi
mov    $0x0,%al
call   1070 <Integrate_LogGrid@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x0,%al
call   1080 <dealloc_LogGrid@plt>
movsd  -0x60(%rbp),%xmm0
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<R_Hartree>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r13
movsd  %xmm0,0x8(%rsp)
mov    %rdi,%r14
xor    %eax,%eax
call   10a0 <N_LogGrid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <log_amesh_LogGrid@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movapd %xmm0,0x20(%rsp)
xor    %eax,%eax
call   1060 <r_LogGrid@plt>
movslq %eax,%r12
xor    %eax,%eax
call   1090 <alloc_LogGrid@plt>
movapd 0x20(%rsp),%xmm5
movslq %eax,%r15
mov    %ebx,%ebp
test   %ebx,%ebx
mov    %rbx,0x10(%rsp)
jle    1340 <R_Hartree+0x1c0>
cmp    $0x4,%ebx
jae    11ec <R_Hartree+0x6c>
xor    %eax,%eax
jmp    12b7 <R_Hartree+0x137>
lea    (%r15,%rbp,8),%rax
lea    (%r12,%rbp,8),%rcx
lea    (%r14,%rbp,8),%rdx
cmp    %rcx,%r15
setb   %sil
cmp    %rax,%r12
setb   %bl
cmp    %rdx,%r15
setb   %cl
cmp    %r14,%rax
seta   %dl
xor    %eax,%eax
test   %bl,%sil
jne    12b2 <R_Hartree+0x132>
and    %dl,%cl
mov    0x10(%rsp),%rbx
jne    12b7 <R_Hartree+0x137>
mov    %ebp,%eax
and    $0xfffffffc,%eax
movapd %xmm5,%xmm0
unpcklpd %xmm5,%xmm0
lea    0x0(,%rbp,8),%rcx
and    $0xffffffffffffffe0,%rcx
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movupd (%r12,%rdx,1),%xmm1
movupd 0x10(%r12,%rdx,1),%xmm2
movapd %xmm1,%xmm3
mulpd  %xmm1,%xmm3
movapd %xmm2,%xmm4
mulpd  %xmm2,%xmm4
mulpd  %xmm1,%xmm3
mulpd  %xmm2,%xmm4
mulpd  %xmm0,%xmm3
mulpd  %xmm0,%xmm4
movupd (%r14,%rdx,1),%xmm1
mulpd  %xmm3,%xmm1
movupd 0x10(%r14,%rdx,1),%xmm2
mulpd  %xmm4,%xmm2
movupd %xmm1,(%r15,%rdx,1)
movupd %xmm2,0x10(%r15,%rdx,1)
add    $0x20,%rdx
cmp    %rdx,%rcx
jne    1250 <R_Hartree+0xd0>
cmp    %rbp,%rax
jne    12b7 <R_Hartree+0x137>
jmp    1340 <R_Hartree+0x1c0>
mov    0x10(%rsp),%rbx
mov    %rax,%rcx
not    %rcx
test   $0x1,%bpl
je     12e9 <R_Hartree+0x169>
movsd  (%r12,%rax,8),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm5,%xmm1
mulsd  (%r14,%rax,8),%xmm1
movsd  %xmm1,(%r15,%rax,8)
or     $0x1,%rax
add    %rbp,%rcx
je     1340 <R_Hartree+0x1c0>
xchg   %ax,%ax
movsd  (%r12,%rax,8),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm5,%xmm1
mulsd  (%r14,%rax,8),%xmm1
movsd  %xmm1,(%r15,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm5,%xmm1
mulsd  0x8(%r14,%rax,8),%xmm1
movsd  %xmm1,0x8(%r15,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    12f0 <R_Hartree+0x170>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <Zero_LogGrid@plt>
movslq %ebx,%rax
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,-0x8(%r13,%rax,8)
movsd  %xmm0,-0x10(%r13,%rax,8)
lea    -0x3(%rbx),%ecx
mov    %ecx,0x1c(%rsp)
movsd  %xmm0,-0x18(%r13,%rax,8)
cmp    $0x4,%ebx
jl     13bc <R_Hartree+0x23c>
mov    0x1c(%rsp),%ebx
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rbx,8),%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebx,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Corrector_In_F@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  0x8(%rsp),%xmm0
lea    -0x1(%rbx),%rax
mov    %eax,%ecx
movsd  %xmm0,0x0(%r13,%rcx,8)
cmp    $0x1,%rbx
mov    %rax,%rbx
ja     1380 <R_Hartree+0x200>
mov    0x10(%rsp),%rdi
test   %edi,%edi
movapd 0x20(%rsp),%xmm4
jle    15a0 <R_Hartree+0x420>
cmp    $0x4,%edi
jae    13db <R_Hartree+0x25b>
xor    %eax,%eax
jmp    152f <R_Hartree+0x3af>
lea    (%r15,%rbp,8),%rax
lea    (%r12,%rbp,8),%rcx
lea    (%r14,%rbp,8),%rdx
cmp    %rcx,%r15
setb   %sil
cmp    %rax,%r12
setb   %bl
cmp    %rdx,%r15
setb   %cl
cmp    %r14,%rax
seta   %dl
xor    %eax,%eax
test   %bl,%sil
jne    152a <R_Hartree+0x3aa>
and    %dl,%cl
mov    0x10(%rsp),%rdi
jne    152f <R_Hartree+0x3af>
mov    %ebp,%eax
and    $0xfffffffc,%eax
movapd %xmm4,%xmm0
unpcklpd %xmm4,%xmm0
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1930 <R_Hartree+0x7b0>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
movupd (%r12,%rcx,8),%xmm1
movupd 0x10(%r12,%rcx,8),%xmm2
mulpd  %xmm1,%xmm1
mulpd  %xmm2,%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd (%r14,%rcx,8),%xmm3
mulpd  %xmm1,%xmm3
movupd 0x10(%r14,%rcx,8),%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm3,(%r15,%rcx,8)
movupd %xmm1,0x10(%r15,%rcx,8)
movupd 0x20(%r12,%rcx,8),%xmm1
movupd 0x30(%r12,%rcx,8),%xmm2
mulpd  %xmm1,%xmm1
mulpd  %xmm2,%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd 0x20(%r14,%rcx,8),%xmm3
mulpd  %xmm1,%xmm3
movupd 0x30(%r14,%rcx,8),%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm3,0x20(%r15,%rcx,8)
movupd %xmm1,0x30(%r15,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1450 <R_Hartree+0x2d0>
test   $0x1,%dl
je     1523 <R_Hartree+0x3a3>
movupd (%r12,%rcx,8),%xmm1
movupd 0x10(%r12,%rcx,8),%xmm2
mulpd  %xmm1,%xmm1
mulpd  %xmm2,%xmm2
mulpd  %xmm0,%xmm1
mulpd  %xmm0,%xmm2
movupd (%r14,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd 0x10(%r14,%rcx,8),%xmm1
mulpd  %xmm2,%xmm1
movupd %xmm0,(%r15,%rcx,8)
movupd %xmm1,0x10(%r15,%rcx,8)
cmp    %rbp,%rax
jne    152f <R_Hartree+0x3af>
jmp    15a0 <R_Hartree+0x420>
mov    0x10(%rsp),%rdi
mov    %rax,%rcx
not    %rcx
test   $0x1,%bpl
je     1559 <R_Hartree+0x3d9>
movsd  (%r12,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm4,%xmm0
mulsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
or     $0x1,%rax
add    %rbp,%rcx
je     15a0 <R_Hartree+0x420>
xchg   %ax,%ax
movsd  (%r12,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm4,%xmm0
mulsd  (%r14,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
movsd  0x8(%r12,%rax,8),%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm4,%xmm0
mulsd  0x8(%r14,%rax,8),%xmm0
movsd  %xmm0,0x8(%r15,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    1560 <R_Hartree+0x3e0>
cmp    $0x4,%edi
jl     15fe <R_Hartree+0x47e>
mov    0x1c(%rsp),%ebx
xorpd  %xmm2,%xmm2
nopl   (%rax)
movsd  %xmm2,0x8(%rsp)
mov    %ebx,%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <Corrector_In_F@plt>
movsd  0x8(%rsp),%xmm2
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  %xmm0,%xmm2
lea    -0x1(%rbx),%rax
mov    %eax,%ecx
movsd  0x0(%r13,%rcx,8),%xmm0
movsd  (%r12,%rcx,8),%xmm1
mulsd  %xmm2,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,0x0(%r13,%rcx,8)
cmp    $0x1,%rbx
mov    %rax,%rbx
ja     15b0 <R_Hartree+0x430>
mov    0x10(%rsp),%rdi
test   %edi,%edi
jle    18fa <R_Hartree+0x77a>
cmp    $0x1,%edi
je     1629 <R_Hartree+0x4a9>
lea    (%r12,%rbp,8),%rax
cmp    %r13,%rax
jbe    1697 <R_Hartree+0x517>
lea    0x0(,%rbp,8),%rax
add    %r13,%rax
cmp    %rax,%r12
jae    1697 <R_Hartree+0x517>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
test   $0x1,%bpl
je     164f <R_Hartree+0x4cf>
movsd  0x0(%r13,%rax,8),%xmm0
divsd  (%r12,%rax,8),%xmm0
movsd  %xmm0,0x0(%r13,%rax,8)
or     $0x1,%rax
add    %rbp,%rcx
je     1721 <R_Hartree+0x5a1>
nopl   0x0(%rax,%rax,1)
movsd  0x0(%r13,%rax,8),%xmm0
divsd  (%r12,%rax,8),%xmm0
movsd  0x8(%r13,%rax,8),%xmm1
movsd  %xmm0,0x0(%r13,%rax,8)
divsd  0x8(%r12,%rax,8),%xmm1
movsd  %xmm1,0x8(%r13,%rax,8)
add    $0x2,%rax
cmp    %rax,%rbp
jne    1660 <R_Hartree+0x4e0>
jmp    1721 <R_Hartree+0x5a1>
mov    %ebp,%eax
and    $0xfffffffe,%eax
lea    -0x2(%rax),%rdx
mov    %rdx,%rcx
shr    %rcx
add    $0x1,%rcx
test   %rdx,%rdx
je     1940 <R_Hartree+0x7c0>
mov    %rcx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %edx,%edx
nopl   0x0(%rax)
movupd (%r12,%rdx,8),%xmm0
movupd 0x0(%r13,%rdx,8),%xmm1
divpd  %xmm0,%xmm1
movupd 0x10(%r13,%rdx,8),%xmm0
movupd %xmm1,0x0(%r13,%rdx,8)
movupd 0x10(%r12,%rdx,8),%xmm1
divpd  %xmm1,%xmm0
movupd %xmm0,0x10(%r13,%rdx,8)
add    $0x4,%rdx
add    $0xfffffffffffffffe,%rsi
jne    16c0 <R_Hartree+0x540>
test   $0x1,%cl
je     1718 <R_Hartree+0x598>
movupd 0x0(%r13,%rdx,8),%xmm0
movupd (%r12,%rdx,8),%xmm1
divpd  %xmm1,%xmm0
movupd %xmm0,0x0(%r13,%rdx,8)
cmp    %rbp,%rax
jne    162b <R_Hartree+0x4ab>
test   %edi,%edi
jle    18fa <R_Hartree+0x77a>
cmp    $0x4,%edi
jae    17e0 <R_Hartree+0x660>
xor    %eax,%eax
mov    %rax,%rcx
not    %rcx
add    %rbp,%rcx
mov    %rbp,%rdx
and    $0x3,%rdx
je     176d <R_Hartree+0x5ed>
cs nopw 0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
mulsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
add    $0x1,%rax
add    $0xffffffffffffffff,%rdx
jne    1750 <R_Hartree+0x5d0>
cmp    $0x3,%rcx
jb     18fa <R_Hartree+0x77a>
nopw   0x0(%rax,%rax,1)
movsd  (%r14,%rax,8),%xmm0
mulsd  0x0(%r13,%rax,8),%xmm0
movsd  %xmm0,(%r15,%rax,8)
movsd  0x8(%r14,%rax,8),%xmm0
mulsd  0x8(%r13,%rax,8),%xmm0
movsd  %xmm0,0x8(%r15,%rax,8)
movsd  0x10(%r14,%rax,8),%xmm0
mulsd  0x10(%r13,%rax,8),%xmm0
movsd  %xmm0,0x10(%r15,%rax,8)
movsd  0x18(%r14,%rax,8),%xmm0
mulsd  0x18(%r13,%rax,8),%xmm0
movsd  %xmm0,0x18(%r15,%rax,8)
add    $0x4,%rax
cmp    %rax,%rbp
jne    1780 <R_Hartree+0x600>
jmp    18fa <R_Hartree+0x77a>
lea    (%r15,%rbp,8),%rax
lea    (%r14,%rbp,8),%rcx
cmp    %rcx,%r15
setb   %bl
cmp    %r14,%rax
seta   %dl
lea    0x0(,%rbp,8),%rcx
add    %r13,%rcx
cmp    %rcx,%r15
setb   %cl
cmp    %r13,%rax
seta   %sil
xor    %eax,%eax
test   %dl,%bl
jne    1734 <R_Hartree+0x5b4>
and    %sil,%cl
jne    1734 <R_Hartree+0x5b4>
mov    %ebp,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1950 <R_Hartree+0x7d0>
mov    %rdx,%rsi
and    $0xfffffffffffffffe,%rsi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movupd (%r14,%rcx,8),%xmm0
movupd 0x10(%r14,%rcx,8),%xmm1
movupd 0x0(%r13,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r13,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%r15,%rcx,8)
movupd %xmm0,0x10(%r15,%rcx,8)
movupd 0x20(%r14,%rcx,8),%xmm0
movupd 0x30(%r14,%rcx,8),%xmm1
movupd 0x20(%r13,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x30(%r13,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,0x20(%r15,%rcx,8)
movupd %xmm0,0x30(%r15,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rsi
jne    1850 <R_Hartree+0x6d0>
test   $0x1,%dl
je     18f1 <R_Hartree+0x771>
movupd (%r14,%rcx,8),%xmm0
movupd 0x10(%r14,%rcx,8),%xmm1
movupd 0x0(%r13,%rcx,8),%xmm2
mulpd  %xmm0,%xmm2
movupd 0x10(%r13,%rcx,8),%xmm0
mulpd  %xmm1,%xmm0
movupd %xmm2,(%r15,%rcx,8)
movupd %xmm0,0x10(%r15,%rcx,8)
cmp    %rbp,%rax
jne    1734 <R_Hartree+0x5b4>
mov    %r15,%rdi
xor    %eax,%eax
call   1070 <Integrate_LogGrid@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %r15,%rdi
xor    %eax,%eax
call   1080 <dealloc_LogGrid@plt>
movsd  0x8(%rsp),%xmm0
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    14e4 <R_Hartree+0x364>
jmp    1523 <R_Hartree+0x3a3>
xor    %edx,%edx
test   $0x1,%cl
jne    1700 <R_Hartree+0x580>
jmp    1718 <R_Hartree+0x598>
xor    %ecx,%ecx
test   $0x1,%dl
jne    18c1 <R_Hartree+0x741>
jmp    18f1 <R_Hartree+0x771>

LLVM IR (-O0):
define double @R_Hartree(double* %0, double %1, double* %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca double*
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
%16 = alloca double
store double* %0, double** %4
store double %1, double* %5
store double* %2, double** %6
%17 = call i32 (...) @N_LogGrid()
store i32 %17, i32* %8
%18 = call i32 (...) @log_amesh_LogGrid()
%19 = sitofp i32 %18 to double
store double %19, double* %9
%20 = call i32 (...) @r_LogGrid()
%21 = sext i32 %20 to i64
%22 = inttoptr i64 %21 to double*
store double* %22, double** %10
%23 = call i32 (...) @alloc_LogGrid()
%24 = sext i32 %23 to i64
%25 = inttoptr i64 %24 to double*
store double* %25, double** %11
store i32 0, i32* %7
br label %26
26: ; preds = %54, %3
%27 = load i32, i32* %7
%28 = load i32, i32* %8
%29 = icmp slt i32 %27, %28
br i1 %29, label %30, label %57
30: ; preds = %26
%31 = load double*, double** %10
%32 = load i32, i32* %7
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %31, i64 %33
%35 = load double, double* %34
store double %35, double* %12
%36 = load double, double* %12
%37 = load double, double* %12
%38 = fmul double %36, %37
%39 = load double, double* %12
%40 = fmul double %38, %39
store double %40, double* %14
%41 = load double, double* %9
%42 = load double, double* %14
%43 = fmul double %41, %42
%44 = load double*, double** %4
%45 = load i32, i32* %7
%46 = sext i32 %45 to i64
%47 = getelementptr inbounds double, double* %44, i64 %46
%48 = load double, double* %47
%49 = fmul double %43, %48
%50 = load double*, double** %11
%51 = load i32, i32* %7
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds double, double* %50, i64 %52
store double %49, double* %53
br label %54
54: ; preds = %30
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
br label %26
57: ; preds = %26
%58 = load double*, double** %6
%59 = call i32 (double*, ...) bitcast (i32 (...)* @Zero_LogGrid to i32 (double*, ...)*)(double* %58)
%60 = load double, double* %5
%61 = load double*, double** %6
%62 = load i32, i32* %8
%63 = sub nsw i32 %62, 1
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %61, i64 %64
store double %60, double* %65
%66 = load double, double* %5
%67 = load double*, double** %6
%68 = load i32, i32* %8
%69 = sub nsw i32 %68, 2
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds double, double* %67, i64 %70
store double %66, double* %71
%72 = load double, double* %5
%73 = load double*, double** %6
%74 = load i32, i32* %8
%75 = sub nsw i32 %74, 3
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds double, double* %73, i64 %76
store double %72, double* %77
%78 = load i32, i32* %8
%79 = sub nsw i32 %78, 3
store i32 %79, i32* %7
br label %80
80: ; preds = %99, %57
%81 = load i32, i32* %7
%82 = icmp sgt i32 %81, 0
br i1 %82, label %83, label %102
83: ; preds = %80
%84 = load double*, double** %6
%85 = load i32, i32* %7
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds double, double* %84, i64 %86
%88 = load double, double* %87
%89 = load i32, i32* %7
%90 = load double*, double** %11
%91 = call i32 (i32, double*, ...) bitcast (i32 (...)* @Corrector_In_F to i32 (i32, double*, ...)*)(i32 %89, double* %90)
%92 = sitofp i32 %91 to double
%93 = fadd double %88, %92
%94 = load double*, double** %6
%95 = load i32, i32* %7
%96 = sub nsw i32 %95, 1
%97 = sext i32 %96 to i64
%98 = getelementptr inbounds double, double* %94, i64 %97
store double %93, double* %98
br label %99
99: ; preds = %83
%100 = load i32, i32* %7
%101 = add nsw i32 %100, -1
store i32 %101, i32* %7
br label %80
102: ; preds = %80
store i32 0, i32* %7
br label %103
103: ; preds = %129, %102
%104 = load i32, i32* %7
%105 = load i32, i32* %8
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %132
107: ; preds = %103
%108 = load double*, double** %10
%109 = load i32, i32* %7
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds double, double* %108, i64 %110
%112 = load double, double* %111
store double %112, double* %12
%113 = load double, double* %12
%114 = load double, double* %12
%115 = fmul double %113, %114
store double %115, double* %13
%116 = load double, double* %9
%117 = load double, double* %13
%118 = fmul double %116, %117
%119 = load double*, double** %4
%120 = load i32, i32* %7
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %119, i64 %121
%123 = load double, double* %122
%124 = fmul double %118, %123
%125 = load double*, double** %11
%126 = load i32, i32* %7
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double, double* %125, i64 %127
store double %124, double* %128
br label %129
129: ; preds = %107
%130 = load i32, i32* %7
%131 = add nsw i32 %130, 1
store i32 %131, i32* %7
br label %103
132: ; preds = %103
store double 0.000000e+00, double* %15
%133 = load i32, i32* %8
%134 = sub nsw i32 %133, 3
store i32 %134, i32* %7
br label %135
135: ; preds = %165, %132
%136 = load i32, i32* %7
%137 = icmp sgt i32 %136, 0
br i1 %137, label %138, label %168
138: ; preds = %135
%139 = load double, double* %15
%140 = load i32, i32* %7
%141 = load double*, double** %11
%142 = call i32 (i32, double*, ...) bitcast (i32 (...)* @Corrector_In_F to i32 (i32, double*, ...)*)(i32 %140, double* %141)
%143 = sitofp i32 %142 to double
%144 = fadd double %139, %143
store double %144, double* %15
%145 = load double*, double** %6
%146 = load i32, i32* %7
%147 = sub nsw i32 %146, 1
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds double, double* %145, i64 %148
%150 = load double, double* %149
%151 = load double*, double** %10
%152 = load i32, i32* %7
%153 = sub nsw i32 %152, 1
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %151, i64 %154
%156 = load double, double* %155
%157 = load double, double* %15
%158 = fneg double %156
%159 = call double @llvm.fmuladd.f64(double %158, double %157, double %150)
%160 = load double*, double** %6
%161 = load i32, i32* %7
%162 = sub nsw i32 %161, 1
%163 = sext i32 %162 to i64
%164 = getelementptr inbounds double, double* %160, i64 %163
store double %159, double* %164
br label %165
165: ; preds = %138
%166 = load i32, i32* %7
%167 = add nsw i32 %166, -1
store i32 %167, i32* %7
br label %135
168: ; preds = %135
store i32 0, i32* %7
br label %169
169: ; preds = %189, %168
%170 = load i32, i32* %7
%171 = load i32, i32* %8
%172 = icmp slt i32 %170, %171
br i1 %172, label %173, label %192
173: ; preds = %169
%174 = load double*, double** %6
%175 = load i32, i32* %7
%176 = sext i32 %175 to i64
%177 = getelementptr inbounds double, double* %174, i64 %176
%178 = load double, double* %177
%179 = load double*, double** %10
%180 = load i32, i32* %7
%181 = sext i32 %180 to i64
%182 = getelementptr inbounds double, double* %179, i64 %181
%183 = load double, double* %182
%184 = fdiv double %178, %183
%185 = load double*, double** %6
%186 = load i32, i32* %7
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds double, double* %185, i64 %187
store double %184, double* %188
br label %189
189: ; preds = %173
%190 = load i32, i32* %7
%191 = add nsw i32 %190, 1
store i32 %191, i32* %7
br label %169
192: ; preds = %169
store i32 0, i32* %7
br label %193
193: ; preds = %213, %192
%194 = load i32, i32* %7
%195 = load i32, i32* %8
%196 = icmp slt i32 %194, %195
br i1 %196, label %197, label %216
197: ; preds = %193
%198 = load double*, double** %4
%199 = load i32, i32* %7
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds double, double* %198, i64 %200
%202 = load double, double* %201
%203 = load double*, double** %6
%204 = load i32, i32* %7
%205 = sext i32 %204 to i64
%206 = getelementptr inbounds double, double* %203, i64 %205
%207 = load double, double* %206
%208 = fmul double %202, %207
%209 = load double*, double** %11
%210 = load i32, i32* %7
%211 = sext i32 %210 to i64
%212 = getelementptr inbounds double, double* %209, i64 %211
store double %208, double* %212
br label %213
213: ; preds = %197
%214 = load i32, i32* %7
%215 = add nsw i32 %214, 1
store i32 %215, i32* %7
br label %193
216: ; preds = %193
%217 = load double*, double** %11
%218 = call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %217)
%219 = sitofp i32 %218 to double
store double %219, double* %16
%220 = load double*, double** %11
%221 = call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %220)
%222 = load double, double* %16
ret double %222
}

LLVM IR (-O2):
define double @R_Hartree(double* nocapture %0, double %1, double* %2) {
%4 = tail call i32 (...) @N_LogGrid()
%5 = tail call i32 (...) @log_amesh_LogGrid()
%6 = sitofp i32 %5 to double
%7 = tail call i32 (...) @r_LogGrid()
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to double*
%10 = inttoptr i64 %8 to i8*
%11 = tail call i32 (...) @alloc_LogGrid()
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to double*
%14 = inttoptr i64 %12 to i8*
%15 = icmp sgt i32 %4, 0
br i1 %15, label %16, label %112
16: ; preds = %3
%17 = zext i32 %4 to i64
%18 = icmp ult i32 %4, 4
br i1 %18, label %69, label %19
19: ; preds = %16
%20 = getelementptr double, double* %13, i64 %17
%21 = bitcast double* %20 to i8*
%22 = getelementptr double, double* %9, i64 %17
%23 = bitcast double* %22 to i8*
%24 = getelementptr double, double* %0, i64 %17
%25 = bitcast double* %24 to i8*
%26 = icmp ult i8* %14, %23
%27 = icmp ult i8* %10, %21
%28 = and i1 %26, %27
%29 = icmp ult i8* %14, %25
%30 = icmp ugt double* %20, %0
%31 = and i1 %29, %30
%32 = or i1 %28, %31
br i1 %32, label %69, label %33
33: ; preds = %19
%34 = and i64 %17, 4294967292
%35 = insertelement <2 x double> poison, double %6, i64 0
%36 = shufflevector <2 x double> %35, <2 x double> poison, <2 x i32> zeroinitializer
%37 = insertelement <2 x double> poison, double %6, i64 0
%38 = shufflevector <2 x double> %37, <2 x double> poison, <2 x i32> zeroinitializer
br label %39
39: ; preds = %39, %33
%40 = phi i64 [ 0, %33 ], [ %65, %39 ]
%41 = getelementptr inbounds double, double* %9, i64 %40
%42 = bitcast double* %41 to <2 x double>*
%43 = load <2 x double>, <2 x double>* %42
%44 = getelementptr inbounds double, double* %41, i64 2
%45 = bitcast double* %44 to <2 x double>*
%46 = load <2 x double>, <2 x double>* %45
%47 = fmul <2 x double> %43, %43
%48 = fmul <2 x double> %46, %46
%49 = fmul <2 x double> %43, %47
%50 = fmul <2 x double> %46, %48
%51 = fmul <2 x double> %49, %36
%52 = fmul <2 x double> %50, %38
%53 = getelementptr inbounds double, double* %0, i64 %40
%54 = bitcast double* %53 to <2 x double>*
%55 = load <2 x double>, <2 x double>* %54
%56 = getelementptr inbounds double, double* %53, i64 2
%57 = bitcast double* %56 to <2 x double>*
%58 = load <2 x double>, <2 x double>* %57
%59 = fmul <2 x double> %55, %51
%60 = fmul <2 x double> %58, %52
%61 = getelementptr inbounds double, double* %13, i64 %40
%62 = bitcast double* %61 to <2 x double>*
store <2 x double> %59, <2 x double>* %62
%63 = getelementptr inbounds double, double* %61, i64 2
%64 = bitcast double* %63 to <2 x double>*
store <2 x double> %60, <2 x double>* %64
%65 = add nuw i64 %40, 4
%66 = icmp eq i64 %65, %34
br i1 %66, label %67, label %39
67: ; preds = %39
%68 = icmp eq i64 %34, %17
br i1 %68, label %112, label %69
69: ; preds = %19, %16, %67
%70 = phi i64 [ 0, %19 ], [ 0, %16 ], [ %34, %67 ]
%71 = xor i64 %70, -1
%72 = and i64 %17, 1
%73 = icmp eq i64 %72, 0
br i1 %73, label %85, label %74
74: ; preds = %69
%75 = getelementptr inbounds double, double* %9, i64 %70
%76 = load double, double* %75
%77 = fmul double %76, %76
%78 = fmul double %76, %77
%79 = fmul double %78, %6
%80 = getelementptr inbounds double, double* %0, i64 %70
%81 = load double, double* %80
%82 = fmul double %81, %79
%83 = getelementptr inbounds double, double* %13, i64 %70
store double %82, double* %83
%84 = or i64 %70, 1
br label %85
85: ; preds = %74, %69
%86 = phi i64 [ %70, %69 ], [ %84, %74 ]
%87 = sub nsw i64 0, %17
%88 = icmp eq i64 %71, %87
br i1 %88, label %112, label %89
89: ; preds = %85, %89
%90 = phi i64 [ %110, %89 ], [ %86, %85 ]
%91 = getelementptr inbounds double, double* %9, i64 %90
%92 = load double, double* %91
%93 = fmul double %92, %92
%94 = fmul double %92, %93
%95 = fmul double %94, %6
%96 = getelementptr inbounds double, double* %0, i64 %90
%97 = load double, double* %96
%98 = fmul double %97, %95
%99 = getelementptr inbounds double, double* %13, i64 %90
store double %98, double* %99
%100 = add nuw nsw i64 %90, 1
%101 = getelementptr inbounds double, double* %9, i64 %100
%102 = load double, double* %101
%103 = fmul double %102, %102
%104 = fmul double %102, %103
%105 = fmul double %104, %6
%106 = getelementptr inbounds double, double* %0, i64 %100
%107 = load double, double* %106
%108 = fmul double %107, %105
%109 = getelementptr inbounds double, double* %13, i64 %100
store double %108, double* %109
%110 = add nuw nsw i64 %90, 2
%111 = icmp eq i64 %110, %17
br i1 %111, label %112, label %89
112: ; preds = %85, %89, %67, %3
%113 = tail call i32 (double*, ...) bitcast (i32 (...)* @Zero_LogGrid to i32 (double*, ...)*)(double* %2)
%114 = add nsw i32 %4, -1
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %2, i64 %115
store double %1, double* %116
%117 = add nsw i32 %4, -2
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds double, double* %2, i64 %118
store double %1, double* %119
%120 = add nsw i32 %4, -3
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds double, double* %2, i64 %121
store double %1, double* %122
%123 = icmp sgt i32 %4, 3
br i1 %123, label %124, label %126
124: ; preds = %112
%125 = zext i32 %120 to i64
br label %255
126: ; preds = %255, %112
br i1 %15, label %127, label %267
127: ; preds = %126
%128 = zext i32 %4 to i64
%129 = icmp ult i32 %4, 4
br i1 %129, label %236, label %130
130: ; preds = %127
%131 = getelementptr double, double* %13, i64 %128
%132 = bitcast double* %131 to i8*
%133 = getelementptr double, double* %9, i64 %128
%134 = bitcast double* %133 to i8*
%135 = getelementptr double, double* %0, i64 %128
%136 = bitcast double* %135 to i8*
%137 = icmp ult i8* %14, %134
%138 = icmp ult i8* %10, %132
%139 = and i1 %137, %138
%140 = icmp ult i8* %14, %136
%141 = icmp ugt double* %131, %0
%142 = and i1 %140, %141
%143 = or i1 %139, %142
br i1 %143, label %236, label %144
144: ; preds = %130
%145 = and i64 %128, 4294967292
%146 = insertelement <2 x double> poison, double %6, i64 0
%147 = shufflevector <2 x double> %146, <2 x double> poison, <2 x i32> zeroinitializer
%148 = insertelement <2 x double> poison, double %6, i64 0
%149 = shufflevector <2 x double> %148, <2 x double> poison, <2 x i32> zeroinitializer
%150 = add nsw i64 %145, -4
%151 = lshr exact i64 %150, 2
%152 = add nuw nsw i64 %151, 1
%153 = and i64 %152, 1
%154 = icmp eq i64 %150, 0
br i1 %154, label %208, label %155
155: ; preds = %144
%156 = and i64 %152, 9223372036854775806
br label %157
157: ; preds = %157, %155
%158 = phi i64 [ 0, %155 ], [ %205, %157 ]
%159 = phi i64 [ 0, %155 ], [ %206, %157 ]
%160 = getelementptr inbounds double, double* %9, i64 %158
%161 = bitcast double* %160 to <2 x double>*
%162 = load <2 x double>, <2 x double>* %161
%163 = getelementptr inbounds double, double* %160, i64 2
%164 = bitcast double* %163 to <2 x double>*
%165 = load <2 x double>, <2 x double>* %164
%166 = fmul <2 x double> %162, %162
%167 = fmul <2 x double> %165, %165
%168 = fmul <2 x double> %166, %147
%169 = fmul <2 x double> %167, %149
%170 = getelementptr inbounds double, double* %0, i64 %158
%171 = bitcast double* %170 to <2 x double>*
%172 = load <2 x double>, <2 x double>* %171
%173 = getelementptr inbounds double, double* %170, i64 2
%174 = bitcast double* %173 to <2 x double>*
%175 = load <2 x double>, <2 x double>* %174
%176 = fmul <2 x double> %172, %168
%177 = fmul <2 x double> %175, %169
%178 = getelementptr inbounds double, double* %13, i64 %158
%179 = bitcast double* %178 to <2 x double>*
store <2 x double> %176, <2 x double>* %179
%180 = getelementptr inbounds double, double* %178, i64 2
%181 = bitcast double* %180 to <2 x double>*
store <2 x double> %177, <2 x double>* %181
%182 = or i64 %158, 4
%183 = getelementptr inbounds double, double* %9, i64 %182
%184 = bitcast double* %183 to <2 x double>*
%185 = load <2 x double>, <2 x double>* %184
%186 = getelementptr inbounds double, double* %183, i64 2
%187 = bitcast double* %186 to <2 x double>*
%188 = load <2 x double>, <2 x double>* %187
%189 = fmul <2 x double> %185, %185
%190 = fmul <2 x double> %188, %188
%191 = fmul <2 x double> %189, %147
%192 = fmul <2 x double> %190, %149
%193 = getelementptr inbounds double, double* %0, i64 %182
%194 = bitcast double* %193 to <2 x double>*
%195 = load <2 x double>, <2 x double>* %194
%196 = getelementptr inbounds double, double* %193, i64 2
%197 = bitcast double* %196 to <2 x double>*
%198 = load <2 x double>, <2 x double>* %197
%199 = fmul <2 x double> %195, %191
%200 = fmul <2 x double> %198, %192
%201 = getelementptr inbounds double, double* %13, i64 %182
%202 = bitcast double* %201 to <2 x double>*
store <2 x double> %199, <2 x double>* %202
%203 = getelementptr inbounds double, double* %201, i64 2
%204 = bitcast double* %203 to <2 x double>*
store <2 x double> %200, <2 x double>* %204
%205 = add nuw i64 %158, 8
%206 = add i64 %159, 2
%207 = icmp eq i64 %206, %156
br i1 %207, label %208, label %157
208: ; preds = %157, %144
%209 = phi i64 [ 0, %144 ], [ %205, %157 ]
%210 = icmp eq i64 %153, 0
br i1 %210, label %234, label %211
211: ; preds = %208
%212 = getelementptr inbounds double, double* %9, i64 %209
%213 = bitcast double* %212 to <2 x double>*
%214 = load <2 x double>, <2 x double>* %213
%215 = getelementptr inbounds double, double* %212, i64 2
%216 = bitcast double* %215 to <2 x double>*
%217 = load <2 x double>, <2 x double>* %216
%218 = fmul <2 x double> %214, %214
%219 = fmul <2 x double> %217, %217
%220 = fmul <2 x double> %218, %147
%221 = fmul <2 x double> %219, %149
%222 = getelementptr inbounds double, double* %0, i64 %209
%223 = bitcast double* %222 to <2 x double>*
%224 = load <2 x double>, <2 x double>* %223
%225 = getelementptr inbounds double, double* %222, i64 2
%226 = bitcast double* %225 to <2 x double>*
%227 = load <2 x double>, <2 x double>* %226
%228 = fmul <2 x double> %224, %220
%229 = fmul <2 x double> %227, %221
%230 = getelementptr inbounds double, double* %13, i64 %209
%231 = bitcast double* %230 to <2 x double>*
store <2 x double> %228, <2 x double>* %231
%232 = getelementptr inbounds double, double* %230, i64 2
%233 = bitcast double* %232 to <2 x double>*
store <2 x double> %229, <2 x double>* %233
br label %234
234: ; preds = %208, %211
%235 = icmp eq i64 %145, %128
br i1 %235, label %267, label %236
236: ; preds = %130, %127, %234
%237 = phi i64 [ 0, %130 ], [ 0, %127 ], [ %145, %234 ]
%238 = xor i64 %237, -1
%239 = and i64 %128, 1
%240 = icmp eq i64 %239, 0
br i1 %240, label %251, label %241
241: ; preds = %236
%242 = getelementptr inbounds double, double* %9, i64 %237
%243 = load double, double* %242
%244 = fmul double %243, %243
%245 = fmul double %244, %6
%246 = getelementptr inbounds double, double* %0, i64 %237
%247 = load double, double* %246
%248 = fmul double %247, %245
%249 = getelementptr inbounds double, double* %13, i64 %237
store double %248, double* %249
%250 = or i64 %237, 1
br label %251
251: ; preds = %241, %236
%252 = phi i64 [ %237, %236 ], [ %250, %241 ]
%253 = sub nsw i64 0, %128
%254 = icmp eq i64 %238, %253
br i1 %254, label %267, label %270
255: ; preds = %124, %255
%256 = phi i64 [ %125, %124 ], [ %263, %255 ]
%257 = getelementptr inbounds double, double* %2, i64 %256
%258 = load double, double* %257
%259 = trunc i64 %256 to i32
%260 = tail call i32 (i32, double*, ...) bitcast (i32 (...)* @Corrector_In_F to i32 (i32, double*, ...)*)(i32 %259, double* %13)
%261 = sitofp i32 %260 to double
%262 = fadd double %258, %261
%263 = add nsw i64 %256, -1
%264 = and i64 %263, 4294967295
%265 = getelementptr inbounds double, double* %2, i64 %264
store double %262, double* %265
%266 = icmp ugt i64 %256, 1
br i1 %266, label %255, label %126
267: ; preds = %251, %270, %234, %126
br i1 %123, label %268, label %291
268: ; preds = %267
%269 = zext i32 %120 to i64
br label %364
270: ; preds = %251, %270
%271 = phi i64 [ %289, %270 ], [ %252, %251 ]
%272 = getelementptr inbounds double, double* %9, i64 %271
%273 = load double, double* %272
%274 = fmul double %273, %273
%275 = fmul double %274, %6
%276 = getelementptr inbounds double, double* %0, i64 %271
%277 = load double, double* %276
%278 = fmul double %277, %275
%279 = getelementptr inbounds double, double* %13, i64 %271
store double %278, double* %279
%280 = add nuw nsw i64 %271, 1
%281 = getelementptr inbounds double, double* %9, i64 %280
%282 = load double, double* %281
%283 = fmul double %282, %282
%284 = fmul double %283, %6
%285 = getelementptr inbounds double, double* %0, i64 %280
%286 = load double, double* %285
%287 = fmul double %286, %284
%288 = getelementptr inbounds double, double* %13, i64 %280
store double %287, double* %288
%289 = add nuw nsw i64 %271, 2
%290 = icmp eq i64 %289, %128
br i1 %290, label %267, label %270
291: ; preds = %364, %267
br i1 %15, label %292, label %540
292: ; preds = %291
%293 = zext i32 %4 to i64
%294 = icmp eq i32 %4, 1
br i1 %294, label %348, label %295
295: ; preds = %292
%296 = getelementptr double, double* %2, i64 %293
%297 = bitcast double* %296 to i8*
%298 = getelementptr double, double* %9, i64 %293
%299 = icmp ugt double* %298, %2
%300 = icmp ult i8* %10, %297
%301 = and i1 %299, %300
br i1 %301, label %348, label %302
302: ; preds = %295
%303 = and i64 %293, 4294967294
%304 = add nsw i64 %303, -2
%305 = lshr exact i64 %304, 1
%306 = add nuw i64 %305, 1
%307 = and i64 %306, 1
%308 = icmp eq i64 %304, 0
br i1 %308, label %334, label %309
309: ; preds = %302
%310 = and i64 %306, -2
br label %311
311: ; preds = %311, %309
%312 = phi i64 [ 0, %309 ], [ %331, %311 ]
%313 = phi i64 [ 0, %309 ], [ %332, %311 ]
%314 = getelementptr inbounds double, double* %2, i64 %312
%315 = bitcast double* %314 to <2 x double>*
%316 = load <2 x double>, <2 x double>* %315
%317 = getelementptr inbounds double, double* %9, i64 %312
%318 = bitcast double* %317 to <2 x double>*
%319 = load <2 x double>, <2 x double>* %318
%320 = fdiv <2 x double> %316, %319
%321 = bitcast double* %314 to <2 x double>*
store <2 x double> %320, <2 x double>* %321
%322 = or i64 %312, 2
%323 = getelementptr inbounds double, double* %2, i64 %322
%324 = bitcast double* %323 to <2 x double>*
%325 = load <2 x double>, <2 x double>* %324
%326 = getelementptr inbounds double, double* %9, i64 %322
%327 = bitcast double* %326 to <2 x double>*
%328 = load <2 x double>, <2 x double>* %327
%329 = fdiv <2 x double> %325, %328
%330 = bitcast double* %323 to <2 x double>*
store <2 x double> %329, <2 x double>* %330
%331 = add nuw i64 %312, 4
%332 = add nuw i64 %313, 2
%333 = icmp eq i64 %332, %310
br i1 %333, label %334, label %311
334: ; preds = %311, %302
%335 = phi i64 [ 0, %302 ], [ %331, %311 ]
%336 = icmp eq i64 %307, 0
br i1 %336, label %346, label %337
337: ; preds = %334
%338 = getelementptr inbounds double, double* %2, i64 %335
%339 = bitcast double* %338 to <2 x double>*
%340 = load <2 x double>, <2 x double>* %339
%341 = getelementptr inbounds double, double* %9, i64 %335
%342 = bitcast double* %341 to <2 x double>*
%343 = load <2 x double>, <2 x double>* %342
%344 = fdiv <2 x double> %340, %343
%345 = bitcast double* %338 to <2 x double>*
store <2 x double> %344, <2 x double>* %345
br label %346
346: ; preds = %334, %337
%347 = icmp eq i64 %303, %293
br i1 %347, label %380, label %348
348: ; preds = %295, %292, %346
%349 = phi i64 [ 0, %295 ], [ 0, %292 ], [ %303, %346 ]
%350 = xor i64 %349, -1
%351 = and i64 %293, 1
%352 = icmp eq i64 %351, 0
br i1 %352, label %360, label %353
353: ; preds = %348
%354 = getelementptr inbounds double, double* %2, i64 %349
%355 = load double, double* %354
%356 = getelementptr inbounds double, double* %9, i64 %349
%357 = load double, double* %356
%358 = fdiv double %355, %357
store double %358, double* %354
%359 = or i64 %349, 1
br label %360
360: ; preds = %353, %348
%361 = phi i64 [ %349, %348 ], [ %359, %353 ]
%362 = sub nsw i64 0, %293
%363 = icmp eq i64 %350, %362
br i1 %363, label %380, label %494
364: ; preds = %268, %364
%365 = phi i64 [ %269, %268 ], [ %371, %364 ]
%366 = phi double [ 0.000000e+00, %268 ], [ %370, %364 ]
%367 = trunc i64 %365 to i32
%368 = tail call i32 (i32, double*, ...) bitcast (i32 (...)* @Corrector_In_F to i32 (i32, double*, ...)*)(i32 %367, double* %13)
%369 = sitofp i32 %368 to double
%370 = fadd double %366, %369
%371 = add nsw i64 %365, -1
%372 = and i64 %371, 4294967295
%373 = getelementptr inbounds double, double* %2, i64 %372
%374 = load double, double* %373
%375 = getelementptr inbounds double, double* %9, i64 %372
%376 = load double, double* %375
%377 = fneg double %376
%378 = tail call double @llvm.fmuladd.f64(double %377, double %370, double %374)
store double %378, double* %373
%379 = icmp ugt i64 %365, 1
br i1 %379, label %364, label %291
380: ; preds = %360, %494, %346
br i1 %15, label %381, label %540
381: ; preds = %380
%382 = zext i32 %4 to i64
%383 = icmp ult i32 %4, 4
br i1 %383, label %473, label %384
384: ; preds = %381
%385 = getelementptr double, double* %13, i64 %293
%386 = getelementptr double, double* %0, i64 %293
%387 = bitcast double* %386 to i8*
%388 = getelementptr double, double* %2, i64 %293
%389 = bitcast double* %388 to i8*
%390 = icmp ult i8* %14, %387
%391 = icmp ugt double* %385, %0
%392 = and i1 %390, %391
%393 = icmp ult i8* %14, %389
%394 = icmp ugt double* %385, %2
%395 = and i1 %393, %394
%396 = or i1 %392, %395
br i1 %396, label %473, label %397
397: ; preds = %384
%398 = and i64 %293, 4294967292
%399 = add nsw i64 %398, -4
%400 = lshr exact i64 %399, 2
%401 = add nuw nsw i64 %400, 1
%402 = and i64 %401, 1
%403 = icmp eq i64 %399, 0
br i1 %403, label %449, label %404
404: ; preds = %397
%405 = and i64 %401, 9223372036854775806
br label %406
406: ; preds = %406, %404
%407 = phi i64 [ 0, %404 ], [ %446, %406 ]
%408 = phi i64 [ 0, %404 ], [ %447, %406 ]
%409 = getelementptr inbounds double, double* %0, i64 %407
%410 = bitcast double* %409 to <2 x double>*
%411 = load <2 x double>, <2 x double>* %410
%412 = getelementptr inbounds double, double* %409, i64 2
%413 = bitcast double* %412 to <2 x double>*
%414 = load <2 x double>, <2 x double>* %413
%415 = getelementptr inbounds double, double* %2, i64 %407
%416 = bitcast double* %415 to <2 x double>*
%417 = load <2 x double>, <2 x double>* %416
%418 = getelementptr inbounds double, double* %415, i64 2
%419 = bitcast double* %418 to <2 x double>*
%420 = load <2 x double>, <2 x double>* %419
%421 = fmul <2 x double> %411, %417
%422 = fmul <2 x double> %414, %420
%423 = getelementptr inbounds double, double* %13, i64 %407
%424 = bitcast double* %423 to <2 x double>*
store <2 x double> %421, <2 x double>* %424
%425 = getelementptr inbounds double, double* %423, i64 2
%426 = bitcast double* %425 to <2 x double>*
store <2 x double> %422, <2 x double>* %426
%427 = or i64 %407, 4
%428 = getelementptr inbounds double, double* %0, i64 %427
%429 = bitcast double* %428 to <2 x double>*
%430 = load <2 x double>, <2 x double>* %429
%431 = getelementptr inbounds double, double* %428, i64 2
%432 = bitcast double* %431 to <2 x double>*
%433 = load <2 x double>, <2 x double>* %432
%434 = getelementptr inbounds double, double* %2, i64 %427
%435 = bitcast double* %434 to <2 x double>*
%436 = load <2 x double>, <2 x double>* %435
%437 = getelementptr inbounds double, double* %434, i64 2
%438 = bitcast double* %437 to <2 x double>*
%439 = load <2 x double>, <2 x double>* %438
%440 = fmul <2 x double> %430, %436
%441 = fmul <2 x double> %433, %439
%442 = getelementptr inbounds double, double* %13, i64 %427
%443 = bitcast double* %442 to <2 x double>*
store <2 x double> %440, <2 x double>* %443
%444 = getelementptr inbounds double, double* %442, i64 2
%445 = bitcast double* %444 to <2 x double>*
store <2 x double> %441, <2 x double>* %445
%446 = add nuw i64 %407, 8
%447 = add i64 %408, 2
%448 = icmp eq i64 %447, %405
br i1 %448, label %449, label %406
449: ; preds = %406, %397
%450 = phi i64 [ 0, %397 ], [ %446, %406 ]
%451 = icmp eq i64 %402, 0
br i1 %451, label %471, label %452
452: ; preds = %449
%453 = getelementptr inbounds double, double* %0, i64 %450
%454 = bitcast double* %453 to <2 x double>*
%455 = load <2 x double>, <2 x double>* %454
%456 = getelementptr inbounds double, double* %453, i64 2
%457 = bitcast double* %456 to <2 x double>*
%458 = load <2 x double>, <2 x double>* %457
%459 = getelementptr inbounds double, double* %2, i64 %450
%460 = bitcast double* %459 to <2 x double>*
%461 = load <2 x double>, <2 x double>* %460
%462 = getelementptr inbounds double, double* %459, i64 2
%463 = bitcast double* %462 to <2 x double>*
%464 = load <2 x double>, <2 x double>* %463
%465 = fmul <2 x double> %455, %461
%466 = fmul <2 x double> %458, %464
%467 = getelementptr inbounds double, double* %13, i64 %450
%468 = bitcast double* %467 to <2 x double>*
store <2 x double> %465, <2 x double>* %468
%469 = getelementptr inbounds double, double* %467, i64 2
%470 = bitcast double* %469 to <2 x double>*
store <2 x double> %466, <2 x double>* %470
br label %471
471: ; preds = %449, %452
%472 = icmp eq i64 %398, %293
br i1 %472, label %540, label %473
473: ; preds = %384, %381, %471
%474 = phi i64 [ 0, %384 ], [ 0, %381 ], [ %398, %471 ]
%475 = xor i64 %474, -1
%476 = add nsw i64 %475, %293
%477 = and i64 %293, 3
%478 = icmp eq i64 %477, 0
br i1 %478, label %491, label %479
479: ; preds = %473, %479
%480 = phi i64 [ %488, %479 ], [ %474, %473 ]
%481 = phi i64 [ %489, %479 ], [ 0, %473 ]
%482 = getelementptr inbounds double, double* %0, i64 %480
%483 = load double, double* %482
%484 = getelementptr inbounds double, double* %2, i64 %480
%485 = load double, double* %484
%486 = fmul double %483, %485
%487 = getelementptr inbounds double, double* %13, i64 %480
store double %486, double* %487
%488 = add nuw nsw i64 %480, 1
%489 = add i64 %481, 1
%490 = icmp eq i64 %489, %477
br i1 %490, label %491, label %479
491: ; preds = %479, %473
%492 = phi i64 [ %474, %473 ], [ %488, %479 ]
%493 = icmp ult i64 %476, 3
br i1 %493, label %540, label %509
494: ; preds = %360, %494
%495 = phi i64 [ %507, %494 ], [ %361, %360 ]
%496 = getelementptr inbounds double, double* %2, i64 %495
%497 = load double, double* %496
%498 = getelementptr inbounds double, double* %9, i64 %495
%499 = load double, double* %498
%500 = fdiv double %497, %499
store double %500, double* %496
%501 = add nuw nsw i64 %495, 1
%502 = getelementptr inbounds double, double* %2, i64 %501
%503 = load double, double* %502
%504 = getelementptr inbounds double, double* %9, i64 %501
%505 = load double, double* %504
%506 = fdiv double %503, %505
store double %506, double* %502
%507 = add nuw nsw i64 %495, 2
%508 = icmp eq i64 %507, %293
br i1 %508, label %380, label %494
509: ; preds = %491, %509
%510 = phi i64 [ %538, %509 ], [ %492, %491 ]
%511 = getelementptr inbounds double, double* %0, i64 %510
%512 = load double, double* %511
%513 = getelementptr inbounds double, double* %2, i64 %510
%514 = load double, double* %513
%515 = fmul double %512, %514
%516 = getelementptr inbounds double, double* %13, i64 %510
store double %515, double* %516
%517 = add nuw nsw i64 %510, 1
%518 = getelementptr inbounds double, double* %0, i64 %517
%519 = load double, double* %518
%520 = getelementptr inbounds double, double* %2, i64 %517
%521 = load double, double* %520
%522 = fmul double %519, %521
%523 = getelementptr inbounds double, double* %13, i64 %517
store double %522, double* %523
%524 = add nuw nsw i64 %510, 2
%525 = getelementptr inbounds double, double* %0, i64 %524
%526 = load double, double* %525
%527 = getelementptr inbounds double, double* %2, i64 %524
%528 = load double, double* %527
%529 = fmul double %526, %528
%530 = getelementptr inbounds double, double* %13, i64 %524
store double %529, double* %530
%531 = add nuw nsw i64 %510, 3
%532 = getelementptr inbounds double, double* %0, i64 %531
%533 = load double, double* %532
%534 = getelementptr inbounds double, double* %2, i64 %531
%535 = load double, double* %534
%536 = fmul double %533, %535
%537 = getelementptr inbounds double, double* %13, i64 %531
store double %536, double* %537
%538 = add nuw nsw i64 %510, 4
%539 = icmp eq i64 %538, %382
br i1 %539, label %540, label %509
540: ; preds = %491, %509, %471, %291, %380
%541 = tail call i32 (double*, ...) bitcast (i32 (...)* @Integrate_LogGrid to i32 (double*, ...)*)(double* %13)
%542 = sitofp i32 %541 to double
%543 = tail call i32 (double*, ...) bitcast (i32 (...)* @dealloc_LogGrid to i32 (double*, ...)*)(double* %13)
ret double %542
}