	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_dqbuf
_vidioc_dqbuf:                          ## @vidioc_dqbuf
	.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), %rax
	movq	_V4L2_MEMORY_MMAP@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_1
## %bb.3:
	movq	%rdx, %r15
	movq	%rdi, %r12
	movq	_meye@GOTPCREL(%rip), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	leaq	20(%r14), %rbx
	movq	%rbx, %rdi
	callq	_kfifo_len
	testq	%rax, %rax
	je	LBB0_4
LBB0_6:
	movl	24(%r14), %r12d
	movq	%rbx, %rdi
	callq	_kfifo_len
	xorl	%esi, %esi
	testq	%rax, %rax
	setne	%sil
	movl	%r12d, %edi
	callq	_wait_event_interruptible
	testq	%rax, %rax
	js	LBB0_7
## %bb.8:
	leaq	16(%r14), %rcx
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_kfifo_out_locked
	testl	%eax, %eax
	je	LBB0_9
## %bb.10:
	movq	8(%r14), %rax
	movl	-44(%rbp), %edx
	movslq	%edx, %rcx
	leaq	(%rcx,%rcx,2), %rcx
	movq	(%rax,%rcx,8), %rsi
	movq	_MEYE_BUF_DONE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_11
## %bb.12:
	movl	%edx, 8(%r15)
	movl	16(%rax,%rcx,8), %edx
	movl	%edx, 36(%r15)
	movq	_V4L2_BUF_FLAG_MAPPED@GOTPCREL(%rip), %rdx
	movq	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rdx), %esi
	movl	%esi, 12(%r15)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 32(%r15)
	movl	12(%rax,%rcx,8), %edi
	callq	_ns_to_timeval
	movl	%eax, 28(%r15)
	movq	8(%r14), %rax
	movslq	-44(%rbp), %rcx
	leaq	(%rcx,%rcx,2), %rdx
	movl	8(%rax,%rdx,8), %esi
	movl	%esi, 24(%r15)
	movq	(%r13), %rsi
	movq	%rsi, (%r15)
	movq	_gbufsize@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	movl	%esi, %edi
	imull	%ecx, %edi
	movl	%edi, 20(%r15)
	movl	%esi, 16(%r15)
	movq	_MEYE_BUF_UNUSED@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax,%rdx,8)
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_4:
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%r12)
	je	LBB0_6
## %bb.5:
	movq	_meye@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EAGAIN@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_7:
	movq	_meye@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EINTR@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_9:
	movq	_meye@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_11:
	movq	_meye@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	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	_meye,32,3                      ## @meye
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MEYE_BUF_DONE,8,3              ## @MEYE_BUF_DONE
	.comm	_V4L2_BUF_FLAG_MAPPED,4,2       ## @V4L2_BUF_FLAG_MAPPED
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ## @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_gbufsize,4,2                   ## @gbufsize
	.comm	_MEYE_BUF_UNUSED,8,3            ## @MEYE_BUF_UNUSED
	.no_dead_strip	_vidioc_dqbuf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_dqbuf
_vidioc_dqbuf:                          ; @vidioc_dqbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x8, [x2]
Lloh0:
	adrp	x23, _V4L2_MEMORY_MMAP@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V4L2_MEMORY_MMAP@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.1:
	mov	x19, x2
	mov	x21, x0
Lloh2:
	adrp	x20, _meye@GOTPAGE
Lloh3:
	ldr	x20, [x20, _meye@GOTPAGEOFF]
	mov	x0, x20
	bl	_mutex_lock
	add	x22, x20, #20
	mov	x0, x22
	bl	_kfifo_len
	cbz	x0, LBB0_6
LBB0_2:
	ldr	w21, [x20, #24]
	mov	x0, x22
	bl	_kfifo_len
	cmp	x0, #0
	cset	w1, ne
	mov	x0, x21
	bl	_wait_event_interruptible
	tbnz	x0, #63, LBB0_8
; %bb.3:
	add	x0, x20, #20
	add	x3, x20, #16
	add	x1, sp, #12
	mov	w2, #4
	bl	_kfifo_out_locked
	cbz	w0, LBB0_9
; %bb.4:
	ldr	x9, [x20, #8]
	ldr	w8, [sp, #12]
	mov	w10, #24
	smull	x10, w8, w10
	ldr	x10, [x9, x10]
Lloh4:
	adrp	x11, _MEYE_BUF_DONE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _MEYE_BUF_DONE@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.5:
	sxtw	x10, w8
	mov	w21, #24
	madd	x9, x10, x21, x9
Lloh7:
	adrp	x10, _V4L2_BUF_FLAG_MAPPED@GOTPAGE
Lloh8:
	ldr	x10, [x10, _V4L2_BUF_FLAG_MAPPED@GOTPAGEOFF]
Lloh9:
	adrp	x11, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGE
Lloh10:
	ldr	x11, [x11, _V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	ldr	w11, [x11]
	orr	w10, w11, w10
Lloh13:
	adrp	x11, _V4L2_FIELD_NONE@GOTPAGE
Lloh14:
	ldr	x11, [x11, _V4L2_FIELD_NONE@GOTPAGEOFF]
	stp	w8, w10, [x19, #8]
Lloh15:
	ldr	w8, [x11]
	ldp	w0, w10, [x9, #12]
	stp	w8, w10, [x19, #32]
	bl	_ns_to_timeval
	ldr	x8, [x20, #8]
	ldrsw	x9, [sp, #12]
	madd	x8, x9, x21, x8
	ldr	w10, [x8, #8]
	stp	w10, w0, [x19, #24]
	ldr	x10, [x23]
	str	x10, [x19]
Lloh16:
	adrp	x10, _gbufsize@GOTPAGE
Lloh17:
	ldr	x10, [x10, _gbufsize@GOTPAGEOFF]
Lloh18:
	ldr	w10, [x10]
	mul	w9, w10, w9
	stp	w10, w9, [x19, #16]
Lloh19:
	adrp	x9, _MEYE_BUF_UNUSED@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MEYE_BUF_UNUSED@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	str	x9, [x8]
	mov	x0, x20
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_13
LBB0_6:
	ldr	w8, [x21]
Lloh22:
	adrp	x9, _O_NONBLOCK@GOTPAGE
Lloh23:
	ldr	x9, [x9, _O_NONBLOCK@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.7:
Lloh25:
	adrp	x0, _meye@GOTPAGE
Lloh26:
	ldr	x0, [x0, _meye@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh27:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
	b	LBB0_12
LBB0_8:
Lloh29:
	adrp	x0, _meye@GOTPAGE
Lloh30:
	ldr	x0, [x0, _meye@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh31:
	adrp	x8, _EINTR@GOTPAGE
Lloh32:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
Lloh33:
	adrp	x0, _meye@GOTPAGE
Lloh34:
	ldr	x0, [x0, _meye@GOTPAGEOFF]
	bl	_mutex_unlock
Lloh35:
	adrp	x8, _EBUSY@GOTPAGE
Lloh36:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh37:
	adrp	x0, _meye@GOTPAGE
Lloh38:
	ldr	x0, [x0, _meye@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_11:
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_MEMORY_MMAP,8,3           ; @V4L2_MEMORY_MMAP
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_meye,32,3                      ; @meye
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MEYE_BUF_DONE,8,3              ; @MEYE_BUF_DONE
	.comm	_V4L2_BUF_FLAG_MAPPED,4,2       ; @V4L2_BUF_FLAG_MAPPED
	.comm	_V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC,4,2 ; @V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_gbufsize,4,2                   ; @gbufsize
	.comm	_MEYE_BUF_UNUSED,8,3            ; @MEYE_BUF_UNUSED
	.no_dead_strip	_vidioc_dqbuf
.subsections_via_symbols
