	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dvb_demux_poll
_dvb_demux_poll:                        ## @dvb_demux_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	16(%r14), %rsi
	callq	_poll_wait
	movq	(%r14), %rax
	movq	_DMXDEV_STATE_GO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.3:
	movq	_DMXDEV_STATE_DONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_5
## %bb.4:
	xorl	%ebx, %ebx
	movq	_DMXDEV_STATE_TIMEDOUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
LBB0_5:
	addq	$8, %r14
	cmpq	$0, (%r14)
	je	LBB0_6
## %bb.7:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	orl	(%rax), %ebx
	movq	_POLLPRI@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movq	_POLLERR@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	jmp	LBB0_8
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%r14, %rdi
	callq	_dvb_ringbuffer_empty
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	_POLLIN@GOTPCREL(%rip), %rax
	movq	_POLLRDNORM@GOTPCREL(%rip), %rcx
	movq	_POLLPRI@GOTPCREL(%rip), %rdx
	orl	(%rax), %ebx
	orl	(%rcx), %ebx
	orl	(%rdx), %ebx
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DMXDEV_STATE_GO,8,3            ## @DMXDEV_STATE_GO
	.comm	_DMXDEV_STATE_DONE,8,3          ## @DMXDEV_STATE_DONE
	.comm	_DMXDEV_STATE_TIMEDOUT,8,3      ## @DMXDEV_STATE_TIMEDOUT
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.comm	_POLLPRI,4,2                    ## @POLLPRI
	.comm	_POLLERR,4,2                    ## @POLLERR
	.no_dead_strip	_dvb_demux_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dvb_demux_poll
_dvb_demux_poll:                        ; @dvb_demux_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
	ldr	x19, [x0]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x2, x1
	add	x1, x19, #16
	bl	_poll_wait
	ldr	x8, [x19], #8
Lloh0:
	adrp	x9, _DMXDEV_STATE_GO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMXDEV_STATE_GO@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _DMXDEV_STATE_DONE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMXDEV_STATE_DONE@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
Lloh6:
	adrp	x11, _DMXDEV_STATE_TIMEDOUT@GOTPAGE
Lloh7:
	ldr	x11, [x11, _DMXDEV_STATE_TIMEDOUT@GOTPAGEOFF]
Lloh8:
	ldr	x11, [x11]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	ccmp	x8, x11, #4, ne
	b.ne	LBB0_5
; %bb.2:
	ldr	x8, [x19]
Lloh9:
	adrp	x21, _POLLIN@GOTPAGE
Lloh10:
	ldr	x21, [x21, _POLLIN@GOTPAGEOFF]
Lloh11:
	adrp	x22, _POLLRDNORM@GOTPAGE
Lloh12:
	ldr	x22, [x22, _POLLRDNORM@GOTPAGEOFF]
Lloh13:
	adrp	x23, _POLLPRI@GOTPAGE
Lloh14:
	ldr	x23, [x23, _POLLPRI@GOTPAGEOFF]
	cbz	x8, LBB0_6
; %bb.3:
	ldr	w8, [x21]
	ldr	w9, [x22]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w8, w8, w9
Lloh15:
	adrp	x9, _POLLERR@GOTPAGE
Lloh16:
	ldr	x9, [x9, _POLLERR@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w20, w8, w9
	b	LBB0_7
LBB0_4:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_9
LBB0_5:
	mov	w20, #0
	b	LBB0_9
LBB0_6:
	mov	w20, #0
LBB0_7:
	mov	x0, x19
	bl	_dvb_ringbuffer_empty
	cbnz	w0, LBB0_9
; %bb.8:
	ldr	w8, [x21]
	ldr	w9, [x22]
	ldr	w10, [x23]
	orr	w8, w8, w20
	orr	w8, w8, w9
	orr	w20, w8, w10
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DMXDEV_STATE_GO,8,3            ; @DMXDEV_STATE_GO
	.comm	_DMXDEV_STATE_DONE,8,3          ; @DMXDEV_STATE_DONE
	.comm	_DMXDEV_STATE_TIMEDOUT,8,3      ; @DMXDEV_STATE_TIMEDOUT
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.comm	_POLLPRI,4,2                    ; @POLLPRI
	.comm	_POLLERR,4,2                    ; @POLLERR
	.no_dead_strip	_dvb_demux_poll
.subsections_via_symbols
