// File: 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
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x98(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x18(%rbp), %rdi
callq 0x851f0
movl $0x0, -0x2c(%rbp)
movq -0x98(%rbp), %rdi
movl -0x2c(%rbp), %eax
movq %rax, -0xa0(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0xa0(%rbp), %rax
cmpq %rcx, %rax
jae 0xc7c7d
cmpl $0x0, -0x2c(%rbp)
jne 0xc7c1e
movq -0x98(%rbp), %rdi
addq $0x60, %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
jmp 0xc7c6d
movq -0x98(%rbp), %rdi
addq $0x60, %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0xc7c6b
movq -0x98(%rbp), %rdi
addq $0x60, %rdi
movl -0x2c(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd 0x38(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x2c(%rbp), %eax
cvtsi2sd %rax, %xmm0
movsd %xmm0, -0x28(%rbp)
jmp 0xc7c6d
jmp 0xc7c6f
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0xc7bca
movsd -0x20(%rbp), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x105c0
movq -0x98(%rbp), %rdi
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
addq $0x60, %rdi
movq %rdi, -0xd8(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x1335c6(%rip), %xmm2   # 0x1fb288
movsd %xmm2, -0xe0(%rbp)
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movsd -0xe0(%rbp), %xmm2
movq -0xd8(%rbp), %rdi
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0xc8(%rbp)
movsd -0x28(%rbp), %xmm0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movsd -0xe0(%rbp), %xmm2
movq -0xd8(%rbp), %rdi
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0xc0(%rbp)
movsd -0x28(%rbp), %xmm0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movq -0xd0(%rbp), %rsi
movsd -0xc8(%rbp), %xmm0
movsd -0xc0(%rbp), %xmm1
movsd 0x18(%rax), %xmm2
leaq -0x48(%rbp), %rdi
callq 0x97360
movq -0x10(%rbp), %rsi
movq -0x48(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x60(%rbp), %rdi
leaq -0x78(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x97e90
movq -0x60(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq -0x48(%rbp), %rdi
xorl %esi, %esi
callq 0xe9d70
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x105c0
movq -0x18(%rbp), %rax
movq %rax, -0xb0(%rbp)
leaq -0x48(%rbp), %rdi
movl $0x1, %esi
callq 0xe9d70
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0x105c0
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x48(%rbp), %rdi
movl $0x2, %esi
callq 0xe9d70
movq -0xa8(%rbp), %rdi
movq %rax, %rsi
callq 0x105c0
movsd 0x12a207(%rip), %xmm0   # 0x1f2078
mulsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
movl $0x0, -0x84(%rbp)
movq -0x98(%rbp), %rdi
movl -0x84(%rbp), %eax
movq %rax, -0xe8(%rbp)
addq $0x60, %rdi
callq 0x10100
movq %rax, %rcx
movq -0xe8(%rbp), %rax
cmpq %rcx, %rax
jae 0xc809f
movq -0x98(%rbp), %rdi
addq $0x60, %rdi
movq %rdi, -0x120(%rbp)
movsd -0x28(%rbp), %xmm0
movsd 0x1333b4(%rip), %xmm2   # 0x1fb288
movsd %xmm2, -0x128(%rbp)
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movsd -0x128(%rbp), %xmm2
movq -0x120(%rbp), %rdi
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x118(%rbp)
movsd -0x28(%rbp), %xmm0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movsd -0x128(%rbp), %xmm2
movq -0x120(%rbp), %rdi
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0x110(%rbp)
movsd -0x28(%rbp), %xmm0
movaps %xmm0, %xmm1
subsd %xmm2, %xmm1
cvttsd2si %xmm1, %rax
cvttsd2si %xmm0, %rsi
movq %rsi, %rcx
sarq $0x3f, %rcx
andq %rcx, %rax
orq %rax, %rsi
callq 0x10130
movq -0x98(%rbp), %rdi
movsd 0x18(%rax), %xmm0
movsd %xmm0, -0x108(%rbp)
addq $0x60, %rdi
movl -0x84(%rbp), %eax
movl %eax, %esi
callq 0x10130
movq -0x98(%rbp), %rdi
movsd 0x8(%rax), %xmm0
movsd %xmm0, -0x100(%rbp)
addq $0x60, %rdi
movl -0x84(%rbp), %eax
movl %eax, %esi
callq 0x10130
movq -0x98(%rbp), %rdi
movsd 0x10(%rax), %xmm0
movsd %xmm0, -0xf8(%rbp)
addq $0x60, %rdi
movl -0x84(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd -0x118(%rbp), %xmm0
movsd -0x110(%rbp), %xmm1
movsd -0x108(%rbp), %xmm2
movsd -0x100(%rbp), %xmm3
movsd -0xf8(%rbp), %xmm4
movsd 0x18(%rax), %xmm5
callq 0xebaf0
movq -0x98(%rbp), %rdi
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0xf0(%rbp)
addq $0x60, %rdi
movl -0x84(%rbp), %eax
movl %eax, %esi
callq 0x10130
movsd -0xf0(%rbp), %xmm0
addsd 0x38(%rax), %xmm0
movsd %xmm0, -0x90(%rbp)
movsd -0x90(%rbp), %xmm0
ucomisd -0x80(%rbp), %xmm0
jbe 0xc8089
movsd -0x90(%rbp), %xmm0
movsd %xmm0, -0x80(%rbp)
jmp 0xc808b
movl -0x84(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
jmp 0xc7e85
movq -0x18(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x105c0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)