	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_legacy_unlock              ## -- Begin function drm_legacy_unlock
	.p2align	4, 0x90
_drm_legacy_unlock:                     ## @drm_legacy_unlock
	.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
	movq	%rsi, %rbx
	movq	(%rdx), %r14
	movq	_DRIVER_LEGACY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_drm_core_check_feature
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	(%rbx), %rsi
	movq	_DRM_KERNEL_CONTEXT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rsi
	jne	LBB0_5
## %bb.4:
	movq	_current@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_task_pid_nr
	movq	(%rbx), %rdx
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EOPNOTSUPP@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_6
LBB0_5:
	movq	%r14, %rdi
	callq	_drm_legacy_lock_free
	xorl	%eax, %eax
LBB0_6:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRIVER_LEGACY,4,2              ## @DRIVER_LEGACY
	.comm	_EOPNOTSUPP,4,2                 ## @EOPNOTSUPP
	.comm	_DRM_KERNEL_CONTEXT,8,3         ## @DRM_KERNEL_CONTEXT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Process %d using kernel context %d\n"

	.comm	_current,4,2                    ## @current
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_legacy_unlock              ; -- Begin function drm_legacy_unlock
	.p2align	2
_drm_legacy_unlock:                     ; @drm_legacy_unlock
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x1
	ldr	x20, [x2]
Lloh0:
	adrp	x8, _DRIVER_LEGACY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRIVER_LEGACY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_drm_core_check_feature
	cbz	w0, LBB0_3
; %bb.1:
	ldr	x1, [x19]
Lloh3:
	adrp	x8, _DRM_KERNEL_CONTEXT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRM_KERNEL_CONTEXT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x1, x8
	b.ne	LBB0_5
; %bb.2:
Lloh6:
	adrp	x8, _current@GOTPAGE
Lloh7:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_task_pid_nr
	mov	x1, x0
	ldr	x2, [x19]
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh13:
	adrp	x8, _EOPNOTSUPP@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EOPNOTSUPP@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_5:
	mov	x0, x20
	bl	_drm_legacy_lock_free
	mov	w0, #0
LBB0_6:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_DRIVER_LEGACY,4,2              ; @DRIVER_LEGACY
	.comm	_EOPNOTSUPP,4,2                 ; @EOPNOTSUPP
	.comm	_DRM_KERNEL_CONTEXT,8,3         ; @DRM_KERNEL_CONTEXT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Process %d using kernel context %d\n"

	.comm	_current,4,2                    ; @current
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
