	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meyeioc_qbuf_capt
_meyeioc_qbuf_capt:                     ## @meyeioc_qbuf_capt
	.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	_meye@GOTPCREL(%rip), %rbx
	cmpl	$0, 32(%rbx)
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r14
	movl	(%rdi), %eax
	movq	_gbuffers@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jge	LBB0_1
## %bb.4:
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movq	24(%rbx), %rcx
	movq	(%rcx,%rax,8), %rax
	movq	_MEYE_BUF_UNUSED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.8:
	leaq	8(%rbx), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rax
	movq	_MCHIP_HIC_MODE_CONT_COMP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	xorl	%eax, %eax
	callq	_mchip_cont_compression_start
LBB0_10:
	movq	_MEYE_BUF_USING@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbx), %rcx
	movslq	(%r14), %rdx
	movq	%rax, (%rcx,%rdx,8)
	leaq	16(%rbx), %rdi
	addq	$12, %rbx
	movq	%r14, %rsi
	movl	$4, %edx
	movq	%rbx, %rcx
	callq	_kfifo_in_locked
	movq	%r15, %rdi
	callq	_mutex_unlock
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_mchip_hic_stop
	jmp	LBB0_11
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_meye,40,3                      ## @meye
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_gbuffers,4,2                   ## @gbuffers
	.comm	_MEYE_BUF_UNUSED,8,3            ## @MEYE_BUF_UNUSED
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MCHIP_HIC_MODE_CONT_COMP,8,3   ## @MCHIP_HIC_MODE_CONT_COMP
	.comm	_MEYE_BUF_USING,8,3             ## @MEYE_BUF_USING
	.no_dead_strip	_meyeioc_qbuf_capt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function meyeioc_qbuf_capt
_meyeioc_qbuf_capt:                     ; @meyeioc_qbuf_capt
	.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
Lloh0:
	adrp	x21, _meye@GOTPAGE
Lloh1:
	ldr	x21, [x21, _meye@GOTPAGEOFF]
	ldr	w8, [x21, #32]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
Lloh2:
	adrp	x9, _gbuffers@GOTPAGE
Lloh3:
	ldr	x9, [x9, _gbuffers@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_7
; %bb.2:
	tbnz	w8, #31, LBB0_9
; %bb.3:
	ldr	x9, [x21, #24]
	ldr	x8, [x9, x8, lsl #3]
Lloh5:
	adrp	x9, _MEYE_BUF_UNUSED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _MEYE_BUF_UNUSED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.4:
	add	x20, x21, #8
	mov	x0, x20
	bl	_mutex_lock
	ldr	x8, [x21]
Lloh8:
	adrp	x9, _MCHIP_HIC_MODE_CONT_COMP@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MCHIP_HIC_MODE_CONT_COMP@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_6
; %bb.5:
	bl	_mchip_cont_compression_start
LBB0_6:
Lloh11:
	adrp	x8, _MEYE_BUF_USING@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MEYE_BUF_USING@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x21, #24]
	ldrsw	x10, [x19]
	str	x8, [x9, x10, lsl #3]
	add	x0, x21, #16
	add	x3, x21, #12
	mov	x1, x19
	mov	w2, #4
	bl	_kfifo_in_locked
	mov	x0, x20
	bl	_mutex_unlock
	b	LBB0_10
LBB0_7:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_11
LBB0_9:
	bl	_mchip_hic_stop
LBB0_10:
	mov	w0, #0
LBB0_11:
	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
LBB0_12:
Lloh16:
	adrp	x8, _EBUSY@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_meye,40,3                      ; @meye
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_gbuffers,4,2                   ; @gbuffers
	.comm	_MEYE_BUF_UNUSED,8,3            ; @MEYE_BUF_UNUSED
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MCHIP_HIC_MODE_CONT_COMP,8,3   ; @MCHIP_HIC_MODE_CONT_COMP
	.comm	_MEYE_BUF_USING,8,3             ; @MEYE_BUF_USING
	.no_dead_strip	_meyeioc_qbuf_capt
.subsections_via_symbols
