// File: /workspace/github_cpp_makefile_star2_O1/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 $0x58, %rsp
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r14
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x729f6
movq %rax, 0x8(%rbx)
movq 0x60(%r14), %rax
movq 0x68(%r14), %rcx
xorl %r15d, %r15d
movabsq $-0x71c71c71c71c71c7, %rdi # imm = 0x8E38E38E38E38E39
subq %rax, %rcx
je 0x72a7d
sarq $0x3, %rcx
imulq %rdi, %rcx
movsd 0x18(%rsp), %xmm1
addq $0x38, %rax
xorpd %xmm0, %xmm0
movsd (%rax), %xmm2
testl %r15d, %r15d
je 0x72a48
ucomisd %xmm1, %xmm2
jbe 0x72a52
movsd %xmm2, 0x18(%rsp)
movl %r15d, %edx
xorps %xmm0, %xmm0
cvtsi2sd %rdx, %xmm0
jmp 0x72a4e
movsd %xmm2, 0x18(%rsp)
movapd %xmm2, %xmm1
incl %r15d
addq $0x48, %rax
cmpq %r15, %rcx
ja 0x72a26
cvttsd2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subsd 0xe3aa6(%rip), %xmm0    # 0x156518
cvttsd2si %xmm0, %r15
andq %rcx, %r15
orq %rax, %r15
movsd 0x18(%rsp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, 0x18(%rsp)
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x72aa5
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x72abc
leaq 0x18(%rsp), %rdx
movq %rbx, %rdi
callq 0x148c4
movabsq $-0x71c71c71c71c71c7, %rdi # imm = 0x8E38E38E38E38E39
movq %rbx, 0x20(%rsp)
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rdi, %rdx
cmpq %r15, %rdx
jbe 0x72ce4
leaq (%r15,%r15,8), %rbp
movsd 0x8(%rax,%rbp,8), %xmm0
movsd 0x10(%rax,%rbp,8), %xmm1
movsd 0x18(%rax,%rbp,8), %xmm2
leaq 0x40(%rsp), %r13
movq %r13, %rdi
movq %r12, %rsi
callq 0x531ea
movq 0x10(%r13), %rax
movq %rax, 0x10(%rsp)
movaps (%r13), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rsi
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x53d90
movq 0x10(%r12), %rax
movq %rax, 0x10(%r13)
movups (%r12), %xmm0
movaps %xmm0, (%r13)
movq %r13, %rdi
xorl %esi, %esi
callq 0x85478
movq 0x20(%rsp), %rbx
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x72b63
movsd (%rax), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x72b6e
movq %rbx, %rdi
movq %rax, %rdx
callq 0x148c4
leaq 0x40(%rsp), %rdi
movl $0x1, %esi
callq 0x85478
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x72b99
movsd (%rax), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x72ba4
movq %rbx, %rdi
movq %rax, %rdx
callq 0x148c4
leaq 0x40(%rsp), %rdi
movl $0x2, %esi
callq 0x85478
movq 0x8(%rbx), %rsi
cmpq 0x10(%rbx), %rsi
je 0x72bcf
movsd (%rax), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rbx)
jmp 0x72bda
movq %rbx, %rdi
movq %rax, %rdx
callq 0x148c4
movsd 0x18(%rsp), %xmm0
mulsd 0xdc450(%rip), %xmm0    # 0x14f038
movsd %xmm0, 0x28(%rsp)
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdx
subq %rax, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
je 0x72ca8
sarq $0x3, %rdx
imulq %rcx, %rdx
movl $0x1, %r13d
xorl %r12d, %r12d
cmpq %r15, %rdx
jbe 0x72ce4
movsd 0x8(%rax,%rbp,8), %xmm0
movsd 0x10(%rax,%rbp,8), %xmm1
movsd 0x18(%rax,%rbp,8), %xmm2
leaq (%r12,%r12,8), %rbx
movsd 0x8(%rax,%rbx,8), %xmm3
movsd 0x10(%rax,%rbx,8), %xmm4
movsd 0x18(%rax,%rbx,8), %xmm5
callq 0x868fa
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
movabsq $-0x71c71c71c71c71c7, %rcx # imm = 0x8E38E38E38E38E39
imulq %rcx, %rdx
cmpq %r12, %rdx
jbe 0x72cf0
addsd 0x38(%rax,%rbx,8), %xmm0
ucomisd 0x28(%rsp), %xmm0
jbe 0x72c86
movsd %xmm0, 0x28(%rsp)
movl %r13d, %r12d
movq 0x60(%r14), %rax
movq 0x68(%r14), %rdx
subq %rax, %rdx
sarq $0x3, %rdx
imulq %rcx, %rdx
incl %r13d
cmpq %r12, %rdx
ja 0x72c1a
movq 0x20(%rsp), %rdi
movq 0x8(%rdi), %rsi
cmpq 0x10(%rdi), %rsi
je 0x72ccb
movsd 0x28(%rsp), %xmm0
movsd %xmm0, (%rsi)
addq $0x8, %rsi
movq %rsi, 0x8(%rdi)
jmp 0x72cd5
leaq 0x28(%rsp), %rdx
callq 0x148c4
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xdc9ba(%rip), %rdi     # 0x14f6a5
movq %r15, %rsi
jmp 0x72cfa
leaq 0xdc9ae(%rip), %rdi     # 0x14f6a5
movq %r12, %rsi
xorl %eax, %eax
callq 0x4630
nop