	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dropmaster_ioctl           ## -- Begin function drm_dropmaster_ioctl
	.p2align	4, 0x90
_drm_dropmaster_ioctl:                  ## @drm_dropmaster_ioctl
	.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
	movq	%rdx, %r15
	movq	%rdi, %r14
	movq	_EINVAL@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	callq	_mutex_lock
	movq	%r15, %rdi
	callq	_drm_is_current_master
	testl	%eax, %eax
	je	LBB0_5
## %bb.1:
	cmpl	$0, 4(%r14)
	je	LBB0_5
## %bb.2:
	movq	(%r15), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_4
## %bb.3:
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_LEASE
	xorl	%ebx, %ebx
	subl	(%r12), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_drm_drop_master
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Attempt to drop lessee %d as master\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_dropmaster_ioctl           ; -- Begin function drm_dropmaster_ioctl
	.p2align	2
_drm_dropmaster_ioctl:                  ; @drm_dropmaster_ioctl
	.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, x2
	mov	x19, x0
Lloh0:
	adrp	x22, _EINVAL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _EINVAL@GOTPAGEOFF]
	ldr	w8, [x22]
	neg	w20, w8
	bl	_mutex_lock
	mov	x0, x21
	bl	_drm_is_current_master
	cbz	w0, LBB0_5
; %bb.1:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	x8, [x21]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	w1, [x8]
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_LEASE
	ldr	w8, [x22]
	neg	w20, w8
	b	LBB0_5
LBB0_4:
	mov	x0, x19
	mov	x1, x21
	bl	_drm_drop_master
	mov	w20, #0
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Attempt to drop lessee %d as master\n"

.subsections_via_symbols
