	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lease_destroy              ## -- Begin function drm_lease_destroy
	.p2align	4, 0x90
_drm_lease_destroy:                     ## @drm_lease_destroy
	.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
	movq	24(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	(%rbx), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_LEASE
	leaq	20(%rbx), %rdi
	callq	_list_empty
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_2
## %bb.1:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG_LEASE
	movq	%rbx, %rdi
	callq	_drm_lease_owner
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	callq	_idr_remove
LBB0_2:
	leaq	16(%rbx), %rdi
	callq	_list_del
	movq	%r14, %rdi
	callq	_mutex_unlock
	cmpq	$0, 8(%rbx)
	je	LBB0_4
## %bb.3:
	leaq	8(%rbx), %r15
	movq	%r14, %rdi
	callq	_drm_sysfs_lease_event
	movq	%r15, %rdi
	callq	_drm_master_put
LBB0_4:
	movq	(%rbx), %rsi
	leaq	L_.str.2(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_DEBUG_LEASE                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"drm_lease_destroy %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"remove master %d from device list of lessees\n"

L_.str.2:                               ## @.str.2
	.asciz	"drm_lease_destroy done %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lease_destroy              ; -- Begin function drm_lease_destroy
	.p2align	2
_drm_lease_destroy:                     ; @drm_lease_destroy
	.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
	ldr	x20, [x0, #24]
	mov	x0, x20
	bl	_mutex_lock
	ldr	x1, [x19]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	add	x0, x19, #20
	bl	_list_empty
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	x1, [x19]
	cbz	x1, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	mov	x0, x19
	bl	_drm_lease_owner
	ldr	x1, [x19]
	bl	_idr_remove
LBB0_2:
	add	x0, x19, #16
	bl	_list_del
	mov	x0, x20
	bl	_mutex_unlock
	mov	x21, x19
	ldr	x8, [x21, #8]!
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x20
	bl	_drm_sysfs_lease_event
	mov	x0, x21
	bl	_drm_master_put
LBB0_4:
	ldr	x1, [x19]
Lloh4:
	adrp	x0, l_.str.2@PAGE
Lloh5:
	add	x0, x0, l_.str.2@PAGEOFF
	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
	b	_DRM_DEBUG_LEASE
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"drm_lease_destroy %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"remove master %d from device list of lessees\n"

l_.str.2:                               ; @.str.2
	.asciz	"drm_lease_destroy done %d\n"

.subsections_via_symbols
