// File: /workspace/github_cpp_makefile_star2_O3/iPapatsoris[P]Maximum-Independent-Set/src/Alg.hpp
// Function: Alg::BranchingRule::getOptimalNode(Graph const&, unsigned int const&)
void getOptimalNode(const Graph &graph, const uint32_t &theta) {
            bool found = false;
            uint32_t count = 0;
            Graph::GraphTraversal graphTraversal(graph);
            while (graphTraversal.curNode != NONE) {
                if (graph.getNodeDegree(graphTraversal.curNode) == theta) {
                    count++;
                    uint32_t node = graphTraversal.curNode;
                    switch (theta) {
                        case 8: {
                            uint32_t degree8Neighbors = graph.getNumberOfDegreeNeighbors(node, 8);
                            if (degree8Neighbors <= 7) {
                                found = true;
                            } else if (degree8Neighbors == 8 && getMeasure(graph, node) >= 36) {
                                found = true;
                            }
                            break;
                        }
                        case 7: {
                            std::unordered_set<uint32_t> extendedGrandchildren;
                            graph.getExtendedGrandchildren(graphTraversal, extendedGrandchildren, NULL, true);
                            if (extendedGrandchildren.size()) {
                                found = true;
                            } else {
                                uint32_t degree7Neighbors = graph.getNumberOfDegreeNeighbors(node, 7);
                                if (degree7Neighbors <= 5) {
                                    found = true;
                                } else {
                                    uint32_t measure = getMeasure(graph, node);
                                    if (degree7Neighbors == 6 && measure >= 22 - 2 * graph.getNumberOfDegreeNeighbors(node, 3) - graph.getNumberOfDegreeNeighbors(node, 4) ||
                                    degree7Neighbors == 7 && measure >= 26) {
                                        found = true;
                                    }
                                }
                            }
                            break;
                        }
                        case 6: {
                            if (graph.getNumberOfDegreeNeighbors(node, 3) >= 1) {
                                found = true;
                            } else {
                                uint32_t degree6Neighbors = graph.getNumberOfDegreeNeighbors(node, 6);
                                if (degree6Neighbors <= 3) {
                                    found = true;
                                } else {
                                    uint32_t degree5Neighbors = graph.getNumberOfDegreeNeighbors(node, 5);
                                    if (degree6Neighbors == 4 && degree5Neighbors <= 1) {
                                        found = true;
                                    } else {
                                        std::unordered_set<uint32_t> neighborsAtDistance2;
                                        uint32_t count = 0;
                                        graph.getNeighborsAtDistance2(node, neighborsAtDistance2, theta, &count);
                                        uint32_t measure = getMeasure(graph, node, &neighborsAtDistance2);
                                        measure += count;
                                        if (degree6Neighbors == 4 && degree5Neighbors == 2 && measure >= 17 ||
                                        degree6Neighbors == 5 && graph.getNumberOfDegreeNeighbors(node, 4) == 1 && measure >= 18 ||
                                        degree6Neighbors == 5 && degree5Neighbors == 1 && measure >= 19 ||
                                        degree6Neighbors == 6 && measure >= 22) {
                                            found = true;
                                        }
                                    }
                                }
                            }
                            break;
                        }
                        default:
                            assert(false);
                    }
                    if (found) {
                        break;
                    }
                }
                graph.getNextNode(graphTraversal);
            }
            assert(found);
            node1 = graphTraversal.curNode;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rdx, 0x28(%rsp)
movq %rsi, %r15
movq %rdi, 0x68(%rsp)
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x29d8
cmpl $-0x1, (%rbx)
je 0x1636e
xorl %r14d, %r14d
leaq 0x18(%rsp), %r13
leaq 0x10(%rsp), %rbp
movq %r15, %rdi
movq %r13, %rsi
callq 0xc2d2
movq 0x28(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x16270
movl 0x18(%rsp), %ecx
movl %ecx, 0x10(%rsp)
cmpl $0x6, %eax
je 0x1609a
cmpl $0x7, %eax
je 0x16044
cmpl $0x8, %eax
jne 0x1634f
movl $0x8, 0x30(%rsp)
movl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x2b7c
cmpl $0x8, %eax
jb 0x16334
jne 0x1603a
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x163b0
cmpl $0x24, %eax
movzbl %r14b, %r14d
movl $0x1, %eax
cmovael %eax, %r14d
leaq 0x18(%rsp), %r13
jmp 0x16266
leaq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x1, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x50(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movb $0x1, 0xc(%rsp)
movq %r15, %rdi
movq %r13, %rsi
leaq 0x30(%rsp), %rdx
xorl %ecx, %ecx
leaq 0xc(%rsp), %r8
callq 0x3fee
cmpq $0x0, 0x48(%rsp)
je 0x161fe
movb $0x1, %r14b
jmp 0x16232
movq %r14, 0x70(%rsp)
movl $0x3, 0x30(%rsp)
movl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdx
leaq 0xc(%rsp), %r12
movq %r12, %rcx
callq 0x2b7c
testl %eax, %eax
jne 0x16334
movl $0x6, 0x30(%rsp)
movl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2b7c
cmpl $0x4, %eax
jb 0x16334
movl %eax, %r13d
movl $0x5, 0x30(%rsp)
movl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x2b7c
movl %eax, %ebx
cmpl $0x4, %r13d
sete %al
cmpl $0x2, %ebx
setb %cl
testb %cl, %al
jne 0x16334
leaq 0x60(%rsp), %rax
movq %rax, 0x30(%rsp)
movq $0x1, 0x38(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, -0x20(%rax)
movl $0x3f800000, 0x50(%rsp) # imm = 0x3F800000
movups %xmm0, -0x8(%rax)
movl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq 0x28(%rsp), %rcx
movq %r12, %r8
callq 0x2cca
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x163b0
movl %eax, %ebp
movl %r13d, %eax
addl 0xc(%rsp), %ebp
xorl $0x4, %eax
movl %ebx, %ecx
xorl $0x2, %ecx
orl %eax, %ecx
sete %al
cmpl $0x11, %ebp
setae %cl
testb %cl, %al
movq 0x70(%rsp), %r14
jne 0x1624f
cmpl $0x5, %r13d
jne 0x1623e
movl $0x4, 0x14(%rsp)
movl $0x0, 0x20(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x20(%rsp), %rcx
callq 0x2b7c
cmpl $0x1, %eax
sete %al
cmpl $0x12, %ebp
setae %cl
testb %cl, %al
jne 0x1624f
cmpl $0x1, %ebx
sete %al
cmpl $0x13, %ebp
jmp 0x16248
movl $0x7, 0xc(%rsp)
movl $0x0, 0x14(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x2b7c
movl %eax, %ebp
cmpl $0x6, %eax
jae 0x1628b
movb $0x1, %r14b
leaq 0x10(%rsp), %rbp
leaq 0x30(%rsp), %rdi
callq 0xc950
jmp 0x16266
cmpl $0x6, %r13d
sete %al
cmpl $0x16, %ebp
setae %cl
testb %cl, %al
je 0x16252
movb $0x1, %r14b
leaq 0x30(%rsp), %rdi
callq 0xc950
leaq 0x18(%rsp), %r13
leaq 0x10(%rsp), %rbp
testb $0x1, %r14b
jne 0x1632e
movq %r15, %rdi
movq %r13, %rsi
callq 0xb94a
cmpl $-0x1, 0x18(%rsp)
jne 0x15fb6
jmp 0x1632e
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x163b0
movl %eax, %ebx
cmpl $0x6, %ebp
jne 0x16310
movl $0x3, 0xc(%rsp)
movl $0x0, 0x14(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rbp
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x2b7c
movl %eax, %r13d
movl $0x4, 0x20(%rsp)
movl $0x0, 0x24(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x20(%rsp), %rdx
leaq 0x24(%rsp), %rcx
callq 0x2b7c
leal (%rax,%r13,2), %eax
movl $0x16, %ecx
subl %eax, %ecx
cmpl %ecx, %ebx
leaq 0x18(%rsp), %r13
jae 0x16092
jmp 0x16232
cmpl $0x7, %ebp
setne %al
cmpl $0x1a, %ebx
setb %cl
orb %al, %cl
leaq 0x10(%rsp), %rbp
je 0x16092
jmp 0x16232
testb $0x1, %r14b
je 0x1636e
movl 0x18(%rsp), %eax
movq 0x68(%rsp), %rcx
movl %eax, 0x4(%rcx)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3575(%rip), %rdi      # 0x198cb
leaq 0x376c(%rip), %rsi      # 0x19ac9
leaq 0x37c8(%rip), %rcx      # 0x19b2c
movl $0xef, %edx
callq 0x2110
leaq 0x3800(%rip), %rdi      # 0x19b75
leaq 0x374d(%rip), %rsi      # 0x19ac9
leaq 0x37a9(%rip), %rcx      # 0x19b2c
movl $0xf7, %edx
callq 0x2110
jmp 0x1639b
jmp 0x1639b
jmp 0x1639b
jmp 0x1639b
jmp 0x1639b
jmp 0x1639b
jmp 0x1639b
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xc950
movq %rbx, %rdi
callq 0x2320