// File: /workspace/github_cpp_makefile_star2_O2/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 0x70436
movq 0xdfbd7(%rip), %rdi     # 0x14fff0
leaq 0x94d0b(%rip), %rsi     # 0x10512b
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4480
movq %rdi, %rbx
leaq 0x228(%rdi), %r15
movq %r15, %rdi
callq 0x7151a
leaq 0x240(%rbx), %rdi
movq %rdi, 0x8(%rsp)
callq 0x71522
leaq 0x1c8(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movabsq $-0x4010000000000000, %r12 # imm = 0xBFF0000000000000
leaq 0x10(%rsp), %r14
movq %r12, (%r14)
movq %rdi, 0x48(%rsp)
movq %r14, %rdx
callq 0x3713c
leaq 0x1f8(%rbx), %rdi
movslq 0x190(%rbx), %rsi
movq %r12, (%r14)
leaq 0x10(%rsp), %r14
movq %rdi, 0x40(%rsp)
movq %r14, %rdx
callq 0x3713c
leaq 0x1e0(%rbx), %rdi
movslq 0x190(%rbx), %rsi
orl $-0x1, (%r14)
leaq 0x10(%rsp), %r14
movq %rdi, 0x38(%rsp)
movq %r14, %rdx
callq 0x36f18
leaq 0x210(%rbx), %rdi
movslq 0x190(%rbx), %rsi
orl $-0x1, (%r14)
leaq 0x10(%rsp), %r14
movq %rdi, 0x30(%rsp)
movq %r14, %rdx
callq 0x36f18
xorps %xmm0, %xmm0
andq $0x0, 0x10(%r14)
movaps %xmm0, (%r14)
movslq 0x190(%rbx), %rsi
leaq 0x50(%rsp), %rdx
movq %r12, (%rdx)
leaq 0x10(%rsp), %rdi
callq 0x3713c
leaq 0x68(%rsp), %rdx
orq $-0x1, (%rdx)
leaq 0x50(%rsp), %rdi
xorps %xmm0, %xmm0
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movslq 0x190(%rbx), %rsi
callq 0x7152a
xorl %ebp, %ebp
leaq 0x10(%rsp), %r12
leaq 0x50(%rsp), %r13
cmpl 0x190(%rbx), %ebp
jge 0x7056b
movq %r15, %rdi
movq %r12, %rsi
callq 0xacaa
movq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x7155e
incl %ebp
jmp 0x70547
movq 0xdfa4e(%rip), %rdi     # 0x14ffc0
leaq 0x94bfc(%rip), %rsi     # 0x105175
callq 0x4480
movl 0x190(%rbx), %esi
movq %rax, %rdi
callq 0x4760
leaq 0x94bed(%rip), %rsi     # 0x105180
movq %rax, %rdi
callq 0x4480
movq %rbx, (%rsp)
leaq 0x198(%rbx), %rax
movq %rax, 0x28(%rsp)
xorl %ebp, %ebp
leaq 0x70(%rsp), %rbx
movl %ebp, %ebp
movq (%rsp), %rcx
movq 0xc8(%rcx), %rax
subq 0xc0(%rcx), %rax
cqto
movl $0x130, %ecx            # imm = 0x130
idivq %rcx
cmpq %rbp, %rax
jbe 0x706aa
movq %r15, %r12
movq 0xdf9dd(%rip), %rdi     # 0x14ffc0
leaq 0x94bac(%rip), %rsi     # 0x105196
callq 0x4480
movq %rax, %rdi
movq %rbp, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x94ba2(%rip), %rsi     # 0x1051a6
callq 0x4480
movq %rax, %rdi
movq (%rsp), %rax
movq 0xc0(%rax), %rcx
imulq $0x130, %rbp, %r15      # imm = 0x130
movq 0x68(%rcx,%r15), %rax
subq 0x60(%rcx,%r15), %rax
cqto
pushq $0x48
popq %rcx
idivq %rcx
movq %rax, %rsi
callq 0x42e0
movq %rax, %rdi
leaq 0x94b6e(%rip), %rsi     # 0x1051b0
callq 0x4480
movq (%rsp), %rax
movq 0xc0(%rax), %r14
movl 0x190(%rax), %r13d
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0xa6ce
addq %r15, %r14
subq $0x8, %rsp
movq %r14, %rdi
movl %r13d, %esi
movq %rbx, %rdx
movq %r12, %r15
movq %r12, %rcx
movq 0x10(%rsp), %r8
movq 0x50(%rsp), %r9
pushq 0x38(%rsp)
pushq 0x50(%rsp)
pushq 0x50(%rsp)
callq 0x56bea
addq $0x20, %rsp
movq %rbx, %rdi
callq 0xb290
incl %ebp
jmp 0x705b2
leaq 0x50(%rsp), %rdi
callq 0x10942
leaq 0x10(%rsp), %rdi
callq 0xb25c
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x706f5
jmp 0x706e8
movq %rax, %rbx
leaq 0x70(%rsp), %rdi
callq 0xb290
jmp 0x706eb
jmp 0x706e8
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x10942
leaq 0x10(%rsp), %rdi
callq 0xb25c
movq %rbx, %rdi
callq 0x4780
nop