	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpia2_qbuf
_cpia2_qbuf:                            ## @cpia2_qbuf
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movq	8(%rbx), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.2:
	movq	16(%rbx), %rsi
	cmpq	(%r14), %rsi
	jae	LBB0_3
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_DBG
	movq	8(%r14), %rcx
	movq	16(%rbx), %rdx
	movq	(%rcx,%rdx,8), %rsi
	movq	_FRAME_READY@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	cmpq	(%rdi), %rsi
	jne	LBB0_6
## %bb.5:
	movq	_FRAME_EMPTY@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, (%rcx,%rdx,8)
	jmp	LBB0_6
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QBUF #%d\n"

	.comm	_FRAME_READY,8,3                ## @FRAME_READY
	.comm	_FRAME_EMPTY,8,3                ## @FRAME_EMPTY
	.no_dead_strip	_cpia2_qbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpia2_qbuf
_cpia2_qbuf:                            ; @cpia2_qbuf
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	bl	_video_drvdata
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	ldr	x8, [x19, #8]
Lloh3:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.2:
	mov	x20, x0
	ldr	x1, [x19, #16]
	ldr	x8, [x0]
	cmp	x1, x8
	b.hs	LBB0_5
; %bb.3:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DBG
	ldr	x8, [x20, #8]
	ldr	x9, [x19, #16]
	ldr	x10, [x8, x9, lsl #3]
Lloh8:
	adrp	x11, _FRAME_READY@GOTPAGE
Lloh9:
	ldr	x11, [x11, _FRAME_READY@GOTPAGEOFF]
Lloh10:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_7
; %bb.4:
	mov	w0, #0
Lloh11:
	adrp	x10, _FRAME_EMPTY@GOTPAGE
Lloh12:
	ldr	x10, [x10, _FRAME_EMPTY@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	x10, [x8, x9, lsl #3]
	b	LBB0_6
LBB0_5:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	w0, #0
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QBUF #%d\n"

	.comm	_FRAME_READY,8,3                ; @FRAME_READY
	.comm	_FRAME_EMPTY,8,3                ; @FRAME_EMPTY
	.no_dead_strip	_cpia2_qbuf
.subsections_via_symbols
