	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tunpoll
_tunpoll:                               ## @tunpoll
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movl	%esi, %r14d
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_TUN2IFP
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rax, %rdi
	xorl	%eax, %eax
	callq	_TUNDEBUG
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movq	_POLLRDNORM@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	orl	(%rcx), %eax
	testl	%r14d, %eax
	je	LBB0_5
## %bb.1:
	movq	%rbx, %rdi
	callq	_IFQ_LOCK
	movq	%rbx, %rdi
	callq	_IFQ_IS_EMPTY
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_TUNDEBUG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_selrecord
	jmp	LBB0_4
LBB0_2:
	movl	(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_TUNDEBUG
	movl	(%r15), %r13d
	movq	_POLLIN@GOTPCREL(%rip), %rax
	orl	(%rax), %r13d
	andl	%r14d, %r13d
LBB0_4:
	movq	%rbx, %rdi
	callq	_IFQ_UNLOCK
LBB0_5:
	movq	_POLLOUT@GOTPCREL(%rip), %rcx
	movq	_POLLWRNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	andl	%r14d, %eax
	orl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tunpoll\n"

	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
L_.str.1:                               ## @.str.1
	.asciz	"tunpoll q=%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"tunpoll waiting\n"

	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_POLLWRNORM,4,2                 ## @POLLWRNORM
	.no_dead_strip	_tunpoll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tunpoll
_tunpoll:                               ; @tunpoll
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x21, x2
	mov	x19, x1
	ldr	x22, [x0]
	mov	x0, x22
	bl	_TUN2IFP
	mov	x20, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_TUNDEBUG
Lloh2:
	adrp	x23, _POLLIN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _POLLIN@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh4:
	adrp	x24, _POLLRDNORM@GOTPAGE
Lloh5:
	ldr	x24, [x24, _POLLRDNORM@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
	tst	w8, w19
	b.eq	LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_IFQ_LOCK
	mov	x0, x20
	bl	_IFQ_IS_EMPTY
	cbz	w0, LBB0_4
; %bb.2:
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_TUNDEBUG
	mov	x0, x21
	mov	x1, x22
	bl	_selrecord
	mov	w21, #0
	b	LBB0_5
LBB0_3:
	mov	w21, #0
	b	LBB0_6
LBB0_4:
	ldr	w8, [x20]
	str	x8, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_TUNDEBUG
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	and	w21, w8, w19
LBB0_5:
	mov	x0, x20
	bl	_IFQ_UNLOCK
LBB0_6:
Lloh10:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh12:
	adrp	x9, _POLLWRNORM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _POLLWRNORM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	ldr	w9, [x9]
	orr	w8, w9, w8
	and	w8, w8, w19
	orr	w0, w8, w21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh14
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tunpoll\n"

	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
l_.str.1:                               ; @.str.1
	.asciz	"tunpoll q=%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"tunpoll waiting\n"

	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_POLLWRNORM,4,2                 ; @POLLWRNORM
	.no_dead_strip	_tunpoll
.subsections_via_symbols
