	.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, %r14
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	leaq	12(%rbx), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	20(%rbx), %edi
	callq	_video_is_registered
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	(%rbx), %rax
	movq	_STATUS_IDLE@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	callq	_hdpvr_start_streaming
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_MSG_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_hdpvr_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	16(%rbx), %rdx
	leaq	L_.str(%rip), %rcx
	callq	_v4l2_dbg
	movq	(%r13), %rax
	movq	%rax, (%rbx)
LBB0_5:
	xorl	%eax, %eax
	callq	_print_buffer_status
LBB0_6:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	%rbx, %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:
	leaq	8(%rbx), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	callq	_poll_wait
	movq	%rbx, %rdi
	callq	_hdpvr_get_next_buffer
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	je	LBB0_11
## %bb.9:
	movq	(%rcx), %rcx
	movq	_BUFSTAT_READY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
LBB0_10:
	movq	_POLLIN@GOTPCREL(%rip), %rcx
	movq	_POLLRDNORM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	jmp	LBB0_11
LBB0_1:
	movq	%r12, %rdi
	callq	_mutex_unlock
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.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
	.comm	_POLLIN,4,2                     ## @POLLIN
	.comm	_POLLRDNORM,4,2                 ## @POLLRDNORM
	.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	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	x8, [x0]
	ldr	x19, [x8]
	add	x22, x19, #12
	mov	x0, x22
	bl	_mutex_lock
	ldr	w0, [x19, #20]
	bl	_video_is_registered
	cbz	w0, LBB0_10
; %bb.1:
	ldr	x8, [x19]
Lloh0:
	adrp	x23, _STATUS_IDLE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _STATUS_IDLE@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_hdpvr_start_streaming
	cbz	x0, LBB0_4
; %bb.3:
Lloh2:
	adrp	x8, _MSG_BUFFER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_BUFFER@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _hdpvr_debug@GOTPAGE
Lloh6:
	ldr	x8, [x8, _hdpvr_debug@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, x19, #16
Lloh8:
	adrp	x3, l_.str@PAGE
Lloh9:
	add	x3, x3, l_.str@PAGEOFF
	bl	_v4l2_dbg
	ldr	x8, [x23]
	str	x8, [x19]
LBB0_4:
	bl	_print_buffer_status
LBB0_5:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	bl	_hdpvr_get_next_buffer
Lloh10:
	adrp	x22, _BUFSTAT_READY@GOTPAGE
Lloh11:
	ldr	x22, [x22, _BUFSTAT_READY@GOTPAGEOFF]
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.eq	LBB0_9
LBB0_7:
	add	x1, x19, #8
	mov	x0, x21
	mov	x2, x20
	bl	_poll_wait
	mov	x0, x19
	bl	_hdpvr_get_next_buffer
	cbz	x0, LBB0_12
; %bb.8:
	ldr	x8, [x0]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_11
LBB0_9:
Lloh12:
	adrp	x8, _POLLIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POLLIN@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _POLLRDNORM@GOTPAGE
Lloh16:
	ldr	x9, [x9, _POLLRDNORM@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w0, w9, w8
	b	LBB0_12
LBB0_10:
	mov	x0, x22
	bl	_mutex_unlock
Lloh18:
	adrp	x8, _EIO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_11:
	mov	w0, #0
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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.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
	.comm	_POLLIN,4,2                     ; @POLLIN
	.comm	_POLLRDNORM,4,2                 ; @POLLRDNORM
	.no_dead_strip	_hdpvr_poll
.subsections_via_symbols
