	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lock_free                  ## -- Begin function drm_lock_free
	.p2align	4, 0x90
_drm_lock_free:                         ## @drm_lock_free
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	24(%rdi), %r12
	leaq	16(%rdi), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_bh
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_drm_lock_transfer
	movl	$1, 8(%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
LBB0_8:
	movl	$1, %eax
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rdi
	callq	_spin_unlock_bh
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %ebx
	movl	%ebx, %edi
	callq	__DRM_LOCKING_CONTEXT
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_cmpxchg
	cmpl	%ebx, %eax
	jne	LBB0_3
## %bb.4:
	movl	%ebx, %edi
	callq	__DRM_LOCK_IS_HELD
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	%ebx, %edi
	callq	__DRM_LOCKING_CONTEXT
	cmpl	%r14d, %eax
	jne	LBB0_7
LBB0_6:
	addq	$12, %r15
	movq	%r15, %rdi
	callq	_wake_up_interruptible
	xorl	%eax, %eax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, %edi
	callq	__DRM_LOCKING_CONTEXT
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_DRM_ERROR
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d freed heavyweight lock held by %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_lock_free                  ; -- Begin function drm_lock_free
	.p2align	2
_drm_lock_free:                         ; @drm_lock_free
	.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, x1
	mov	x20, x0
	ldr	x22, [x0, #24]
	add	x21, x0, #16
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	bl	_drm_lock_transfer
	mov	w19, #1
	str	w19, [x20, #8]
	mov	x0, x21
	bl	_spin_unlock_bh
	b	LBB0_8
LBB0_2:
	mov	x0, x21
	bl	_spin_unlock_bh
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x22]
	mov	x0, x21
	bl	__DRM_LOCKING_CONTEXT
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_cmpxchg
	cmp	w0, w21
	b.ne	LBB0_3
; %bb.4:
	mov	x0, x21
	bl	__DRM_LOCK_IS_HELD
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x21
	bl	__DRM_LOCKING_CONTEXT
	cmp	w0, w19
	b.ne	LBB0_7
LBB0_6:
	add	x0, x20, #12
	bl	_wake_up_interruptible
	mov	w19, #0
	b	LBB0_8
LBB0_7:
	mov	x0, x21
	bl	__DRM_LOCKING_CONTEXT
	mov	x2, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DRM_ERROR
	mov	w19, #1
LBB0_8:
	mov	x0, x19
	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	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d freed heavyweight lock held by %d\n"

.subsections_via_symbols
