	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_poll                     ## -- Begin function cpia2_poll
	.p2align	4, 0x90
_cpia2_poll:                            ## @cpia2_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	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	movq	%rdx, %rsi
	callq	_v4l2_ctrl_poll
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_poll_requested_events
	movq	_EPOLLIN@GOTPCREL(%rip), %rdx
	movq	_EPOLLRDNORM@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.1:
	cmpl	$0, 16(%rbx)
	jne	LBB0_3
## %bb.2:
	movl	12(%rbx), %esi
	movq	%rbx, %rdi
	callq	_cpia2_usb_stream_start
LBB0_3:
	leaq	8(%rbx), %rsi
	movq	%r12, %rdi
	movq	%r15, %rdx
	callq	_poll_wait
	movq	(%rbx), %rax
	movq	(%rax), %rcx
	movl	(%r13), %edx
	movq	_EPOLLIN@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_FRAME_READY@GOTPCREL(%rip), %rsi
	xorl	%eax, %eax
	cmpq	(%rsi), %rcx
	cmovel	%edx, %eax
	orl	%r14d, %eax
	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	_FRAME_READY,8,3                ## @FRAME_READY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cpia2_poll                     ; -- Begin function cpia2_poll
	.p2align	2
_cpia2_poll:                            ; @cpia2_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	x21, x2
	mov	x22, x1
	mov	x20, x0
	mov	x0, x1
	mov	x1, x2
	bl	_v4l2_ctrl_poll
	mov	x19, x0
	mov	x0, x21
	bl	_poll_requested_events
Lloh0:
	adrp	x23, _EPOLLIN@GOTPAGE
Lloh1:
	ldr	x23, [x23, _EPOLLIN@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x24, _EPOLLRDNORM@GOTPAGE
Lloh3:
	ldr	x24, [x24, _EPOLLRDNORM@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w8, w9, w8
	tst	w8, w0
	b.eq	LBB0_3
; %bb.1:
	ldr	w8, [x20, #16]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w1, [x20, #12]
	mov	x0, x20
	bl	_cpia2_usb_stream_start
LBB0_3:
	add	x1, x20, #8
	mov	x0, x22
	mov	x2, x21
	bl	_poll_wait
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh4:
	adrp	x9, _FRAME_READY@GOTPAGE
Lloh5:
	ldr	x9, [x9, _FRAME_READY@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	ldr	w10, [x23]
	ldr	w11, [x24]
	orr	w10, w11, w10
	cmp	x8, x9
	csel	w8, w10, wzr, eq
	orr	w0, w8, w19
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EPOLLIN,4,2                    ; @EPOLLIN
	.comm	_EPOLLRDNORM,4,2                ; @EPOLLRDNORM
	.comm	_FRAME_READY,8,3                ; @FRAME_READY
.subsections_via_symbols
