// File: /workspace/github_cpp_makefile_star2_O3/kiudee[P]VAHD-Projekt/Node.cpp
// Function: Node::BuildWeakConnectedComponent(NumObj*)
Action Node::BuildWeakConnectedComponent(NumObj *numo)
{

    IdObj *tempido;

    if (numo->num == 0) {
        //envelope left neighbor
        //TO DO check if left is existing before delegating. maybe this is not necessary because if the left is not exisiting, we would not come so far. otherwise the link to left might be broken.
        if (left != NULL) {
            tempido = new IdObj(left->num, extractIdentity(left->out), left->debugID);
            delete left;
            leftstable = false;

            //link to v.0
            left = new NodeRelay(num / 2, new Identity(node0->out), node0->debugID);
            //delegate old left neighbor to node0
            left->out->call(Node::BuildList, tempido);
        } else {
            leftstable = false;

            //link to v.0
            left = new NodeRelay(num / 2, new Identity(node0->out), node0->debugID);
        }

    } else if (numo->num == 1) {
        if (right != NULL) {
            tempido = new IdObj(right->num, extractIdentity(right->out), right->debugID);
            delete right;
            rightstable = false;

            right = new NodeRelay((1 + num) / 2, new Identity(node1->out), node1->debugID);
            right->out->call(Node::BuildList, tempido);
        } else {
            rightstable = false;

            right = new NodeRelay((1 + num) / 2, new Identity(node1->out), node1->debugID);
        }
    }
    delete numo;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbp
movq %rdi, %r15
movl 0x20(%rsi), %eax
cmpl $0x1, %eax
je 0xb181
testl %eax, %eax
jne 0xb766
movq 0xc8(%r15), %r12
testq %r12, %r12
je 0xb234
movq %rbp, 0x10(%rsp)
movl $0x38, %edi
callq 0x2160
movq %rax, (%rsp)
movsd 0x20(%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x609b(%rip), %r14      # 0x111a0
movq (%r14), %rbp
testq %rbp, %rbp
je 0xb3e2
cmpq $0x0, 0x10(%r15)
jne 0xb123
cmpq $0x0, 0x8(%r15)
jne 0xb3e4
movq 0x28(%r12), %rbx
testq %rbx, %rbx
je 0xb3e4
cmpq %r15, 0x18(%rbx)
jne 0xb3e4
movl $0x28, %edi
callq 0x2160
movq %rax, %r13
leaq 0x6039(%rip), %rax      # 0x11188
movq (%rax), %rcx
movq %rcx, (%r13)
incq %rcx
movq %rcx, (%rax)
movq %rbp, 0x8(%r13)
movq %rbx, %rax
movq 0x28(%rbx), %rbx
movq %rbx, 0x10(%r13)
movq %rax, %rdi
cmpl $0x0, 0x14(%rax)
je 0xb781
movq 0x20(%r15), %rax
jmp 0xb783
movq 0xd0(%r15), %r12
testq %r12, %r12
je 0xb30b
movq %rbp, 0x10(%rsp)
movl $0x38, %edi
callq 0x2160
movq %rax, (%rsp)
movsd 0x20(%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x5fe8(%rip), %r14      # 0x111a0
movq (%r14), %rbp
testq %rbp, %rbp
je 0xb50c
cmpq $0x0, 0x10(%r15)
jne 0xb1d6
cmpq $0x0, 0x8(%r15)
jne 0xb50e
movq 0x28(%r12), %rbx
testq %rbx, %rbx
je 0xb50e
cmpq %r15, 0x18(%rbx)
jne 0xb50e
movl $0x28, %edi
callq 0x2160
movq %rax, %r13
leaq 0x5f86(%rip), %rax      # 0x11188
movq (%rax), %rcx
movq %rcx, (%r13)
incq %rcx
movq %rcx, (%rax)
movq %rbp, 0x8(%r13)
movq %rbx, %rax
movq 0x28(%rbx), %rbx
movq %rbx, 0x10(%r13)
movq %rax, %rdi
cmpl $0x0, 0x14(%rax)
je 0xb7e0
movq 0x20(%r15), %rax
jmp 0xb7e2
movb $0x0, 0x60(%r15)
movl $0x38, %edi
callq 0x2160
movq %rax, %rbx
movsd 0xb0(%r15), %xmm0
movsd %xmm0, (%rsp)
movl $0x28, %edi
callq 0x2160
movq %rax, %r12
movq 0xd8(%r15), %r13
movq 0x28(%r13), %r14
leaq 0x5f15(%rip), %rax      # 0x11188
movq (%rax), %rcx
movq %rcx, (%r12)
incq %rcx
movq %rcx, (%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r12)
movq $0x0, 0x18(%r12)
leaq 0x5f05(%rip), %rax      # 0x111a0
movq (%rax), %rax
testq %rax, %rax
je 0xb6f6
movq %rax, 0x8(%r12)
movupd %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
testq %r14, %r14
je 0xb706
cmpq %rax, 0x18(%r14)
jne 0xb706
movq %r14, 0x10(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x20(%r12)
movl $0x18, %edi
callq 0x2160
movq %r12, 0x10(%rax)
movq 0x40(%r14), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb2fb
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
jmp 0xb706
movb $0x0, 0x61(%r15)
movl $0x38, %edi
callq 0x2160
movq %rax, %rbx
movsd 0xb0(%r15), %xmm0
movsd %xmm0, (%rsp)
movl $0x28, %edi
callq 0x2160
movq %rax, %r12
movq 0xe0(%r15), %r13
movq 0x28(%r13), %r14
leaq 0x5e3e(%rip), %rax      # 0x11188
movq (%rax), %rcx
movq %rcx, (%r12)
incq %rcx
movq %rcx, (%rax)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r12)
movq $0x0, 0x18(%r12)
leaq 0x5e2e(%rip), %rax      # 0x111a0
movq (%rax), %rax
testq %rax, %rax
je 0xb72b
movq %rax, 0x8(%r12)
movupd %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
testq %r14, %r14
je 0xb73b
cmpq %rax, 0x18(%r14)
jne 0xb73b
movq %r14, 0x10(%r12)
movq 0x30(%r14), %rax
movq %rax, 0x20(%r12)
movl $0x18, %edi
callq 0x2160
movq %r12, 0x10(%rax)
movq 0x40(%r14), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb3d2
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
jmp 0xb73b
xorl %ebp, %ebp
xorl %r13d, %r13d
movl 0x30(%r12), %eax
leaq 0x5d95(%rip), %r14      # 0x11188
movq (%r14), %rcx
movq (%rsp), %rdx
movq %rcx, (%rdx)
incq %rcx
movq %rcx, (%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rdx)
movq $0x0, 0x18(%rdx)
testq %rbp, %rbp
je 0xb423
movq %rdx, %rcx
addq $0x8, %rcx
movq %rbp, (%rcx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rdx)
movq %r13, 0x28(%rdx)
movl %eax, 0x30(%rdx)
movl $0x38, %esi
movq %r12, %rdi
callq 0x2170
movb $0x0, 0x60(%r15)
movl $0x38, %edi
callq 0x2160
movq %rax, %r12
movsd 0xb0(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x28, %edi
callq 0x2160
movq %rax, %r13
movq 0xd8(%r15), %rbp
movq 0x28(%rbp), %rbx
movq (%r14), %rax
movq %rax, (%r13)
incq %rax
movq %rax, (%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r13)
movq $0x0, 0x18(%r13)
leaq 0x5cff(%rip), %rax      # 0x111a0
movq (%rax), %rax
testq %rax, %rax
je 0xb62b
movq %rax, 0x8(%r13)
movupd %xmm0, 0x10(%r13)
movq $0x0, 0x20(%r13)
testq %rbx, %rbx
je 0xb639
cmpq %rax, 0x18(%rbx)
jne 0xb639
movq %rbx, 0x10(%r13)
movq 0x30(%rbx), %rax
movq %rax, 0x20(%r13)
movl $0x18, %edi
callq 0x2160
movq %r13, 0x10(%rax)
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb4fc
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
jmp 0xb639
xorl %ebp, %ebp
xorl %r13d, %r13d
movl 0x30(%r12), %eax
leaq 0x5c6b(%rip), %r14      # 0x11188
movq (%r14), %rcx
movq (%rsp), %rdx
movq %rcx, (%rdx)
incq %rcx
movq %rcx, (%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rdx)
movq $0x0, 0x18(%rdx)
testq %rbp, %rbp
je 0xb54d
movq %rdx, %rcx
addq $0x8, %rcx
movq %rbp, (%rcx)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x20(%rdx)
movq %r13, 0x28(%rdx)
movl %eax, 0x30(%rdx)
movl $0x38, %esi
movq %r12, %rdi
callq 0x2170
movb $0x0, 0x61(%r15)
movl $0x38, %edi
callq 0x2160
movq %rax, %r12
movsd 0xb0(%r15), %xmm0
movsd %xmm0, 0x8(%rsp)
movl $0x28, %edi
callq 0x2160
movq %rax, %r13
movq 0xe0(%r15), %rbp
movq 0x28(%rbp), %rbx
movq (%r14), %rax
movq %rax, (%r13)
incq %rax
movq %rax, (%r14)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%r13)
movq $0x0, 0x18(%r13)
leaq 0x5bd5(%rip), %rax      # 0x111a0
movq (%rax), %rax
testq %rax, %rax
je 0xb65e
movq %rax, 0x8(%r13)
movupd %xmm0, 0x10(%r13)
movq $0x0, 0x20(%r13)
testq %rbx, %rbx
je 0xb66c
cmpq %rax, 0x18(%rbx)
jne 0xb66c
movq %rbx, 0x10(%r13)
movq 0x30(%rbx), %rax
movq %rax, 0x20(%r13)
movl $0x18, %edi
callq 0x2160
movq %r13, 0x10(%rax)
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb61e
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
jmp 0xb66c
movupd %xmm0, 0x10(%r13)
movq $0x0, 0x20(%r13)
movsd 0x8(%rsp), %xmm0
mulsd 0xd71(%rip), %xmm0      # 0xc3b8
movl 0x30(%rbp), %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0xb89a
movq %r12, 0xc8(%r15)
jmp 0xb697
movupd %xmm0, 0x10(%r13)
movq $0x0, 0x20(%r13)
movsd 0x8(%rsp), %xmm0
addsd 0xd46(%rip), %xmm0      # 0xc3c0
mulsd 0xd36(%rip), %xmm0      # 0xc3b8
movl 0x30(%rbp), %edx
movq %r12, %rdi
movq %r13, %rsi
callq 0xb89a
movq %r12, 0xd0(%r15)
movq 0x28(%r12), %r12
movl $0x38, %edi
callq 0x2160
leaq 0x5afb(%rip), %rcx      # 0x111a8
movq (%rcx), %rdx
movq %rdx, (%rax)
incq %rdx
movq %rdx, (%rcx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rax)
leaq -0x4365(%rip), %rcx     # 0x7364
movq %rcx, 0x18(%rax)
xorl %ecx, %ecx
movq %rcx, 0x20(%rax)
movq (%rsp), %rdx
movq %rdx, 0x28(%rax)
movq %rcx, 0x30(%rax)
movq (%r12), %rcx
movq %r12, %rdi
movq %r15, %rsi
movq %rax, %rdx
callq *0x8(%rcx)
movq 0x10(%rsp), %rbp
jmp 0xb766
movupd %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
movsd (%rsp), %xmm0
mulsd 0xca5(%rip), %xmm0      # 0xc3b8
movl 0x30(%r13), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb89a
movq %rbx, 0xc8(%r15)
jmp 0xb766
movupd %xmm0, 0x10(%r12)
movq $0x0, 0x20(%r12)
movsd (%rsp), %xmm0
addsd 0xc78(%rip), %xmm0      # 0xc3c0
mulsd 0xc68(%rip), %xmm0      # 0xc3b8
movl 0x30(%r13), %edx
movq %rbx, %rdi
movq %r12, %rsi
callq 0xb89a
movq %rbx, 0xd0(%r15)
movl $0x28, %esi
movq %rbp, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2170
xorl %eax, %eax
movq %rax, 0x18(%r13)
movq 0x30(%rdi), %rax
movq %rax, 0x20(%r13)
testq %rbx, %rbx
je 0xb7c2
movl $0x18, %edi
callq 0x2160
movq %r13, 0x10(%rax)
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb7b2
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
movq 0x28(%r12), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x28(%r12)
movq 0xc8(%r15), %r12
movq (%r14), %rbp
jmp 0xb3e7
xorl %eax, %eax
movq %rax, 0x18(%r13)
movq 0x30(%rdi), %rax
movq %rax, 0x20(%r13)
testq %rbx, %rbx
je 0xb821
movl $0x18, %edi
callq 0x2160
movq %r13, 0x10(%rax)
movq 0x40(%rbx), %rcx
movq 0x8(%rcx), %rdx
testq %rdx, %rdx
je 0xb811
movq %rax, (%rdx)
movq %rdx, 0x8(%rax)
movq %rcx, (%rax)
movq %rax, 0x8(%rcx)
movq 0x28(%r12), %rdi
movq (%rdi), %rax
callq *0x18(%rax)
movq $0x0, 0x28(%r12)
movq 0xd0(%r15), %r12
movq (%r14), %rbp
jmp 0xb511
jmp 0xb841
movq %rbx, (%rsp)
movq %rax, %r14
movl $0x28, %esi
movq %r12, %rdi
callq 0x2170
jmp 0xb883
jmp 0xb859
movq %rax, %r14
movl $0x28, %esi
movq %r13, %rdi
callq 0x2170
jmp 0xb87f
jmp 0xb875
jmp 0xb875
jmp 0xb871
movq %rbx, (%rsp)
movq %rax, %r14
jmp 0xb883
jmp 0xb87c
movq %rax, %r14
movq %r12, (%rsp)
movl $0x38, %esi
movq (%rsp), %rdi
callq 0x2170
movq %r14, %rdi
callq 0x2280
nop