// File: /workspace/github_cpp_makefile_star2_O1/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 0x157ad
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r15
leaq 0x55bc(%rip), %rcx      # 0x1a9c8
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 0x2f00
jmp 0x15764
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x10(%r15), %rdx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x1561e
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x15628
movq %r15, %rsi
movq %rbx, %rdx
callq 0x16f22
jmp 0x15764
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x4(%r15), %rdx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x1564b
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x15655
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 0x17158
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 0xc16e
movq 0x140(%rbx), %rax
testq %rax, %rax
je 0x15545
movq 0x8(%r12), %rcx
addq $-0x4, %rcx
movq (%rax), %rax
testq %rax, %rax
jne 0x15534
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 0x1559b
leaq 0x10(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r13, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x17362
addq $0x4, %r12
cmpq %r15, %r12
jne 0x15584
leaq 0x10(%rsp), %rsi
movq 0x50(%rsp), %rdi
callq 0x33fc
leaq 0x80(%rbx), %rdi
movq 0x80(%rbx), %rax
cmpq %rax, 0x88(%rbx)
je 0x155c8
movq %rax, 0x88(%rbx)
leaq 0x10(%rsp), %rsi
callq 0x1804a
leaq 0x98(%rbx), %rsi
movq %r14, %rdi
callq 0x17fd4
leaq 0x10(%rsp), %rdi
callq 0xcff8
jmp 0x15764
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
leaq 0x4(%r15), %rdx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x15675
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x1567f
leaq 0x10(%rsp), %rdi
callq 0xdeac
movq 0x10(%r15), %rdx
addq $0x8, %rdx
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x156a6
movl (%rdx), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x156b0
leaq 0x10(%rsp), %rdi
callq 0xdeac
addq $0x8, %r15
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x156df
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x156ec
leaq 0x10(%rsp), %rdi
callq 0xdeac
addq $0x8, %r15
movq 0x18(%rsp), %rsi
cmpq 0x20(%rsp), %rsi
je 0x1571b
movl (%r15), %eax
movl %eax, (%rsi)
addq $0x4, %rsi
movq %rsi, 0x18(%rsp)
jmp 0x15728
leaq 0x10(%rsp), %rdi
callq 0xdeac
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 0xc16e
jmp 0x15755
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0xdeac
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 0xc16e
jmp 0x15755
leaq 0x10(%rsp), %rdi
movq %r15, %rdx
callq 0xdeac
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 0xc16e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15764
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 0x1579e
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 0x5117(%rip), %rdi      # 0x1a8cb
leaq 0x530e(%rip), %rsi      # 0x1aac9
leaq 0x5482(%rip), %rcx      # 0x1ac44
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2110
jmp 0x157d6
jmp 0x157d6
jmp 0x157d6
jmp 0x157d6
jmp 0x157d6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x157f9
callq 0x21a0
jmp 0x157f9
jmp 0x157ec
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xcff8
movq %rbx, %rdi
callq 0x2320
nop