	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_v4l2_dec_poll             ## -- Begin function ivtv_v4l2_dec_poll
	.p2align	4, 0x90
_ivtv_v4l2_dec_poll:                    ## @ivtv_v4l2_dec_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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r12
	movl	(%rdi), %edi
	callq	_fh2id
	movq	%rax, %rbx
	movq	(%rax), %r13
	movq	16(%rax), %r15
	movq	8(%r15), %r14
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_HI_FILE
	leaq	12(%rbx), %rdi
	callq	_list_empty
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	%r13, %rax
	shlq	$4, %rax
	leaq	(%r14,%rax), %rsi
	addq	$8, %rsi
	movq	%r12, %rdi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_poll_wait
	movq	_IVTV_F_I_EV_VSYNC_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_set_bit
	movq	_IVTV_F_I_EV_VSYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.4:
	movq	_IVTV_F_I_EV_DEC_STOPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_test_bit
	testq	%rax, %rax
	jne	LBB0_2
## %bb.5:
	xorl	%ecx, %ecx
	jmp	LBB0_6
LBB0_1:
	addq	$8, %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_poll_wait
	movq	_IVTV_F_I_EV_VSYNC_ENABLED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_clear_bit
	movq	%rbx, %rdi
	callq	_v4l2_event_pending
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_6
LBB0_2:
	movq	_EPOLLPRI@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
LBB0_6:
	movq	_EPOLLOUT@GOTPCREL(%rip), %rax
	movq	_EPOLLWRNORM@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rax), %edx
	shlq	$4, %r13
	xorl	%eax, %eax
	cmpq	$0, (%r14,%r13)
	cmovnel	%edx, %eax
	orl	%ecx, %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	"Decoder poll\n"

	.comm	_IVTV_F_I_EV_VSYNC_ENABLED,4,2  ## @IVTV_F_I_EV_VSYNC_ENABLED
	.comm	_EPOLLPRI,4,2                   ## @EPOLLPRI
	.comm	_IVTV_F_I_EV_VSYNC,4,2          ## @IVTV_F_I_EV_VSYNC
	.comm	_IVTV_F_I_EV_DEC_STOPPED,4,2    ## @IVTV_F_I_EV_DEC_STOPPED
	.comm	_EPOLLOUT,4,2                   ## @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ## @EPOLLWRNORM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_v4l2_dec_poll             ; -- Begin function ivtv_v4l2_dec_poll
	.p2align	2
_ivtv_v4l2_dec_poll:                    ; @ivtv_v4l2_dec_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	x20, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_fh2id
	mov	x22, x0
	ldr	x19, [x0, #16]
	ldr	x23, [x19, #8]
	ldr	x24, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_HI_FILE
	add	x0, x22, #12
	bl	_list_empty
	cbz	w0, LBB0_4
; %bb.1:
	add	x8, x23, x24, lsl #4
	add	x1, x8, #8
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
Lloh2:
	adrp	x8, _IVTV_F_I_EV_VSYNC_ENABLED@GOTPAGE
Lloh3:
	ldr	x8, [x8, _IVTV_F_I_EV_VSYNC_ENABLED@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_set_bit
Lloh5:
	adrp	x8, _IVTV_F_I_EV_VSYNC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _IVTV_F_I_EV_VSYNC@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbnz	x0, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _IVTV_F_I_EV_DEC_STOPPED@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IVTV_F_I_EV_DEC_STOPPED@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_test_bit
	cbz	x0, LBB0_5
LBB0_3:
Lloh11:
	adrp	x8, _EPOLLPRI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EPOLLPRI@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	b	LBB0_6
LBB0_4:
	add	x22, x22, #8
	mov	x0, x21
	mov	x1, x22
	mov	x2, x20
	bl	_poll_wait
Lloh14:
	adrp	x8, _IVTV_F_I_EV_VSYNC_ENABLED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _IVTV_F_I_EV_VSYNC_ENABLED@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_clear_bit
	mov	x0, x22
	bl	_v4l2_event_pending
Lloh17:
	adrp	x8, _EPOLLPRI@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EPOLLPRI@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w8, wzr, w8, eq
	b	LBB0_6
LBB0_5:
	mov	w8, #0
LBB0_6:
	lsl	x9, x24, #4
	ldr	x9, [x23, x9]
Lloh20:
	adrp	x10, _EPOLLOUT@GOTPAGE
Lloh21:
	ldr	x10, [x10, _EPOLLOUT@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
Lloh23:
	adrp	x11, _EPOLLWRNORM@GOTPAGE
Lloh24:
	ldr	x11, [x11, _EPOLLWRNORM@GOTPAGEOFF]
Lloh25:
	ldr	w11, [x11]
	orr	w10, w11, w10
	cmp	x9, #0
	csel	w9, wzr, w10, eq
	orr	w0, w9, w8
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Decoder poll\n"

	.comm	_IVTV_F_I_EV_VSYNC_ENABLED,4,2  ; @IVTV_F_I_EV_VSYNC_ENABLED
	.comm	_EPOLLPRI,4,2                   ; @EPOLLPRI
	.comm	_IVTV_F_I_EV_VSYNC,4,2          ; @IVTV_F_I_EV_VSYNC
	.comm	_IVTV_F_I_EV_DEC_STOPPED,4,2    ; @IVTV_F_I_EV_DEC_STOPPED
	.comm	_EPOLLOUT,4,2                   ; @EPOLLOUT
	.comm	_EPOLLWRNORM,4,2                ; @EPOLLWRNORM
.subsections_via_symbols
