// File: /workspace/github_cpp_makefile_star2_O2/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 0x1c(%rsp), %r13
movq %r13, %rdi
callq 0x270e
xorl %r14d, %r14d
leaq 0x10(%rsp), %rbp
cmpl $-0x1, 0x1c(%rsp)
je 0x14163
movq %r15, %rdi
movq %r13, %rsi
callq 0xa5ce
movq 0x28(%rsp), %rcx
cmpl (%rcx), %eax
jne 0x140b8
movl 0x1c(%rsp), %ecx
movl %ecx, 0x10(%rsp)
cmpl $0x6, %eax
je 0x13ef0
cmpl $0x7, %eax
je 0x13e9a
cmpl $0x8, %eax
jne 0x14184
movl $0x8, 0x30(%rsp)
andl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %rdx
leaq 0xc(%rsp), %rcx
callq 0x285e
cmpl $0x8, %eax
jb 0x14169
jne 0x13e90
movq %r15, %rdi
movq %rbp, %rsi
xorl %edx, %edx
callq 0x141e6
cmpl $0x24, %eax
movzbl %r14b, %r14d
pushq $0x1
popq %rax
cmovael %eax, %r14d
leaq 0x1c(%rsp), %r13
jmp 0x140ae
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 0x3868
cmpq $0x0, 0x48(%rsp)
je 0x14073
movb $0x1, %r14b
jmp 0x140a4
movq %r14, 0x70(%rsp)
movl $0x3, 0x30(%rsp)
andl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x30(%rsp), %r14
movq %r14, %rdx
leaq 0xc(%rsp), %r12
movq %r12, %rcx
callq 0x285e
testl %eax, %eax
jne 0x14169
movl $0x6, 0x30(%rsp)
andl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x285e
cmpl $0x4, %eax
jb 0x14169
movl %eax, %ebx
movl $0x5, 0x30(%rsp)
andl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %r12, %rcx
callq 0x285e
movl %eax, %r13d
cmpl $0x4, %ebx
sete %al
cmpl $0x2, %r13d
setb %cl
testb %cl, %al
jne 0x14169
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)
andl $0x0, 0xc(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq 0x28(%rsp), %rcx
movq %r12, %r8
callq 0x2966
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
callq 0x141e6
movl %eax, %ebp
movl %ebx, %eax
addl 0xc(%rsp), %ebp
xorl $0x4, %eax
movl %r13d, %ecx
xorl $0x2, %ecx
orl %eax, %ecx
sete %al
cmpl $0x11, %ebp
setae %cl
testb %cl, %al
movq 0x70(%rsp), %r14
jne 0x1405a
cmpl $0x5, %ebx
jne 0x14031
movl $0x4, 0x14(%rsp)
andl $0x0, 0x18(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
leaq 0x14(%rsp), %rdx
leaq 0x18(%rsp), %rcx
callq 0x285e
cmpl $0x1, %eax
sete %al
cmpl $0x12, %ebp
setae %cl
testb %cl, %al
jne 0x1405a
movl %ebx, %eax
xorl $0x5, %eax
xorl $0x1, %r13d
orl %eax, %r13d
sete %al
cmpl $0x13, %ebp
setae %cl
testb %cl, %al
jne 0x1405a
cmpl $0x6, %ebx
sete %al
cmpl $0x16, %ebp
setae %cl
testb %cl, %al
je 0x1405d
movb $0x1, %r14b
leaq 0x30(%rsp), %rdi
callq 0xad26
leaq 0x1c(%rsp), %r13
leaq 0x10(%rsp), %rbp
jmp 0x140ae
movl $0x7, 0xc(%rsp)
andl $0x0, 0x14(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x285e
movl %eax, %ebp
cmpl $0x6, %eax
jae 0x140c8
movb $0x1, %r14b
leaq 0x10(%rsp), %rbp
leaq 0x30(%rsp), %rdi
callq 0xad26
testb $0x1, %r14b
jne 0x14163
movq %r15, %rdi
movq %r13, %rsi
callq 0x9cf8
jmp 0x13e06
movq %r15, %rdi
leaq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x141e6
movl %eax, %ebx
cmpl $0x6, %ebp
jne 0x14145
movl $0x3, 0xc(%rsp)
andl $0x0, 0x14(%rsp)
movq %r15, %rdi
leaq 0x10(%rsp), %rbp
movq %rbp, %rsi
leaq 0xc(%rsp), %rdx
leaq 0x14(%rsp), %rcx
callq 0x285e
movl %eax, %r13d
movl $0x4, 0x18(%rsp)
andl $0x0, 0x24(%rsp)
movq %r15, %rdi
movq %rbp, %rsi
leaq 0x18(%rsp), %rdx
leaq 0x24(%rsp), %rcx
callq 0x285e
leal (%rax,%r13,2), %eax
pushq $0x16
popq %rcx
subl %eax, %ecx
cmpl %ecx, %ebx
leaq 0x1c(%rsp), %r13
jae 0x13ee8
jmp 0x140a4
cmpl $0x7, %ebp
setne %al
cmpl $0x1a, %ebx
setb %cl
orb %al, %cl
leaq 0x10(%rsp), %rbp
je 0x13ee8
jmp 0x140a4
testb $0x1, %r14b
je 0x141a3
movl 0x1c(%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 0x375d(%rip), %rdi      # 0x178e8
leaq 0x3953(%rip), %rsi      # 0x17ae5
leaq 0x39af(%rip), %rcx      # 0x17b48
movl $0xef, %edx
callq 0x2100
leaq 0x39e7(%rip), %rdi      # 0x17b91
leaq 0x3934(%rip), %rsi      # 0x17ae5
leaq 0x3990(%rip), %rcx      # 0x17b48
movl $0xf7, %edx
callq 0x2100
jmp 0x141d0
jmp 0x141d0
jmp 0x141d0
jmp 0x141d0
jmp 0x141d0
jmp 0x141d0
jmp 0x141d0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xad26
movq %rbx, %rdi
callq 0x22c0
nop