	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_stop_streaming
_s5p_mfc_stop_streaming:                ## @s5p_mfc_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	%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	%rdi, %r12
	movl	8(%rdi), %edi
	callq	_fh_to_ctx
	movq	%rax, %r13
	movq	64(%rax), %r15
	leaq	8(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r13), %rax
	movq	_MFCINST_FINISHING@GOTPCREL(%rip), %rcx
	movq	_MFCINST_RUNNING@GOTPCREL(%rip), %rbx
	movb	$1, %dl
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	cmpq	(%rbx), %rax
	jne	LBB0_5
LBB0_2:
	movq	(%r15), %rax
	cmpq	8(%r13), %rax
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 16(%r15)
	je	LBB0_5
## %bb.4:
	movq	_MFCINST_ABORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_s5p_mfc_wait_for_done_ctx
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	xorl	%edx, %edx
LBB0_5:
	movq	(%r12), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.6:
	movq	%rbx, %r12
	leaq	56(%r13), %rbx
	movq	%r13, %rsi
	addq	$60, %rsi
	movq	%rbx, %rdi
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	callq	_s5p_mfc_cleanup_queue
	movq	%rbx, %rdi
	movq	%r12, %rbx
	callq	_INIT_LIST_HEAD
	movl	$1, 16(%r13)
	xorps	%xmm0, %xmm0
	movups	%xmm0, 40(%r13)
	movq	%r15, %rdi
	callq	_IS_MFCV6_PLUS
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	movq	(%r13), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_13
## %bb.8:
	movq	_MFCINST_FLUSH@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%r13, %rdi
	callq	_set_work_bit_irqsave
	movl	12(%r15), %edi
	movq	_try_run@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_s5p_mfc_hw_call
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	movq	_S5P_MFC_R2H_CMD_DPB_FLUSH_RET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	xorl	%edx, %edx
	callq	_s5p_mfc_wait_for_done_ctx
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	callq	_mfc_err
LBB0_10:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jmp	LBB0_13
LBB0_11:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.12:
	movq	%rbx, %r15
	leaq	32(%r13), %rbx
	movq	%r13, %rsi
	addq	$36, %rsi
	movq	%rbx, %rdi
	movl	%edx, %r12d
	callq	_s5p_mfc_cleanup_queue
	movq	%rbx, %rdi
	movq	%r15, %rbx
	callq	_INIT_LIST_HEAD
	movl	%r12d, %edx
	movq	$0, 24(%r13)
LBB0_13:
	testb	%dl, %dl
	jne	LBB0_15
## %bb.14:
	movq	(%rbx), %rax
	movq	%rax, (%r13)
LBB0_15:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MFCINST_FINISHING,8,3          ## @MFCINST_FINISHING
	.comm	_MFCINST_RUNNING,8,3            ## @MFCINST_RUNNING
	.comm	_MFCINST_ABORT,8,3              ## @MFCINST_ABORT
	.comm	_S5P_MFC_R2H_CMD_FRAME_DONE_RET,4,2 ## @S5P_MFC_R2H_CMD_FRAME_DONE_RET
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFCINST_FLUSH,8,3              ## @MFCINST_FLUSH
	.comm	_try_run,4,2                    ## @try_run
	.comm	_S5P_MFC_R2H_CMD_DPB_FLUSH_RET,4,2 ## @S5P_MFC_R2H_CMD_DPB_FLUSH_RET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Err flushing buffers\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_s5p_mfc_stop_streaming
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_stop_streaming
_s5p_mfc_stop_streaming:                ; @s5p_mfc_stop_streaming
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x0
	ldr	w0, [x0, #8]
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x21, [x0, #64]
	add	x20, x21, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _MFCINST_FINISHING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFCINST_FINISHING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x23, _MFCINST_RUNNING@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MFCINST_RUNNING@GOTPAGEOFF]
	ldr	x10, [x23]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_4
; %bb.1:
	ldr	x8, [x21]
	ldr	x9, [x19, #8]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_4
; %bb.3:
Lloh5:
	adrp	x8, _MFCINST_ABORT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MFCINST_ABORT@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh8:
	adrp	x8, _S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_s5p_mfc_wait_for_done_ctx
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	w24, #0
	b	LBB0_5
LBB0_4:
	mov	w24, #1
LBB0_5:
	ldr	x8, [x22]
Lloh11:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.6:
	add	x22, x19, #56
	add	x1, x19, #60
	mov	x0, x22
	bl	_s5p_mfc_cleanup_queue
	mov	x0, x22
	bl	_INIT_LIST_HEAD
	mov	w8, #1
	str	w8, [x19, #16]
	stp	xzr, xzr, [x19, #40]
	mov	x0, x21
	bl	_IS_MFCV6_PLUS
	cbz	x0, LBB0_13
; %bb.7:
	ldr	x8, [x19]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.8:
Lloh14:
	adrp	x8, _MFCINST_FLUSH@GOTPAGE
Lloh15:
	ldr	x8, [x8, _MFCINST_FLUSH@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	bl	_set_work_bit_irqsave
	ldr	w0, [x21, #12]
Lloh17:
	adrp	x8, _try_run@GOTPAGE
Lloh18:
	ldr	x8, [x8, _try_run@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x2, x21
	bl	_s5p_mfc_hw_call
	mov	x0, x20
	bl	_spin_unlock_irqrestore
Lloh20:
	adrp	x8, _S5P_MFC_R2H_CMD_DPB_FLUSH_RET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _S5P_MFC_R2H_CMD_DPB_FLUSH_RET@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_s5p_mfc_wait_for_done_ctx
	cbz	x0, LBB0_10
; %bb.9:
Lloh23:
	adrp	x0, l_.str@PAGE
Lloh24:
	add	x0, x0, l_.str@PAGEOFF
	bl	_mfc_err
LBB0_10:
	mov	x0, x20
	bl	_spin_lock_irqsave
	b	LBB0_13
LBB0_11:
Lloh25:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh26:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_13
; %bb.12:
	add	x21, x19, #32
	add	x1, x19, #36
	mov	x0, x21
	bl	_s5p_mfc_cleanup_queue
	mov	x0, x21
	bl	_INIT_LIST_HEAD
	str	xzr, [x19, #24]
LBB0_13:
	tbnz	w24, #0, LBB0_15
; %bb.14:
	ldr	x8, [x23]
	str	x8, [x19]
LBB0_15:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MFCINST_FINISHING,8,3          ; @MFCINST_FINISHING
	.comm	_MFCINST_RUNNING,8,3            ; @MFCINST_RUNNING
	.comm	_MFCINST_ABORT,8,3              ; @MFCINST_ABORT
	.comm	_S5P_MFC_R2H_CMD_FRAME_DONE_RET,4,2 ; @S5P_MFC_R2H_CMD_FRAME_DONE_RET
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_MFCINST_FLUSH,8,3              ; @MFCINST_FLUSH
	.comm	_try_run,4,2                    ; @try_run
	.comm	_S5P_MFC_R2H_CMD_DPB_FLUSH_RET,4,2 ; @S5P_MFC_R2H_CMD_DPB_FLUSH_RET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Err flushing buffers\n"

	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.no_dead_strip	_s5p_mfc_stop_streaming
.subsections_via_symbols
