	.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), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %rbx
	movq	8(%rdx), %rax
	movq	_gbuffers@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_1
## %bb.3:
	movq	_meye@GOTPCREL(%rip), %r14
	movq	16(%r14), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_MEYE_BUF_UNUSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.4:
	leaq	8(%rbx), %r15
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_V4L2_BUF_FLAG_QUEUED@GOTPCREL(%rip), %rax
	movl	16(%rbx), %ecx
	orl	(%rax), %ecx
	movq	_V4L2_BUF_FLAG_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%ecx, %eax
	movl	%eax, 16(%rbx)
	movq	_MEYE_BUF_USING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	16(%r14), %rcx
	movq	8(%rbx), %rdx
	movq	%rax, (%rcx,%rdx,8)
	leaq	8(%r14), %rdi
	leaq	4(%r14), %rcx
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_kfifo_in_locked
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	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	_gbuffers,8,3                   ## @gbuffers
	.comm	_meye,24,3                      ## @meye
	.comm	_MEYE_BUF_UNUSED,8,3            ## @MEYE_BUF_UNUSED
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ## @V4L2_BUF_FLAG_QUEUED
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ## @V4L2_BUF_FLAG_DONE
	.comm	_MEYE_BUF_USING,8,3             ## @MEYE_BUF_USING
	.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
	ldr	x8, [x2]
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_4
; %bb.1:
	mov	x19, x2
	mov	x20, x2
	ldr	x8, [x20, #8]!
Lloh3:
	adrp	x9, _gbuffers@GOTPAGE
Lloh4:
	ldr	x9, [x9, _gbuffers@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_4
; %bb.2:
Lloh6:
	adrp	x21, _meye@GOTPAGE
Lloh7:
	ldr	x21, [x21, _meye@GOTPAGEOFF]
	ldr	x9, [x21, #16]
	ldr	x8, [x9, x8, lsl #3]
Lloh8:
	adrp	x9, _MEYE_BUF_UNUSED@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MEYE_BUF_UNUSED@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x21
	bl	_mutex_lock
Lloh11:
	adrp	x8, _V4L2_BUF_FLAG_QUEUED@GOTPAGE
Lloh12:
	ldr	x8, [x8, _V4L2_BUF_FLAG_QUEUED@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x19, #16]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _V4L2_BUF_FLAG_DONE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_BUF_FLAG_DONE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	bic	w8, w8, w9
Lloh17:
	adrp	x9, _MEYE_BUF_USING@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MEYE_BUF_USING@GOTPAGEOFF]
	str	w8, [x19, #16]
Lloh19:
	ldr	x8, [x9]
	ldr	x9, [x21, #16]
	ldr	x10, [x19, #8]
	str	x8, [x9, x10, lsl #3]
	add	x0, x21, #8
	add	x3, x21, #4
	mov	x1, x20
	mov	w2, #4
	bl	_kfifo_in_locked
	mov	x0, x21
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_5
LBB0_4:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	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	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_gbuffers,8,3                   ; @gbuffers
	.comm	_meye,24,3                      ; @meye
	.comm	_MEYE_BUF_UNUSED,8,3            ; @MEYE_BUF_UNUSED
	.comm	_V4L2_BUF_FLAG_QUEUED,4,2       ; @V4L2_BUF_FLAG_QUEUED
	.comm	_V4L2_BUF_FLAG_DONE,4,2         ; @V4L2_BUF_FLAG_DONE
	.comm	_MEYE_BUF_USING,8,3             ; @MEYE_BUF_USING
	.no_dead_strip	_vidioc_qbuf
.subsections_via_symbols
