	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_qbuf
_vidioc_qbuf:                           ## @vidioc_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %rbx
	movq	(%r14), %rax
	cmpq	(%rbx), %rax
	jae	LBB0_1
## %bb.3:
	movq	16(%rbx), %rcx
	shlq	$5, %rax
	movq	(%rcx,%rax), %rdx
	movq	_frame_state_unused@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_4
## %bb.5:
	leaq	(%rcx,%rax), %rdx
	movq	_frame_state_ready@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movq	%rsi, (%rdx)
	movq	_scan_state_scanning@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 24(%rcx,%rax)
	movq	$0, 16(%rcx,%rax)
	movq	_V4L2_BUF_FLAG_DONE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	%edx, 8(%r14)
	movl	24(%rbx), %edx
	movl	%edx, 12(%rcx,%rax)
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %rax
	movq	(%r14), %rcx
	shlq	$5, %rcx
	leaq	(%rax,%rcx), %rdi
	addq	$8, %rdi
	addq	$12, %rbx
	movq	%rbx, %rsi
	callq	_list_add_tail
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_4:
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_frame_state_unused,8,3         ## @frame_state_unused
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_frame_state_ready,8,3          ## @frame_state_ready
	.comm	_scan_state_scanning,4,2        ## @scan_state_scanning
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ## @V4L2_BUF_FLAG_DONE
	.no_dead_strip	_vidioc_qbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_qbuf
_vidioc_qbuf:                           ; @vidioc_qbuf
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x2
	bl	_video_drvdata
	ldr	x8, [x19]
	ldr	x9, [x0]
	cmp	x8, x9
	b.hs	LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x9, [x0, #16]
	add	x8, x9, x8, lsl #5
	ldr	x9, [x8]
Lloh0:
	adrp	x10, _frame_state_unused@GOTPAGE
Lloh1:
	ldr	x10, [x10, _frame_state_unused@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
Lloh3:
	adrp	x9, _frame_state_ready@GOTPAGE
Lloh4:
	ldr	x9, [x9, _frame_state_ready@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	str	x9, [x8]
Lloh6:
	adrp	x9, _scan_state_scanning@GOTPAGE
Lloh7:
	ldr	x9, [x9, _scan_state_scanning@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	str	w9, [x8, #24]
	str	xzr, [x8, #16]
Lloh9:
	adrp	x9, _V4L2_BUF_FLAG_DONE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_BUF_FLAG_DONE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	ldr	w10, [x19, #8]
	bic	w9, w10, w9
	str	w9, [x19, #8]
	ldr	w9, [x20, #24]
	str	w9, [x8, #12]
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #16]
	ldr	x9, [x19]
	add	x8, x8, x9, lsl #5
	add	x0, x8, #8
	add	x1, x20, #12
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	w0, #0
	b	LBB0_6
LBB0_3:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh14:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_frame_state_unused,8,3         ; @frame_state_unused
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_frame_state_ready,8,3          ; @frame_state_ready
	.comm	_scan_state_scanning,4,2        ; @scan_state_scanning
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ; @V4L2_BUF_FLAG_DONE
	.no_dead_strip	_vidioc_qbuf
.subsections_via_symbols
