	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function stk_vidioc_qbuf
_stk_vidioc_qbuf:                       ## @stk_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	%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, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	movq	(%r14), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	8(%r14), %r13
	cmpq	(%r15), %r13
	jge	LBB0_1
## %bb.3:
	movq	16(%r15), %r12
	shlq	$5, %r13
	movl	16(%r12,%r13), %ecx
	movq	_V4L2_BUF_FLAG_QUEUED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%ecx, %eax
	jne	LBB0_5
## %bb.4:
	leaq	(%r12,%r13), %rdx
	addq	$16, %rdx
	orl	%ecx, %eax
	movl	%eax, (%rdx)
	movq	_V4L2_BUF_FLAG_DONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, (%rdx)
	leaq	8(%r15), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_irqsave
	leaq	(%r12,%r13), %rdi
	addq	$24, %rdi
	addq	$12, %r15
	movq	%r15, %rsi
	callq	_list_add_tail
	movups	(%r12,%r13), %xmm0
	movups	%xmm0, (%r14)
	movq	16(%r12,%r13), %rax
	movq	%rax, 16(%r14)
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irqrestore
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ## @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ## @V4L2_BUF_FLAG_QUEUED
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ## @V4L2_BUF_FLAG_DONE
	.no_dead_strip	_stk_vidioc_qbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function stk_vidioc_qbuf
_stk_vidioc_qbuf:                       ; @stk_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]
Lloh0:
	adrp	x9, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x9, [x0]
	cmp	x8, x9
	b.ge	LBB0_5
; %bb.2:
	ldr	x9, [x20, #16]
	add	x22, x9, x8, lsl #5
	mov	x8, x22
	ldr	w9, [x8, #16]!
Lloh3:
	adrp	x10, _V4L2_BUF_FLAG_QUEUED@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_BUF_FLAG_QUEUED@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w9
	b.ne	LBB0_4
; %bb.3:
	orr	w9, w10, w9
	str	w9, [x8]
Lloh6:
	adrp	x10, _V4L2_BUF_FLAG_DONE@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_BUF_FLAG_DONE@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	bic	w9, w9, w10
	str	w9, [x8]
	add	x21, x20, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	add	x0, x22, #24
	add	x1, x20, #12
	bl	_list_add_tail
	ldr	x8, [x22, #16]
	ldr	q0, [x22]
	str	q0, [x19]
	str	x8, [x19, #16]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
LBB0_4:
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ; @V4L2_BUF_FLAG_QUEUED
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ; @V4L2_BUF_FLAG_DONE
	.no_dead_strip	_stk_vidioc_qbuf
.subsections_via_symbols
