// File: isabellab3[P]OS-Simulation/./OS.h
// Function: OperatingSystem::DeleteChildren(PCB*)
void DeleteChildren(PCB* pcb) {
            //Delete all children of the process pcb_to_delete
            for (auto itr = pcb->GetChildren().begin(); itr != pcb->GetChildren().end(); itr++) {
                PCB* child = (*itr);
                if (child->HasChildren()) {
                    DeleteChildren(child);
                }
                else {
                    RemoveFromDisks(child->GetPid());
                    RemoveFromFrames(child->GetPid());
                    RemoveFromReadyQueue(child->GetPid());

                    // Delete child from all_processes
                    all_processes.erase(child->GetPid());
                    delete child;
                    child = nullptr;
                }
            }

            pcb->ClearChildren();

            // Keep zombies around and delete later
            if (!pcb->IsZombieProcess()) {
                all_processes.erase(pcb->GetPid());
            }

            RemoveFromDisks(pcb->GetPid());
            RemoveFromFrames(pcb->GetPid());
            RemoveFromReadyQueue(pcb->GetPid());
        }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
callq 0x97e0
movq %rax, %rdi
callq 0x9800
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rdi
callq 0x97e0
movq %rax, %rdi
callq 0x9870
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x9830
testb $0x1, %al
jne 0x9438
jmp 0x9517
leaq -0x18(%rbp), %rdi
callq 0x98a0
movq (%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x98c0
testb $0x1, %al
jne 0x9457
jmp 0x9469
movq -0x58(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x93e0
jmp 0x9501
movq -0x28(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, -0x2c(%rbp)
leaq -0x2c(%rbp), %rsi
callq 0x98f0
movq -0x28(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
callq 0x9970
movq -0x28(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x9a00
movq -0x58(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x68(%rbp)
movq -0x28(%rbp), %rdi
callq 0x95d0
movq -0x68(%rbp), %rdi
movl %eax, -0x34(%rbp)
leaq -0x34(%rbp), %rsi
callq 0x95a0
movq -0x28(%rbp), %rax
movq %rax, -0x60(%rbp)
cmpq $0x0, %rax
je 0x94f9
movq -0x60(%rbp), %rdi
callq 0x9690
movq -0x60(%rbp), %rdi
movl $0x28, %esi
callq 0x21f0
movq $0x0, -0x28(%rbp)
jmp 0x9503
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x9aa0
movq %rax, -0x40(%rbp)
jmp 0x940d
movq -0x10(%rbp), %rdi
callq 0x9ae0
movq -0x10(%rbp), %rdi
callq 0x9b00
testb $0x1, %al
jne 0x9552
movq -0x58(%rbp), %rax
addq $0x50, %rax
movq %rax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
callq 0x95d0
movq -0x70(%rbp), %rdi
movl %eax, -0x44(%rbp)
leaq -0x44(%rbp), %rsi
callq 0x95a0
movq -0x10(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, -0x48(%rbp)
leaq -0x48(%rbp), %rsi
callq 0x98f0
movq -0x10(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, -0x4c(%rbp)
leaq -0x4c(%rbp), %rsi
callq 0x9970
movq -0x10(%rbp), %rdi
callq 0x95d0
movq -0x58(%rbp), %rdi
movl %eax, %esi
callq 0x9a00
addq $0x70, %rsp
popq %rbp
retq
nop