	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_mfc_remove
_s5p_mfc_remove:                        ## @s5p_mfc_remove
	.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, %rbx
	callq	_platform_get_drvdata
	movq	%rax, %r15
	movl	(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdi
	callq	_v4l2_info
	leaq	20(%r15), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_MFC_NUM_CONTEXTS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%edx, %edx
	jle	LBB0_18
## %bb.1:
	movq	24(%r15), %rcx
	leaq	-1(%rdx), %rsi
	movl	%edx, %eax
	andl	$3, %eax
	cmpq	$3, %rsi
	jae	LBB0_3
## %bb.2:
	xorl	%esi, %esi
LBB0_13:
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	leaq	(%rcx,%rsi,8), %rcx
	xorl	%edx, %edx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%rdx
	cmpq	%rdx, %rax
	je	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rdx,8), %rsi
	testq	%rsi, %rsi
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	$0, (%rsi)
	jmp	LBB0_17
LBB0_18:
	movq	%r14, %rdi
	callq	_mutex_unlock
	leaq	16(%r15), %rdi
	callq	_del_timer_sync
	movq	%r15, %rdi
	addq	$12, %rdi
	callq	_flush_work
	movl	8(%r15), %edi
	callq	_video_unregister_device
	movl	4(%r15), %edi
	callq	_video_unregister_device
	movl	8(%r15), %edi
	callq	_video_device_release
	movl	4(%r15), %edi
	callq	_video_device_release
	movq	%r15, %rdi
	callq	_v4l2_device_unregister
	movq	%r15, %rdi
	callq	_s5p_mfc_unconfigure_dma_memory
	movq	%r15, %rdi
	callq	_s5p_mfc_final_pm
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	andl	$-4, %edx
	xorl	%esi, %esi
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %rsi
	cmpq	%rsi, %rdx
	je	LBB0_13
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rdi)
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rdi)
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	16(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rdi)
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	24(%rcx,%rsi,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, (%rdi)
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Removing %s\n"

	.comm	_MFC_NUM_CONTEXTS,4,2           ## @MFC_NUM_CONTEXTS
	.no_dead_strip	_s5p_mfc_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_mfc_remove
_s5p_mfc_remove:                        ; @s5p_mfc_remove
	.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	x20, x0
	bl	_platform_get_drvdata
	mov	x19, x0
	ldr	w2, [x20]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_v4l2_info
	add	x20, x19, #20
	mov	x0, x20
	bl	_mutex_lock
Lloh2:
	adrp	x8, _MFC_NUM_CONTEXTS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MFC_NUM_CONTEXTS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	ldr	x9, [x19, #24]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	str	xzr, [x10]
	b	LBB0_2
LBB0_5:
	mov	x0, x20
	bl	_mutex_unlock
	add	x0, x19, #16
	bl	_del_timer_sync
	add	x0, x19, #12
	bl	_flush_work
	ldr	w0, [x19, #8]
	bl	_video_unregister_device
	ldr	w0, [x19, #4]
	bl	_video_unregister_device
	ldr	w0, [x19, #8]
	bl	_video_device_release
	ldr	w0, [x19, #4]
	bl	_video_device_release
	mov	x0, x19
	bl	_v4l2_device_unregister
	mov	x0, x19
	bl	_s5p_mfc_unconfigure_dma_memory
	mov	x0, x19
	bl	_s5p_mfc_final_pm
	mov	w0, #0
	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
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Removing %s\n"

	.comm	_MFC_NUM_CONTEXTS,4,2           ; @MFC_NUM_CONTEXTS
	.no_dead_strip	_s5p_mfc_remove
.subsections_via_symbols
