// File: /workspace/github_c_makefile_star2_O2/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 0x6e23(%rip), %rdi      # 0xebbf
leaq 0x8(%rsp), %rsi
callq 0x4440
testl %eax, %eax
jne 0x7e52
cmpq $0x63677270, 0x8(%rsp)  # imm = 0x63677270
jne 0x7e52
leaq 0x21130(%rip), %rax     # 0x28ef4
movl $0x1, (%rax)
leaq 0x8c16(%rip), %rdx      # 0x109e7
pushq $0x1
popq %rsi
movl %ebx, %edi
callq 0x8497
leaq 0x21116(%rip), %rcx     # 0x28ef8
movq %rax, (%rcx)
testq %rax, %rax
je 0x7fab
leaq 0x6dd9(%rip), %rsi      # 0xebce
movq %rax, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4690
movq %rax, %rbx
callq 0x4860
movl %eax, 0x4(%rsp)
testl %eax, %eax
js 0x802e
movl %eax, %ebp
pushq $0x2
popq %rdx
movl %eax, %edi
movq %rbx, %rsi
callq 0x4700
testl %eax, %eax
js 0x8087
leaq 0xcf31(%rip), %rax      # 0x14d64
movl %ebp, (%rax)
orl $-0x1, 0x4(%rsp)
leaq 0x97f(%rip), %rdx       # 0x87c0
pushq $0x1
popq %rsi
movl %ebp, %edi
xorl %ecx, %ecx
callq 0x4430
jmp 0x8102
leaq 0x753e(%rip), %rdx      # 0xf397
movl %ebx, %edi
xorl %esi, %esi
callq 0x8497
movq %rax, %rbx
testq %rax, %rax
je 0x7f45
leaq 0x709f(%rip), %rsi      # 0xef14
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4690
movq %rax, %r14
movq %rax, %rdi
movl $0x80001, %esi          # imm = 0x80001
xorl %eax, %eax
callq 0x48d0
movl %eax, 0x4(%rsp)
cmpl $-0x1, %eax
je 0x8011
movl %eax, %ebp
leaq 0x70c9(%rip), %rsi      # 0xef72
movq %rbx, %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4690
movq %rax, %r15
movq %rax, %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %eax, %eax
callq 0x48d0
movl %eax, 0xceb3(%rip)      # 0x14d80
cmpl $-0x1, %eax
je 0x8124
xorl %edi, %edi
movl $0x80000, %esi          # imm = 0x80000
callq 0x42f0
movl %eax, 0xce94(%rip)      # 0x14d7c
cmpl $-0x1, %eax
je 0x8164
movl 0xce89(%rip), %edx      # 0x14d80
leaq 0x70ef(%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 0x770f
testq %rax, %rax
js 0x80da
movl 0xce4e(%rip), %edi      # 0x14d7c
leaq 0x939(%rip), %rdx       # 0x886e
pushq $0x1
popq %rsi
movq %r14, %rcx
callq 0x4430
jmp 0x80f2
leaq 0xc558(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
je 0x810c
movq 0xc094(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x5231(%rip), %rsi      # 0xd197
leaq 0x6f6b(%rip), %rdx      # 0xeed8
xorl %eax, %eax
callq 0x4830
leaq 0x20f5d(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x810c
leaq 0x20f45(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x523d(%rip), %rsi      # 0xd1d2
leaq 0x6f3c(%rip), %rcx      # 0xeed8
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0x810c
leaq 0xc4f2(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
je 0x8114
movq 0xc02e(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x51cb(%rip), %rsi      # 0xd197
leaq 0x6cca(%rip), %rdx      # 0xec9d
xorl %eax, %eax
callq 0x4830
leaq 0x20ef7(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x8114
leaq 0x20edf(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x51d7(%rip), %rsi      # 0xd1d2
leaq 0x6c9b(%rip), %rcx      # 0xec9d
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0x8114
leaq 0xc48c(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
jne 0x81b9
movq %r14, %rdi
callq 0x48f0
jmp 0x8102
leaq 0xc46f(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
je 0x8102
movq 0xbfab(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x6c83(%rip), %rdi      # 0xecd2
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x4800
leaq 0x20e77(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x8102
leaq 0x20e5f(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x6c80(%rip), %rsi      # 0xecfb
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0x8102
leaq 0xc416(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
je 0x8102
movq 0xbf56(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x6c8b(%rip), %rsi      # 0xed2f
movq %rbx, %rdx
xorl %eax, %eax
callq 0x4830
leaq 0x20e23(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x8102
leaq 0x20e0f(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x6c94(%rip), %rsi      # 0xed5f
pushq $0x6
popq %rdi
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4120
jmp 0x8102
leaq 0xc3c3(%rip), %rax      # 0x144a4
cmpl $0x0, (%rax)
jne 0x8207
movq %r14, %rdi
callq 0x48f0
movq %r12, %rdi
callq 0x48f8
movq %r15, %rdi
callq 0x48f8
leaq 0x4(%rsp), %rdi
callq 0x87ac
movq %rbx, %rdi
callq 0x48f8
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0xbec5(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x6e50(%rip), %rsi      # 0xef85
movq %r15, %rdx
xorl %eax, %eax
callq 0x4830
leaq 0x20d92(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x81b1
leaq 0x20d7e(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x6e4b(%rip), %rsi      # 0xefa7
pushq $0x3
popq %rdi
movq %r15, %rcx
jmp 0x81aa
movq 0xbe85(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x4e9e(%rip), %rsi      # 0xd013
leaq 0x6e58(%rip), %rdx      # 0xefd4
xorl %eax, %eax
callq 0x4830
leaq 0x20d4e(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x81b1
leaq 0x20d3a(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x4e9d(%rip), %rsi      # 0xd03d
leaq 0x6e2d(%rip), %rcx      # 0xefd4
pushq $0x3
popq %rdi
xorl %eax, %eax
callq 0x4120
pushq $0x1
popq %rdi
callq 0x41e0
movq 0xbe30(%rip), %rax      # 0x13ff0
movq (%rax), %rdi
leaq 0x6d5f(%rip), %rsi      # 0xef29
movq %r14, %rdx
xorl %eax, %eax
callq 0x4830
leaq 0x20cfd(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x8021
leaq 0x20ce5(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x6d53(%rip), %rsi      # 0xef48
pushq $0x6
popq %rdi
movq %r14, %rcx
xorl %eax, %eax
callq 0x4120
jmp 0x8021
movq 0xbde2(%rip), %rax      # 0x13ff0
movq (%rax), %rcx
leaq 0x6ddb(%rip), %rdi      # 0xeff3
pushq $0x34
popq %rsi
pushq $0x1
popq %rdx
callq 0x4800
leaq 0x20cae(%rip), %rax     # 0x28ed8
cmpl $0x0, (%rax)
je 0x80ea
leaq 0x20c96(%rip), %rax     # 0x28ed0
movq (%rax), %rdx
leaq 0x6de4(%rip), %rsi      # 0xf028
pushq $0x6
popq %rdi
xorl %eax, %eax
callq 0x4120
jmp 0x80ea