	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hdpvr_poll
_hdpvr_poll:                            ## @hdpvr_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, %r15
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_poll_requested_events
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_v4l2_ctrl_poll
	movq	_EPOLLIN@GOTPCREL(%rip), %rdx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rdx), %ecx
	testl	%ebx, %ecx
	je	LBB0_13
## %bb.1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	12(%r14), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	(%r14), %rax
	movq	_STATUS_IDLE@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_6
## %bb.2:
	movq	%r14, %rdi
	callq	_hdpvr_start_streaming
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MSG_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	20(%r14), %rdx
	leaq	L_.str(%rip), %rcx
	callq	_v4l2_dbg
	movq	(%rbx), %rax
	movq	%rax, (%r14)
	jmp	LBB0_5
LBB0_4:
	movl	(%r12), %eax
	movl	%eax, 16(%r14)
LBB0_5:
	xorl	%eax, %eax
	callq	_print_buffer_status
LBB0_6:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_hdpvr_get_next_buffer
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	(%rax), %rax
	movq	_BUFSTAT_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
LBB0_8:
	movq	%r14, %rsi
	addq	$8, %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_poll_wait
	movq	%r14, %rdi
	callq	_hdpvr_get_next_buffer
	testq	%rax, %rax
	je	LBB0_12
## %bb.9:
	movq	(%rax), %rax
	movq	_BUFSTAT_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
LBB0_10:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	_EPOLLIN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	jmp	LBB0_13
LBB0_12:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EPOLLIN,4,2                    ## @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ## @EPOLLRDNORM
	.comm	_STATUS_IDLE,8,3                ## @STATUS_IDLE
	.comm	_MSG_BUFFER,4,2                 ## @MSG_BUFFER
	.comm	_hdpvr_debug,4,2                ## @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"start_streaming failed\n"

	.comm	_BUFSTAT_READY,8,3              ## @BUFSTAT_READY
	.no_dead_strip	_hdpvr_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hdpvr_poll
_hdpvr_poll:                            ; @hdpvr_poll
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x1
	mov	x21, x0
	mov	x0, x1
	bl	_poll_requested_events
	mov	x23, x0
	mov	x0, x21
	bl	_video_drvdata
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	bl	_v4l2_ctrl_poll
	mov	x19, x0
Lloh0:
	adrp	x24, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EPOLLIN@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _EPOLLRDNORM@GOTPAGE
Lloh3:
	ldr	x25, [x25, _EPOLLRDNORM@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w8, w9, w8
	tst	w8, w23
	b.eq	LBB0_11
; %bb.1:
	add	x23, x22, #12
	mov	x0, x23
	bl	_mutex_lock
	ldr	x8, [x22]
Lloh4:
	adrp	x26, _STATUS_IDLE@GOTPAGE
Lloh5:
	ldr	x26, [x26, _STATUS_IDLE@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.2:
	mov	x0, x22
	bl	_hdpvr_start_streaming
	cbz	x0, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _MSG_BUFFER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MSG_BUFFER@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, _hdpvr_debug@GOTPAGE
Lloh10:
	ldr	x8, [x8, _hdpvr_debug@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	add	x2, x22, #20
Lloh12:
	adrp	x3, l_.str@PAGE
Lloh13:
	add	x3, x3, l_.str@PAGEOFF
	bl	_v4l2_dbg
	ldr	x8, [x26]
	str	x8, [x22]
	b	LBB0_5
LBB0_4:
	ldr	w8, [x21]
	str	w8, [x22, #16]
LBB0_5:
	bl	_print_buffer_status
LBB0_6:
	mov	x0, x23
	bl	_mutex_unlock
	mov	x0, x22
	bl	_hdpvr_get_next_buffer
Lloh14:
	adrp	x23, _BUFSTAT_READY@GOTPAGE
Lloh15:
	ldr	x23, [x23, _BUFSTAT_READY@GOTPAGEOFF]
	cbz	x0, LBB0_8
; %bb.7:
	ldr	x8, [x0]
	ldr	x9, [x23]
	cmp	x8, x9
	b.eq	LBB0_10
LBB0_8:
	add	x1, x22, #8
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	mov	x0, x22
	bl	_hdpvr_get_next_buffer
	cbz	x0, LBB0_11
; %bb.9:
	ldr	x8, [x0]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_10:
	ldr	w8, [x24]
	ldr	w9, [x25]
	orr	w8, w8, w19
	orr	w19, w8, w9
LBB0_11:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_STATUS_IDLE,8,3                ; @STATUS_IDLE
	.comm	_MSG_BUFFER,4,2                 ; @MSG_BUFFER
	.comm	_hdpvr_debug,4,2                ; @hdpvr_debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"start_streaming failed\n"

	.comm	_BUFSTAT_READY,8,3              ; @BUFSTAT_READY
	.no_dead_strip	_hdpvr_poll
.subsections_via_symbols
