	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_check
_mem_check:                             ## @mem_check
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	callq	_inet6_sk
	movq	%rax, %r14
	movq	_FL_MAX_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %ebx
	movq	_fl_size@GOTPCREL(%rip), %rdi
	callq	_atomic_read
	subl	%eax, %ebx
	movl	(%r15), %ecx
	movq	_FL_MAX_PER_SOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ecx, %esi
	subl	%edx, %esi
	xorl	%eax, %eax
	cmpl	%esi, %ebx
	jg	LBB0_10
## %bb.1:
	movq	(%r14), %rsi
	xorl	%eax, %eax
	testq	%rsi, %rsi
	je	LBB0_4
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%eax
	movq	(%rsi), %rsi
	testq	%rsi, %rsi
	jne	LBB0_2
LBB0_4:
	testl	%ebx, %ebx
	jle	LBB0_9
## %bb.5:
	cmpl	%edx, %eax
	jge	LBB0_8
## %bb.6:
	testl	%eax, %eax
	setne	%sil
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	cmpl	%edx, %ebx
	setl	%al
	leal	3(%rcx), %edx
	testl	%ecx, %ecx
	cmovnsl	%ecx, %edx
	testb	%al, %sil
	jne	LBB0_8
## %bb.7:
	sarl	$2, %edx
	xorl	%eax, %eax
	cmpl	%edx, %ebx
	jge	LBB0_10
LBB0_8:
	movq	_CAP_NET_ADMIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_capable
	movl	%eax, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_10
LBB0_9:
	movq	_ENOBUFS@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FL_MAX_SIZE,4,2                ## @FL_MAX_SIZE
	.comm	_fl_size,4,2                    ## @fl_size
	.comm	_FL_MAX_PER_SOCK,4,2            ## @FL_MAX_PER_SOCK
	.comm	_CAP_NET_ADMIN,4,2              ## @CAP_NET_ADMIN
	.comm	_ENOBUFS,4,2                    ## @ENOBUFS
	.no_dead_strip	_mem_check
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_check
_mem_check:                             ; @mem_check
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	bl	_inet6_sk
	mov	x19, x0
Lloh0:
	adrp	x20, _FL_MAX_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FL_MAX_SIZE@GOTPAGEOFF]
	ldr	w21, [x20]
Lloh2:
	adrp	x0, _fl_size@GOTPAGE
Lloh3:
	ldr	x0, [x0, _fl_size@GOTPAGEOFF]
	bl	_atomic_read
	sub	w8, w21, w0
	ldr	w9, [x20]
Lloh4:
	adrp	x10, _FL_MAX_PER_SOCK@GOTPAGE
Lloh5:
	ldr	x10, [x10, _FL_MAX_PER_SOCK@GOTPAGEOFF]
Lloh6:
	ldr	w10, [x10]
	sub	w11, w9, w10
	cmp	w8, w11
	b.gt	LBB0_10
; %bb.1:
	ldr	x12, [x19]
	cbz	x12, LBB0_5
; %bb.2:
	mov	w11, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w11, w11, #1
	ldr	x12, [x12]
	cbnz	x12, LBB0_3
; %bb.4:
	cmp	w8, #1
	b.ge	LBB0_6
	b	LBB0_11
LBB0_5:
	mov	w11, #0
	cmp	w8, #1
	b.lt	LBB0_11
LBB0_6:
	cmp	w11, w10
	b.ge	LBB0_9
; %bb.7:
	add	w10, w9, #3
	cmp	w9, #0
	csel	w10, w10, w9, lt
	cinc	w9, w9, lt
	cmp	w8, w9, asr #1
	ccmp	w11, #0, #4, lt
	b.ne	LBB0_9
; %bb.8:
	asr	w9, w10, #2
	cmp	w8, w9
	b.ge	LBB0_10
LBB0_9:
Lloh7:
	adrp	x8, _CAP_NET_ADMIN@GOTPAGE
Lloh8:
	ldr	x8, [x8, _CAP_NET_ADMIN@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	bl	_capable
	cbz	w0, LBB0_11
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh10:
	adrp	x8, _ENOBUFS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOBUFS@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_FL_MAX_SIZE,4,2                ; @FL_MAX_SIZE
	.comm	_fl_size,4,2                    ; @fl_size
	.comm	_FL_MAX_PER_SOCK,4,2            ; @FL_MAX_PER_SOCK
	.comm	_CAP_NET_ADMIN,4,2              ; @CAP_NET_ADMIN
	.comm	_ENOBUFS,4,2                    ; @ENOBUFS
	.no_dead_strip	_mem_check
.subsections_via_symbols
