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

 if(alreadySegmentedFlag == false || seg_r<=r_probe)
   {
   cerr << "This function requires initial segmnetation (use new accessibility class(NINF))\n"
        << "the source has most likely bugs. Contact the source code provider.\n"
        << "Also segmenting r needs to be larger than one used for inital segmentation\n";
   abort();
   } else
   { // everything seems OK; proceed with segmentation

   VORONOI_NETWORK localVorNet = vornet;
   std::vector<bool> localAccessInfo;

   std::vector<PORE> segments;

   PORE::findChannelsAndPockets(&localVorNet, seg_r, &localAccessInfo, &segments);

   segmentMapping.resize(localAccessInfo.size(),-1);
   n_segments = 0; // number of segments
   for(unsigned int i = 0; i < segments.size(); i++)
      {
      for(unsigned int j = 0; j < segments[i].nodes.size(); j++)
        {
        segmentMapping[segments[i].reverseIDMappings.find(j)->second] = n_segments;
        };
      n_segments++;
     };

   segments.clear();

   }; // ends else{

 cout << "Additional segmentation: n_segments = " << n_segments << "\n";

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0xd0, %rsp
cmpb $0x0, 0x18d(%rdi)
je 0x97f96
movq %rdi, %rbx
movsd 0x138(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jae 0x97f96
leaq 0x18(%rbx), %rsi
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movsd %xmm0, 0x30(%rsp)
callq 0x55676
xorl %eax, %eax
leaq 0x8(%rsp), %rsi
movq %rax, (%rsi)
movl %eax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %eax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x40(%rsp), %rdx
movq %rax, 0x10(%rdx)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rdx)
movq %r14, %rdi
movsd 0x30(%rsp), %xmm0
callq 0x719ce
leaq 0x198(%rbx), %r14
movq 0x18(%rsp), %rax
subq 0x8(%rsp), %rax
movl 0x20(%rsp), %ecx
leaq (%rcx,%rax,8), %rsi
leaq 0x3c(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x49326
movl $0x0, 0x190(%rbx)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rcx
subq %rsi, %rcx
je 0x97eda
sarq $0x4, %rcx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
movq (%r14), %rcx
xorl %edx, %edx
movabsq $-0x71c71c71c71c71c7, %rdi # imm = 0x8E38E38E38E38E39
imulq $0x130, %rdx, %r8       # imm = 0x130
movq 0x68(%rsi,%r8), %r9
movq 0x60(%rsi,%r8), %r10
subq %r10, %r9
je 0x97ec5
addq %rsi, %r8
sarq $0x3, %r9
imulq %rdi, %r9
movq 0x40(%r8), %r10
addq $0x38, %r8
xorl %r11d, %r11d
movq %r8, %r14
testq %r10, %r10
je 0x97e9c
movq %r10, %r15
movq %r8, %r14
xorl %r12d, %r12d
cmpl %r11d, 0x20(%r15)
setl %r12b
cmovgeq %r15, %r14
movq 0x10(%r15,%r12,8), %r15
testq %r15, %r15
jne 0x97e83
movq %r8, %r15
cmpq %r8, %r14
je 0x97eaf
cmpl 0x20(%r14), %r11d
cmovlq %r8, %r14
movq %r14, %r15
movl 0x190(%rbx), %ebp
movslq 0x24(%r15), %r14
movl %ebp, (%rcx,%r14,4)
incl %r11d
cmpq %r11, %r9
ja 0x97e75
incl 0x190(%rbx)
incq %rdx
movl %edx, %r8d
cmpq %r8, %rax
ja 0x97e49
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x78628
movq %r14, %rdi
callq 0xee6a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x97f1f
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x97f3c
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0xa0(%rsp), %rdi
callq 0xf1b8
movq 0xff070(%rip), %r14     # 0x196fc0
leaq 0xc005a(%rip), %rsi     # 0x157fb1
movl $0x26, %edx
movq %r14, %rdi
callq 0x44e0
movl 0x190(%rbx), %esi
movq %r14, %rdi
callq 0x4750
leaq 0xbd5b5(%rip), %rsi     # 0x15552e
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xff053(%rip), %rdi     # 0x196ff0
leaq 0xbff2c(%rip), %rsi     # 0x157ed0
callq 0x4440
leaq 0xbff71(%rip), %rsi     # 0x157f21
movq %rax, %rdi
callq 0x4440
leaq 0xbffa6(%rip), %rsi     # 0x157f65
movq %rax, %rdi
callq 0x4440
callq 0x4260
jmp 0x97fce
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xee6a
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x9800b
movq 0x28(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movl %eax, 0x10(%rsp)
movq %rax, 0x18(%rsp)
movl %eax, 0x20(%rsp)
movq %rax, 0x28(%rsp)
leaq 0x58(%rsp), %rdi
callq 0xeab8
movq %rbx, %rdi
callq 0x4780
nop