// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl 0x20(%rsi), %eax
cmpl $0x1, %eax
je 0x9011
testl %eax, %eax
jne 0x921d
movq 0xc8(%r14), %r15
testq %r15, %r15
je 0x9149
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r12
movsd 0x20(%r15), %xmm0
movsd %xmm0, (%rsp)
addq $0x28, %r15
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x933a
movq %rax, %r15
movq 0xc8(%r14), %rax
movl 0x30(%rax), %ebp
movq %r12, %rdi
callq 0x3a32
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%r12)
movq %r15, 0x28(%r12)
movl %ebp, 0x30(%r12)
movq 0xc8(%r14), %rdi
pushq $0x38
popq %r15
movq %r15, %rsi
callq 0x2180
movb $0x0, 0x60(%r14)
movq %r15, %rdi
callq 0x2170
movq %rax, %r15
movsd 0xb0(%r14), %xmm0
movsd %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x2170
movq %rax, %r13
movq 0xd8(%r14), %rax
movq 0x28(%rax), %rsi
movq %r13, %rdi
callq 0x92c2
movsd (%rsp), %xmm0
mulsd 0x13d0(%rip), %xmm0     # 0xa3c0
movq 0xd8(%r14), %rax
movl 0x30(%rax), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x95ae
movq %r15, 0xc8(%r14)
jmp 0x90f4
movq 0xd0(%r14), %r15
testq %r15, %r15
je 0x91b0
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r12
movsd 0x20(%r15), %xmm0
movsd %xmm0, (%rsp)
addq $0x28, %r15
movq %r14, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x933a
movq %rax, %r15
movq 0xd0(%r14), %rax
movl 0x30(%rax), %ebp
movq %r12, %rdi
callq 0x3a32
movsd (%rsp), %xmm0
movsd %xmm0, 0x20(%r12)
movq %r15, 0x28(%r12)
movl %ebp, 0x30(%r12)
movq 0xd0(%r14), %rdi
pushq $0x38
popq %r15
movq %r15, %rsi
callq 0x2180
movb $0x0, 0x61(%r14)
movq %r15, %rdi
callq 0x2170
movq %rax, %r15
movsd 0xb0(%r14), %xmm0
movsd %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x2170
movq %rax, %r13
movq 0xe0(%r14), %rax
movq 0x28(%rax), %rsi
movq %r13, %rdi
callq 0x92c2
movsd (%rsp), %xmm0
addsd 0x12f8(%rip), %xmm0     # 0xa3c8
mulsd 0x12e8(%rip), %xmm0     # 0xa3c0
movq 0xe0(%r14), %rax
movl 0x30(%rax), %edx
movq %r15, %rdi
movq %r13, %rsi
callq 0x95ae
movq %r15, 0xd0(%r14)
movq 0x28(%r15), %r15
pushq $0x38
popq %rdi
callq 0x2170
leaq 0x70b1(%rip), %rcx      # 0x101b8
movq (%rcx), %rdx
movq %rdx, (%rax)
incq %rdx
movq %rdx, (%rcx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x8(%rax)
leaq -0x2b31(%rip), %rcx     # 0x65f2
movq %rcx, 0x18(%rax)
andq $0x0, 0x20(%rax)
movq %r12, 0x28(%rax)
andq $0x0, 0x30(%rax)
movq (%r15), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq *0x8(%rcx)
jmp 0x921d
movb $0x0, 0x60(%r14)
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r15
movsd 0xb0(%r14), %xmm0
movsd %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x2170
movq %rax, %r12
movq 0xd8(%r14), %rax
movq 0x28(%rax), %rsi
movq %r12, %rdi
callq 0x92c2
movsd (%rsp), %xmm0
mulsd 0x122e(%rip), %xmm0     # 0xa3c0
movq 0xd8(%r14), %rax
movl 0x30(%rax), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x95ae
movq %r15, 0xc8(%r14)
jmp 0x921d
movb $0x0, 0x61(%r14)
pushq $0x38
popq %rdi
callq 0x2170
movq %rax, %r15
movsd 0xb0(%r14), %xmm0
movsd %xmm0, (%rsp)
pushq $0x28
popq %rdi
callq 0x2170
movq %rax, %r12
movq 0xe0(%r14), %rax
movq 0x28(%rax), %rsi
movq %r12, %rdi
callq 0x92c2
movsd (%rsp), %xmm0
addsd 0x11cf(%rip), %xmm0     # 0xa3c8
mulsd 0x11bf(%rip), %xmm0     # 0xa3c0
movq 0xe0(%r14), %rax
movl 0x30(%rax), %edx
movq %r15, %rdi
movq %r12, %rsi
callq 0x95ae
movq %r15, 0xd0(%r14)
pushq $0x28
popq %rsi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2180
jmp 0x9238
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r12, %rdi
jmp 0x924e
jmp 0x9245
movq %rax, %rbx
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0x2180
jmp 0x9268
jmp 0x9257
movq %rax, %rbx
movq %r12, %r15
jmp 0x9268
jmp 0x9265
jmp 0x9265
jmp 0x9265
movq %rax, %rbx
pushq $0x38
popq %rsi
movq %r15, %rdi
callq 0x2180
movq %rbx, %rdi
callq 0x2290
nop