	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sk_mem_schedule              ## -- Begin function __sk_mem_schedule
	.p2align	4, 0x90
___sk_mem_schedule:                     ## @__sk_mem_schedule
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	40(%rdi), %r15
	movl	%esi, %edi
	callq	_sk_mem_pages
	movl	%eax, %ebx
	movq	_SK_MEM_QUANTUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%ebx, %eax
	addl	%eax, (%r14)
	movl	24(%r15), %esi
	movl	%ebx, %edi
	callq	_atomic_add_return
	movl	%eax, %edx
	movq	(%r15), %rax
	cmpl	(%rax), %edx
	jle	LBB0_1
## %bb.4:
	cmpl	4(%rax), %edx
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	jle	LBB0_7
## %bb.5:
	movq	40(%r15), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.6:
	movq	%r14, %rdi
	movl	%edx, %r12d
	callq	*%rcx
	movl	%r12d, %edx
	movq	(%r15), %rax
LBB0_7:
	cmpl	8(%rax), %edx
	jle	LBB0_8
LBB0_18:
	movq	_SK_MEM_SEND@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_21
## %bb.19:
	movq	8(%r14), %rax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_21
## %bb.20:
	movq	%r14, %rdi
	movl	%edx, %r12d
	callq	_sk_stream_moderate_sndbuf
	movl	%r12d, %edx
	movslq	-60(%rbp), %rax                 ## 4-byte Folded Reload
	addq	16(%r14), %rax
	movl	$1, %r12d
	cmpq	24(%r14), %rax
	jge	LBB0_22
LBB0_21:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_trace_sock_exceed_buf_limit
	movq	_SK_MEM_QUANTUM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%ebx, %eax
	subl	%eax, (%r14)
	movl	24(%r15), %esi
	movl	%ebx, %edi
	callq	_atomic_sub
	xorl	%r12d, %r12d
	jmp	LBB0_22
LBB0_1:
	movq	32(%r15), %rax
	movl	$1, %r12d
	testq	%rax, %rax
	je	LBB0_22
## %bb.2:
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.3:
	movq	$0, (%rax)
	jmp	LBB0_22
LBB0_8:
	movq	_SK_MEM_RECV@GOTPCREL(%rip), %rax
	movl	%r13d, %ecx
	cmpl	%r13d, (%rax)
	jne	LBB0_10
## %bb.9:
	leaq	32(%r14), %rdi
	movl	%edx, %r12d
	callq	_atomic_read
	movl	%r12d, %edx
	movq	8(%r15), %rcx
	jmp	LBB0_14
LBB0_10:
	movq	8(%r14), %rax
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	movq	16(%r14), %rax
	jmp	LBB0_13
LBB0_12:
	leaq	36(%r14), %rdi
	movl	%edx, %r12d
	callq	_atomic_read
	movl	%r12d, %edx
LBB0_13:
	movq	16(%r15), %rcx
LBB0_14:
	movl	$1, %r12d
	cmpq	(%rcx), %rax
	jge	LBB0_15
LBB0_22:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	32(%r15), %rax
	testq	%rax, %rax
	je	LBB0_18
## %bb.16:
	movl	$1, %r12d
	cmpq	$0, (%rax)
	je	LBB0_22
## %bb.17:
	movl	28(%r15), %edi
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	callq	_percpu_counter_read_positive
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	(%r15), %rax
	movl	8(%rax), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	16(%r14), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	32(%r14), %rdi
	callq	_atomic_read
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	addl	%eax, %edi
	addl	(%r14), %edi
	callq	_sk_mem_pages
	movl	-56(%rbp), %edx                 ## 4-byte Reload
	imull	-52(%rbp), %eax                 ## 4-byte Folded Reload
	cmpl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	jle	LBB0_18
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_SK_MEM_QUANTUM,4,2             ## @SK_MEM_QUANTUM
	.comm	_SK_MEM_RECV,4,2                ## @SK_MEM_RECV
	.comm	_SOCK_STREAM,8,3                ## @SOCK_STREAM
	.comm	_SK_MEM_SEND,4,2                ## @SK_MEM_SEND
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	___sk_mem_schedule              ; -- Begin function __sk_mem_schedule
	.p2align	2
___sk_mem_schedule:                     ; @__sk_mem_schedule
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x24, x2
	mov	x22, x1
	mov	x20, x0
	ldr	x19, [x0, #40]
	mov	x0, x1
	bl	_sk_mem_pages
	mov	x21, x0
Lloh0:
	adrp	x26, _SK_MEM_QUANTUM@GOTPAGE
Lloh1:
	ldr	x26, [x26, _SK_MEM_QUANTUM@GOTPAGEOFF]
	ldr	w8, [x26]
	ldr	w9, [x20]
	madd	w8, w8, w0, w9
	str	w8, [x20]
	ldr	w1, [x19, #24]
	bl	_atomic_add_return
	ldr	x8, [x19]
	ldr	w9, [x8]
	cmp	w0, w9
	b.le	LBB0_9
; %bb.1:
	mov	x23, x0
	ldr	w9, [x8, #4]
	cmp	w0, w9
	b.le	LBB0_4
; %bb.2:
	ldr	x9, [x19, #40]
	cbz	x9, LBB0_4
; %bb.3:
	mov	x0, x20
	blr	x9
	ldr	x8, [x19]
LBB0_4:
	ldr	w8, [x8, #8]
	cmp	w23, w8
	b.le	LBB0_12
LBB0_5:
Lloh2:
	adrp	x8, _SK_MEM_SEND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SK_MEM_SEND@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x20
	bl	_sk_stream_moderate_sndbuf
	ldp	x8, x9, [x20, #16]
	add	x8, x8, w22, sxtw
	cmp	x8, x9
	b.ge	LBB0_21
LBB0_8:
	mov	x0, x20
	mov	x1, x19
	mov	x2, x23
	bl	_trace_sock_exceed_buf_limit
	ldr	w8, [x26]
	ldr	w9, [x20]
	msub	w8, w8, w21, w9
	str	w8, [x20]
	ldr	w1, [x19, #24]
	mov	x0, x21
	bl	_atomic_sub
	mov	w0, #0
	b	LBB0_22
LBB0_9:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_21
; %bb.10:
	ldr	x9, [x8]
	cbz	x9, LBB0_21
; %bb.11:
	str	xzr, [x8]
	b	LBB0_21
LBB0_12:
Lloh8:
	adrp	x8, _SK_MEM_RECV@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SK_MEM_RECV@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_14
; %bb.13:
	add	x0, x20, #32
	bl	_atomic_read
	ldr	x8, [x19, #8]
	b	LBB0_17
LBB0_14:
	ldr	x8, [x20, #8]
Lloh11:
	adrp	x9, _SOCK_STREAM@GOTPAGE
Lloh12:
	ldr	x9, [x9, _SOCK_STREAM@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.15:
	ldr	x8, [x20, #16]
	ldr	x9, [x19, #16]
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_18
	b	LBB0_21
LBB0_16:
	add	x0, x20, #36
	bl	_atomic_read
	ldr	x8, [x19, #16]
LBB0_17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.lt	LBB0_21
LBB0_18:
	ldr	x8, [x19, #32]
	cbz	x8, LBB0_5
; %bb.19:
	ldr	x8, [x8]
	cbz	x8, LBB0_21
; %bb.20:
	ldr	w0, [x19, #28]
	bl	_percpu_counter_read_positive
	mov	x25, x0
	ldr	x8, [x19]
	ldr	w27, [x8, #8]
	ldr	w28, [x20, #16]
	add	x0, x20, #32
	bl	_atomic_read
	ldr	w8, [x20]
	add	w9, w0, w28
	add	w0, w8, w9
	bl	_sk_mem_pages
	mul	w8, w0, w25
	cmp	w27, w8
	b.le	LBB0_5
LBB0_21:
	mov	w0, #1
LBB0_22:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_SK_MEM_QUANTUM,4,2             ; @SK_MEM_QUANTUM
	.comm	_SK_MEM_RECV,4,2                ; @SK_MEM_RECV
	.comm	_SOCK_STREAM,8,3                ; @SOCK_STREAM
	.comm	_SK_MEM_SEND,4,2                ; @SK_MEM_SEND
.subsections_via_symbols
