// File: /workspace/github_cpp_makefile_star2_O3/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 0x23a0c(%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 0x47420
movb 0x20(%r15,%r12), %al
movb %al, 0x48(%rsp)
cmpb $0x1, %al
jne 0x4711d
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x47420
movb 0x48(%rsp), %al
movb %al, 0xe0(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0xf034(%rip), %rsi      # 0x560da
leaq 0xf032(%rip), %rdx      # 0x560df
callq 0x42cf8
movq %rbx, %rdi
movq %r13, %r14
movq %r13, %rsi
movq %rbp, %rdx
movl $0x1, %ecx
callq 0x39946
movl %eax, %r13d
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x470e7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x4710c
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x27480
testl %r13d, %r13d
movq %r14, %r13
jne 0x471c8
jmp 0x472a0
leaq 0xa8(%rsp), %rax
movq %rax, 0x98(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x98(%rsp), %rdi
callq 0x47420
movb 0x48(%rsp), %al
movb %al, 0xb8(%rsp)
leaq 0x18(%rsp), %rax
movq %rax, 0x8(%rsp)
movq %rbp, %rdi
leaq 0xef74(%rip), %rsi      # 0x560da
leaq 0xef72(%rip), %rdx      # 0x560df
callq 0x42cf8
movq %rbx, %rdi
leaq 0x98(%rsp), %rsi
movq %rbp, %rdx
xorl %ecx, %ecx
callq 0x39946
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x471a3
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x471c8
movq 0xa8(%rsp), %rsi
incq %rsi
callq 0x27480
cmpb $0x0, 0x28(%rbx)
jne 0x472dc
leaq 0x80(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0x47420
movb 0x48(%rsp), %al
movb %al, 0x90(%rsp)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %r14
movq %r14, %rdi
leaq 0xdf6e(%rip), %rdx      # 0x55188
movq %rdx, %rsi
callq 0x42cf8
movq %rbp, %rdi
movq %rbx, %rsi
leaq 0x70(%rsp), %rdx
movq %r14, %rcx
callq 0x39ad2
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x47251
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x47273
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x8(%rsp), %rdi
callq 0x271c0
movq 0x8(%rsp), %rcx
testl %eax, %eax
js 0x472f6
leaq 0x18(%rsp), %rax
cmpq %rax, %rcx
je 0x472a0
movq 0x18(%rsp), %rsi
incq %rsi
movq %rcx, %rdi
callq 0x27480
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x472bc
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x28, %r15
cmpq $0x78, %r15
jne 0x47031
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 0xf7c0(%rip), %rdi      # 0x56ab1
callq 0x2c78f
leaq 0xf7f6(%rip), %rdi      # 0x56af3
movq %rcx, %rsi
xorl %eax, %eax
callq 0x2cd4f
movq %rax, %rbx
jmp 0x47330
movq %rax, %rbx
jmp 0x47375
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x47330
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x473fc
movq 0xa8(%rsp), %rsi
jmp 0x473ef
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x47375
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x473fc
movq 0xd0(%rsp), %rsi
jmp 0x473ef
movq %rax, %rbx
jmp 0x473d5
jmp 0x473f9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0x473fc
movq 0x18(%rsp), %rsi
jmp 0x473ef
jmp 0x473f9
movq %rax, %rbx
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x473d5
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x473fc
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x473fc
movq %rax, %rbx
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x47418
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830