	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mcam_vb_stop_streaming
_mcam_vb_stop_streaming:                ## @mcam_vb_stop_streaming
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movl	16(%rax), %edx
	movl	8(%rax), %r8d
	movl	12(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_cam_dbg
	movq	(%rbx), %rax
	movq	_S_BUFWAIT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_S_IDLE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	jmp	LBB0_3
LBB0_2:
	movq	_S_STREAMING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_mcam_ctlr_stop_dma
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_mcam_vb_requeue_bufs           ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"stop_streaming: %d frames, %d singles, %d delivered\n"

	.comm	_S_BUFWAIT,8,3                  ## @S_BUFWAIT
	.comm	_S_IDLE,8,3                     ## @S_IDLE
	.comm	_S_STREAMING,8,3                ## @S_STREAMING
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.no_dead_strip	_mcam_vb_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mcam_vb_stop_streaming
_mcam_vb_stop_streaming:                ; @mcam_vb_stop_streaming
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	bl	_vb2_get_drv_priv
	mov	x20, x0
	ldp	w3, w2, [x0, #12]
	ldr	w4, [x0, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_cam_dbg
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _S_BUFWAIT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _S_BUFWAIT@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _S_IDLE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _S_IDLE@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x20]
	b	LBB0_4
LBB0_2:
Lloh8:
	adrp	x9, _S_STREAMING@GOTPAGE
Lloh9:
	ldr	x9, [x9, _S_STREAMING@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_mcam_ctlr_stop_dma
Lloh11:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_mcam_vb_requeue_bufs
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"stop_streaming: %d frames, %d singles, %d delivered\n"

	.comm	_S_BUFWAIT,8,3                  ; @S_BUFWAIT
	.comm	_S_IDLE,8,3                     ; @S_IDLE
	.comm	_S_STREAMING,8,3                ; @S_STREAMING
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.no_dead_strip	_mcam_vb_stop_streaming
.subsections_via_symbols
