// File: /workspace/github_cpp_makefile_star2_O1/establishment[P]sandman/src/cgroups.hpp
// Function: CGroups::enter()
void enter() {
        Base::Msg("Entering control group %s\n", cgName.c_str());

        for (auto subsystem : cgAllSubSystems) {
            /// add current pid to be contored by the cgroup for all target subsystems
            writeStat(subsystem, "tasks", Base::StrCat(getpid()), subsystem.optional);
        }

        if (cgMemoryLimitKB) {
            /// limit RAM used by cgroup
            writeStat(cgMemory, "memory.limit_in_bytes", Base::StrCat(cgMemoryLimitKB << 10));

            /// limit swap space used by cgroup if it can
            writeStat(cgMemory, "memory.memsw.limit_in_bytes", Base::StrCat(cgMemoryLimitKB << 10), true);
        }

        /// time is queried from cgroup for the process. Reset the stats for that cgroup
        if (useCGTiming) {
            /// reset the value of cgroup consumed time
            writeStat(cgCpuacct, "cpuacct.usage", "0");
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rdi, %r14
movq (%rdi), %rsi
leaq 0x1aebf(%rip), %rdi     # 0x560bf
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x2cfe4
leaq 0x2f81f(%rip), %r13     # 0x6aa30
leaq 0x48(%rsp), %r15
movq %rsp, %rbp
leaq 0x70(%rsp), %rbx
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq (%r12,%r13), %rsi
movq 0x8(%r12,%r13), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x47a78
movb 0x20(%r12,%r13), %al
movb %al, 0x40(%rsp)
leaq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x47a78
movb 0x40(%rsp), %al
movb %al, 0x68(%rsp)
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq %rbp, %rdi
leaq 0x1ae59(%rip), %rsi     # 0x560da
leaq 0x1ae57(%rip), %rdx     # 0x560df
callq 0x43424
callq 0x276f0
movq %rbx, %rdi
movl %eax, %esi
callq 0x3bd89
movzbl 0x40(%rsp), %r8d
movq %r14, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rbx, %rcx
callq 0x3bbe6
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3b2d5
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b2f0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3b30c
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b328
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x28, %r12
cmpq $0x78, %r12
jne 0x3b21e
movq %r14, %r15
cmpl $0x0, 0x20(%r14)
je 0x3b4ef
leaq 0xf0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x2f661(%rip), %rsi     # 0x6a9b8
movq 0x2f662(%rip), %rdx     # 0x6a9c0
addq %rsi, %rdx
leaq 0xe0(%rsp), %rbx
movq %rbx, %rdi
callq 0x47a78
movb 0x2f661(%rip), %al      # 0x6a9d8
movb %al, 0x20(%rbx)
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1ad52(%rip), %rsi     # 0x560e0
leaq 0x1ad60(%rip), %rdx     # 0x560f5
callq 0x43424
movl 0x20(%r15), %esi
shll $0xa, %esi
movq %rsp, %rdi
callq 0x3bd89
leaq 0xe0(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x3bbe6
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b3df
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b3fb
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b418
movq 0xf0(%rsp), %rsi
incq %rsi
callq 0x27480
leaq 0xc8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x2f58d(%rip), %rsi     # 0x6a9b8
movq 0x2f58e(%rip), %rdx     # 0x6a9c0
addq %rsi, %rdx
leaq 0xb8(%rsp), %rbx
movq %rbx, %rdi
callq 0x47a78
movb 0x2f58d(%rip), %al      # 0x6a9d8
movb %al, 0x20(%rbx)
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1ac94(%rip), %rsi     # 0x560f6
leaq 0x1aca8(%rip), %rdx     # 0x56111
callq 0x43424
movl 0x20(%r15), %esi
shll $0xa, %esi
movq %rsp, %rdi
callq 0x3bd89
leaq 0xb8(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
movq %r15, %rdi
movl $0x1, %r8d
callq 0x3bbe6
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b4b6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b4d2
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b4ef
movq 0xc8(%rsp), %rsi
incq %rsi
callq 0x27480
cmpl $0x0, 0x24(%r15)
je 0x3b5dd
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x2f4d3(%rip), %rsi     # 0x6a9e0
movq 0x2f4d4(%rip), %rdx     # 0x6a9e8
addq %rsi, %rdx
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0x47a78
movb 0x2f4d3(%rip), %al      # 0x6aa00
movb %al, 0x20(%rbx)
leaq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1aa5b(%rip), %rsi     # 0x55f9f
leaq 0x1aa61(%rip), %rdx     # 0x55fac
callq 0x43424
movq %rsp, %rdi
leaq 0x10(%rsp), %rax
movq %rax, (%rdi)
leaq 0x1b43f(%rip), %rsi     # 0x569a1
leaq 0x1b439(%rip), %rdx     # 0x569a2
callq 0x43424
leaq 0x90(%rsp), %rsi
leaq 0x20(%rsp), %rdx
movq %rsp, %rcx
movq %r15, %rdi
xorl %r8d, %r8d
callq 0x3bbe6
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b5a4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b5c0
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b5dd
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x27480
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b632
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b632
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b653
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b653
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b674
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b674
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b695
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b695
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b799
movq 0xa0(%rsp), %rsi
jmp 0x3b791
movq %rax, %rbx
movq 0xb8(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b799
movq 0xc8(%rsp), %rsi
jmp 0x3b791
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b6d6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b6d6
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b6f7
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
jmp 0x3b6f7
movq %rax, %rbx
movq 0xe0(%rsp), %rdi
cmpq %r14, %rdi
je 0x3b799
movq 0xf0(%rsp), %rsi
jmp 0x3b791
movq %rax, %rbx
jmp 0x3b77d
movq %rax, %rbx
jmp 0x3b761
movq %rax, %rbx
jmp 0x3b746
movq %rax, %rbx
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x3b746
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x27480
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3b761
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x48(%rsp), %rdi
leaq 0x58(%rsp), %rax
cmpq %rax, %rdi
je 0x3b77d
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x27480
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3b799
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x27480
movq %rbx, %rdi
callq 0x27830
nop