// File: /workspace/github_c_makefile_star2_O3/containers[P]conmon/src/cgroup.c
// Function: setup_oom_handling
void setup_oom_handling(int pid)
{
	struct statfs sfs;

	if (statfs("/sys/fs/cgroup", &sfs) == 0 && sfs.f_type == CGROUP2_SUPER_MAGIC) {
		is_cgroup_v2 = TRUE;
		setup_oom_handling_cgroup_v2(pid);
		return;
	}
	setup_oom_handling_cgroup_v1(pid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edi, %ebx
leaq 0x4baf(%rip), %rdi      # 0xebbf
leaq 0x8(%rsp), %rsi
callq 0x4440
testl %eax, %eax
jne 0xa0c3
cmpq $0x63677270, 0x8(%rsp)  # imm = 0x63677270
jne 0xa0c3
leaq 0x1feac(%rip), %rax     # 0x29ee4
movl $0x1, (%rax)
leaq 0x69a2(%rip), %rdx      # 0x109e7
movl %ebx, %edi
movl $0x1, %esi
callq 0xa432
leaq 0x1fe90(%rip), %rcx     # 0x29ee8
movq %rax, (%rcx)
testq %rax, %rax
je 0xa1ce
leaq 0x4b63(%rip), %rsi      # 0xebce
movq %rax, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4680
movq %rax, %rbx
callq 0x4850
testl %eax, %eax
js 0xa1f7
movl %eax, %ebp
movl %eax, %edi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x46f0
testl %eax, %eax
js 0xa20a
leaq 0xbcad(%rip), %rax      # 0x15d54
movl %ebp, (%rax)
leaq 0x66b(%rip), %rdx       # 0xa71b
movl %ebp, %edi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x4430
jmp 0xa24f
leaq 0x52cd(%rip), %rdx      # 0xf397
movl %ebx, %edi
xorl %esi, %esi
callq 0xa432
movq %rax, %rbx
testq %rax, %rax
je 0xa1b4
leaq 0x4e2e(%rip), %rsi      # 0xef14
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4680
movq %rax, %r14
movq %rax, %rdi
movl $0x80001, %esi          # imm = 0x80001
xorl %eax, %eax
callq 0x48c0
cmpl $-0x1, %eax
je 0xa1e1
movl %eax, %ebp
leaq 0x4e5c(%rip), %rsi      # 0xef72
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4680
movq %rax, %r15
movq %rax, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x48c0
movl %eax, 0xbc36(%rip)      # 0x15d70
cmpl $-0x1, %eax
je 0xa27b
xorl %edi, %edi
movl $0x80000, %esi          # imm = 0x80000
callq 0x42f0
movl %eax, 0xbc17(%rip)      # 0x15d6c
cmpl $-0x1, %eax
je 0xa283
movl 0xbc0c(%rip), %edx      # 0x15d70
leaq 0x4e82(%rip), %rdi      # 0xefed
movl %eax, %esi
xorl %eax, %eax
callq 0x4380
movq %rax, %r12
movq %rax, %rdi
callq 0x4360
movl %ebp, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x9bec
testq %rax, %rax
js 0xa220
movl 0xbbd1(%rip), %edi      # 0x15d6c
leaq 0x5ed(%rip), %rdx       # 0xa78f
movl $0x1, %esi
movq %r14, %rcx
callq 0x4430
jmp 0xa234
leaq 0xb2d9(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa24f
callq 0x631a
jmp 0xa24f
leaq 0xb2bf(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa257
callq 0x63fb
jmp 0xa257
leaq 0xb2ac(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
jne 0xa267
movq %r14, %rdi
callq 0x48e0
jmp 0xa24f
leaq 0xb296(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa24f
callq 0x63b5
jmp 0xa24f
leaq 0xb283(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa248
movq %rbx, %rdi
callq 0x636a
jmp 0xa248
leaq 0xb26d(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
jne 0xa274
movq %r14, %rdi
callq 0x48e0
movq %r12, %rdi
callq 0x48e8
movq %r15, %rdi
callq 0x48e8
testl %ebp, %ebp
js 0xa24f
movl %ebp, %edi
callq 0x4100
movq %rbx, %rdi
callq 0x48e8
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
callq 0x62cf
jmp 0xa1ed
callq 0x61e2
jmp 0xa22c
movq %r15, %rdi
callq 0x627e
callq 0x6228