// File: /workspace/github_cpp_makefile_star2_O3/kiudee[P]VAHD-Projekt/Node.cpp
// Function: Node::doDebruijnHop(SearchJob*)
bool Node::doDebruijnHop(SearchJob *sj)
{
    if (!isReal) {
        return false;
    }
    double hashedkey = sj->sid;

    if (hashedkey < num) {
        if (fabs(hashedkey - num / 2) < fabs(hashedkey - num)) {
            sj->round++;
            sj->hopcount++;
            if (sj->type == LOOKUP || sj->type == INSERT || sj->type == DELETE) {
                std::cout << "(" << sj->_debugID << ") " << num << "<-doDebruijnHop(" << sj->sid << ") to " << (num / 2) << "\n";
            }
            node0->out->call(Node::Search, sj);
            return true;
        }

    } else if (hashedkey > num) {
        if (fabs(hashedkey - (1 + num) / 2) < fabs(hashedkey - num)) {
            sj->round++;
            sj->hopcount++;
            if (sj->type == LOOKUP || sj->type == INSERT || sj->type == DELETE) {
                std::cout << "(" << sj->_debugID << ") " << num << "<-doDebruijnHop(" << sj->sid << ") to " << ((1 + num) / 2) << "\n";
            }
            node1->out->call(Node::Search, sj);
            return true;
        }
    } else { // hashedkey == num
        FinishSearch(sj);
    }
    return false;//default: if no hop was performed, perform a list hop
}

// Assembly:
cmpb $0x1, 0xb8(%rdi)
jne 0x99a2
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movsd 0x20(%rsi), %xmm0
movsd 0xb0(%rdi), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x99a5
movsd 0x2b1d(%rip), %xmm2     # 0xc3b8
mulsd %xmm1, %xmm2
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
subpd %xmm2, %xmm0
andpd 0x2b2d(%rip), %xmm0     # 0xc3e0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
ucomisd %xmm0, %xmm1
jbe 0x9b2a
movq 0x48(%r14), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x48(%r14)
cmpl $0x2, 0x38(%r14)
ja 0x9996
movq 0x76e8(%rip), %r15      # 0x10fd0
leaq 0x2b6e(%rip), %rsi      # 0xc45d
movl $0x1, %edx
movq %r15, %rdi
callq 0x21a0
movq (%r14), %rsi
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
leaq 0x2b25(%rip), %rsi      # 0xc436
movl $0x2, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0xb0(%rbx), %xmm0
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
leaq 0x2b51(%rip), %rsi      # 0xc489
movl $0x10, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0x20(%r14), %xmm0
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
leaq 0x2b3d(%rip), %rsi      # 0xc49a
movl $0x5, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0xb0(%rbx), %xmm0
mulsd 0x2a3e(%rip), %xmm0     # 0xc3b8
movq %r15, %rdi
callq 0x2230
leaq 0x2ae6(%rip), %rsi      # 0xc46f
movl $0x1, %edx
movq %rax, %rdi
callq 0x21a0
movq 0xd8(%rbx), %rax
jmp 0x9ac9
xorl %eax, %eax
retq
ucomisd %xmm1, %xmm0
jbe 0x9b1f
movsd 0x2a09(%rip), %xmm2     # 0xc3c0
addsd %xmm1, %xmm2
mulsd 0x29f5(%rip), %xmm2     # 0xc3b8
unpcklpd %xmm0, %xmm0            # xmm0 = xmm0[0,0]
unpcklpd %xmm1, %xmm2            # xmm2 = xmm2[0],xmm1[0]
subpd %xmm2, %xmm0
andpd 0x2a09(%rip), %xmm0     # 0xc3e0
pshufd $0xee, %xmm0, %xmm1     # xmm1 = xmm0[2,3,2,3]
ucomisd %xmm0, %xmm1
jbe 0x9b2a
movq 0x48(%r14), %xmm0
pcmpeqd %xmm1, %xmm1
psubd %xmm1, %xmm0
movq %xmm0, 0x48(%r14)
cmpl $0x2, 0x38(%r14)
ja 0x9ac2
movq 0x75c4(%rip), %r15      # 0x10fd0
leaq 0x2a4a(%rip), %rsi      # 0xc45d
movl $0x1, %edx
movq %r15, %rdi
callq 0x21a0
movq (%r14), %rsi
movq %r15, %rdi
callq 0x20e0
movq %rax, %r15
leaq 0x2a01(%rip), %rsi      # 0xc436
movl $0x2, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0xb0(%rbx), %xmm0
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
leaq 0x2a2d(%rip), %rsi      # 0xc489
movl $0x10, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0x20(%r14), %xmm0
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
leaq 0x2a19(%rip), %rsi      # 0xc49a
movl $0x5, %edx
movq %rax, %rdi
callq 0x21a0
movsd 0xb0(%rbx), %xmm0
addsd 0x2922(%rip), %xmm0     # 0xc3c0
mulsd 0x2912(%rip), %xmm0     # 0xc3b8
movq %r15, %rdi
callq 0x2230
leaq 0x29ba(%rip), %rsi      # 0xc46f
movl $0x1, %edx
movq %rax, %rdi
callq 0x21a0
movq 0xe0(%rbx), %rax
movq 0x28(%rax), %r15
movl $0x38, %edi
callq 0x2160
leaq 0x76ca(%rip), %rcx      # 0x111a8
movq (%rcx), %rdx
movq %rdx, (%rax)
incq %rdx
movq %rdx, (%rcx)
pxor %xmm0, %xmm0
movdqu %xmm0, 0x8(%rax)
leaq -0x1386(%rip), %rcx     # 0x8774
movq %rcx, 0x18(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movq %r14, 0x28(%rax)
movq %rcx, 0x30(%rax)
movq (%r15), %rcx
movq %r15, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq *0x8(%rcx)
movb $0x1, %al
jmp 0x9b2c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x89c2
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq