	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gsc_m2m_release
_gsc_m2m_release:                       ## @gsc_m2m_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
	movl	(%rdi), %edi
	callq	_fh_to_ctx
	movq	%rax, %r14
	movq	8(%rax), %rbx
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_pid_nr
	movl	4(%rbx), %edx
	movq	8(%rbx), %rcx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_pr_debug
	movq	%rbx, %rdi
	callq	_mutex_lock
	movl	4(%r14), %edi
	callq	_v4l2_m2m_ctx_release
	movq	%r14, %rdi
	callq	_gsc_ctrls_delete
	movq	%r14, %rdi
	callq	_v4l2_fh_del
	movq	%r14, %rdi
	callq	_v4l2_fh_exit
	movq	8(%rbx), %rax
	leaq	-1(%rax), %rcx
	movq	%rcx, 8(%rbx)
	cmpq	$1, %rax
	jg	LBB0_2
## %bb.1:
	leaq	4(%rbx), %rsi
	movq	_ST_M2M_OPEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_clear_bit
LBB0_2:
	movq	%r14, %rdi
	callq	_kfree
	movq	%rbx, %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	"pid: %d, state: 0x%lx, refcnt= %d"

	.comm	_current,4,2                    ## @current
	.comm	_ST_M2M_OPEN,4,2                ## @ST_M2M_OPEN
	.no_dead_strip	_gsc_m2m_release
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gsc_m2m_release
_gsc_m2m_release:                       ; @gsc_m2m_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
	ldr	w0, [x0]
	bl	_fh_to_ctx
	mov	x20, x0
	ldr	x19, [x0, #8]
Lloh0:
	adrp	x8, _current@GOTPAGE
Lloh1:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_task_pid_nr
	mov	x1, x0
	mov	x21, x19
	ldr	w2, [x21, #4]!
	ldr	x3, [x19, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_debug
	mov	x0, x19
	bl	_mutex_lock
	ldr	w0, [x20, #4]
	bl	_v4l2_m2m_ctx_release
	mov	x0, x20
	bl	_gsc_ctrls_delete
	mov	x0, x20
	bl	_v4l2_fh_del
	mov	x0, x20
	bl	_v4l2_fh_exit
	ldr	x8, [x19, #8]
	subs	x8, x8, #1
	str	x8, [x19, #8]
	b.gt	LBB0_2
; %bb.1:
Lloh5:
	adrp	x8, _ST_M2M_OPEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ST_M2M_OPEN@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_clear_bit
LBB0_2:
	mov	x0, x20
	bl	_kfree
	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
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pid: %d, state: 0x%lx, refcnt= %d"

	.comm	_current,4,2                    ; @current
	.comm	_ST_M2M_OPEN,4,2                ; @ST_M2M_OPEN
	.no_dead_strip	_gsc_m2m_release
.subsections_via_symbols
