// File: /workspace/github_cpp_makefile_star2_O1/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, %r14
cmpq %rsi, %rdi
sete %al
cmpq %rcx, %rdx
sete %cl
orb %al, %cl
je 0x4a14
xorl %eax, %eax
jmp 0x4ba2
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r12
leaq -0x4(%r14), %rbp
leaq -0x4(%rsi), %rcx
movq %rcx, %r13
cmpq %r12, %rcx
je 0x4a40
movl (%rbp), %esi
movq %r13, %rdi
callq 0x4bb2
leaq -0x4(%r13), %rcx
testb %al, %al
je 0x4a25
cmpq %r12, %r13
je 0x4a49
xorl %eax, %eax
jmp 0x4a56
movl (%rbp), %esi
movq %r12, %rdi
callq 0x4bb2
xorb $0x1, %al
testb %al, %al
jne 0x4a96
movl %eax, 0x4(%rsp)
cmpq %rbx, %rbp
je 0x4a7a
movl (%rbx), %esi
movq %r13, %rdi
callq 0x4bb2
testb %al, %al
jne 0x4a7a
addq $0x4, %rbx
cmpq %rbp, %rbx
jne 0x4a63
leaq 0x4(%r13), %r12
movzwl (%r13), %eax
movzwl (%rbx), %ecx
movw %cx, (%r13)
movw %ax, (%rbx)
addq $0x4, %rbx
movl 0x4(%rsp), %eax
cmpq %r15, %r12
je 0x4ba0
cmpq %r14, %rbx
je 0x4ba0
leaq -0x4(%r15), %rcx
movq %rbx, %r8
movq %rcx, %rdx
movzwl (%rcx), %ecx
movzwl (%r8), %esi
movw %si, (%rdx)
movw %cx, (%r8)
addq $0x4, %r8
leaq -0x4(%rdx), %rcx
cmpq %r12, %rdx
je 0x4ad2
cmpq %r14, %r8
jne 0x4aaf
cmpq %r12, %rdx
setne %dl
cmpq %r12, %rcx
seta %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0x4b0b
leaq 0x4(%r12), %rdx
movzwl -0x4(%rdx), %esi
movzwl (%rcx), %edi
movw %di, -0x4(%rdx)
movw %si, (%rcx)
addq $-0x4, %rcx
leaq 0x4(%rdx), %rsi
cmpq %rcx, %rdx
movq %rsi, %rdx
jb 0x4aed
addq $-0x4, %r15
cmpq %r12, %r15
jbe 0x4b3d
addq $0x4, %r12
movzwl -0x4(%r12), %ecx
movzwl (%r15), %edx
movw %dx, -0x4(%r12)
movw %cx, (%r15)
addq $-0x4, %r15
leaq 0x4(%r12), %rcx
cmpq %r15, %r12
movq %rcx, %r12
jb 0x4b18
cmpq %r14, %r8
setne %cl
cmpq %r8, %rbp
seta %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x4b77
addq $0x4, %r8
movq %rbp, %rcx
movzwl -0x4(%r8), %edx
movzwl (%rcx), %esi
movw %si, -0x4(%r8)
movw %dx, (%rcx)
addq $-0x4, %rcx
leaq 0x4(%r8), %rdx
cmpq %rcx, %r8
movq %rdx, %r8
jb 0x4b57
cmpq %rbx, %rbp
jbe 0x4ba0
addq $0x4, %rbx
movzwl -0x4(%rbx), %edx
movzwl (%rbp), %ecx
movw %cx, -0x4(%rbx)
movw %dx, (%rbp)
addq $-0x4, %rbp
leaq 0x4(%rbx), %rcx
cmpq %rbp, %rbx
movq %rcx, %rbx
jb 0x4b80
xorb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop