	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_jpeg_stop_streaming
_mtk_jpeg_stop_streaming:               ## @mtk_jpeg_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_vb2_get_drv_priv
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	_MTK_JPEG_SOURCE_CHANGE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_3
## %bb.1:
	movl	(%r14), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movl	(%r14), %edi
	callq	_V4L2_TYPE_IS_OUTPUT
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	_MTK_JPEG_INIT@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_2:
	movl	16(%rbx), %edi
	callq	_v4l2_m2m_next_src_buf
	movq	%rax, %rdi
	callq	_mtk_jpeg_vb2_to_srcbuf
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_mtk_jpeg_set_queue_data
	movq	_MTK_JPEG_RUNNING@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, (%rbx)
LBB0_6:
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mtk_jpeg_buf_remove
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %esi
	movq	%rax, %rdi
	callq	_v4l2_m2m_buf_done
	movl	(%r14), %esi
	movq	%rbx, %rdi
	callq	_mtk_jpeg_buf_remove
	testq	%rax, %rax
	jne	LBB0_8
LBB0_9:
	movq	8(%rbx), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pm_runtime_put_sync            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_JPEG_SOURCE_CHANGE,8,3     ## @MTK_JPEG_SOURCE_CHANGE
	.comm	_MTK_JPEG_RUNNING,8,3           ## @MTK_JPEG_RUNNING
	.comm	_MTK_JPEG_INIT,8,3              ## @MTK_JPEG_INIT
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.no_dead_strip	_mtk_jpeg_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_jpeg_stop_streaming
_mtk_jpeg_stop_streaming:               ; @mtk_jpeg_stop_streaming
	.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	_vb2_get_drv_priv
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MTK_JPEG_SOURCE_CHANGE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MTK_JPEG_SOURCE_CHANGE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	ldr	w0, [x19]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_4
LBB0_2:
	ldr	w0, [x19]
	bl	_V4L2_TYPE_IS_OUTPUT
	cbz	x0, LBB0_6
; %bb.3:
Lloh3:
	adrp	x8, _MTK_JPEG_INIT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MTK_JPEG_INIT@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x20, #16]
	bl	_v4l2_m2m_next_src_buf
	bl	_mtk_jpeg_vb2_to_srcbuf
	mov	x1, x0
	mov	x0, x20
	bl	_mtk_jpeg_set_queue_data
Lloh5:
	adrp	x8, _MTK_JPEG_RUNNING@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MTK_JPEG_RUNNING@GOTPAGEOFF]
LBB0_5:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_6:
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mtk_jpeg_buf_remove
	cbz	x0, LBB0_9
; %bb.7:
Lloh7:
	adrp	x21, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh8:
	ldr	x21, [x21, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x21]
	bl	_v4l2_m2m_buf_done
	ldr	w1, [x19]
	mov	x0, x20
	bl	_mtk_jpeg_buf_remove
	cbnz	x0, LBB0_8
LBB0_9:
	ldr	x8, [x20, #8]
	ldr	w0, [x8]
	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	_pm_runtime_put_sync
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_JPEG_SOURCE_CHANGE,8,3     ; @MTK_JPEG_SOURCE_CHANGE
	.comm	_MTK_JPEG_RUNNING,8,3           ; @MTK_JPEG_RUNNING
	.comm	_MTK_JPEG_INIT,8,3              ; @MTK_JPEG_INIT
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.no_dead_strip	_mtk_jpeg_stop_streaming
.subsections_via_symbols
