	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_release                    ## -- Begin function drm_release
	.p2align	4, 0x90
_drm_release:                           ## @drm_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rsi), %rax
	movq	(%rax), %r14
	movq	(%r14), %rbx
	movq	_drm_global_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	%r15, %rdi
	callq	_drm_close_helper
	decl	(%rbx)
	jne	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_drm_lastclose
LBB0_2:
	movq	_drm_global_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movq	%r14, %rdi
	callq	_drm_minor_release
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_drm_global_mutex,4,2           ## @drm_global_mutex
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open_count = %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_release                    ; -- Begin function drm_release
	.p2align	2
_drm_release:                           ; @drm_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	x21, x1
	ldr	x8, [x1]
	ldr	x19, [x8]
	ldr	x20, [x19]
Lloh0:
	adrp	x0, _drm_global_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _drm_global_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldr	w1, [x20]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x21
	bl	_drm_close_helper
	ldr	w8, [x20]
	subs	w8, w8, #1
	str	w8, [x20]
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	bl	_drm_lastclose
LBB0_2:
Lloh4:
	adrp	x0, _drm_global_mutex@GOTPAGE
Lloh5:
	ldr	x0, [x0, _drm_global_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	bl	_drm_minor_release
	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	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_drm_global_mutex,4,2           ; @drm_global_mutex
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open_count = %d\n"

.subsections_via_symbols
