	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function p9_poll_mux
_p9_poll_mux:                           ## @p9_poll_mux
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpq	$0, (%rdi)
	js	LBB0_11
## %bb.1:
	movq	%rdi, %r14
	movl	36(%rdi), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_p9_fd_poll
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	_POLLERR@GOTPCREL(%rip), %rax
	movq	_POLLHUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_POLLNVAL@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	testl	%r15d, %ecx
	je	LBB0_4
LBB0_3:
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_P9_DPRINTK
	movq	_ECONNRESET@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	testl	%r15d, %r15d
	cmovsl	%r15d, %ebx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_p9_conn_cancel
	movl	%ebx, %r15d
LBB0_4:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_7
## %bb.5:
	movq	_Rpending@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_P9_DPRINTK
	movq	_Rworksched@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_P9_DPRINTK
	leaq	32(%r14), %rdi
	callq	_schedule_work
LBB0_7:
	movq	_POLLOUT@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.8:
	movq	_Wpending@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	12(%r14), %rbx
	movq	%rbx, %rsi
	callq	_set_bit
	movq	_P9_DEBUG_TRANS@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_P9_DPRINTK
	cmpq	$0, 24(%r14)
	je	LBB0_9
LBB0_10:
	movq	_Wworksched@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_11
## %bb.12:
	movl	(%r15), %edi
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_P9_DPRINTK
	addq	$8, %r14
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_schedule_work                  ## TAILCALL
LBB0_9:
	leaq	16(%r14), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_10
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_POLLHUP,4,2                    ## @POLLHUP
	.comm	_POLLNVAL,4,2                   ## @POLLNVAL
	.comm	_P9_DEBUG_TRANS,4,2             ## @P9_DEBUG_TRANS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error mux %p err %d\n"

	.comm	_ECONNRESET,4,2                 ## @ECONNRESET
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_Rpending,4,2                   ## @Rpending
L_.str.1:                               ## @.str.1
	.asciz	"mux %p can read\n"

	.comm	_Rworksched,4,2                 ## @Rworksched
L_.str.2:                               ## @.str.2
	.asciz	"sched read work %p\n"

	.comm	_POLLOUT,4,2                    ## @POLLOUT
	.comm	_Wpending,4,2                   ## @Wpending
L_.str.3:                               ## @.str.3
	.asciz	"mux %p can write\n"

	.comm	_Wworksched,4,2                 ## @Wworksched
L_.str.4:                               ## @.str.4
	.asciz	"sched write work %p\n"

	.no_dead_strip	_p9_poll_mux
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function p9_poll_mux
_p9_poll_mux:                           ; @p9_poll_mux
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
	tbnz	x8, #63, LBB0_12
; %bb.1:
	mov	x19, x0
	ldr	w0, [x0, #36]
	mov	x1, #0
	bl	_p9_fd_poll
	mov	x20, x0
Lloh0:
	adrp	x22, _P9_DEBUG_TRANS@GOTPAGE
Lloh1:
	ldr	x22, [x22, _P9_DEBUG_TRANS@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _POLLERR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _POLLERR@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _POLLHUP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _POLLHUP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _POLLNVAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _POLLNVAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w8, w9
	tst	w8, w20
	b.eq	LBB0_4
LBB0_3:
	ldr	w0, [x22]
	str	x20, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_P9_DPRINTK
Lloh13:
	adrp	x8, _ECONNRESET@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ECONNRESET@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w20, #0
	csneg	w20, w20, w8, lt
	mov	x0, x19
	mov	x1, x20
	bl	_p9_conn_cancel
LBB0_4:
Lloh16:
	adrp	x8, _POLLIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_7
; %bb.5:
Lloh19:
	adrp	x8, _Rpending@GOTPAGE
Lloh20:
	ldr	x8, [x8, _Rpending@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	add	x21, x19, #12
	mov	x1, x21
	bl	_set_bit
	ldr	w0, [x22]
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_P9_DPRINTK
Lloh24:
	adrp	x8, _Rworksched@GOTPAGE
Lloh25:
	ldr	x8, [x8, _Rworksched@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_test_and_set_bit
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w0, [x22]
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_P9_DPRINTK
	add	x0, x19, #32
	bl	_schedule_work
LBB0_7:
Lloh29:
	adrp	x8, _POLLOUT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _POLLOUT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_12
; %bb.8:
Lloh32:
	adrp	x8, _Wpending@GOTPAGE
Lloh33:
	ldr	x8, [x8, _Wpending@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	add	x20, x19, #12
	mov	x1, x20
	bl	_set_bit
	ldr	w0, [x22]
Lloh35:
	adrp	x1, l_.str.3@PAGE
Lloh36:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x19
	bl	_P9_DPRINTK
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_11
LBB0_9:
Lloh37:
	adrp	x8, _Wworksched@GOTPAGE
Lloh38:
	ldr	x8, [x8, _Wworksched@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	mov	x1, x20
	bl	_test_and_set_bit
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	w0, [x22]
Lloh40:
	adrp	x1, l_.str.4@PAGE
Lloh41:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x19
	bl	_P9_DPRINTK
	add	x0, x19, #8
	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
	add	sp, sp, #64
	b	_schedule_work
LBB0_11:
	add	x0, x19, #16
	bl	_list_empty
	cbz	w0, LBB0_9
LBB0_12:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_POLLHUP,4,2                    ; @POLLHUP
	.comm	_POLLNVAL,4,2                   ; @POLLNVAL
	.comm	_P9_DEBUG_TRANS,4,2             ; @P9_DEBUG_TRANS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error mux %p err %d\n"

	.comm	_ECONNRESET,4,2                 ; @ECONNRESET
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_Rpending,4,2                   ; @Rpending
l_.str.1:                               ; @.str.1
	.asciz	"mux %p can read\n"

	.comm	_Rworksched,4,2                 ; @Rworksched
l_.str.2:                               ; @.str.2
	.asciz	"sched read work %p\n"

	.comm	_POLLOUT,4,2                    ; @POLLOUT
	.comm	_Wpending,4,2                   ; @Wpending
l_.str.3:                               ; @.str.3
	.asciz	"mux %p can write\n"

	.comm	_Wworksched,4,2                 ; @Wworksched
l_.str.4:                               ; @.str.4
	.asciz	"sched write work %p\n"

	.no_dead_strip	_p9_poll_mux
.subsections_via_symbols
