	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tap_poll
_tap_poll:                              ## @tap_poll
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rdx
	leaq	8(%r14), %rsi
	callq	_poll_wait
	leaq	12(%r14), %rdi
	callq	_ptr_ring_empty
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	xorl	%ebx, %ebx
	testl	%eax, %eax
	cmovel	%edx, %ebx
	movq	%r14, %rdi
	callq	_sock_writeable
	testq	%rax, %rax
	je	LBB0_3
LBB0_5:
	movq	_EPOLLOUT@GOTPCREL(%rip), %rax
	movq	_EPOLLWRNORM@GOTPCREL(%rip), %rcx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	jmp	LBB0_6
LBB0_1:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_6
LBB0_3:
	movq	_SOCKWQ_ASYNC_NOSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	4(%r14), %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_sock_writeable
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_SOCKWQ_ASYNC_NOSPACE,4,2       ## @SOCKWQ_ASYNC_NOSPACE
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ## @EPOLLWRNORM
	.no_dead_strip	_tap_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tap_poll
_tap_poll:                              ; @tap_poll
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x19, [x0]
	cbz	x19, LBB0_3
; %bb.1:
	mov	x2, x1
	add	x1, x19, #8
	bl	_poll_wait
	add	x0, x19, #12
	bl	_ptr_ring_empty
Lloh0:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w0, #0
	csel	w20, w8, wzr, eq
	mov	x0, x19
	bl	_sock_writeable
	cbz	x0, LBB0_4
LBB0_2:
Lloh6:
	adrp	x8, _EPOLLOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EPOLLOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _EPOLLWRNORM@GOTPAGE
Lloh10:
	ldr	x9, [x9, _EPOLLWRNORM@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w8, w20
	orr	w20, w8, w9
	b	LBB0_5
LBB0_3:
Lloh12:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
Lloh14:
	ldr	w20, [x8]
	b	LBB0_5
LBB0_4:
Lloh15:
	adrp	x8, _SOCKWQ_ASYNC_NOSPACE@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SOCKWQ_ASYNC_NOSPACE@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_and_set_bit
	cbz	w0, LBB0_6
LBB0_5:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
	mov	x0, x19
	bl	_sock_writeable
	cbnz	x0, LBB0_2
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_SOCKWQ_ASYNC_NOSPACE,4,2       ; @SOCKWQ_ASYNC_NOSPACE
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ; @EPOLLWRNORM
	.no_dead_strip	_tap_poll
.subsections_via_symbols
