	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_stub_open                  ## -- Begin function drm_stub_open
	.p2align	4, 0x90
_drm_stub_open:                         ## @drm_stub_open
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	callq	_iminor
	movl	%eax, %ebx
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	_drm_global_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movq	_drm_minors_idr@GOTPCREL(%rip), %rdi
	movl	%ebx, %esi
	callq	_idr_find
	testq	%rax, %rax
	je	LBB0_10
## %bb.1:
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.2:
	movq	%rbx, %rdi
	callq	_drm_device_is_unplugged
	testq	%rax, %rax
	jne	LBB0_10
## %bb.3:
	movq	(%r14), %r12
	movq	(%rbx), %rax
	movq	(%rax), %rdi
	callq	_fops_get
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	*%rax
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movl	%eax, %r13d
	movq	(%r14), %rdi
	callq	_fops_put
	movq	%r12, %rdi
	callq	_fops_get
	movq	%rax, (%r14)
	jmp	LBB0_9
LBB0_4:
	movq	%r12, (%r14)
	jmp	LBB0_10
LBB0_7:
	xorl	%r13d, %r13d
LBB0_9:
	movq	%r12, %rdi
	callq	_fops_put
LBB0_10:
	movq	_drm_global_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_drm_global_mutex,4,2           ## @drm_global_mutex
	.comm	_drm_minors_idr,4,2             ## @drm_minors_idr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_drm_stub_open                  ; -- Begin function drm_stub_open
	.p2align	2
_drm_stub_open:                         ; @drm_stub_open
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x21, x0
	bl	_iminor
	mov	x22, x0
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
Lloh5:
	adrp	x0, _drm_global_mutex@GOTPAGE
Lloh6:
	ldr	x0, [x0, _drm_global_mutex@GOTPAGEOFF]
	bl	_mutex_lock
Lloh7:
	adrp	x0, _drm_minors_idr@GOTPAGE
Lloh8:
	ldr	x0, [x0, _drm_minors_idr@GOTPAGEOFF]
	mov	x1, x22
	bl	_idr_find
	cbz	x0, LBB0_9
; %bb.1:
	ldr	x23, [x0]
	cbz	x23, LBB0_9
; %bb.2:
	mov	x0, x23
	bl	_drm_device_is_unplugged
	cbnz	x0, LBB0_9
; %bb.3:
	ldr	x22, [x20]
	ldr	x8, [x23]
	ldr	x0, [x8]
	bl	_fops_get
	str	x0, [x20]
	cbz	x0, LBB0_8
; %bb.4:
	ldr	x8, [x0]
	cbz	x8, LBB0_7
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	blr	x8
	mov	x19, x0
	cbz	w0, LBB0_7
; %bb.6:
	ldr	x0, [x20]
	bl	_fops_put
	mov	x0, x22
	bl	_fops_get
	str	x0, [x20]
LBB0_7:
	mov	x0, x22
	bl	_fops_put
	b	LBB0_9
LBB0_8:
	str	x22, [x20]
LBB0_9:
Lloh9:
	adrp	x0, _drm_global_mutex@GOTPAGE
Lloh10:
	ldr	x0, [x0, _drm_global_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_drm_global_mutex,4,2           ; @drm_global_mutex
	.comm	_drm_minors_idr,4,2             ; @drm_minors_idr
.subsections_via_symbols
