// File: kiudee[P]VAHD-Projekt/Node.cpp
// Function: Node::checkValid()
void Node::checkValid()
{
    IdObj *tempido;
    if (left != NULL && left->num > num) {
        tempido = new IdObj(left->num, extractIdentity(left->out), left->debugID);
        delete left;
        left = NULL;
        leftstable = false;

        call(Node::BuildList, tempido);
    }
    if (right != NULL && right->num < num) {
        tempido = new IdObj(right->num, extractIdentity(right->out), right->debugID);
        delete right;
        right = NULL;
        rightstable = false;

        call(Node::BuildList, tempido);
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, 0xc8(%rax)
je 0xf8a3
movq -0x48(%rbp), %rax
movq 0xc8(%rax), %rcx
movsd 0x20(%rcx), %xmm0
ucomisd 0xb0(%rax), %xmm0
jbe 0xf8a3
movl $0x38, %edi
callq 0x31c0
movq -0x48(%rbp), %rsi
movq %rax, -0x60(%rbp)
movq 0xc8(%rsi), %rdx
movsd 0x20(%rdx), %xmm0
movsd %xmm0, -0x58(%rbp)
addq $0x28, %rdx
movq %rsi, %rdi
callq 0x155f0
movq %rax, -0x50(%rbp)
jmp 0xf7b8
movq -0x50(%rbp), %rsi
movsd -0x58(%rbp), %xmm0
movq -0x60(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0xc8(%rax), %rax
movl 0x30(%rax), %edx
callq 0x15520
jmp 0xf7da
movq -0x48(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq 0xc8(%rax), %rax
movq %rax, -0x68(%rbp)
cmpq $0x0, %rax
je 0xf805
movq -0x68(%rbp), %rdi
movl $0x38, %esi
callq 0x31d0
movq -0x48(%rbp), %rax
movq $0x0, 0xc8(%rax)
movb $0x0, 0x60(%rax)
movl $0x38, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x70(%rbp)
leaq 0x1ed(%rip), %rax       # 0xfa20
movq %rax, -0x30(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x5ae0
jmp 0xf852
movq -0x70(%rbp), %rdx
movq -0x48(%rbp), %rsi
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x48(%rax)
jmp 0xf8a3
movq -0x60(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0xfa15
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0xfa15
movq -0x48(%rbp), %rax
cmpq $0x0, 0xd0(%rax)
je 0xfa0c
movq -0x48(%rbp), %rax
movq 0xd0(%rax), %rcx
movsd 0x20(%rcx), %xmm1
movsd 0xb0(%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xfa0c
movl $0x38, %edi
callq 0x31c0
movq -0x48(%rbp), %rsi
movq %rax, -0x88(%rbp)
movq 0xd0(%rsi), %rdx
movsd 0x20(%rdx), %xmm0
movsd %xmm0, -0x80(%rbp)
addq $0x28, %rdx
movq %rsi, %rdi
callq 0x155f0
movq %rax, -0x78(%rbp)
jmp 0xf90f
movq -0x78(%rbp), %rsi
movsd -0x80(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0xd0(%rax), %rax
movl 0x30(%rax), %edx
callq 0x15520
jmp 0xf934
movq -0x48(%rbp), %rax
movq -0x88(%rbp), %rcx
movq %rcx, -0x10(%rbp)
movq 0xd0(%rax), %rax
movq %rax, -0x90(%rbp)
cmpq $0x0, %rax
je 0xf968
movq -0x90(%rbp), %rdi
movl $0x38, %esi
callq 0x31d0
movq -0x48(%rbp), %rax
movq $0x0, 0xd0(%rax)
movb $0x0, 0x61(%rax)
movl $0x38, %edi
callq 0x31c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x98(%rbp)
leaq 0x87(%rip), %rax        # 0xfa20
movq %rax, -0x40(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
leaq -0x10(%rbp), %rcx
callq 0x5ae0
jmp 0xf9b8
movq -0x98(%rbp), %rdx
movq -0x48(%rbp), %rsi
movq (%rsi), %rax
movq %rsi, %rdi
callq *0x48(%rax)
jmp 0xfa0c
movq -0x88(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0xfa15
movq -0x98(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
movl $0x38, %esi
callq 0x31d0
jmp 0xfa15
addq $0xa0, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3330
nop