// File: 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
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpl $0x2, 0x190(%rax)
jge 0x1008ab
movq 0x172756(%rip), %rdi    # 0x272ff0
leaq 0xfc542(%rip), %rsi     # 0x1fcde3
callq 0x5540
jmp 0x100cc0
movq -0xa0(%rbp), %rdi
addq $0x228, %rdi            # imm = 0x228
callq 0x1025a0
movq -0xa0(%rbp), %rdi
addq $0x240, %rdi            # imm = 0x240
callq 0x1025c0
movq -0xa0(%rbp), %rax
movq %rax, %rdi
addq $0x1c8, %rdi            # imm = 0x1C8
movslq 0x190(%rax), %rsi
movabsq $-0x4010000000000000, %rax # imm = 0xBFF0000000000000
movq %rax, -0xb0(%rbp)
movq %rax, -0x10(%rbp)
leaq -0x10(%rbp), %rdx
callq 0x85210
movq -0xa0(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq %rcx, %rdi
addq $0x1f8, %rdi            # imm = 0x1F8
movslq 0x190(%rcx), %rsi
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rdx
callq 0x85210
movq -0xa0(%rbp), %rax
movq %rax, %rdi
addq $0x1e0, %rdi            # imm = 0x1E0
movslq 0x190(%rax), %rsi
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
leaq -0x1c(%rbp), %rdx
callq 0x84b00
movq -0xa0(%rbp), %rax
movq %rax, %rdi
addq $0x210, %rdi            # imm = 0x210
movslq 0x190(%rax), %rsi
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
leaq -0x20(%rbp), %rdx
callq 0x84b00
leaq -0x38(%rbp), %rdi
movq %rdi, -0xa8(%rbp)
callq 0xf650
movq -0xa0(%rbp), %rcx
movq -0xb0(%rbp), %rax
movq -0xa8(%rbp), %rdi
movslq 0x190(%rcx), %rsi
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdx
callq 0x85210
jmp 0x1009be
movl $0xffffffff, -0x58(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x5c(%rbp) # imm = 0xFFFFFFFF
leaq -0x54(%rbp), %rdi
leaq -0x58(%rbp), %rsi
leaq -0x5c(%rbp), %rdx
callq 0x1025e0
jmp 0x1009df
leaq -0x78(%rbp), %rdi
movq %rdi, -0xb8(%rbp)
callq 0x10280
movq -0xa0(%rbp), %rax
movq -0xb8(%rbp), %rdi
movslq 0x190(%rax), %rsi
leaq -0x54(%rbp), %rdx
callq 0x102610
jmp 0x100a0f
movl $0x0, -0x7c(%rbp)
movq -0xa0(%rbp), %rcx
movl -0x7c(%rbp), %eax
cmpl 0x190(%rcx), %eax
jge 0x100a89
movq -0xa0(%rbp), %rdi
addq $0x228, %rdi            # imm = 0x228
leaq -0x38(%rbp), %rsi
callq 0x10630
jmp 0x100a41
movq -0xa0(%rbp), %rdi
addq $0x240, %rdi            # imm = 0x240
leaq -0x78(%rbp), %rsi
callq 0x1026c0
jmp 0x100a5a
jmp 0x100a5c
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x100a16
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x100cb5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x100cac
movq 0x172530(%rip), %rdi    # 0x272fc0
leaq 0xfc396(%rip), %rsi     # 0x1fce2d
callq 0x5540
movq %rax, -0xc0(%rbp)
jmp 0x100aa5
movq -0xc0(%rbp), %rdi
movq -0xa0(%rbp), %rax
movl 0x190(%rax), %esi
callq 0x58d0
movq %rax, -0xc8(%rbp)
jmp 0x100ac7
movq -0xc8(%rbp), %rdi
leaq 0xfc363(%rip), %rsi     # 0x1fce38
callq 0x5540
jmp 0x100adc
movl $0x0, -0x80(%rbp)
movq -0xa0(%rbp), %rdi
movl -0x80(%rbp), %eax
movq %rax, -0xd0(%rbp)
addq $0xc0, %rdi
callq 0x10230
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jae 0x100c98
movq 0x1724a6(%rip), %rdi    # 0x272fc0
leaq 0xfc32d(%rip), %rsi     # 0x1fce4e
callq 0x5540
movq %rax, -0xd8(%rbp)
jmp 0x100b2f
movq -0xd8(%rbp), %rdi
movl -0x80(%rbp), %esi
callq 0x56f0
movq %rax, -0xe0(%rbp)
jmp 0x100b47
movq -0xe0(%rbp), %rdi
leaq 0xfc309(%rip), %rsi     # 0x1fce5e
callq 0x5540
movq %rax, -0xe8(%rbp)
jmp 0x100b63
movq -0xa0(%rbp), %rdi
addq $0xc0, %rdi
movl -0x80(%rbp), %eax
movl %eax, %esi
callq 0x10260
movq %rax, %rdi
addq $0x60, %rdi
callq 0x10100
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x5160
movq %rax, -0xf0(%rbp)
jmp 0x100b9f
movq -0xf0(%rbp), %rdi
leaq 0xfc2bb(%rip), %rsi     # 0x1fce68
callq 0x5540
jmp 0x100bb4
movq -0xa0(%rbp), %rdi
addq $0xc0, %rdi
movl -0x80(%rbp), %eax
movl %eax, %esi
callq 0x10260
movq -0xa0(%rbp), %rsi
movq %rax, -0x100(%rbp)
movl 0x190(%rsi), %eax
movl %eax, -0xf4(%rbp)
addq $0x198, %rsi            # imm = 0x198
leaq -0x98(%rbp), %rdi
callq 0xeec0
jmp 0x100bfb
movl -0xf4(%rbp), %esi
movq -0x100(%rbp), %rdi
movq -0xa0(%rbp), %r11
movq %r11, %rcx
addq $0x228, %rcx            # imm = 0x228
movq %r11, %r8
addq $0x240, %r8             # imm = 0x240
movq %r11, %r9
addq $0x1c8, %r9             # imm = 0x1C8
movq %r11, %rdx
addq $0x1e0, %rdx            # imm = 0x1E0
movq %r11, %r10
addq $0x1f8, %r10            # imm = 0x1F8
addq $0x210, %r11            # imm = 0x210
movq %rsp, %rax
movq %r11, 0x10(%rax)
movq %r10, 0x8(%rax)
movq %rdx, (%rax)
leaq -0x98(%rbp), %rdx
callq 0xcbc90
jmp 0x100c64
leaq -0x98(%rbp), %rdi
callq 0xec80
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x100ae3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0xec80
jmp 0x100cac
leaq -0x78(%rbp), %rdi
callq 0x10460
leaq -0x38(%rbp), %rdi
callq 0xf9d0
jmp 0x100cc0
leaq -0x78(%rbp), %rdi
callq 0x10460
leaq -0x38(%rbp), %rdi
callq 0xf9d0
jmp 0x100cc9
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x58f0
nopw %cs:(%rax,%rax)