// File: /workspace/github_cpp_makefile_star2_O1/kiudee[P]VAHD-Projekt/./Subjects1-6.h
// Function: Relay::~Relay()
Relay::~Relay()
{
    _idLinks *idl;

    if (DEBUG) {
        std::cout << "-- Relay " << ID << " deleted.\n";
    }
    if (_oLink != NULL) {
        _oLink->_iLinks->remove(this);    // cut outgoing link
    }
    delete _oQueue;                  // delete remaining messages
    if (_iLinks != NULL) {
        _iLinks->halt();               // cut all incoming links
        delete _iLinks;
    }
    if (_home != NULL && _home->_Relays != NULL) {
        _home->_Relays->remove(this);
        _home->_activeRelays->remove(this);
    }
    while (_identities != NULL) {
        idl = _identities;
        if (_identities->id != NULL) {
            _identities->id->_source = NULL;
        }
        _identities = _identities->next;
        delete idl;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0xc0a3(%rip), %rax      # 0x11c20
movq %rax, (%rdi)
movq 0x28(%rdi), %rax
testq %rax, %rax
je 0x5c02
movq 0x20(%rax), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x5c02
cmpq %rbx, (%r15)
je 0x5bdf
xorl %eax, %eax
movq %r15, (%r14)
testb %al, %al
jne 0x5bfb
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5bfe
leaq 0x8(%r15), %rax
cmpq %rbx, (%rdi)
je 0x5bba
movq %rdi, %r15
jmp 0x5bcb
movq 0x8(%rdi), %rcx
movq %rcx, (%rax)
movl $0x10, %esi
callq 0x3170
leaq 0x8(%r15), %rax
movq 0x8(%r15), %rdi
testq %rdi, %rdi
jne 0x5bb0
jmp 0x5bfe
cmpq %rbx, (%r15)
jne 0x5b9c
movq %r15, %rdi
movq 0x8(%r15), %r15
movl $0x10, %esi
callq 0x3170
testq %r15, %r15
sete %al
jne 0x5bda
movq %r15, (%r14)
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
movq 0x38(%rbx), %r14
testq %r14, %r14
je 0x5c3b
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5c26
movq 0x30(%rdi), %rax
movq %rax, (%r14)
movl $0x38, %esi
callq 0x3170
jmp 0x5c0b
movq $0x0, 0x8(%r14)
movl $0x10, %esi
movq %r14, %rdi
callq 0x3170
movq 0x20(%rbx), %r14
testq %r14, %r14
je 0x5c8b
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5c7e
movq %rdi, %rax
movq (%rax), %rcx
movq $0x0, 0x28(%rcx)
movq 0x8(%rax), %rax
testq %rax, %rax
jne 0x5c4f
jmp 0x5c79
movq 0x8(%rdi), %rax
movq %rax, (%r14)
movl $0x10, %esi
callq 0x3170
movq (%r14), %rdi
testq %rdi, %rdi
jne 0x5c65
movl $0x10, %esi
movq %r14, %rdi
callq 0x3170
movq 0x18(%rbx), %rax
testq %rax, %rax
je 0x5dc0
movq 0x30(%rax), %r14
testq %r14, %r14
je 0x5dc0
movq (%r14), %r15
testq %r15, %r15
je 0x5d1a
cmpq %rbx, (%r15)
je 0x5cf7
xorl %eax, %eax
movq %r15, (%r14)
testb %al, %al
jne 0x5d13
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5d16
leaq 0x8(%r15), %rax
cmpq %rbx, (%rdi)
je 0x5cd2
movq %rdi, %r15
jmp 0x5ce3
movq 0x8(%rdi), %rcx
movq %rcx, (%rax)
movl $0x10, %esi
callq 0x3170
leaq 0x8(%r15), %rax
movq 0x8(%r15), %rdi
testq %rdi, %rdi
jne 0x5cc8
jmp 0x5d16
cmpq %rbx, (%r15)
jne 0x5cb4
movq %r15, %rdi
movq 0x8(%r15), %r15
movl $0x10, %esi
callq 0x3170
testq %r15, %r15
sete %al
jne 0x5cf2
movq %r15, (%r14)
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
movq 0x18(%rbx), %rax
movq 0x38(%rax), %r14
movq (%r14), %r15
testq %r15, %r15
je 0x5dc0
cmpq %rbx, (%r15)
je 0x5d78
xorl %eax, %eax
movq %r15, (%r14)
testb %al, %al
jne 0x5d94
movq 0x8(%r15), %rdi
testq %rdi, %rdi
je 0x5d97
leaq 0x8(%r15), %rax
cmpq %rbx, (%rdi)
je 0x5d53
movq %rdi, %r15
jmp 0x5d64
movq 0x8(%rdi), %rcx
movq %rcx, (%rax)
movl $0x10, %esi
callq 0x3170
leaq 0x8(%r15), %rax
movq 0x8(%r15), %rdi
testq %rdi, %rdi
jne 0x5d49
jmp 0x5d97
cmpq %rbx, (%r15)
jne 0x5d35
movq %r15, %rdi
movq 0x8(%r15), %r15
movl $0x10, %esi
callq 0x3170
testq %r15, %r15
sete %al
jne 0x5d73
movq %r15, (%r14)
xorl %r15d, %r15d
movq %r15, 0x8(%r14)
jmp 0x5dc0
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x5dae
movq $0x0, 0x10(%rax)
movq 0x8(%rdi), %rax
movq %rax, 0x40(%rbx)
movl $0x18, %esi
callq 0x3170
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
jne 0x5d9d
popq %rbx
popq %r14
popq %r15
retq
nop