	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_fh_to_ctx
	movq	%rax, %rbx
	movq	(%rax), %rax
	movq	48(%rbx), %r14
	movq	_MFCINST_FINISHING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	movq	_MFCINST_RUNNING@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
LBB0_2:
	movq	(%r14), %rax
	cmpq	8(%rbx), %rax
	jne	LBB0_5
## %bb.3:
	cmpq	$0, 16(%r14)
	je	LBB0_5
## %bb.4:
	movq	_MFCINST_ABORT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	_S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_s5p_mfc_wait_for_done_ctx
LBB0_5:
	movq	_MFCINST_FINISHED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%r15), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	leaq	40(%rbx), %r12
	leaq	44(%rbx), %rsi
	movq	%r12, %rdi
	callq	_s5p_mfc_cleanup_queue
	movq	%r12, %rdi
	callq	_INIT_LIST_HEAD
	movq	$0, 32(%rbx)
	movq	(%r15), %rax
LBB0_7:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_cleanup_ref_queue
	leaq	24(%rbx), %r15
	movq	%rbx, %rsi
	addq	$28, %rsi
	movq	%r15, %rdi
	callq	_s5p_mfc_cleanup_queue
	movq	%r15, %rdi
	callq	_INIT_LIST_HEAD
	movq	$0, 16(%rbx)
LBB0_9:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	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	_MFCINST_FINISHED,8,3           ## @MFCINST_FINISHED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.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	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	x20, x0
	ldr	w0, [x0, #8]
	bl	_fh_to_ctx
	mov	x19, x0
	ldr	x21, [x0, #48]
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MFCINST_FINISHING@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MFCINST_FINISHING@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _MFCINST_RUNNING@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MFCINST_RUNNING@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	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:
Lloh6:
	adrp	x8, _MFCINST_ABORT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MFCINST_ABORT@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	str	x8, [x19]
Lloh9:
	adrp	x8, _S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _S5P_MFC_R2H_CMD_FRAME_DONE_RET@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_s5p_mfc_wait_for_done_ctx
LBB0_4:
Lloh12:
	adrp	x8, _MFCINST_FINISHED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MFCINST_FINISHED@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19]
	add	x21, x21, #8
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh15:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	add	x22, x19, #40
	add	x1, x19, #44
	mov	x0, x22
	bl	_s5p_mfc_cleanup_queue
	mov	x0, x22
	bl	_INIT_LIST_HEAD
	str	xzr, [x19, #32]
	ldr	x8, [x20]
LBB0_6:
Lloh18:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_cleanup_ref_queue
	add	x20, x19, #24
	add	x1, x19, #28
	mov	x0, x20
	bl	_s5p_mfc_cleanup_queue
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	str	xzr, [x19, #16]
LBB0_8:
	mov	x0, x21
	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	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.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	_MFCINST_FINISHED,8,3           ; @MFCINST_FINISHED
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.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
