	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function v4l2_poll
_v4l2_poll:                             ## @v4l2_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
	callq	_video_devdata
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_video_device_shadow_get
	movq	%rax, %r14
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_1
## %bb.2:
	movq	_POLLERR@GOTPCREL(%rip), %rax
	movq	_POLLHUP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	orl	(%rax), %r13d
	testq	%r14, %r14
	je	LBB0_5
## %bb.3:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.4:
	callq	_mutex_lock
LBB0_5:
	movq	%rbx, %rdi
	callq	_video_is_registered
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	(%rbx), %rax
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	*(%rax)
	movl	%eax, %r13d
LBB0_7:
	testq	%r14, %r14
	je	LBB0_10
## %bb.8:
	movq	(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_mutex_unlock
	jmp	LBB0_10
LBB0_1:
	movq	_DEFAULT_POLLMASK@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_10:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POLLERR,4,2                    ## @POLLERR
	.comm	_POLLHUP,4,2                    ## @POLLHUP
	.comm	_DEFAULT_POLLMASK,4,2           ## @DEFAULT_POLLMASK
	.no_dead_strip	_v4l2_poll
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function v4l2_poll
_v4l2_poll:                             ; @v4l2_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
	bl	_video_devdata
	mov	x22, x0
	bl	_video_device_shadow_get
	ldr	x8, [x22]
	ldr	x8, [x8]
	cbz	x8, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _POLLERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _POLLERR@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
Lloh3:
	adrp	x8, _POLLHUP@GOTPAGE
Lloh4:
	ldr	x8, [x8, _POLLHUP@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	cbz	x0, LBB0_4
; %bb.2:
	ldr	x0, [x19]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_mutex_lock
LBB0_4:
	mov	x0, x22
	bl	_video_is_registered
	cbz	x0, LBB0_7
; %bb.5:
	ldr	x8, [x22]
	ldr	x8, [x8]
	mov	x0, x21
	mov	x1, x20
	blr	x8
	mov	x20, x0
	cbnz	x19, LBB0_8
	b	LBB0_10
LBB0_6:
Lloh6:
	adrp	x8, _DEFAULT_POLLMASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEFAULT_POLLMASK@GOTPAGEOFF]
Lloh8:
	ldr	w20, [x8]
	b	LBB0_10
LBB0_7:
	orr	w20, w24, w23
	cbz	x19, LBB0_10
LBB0_8:
	ldr	x0, [x19]
	cbz	x0, LBB0_10
; %bb.9:
	bl	_mutex_unlock
LBB0_10:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_POLLERR,4,2                    ; @POLLERR
	.comm	_POLLHUP,4,2                    ; @POLLHUP
	.comm	_DEFAULT_POLLMASK,4,2           ; @DEFAULT_POLLMASK
	.no_dead_strip	_v4l2_poll
.subsections_via_symbols
