// File: /workspace/github_cpp_makefile_star2_O1/Luthaf[P]zeopp/networkaccessibility.cc
// Function: AccessibilityClassNINF::calculatePLD()
void AccessibilityClassNINF::calculatePLD(){

 if(n_segments < 2) 
   { // exit is there are no pre-defined segments
   cerr << "Number of segments used as seed for flood fill algorithm is lower than 2\n";
   return;
   } else
   {
   // setup results tables
   PLDtable.clear();
   PLDEdgeTable.clear();

   segmentDi.resize(n_segments, -1);
   segmentDiFinal.resize(n_segments, -1);

   segmentDiNodeID.resize(n_segments, -1);
   segmentDiFinalNodeID.resize(n_segments, -1);

   vector<double> restrDiam;
   restrDiam.resize(n_segments, -1);
   pair<int,int> dummy_pair (-1,-1);
   vector< pair<int,int> > restrEdge;
   restrEdge.resize(n_segments, dummy_pair);

   for(int i=0; i < n_segments; i++) 
     {
     PLDtable.push_back(restrDiam);
     PLDEdgeTable.push_back(restrEdge);
     };

   cout << "There are " << n_segments << " in PLD calculation.\n";

   for(unsigned int i = 0; i < pores.size(); i++)
     {
     cout << "Analyzing pore " << i << " of size " << pores[i].nodes.size() << " nodes.\n";
     pores[i].getRestrictingDiameters(n_segments, segmentMapping, &PLDtable, &PLDEdgeTable, &segmentDi, &segmentDiNodeID, &segmentDiFinal, &segmentDiFinalNodeID);
     };
  }; // ends if(n_segments < 2) ...
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
cmpl $0x1, 0x190(%rdi)
jg 0x983f3
movq 0xfec1f(%rip), %rdi     # 0x196ff0
leaq 0xbfcb3(%rip), %rsi     # 0x15808b
movl $0x49, %edx
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x44e0
movq %rdi, %rbx
leaq 0x228(%rdi), %r15
movq 0x228(%rdi), %rsi
movq %r15, %rdi
callq 0x99f56
leaq 0x240(%rbx), %rdi
movq 0x240(%rbx), %rsi
movq %rdi, 0x18(%rsp)
callq 0x99fa0
leaq 0x1c8(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movabsq $-0x4010000000000000, %r14 # imm = 0xBFF0000000000000
movq %rsp, %r12
movq %r14, (%r12)
movq %rdi, 0x60(%rsp)
movq %r12, %rdx
callq 0x49580
leaq 0x1f8(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movq %r14, (%r12)
movq %rsp, %r12
movq %rdi, 0x58(%rsp)
movq %r12, %rdx
callq 0x49580
leaq 0x1e0(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl %ebp, (%r12)
movq %rsp, %r12
movq %rdi, 0x50(%rsp)
movq %r12, %rdx
callq 0x49326
leaq 0x210(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movl %ebp, (%r12)
movq %rsp, %r12
movq %rdi, 0x48(%rsp)
movq %r12, %rdx
callq 0x49326
xorps %xmm0, %xmm0
movaps %xmm0, (%r12)
movq $0x0, 0x10(%r12)
movslq 0x190(%rbx), %rsi
leaq 0x20(%rsp), %rdx
movq %r14, (%rdx)
movq %rsp, %rdi
callq 0x49580
leaq 0x80(%rsp), %rdx
movq $-0x1, (%rdx)
leaq 0x20(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movslq 0x190(%rbx), %rsi
callq 0x99818
cmpl $0x0, 0x190(%rbx)
jle 0x98546
xorl %ebp, %ebp
movq %rsp, %r12
leaq 0x20(%rsp), %r13
movq %r15, %rdi
movq %r12, %rsi
callq 0xee9a
movq 0x18(%rsp), %rdi
movq %r13, %rsi
callq 0x9984c
incl %ebp
cmpl 0x190(%rbx), %ebp
jl 0x98524
movq 0xfea73(%rip), %rdi     # 0x196fc0
leaq 0xbfb81(%rip), %rsi     # 0x1580d5
movl $0xa, %edx
callq 0x44e0
movl 0x190(%rbx), %esi
movq 0xfea55(%rip), %rdi     # 0x196fc0
callq 0x4750
leaq 0xbfb69(%rip), %rsi     # 0x1580e0
movl $0x15, %edx
movq %rax, %rdi
callq 0x44e0
movq 0xc8(%rbx), %rax
cmpq 0xc0(%rbx), %rax
je 0x986cc
leaq 0x198(%rbx), %rax
movq %rax, 0x40(%rsp)
movl $0x1, %r14d
xorl %r13d, %r13d
movq %r15, %r12
movl $0xf, %edx
movq 0xfea04(%rip), %rdi     # 0x196fc0
leaq 0xbfb33(%rip), %rsi     # 0x1580f6
callq 0x44e0
movq 0xfe9f1(%rip), %rdi     # 0x196fc0
movq %r13, %rsi
callq 0x42b0
movq %rax, %rbp
movl $0x9, %edx
movq %rax, %rdi
leaq 0xbfb1d(%rip), %rsi     # 0x158106
callq 0x44e0
movq 0xc0(%rbx), %rax
imulq $0x130, %r13, %r15      # imm = 0x130
movq 0x68(%rax,%r15), %rsi
subq 0x60(%rax,%r15), %rsi
sarq $0x3, %rsi
movabsq $-0x71c71c71c71c71c7, %rax # imm = 0x8E38E38E38E38E39
imulq %rax, %rsi
movq %rbp, %rdi
callq 0x42b0
movl $0x8, %edx
movq %rax, %rdi
leaq 0xbfae1(%rip), %rsi     # 0x158110
callq 0x44e0
movq 0xc0(%rbx), %r13
movl 0x190(%rbx), %ebp
leaq 0x68(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0xe886
addq %r15, %r13
subq $0x8, %rsp
movq %r13, %rdi
movl %ebp, %esi
leaq 0x70(%rsp), %rdx
movq %r12, %r15
movq %r12, %rcx
movq 0x20(%rsp), %r8
movq 0x68(%rsp), %r9
pushq 0x50(%rsp)
pushq 0x68(%rsp)
pushq 0x68(%rsp)
callq 0x75c80
addq $0x20, %rsp
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x9869d
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movl %r14d, %r13d
movq 0xc8(%rbx), %rax
subq 0xc0(%rbx), %rax
sarq $0x4, %rax
movabsq $-0x79435e50d79435e5, %rcx # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
incl %r14d
cmpq %r13, %rax
ja 0x985ad
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x986e3
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x986f9
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x9874a
jmp 0x98730
movq %rax, %rbx
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x98733
movq 0x78(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
jmp 0x98733
jmp 0x98730
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x9874a
movq 0x30(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x98760
movq 0x10(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq %rbx, %rdi
callq 0x4780