// File: /workspace/github_cpp_makefile_star2_O2/iPapatsoris[P]Maximum-Independent-Set/src/Alg.hpp
// Function: Alg::branchLeft(Alg::BranchingRule const&, Alg::SearchNode*, Mis&) const
void branchLeft(const BranchingRule &branchingRule, SearchNode *searchNode, Mis &parentMis) const {
        switch (branchingRule.type) {
            case BranchingRule::Type::MAX_DEGREE:
            case BranchingRule::Type::OPTNODE:
            case BranchingRule::Type::OPT4NODE:
            case BranchingRule::Type::EFFECTIVE_NODE: {
                searchNode->graph.remove(branchingRule.node1, searchNode->reductions->getReduceInfo());
                break;
            }
            case BranchingRule::Type::SHORT_EDGE: {
                std::vector<uint32_t> shortEdge;
                shortEdge.push_back(branchingRule.node1);
                shortEdge.push_back(branchingRule.node2);
                searchNode->graph.remove(shortEdge, searchNode->reductions->getReduceInfo());
                break;
            }
            case BranchingRule::Type::GOOD_FUNNEL: {
                branchOnExtendedGranchildren(branchingRule, searchNode);
                break;
            }
            case BranchingRule::Type::GOOD_PAIR: {
                std::vector<uint32_t> goodPair;
                goodPair.push_back(branchingRule.node1);
                goodPair.push_back(branchingRule.node2);
                searchNode->graph.remove(goodPair, searchNode->reductions->getReduceInfo());
                break;
            }
            case BranchingRule::Type::FOUR_CYCLE: {
                std::vector<uint32_t> nonAdjacent;
                nonAdjacent.push_back(branchingRule.container[0]);
                nonAdjacent.push_back(branchingRule.container[2]);
                searchNode->graph.remove(nonAdjacent, searchNode->reductions->getReduceInfo());
                break;
            }
            case BranchingRule::Type::CUT: {
                //std::cout << "left cut" << std::endl;
                std::vector<uint32_t> *component1 = (searchNode->actualComponent1 ? &(searchNode->c1) : &(searchNode->c2));
                std::vector<uint32_t> *component2 = (searchNode->actualComponent1 ? &(searchNode->c2) : &(searchNode->c1));
                component2->insert(component2->end(), searchNode->cut.begin(), searchNode->cut.end());
                searchNode->graph.remove(*component2, searchNode->reductions->getReduceInfo());
                for (auto c: searchNode->cut) {
                    component2->pop_back();
                }
                std::unordered_set<uint32_t> nodesInComponent;
                nodesInComponent.insert(component1->begin(), component1->end());
                searchNode->graph.rebuildFromNodes(nodesInComponent);
                searchNode->mis.getMis().clear();
                searchNode->mis.removeSubsequentNodes(nodesInComponent);
                parentMis.removeHypernodes(searchNode->mis.getHypernodeToInnerNode());
                break;
            }
            default:
                assert(false);
        }
        uint32_t dummy, maxDegree;
        uint32_t oldTheta = searchNode->theta;
        searchNode->graph.getMaxNodeDegree(dummy, maxDegree, oldTheta);
        if (maxDegree < oldTheta) {
            if (maxDegree >= 3) {
                searchNode->theta = maxDegree;
            } else {
                searchNode->theta = 3;
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x12e2d
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x4e68(%rip), %rcx      # 0x179e4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x30(%rbx), %rdi
addq $0x4, %r15
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
leaq 0x10(%rsp), %rcx
movb $0x0, (%rcx)
movq %r15, %rsi
callq 0x2bae
jmp 0x12de6
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
movq 0x10(%r15), %rsi
callq 0xa1ac
movq 0x10(%r15), %rsi
addq $0x8, %rsi
leaq 0x10(%rsp), %rdi
callq 0xa1ac
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0xc(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0x9e48
jmp 0x12ddc
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1434a
jmp 0x12de6
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x4(%r15), %rsi
callq 0xa1ac
addq $0x8, %r15
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xa1ac
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0xc(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0x9e48
jmp 0x12ddc
movb 0x198(%rbx), %r15b
leaq 0x168(%rbx), %r12
leaq 0x180(%rbx), %r13
testb %r15b, %r15b
movq %r12, 0x50(%rsp)
cmovneq %r13, %r12
movq 0x8(%r12), %rsi
leaq 0x140(%rbx), %rbp
movq 0x140(%rbx), %rdx
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x14504
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
leaq 0x10(%rsp), %rcx
xorl %eax, %eax
movb %al, (%rcx)
leaq 0x8(%rsp), %r9
movb %al, (%r9)
movq %rdi, 0x48(%rsp)
movq %r12, %rsi
xorl %r8d, %r8d
callq 0x9e48
movq (%rbp), %rbp
testq %rbp, %rbp
je 0x12cf5
addq $-0x4, 0x8(%r12)
jmp 0x12ce4
testb %r15b, %r15b
cmovneq 0x50(%rsp), %r13
leaq 0x40(%rsp), %rax
movq %rax, -0x30(%rax)
movq $0x1, -0x28(%rax)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, -0x10(%rax) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movq (%r13), %rsi
movq 0x8(%r13), %rdx
leaq 0x10(%rsp), %rdi
callq 0x14716
leaq 0x10(%rsp), %rsi
movq 0x48(%rsp), %rdi
callq 0x2f6a
leaq 0x80(%rbx), %rdi
movq 0x80(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x12d60
movq %rax, 0x88(%rbx)
leaq 0x10(%rsp), %rsi
callq 0x15018
leaq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x14fac
leaq 0x10(%rsp), %rdi
callq 0xad26
jmp 0x12de6
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x4(%r15), %rsi
callq 0xa1ac
addq $0x8, %r15
leaq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0xa1ac
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0xc(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0x9e48
leaq 0x10(%rsp), %rdi
callq 0xb872
movl 0x4(%rbx), %eax
leaq 0xc(%rsp), %r14
movl %eax, (%r14)
leaq 0x30(%rbx), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
movq %r14, %rcx
callq 0x2732
movl (%r15), %eax
cmpl (%r14), %eax
jae 0x12e1e
cmpl $0x4, %eax
pushq $0x3
popq %rcx
cmovael %eax, %ecx
movl %ecx, 0x4(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4ab4(%rip), %rdi      # 0x178e8
leaq 0x4caa(%rip), %rsi      # 0x17ae5
leaq 0x4e1e(%rip), %rcx      # 0x17c60
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2100
jmp 0x12e56
jmp 0x12e56
jmp 0x12e56
jmp 0x12e56
jmp 0x12e56
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xb872
jmp 0x12e72
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xad26
movq %rbx, %rdi
callq 0x22c0