// File: /workspace/github_cpp_makefile_star2_O2/establishment[P]sandman/src/cgroups.hpp
// Function: CGroups::cleanup()
void cleanup() {
        /// search for each subsystem (memory, cpuset, acuacct) and delete them
        for (auto subsystem : cgAllSubSystems) {
            if (subsystem.optional) {
                if (!readStat(subsystem, "tasks", true)) {
                    continue;
                }
            } else {
                readStat(subsystem, "tasks");
            }

            if (buffer[0]) {
                Base::Die("Some tasks left in subsystem %s of cgroup %s, failed to remove it",
                    subsystem.name.c_str(), cgName.c_str());
            }

            std::string path = getPath(subsystem, "");

            if (rmdir(path.c_str()) < 0) {
                Base::Die("Cannot remove control group %s: %m", path.c_str());
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0xc0(%rsp), %r15
leaq 0x98(%rsp), %r13
cmpq $0x78, %r12
je 0x4e876
leaq 0x262ee(%rip), %rax     # 0x74a30
leaq (%rax,%r12), %rsi
leaq 0x28(%rsp), %r14
movq %r14, %rdi
callq 0x414c6
cmpb $0x1, 0x48(%rsp)
jne 0x4e7aa
movq %r15, %rdi
movq %r14, %rsi
callq 0x414c6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0xd933(%rip), %rsi      # 0x5c0a7
leaq 0x50(%rsp), %rdx
callq 0x40b24
movq %rbx, %rdi
movq %r15, %rsi
movq %r14, %rdx
pushq $0x1
popq %rcx
callq 0x442f8
movl %eax, %ebp
movq %r14, %rdi
callq 0x37958
movq %r15, %rdi
callq 0x37958
testl %ebp, %ebp
jne 0x4e7f5
jmp 0x4e863
leaq 0x70(%rsp), %rdi
movq %r14, %rsi
callq 0x414c6
leaq 0x8(%rsp), %r14
movq %r14, %rdi
leaq 0xd8e1(%rip), %rsi      # 0x5c0a7
leaq 0x50(%rsp), %rdx
callq 0x40b24
movq %rbx, %rdi
leaq 0x70(%rsp), %rbp
movq %rbp, %rsi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x442f8
movq %r14, %rdi
callq 0x37958
movq %rbp, %rdi
callq 0x37958
cmpb $0x0, 0x28(%rbx)
leaq 0x28(%rsp), %rsi
jne 0x4e89b
movq %r13, %rdi
callq 0x414c6
leaq 0x50(%rsp), %rbp
movq %rbp, %rdi
leaq 0xc92d(%rip), %rsi      # 0x5b148
leaq 0x7(%rsp), %rdx
callq 0x40b24
leaq 0x8(%rsp), %rdi
movq %rbx, %rsi
movq %r13, %r14
movq %r13, %rdx
movq %rbp, %rcx
callq 0x4442c
movq %rbp, %rdi
callq 0x37958
movq %r14, %rdi
callq 0x37958
movq 0x8(%rsp), %rdi
callq 0x37190
testl %eax, %eax
js 0x4e888
leaq 0x8(%rsp), %rdi
callq 0x37958
leaq 0x28(%rsp), %rdi
callq 0x37958
addq $0x28, %r12
jmp 0x4e731
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x8(%rsp), %rsi
leaq 0xe22c(%rip), %rdi      # 0x5cac0
xorl %eax, %eax
callq 0x3b2a4
movq 0x28(%rsp), %rsi
xorl %edx, %edx
cmpq $0x0, (%rbx)
setne %dl
leaq 0xe1ce(%rip), %rdi      # 0x5ca7e
callq 0x3af9f
movq %rax, %rbx
jmp 0x4e8cc
movq %rax, %rbx
jmp 0x4e8e0
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x37958
leaq 0x70(%rsp), %rdi
jmp 0x4e912
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x37958
leaq 0xc0(%rsp), %rdi
jmp 0x4e912
movq %rax, %rbx
jmp 0x4e90a
jmp 0x4e919
jmp 0x4e919
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x4e912
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x37958
leaq 0x98(%rsp), %rdi
callq 0x37958
jmp 0x4e91c
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x37958
movq %rbx, %rdi
callq 0x377f0