// File: kiudee[P]VAHD-Projekt/Node.cpp
// Function: Node::TriggerDataTransfer(IdObj*)
Action Node::TriggerDataTransfer(IdObj *ido)
{
    //std::cout << num << "<-TriggerDataTransfer(" << ido->num << ")\n";

    if (isReal) {
        Relay *temprelay = new Relay(ido->id);
        for (HashMap::iterator it = data.begin(); it != data.end(); ++it) {
            if (g(it->first) >= ido->num) {//WAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHH!!!!!!!!!!!!!
                DateObj *dob = new DateObj(it->first, it->second);
                temprelay->call(Node::DataInsert, dob);//routing unnecessary (ido is the target)
            }
        }
        //delete temprelay;
        delete ido;
    } else {
        if (left == NULL) {
            SearchJob *newsj = new SearchJob(MAX, DATATRANSFER,
                                             Node::calcRoutingBound(), ido);
            Search(newsj);
        } else if (leftstable) {
            left->out->call(Node::TriggerDataTransfer, ido);
        } else {
            call(Node::TriggerDataTransfer, ido);
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
testb $0x1, 0xb8(%rax)
je 0x12c78
movl $0x48, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq -0x10(%rbp), %rsi
addq $0x28, %rsi
callq 0x5890
jmp 0x12a71
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq %rax, -0x18(%rbp)
addq $0x68, %rdi
callq 0x15b40
movq %rax, -0x30(%rbp)
movq -0xa8(%rbp), %rdi
addq $0x68, %rdi
callq 0x15ba0
movq %rax, -0x38(%rbp)
leaq -0x30(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x15b70
testb $0x1, %al
jne 0x12aba
jmp 0x12c51
leaq -0x30(%rbp), %rdi
callq 0x15bd0
movl (%rax), %edi
callq 0xdd60
movq -0x10(%rbp), %rax
ucomisd 0x20(%rax), %xmm0
jb 0x12c41
movl $0x48, %edi
callq 0x31c0
movq %rax, -0xc8(%rbp)
movb $0x1, -0x61(%rbp)
leaq -0x30(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x15bd0
movq -0xc0(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0xb4(%rbp)
callq 0x15bd0
movq %rax, %rsi
addq $0x8, %rsi
leaq -0x60(%rbp), %rdi
callq 0x30c0
jmp 0x12b24
movl -0xb4(%rbp), %esi
movq -0xc8(%rbp), %rdi
leaq -0x60(%rbp), %rdx
callq 0x5dd0
jmp 0x12b3c
movb $0x0, -0x61(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3100
movq -0xc8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xd8(%rbp)
movl $0x38, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xd0(%rbp)
leaq -0x114d(%rip), %rax     # 0x11a30
movq %rax, -0x78(%rbp)
movq $0x0, -0x70(%rbp)
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
leaq -0x40(%rbp), %rcx
callq 0x5ae0
jmp 0x12b9c
movq -0xd0(%rbp), %rdx
movq -0xa8(%rbp), %rsi
movq -0xd8(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x12c41
movq -0xb0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x48, %esi
callq 0x31d0
jmp 0x12e58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
jmp 0x12c01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x3100
testb $0x1, -0x61(%rbp)
jne 0x12c09
jmp 0x12c1a
movq -0xc8(%rbp), %rdi
movl $0x48, %esi
callq 0x31d0
jmp 0x12e58
movq -0xd0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0x12e58
jmp 0x12c43
leaq -0x30(%rbp), %rdi
callq 0x15c00
jmp 0x12a90
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, %rax
je 0x12c73
movq -0xe0(%rbp), %rdi
movl $0x38, %esi
callq 0x31d0
jmp 0x12e4f
movq -0xa8(%rbp), %rax
cmpq $0x0, 0xc8(%rax)
jne 0x12d15
movl $0x60, %edi
callq 0x31c0
movq -0xa8(%rbp), %rdi
movq %rax, -0xe8(%rbp)
movq %rax, -0xf0(%rbp)
callq 0x102b0
movq -0xe8(%rbp), %rdi
movaps %xmm0, %xmm1
movq -0x10(%rbp), %rdx
movsd 0x4741(%rip), %xmm0     # 0x17408
movl $0x4, %esi
callq 0x15960
jmp 0x12cd3
movq -0xa8(%rbp), %rdi
movq -0xf0(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
callq 0x11880
jmp 0x12e4d
movq -0xf0(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x60, %esi
callq 0x31d0
jmp 0x12e58
movq -0xa8(%rbp), %rax
testb $0x1, 0x60(%rax)
je 0x12dca
movq -0xa8(%rbp), %rax
movq 0xc8(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, -0x100(%rbp)
movl $0x38, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0xf8(%rbp)
leaq -0x33d(%rip), %rax      # 0x12a20
movq %rax, -0x90(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x5ae0
jmp 0x12d88
movq -0xf8(%rbp), %rdx
movq -0xa8(%rbp), %rsi
movq -0x100(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x12e4b
movq -0xf8(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0x12e58
movl $0x38, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x108(%rbp)
leaq -0x3c8(%rip), %rax      # 0x12a20
movq %rax, -0xa0(%rbp)
movq $0x0, -0x98(%rbp)
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x5ae0
jmp 0x12e13
movq -0x108(%rbp), %rdx
movq -0xa8(%rbp), %rsi
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x48(%rax)
jmp 0x12e4b
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0x12e58
jmp 0x12e4d
jmp 0x12e4f
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3330
nopw %cs:(%rax,%rax)