// File: /workspace/github_cpp_makefile_star2_O3/grogers0[P]dots_and_boxes/./boost/algorithm/combination.hpp
// Function: bool boost::detail::next_combination<__gnu_cxx::__normal_iterator<Edge*, std::vector<Edge, std::allocator<Edge>>>>(__gnu_cxx::__normal_iterator<Edge*, std::vector<Edge, std::allocator<Edge>>>, __gnu_cxx::__normal_iterator<Edge*, std::vector<Edge, std::allocator<Edge>>>, __gnu_cxx::__normal_iterator<Edge*, std::vector<Edge, std::allocator<Edge>>>, __gnu_cxx::__normal_iterator<Edge*, std::vector<Edge, std::allocator<Edge>>>)
bool next_combination(BidirectionalIterator first1,
                        BidirectionalIterator last1,
                        BidirectionalIterator first2,
                        BidirectionalIterator last2)
  {
      if ((first1 == last1) || (first2 == last2)) {
          return false;
      }
      
      BidirectionalIterator m1 = last1;
      BidirectionalIterator m2 = last2; --m2;
      
      // Find first m1 not less than *m2 (i.e., lower_bound(first1, last1, *m2)).
      // Actually, this loop stops at one position before that, except perhaps
      // if m1 == first1 (in which case one must compare *first1 with *m2).
      while (--m1 != first1 && !(*m1 < *m2)) {
      }
      
      // Test if all elements in [first1, last1) not less than *m2.
      bool result = (m1 == first1) && !(*first1 < *m2);
      
      if (!result) {

          // Find first first2 greater than *m1 (since *m1 < *m2, we know it
          // can't pass m2 and there's no need to test m2).
          while (first2 != m2 && !(*m1 < *first2)) {
              ++first2;
          }
          
          first1 = m1;
          std::iter_swap (first1, first2);
          ++first1;
          ++first2;
      }
      
      // Merge [first1, last1) with [first2, last2), given that the rest of the
      // original ranges are sorted and compare appropriately.
      if ((first1 != last1) && (first2 != last2)) {      
          for (m1 = last1, m2 = first2;  (m1 != first1) && (m2 != last2); ++m2) {
              std::iter_swap (--m1, m2);
          }
          
          std::reverse (first1, m1);
          std::reverse (first1, last1);
          
          std::reverse (m2, last2);
          std::reverse (first2, last2);
      }
      
      return !result;
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
cmpq %rsi, %rdi
sete %al
cmpq %rcx, %rdx
sete %cl
orb %al, %cl
je 0x49ec
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq -0x4(%r12), %rbp
leaq -0x4(%rsi), %rcx
movq %rcx, %r13
movl (%rbp), %esi
cmpq %r15, %rcx
je 0x4a1b
movq %r13, %rdi
callq 0x4b52
leaq -0x4(%r13), %rcx
testb %al, %al
je 0x49fe
jmp 0x4a27
movq %r15, %rdi
callq 0x4b52
testb %al, %al
je 0x4a5f
cmpq %rbx, %rbp
je 0x4a43
movl (%rbx), %esi
movq %r13, %rdi
callq 0x4b52
testb %al, %al
jne 0x4a43
addq $0x4, %rbx
cmpq %rbp, %rbx
jne 0x4a2c
leaq 0x4(%r13), %r15
movzwl (%r13), %eax
movzwl (%rbx), %ecx
movw %cx, (%r13)
movw %ax, (%rbx)
addq $0x4, %rbx
movb $0x1, %al
jmp 0x4a61
xorl %eax, %eax
cmpq %r14, %r15
je 0x49dd
cmpq %r12, %rbx
je 0x49dd
leaq -0x4(%r14), %rdx
movq %rbx, %rcx
cmpq %r12, %rcx
je 0x4a9d
movzwl (%rdx), %esi
movzwl (%rcx), %edi
movw %di, (%rdx)
movw %si, (%rcx)
addq $0x4, %rcx
leaq -0x4(%rdx), %rsi
cmpq %r15, %rdx
movq %rsi, %rdx
jne 0x4a7a
jmp 0x4ac6
cmpq %r15, %rdx
jbe 0x4ac6
leaq 0x4(%r15), %rsi
movzwl -0x4(%rsi), %edi
movzwl (%rdx), %r8d
movw %r8w, -0x4(%rsi)
movw %di, (%rdx)
addq $-0x4, %rdx
leaq 0x4(%rsi), %rdi
cmpq %rdx, %rsi
movq %rdi, %rsi
jb 0x4aa6
addq $-0x4, %r14
cmpq %r15, %r14
jbe 0x4af5
addq $0x4, %r15
movzwl -0x4(%r15), %edx
movzwl (%r14), %esi
movw %si, -0x4(%r15)
movw %dx, (%r14)
addq $-0x4, %r14
leaq 0x4(%r15), %rdx
cmpq %r14, %r15
movq %rdx, %r15
jb 0x4ad3
cmpq %rcx, %rbp
jbe 0x4b1f
addq $0x4, %rcx
movq %rbp, %rdx
movzwl -0x4(%rcx), %esi
movzwl (%rdx), %edi
movw %di, -0x4(%rcx)
movw %si, (%rdx)
addq $-0x4, %rdx
leaq 0x4(%rcx), %rsi
cmpq %rdx, %rcx
movq %rsi, %rcx
jb 0x4b01
cmpq %rbx, %rbp
jbe 0x49dd
addq $0x4, %rbx
movzwl -0x4(%rbx), %ecx
movzwl (%rbp), %edx
movw %dx, -0x4(%rbx)
movw %cx, (%rbp)
addq $-0x4, %rbp
leaq 0x4(%rbx), %rcx
cmpq %rbp, %rbx
movq %rcx, %rbx
jb 0x4b2c
jmp 0x49dd
nop