// File: /workspace/github_cpp_makefile_star2_O2/Luthaf[P]zeopp/networkaccessibility.cc
// Function: AccessibilityClassNINF::getPLDvisData(std::vector<Point, std::allocator<Point>>*, std::vector<int, std::allocator<int>>*, std::vector<double, std::allocator<double>>*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void AccessibilityClassNINF::getPLDvisData(vector<Point> *NodeFracCoord, vector<int> *NodeSegmentIDs, vector<double> *NodeSegmentValue, string reqvisdata){

 // preparing data structures
 NodeFracCoord->clear();
 NodeSegmentIDs->clear();
 NodeSegmentValue->clear();

 if(reqvisdata == "INITSEGMAP"){
   // initial segment mapping (prints nodes initially assigned to semgents)
   for(unsigned int i=0; i<vornet.nodes.size(); i++)
     {
     if(segmentMapping[i]>=0) 
       {
       NodeFracCoord->push_back(orgAtomNet->xyz_to_abc(vornet.nodes.at(i).x, vornet.nodes.at(i).y, vornet.nodes.at(i).z));
       NodeSegmentIDs->push_back(segmentMapping[i]);
       NodeSegmentValue->push_back(segmentDi[segmentMapping[i]]);
       };
     };
   };

 if(reqvisdata == "FINALSEGMAP"){
   // initial segment mapping (prints nodes initially assigned to semgents)
   for(unsigned int i=0; i<vornet.nodes.size(); i++)
     {
     if(segmentMappingFinal[i]>=0)
       {
       NodeFracCoord->push_back(orgAtomNet->xyz_to_abc(vornet.nodes.at(i).x, vornet.nodes.at(i).y, vornet.nodes.at(i).z));
       NodeSegmentIDs->push_back(segmentMappingFinal[i]);
       NodeSegmentValue->push_back(segmentDiFinal[segmentMappingFinal[i]]);
       };
     };
   };

 if(reqvisdata == "INITSEGDINODE"){
   // initial segment mapping (prints nodes initially assigned to semgents)
   for(unsigned int j=0; j<segmentDiNodeID.size(); j++)
     {
     int i=segmentDiNodeID[j];
     NodeFracCoord->push_back(orgAtomNet->xyz_to_abc(vornet.nodes.at(i).x, vornet.nodes.at(i).y, vornet.nodes.at(i).z));
     NodeSegmentIDs->push_back(j);
     NodeSegmentValue->push_back(segmentDi[j]);
     };
   };

 if(reqvisdata == "PLDNODES"){
   // initial segment mapping (prints nodes initially assigned to semgents)
   for(int i=0; i<n_segments; i++)
   for(int j=i+1; j<n_segments; j++)
     {
     if(PLDtable[i].at(j)> 0.0)
       { // segments i and j are connected
       int node1 = PLDEdgeTable.at(i).at(j).first;
       int node2 = PLDEdgeTable.at(i).at(j).second;  
       for(unsigned int k=0; k<vornet.edges.size(); k++){
       int count=0;
       if((vornet.edges.at(k).from==node1&&vornet.edges.at(k).to==node2)||(vornet.edges.at(k).from==node2&&vornet.edges.at(k).to==node1))
         { // edge found
         if(count > 0) cerr << "Two nodes connected by more than one edge. Visualization may contain artefacts.\n";
         XYZ nd1(vornet.nodes.at(vornet.edges.at(k).from).x, vornet.nodes.at(vornet.edges.at(k).from).y, vornet.nodes.at(vornet.edges.at(k).from).z);
         XYZ nd2(vornet.nodes.at(vornet.edges.at(k).to).x, vornet.nodes.at(vornet.edges.at(k).to).y, vornet.nodes.at(vornet.edges.at(k).to).z);

         nd2 = nd2 + vornet.v_a.scale(vornet.edges.at(k).delta_uc_x) + vornet.v_b.scale(vornet.edges.at(k).delta_uc_y) + vornet.v_c.scale(vornet.edges.at(k).delta_uc_z);

         XYZ nd = midpoint(nd1, nd2);
         
         NodeFracCoord->push_back(orgAtomNet->xyz_to_abc(nd.x, nd.y, nd.z));
         NodeSegmentIDs->push_back(0); // no ID for edge
         NodeSegmentValue->push_back(PLDtable[i].at(j));
         count++;
         };
       };
     };
     };
   };

 if(reqvisdata == "DFSPHERES"){
   // display spheres in between connected cages
   // this is a temp function without PBC 
   for(int i=0; i<n_segments; i++)
   for(int j=i+1; j<n_segments; j++)
     {
     int dinode1 =segmentDiNodeID[i];
     int dinode2 =segmentDiNodeID[j];

     if(PLDtable[i].at(j)> 0.0 && calcEuclideanDistance(vornet.nodes.at(dinode1).x, vornet.nodes.at(dinode1).y, vornet.nodes.at(dinode1).z,
                               vornet.nodes.at(dinode2).x, vornet.nodes.at(dinode2).y, vornet.nodes.at(dinode2).z) < 15.0 )
       { // segments i and j are connected
       int count=0;
         if(count > 0) cerr << "Two nodes connected by more than one edge. Visualization may contain artefacts.\n";

         XYZ nd1(vornet.nodes.at(dinode1).x, vornet.nodes.at(dinode1).y, vornet.nodes.at(dinode1).z);
         XYZ nd2(vornet.nodes.at(dinode2).x, vornet.nodes.at(dinode2).y, vornet.nodes.at(dinode2).z);

         XYZ nd = midpoint(nd1, nd2);

         NodeFracCoord->push_back(orgAtomNet->xyz_to_abc(nd.x, nd.y, nd.z));
         NodeSegmentIDs->push_back(0); // no ID for edge
         NodeSegmentValue->push_back(PLDtable[i].at(j));
         count++;
       };
     };
   };


}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %r8, 0x50(%rsp)
movq %rcx, %rbp
movq %rdi, %r12
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x708f7
movq %rax, 0x8(%rsi)
movq (%rdx), %rax
cmpq %rax, 0x8(%rdx)
je 0x70904
movq %rax, 0x8(%rdx)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movq (%rbp), %rax
cmpq %rax, 0x8(%rbp)
je 0x7091c
movq %rax, 0x8(%rbp)
leaq 0x948e6(%rip), %rsi     # 0x105209
movq 0x50(%rsp), %rdi
callq 0x36bf4
testb %al, %al
je 0x70a17
leaq 0x60(%r12), %rbx
xorl %r14d, %r14d
leaq 0xa8(%rsp), %r15
movl %r14d, %r14d
movq 0x68(%r12), %rax
subq 0x60(%r12), %rax
sarq $0x6, %rax
cmpq %r14, %rax
jbe 0x70a17
movq 0x198(%r12), %rax
cmpl $0x0, (%rax,%r14,4)
js 0x70a0f
movq (%r12), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm2
movq %r15, %rdi
movq %r13, %rsi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x3f1ce
movq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x2468e
leaq (,%r14,4), %rsi
addq 0x198(%r12), %rsi
movq 0x60(%rsp), %rdi
callq 0x9434
movq 0x198(%r12), %rax
movslq (%rax,%r14,4), %rsi
shlq $0x3, %rsi
addq 0x1c8(%r12), %rsi
movq %rbp, %rdi
callq 0xac88
incl %r14d
jmp 0x70945
leaq 0x947f6(%rip), %rsi     # 0x105214
movq 0x50(%rsp), %rdi
callq 0x36bf4
testb %al, %al
je 0x70b12
leaq 0x60(%r12), %rbx
xorl %r14d, %r14d
leaq 0xa8(%rsp), %r15
movl %r14d, %r14d
movq 0x68(%r12), %rax
subq 0x60(%r12), %rax
sarq $0x6, %rax
cmpq %r14, %rax
jbe 0x70b12
movq 0x1b0(%r12), %rax
cmpl $0x0, (%rax,%r14,4)
js 0x70b0a
movq (%r12), %r13
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm2
movq %r15, %rdi
movq %r13, %rsi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x3f1ce
movq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x2468e
leaq (,%r14,4), %rsi
addq 0x1b0(%r12), %rsi
movq 0x60(%rsp), %rdi
callq 0x9434
movq 0x1b0(%r12), %rax
movslq (%rax,%r14,4), %rsi
shlq $0x3, %rsi
addq 0x1f8(%r12), %rsi
movq %rbp, %rdi
callq 0xac88
incl %r14d
jmp 0x70a40
movq %rbp, 0x70(%rsp)
leaq 0x94702(%rip), %rsi     # 0x105220
movq 0x50(%rsp), %rdi
callq 0x36bf4
testb %al, %al
je 0x70c00
leaq 0x60(%r12), %rbx
xorl %r14d, %r14d
movl %r14d, %r15d
movq 0x1e0(%r12), %rax
movq 0x1e8(%r12), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r15, %rcx
jbe 0x70c00
movslq (%rax,%r15,4), %r13
movq (%r12), %rbp
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm2
leaq 0xa8(%rsp), %r13
movq %r13, %rdi
movq %rbp, %rsi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x3f1ce
movq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0x2468e
movl %r14d, 0xa8(%rsp)
movq 0x60(%rsp), %rdi
movq %r13, %rsi
callq 0x10324
shlq $0x3, %r15
addq 0x1c8(%r12), %r15
movq 0x70(%rsp), %rdi
movq %r15, %rsi
callq 0xac88
incl %r14d
jmp 0x70b38
leaq 0x94627(%rip), %rsi     # 0x10522e
movq 0x50(%rsp), %rdi
callq 0x36bf4
testb %al, %al
je 0x7104e
leaq 0x240(%r12), %rax
movq %rax, 0xf0(%rsp)
leaq 0x18(%r12), %rax
movq %rax, 0x68(%rsp)
leaq 0x78(%r12), %rbp
leaq 0x60(%r12), %rax
movq %rax, 0xf8(%rsp)
leaq 0x30(%r12), %rax
movq %rax, 0x108(%rsp)
leaq 0x48(%r12), %rax
movq %rax, 0x100(%rsp)
movl 0x190(%r12), %eax
pushq $0x1
popq %rcx
movq %rcx, 0xc0(%rsp)
xorl %edx, %edx
movslq %eax, %rcx
cmpq %rcx, %rdx
jge 0x7104e
imulq $0x18, %rdx, %rcx
movq %rcx, 0x48(%rsp)
movq 0xc0(%rsp), %rbx
movq %rdx, 0xc8(%rsp)
cmpl %ebx, %eax
jle 0x7103e
movq 0x228(%r12), %rdi
addq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0xaa50
movsd (%rax), %xmm0
ucomisd 0x8f61e(%rip), %xmm0    # 0x1002e0
jbe 0x71026
movq 0xf0(%rsp), %r14
movq %r14, %rdi
movq 0xc8(%rsp), %r13
movq %r13, %rsi
callq 0x57afa
movq %rax, %rdi
movq %rbx, %rsi
callq 0x57b18
movl (%rax), %r15d
movq %r14, %rdi
movq %r13, %rsi
callq 0x57afa
movq %rax, %rdi
movq %rbx, %rsi
callq 0x57b18
movl 0x4(%rax), %r14d
xorl %r13d, %r13d
movq %rbx, 0x88(%rsp)
movl %r15d, 0x80(%rsp)
movl %r14d, 0x78(%rsp)
movl %r13d, %r13d
movq 0x80(%r12), %rax
subq 0x78(%r12), %rax
cqto
pushq $0x28
popq %rcx
idivq %rcx
cmpq %r13, %rax
jbe 0x71026
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cmpl %r15d, (%rax)
jne 0x70d65
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cmpl %r14d, 0x4(%rax)
je 0x70d8e
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cmpl %r14d, (%rax)
jne 0x7101e
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cmpl %r15d, 0x4(%rax)
jne 0x7101e
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq (%rax), %rsi
movq 0xf8(%rsp), %rbx
movq %rbx, %rdi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq (%rax), %rsi
movq %rbx, %rdi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq (%rax), %rsi
movq %rbx, %rdi
callq 0xa848
movsd 0x10(%rax), %xmm2
leaq 0xa8(%rsp), %rdi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x6402e
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq 0x4(%rax), %rsi
movq %rbx, %rdi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x40(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq 0x4(%rax), %rsi
movq %rbx, %rdi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
movslq 0x4(%rax), %rsi
movq %rbx, %rdi
callq 0xa848
movsd 0x10(%rax), %xmm2
movq %r12, %r14
leaq 0xd0(%rsp), %r12
movq %r12, %rdi
movsd 0x40(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x6402e
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cvtsi2sdl 0x10(%rax), %xmm0
leaq 0x158(%rsp), %r15
movq %r15, %rdi
movq 0x68(%rsp), %rsi
callq 0x640ba
leaq 0x170(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %r12
movq %r15, %rdx
callq 0x642d2
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cvtsi2sdl 0x14(%rax), %xmm0
leaq 0x140(%rsp), %r14
movq %r14, %rdi
movq 0x108(%rsp), %rsi
callq 0x640ba
leaq 0x110(%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x642d2
movq %rbp, %rdi
movq %r13, %rsi
callq 0xa822
cvtsi2sdl 0x18(%rax), %xmm0
leaq 0x128(%rsp), %rbx
movq %rbx, %rdi
movq 0x100(%rsp), %rsi
callq 0x640ba
leaq 0x90(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
movq 0x88(%rsp), %rbx
callq 0x642d2
movq 0xa0(%rsp), %rax
movq %rax, 0xe0(%rsp)
movups 0x90(%rsp), %xmm0
movaps %xmm0, 0xd0(%rsp)
movq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movaps 0xd0(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xa8(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movl 0x78(%rsp), %r14d
callq 0x64369
movq (%r12), %rsi
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movsd 0xa0(%rsp), %xmm2
movq %r15, %rdi
callq 0x3f1ce
movq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x2468e
andl $0x0, 0x110(%rsp)
movq 0x60(%rsp), %rdi
movq %r15, %rsi
movl 0x80(%rsp), %r15d
callq 0x10324
movq 0x228(%r12), %rdi
addq 0x48(%rsp), %rdi
movq %rbx, %rsi
callq 0xaa50
movq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0xac88
incl %r13d
jmp 0x70d23
incq %rbx
movl 0x190(%r12), %eax
movq 0xc8(%rsp), %rdx
jmp 0x70c99
incq %rdx
incq 0xc0(%rsp)
jmp 0x70c74
leaq 0x941e2(%rip), %rsi     # 0x105237
movq 0x50(%rsp), %rdi
callq 0x36bf4
testb %al, %al
je 0x71312
pushq $0x1
popq %r14
leaq 0x60(%r12), %rbx
movl 0x190(%r12), %eax
xorl %edx, %edx
movslq %eax, %rcx
cmpq %rcx, %rdx
jge 0x71312
imulq $0x18, %rdx, %rcx
movq %rcx, 0x40(%rsp)
movq %r14, 0x68(%rsp)
cmpl %r14d, %eax
jle 0x71302
movq 0x1e0(%r12), %rax
movq %rdx, %rbp
movslq (%rax,%rdx,4), %r13
movslq (%rax,%r14,4), %r15
movq 0x228(%r12), %rdi
addq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0xaa50
movsd (%rax), %xmm0
ucomisd 0x8f20f(%rip), %xmm0    # 0x1002e0
jbe 0x712ef
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm0
movsd %xmm0, 0x88(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x80(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x78(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm5
movsd 0x38(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
movsd 0x88(%rsp), %xmm2
movsd 0x80(%rsp), %xmm3
movsd 0x78(%rsp), %xmm4
callq 0x64934
movsd 0x9054e(%rip), %xmm1    # 0x1016d8
ucomisd %xmm0, %xmm1
jbe 0x712ef
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm2
leaq 0xa8(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
callq 0x6402e
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd (%rax), %xmm0
movsd %xmm0, 0x38(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd 0x8(%rax), %xmm0
movsd %xmm0, 0x48(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xa848
movsd 0x10(%rax), %xmm2
leaq 0xd0(%rsp), %rdi
movsd 0x38(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
callq 0x6402e
movq 0xe0(%rsp), %rax
movq %rax, 0x28(%rsp)
movups 0xd0(%rsp), %xmm0
movups %xmm0, 0x18(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x10(%rsp)
movups 0xa8(%rsp), %xmm0
movups %xmm0, (%rsp)
leaq 0x90(%rsp), %rdi
callq 0x64369
movq (%r12), %rsi
movsd 0x90(%rsp), %xmm0
movsd 0x98(%rsp), %xmm1
movsd 0xa0(%rsp), %xmm2
leaq 0x110(%rsp), %r15
movq %r15, %rdi
callq 0x3f1ce
movq 0x58(%rsp), %rdi
movq %r15, %rsi
callq 0x2468e
andl $0x0, 0x110(%rsp)
movq 0x60(%rsp), %rdi
movq %r15, %rsi
callq 0x10324
movq 0x228(%r12), %rdi
addq 0x40(%rsp), %rdi
movq %r14, %rsi
callq 0xaa50
movq 0x70(%rsp), %rdi
movq %rax, %rsi
callq 0xac88
incq %r14
movl 0x190(%r12), %eax
movq %rbp, %rdx
jmp 0x71094
incq %rdx
movq 0x68(%rsp), %r14
incq %r14
jmp 0x7107a
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq