// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/channel.cc
// Function: PORE::getSimplifiedPocketInfo(ATOM_NETWORK*, std::vector<double, std::allocator<double>>*)
void PORE::getSimplifiedPocketInfo(ATOM_NETWORK *atmNet, std::vector <double> *pocketInfo){
    
    double maxdi;
    double maxid = 0;
    pocketInfo->clear();
    
    for(unsigned int i=0; i<nodes.size(); i++)
    {
        if(i==0)
        {
            maxdi = nodes.at(i).max_radius;
        }
        else{
            if(nodes.at(i).max_radius > maxdi) 
            {
                maxdi = nodes.at(i).max_radius;
                maxid = i;
            };
        };
    };
    
    maxdi=maxdi*2.0;
    
    pocketInfo->push_back(maxdi);
    
    Point pt = atmNet->xyz_to_abc(nodes.at(maxid).x, nodes.at(maxid).y, nodes.at(maxid).z);
    pt = atmNet->shiftABCInUC(pt);
    pocketInfo->push_back(pt[0]); pocketInfo->push_back(pt[1]); pocketInfo->push_back(pt[2]);
    
    double pocketR; // radii of pocket (sphere that encapsulates all nodes in the pocket)
    
    pocketR = maxdi*0.5;
    for(unsigned int i=0; i<nodes.size(); i++)
    {
        double dist = calcEuclideanDistance(nodes.at(maxid).x, nodes.at(maxid).y, nodes.at(maxid).z, nodes.at(i).x, nodes.at(i).y, nodes.at(i).z);
        dist = dist + nodes.at(i).max_radius;
        
        if(dist > pocketR) pocketR = dist;
        
    };
    
    pocketInfo->push_back(pocketR);
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rdx, %rbp
movq %rsi, %r13
movq %rdi, %r14
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x54427
movq %rax, 0x8(%rbp)
leaq 0x60(%r14), %r15
xorl %r12d, %r12d
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
pushq $0x48
popq %rbx
movl %r12d, %r12d
movq 0x68(%r14), %rax
subq 0x60(%r14), %rax
cqto
idivq %rbx
cmpq %r12, %rax
jbe 0x54499
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x38(%rax), %xmm0
testq %r12, %r12
je 0x5448e
ucomisd 0x20(%rsp), %xmm0
jbe 0x54494
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x38(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
cvtsi2sd %r12, %xmm0
movapd %xmm0, 0x30(%rsp)
jmp 0x54494
movsd %xmm0, 0x20(%rsp)
incl %r12d
jmp 0x54439
movsd 0x20(%rsp), %xmm0
addsd %xmm0, %xmm0
leaq 0x60(%rsp), %rsi
movsd %xmm0, (%rsi)
movq %rbp, %rdi
callq 0xac88
movapd 0x30(%rsp), %xmm0
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xaf0c2(%rip), %xmm0    # 0x103590
cvttsd2si %xmm0, %r12
andq %rcx, %r12
orq %rax, %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x18(%rax), %xmm2
movq %rbp, 0x28(%rsp)
leaq 0x80(%rsp), %rbp
movq %rbp, %rdi
movq %r13, %rsi
movsd 0x20(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
callq 0x3f1ce
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movaps (%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r13, %rsi
leaq 0x68(%rsp), %r13
movq %r13, %rdi
callq 0x3f94a
movq 0x10(%r13), %rax
movq %rax, 0x10(%rbp)
movups (%r13), %xmm0
movaps %xmm0, (%rbp)
xorl %r13d, %r13d
movq %rbp, %rdi
xorl %esi, %esi
callq 0x63c78
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xac88
pushq $0x1
popq %rsi
movq %rbp, %rdi
callq 0x63c78
movq 0x28(%rsp), %rdi
movq %rax, %rsi
callq 0xac88
pushq $0x2
popq %rsi
movq %rbp, %rdi
movq 0x28(%rsp), %rbp
callq 0x63c78
movq %rbp, %rdi
movq %rax, %rsi
callq 0xac88
leaq 0x60(%rsp), %rax
movsd (%rax), %xmm0
mulsd 0xa7a6f(%rip), %xmm0    # 0xfc038
movsd %xmm0, 0x40(%rsp)
leaq 0x68(%rsp), %rax
movsd %xmm0, (%rax)
movl %r13d, %r13d
movq 0x68(%r14), %rax
subq 0x60(%r14), %rax
cqto
idivq %rbx
cmpq %r13, %rax
jbe 0x546ca
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x30(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0xabe2
movsd 0x18(%rax), %xmm0
movsd %xmm0, 0x58(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xabe2
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x50(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xabe2
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xabe2
movsd 0x18(%rax), %xmm5
movsd 0x20(%rsp), %xmm0
movsd 0x30(%rsp), %xmm1
movsd 0x58(%rsp), %xmm2
movsd 0x50(%rsp), %xmm3
movsd 0x48(%rsp), %xmm4
callq 0x64934
movsd %xmm0, 0x20(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0xabe2
movsd 0x20(%rsp), %xmm0
addsd 0x38(%rax), %xmm0
ucomisd 0x40(%rsp), %xmm0
jbe 0x546c2
movsd %xmm0, 0x68(%rsp)
movsd %xmm0, 0x40(%rsp)
incl %r13d
jmp 0x545d8
leaq 0x68(%rsp), %rsi
movq %rbp, %rdi
callq 0xac88
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop