	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cec_poll
_cec_poll:                              ## @cec_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rdx
	movq	(%rdi), %r15
	movq	24(%r15), %rbx
	leaq	16(%r15), %rsi
	callq	_poll_wait
	movq	%rbx, %rdi
	callq	_cec_is_registered
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	xorl	%eax, %eax
	cmpq	$0, 16(%rbx)
	movl	$0, %ecx
	je	LBB0_5
## %bb.3:
	movq	(%rbx), %rdx
	movq	_CEC_MAX_MSG_TX_QUEUE_SZ@GOTPCREL(%rip), %rsi
	movl	$0, %ecx
	cmpq	(%rsi), %rdx
	jge	LBB0_5
## %bb.4:
	movq	_EPOLLOUT@GOTPCREL(%rip), %rdx
	movq	_EPOLLWRNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
LBB0_5:
	movq	_EPOLLIN@GOTPCREL(%rip), %rdx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rsi
	movl	(%rsi), %ebx
	orl	(%rdx), %ebx
	cmpq	$0, 8(%r15)
	cmovel	%eax, %ebx
	orl	%ecx, %ebx
	cmpq	$0, (%r15)
	je	LBB0_7
## %bb.6:
	movq	_EPOLLPRI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	orl	%eax, %ebx
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_8
LBB0_1:
	movq	_EPOLLERR@GOTPCREL(%rip), %rax
	movq	_EPOLLHUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLERR,4,2                   ## @EPOLLERR
	.comm	_EPOLLHUP,4,2                   ## @EPOLLHUP
	.comm	_CEC_MAX_MSG_TX_QUEUE_SZ,8,3    ## @CEC_MAX_MSG_TX_QUEUE_SZ
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ## @EPOLLWRNORM
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_EPOLLPRI,4,2                   ## @EPOLLPRI
	.no_dead_strip	_cec_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cec_poll
_cec_poll:                              ; @cec_poll
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x2, x1
	ldr	x21, [x0]
	ldr	x20, [x21, #24]
	add	x1, x21, #16
	bl	_poll_wait
	mov	x0, x20
	bl	_cec_is_registered
	cbz	w0, LBB0_4
; %bb.1:
	add	x19, x20, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _CEC_MAX_MSG_TX_QUEUE_SZ@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CEC_MAX_MSG_TX_QUEUE_SZ@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.3:
Lloh3:
	adrp	x8, _EPOLLOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EPOLLOUT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _EPOLLWRNORM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _EPOLLWRNORM@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w9, w8
	b	LBB0_6
LBB0_4:
Lloh9:
	adrp	x8, _EPOLLERR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EPOLLERR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _EPOLLHUP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _EPOLLHUP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w20, w9, w8
	b	LBB0_7
LBB0_5:
	mov	w8, #0
LBB0_6:
Lloh15:
	adrp	x9, _EPOLLIN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _EPOLLIN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _EPOLLRDNORM@GOTPAGE
Lloh19:
	ldr	x10, [x10, _EPOLLRDNORM@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	orr	w9, w10, w9
	ldp	x11, x10, [x21]
	cmp	x10, #0
	csel	w9, wzr, w9, eq
	orr	w8, w9, w8
Lloh21:
	adrp	x9, _EPOLLPRI@GOTPAGE
Lloh22:
	ldr	x9, [x9, _EPOLLPRI@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	cmp	x11, #0
	csel	w9, wzr, w9, eq
	orr	w20, w8, w9
	mov	x0, x19
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLERR,4,2                   ; @EPOLLERR
	.comm	_EPOLLHUP,4,2                   ; @EPOLLHUP
	.comm	_CEC_MAX_MSG_TX_QUEUE_SZ,8,3    ; @CEC_MAX_MSG_TX_QUEUE_SZ
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ; @EPOLLWRNORM
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_EPOLLPRI,4,2                   ; @EPOLLPRI
	.no_dead_strip	_cec_poll
.subsections_via_symbols
