// File: /workspace/github_cpp_makefile_star2_O1/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 %r15d, %r15d
leaq 0x233b4(%rip), %r12     # 0x6aa30
leaq 0xc0(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq (%r15,%r12), %rsi
movq 0x8(%r15,%r12), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x47a78
movb 0x20(%r15,%r12), %al
movb %al, 0x48(%rsp)
cmpb $0x1, %al
jne 0x47775
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x47a78
movb 0x48(%rsp), %al
movb %al, 0xe0(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0xe9dc(%rip), %rsi      # 0x560da
leaq 0xe9da(%rip), %rdx      # 0x560df
callq 0x43424
movq %rbx, %rdi
movq %r13, %r14
movq %r13, %rsi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x39fd6
movl %eax, %r13d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x4773f
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x47764
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x27480
testl %r13d, %r13d
movq %r14, %r13
jne 0x47820
jmp 0x478f8
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x47a78
movb 0x48(%rsp), %al
movb %al, 0xb8(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0xe91c(%rip), %rsi      # 0x560da
leaq 0xe91a(%rip), %rdx      # 0x560df
callq 0x43424
movq %rbx, %rdi
leaq 0x98(%rsp), %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x39fd6
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x477fb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x47820
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x27480
cmpb $0x0, 0x28(%rbx)
jne 0x47934
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x47a78
movb 0x48(%rsp), %al
movb %al, 0x90(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
leaq 0xd916(%rip), %rdx      # 0x55188
movq %rdx, %rsi
callq 0x43424
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x70(%rsp), %rdx
movq %r14, %rcx
callq 0x3a162
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x478a9
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x478cb
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x8(%rsp), %rdi
callq 0x271c0
movq 0x8(%rsp), %rcx
testl %eax, %eax
js 0x4794e
leaq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0x478f8
movq 0x18(%rsp), %rsi
incq %rsi
movq %rcx, %rdi
callq 0x27480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x47914
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x28, %r15
cmpq $0x78, %r15
jne 0x47689
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x28(%rsp), %rsi
xorl %edx, %edx
cmpq $0x0, (%rbx)
setne %dl
leaq 0xf168(%rip), %rdi      # 0x56ab1
callq 0x2c889
leaq 0xf19e(%rip), %rdi      # 0x56af3
movq %rcx, %rsi
xorl %eax, %eax
callq 0x2ce45
movq %rax, %rbx
jmp 0x47988
movq %rax, %rbx
jmp 0x479cd
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x47988
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x47a54
movq 0xa8(%rsp), %rsi
jmp 0x47a47
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x479cd
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x47a54
movq 0xd0(%rsp), %rsi
jmp 0x47a47
movq %rax, %rbx
jmp 0x47a2d
jmp 0x47a51
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x47a54
movq 0x18(%rsp), %rsi
jmp 0x47a47
jmp 0x47a51
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x47a2d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x47a54
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x47a54
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x47a70
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830