// File: /workspace/github_cpp_makefile_star2_O3/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 0x14d91
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x4f8a(%rip), %rcx      # 0x199c8
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 0x2f76
jmp 0x14d48
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x10(%r15), %rdx
xorl %esi, %esi
callq 0xd7b4
movq 0x18(%rsp), %rsi
movq 0x10(%r15), %rdx
addq $0x8, %rdx
cmpq 0x20(%rsp), %rsi
je 0x14c8a
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x14c94
movq %r15, %rsi
movq %rbx, %rdx
callq 0x1654a
jmp 0x14d48
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x4(%r15), %rdx
xorl %esi, %esi
callq 0xd7b4
movq 0x18(%rsp), %rsi
addq $0x8, %r15
cmpq 0x20(%rsp), %rsi
je 0x14cc3
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x14cd0
leaq 0x168(%rbx), %r12
xorl %r15d, %r15d
cmpb %r15b, 0x198(%rbx)
leaq 0x180(%rbx), %rax
movq %rax, %rbp
cmovneq %r12, %rbp
cmovneq %rax, %r12
movq 0x8(%r12), %rsi
movq 0x140(%rbx), %rdx
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x1676c
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
leaq 0x10(%rsp), %r13
movb %r15b, (%r13)
leaq 0x8(%rsp), %r9
movb %r15b, (%r9)
movq %rdi, 0x50(%rsp)
movq %r12, %rsi
movq %r13, %rcx
xorl %r8d, %r8d
callq 0xbaa6
movq 0x140(%rbx), %rax
testq %rax, %rax
je 0x14b9a
movq 0x8(%r12), %rcx
addq $-0x4, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x14b89
movq %rcx, 0x8(%r12)
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 (%rbp), %r12
movq 0x8(%rbp), %r15
movq %r13, 0x8(%rsp)
cmpq %r15, %r12
je 0x14bf0
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x16994
addq $0x4, %r12
cmpq %r15, %r12
jne 0x14bd9
leaq 0x10(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x346c
leaq 0x80(%rbx), %rdi
movq 0x80(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x14c1d
movq %rax, 0x88(%rbx)
leaq 0x10(%rsp), %rsi
callq 0x173e2
leaq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x1736c
leaq 0x10(%rsp), %rdi
callq 0xc950
jmp 0x14d48
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
leaq 0x4(%r15), %rdx
xorl %esi, %esi
callq 0xd7b4
movq 0x18(%rsp), %rsi
addq $0x8, %r15
cmpq 0x20(%rsp), %rsi
je 0x14cff
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x14d0c
leaq 0x10(%rsp), %rdi
callq 0xd7b4
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0x4(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0xbaa6
jmp 0x14d39
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0xd7b4
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0x4(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0xbaa6
jmp 0x14d39
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0xd7b4
leaq 0x30(%rbx), %rdi
movq 0x108(%rbx), %rdx
addq $0x10, %rdx
xorl %eax, %eax
leaq 0x8(%rsp), %rcx
movb %al, (%rcx)
leaq 0x4(%rsp), %r9
movb %al, (%r9)
leaq 0x10(%rsp), %rsi
xorl %r8d, %r8d
callq 0xbaa6
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14d48
callq 0x21a0
movl 0x4(%rbx), %eax
leaq 0x4(%rsp), %r14
movl %eax, (%r14)
leaq 0x30(%rbx), %rdi
leaq 0x10(%rsp), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdx
movq %r14, %rcx
callq 0x2a00
movl (%r15), %eax
cmpl (%r14), %eax
jae 0x14d82
cmpl $0x4, %eax
movl $0x3, %ecx
cmovael %eax, %ecx
movl %ecx, 0x4(%rbx)
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x4b33(%rip), %rdi      # 0x198cb
leaq 0x4d2a(%rip), %rsi      # 0x19ac9
leaq 0x4e9e(%rip), %rcx      # 0x19c44
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2110
jmp 0x14dba
jmp 0x14dba
jmp 0x14dba
jmp 0x14dba
jmp 0x14dba
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x14ddd
callq 0x21a0
jmp 0x14ddd
jmp 0x14dd0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xc950
movq %rbx, %rdi
callq 0x2320
nop