// File: /workspace/github_c_makefile_star2_O1/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 0x4a0b(%rip), %rdi      # 0xebdf
leaq 0x8(%rsp), %rsi
callq 0x4440
testl %eax, %eax
jne 0xa28c
cmpq $0x63677270, 0x8(%rsp)  # imm = 0x63677270
jne 0xa28c
leaq 0x1fce8(%rip), %rax     # 0x29ee4
movl $0x1, (%rax)
leaq 0x67fe(%rip), %rdx      # 0x10a07
movl %ebx, %edi
movl $0x1, %esi
callq 0xa624
leaq 0x1fccc(%rip), %rcx     # 0x29ee8
movq %rax, (%rcx)
testq %rax, %rax
je 0xa397
leaq 0x49bf(%rip), %rsi      # 0xebee
movq %rax, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4680
movq %rax, %rbx
callq 0x4850
movl %eax, %ebp
testl %eax, %eax
js 0xa3cb
movl %ebp, %edi
movq %rbx, %rsi
movl $0x2, %edx
callq 0x46f0
testl %eax, %eax
js 0xa3e8
leaq 0xbae9(%rip), %rax      # 0x15d54
movl %ebp, (%rax)
leaq 0x687(%rip), %rdx       # 0xa8fb
movl %ebp, %edi
movl $0x1, %esi
xorl %ecx, %ecx
callq 0x4430
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
jmp 0xa42f
leaq 0x5124(%rip), %rdx      # 0xf3b7
movl %ebx, %edi
xorl %esi, %esi
callq 0xa624
movq %rax, %rbx
testq %rax, %rax
je 0xa37d
leaq 0x4c85(%rip), %rsi      # 0xef34
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
movl %eax, %ebp
cmpl $-0x1, %eax
je 0xa3b1
leaq 0x4cb3(%rip), %rsi      # 0xef92
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, 0xba6d(%rip)      # 0x15d70
cmpl $-0x1, %eax
je 0xa466
xorl %edi, %edi
movl $0x80000, %esi          # imm = 0x80000
callq 0x42f0
movl %eax, 0xba4e(%rip)      # 0x15d6c
cmpl $-0x1, %eax
je 0xa46e
movl 0xba43(%rip), %edx      # 0x15d70
leaq 0x4cd9(%rip), %rdi      # 0xf00d
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 0x9da4
testq %rax, %rax
js 0xa40b
movl 0xba08(%rip), %edi      # 0x15d6c
leaq 0x60d(%rip), %rdx       # 0xa978
movl $0x1, %esi
movq %r14, %rcx
callq 0x4430
jmp 0xa41f
leaq 0xb110(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa43a
callq 0x6368
jmp 0xa43a
leaq 0xb0f6(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa442
callq 0x6464
jmp 0xa442
leaq 0xb0dc(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
jne 0xa452
movq %r14, %rdi
callq 0x48e0
jmp 0xa42f
leaq 0xb0c2(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa42f
leaq 0x4(%rsp), %r14
movl %ebp, %edi
movq %r14, %rsi
callq 0x6410
jmp 0xa406
leaq 0xb0a5(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
je 0xa42f
leaq 0x4(%rsp), %r14
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x63b8
movl (%r14), %ebp
jmp 0xa42f
leaq 0xb082(%rip), %rax      # 0x15494
cmpl $0x0, (%rax)
jne 0xa45f
movq %r14, %rdi
callq 0x48e0
movq %r12, %rdi
callq 0x48e8
movq %r15, %rdi
callq 0x48e8
testl %ebp, %ebp
js 0xa43a
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 0x631d
jmp 0xa3c1
callq 0x6230
jmp 0xa417
movq %r15, %rdi
callq 0x62cc
callq 0x6276