	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sk_stream_wait_memory          ## -- Begin function sk_stream_wait_memory
	.p2align	4, 0x90
_sk_stream_wait_memory:                 ## @sk_stream_wait_memory
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	%rax, -48(%rbp)
	movq	_wait@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_DEFINE_WAIT
	movq	%rbx, %rdi
	callq	_sk_stream_memory_free
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_net_random
	movq	_HZ@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	imulq	$1717986919, %rcx, %rcx         ## imm = 0x66666667
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$33, %rcx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	addl	$2, %edx
	movslq	%edx, %r12
	movq	%r12, -48(%rbp)
	jmp	LBB0_3
LBB0_2:
	xorl	%r12d, %r12d
LBB0_3:
	movq	_SOCK_ASYNC_NOSPACE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movq	24(%rbx), %rsi
	callq	_set_bit
	movl	4(%rbx), %edi
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	cmpq	$0, 16(%rbx)
	je	LBB0_9
LBB0_4:
	movq	_EPIPE@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_6:
	movl	4(%rbx), %edi
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_finish_wait
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	subq	%r12, %rax
	addq	%rcx, %rax
	testq	%rax, %rax
	movl	$0, %ecx
	cmovleq	%rcx, %rax
	movq	%rax, -48(%rbp)
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, (%r14)
	movl	(%r13), %edi
	movq	24(%rbx), %rsi
	callq	_set_bit
	movl	4(%rbx), %edi
	movl	(%r15), %edx
	movq	_wait@GOTPCREL(%rip), %rsi
	callq	_prepare_to_wait
	cmpq	$0, 16(%rbx)
	movl	$0, %r12d
	jne	LBB0_4
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	jne	LBB0_4
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, (%r14)
	je	LBB0_22
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_signal_pending
	testq	%rax, %rax
	jne	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r13), %edi
	movq	24(%rbx), %rsi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_sk_stream_memory_free
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	testq	%r12, %r12
	je	LBB0_24
LBB0_14:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	_SOCK_NOSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%rbx), %rsi
	callq	_set_bit
	incl	8(%rbx)
	cmpq	$0, 16(%rbx)
	jne	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	_SEND_SHUTDOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	je	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
LBB0_19:                                ##   in Loop: Header=BB0_9 Depth=1
	movzbl	%al, %edx
	movq	%rbx, %rdi
	leaq	-48(%rbp), %rsi
	callq	_sk_wait_event
	decl	8(%rbx)
	movq	-48(%rbp), %rax
	testq	%r12, %r12
	je	LBB0_8
## %bb.20:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	(%r14), %rcx
	movq	%rcx, -48(%rbp)
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_7
## %bb.21:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rcx, %rax
	jmp	LBB0_8
LBB0_18:                                ##   in Loop: Header=BB0_9 Depth=1
	testq	%r12, %r12
	movq	%r15, %r13
	setne	%r15b
	movq	%rbx, %rdi
	callq	_sk_stream_memory_free
	testq	%rax, %rax
	setne	%al
	andb	%r15b, %al
	movq	%r13, %r15
	movq	_SOCK_ASYNC_NOSPACE@GOTPCREL(%rip), %r13
	jmp	LBB0_19
LBB0_22:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_23:
	movq	(%r14), %rdi
	callq	_sock_intr_errno
	movl	%eax, %r14d
	jmp	LBB0_6
LBB0_24:
	xorl	%r14d, %r14d
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_wait,4,2                       ## @wait
	.comm	_HZ,4,2                         ## @HZ
	.comm	_SOCK_ASYNC_NOSPACE,4,2         ## @SOCK_ASYNC_NOSPACE
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_SEND_SHUTDOWN,4,2              ## @SEND_SHUTDOWN
	.comm	_current,4,2                    ## @current
	.comm	_SOCK_NOSPACE,4,2               ## @SOCK_NOSPACE
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_EPIPE,4,2                      ## @EPIPE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sk_stream_wait_memory          ; -- Begin function sk_stream_wait_memory
	.p2align	2
_sk_stream_wait_memory:                 ; @sk_stream_wait_memory
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
	str	x8, [sp, #8]
Lloh0:
	adrp	x8, _wait@GOTPAGE
Lloh1:
	ldr	x8, [x8, _wait@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_DEFINE_WAIT
	mov	x0, x19
	bl	_sk_stream_memory_free
	cbz	x0, LBB0_2
; %bb.1:
	bl	_net_random
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldrsw	x8, [x8]
	mov	w9, #26215
	movk	w9, #26214, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #33
	add	w8, w8, w9
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
	add	w8, w8, #2
	sxtw	x24, w8
	str	x24, [sp, #8]
	b	LBB0_3
LBB0_2:
	mov	x24, #0
LBB0_3:
Lloh6:
	adrp	x22, _SOCK_ASYNC_NOSPACE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _SOCK_ASYNC_NOSPACE@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	x1, [x19, #24]
	bl	_set_bit
	ldr	w0, [x19, #4]
Lloh8:
	adrp	x23, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh10:
	adrp	x1, _wait@GOTPAGE
Lloh11:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_prepare_to_wait
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_7
LBB0_4:
Lloh12:
	adrp	x8, _EPIPE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPIPE@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	ldr	w0, [x19, #4]
Lloh14:
	adrp	x1, _wait@GOTPAGE
Lloh15:
	ldr	x1, [x1, _wait@GOTPAGEOFF]
	bl	_finish_wait
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_7:
Lloh16:
	adrp	x25, _SEND_SHUTDOWN@GOTPAGE
Lloh17:
	ldr	x25, [x25, _SEND_SHUTDOWN@GOTPAGEOFF]
Lloh18:
	adrp	x26, _current@GOTPAGE
Lloh19:
	ldr	x26, [x26, _current@GOTPAGEOFF]
Lloh20:
	adrp	x27, _SOCK_NOSPACE@GOTPAGE
Lloh21:
	ldr	x27, [x27, _SOCK_NOSPACE@GOTPAGEOFF]
Lloh22:
	adrp	x28, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh23:
	ldr	x28, [x28, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh24:
	adrp	x21, _wait@GOTPAGE
Lloh25:
	ldr	x21, [x21, _wait@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	mov	x8, x9
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	str	x8, [x20]
	ldr	w0, [x22]
	ldr	x1, [x19, #24]
	bl	_set_bit
	ldr	w0, [x19, #4]
	ldr	w2, [x23]
	mov	x1, x21
	bl	_prepare_to_wait
	mov	x24, #0
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_4
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_22
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x26]
	bl	_signal_pending
	cbnz	x0, LBB0_23
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x22]
	ldr	x1, [x19, #24]
	bl	_clear_bit
	mov	x0, x19
	bl	_sk_stream_memory_free
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_10 Depth=1
	cbz	x24, LBB0_24
LBB0_15:                                ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x27]
	ldr	x1, [x19, #24]
	bl	_set_bit
	ldr	w8, [x19, #8]
	add	w8, w8, #1
	str	w8, [x19, #8]
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x19]
	ldr	w9, [x25]
	tst	w9, w8
	b.eq	LBB0_21
LBB0_17:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	w2, #0
LBB0_18:                                ;   in Loop: Header=BB0_10 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_sk_wait_event
	ldr	w8, [x19, #8]
	sub	w8, w8, #1
	str	w8, [x19, #8]
	ldr	x9, [sp, #8]
	cbz	x24, LBB0_8
; %bb.19:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x8, [x20]
	str	x8, [sp, #8]
	ldr	x10, [x28]
	cmp	x8, x10
	b.eq	LBB0_9
; %bb.20:                               ;   in Loop: Header=BB0_10 Depth=1
	sub	x9, x9, x24
	add	x8, x9, x8
	cmp	x8, #0
	csel	x8, x8, xzr, gt
	str	x8, [sp, #8]
	b	LBB0_9
LBB0_21:                                ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x19
	bl	_sk_stream_memory_free
	cmp	x0, #0
	ccmp	x24, #0, #4, ne
	cset	w2, ne
	b	LBB0_18
LBB0_22:
Lloh26:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh27:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_5
LBB0_23:
	ldr	x0, [x20]
	bl	_sock_intr_errno
	mov	x20, x0
	b	LBB0_6
LBB0_24:
	mov	w20, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_wait,4,2                       ; @wait
	.comm	_HZ,4,2                         ; @HZ
	.comm	_SOCK_ASYNC_NOSPACE,4,2         ; @SOCK_ASYNC_NOSPACE
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_SEND_SHUTDOWN,4,2              ; @SEND_SHUTDOWN
	.comm	_current,4,2                    ; @current
	.comm	_SOCK_NOSPACE,4,2               ; @SOCK_NOSPACE
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_EPIPE,4,2                      ; @EPIPE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
.subsections_via_symbols
