// File: ncbi[P]amr/./common.hpp
// Function: Common_sp::Vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>::binSearch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool) const
size_t binSearch (const T &value,
                      bool exact = true) const
      // Return: if exact then no_index or vec[Return] = value else min {i : vec[i] >= value}
      { if (P::empty ())
      	  return no_index;
      	checkSorted ();
      	if (P::size () < 8)  // PAR
      	{
      	  for (size_t i = 0; i < P::size (); i++)
      	  {
      	    if (value == (*this) [i])
          	  return i;
      	    if (value < (*this) [i])
          	  return exact ? no_index : i;
          }
          return no_index;
      	}
      	size_t lo = 0;  // vec.at(lo) <= value
      	size_t hi = P::size () - 1;  
      	// lo <= hi
      	if (value < (*this) [lo])
      	  return exact ? no_index : lo;
      	if ((*this) [hi] < value)
      	  return no_index;
      	// at(lo) <= value <= at(hi)
      	for (;;)
      	{
  	    	const size_t m = (lo + hi) / 2;
  	    	if (   (*this) [m] == value
  	    		  || (*this) [m] <  value
  	    		 )
  	    		if (lo == m)  // hi in {lo, lo + 1}
  	    			break;
  	    		else
  	    		  lo = m;
  	      else
  	      	hi = m;
  	    }
  	    if ((*this) [lo] == value)
  	    	return lo;
  	    if (! exact || (*this) [hi] == value)
  	    	return hi;
  	    return no_index;
      }

// Assembly:
subq $0x78, %rsp
movb %dl, %al
movq %rdi, 0x68(%rsp)
movq %rsi, 0x60(%rsp)
andb $0x1, %al
movb %al, 0x5f(%rsp)
movq 0x68(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x61d60
testb $0x1, %al
jne 0x61aab
jmp 0x61ab9
movq $-0x1, 0x70(%rsp)
jmp 0x61d48
movq 0x30(%rsp), %rdi
callq 0x61db0
movq 0x30(%rsp), %rdi
callq 0x56980
cmpq $0x8, %rax
jae 0x61bbd
movq $0x0, 0x50(%rsp)
movq 0x30(%rsp), %rdi
movq 0x50(%rsp), %rax
movq %rax, 0x28(%rsp)
callq 0x56980
movq %rax, %rcx
movq 0x28(%rsp), %rax
cmpq %rcx, %rax
jae 0x61baf
movq 0x30(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rsi
callq 0x61e30
movq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0x52910
testb $0x1, %al
jne 0x61b31
jmp 0x61b40
movq 0x50(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x61d48
movq 0x30(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x50(%rsp), %rsi
callq 0x61e30
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0x54450
testb $0x1, %al
jne 0x61b6c
jmp 0x61b9a
testb $0x1, 0x5f(%rsp)
je 0x61b81
movq $-0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x61b8b
movq 0x50(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x61d48
jmp 0x61b9c
movq 0x50(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x50(%rsp)
jmp 0x61ae0
movq $-0x1, 0x70(%rsp)
jmp 0x61d48
movq 0x30(%rsp), %rdi
movq $0x0, 0x48(%rsp)
callq 0x56980
movq 0x30(%rsp), %rdi
subq $0x1, %rax
movq %rax, 0x40(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x48(%rsp), %rsi
callq 0x61e30
movq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x54450
testb $0x1, %al
jne 0x61c05
jmp 0x61c30
testb $0x1, 0x5f(%rsp)
je 0x61c19
movq $-0x1, %rax
movq %rax, (%rsp)
jmp 0x61c22
movq 0x48(%rsp), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x61d48
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x61e30
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x54450
testb $0x1, %al
jne 0x61c52
jmp 0x61c60
movq $-0x1, 0x70(%rsp)
jmp 0x61d48
jmp 0x61c62
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rax
addq 0x40(%rsp), %rax
shrq %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rsi
callq 0x61e30
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x52910
testb $0x1, %al
jne 0x61cb6
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x61e30
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x54450
testb $0x1, %al
jne 0x61cb6
jmp 0x61cd0
movq 0x48(%rsp), %rax
cmpq 0x38(%rsp), %rax
jne 0x61cc4
jmp 0x61cdc
movq 0x38(%rsp), %rax
movq %rax, 0x48(%rsp)
jmp 0x61cda
movq 0x38(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x61c62
movq 0x30(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0x61e30
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x52910
testb $0x1, %al
jne 0x61cfe
jmp 0x61d0a
movq 0x48(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x61d48
testb $0x1, 0x5f(%rsp)
je 0x61d33
movq 0x30(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x61e30
movq %rax, %rdi
movq 0x60(%rsp), %rsi
callq 0x52910
testb $0x1, %al
jne 0x61d33
jmp 0x61d3f
movq 0x40(%rsp), %rax
movq %rax, 0x70(%rsp)
jmp 0x61d48
movq $-0x1, 0x70(%rsp)
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)