	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpfe_release
_vpfe_release:                          ## @vpfe_release
	.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, %r14
	callq	_video_drvdata
	movq	%rax, %r13
	movq	(%r14), %r15
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	40(%r13), %r12
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r12, %rdx
	callq	_v4l2_dbg
	movq	%r13, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r15)
	je	LBB0_7
## %bb.1:
	cmpq	$0, 56(%r13)
	je	LBB0_6
## %bb.2:
	movq	48(%r13), %rax
	movl	(%rax), %esi
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_stream@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	callq	_v4l2_device_call_until_err
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	_ENOIOCTLCMD@GOTPCREL(%rip), %rcx
	addl	(%rcx), %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_v4l2_err
LBB0_5:
	movq	%r13, %rdi
	callq	_vpfe_stop_ccdc_capture
	movq	%r13, %rdi
	callq	_vpfe_detach_irq
	leaq	20(%r13), %rdi
	callq	_videobuf_streamoff
LBB0_6:
	movq	$0, 32(%r13)
	movq	_config_params@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r13)
	movq	%r13, %rbx
	addq	$20, %rbx
	movq	%rbx, %rdi
	callq	_videobuf_stop
	movq	%rbx, %rdi
	callq	_videobuf_mmap_free
LBB0_7:
	decl	16(%r13)
	movq	%r15, %rdi
	callq	_v4l2_fh_del
	movq	%r15, %rdi
	callq	_v4l2_fh_exit
	cmpl	$0, 16(%r13)
	jne	LBB0_11
## %bb.8:
	movq	$0, 8(%r13)
	movq	_ccdc_dev@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_10
## %bb.9:
	movl	4(%r13), %edi
	callq	*%rcx
	movq	(%rbx), %rax
LBB0_10:
	movl	(%rax), %edi
	callq	_module_put
LBB0_11:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movq	$0, (%r14)
	movq	%r15, %rdi
	callq	_kfree
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"vpfe_release\n"

	.comm	_video,4,2                      ## @video
	.comm	_s_stream,4,2                   ## @s_stream
	.comm	_ENOIOCTLCMD,4,2                ## @ENOIOCTLCMD
L_.str.1:                               ## @.str.1
	.asciz	"stream off failed in subdev\n"

	.comm	_config_params,4,2              ## @config_params
	.comm	_ccdc_dev,8,3                   ## @ccdc_dev
	.no_dead_strip	_vpfe_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpfe_release
_vpfe_release:                          ; @vpfe_release
	.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	_video_drvdata
	mov	x21, x0
	ldr	x20, [x19]
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x22, x0, #40
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x22
	bl	_v4l2_dbg
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_7
; %bb.1:
	ldr	x8, [x21, #56]
	cbz	x8, LBB0_6
; %bb.2:
	ldr	x8, [x21, #48]
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _video@GOTPAGE
Lloh6:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _s_stream@GOTPAGE
Lloh9:
	ldr	x8, [x8, _s_stream@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x22
	mov	w4, #0
	bl	_v4l2_device_call_until_err
	cbz	w0, LBB0_5
; %bb.3:
Lloh11:
	adrp	x8, _ENOIOCTLCMD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOIOCTLCMD@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_5
; %bb.4:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	bl	_v4l2_err
LBB0_5:
	mov	x0, x21
	bl	_vpfe_stop_ccdc_capture
	mov	x0, x21
	bl	_vpfe_detach_irq
	add	x0, x21, #20
	bl	_videobuf_streamoff
LBB0_6:
	str	xzr, [x21, #32]
Lloh16:
	adrp	x8, _config_params@GOTPAGE
Lloh17:
	ldr	x8, [x8, _config_params@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x21, #24]
	add	x22, x21, #20
	mov	x0, x22
	bl	_videobuf_stop
	mov	x0, x22
	bl	_videobuf_mmap_free
LBB0_7:
	ldr	w8, [x21, #16]
	sub	w8, w8, #1
	str	w8, [x21, #16]
	mov	x0, x20
	bl	_v4l2_fh_del
	mov	x0, x20
	bl	_v4l2_fh_exit
	ldr	w8, [x21, #16]
	cbnz	w8, LBB0_11
; %bb.8:
	str	xzr, [x21, #8]
Lloh19:
	adrp	x22, _ccdc_dev@GOTPAGE
Lloh20:
	ldr	x22, [x22, _ccdc_dev@GOTPAGEOFF]
	ldr	x8, [x22]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_10
; %bb.9:
	ldr	w0, [x21, #4]
	blr	x9
	ldr	x8, [x22]
LBB0_10:
	ldr	w0, [x8]
	bl	_module_put
LBB0_11:
	mov	x0, x21
	bl	_mutex_unlock
	str	xzr, [x19]
	mov	x0, x20
	bl	_kfree
	mov	w0, #0
	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
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"vpfe_release\n"

	.comm	_video,4,2                      ; @video
	.comm	_s_stream,4,2                   ; @s_stream
	.comm	_ENOIOCTLCMD,4,2                ; @ENOIOCTLCMD
l_.str.1:                               ; @.str.1
	.asciz	"stream off failed in subdev\n"

	.comm	_config_params,4,2              ; @config_params
	.comm	_ccdc_dev,8,3                   ; @ccdc_dev
	.no_dead_strip	_vpfe_release
.subsections_via_symbols
