// File: /workspace/github_cpp_makefile_star2_O3/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 0x95ec5
movq %rdi, %rbx
movsd 0x138(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jae 0x95ec5
leaq 0x18(%rbx), %rsi
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movsd %xmm0, (%rsp)
callq 0x5533e
xorl %eax, %eax
leaq 0x30(%rsp), %rsi
movq %rax, (%rsi)
movl %eax, 0x8(%rsi)
movq %rax, 0x10(%rsi)
movl %eax, 0x18(%rsi)
movq %rax, 0x20(%rsi)
leaq 0x10(%rsp), %rdx
movq %rax, 0x10(%rdx)
xorpd %xmm0, %xmm0
movapd %xmm0, (%rdx)
movq %r14, %rdi
movsd (%rsp), %xmm0
callq 0x70d00
leaq 0x198(%rbx), %r14
movq 0x40(%rsp), %rax
subq 0x30(%rsp), %rax
movl 0x48(%rsp), %ecx
leaq (%rcx,%rax,8), %rsi
leaq 0xc(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
movq %r14, %rdi
callq 0x48a3e
movl $0x0, 0x190(%rbx)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rcx
subq %rsi, %rcx
je 0x95e22
sarq $0x4, %rcx
movabsq $-0x79435e50d79435e5, %rax # imm = 0x86BCA1AF286BCA1B
imulq %rcx, %rax
movq (%r14), %rcx
xorl %r10d, %r10d
movabsq $-0x71c71c71c71c71c7, %rdx # imm = 0x8E38E38E38E38E39
xorl %edi, %edi
imulq $0x130, %rdi, %r8       # imm = 0x130
movq 0x68(%rsi,%r8), %r9
movq 0x60(%rsi,%r8), %r11
subq %r11, %r9
je 0x95e09
addq %rsi, %r8
sarq $0x3, %r9
imulq %rdx, %r9
movq 0x40(%r8), %r10
addq $0x38, %r8
xorl %r11d, %r11d
movq %r8, %r15
testq %r10, %r10
je 0x95dec
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 0x95dc0
movq %r8, %r15
cmpq %r8, %r14
je 0x95dec
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 0x95db2
movl 0x190(%rbx), %r10d
incl %r10d
movl %r10d, 0x190(%rbx)
incq %rdi
movl %edi, %r8d
cmpq %r8, %rax
ja 0x95d86
leaq 0x10(%rsp), %r14
movq %r14, %rdi
callq 0x77818
movq %r14, %rdi
callq 0xeef0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x95e4e
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
movq 0xb8(%rsp), %rdi
testq %rdi, %rdi
je 0x95e6b
movq 0xc8(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0xa0(%rsp), %rdi
callq 0xf256
movq 0xff141(%rip), %r14     # 0x194fc0
leaq 0xc028b(%rip), %rsi     # 0x156111
movl $0x26, %edx
movq %r14, %rdi
callq 0x44e0
movl 0x190(%rbx), %esi
movq %r14, %rdi
callq 0x4750
leaq 0xbd776(%rip), %rsi     # 0x15361e
movl $0x1, %edx
movq %rax, %rdi
callq 0x44e0
addq $0xd0, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xff124(%rip), %rdi     # 0x194ff0
leaq 0xc015d(%rip), %rsi     # 0x156030
callq 0x4440
leaq 0xc01a2(%rip), %rsi     # 0x156081
movq %rax, %rdi
callq 0x4440
leaq 0xc01d7(%rip), %rsi     # 0x1560c5
movq %rax, %rdi
callq 0x4440
callq 0x4260
jmp 0x95efd
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xeef0
movq 0x30(%rsp), %rdi
testq %rdi, %rdi
je 0x95f21
movq 0x50(%rsp), %rsi
subq %rdi, %rsi
callq 0x4470
leaq 0x58(%rsp), %rdi
callq 0xeb2a
movq %rbx, %rdi
callq 0x4780
nop