	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpe_release
_vpe_release:                           ## @vpe_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_video_drvdata
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_file2ctx
	movq	%rax, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_vpe_dbg
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	%rbx, %rdi
	callq	_free_mv_buffers
	leaq	20(%rbx), %rdi
	callq	_vpdma_free_desc_list
	leaq	16(%rbx), %rdi
	callq	_vpdma_free_desc_buf
	leaq	12(%rbx), %rdi
	callq	_vpdma_free_desc_buf
	leaq	8(%rbx), %rdi
	callq	_vpdma_free_desc_buf
	movq	%rbx, %rdi
	callq	_v4l2_fh_del
	movq	%rbx, %rdi
	callq	_v4l2_fh_exit
	leaq	4(%rbx), %rdi
	callq	_v4l2_ctrl_handler_free
	movl	(%rbx), %edi
	callq	_v4l2_m2m_ctx_release
	movq	%rbx, %rdi
	callq	_kfree
	movq	%r14, %rdi
	addq	$4, %rdi
	callq	_atomic_dec_return
	testq	%rax, %rax
	jne	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_vpe_dbg
LBB0_2:
	movq	%r14, %rdi
	callq	_mutex_unlock
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"releasing instance %p\n"

L_.str.1:                               ## @.str.1
	.asciz	"last instance released\n"

	.no_dead_strip	_vpe_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpe_release
_vpe_release:                           ; @vpe_release
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x0
	bl	_video_drvdata
	mov	x19, x0
	mov	x0, x20
	bl	_file2ctx
	mov	x20, x0
	str	x0, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_vpe_dbg
	mov	x0, x19
	bl	_mutex_lock
	mov	x0, x20
	bl	_free_mv_buffers
	add	x0, x20, #20
	bl	_vpdma_free_desc_list
	add	x0, x20, #16
	bl	_vpdma_free_desc_buf
	add	x0, x20, #12
	bl	_vpdma_free_desc_buf
	add	x0, x20, #8
	bl	_vpdma_free_desc_buf
	mov	x0, x20
	bl	_v4l2_fh_del
	mov	x0, x20
	bl	_v4l2_fh_exit
	add	x0, x20, #4
	bl	_v4l2_ctrl_handler_free
	ldr	w0, [x20]
	bl	_v4l2_m2m_ctx_release
	mov	x0, x20
	bl	_kfree
	add	x0, x19, #4
	bl	_atomic_dec_return
	cbnz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_vpe_dbg
LBB0_2:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"releasing instance %p\n"

l_.str.1:                               ; @.str.1
	.asciz	"last instance released\n"

	.no_dead_strip	_vpe_release
.subsections_via_symbols
