	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcam_vb_buf_queue
_mcam_vb_buf_queue:                     ## @mcam_vb_buf_queue
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %rdi
	callq	_vb_to_mvb
	movq	%rax, %r15
	movl	(%rbx), %edi
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	_S_BUFWAIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	16(%rbx), %rdi
	callq	_list_empty
	testl	%eax, %eax
	sete	%r12b
	jmp	LBB0_3
LBB0_1:
	xorl	%r12d, %r12d
LBB0_3:
	leaq	16(%rbx), %rsi
	movq	%r15, %rdi
	callq	_list_add
	movq	(%rbx), %rax
	movq	_S_STREAMING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.4:
	movq	_CF_SG_RESTART@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$12, %rsi
	callq	_test_bit
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_mcam_sg_restart
LBB0_6:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testb	%r12b, %r12b
	je	LBB0_7
## %bb.8:
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mcam_read_setup                ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_S_BUFWAIT,8,3                  ## @S_BUFWAIT
	.comm	_S_STREAMING,8,3                ## @S_STREAMING
	.comm	_CF_SG_RESTART,4,2              ## @CF_SG_RESTART
	.no_dead_strip	_mcam_vb_buf_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcam_vb_buf_queue
_mcam_vb_buf_queue:                     ; @mcam_vb_buf_queue
	.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, x0
	bl	_to_vb2_v4l2_buffer
	bl	_vb_to_mvb
	mov	x21, x0
	ldr	w0, [x19]
	bl	_vb2_get_drv_priv
	mov	x19, x0
	add	x20, x0, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _S_BUFWAIT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _S_BUFWAIT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	add	x0, x19, #16
	bl	_list_empty
	cmp	w0, #0
	cset	w22, eq
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
	add	x1, x19, #16
	mov	x0, x21
	bl	_list_add
	ldr	x8, [x19]
Lloh3:
	adrp	x9, _S_STREAMING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _S_STREAMING@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.4:
Lloh6:
	adrp	x8, _CF_SG_RESTART@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CF_SG_RESTART@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #12
	bl	_test_bit
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_mcam_sg_restart
LBB0_6:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	cbz	w22, LBB0_8
; %bb.7:
	mov	x0, x19
	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
	b	_mcam_read_setup
LBB0_8:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_S_BUFWAIT,8,3                  ; @S_BUFWAIT
	.comm	_S_STREAMING,8,3                ; @S_STREAMING
	.comm	_CF_SG_RESTART,4,2              ; @CF_SG_RESTART
	.no_dead_strip	_mcam_vb_buf_queue
.subsections_via_symbols
