	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tun_chr_poll
_tun_chr_poll:                          ## @tun_chr_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	%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, %r13
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	movq	%r15, %rdi
	callq	_tun_get
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	8(%r15), %r12
	movq	_KERN_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rsi
	callq	_tun_debug
	movq	%r12, %rdi
	callq	_sk_sleep
	movq	%rbx, %rdi
	movl	%eax, %esi
	movq	%r13, %rdx
	callq	_poll_wait
	movq	%r15, %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
	movq	%r15, %rsi
	callq	_tun_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_9
LBB0_3:
	movq	_SOCKWQ_ASYNC_NOSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r12), %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	je	LBB0_4
LBB0_6:
	movq	(%r14), %rax
	movq	(%rax), %rax
	movq	_NETREG_REGISTERED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_tun_put
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_tun_sock_writeable
	testq	%rax, %rax
	jne	LBB0_5
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_KERN_INFO,4,2                  ## @KERN_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tun_chr_poll\n"

	.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
	.comm	_NETREG_REGISTERED,8,3          ## @NETREG_REGISTERED
	.no_dead_strip	_tun_chr_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tun_chr_poll
_tun_chr_poll:                          ; @tun_chr_poll
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x1
	mov	x23, x0
	ldr	x20, [x0]
	mov	x0, x20
	bl	_tun_get
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	ldr	x21, [x20, #8]
Lloh0:
	adrp	x8, _KERN_INFO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _KERN_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x19
	bl	_tun_debug
	mov	x0, x21
	bl	_sk_sleep
	mov	x1, x0
	mov	x0, x23
	mov	x2, x22
	bl	_poll_wait
	mov	x0, x20
	bl	_ptr_ring_empty
Lloh5:
	adrp	x8, _EPOLLIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EPOLLIN@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _EPOLLRDNORM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EPOLLRDNORM@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w0, #0
	csel	w22, w8, wzr, eq
	mov	x0, x19
	mov	x1, x20
	bl	_tun_sock_writeable
	cbz	x0, LBB0_4
LBB0_2:
Lloh11:
	adrp	x8, _EPOLLOUT@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EPOLLOUT@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _EPOLLWRNORM@GOTPAGE
Lloh15:
	ldr	x9, [x9, _EPOLLWRNORM@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w22
	orr	w22, w8, w9
	b	LBB0_5
LBB0_3:
Lloh17:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	b	LBB0_6
LBB0_4:
Lloh20:
	adrp	x8, _SOCKWQ_ASYNC_NOSPACE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SOCKWQ_ASYNC_NOSPACE@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
	ldr	x1, [x21]
	bl	_test_and_set_bit
	cbz	w0, LBB0_7
LBB0_5:
	ldr	x8, [x19]
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _NETREG_REGISTERED@GOTPAGE
Lloh24:
	ldr	x9, [x9, _NETREG_REGISTERED@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
Lloh26:
	adrp	x10, _EPOLLERR@GOTPAGE
Lloh27:
	ldr	x10, [x10, _EPOLLERR@GOTPAGEOFF]
Lloh28:
	ldr	w10, [x10]
	cmp	x8, x9
	csel	w20, w22, w10, eq
	mov	x0, x19
	bl	_tun_put
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x19
	mov	x1, x20
	bl	_tun_sock_writeable
	cbnz	x0, LBB0_2
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_KERN_INFO,4,2                  ; @KERN_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tun_chr_poll\n"

	.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
	.comm	_NETREG_REGISTERED,8,3          ; @NETREG_REGISTERED
	.no_dead_strip	_tun_chr_poll
.subsections_via_symbols
